diff --git a/.babelrc b/.babelrc index 2427e0401..55de8382c 100644 --- a/.babelrc +++ b/.babelrc @@ -1,21 +1,19 @@ { "presets": [ - "@babel/preset-env" - ], - "env": { - "test": { - "presets": [ - "@babel/env" - ] - } - }, - "plugins": [ [ - "@babel/plugin-transform-runtime", + "@babel/preset-env", { - "regenerator": true + "useBuiltIns": "entry", + "corejs": "3.22" } ] ], - "compact": false + "plugins": [ + "html-tag-js/jsx/jsx-to-tag.js", + "html-tag-js/jsx/syntax-parser.js", + "@babel/plugin-transform-runtime", + "@babel/plugin-transform-block-scoping" + ], + "compact": false, + "sourceMaps": "inline" } \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..d9ca0947b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,43 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/java +{ + "name": "Java", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye", + + "features": { + "ghcr.io/devcontainers/features/java:1": { + "installGradle": true, + "installGroovy": false, + "installMaven": false, + "installAnt": false, + "version": "21", + "jdkDistro": "ms", + "gradleVersion": "latest", + "mavenVersion": "none" + }, + "ghcr.io/nordcominc/devcontainer-features/android-sdk:1": { + "platform": "35", + "build_tools": "35.0.0" + }, + "ghcr.io/devcontainers/features/node:1": { + "nodeGypDependencies": false, + "installYarnUsingApt": false, + "version": "lts", + "pnpmVersion": "latest", + "nvmVersion": "latest" + } + } + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "java -version", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..dfdb8b771 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..f2c641ed1 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,6 @@ +.github/CODEOWNERS @Acode-Foundation/acode + +# workflows +.github/workflows/nightly-build.yml @unschooledgamer +.github/workflows/on-demand-preview-releases-PR.yml @unschooledgamer +.github/workflows/community-release-notifier.yml @unschooledgamer diff --git a/.github/ISSUE_TEMPLATE/0_bug_report.yml b/.github/ISSUE_TEMPLATE/0_bug_report.yml new file mode 100644 index 000000000..308a129fb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/0_bug_report.yml @@ -0,0 +1,44 @@ +name: Bug Report +description: | + Use this template for bug reports. +labels: [] +body: + - type: checkboxes + attributes: + label: Check for existing issues + description: Check the backlog of issues to reduce duplicates; if an issue already exists, place a 👍 on it. + options: + - label: Completed + required: true + - type: textarea + attributes: + label: Describe the bug / provide steps to reproduce it + description: A clear and concise description of what the bug is. If possible, then include a clip + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: Provide your app version, Android version, webview version, etc (Search "Copy Device Info" in command palette to get all these info and share it) + validations: + required: true + - type: textarea + attributes: + label: If applicable, add mockups / screenshots regarding your vision + description: Drag issues into the text input below + validations: + required: false + - type: textarea + attributes: + label: If applicable, attach your Acode.log file to this issue. + description: | + Search for `Open Log File` in Acode command palette, it will open Acode.log file then share it + or Check this location for log file: `/storage/emulated/0/Android/com.foxdebug.acode{in case of free version there will be bit more}/files/Acode.log` + value: | +
Acode.log
+        
+
+        
+ validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/1_feature_request.yml b/.github/ISSUE_TEMPLATE/1_feature_request.yml new file mode 100644 index 000000000..36daf15a6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1_feature_request.yml @@ -0,0 +1,24 @@ +name: Feature Request +description: "Suggest a new feature for Acode" +labels: ["enhancement"] +body: + - type: checkboxes + attributes: + label: Check for existing issues + description: Check the backlog of issues to reduce duplicates; if an issue already exists, place a `+1` (👍) on it. + options: + - label: Completed + required: true + - type: textarea + attributes: + label: Describe the feature + description: A clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + attributes: + label: | + If applicable, add mockups / screenshots to help present your vision of the feature + description: Drag images into the text input below + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..9e6bd14f0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Ask Questions + url: https://github.com/Acode-Foundation/Acode/discussions + about: Ask any questions regarding Acode and its ecosystem + - name: Telegram Group + url: https://t.me/foxdebug_acode + about: Friendly Acode Community for helps regarding Acode, development and more + - name: Discord Server + url: https://discord.gg/vVxVWYUAWD + about: Acode discord server diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..f33a02cd1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..848bd7a5c --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,13 @@ +translations: + - any: + - changed-files: + - any-glob-to-any-file: 'src/lang/*.json' + +docs: + - any: + - changed-files: + - any-glob-to-any-file: '**/*.md' + +enhancement: + - any: + - head-branch: ['^feature', 'feature', '^feat', '^add'] \ No newline at end of file diff --git a/.github/workflows/add-pr-labels.yml b/.github/workflows/add-pr-labels.yml new file mode 100644 index 000000000..c866e38aa --- /dev/null +++ b/.github/workflows/add-pr-labels.yml @@ -0,0 +1,17 @@ +name: Add Pull Requests Labels +on: + pull_request_target: + types: [opened, closed, ready_for_review] + +jobs: + add-labels: + timeout-minutes: 5 + runs-on: ubuntu-latest + + if: github.event.action == 'opened' + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/labeler@v6 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..6595eedec --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +name: CI + +on: + push: + pull_request: + +jobs: + spell-check: + timeout-minutes: 5 + name: Check spelling + runs-on: ubuntu-latest + + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v5 + + - name: Check spelling + uses: crate-ci/typos@master + with: + config: ./_typos.toml + + quality: + timeout-minutes: 5 + name: Linting and formatting + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Setup Biome + uses: biomejs/setup-biome@v2 + + - name: Run Biome + run: biome ci . + + translation-check: + name: Translation Check (On PR Only) + timeout-minutes: 5 + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + if: github.event_name == 'pull_request' + steps: + - name: Checkout Repository + uses: actions/checkout@v5 + - name: Use Node.js + uses: actions/setup-node@v5 + with: + cache: npm + cache-dependency-path: '**/package-lock.json' + + - name: Detect Changed Files + uses: dorny/paths-filter@v3 + id: file-changes + with: + list-files: shell + filters: | + translation: + - 'src/lang/*.json' + token: ${{ secrets.GITHUB_TOKEN }} + - name: Translation Files Check (if changed) + if: steps.file-changes.outputs.translation == 'true' + run: | + npm ci --no-audit --no-fund + npm run lang check \ No newline at end of file diff --git a/.github/workflows/close-inactive-issues.yml b/.github/workflows/close-inactive-issues.yml new file mode 100644 index 000000000..8c4fce526 --- /dev/null +++ b/.github/workflows/close-inactive-issues.yml @@ -0,0 +1,30 @@ +name: Close inactive issues +on: + schedule: + - cron: "30 1 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v9 + with: + days-before-issue-stale: 60 + days-before-issue-close: 14 + stale-issue-label: "stale" + stale-issue-message: > + Hi there! 👋 + + We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Acode, please let us know by commenting on this issue(i.e Bump!), and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 14 days. + + Thanks for your help! + close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." + days-before-pr-stale: -1 + days-before-pr-close: -1 + exempt-issue-labels: "new plugin idea, todo, enhancement, bug, Low priority, documentation" + operations-per-run: 100 + repo-token: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/community-release-notifier.yml b/.github/workflows/community-release-notifier.yml new file mode 100644 index 000000000..cc91e9ae0 --- /dev/null +++ b/.github/workflows/community-release-notifier.yml @@ -0,0 +1,44 @@ +name: community-release-notifier +on: + release: + types: [ released ] + workflow_call: + inputs: + tag_name: + required: true + description: "Release tag_name" + type: 'string' + url: + required: true + description: "release URL" + type: 'string' + body: + required: true + description: "Release Body" + type: 'string' + default: '' + secrets: + DISCORD_WEBHOOK_RELEASE_NOTES: + description: 'Discord Webhook for Notifying Releases to Discord' + required: true + +jobs: + discord-release: + if: github.repository_owner == 'Acode-Foundation' + runs-on: ubuntu-latest + steps: + - name: Get Release Content + id: get-release-content + uses: 2428392/gh-truncate-string-action@b3ff790d21cf42af3ca7579146eedb93c8fb0757 # v1.4.1 + with: + maxLength: 2000 + stringToTruncate: | + 📢 Acode [${{ github.event.release.tag_name || inputs.tag_name }}](<${{ github.event.release.url || inputs.url }}>) was just Released 🎉! + + ${{ github.event.release.body || inputs.body }} + + - name: Discord Webhook Action (Publishing) + uses: tsickert/discord-webhook@c840d45a03a323fbc3f7507ac7769dbd91bfb164 # v5.3.0 + with: + webhook-url: ${{ secrets.DISCORD_WEBHOOK_RELEASE_NOTES }} + content: ${{ steps.get-release-content.outputs.string }} diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml new file mode 100644 index 000000000..87eb5e749 --- /dev/null +++ b/.github/workflows/nightly-build.yml @@ -0,0 +1,285 @@ +# Implement to use environment secrets someday, At the moment GH Actions doesn't support those in reusable workflows (ref: https://github.com/actions/runner/issues/1490) +# at least that's what I found. + name: Nightly Build + + on: + schedule: + # Fire every day at 7:00am UTC (Roughly before EU workday and after US workday) + - cron: "0 7 * * *" + push: + tags: + - nightly + workflow_call: + inputs: + is_PR: + default: false + type: boolean + description: If a Pull Request has triggered it. + PR_NUMBER: + required: true + type: number + description: The Pull Request that triggered this workflow + skip_tagging_and_releases: + required: false + default: true + type: boolean + description: Skips Tagging & releases, since workflow_call isn't available for github.event_name, default is true + outputs: + job_result: + description: "Build job result" + value: ${{ jobs.build.result }} + + workflow_dispatch: + inputs: + skip_tagging_and_releases: + required: false + default: true + type: boolean + description: Skips Tagging & releases, since workflow_call isn't available for github.event_name, default is true + + concurrency: + # Allow only one workflow per any non-`main` branch. + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}-${{ inputs.is_PR && 'is_PR' || 'not_PR'}} + cancel-in-progress: true + + permissions: + contents: read + + env: + STORE_FILE_PATH: /tmp/app-debug.keystore + BUILD_JSON_PATH: build.json + VERSION_LABEL: ${{ (inputs.is_PR && 'pr') || 'nightly' }} + DISCORD_RELEASE_NOTIFIER_ENABLED: "true" + jobs: + build: + timeout-minutes: 60 + runs-on: ubuntu-latest + if: github.repository_owner == 'Acode-Foundation' + + permissions: +# contents write is needed to create Nightly Releases. + contents: write +# issues: write + pull-requests: write + + outputs: + release_output_url: ${{ steps.release.outputs.url }} + updated_version: ${{ steps.update-version.outputs.UPDATED_VERSION}} + RELEASE_NOTES: ${{ env.RELEASE_NOTES }} + steps: + - name: Fast Fail if secrets are missing + if: ${{ env.KEYSTORE_CONTENT == '' || env.BUILD_JSON_CONTENT == '' }} + env: + KEYSTORE_CONTENT: ${{ secrets.KEYSTORE_CONTENT }} + BUILD_JSON_CONTENT: ${{ secrets.BUILD_JSON_CONTENT }} + run: | + echo "::error title=Missing Secrets::KEYSTORE_CONTENT or BUILD_JSON_CONTENT secrets are missing! Aborting workflow." + exit 1 + + - name: Logging & summaries + run: | + echo "::group::Logging" + echo "🎯 github trigger event name: ${{ github.event_name }}" + echo "is_PR: ${{ inputs.is_PR }} " + echo "PR_NUMBER: ${{ inputs.PR_NUMBER }}" + echo "env: STORE_FILE_PATH: ${{ env.STORE_FILE_PATH }}" + echo "env: BUILD_JSON_PATH: ${{ env.BUILD_JSON_PATH }}" + echo "env: VERSION_LABEL: ${{ env. VERSION_LABEL }}" + echo "github sha: ${{ github.sha }}" + echo "should not skip tags, releases: ${{ ! inputs.skip_tagging_and_releases }} " + echo "::endgroup::" + + echo "## 🚀 Build Type: ${{ env.VERSION_LABEL }}" >> $GITHUB_STEP_SUMMARY + echo "is_PR: ${{ inputs.is_PR || 'NOT a PR' }}" >> $GITHUB_STEP_SUMMARY + echo "PR_NUMBER: ${{ inputs.PR_NUMBER || 'not a PR' }}" >> $GITHUB_STEP_SUMMARY + echo "should not skip tags, releases: ${{ ! inputs.skip_tagging_and_releases }}" >> $GITHUB_STEP_SUMMARY + + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required for tags + # persists credentials locally if tagging and releases are not skipped. + persist-credentials: ${{ ! inputs.skip_tagging_and_releases }} + ref: ${{ (inputs.is_PR && inputs.PR_NUMBER) && github.event.pull_request.head.sha || '' }} + + - name: Set up Java 21 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + cache: ${{ (!(inputs.is_PR && inputs.PR_NUMBER) && github.ref == 'refs/heads/main' && 'gradle') || '' }} + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' # or '18.x' for latest stable + + - name: Add keystore and build.json from secrets + run: | + echo "${{ secrets.KEYSTORE_CONTENT }}" | base64 -d > $STORE_FILE_PATH + echo "${{ secrets.BUILD_JSON_CONTENT }}" | base64 -d > $BUILD_JSON_PATH + echo "Keystore and build.json added successfully." + + - name: Export Commit Hash & prev tag + run: | + echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV + echo "PREV_TAG=$(git describe --tags --abbrev=0 || git rev-list --max-parents=0 HEAD)" >> $GITHUB_ENV + + - name: Extract versionCode and version from config.xml + id: extract_version + run: | + if [ ! -f config.xml ]; then + echo "config.xml not found!" + exit 1 + fi + VERSION_CODE=$(grep 'versionCode=' config.xml | sed -E 's/.*versionCode="([0-9]+)".*/\1/') + VERSION=$(grep -oP 'version="\K[0-9.]+' config.xml) + echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_OUTPUT + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + echo "Extracted Version Code: $VERSION_CODE" + echo "Extracted Version: $VERSION" + + - name: Append Commit Hash to Version and Update config.xml + id: update-version + run: | + SHORT_COMMIT_HASH=$(echo "${{ env.GIT_COMMIT }}" | cut -c 1-7) + if ${{ inputs.is_PR || false }}; then + PR_NUMBER=${{ inputs.PR_NUMBER }} + else + PR_NUMBER= + fi + UPDATED_VERSION="${{ steps.extract_version.outputs.VERSION }}-${{ env.VERSION_LABEL }}.${PR_NUMBER:-$SHORT_COMMIT_HASH}" + echo "Updated Version: $UPDATED_VERSION" + + # Update config.xml with the new version + sed -i "s/version=\"${{ steps.extract_version.outputs.VERSION }}\"/version=\"$UPDATED_VERSION\"/g" config.xml + echo "Updated version in config.xml" + # Output the updated version + echo "UPDATED_VERSION=$UPDATED_VERSION" >> $GITHUB_ENV + echo "UPDATED_VERSION=$UPDATED_VERSION" >> $GITHUB_OUTPUT + + - name: Install Node.js Packages + run: npm install + + - name: Install Cordova CLI + run: npm install -g cordova + + - name: Run npm setup + run: npm run setup + + - name: Run npm build paid dev apk + run: | + node utils/storage_manager.mjs y + npm run build paid dev apk + mv platforms/android/app/build/outputs/apk/debug/app-debug.apk /tmp/app-debug-normal.apk + echo "VERSION: $UPDATED_VERSION" >> $GITHUB_STEP_SUMMARY + + - name: Upload APK Artifact + uses: actions/upload-artifact@v4 + with: + name: app-debug-${{ env.GIT_COMMIT }} + path: /tmp/app-debug-normal.apk + + - name: Run npm build paid dev apk fdroid (for F-Droid) + if: ${{ !inputs.is_PR }} + run: | + node utils/storage_manager.mjs y + npm run build paid dev apk fdroid + mv platforms/android/app/build/outputs/apk/debug/app-debug.apk /tmp/app-debug-fdroid.apk + + - name: Upload APK Artifact + uses: actions/upload-artifact@v4 + if: ${{ !inputs.is_PR }} + with: + name: app-debug-fdroid-${{ env.GIT_COMMIT }} + path: /tmp/app-debug-fdroid.apk + + - name: remove keystore and build.json + run: | + rm $STORE_FILE_PATH $BUILD_JSON_PATH + echo "Keystore and build.json removed successfully." + + - name: Check Nightly Tag and Force Update + #if: github.event_name == 'push' && contains(github.event.ref, 'tags/nightly') == false + if: ${{ ! inputs.skip_tagging_and_releases }} + id: check-nightly-tag-force-update + run: | + # Check if the nightly tag exists and get the commit it points to + if git show-ref --quiet refs/tags/nightly; then + TAG_COMMIT=$(git rev-parse nightly) + else + TAG_COMMIT="" + fi + + # If the current commit is the same as the tag, skip updating the tag + if [ "$TAG_COMMIT" != "${{ env.GIT_COMMIT }}" ]; then + echo "releaseRequired=true" >> $GITHUB_ENV + # export tag commit before updating for change logs comparing. + echo "TAG_COMMIT=$TAG_COMMIT" >> $GITHUB_ENV + + git config --global user.name 'GitHub Actions' + git config --global user.email 'github-actions@github.com' + git tag -f nightly + git push origin nightly --force + else + echo "Nightly tag already points to this commit. Skipping update." + fi + + # 🚨⚠️ WARNING: the GITHUB_TOKEN under this step, has access to write & read access to Contents, Pull Requests + # Which is why, it uses a fine-granted token with Read-Only Access to Public Repos Only. + - name: Generate Release Notes (Experimental) + if: ${{ success() && env.releaseRequired == 'true' }} + id: gen-release-notes + continue-on-error: true + run: | + RELEASE_NOTES=$(node utils/scripts/generate-release-notes.js ${{ github.repository_owner }} Acode ${{ github.sha }} --format md --from-tag ${{ env.TAG_COMMIT }} --important-only --quiet --changelog-only) + { + echo "RELEASE_NOTES<> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.NIGHTLY_RELEASE_NOTES_GH_TOKEN }} + - name: Release Nightly Version +# Only run this step, if not called from another workflow. And a previous step is successful with releasedRequired=true + id: release + if: ${{ ! inputs.skip_tagging_and_releases && steps.check-nightly-tag-force-update.outcome == 'success' && env.releaseRequired == 'true' && !inputs.is_PR }} + uses: softprops/action-gh-release@v2 + with: + prerelease: true + name: ${{ env.UPDATED_VERSION }} + tag_name: ${{ env.UPDATED_VERSION }} + files: | + /tmp/app-debug-normal.apk + /tmp/app-debug-fdroid.apk + body: | + Automated Nightly (pre-release) Releases for Today + + [Compare Changes](https://github.com/${{ github.repository }}/compare/${{ env.TAG_COMMIT }}...${{ github.sha }}) + + ${{ env.RELEASE_NOTES }} + + - name: Update Last Comment by bot (If ran in PR) + if: inputs.is_PR + uses: marocchino/sticky-pull-request-comment@v2 + with: + hide_and_recreate: true + hide_classify: "OUTDATED" + header: on-demand-build-status + message: | + Preview Release for this, has been built. + + [Click here to view that github actions build](https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id }}) + + + community-release-notifier: + needs: build +# Run only if push tags, or triggered by a schedule + if: ${{ github.repository_owner == 'Acode-Foundation' && (contains(fromJSON('["push", "schedule"]'), github.event_name) || ! inputs.skip_tagging_and_releases) && needs.build.outputs.release_output_url }} + uses: Acode-Foundation/acode/.github/workflows/community-release-notifier.yml@main + with: + tag_name: ${{ needs.build.outputs.updated_version }} + url: ${{ needs.build.outputs.release_output_url }} + body: ${{ needs.build.outputs.RELEASE_NOTES }} + secrets: + DISCORD_WEBHOOK_RELEASE_NOTES: ${{ secrets.DISCORD_WEBHOOK_RELEASE_NOTES }} diff --git a/.github/workflows/on-demand-preview-releases-PR.yml b/.github/workflows/on-demand-preview-releases-PR.yml new file mode 100644 index 000000000..a4ee4acce --- /dev/null +++ b/.github/workflows/on-demand-preview-releases-PR.yml @@ -0,0 +1,105 @@ +name: On Demand Preview Releases for PR +# avoids paths like .md, and anything in .github folder +on: + pull_request_target: + paths-ignore: + - '!*.md' +# - '.github/**' + types: [labeled, synchronize] + +# defined at workflow-level as the workflow, Requires these permissions to function. +permissions: + contents: write + pull-requests: write + # All Pull Requests are issues, but not all issues are Pull Requests (like GitHub says 🙃) + issues: write + +concurrency: + # Allow only one workflow per any non-`main` branch. + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }} + cancel-in-progress: true + +jobs: + job_trigger: + name: Trigger Preview Release (if conditions met) + if: | + github.event.pull_request.draft == false + && (github.repository_owner == 'Acode-Foundation' + && (!contains(github.event.pull_request.labels.*.name, 'DO NOT PREVIEW RELEASE') + && (contains(github.event.pull_request.labels.*.name, 'Bypass check - PREVIEW RELEASE') + || contains(github.event.pull_request.labels.*.name, 'CI: RUN ON-DEMAND PREVIEW RELEASES'))) + ) + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + clean: false + fetch-depth: 0 + persist-credentials: false + # Checkout pull request HEAD commit instead of merge commit + ref: ${{ github.event.pull_request.head.sha }} + + - name: Remove Manually added PR Label + if: | + contains(github.event.pull_request.labels.*.name, 'CI: RUN ON-DEMAND PREVIEW RELEASES') + + run: gh pr edit $PR --remove-label "$labels" + env: + PR: ${{ github.event.pull_request.number }} + labels: 'CI: RUN ON-DEMAND PREVIEW RELEASES' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Add comment to PR + uses: marocchino/sticky-pull-request-comment@v2 + with: + hide_and_recreate: true + hide_classify: "OUTDATED" + header: on-demand-build-status + message: | + ⚒️ Starting a workflow to build, Your On-Demand Preview Release/build for ${{ github.event.pull_request.html_url || github.event.pull_request.url }}. + + status: **\`🟡 in_progress\`** + + Kindly wait, this message may be updated with success or failure status. + + For Owners: Please [Click here to view that github actions](https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id }})/ + + env: + PR: ${{ github.event.pull_request.number }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + trigger_builder: + needs: job_trigger + secrets: inherit + uses: Acode-Foundation/acode/.github/workflows/nightly-build.yml@main + with: + is_PR: true + PR_NUMBER: ${{ github.event.pull_request.number }} + skip_tagging_and_releases: true + + update_Last_Comment: + needs: [job_trigger,trigger_builder] + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'Acode-Foundation' && always() && contains(fromJSON('["failure","cancelled"]'), needs.trigger_builder.result) }} + steps: +# - name: Checkout code +# uses: actions/checkout@v4 +# with: +# clean: false +# fetch-depth: 0 + + - name: Update Last Comment by bot (if Workflow Triggering failed) + uses: marocchino/sticky-pull-request-comment@v2 + with: + hide_and_recreate: true + hide_classify: "OUTDATED" + header: on-demand-build-status + message: | + 🔴 (Workflow Trigger stopped), Your On-Demand Preview Release/build for ${{ github.event.pull_request.html_url || github.event.pull_request.url }}. + status: **${{ needs.trigger_builder.result || 'failure'}}** + + --- + For Owners: Please [Click here to view that github actions](https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id }}) diff --git a/.gitignore b/.gitignore index 35899648f..92f020ea1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,15 @@ -node_modules -platforms -build.json -www/js/build -www/css/build -www/js/ace -package-lock.json -keystore.jks \ No newline at end of file +/node_modules +/build.json +/www/build +/plugins +/platforms +/keystore.jks +/platforms/android/debug-signing.properties +/platforms/android/release-signing.properties +**/*/.DS_Store +.DS_Store +pnpm-lock.yaml +.zed +.idea +ace-builds +fdroid.bool diff --git a/.hintrc b/.hintrc new file mode 100644 index 000000000..f55dbc000 --- /dev/null +++ b/.hintrc @@ -0,0 +1,12 @@ +{ + "extends": [ + "development" + ], + "hints": { + "compat-api/css": "off", + "css-prefix-order": "off", + "meta-viewport": "off", + "detect-css-reflows/composite": "off", + "detect-css-reflows/paint": "off" + } +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..2a6b9c265 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Run Android", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}\\utils\\run-android.js", + } + ] +} \ No newline at end of file diff --git a/.vscode/plugins.json b/.vscode/plugins.json index 1469a3042..1f29ca1ec 100644 --- a/.vscode/plugins.json +++ b/.vscode/plugins.json @@ -1 +1 @@ -{"plugins":["cordova-clipboard","cordova-plugin-vibration","cordova-plugin-file","cordova-plugin-buildinfo","cordova-plugin-device","cordova-plugin-whitelist","cordova-plugin-ftp","cordova-plugin-webserver","cordova-plugin-sftp","cordova-plugin-iap","cordova-plugin-sdcard","cordova-plugin-system"]} \ No newline at end of file +{"plugins":["cordova-clipboard","cordova-plugin-buildinfo","cordova-plugin-device","cordova-plugin-file","cordova-plugin-sftp","cordova-plugin-server","cordova-plugin-ftp","cordova-plugin-sdcard","cordova-plugin-browser","cordova-plugin-iap","cordova-plugin-system","cordova-plugin-advanced-http"]} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 04b48fa4f..ad71d61d3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,376 @@ { "editor.formatOnSave": true, + "autoimport.doubleQuotes": false, + "java.configuration.updateBuildConfiguration": "disabled", + "prettier.requireConfig": true, + "javascript.format.enable": true, "editor.defaultFormatter": "esbenp.prettier-vscode", - "java.configuration.updateBuildConfiguration": "disabled" + "prettier.tabWidth": 2, + "prettier.useTabs": false, + "javascript.format.semicolons": "insert", + "[scss]": { + "editor.defaultFormatter": "vscode.css-language-features" + }, + "emmet.syntaxProfiles": { + "xml": { + "attr_quotes": "single" + }, + "html": { + "attr_quotes": "single" + }, + "javascript": { + "attr_quotes": "single", + "attr_quotes_style": "single", + "self_closing_tag": true + }, + "jsx": { + "attr_quotes": "single" + } + }, + "cSpell.words": [ + "abap", + "Acode", + "acodefree", + "actionscript", + "addedfolder", + "addedfolders", + "addstorage", + "admob", + "adoc", + "Ajit", + "alda", + "ANDROIDX", + "anglebracket", + "angularjs", + "antlr", + "anyscript", + "applescript", + "ARGB", + "Astro", + "Asuming", + "audiotrack", + "autocorrect", + "autohotkey", + "autoit", + "autosize", + "azurepipelines", + "babelrcpath", + "backbutton", + "bazel", + "biml", + "bitbucketpipeline", + "bithound", + "browserslist", + "buckbuild", + "buildinfo", + "cakefile", + "cakephp", + "canrun", + "canrw", + "Cascadia", + "changemode", + "cheader", + "cirru", + "clearclose", + "clojurescript", + "cloudfoundry", + "codacy", + "codeclimate", + "codecov", + "codekit", + "coffeelint", + "colorpicker", + "commitlintignore", + "commitlintrc", + "configpath", + "copyline", + "copylinesdown", + "copylinesup", + "cordova", + "corejs", + "cppheader", + "crossorigin", + "Csound", + "csscomb", + "csslint", + "cssmap", + "cuda", + "curlybracket", + "customise", + "cython", + "darcs", + "dartlang", + "deadlyjack", + "Debuggable", + "deviceready", + "dlang", + "dockertest", + "docpad", + "docz", + "dotjs", + "downloadget", + "doxygen", + "DPAD", + "dustjs", + "easylogic", + "Edifact", + "editmenu", + "endregion", + "ensime", + "ERUDA", + "filebrowser", + "filesize", + "Fira", + "firebasehosting", + "firestore", + "flac", + "Flix", + "floobits", + "Foxdebug", + "freemarker", + "gamemaker", + "gcode", + "getfilename", + "gitmodules", + "glsl", + "Gobstones", + "googleplay", + "gotoline", + "graphviz", + "greenkeeper", + "gridsome", + "guardfile", + "haml", + "HARDKEYBOARDHIDDEN", + "haxe", + "haxecheckstyle", + "haxedevelop", + "hideconsole", + "historyrestore", + "hjson", + "hlsl", + "homeassistant", + "htgroups", + "htmlhint", + "htmlpath", + "htpasswd", + "idris", + "idrisbin", + "idrispkg", + "imba", + "INAPP", + "infopath", + "informix", + "innosetup", + "inputhints", + "inputmethod", + "intoview", + "Invisibles", + "irid", + "jbuilder", + "JEXL", + "jsbeautify", + "jsbeautifyrc", + "jsmap", + "jsonld", + "jsonnet", + "JSSM", + "KEYBOARDHIDDEN", + "KHTML", + "kitchenci", + "kivy", + "Kumar", + "Laravel", + "lastfile", + "lenspalette", + "lintstagedrc", + "livescript", + "loaderror", + "Localname", + "Logi", + "logopath", + "Logtalk", + "lolcode", + "Lucene", + "lync", + "markdownlint", + "markojs", + "mathml", + "maxscript", + "menubutton", + "MIXAL", + "mjml", + "mlang", + "modeassoc", + "modelist", + "mojolicious", + "moleculer", + "moveline", + "movelinesdown", + "movelinesup", + "mson", + "NAVIGATIONHIDDEN", + "nestjs", + "njsproj", + "nodemon", + "NOKEYS", + "nord", + "Noto", + "NOTOUCH", + "NSIS", + "nsri", + "nunjs", + "nunjucks", + "nuxt", + "objectivecpp", + "OLED", + "oncanrun", + "onchangemode", + "onchangesession", + "ondisconnect", + "onenote", + "onexpand", + "onfold", + "onhide", + "onloaderror", + "onpurchase", + "onref", + "onremove", + "onrename", + "onrun", + "onsave", + "onscrollend", + "onscrollleft", + "onscrolltop", + "onsearch", + "onwilldisconnect", + "onwriteend", + "opencl", + "openfolder", + "opengl", + "orangered", + "ovpn", + "paket", + "partiql", + "PERSISTABLE", + "pgsql", + "photoshop", + "phpcsfixer", + "phps", + "phpt", + "phpunit", + "phraseapp", + "plantuml", + "platformio", + "Plore", + "plsql", + "poedit", + "Portugues", + "postcss", + "postcssconfig", + "postcssrc", + "powersave", + "Praat", + "praatscript", + "precommit", + "prefs", + "processinglang", + "procfile", + "Proggy", + "protobuf", + "protobug", + "PRQL", + "purescript", + "pyret", + "pyup", + "qlikview", + "qmldir", + "qsharp", + "QUICKTOOLS", + "rakefile", + "Raku", + "rakumod", + "rakutest", + "raml", + "rateapp", + "reactjs", + "reacttemplate", + "reactts", + "recents", + "rehype", + "remotefile", + "removeads", + "retext", + "rhtml", + "rnfr", + "rnto", + "robotframework", + "Roboto", + "rollup", + "rproj", + "rubocop", + "ruleset", + "saltstack", + "scilab", + "sconsole", + "SCROLLBARS", + "scrollleft", + "scrolltop", + "sdcard", + "sdlang", + "selectall", + "sequelize", + "settitle", + "shft", + "showconsole", + "silverstripe", + "smali", + "snapcraft", + "snyk", + "SPARQL", + "sqlserver", + "squarebracket", + "stargrade", + "stata", + "styl", + "stylable", + "stylelint", + "symfony", + "systemverilog", + "Tahoma", + "tera", + "Termux", + "terragrunt", + "testjs", + "testts", + "tfvars", + "themelist", + "ttcn", + "typescriptdef", + "ungap", + "unibeautify", + "unwatch", + "vala", + "vapi", + "vash", + "vbhtml", + "Verdana", + "verilog", + "vhdl", + "Visualforce", + "vsix", + "vsixmanifest", + "warningreport", + "watchmanconfig", + "webp", + "wercker", + "Wollok", + "wpgm", + "wpml", + "wtest", + "wxml", + "wxss", + "xquery", + "Zeek" + ] } \ No newline at end of file diff --git a/.vscode/typings/cordova/cordova.d.ts b/.vscode/typings/cordova/cordova.d.ts index 028ecee17..594e9b801 100644 --- a/.vscode/typings/cordova/cordova.d.ts +++ b/.vscode/typings/cordova/cordova.d.ts @@ -75,6 +75,3 @@ interface UrlUtil { /** Apache Cordova instance */ declare var cordova: Cordova; -declare module 'cordova' { - export = cordova; -} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..79a9a9326 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,737 @@ +# Change Log + +## v1.11.7 (966) + +* revert: sidebar/style.scss changes to fix collapse folders by @UnschooledGamer in https://github.com/Acode-Foundation/Acode/pull/1572 +* Terminal Service by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1570 +* fix(i18n): fix typo in ./src/lang/id-id.json by @hyperz111 in https://github.com/Acode-Foundation/Acode/pull/1577 +* fix: browser download by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1587 +* Terminal initrc support by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1590 +* chore(i18n): update de-de.json by @Mr-Update in https://github.com/Acode-Foundation/Acode/pull/1600 +* Updated & Added Missing ar-ye.json (Arabic) translations by @Hussain96o in https://github.com/Acode-Foundation/Acode/pull/1601 +* Restore terminal tabs by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1592 + - fix: terminal font issue + - Breaking change: Changed default terminal configs +* feat: service on/off by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1602 +* fix: service stop on app exit by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1603 +* fix: ED25519 SSH keys not working by @UnschooledGamer in https://github.com/Acode-Foundation/Acode/pull/1595 +* CI: Nightly Builds by @UnschooledGamer in https://github.com/Acode-Foundation/Acode/pull/1612 +* style(terminal): Some touch selection handle enhancements by @peasneovoyager2banana2 in https://github.com/Acode-Foundation/Acode/pull/1611 +* fix: pip by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1617 +* feat: Enable all file access in nightly builds by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1618 +* Add support for renaming documents in provider by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1619 +* fix: support for Acode terminal SAF URIs by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1621 +* fix: rm command by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1623 +* feat: add 'check for app updates' setting to toggle the automatic behaviour by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1624 +* chore(i18n): update hu-hu.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1626 +* Enforce Unix lf endings for shell scripts by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1637 +* AutoSuggest install command in terminal by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1638 +* feat: add plugin filtering by author and keywords by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1625 + - Refactored filtering logic to support multi-page results and improved UI feedback for filter actions. +* Translation: Update hu-hu.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1640 +* fix: init-alpine by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1641 +* fix: ANSI escape sequence in init-alpine by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1643 +* chore(i18n): update de-de.json by @Mr-Update in https://github.com/Acode-Foundation/Acode/pull/1648 +* fix: update proot binaries to support 16kb page size by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1649 +* chore(i18n): update id-id.json with new strings by @hyperz111 in https://github.com/Acode-Foundation/Acode/pull/1650 +* Translation: Update hu-Hu.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1653 +* Add confirmation prompt before closing terminal tabs by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1655 +* fix: compatibility for old android versions by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1656 +* fix: improve file sharing and URI handling by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1662 + - Improved file sharing and fixed permission issue (also in case of open with , edit with) +* fix: do not restore terminals if axs is dead by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1664 +* fix: .capitalize() removed because it changes the translations (also English) by @Mr-Update in https://github.com/Acode-Foundation/Acode/pull/1665 +* fix: `switchFile` api to respect custom subtitle by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1672 +* Update zh-cn.json and zh-hant.json by @LaunchLee in https://github.com/Acode-Foundation/Acode/pull/1674 +* fix: Translation corrected in terminal settings by @Mr-Update in https://github.com/Acode-Foundation/Acode/pull/1676 +* fix: Added missing translation for info window in file browser and app settings. by @Mr-Update in https://github.com/Acode-Foundation/Acode/pull/1677 +* Translation: Update hungarian hu-HU.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1680 +* Update ads plugin and fix some issues of free version by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1683 + - fix: system them on free version +* fix: restore folds when formatting if available by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1682 +* fix: Added missing translation for info window in terminal settings by @Mr-Update in https://github.com/Acode-Foundation/Acode/pull/1681 +* Translation: Update hungarian hu-hu.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1687 +* feat: Add clean install state functionality to app settings by @UnschooledGamer in https://github.com/Acode-Foundation/Acode/pull/1690 +* Translation: Update hungarian hu-hu.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1693 + + +## v1.11.6 (965) + +* fix: Terminal in F-Droid flavour by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1478 +* feat: update target SDK to API 35 and fix edge-to-edge compatibility by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1486 +* improve German translation by @brian200508 in https://github.com/Acode-Foundation/Acode/pull/1487 +* Translation: Update hu-hu.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1489 +* chore(update IAP library to lateset version) by @deadlyjack in https://github.com/Acode-Foundation/Acode/pull/1405 +* feat: font manager ui for managing custom fonts by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1491 +* feat: add package updated time display on plugin page by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1494 +* chore: update id-id.json by @hyperz111 in https://github.com/Acode-Foundation/Acode/pull/1495 +* fix: document provider by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1497 +* feat(sponsor page) by @deadlyjack in https://github.com/Acode-Foundation/Acode/pull/1496 +* fix: load custom fonts on restart by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1499 +* Update hu-hu.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1498 +* fix: resolve GitHub URI preview issues in server by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1501 +* fix: plugins page scrolling by @deadlyjack in https://github.com/Acode-Foundation/Acode/pull/1505 +* [chore] bump workflow dependencies to latest versions by @Jvr2022 in https://github.com/Acode-Foundation/Acode/pull/1506 +* fix: load base app stylesheet in custom editor tab by @deadlyjack in https://github.com/Acode-Foundation/Acode/pull/1507 +* update src/lang/pt-br.json by @sebastianjnuwu in https://github.com/Acode-Foundation/Acode/pull/1510 +* Add code formatter keybind by @UnschooledGamer in https://github.com/Acode-Foundation/Acode/pull/1511 +* Added hyphen in quicktools and more strings for i18n by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1516 +* chore(i18n): update id-id.json with new strings by @hyperz111 in https://github.com/Acode-Foundation/Acode/pull/1521 +* chore(i18n): update hu-hu.json with new strings by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1520 +* Add/Update Bengali (bn-BD) Translation File by @thebadhonbiswas in https://github.com/Acode-Foundation/Acode/pull/1522 +* feat: take confirmation before uninstalling terminal by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1528 +* fix ui issue by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1527 +* fix: disable changing editor theme when system is selected by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1529 +* fix: svg render issue by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1530 +* fix: encoding detection by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1533 +* fix: big screen ui and global search worker issue by @deadlyjack in https://github.com/Acode-Foundation/Acode/pull/1534 +* fix: improved terminal mounts by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1537 +* chore(i18n): refine Russian (ru-ru.json) localization with updated and new strings by @Nein-Ich-wurde-Gewinnen in https://github.com/Acode-Foundation/Acode/pull/1541 +* Fixed Plugin installation issues(in some cases) by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1546 +* feat: add option to auto detect encoding by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1547 +* fix: ftp infinite loading by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1552 +* fix: tab active state when switching tab with api by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1557 +* fix: resize of terminal and some small patches by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1562 +* fix: fdroid builds by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1565 + +## v1.11.5 (963) + +* Alpine Linux Backend by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1401 +* fix: html escaping for console page by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1411 +* Create plugin for native libs by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1413 +* feat: terminal frontend by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1415 +* Update hu-hu.json translation by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1423, https://github.com/Acode-Foundation/Acode/pull/1425, https://github.com/Acode-Foundation/Acode/pull/1440 +* chore: update id-id.json translation by @hyperz111 in https://github.com/Acode-Foundation/Acode/pull/1424, https://github.com/Acode-Foundation/Acode/pull/1447 +* All file access permission for terminal by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1426 +* refactor: plugins page by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1428 + * Fixed infinite scrolling in case of filtering on both plugin page and sidebar + * Ui improvements on plugin page +* Revamped few themes(fixes visibility issue) and Added few new ones by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1430 + * New theme: Neon, Sunset, Glass, Glass Dark + * Revamped themes: System (Dark & Light), Oled, Light + * System theme option is available on free too. +* fix: scaling issue by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1431 +* fix: quicktools toggler responsiveness(scaling) and migrate biome by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1442 +* chore: update ace to v1.43.2 by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1443 +* feat: add uninstall option in terminal setting and tab subtitle fixes by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1445 +* feat: alpine document provider(exposes terminal public dir to saf picker) by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1444 +* feat: improved logging + fix terminal installation failure by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1446 +* some terminal related quality improvements by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1449 + * fix: dont start selection in case of back gesture + * remove useless border-radius from terminal container + * fix: improve terminal cursor positioning for mobile keyboard events + * fix: update terminal container background when theme changes +* exclude alpine/public while backup by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1450 +* Custom port support in Terminal manager by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1459 +* 🌐 i18n(locale): update vietnamese translations by @Nekitori17 in https://github.com/Acode-Foundation/Acode/pull/1461 +* fix: infinite loading when previewing by @RohitKushvaha01 in https://github.com/Acode-Foundation/Acode/pull/1460 +* Feat/some improvements to terminal and its api by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1463 +* Fixes/sidebar extension state by clearing and active autocompletion box background by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1466 +* feat: add terminal like search and replace history by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1467 +* fix: theme issue in terminal context menu +* fix: prevent folder paste loops and improve SAF handling(termux) in cut operation by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1474 + - Add validation to prevent pasting folders into themselves or subdirectories + - Implement special Termux SAF handling for cut operations with recursive file/folder moving + - Fix createFileStructure to handle nested paths (foo/bar) for file:// URIs + +## v1.11.4 (962) + +* Fix renaming current Termux URI file whilst viewing/editing it by @peasneovoyager2banana2 +* fix: html preview on unsaved files by @RohitKushvaha01 +* Add markdown-it-footnote and task lists support by @UnschooledGamer +* Fix quickTools height fallback by @bajrangCoder +* Comment out column adjustment in touchHandler.js for weird selection by @bajrangCoder +* Update Indonesian Translation by @hyperz111 +* feat: :sparkles: Native Websocket Plugin (uses okhttp) by @UnschooledGamer +* fix: unintentional scrolling of tab container while dragging a tab by @peasneovoyager2banana2 +* feat. alert user when changing editor theme by @RohitKushvaha01 +* feat: Improve handling of intents before files are restored on startup by @bajrangCoder +* fix: don't save state of SAFMode="single" files by @bajrangCoder +* fix: plugin passing undefined to plugin item on plugin page by @bajrangCoder +* Integrated cordova-plugin-buildinfo as a local plugin by @RohitKushvaha01 +* fix: crash when running unsaved file by @RohitKushvaha01 +* feat: show open source plugin url on plugin page by @bajrangCoder +* fix: Make "None" option clickable in select dialog on formatter settings by @bajrangCoder +* fix: show confirm when copy/cut in sidebar instead of alert so user can proceed if they want by @bajrangCoder +* feat: plugin enable/disable functionality and update translations by @UnschooledGamer +* Update hu-hu.json by @summoner001 +* Advanced execution interface by @RohitKushvaha01 + +## v1.11.3 (959) + +* feat: added system theme by @RohitKushvaha01 +* add: close-inactive-issues.yml by @UnschooledGamer +* Added Executor by @RohitKushvaha01 +* fix: Executor Plugin's js module/interface path by @UnschooledGamer +* fix: teardrop goes out of viewport when there is no gutter by @bajrangCoder +* fix: infinite loading screen due to executor by @RohitKushvaha01 +* fix: infinite loading when previewing html files by @RohitKushvaha01 +* fix: apk related issues + +## v1.11.2 (958) + +* fix: cors related issues when installing plugins from remote by @bajrangCoder +* fix: Acode ignoring main, readme and icon fields in plugin manifest by @alMukaafih +* feat: inapp acode account login by @bajrangCoder +* fix: launchApp function by @RohitKushvaha01 +* Update plugin documentation url by @RohitKushvaha01 +* Backup restore fixes by @bajrangCoder +* file: re-emit switch and load file events after plugin load by @bajrangCoder +* fix: File copy-paste retains paste option after file is copied. by @RohitKushvaha01 +* Fix sftp sidebar UI issue by @bajrangCoder +* fix: http relative path by @RohitKushvaha01 +* Download support by @RohitKushvaha01 +* Add Custom File Type Handler API by @bajrangCoder +* fix: applying folds on reopening the app by @bajrangCoder +* feat(tabs): Implement Shadow DOM isolation for non-editor tabs by @bajrangCoder +* remove invalid font by @bajrangCoder +* Improve Indonesian Translation by @hyperz111 +* feat: improve changelogs page by @bajrangCoder +* Refactor, feat: Select dialog by @overskul +* Fix: Translate "Donation Message" and some words by @hyperz111 +* Fix: "File Not Found" error when previewing HTML files from a Termux directory by @RohitKushvaha01 +* Update zh-cn.json and zh-hant.json by @LaunchLee +* fix: console not showing on unsaved html file by @RohitKushvaha01 +* File Menu & QuickTools Visibility for editor tabs by @bajrangCoder +* fix: handle edge case for `hideQuickTools` property by @bajrangCoder +* feat: add more new keys(Home,End, PageUp, PageDown, Delete) and symbols(`~` `Backtick`,`#` ,`$` ,`%` ,`^`) for quicktools by @bajrangCoder +* Fixed select box issue and improved it by @bajrangCoder + * Added `x` to delete recent files/folder from dialog +* Update Hungarian translation by @summoner001 +* chore(i18n): update vi-vn.json by @Nekitori17 +* fix: file not found error by @RohitKushvaha01 +* feat: revamped file tree by @bajrangCoder +* fix: pagedown key issue in editor by @bajrangCoder +* feat: open files with arbitrary extension names by @RohitKushvaha01 +* add Hebrew language by @elid34 +* feat: add support for compound file paths like `.blade.php` by @bajrangCoder +* support string content in tabs by @overskul +* update Tagalog/Filipino language by @ychwah +* fix: keyboard shortcuts leaks into ace editor by @RohitKushvaha01 +* Resizeable activity by @RohitKushvaha01 +* update ace v1.41.0 by @bajrangCoder +* Fix html content access by @RohitKushvaha01 +* fix: path overlap issue in html viewer by @RohitKushvaha01 +* fix: only initiate iap stuff in case of paid plugin on sidebar by @bajrangCoder + +## v1.11.1 (957) + +### Features +- **Syntax Highlighting**: Added syntax highlighting for code blocks on the plugin page using Ace Editor. +- **Theme Settings Fallback**: Implemented a fallback mechanism on the theme settings page when a custom tab is opened. +- **QuickTools Scroll Wheel Support**: Added support for scroll wheel events in QuickTools when in click mode. +- **SFTP Improvements**: + - Enhanced logging for better debugging. + - Enabled Bouncy Castle for SFTP, resolving connection issues with certain key types. +- **App Update Mechanism**: + - Now checks for updates after app startup. + - Uses a native approach instead of traditional fetch. + +### Fixes & Improvements +- **SD Card Plugin**: Handled a few edge cases to prevent crashes. +- **GitHub Plugin Palette Fix**: Resolved an issue where the color palette was breaking the GitHub plugin. +- **Plugin Installation Fixes**: + - Updated the install button in the sidebar to prevent multiple installations. + - Fixed the installation mechanism in both the sidebar and the `installPlugin` API. +- **Quality of Life Enhancements**: + - Various small improvements when installing/uninstalling plugins from the sidebar. + +#### ⚠️ Experimental Changes ⚠️ +- **Improved Plugin Loading**: + - Only **theme plugins** load on Acode startup for faster performance. + - All other plugins load **after** Acode startup. +- **Important for Theme Developers**: + - Ensure your **plugin ID includes the word "theme"** to be correctly recognized as a theme plugin. + - No changes are needed for existing theme plugins. +- **Potential Issues**: Since this is an experimental change, some features may break. Please report any issues encountered. + +## v1.11.0 (956) + +### Fixes +* Fixed a typo: "vission" → "vision" by @ByteJoseph in #1125 +* Fixed heading and image alignment issues with `alignment="center"` on the plugin page by @bajrangCoder in #1132 +* Fixed file listing in SFTP by @bajrangCoder in #1133 +* Fixed fallback to `*/*` when the `accept` attribute is absent in `` in the in-app browser by @bajrangCoder in #1154 +* Fixed console not reappearing after page reload in the in-app browser by @bajrangCoder in #1155 +* Fixed infinite scroll on the plugin page to remove duplicates by @bajrangCoder in #1171 +* Fixed logger to limit its size in #1167 +* Fixed an issue where the info dialog wouldn't appear for non-editor tabs in #1167 +* Fixed incorrect file attributes in FTP by @bajrangCoder in #1194 +* Fixed the palette not opening when triggered from an existing palette by @bajrangCoder in #1197 +* Fixed triggering of infinite scroll on plugin page while searching by @bajrangCoder in #1200 + +### Features +* Improved tab view gesture handling to distinguish between scroll and swipe on the plugin page by @bajrangCoder in #1131 +* Added color preview for SVG files by @bajrangCoder in #1135 +* Implemented custom editor tab support by @bajrangCoder in #1136 + * Now supports image, video, and audio previews directly in the editor instead of pop-ups + * Exposed API for plugin developers to add content in editor tabs via `EditorFile` +* Redesigned the About page by @bajrangCoder in #1153 +* Added a plugin rebuild option for local plugins by @bajrangCoder in #1150 + * Plugins can use `cordova.plugin.http` instead of `fetch` to avoid CORS issues when making network requests +* Redesigned the Plugin page by @bajrangCoder in #1152 + * Added new metadata fields in `plugin.json`: `license`, `changelog`, `keywords`, and `contributors` +* Added a new option to open files in an external app from the file browser in #1163 +* Added minor sidebar UI tweaks and improved input element styling in #1164 +* Used theme colors in the extra cutout area in landscape mode instead of the default color in #1165 +* Improved file info dialog design in #1170 +* Added Eruda console support for external sites in Acode's built-in browser in #1172 +* Added a new editor setting: **"Fade fold widgets"** by @bajrangCoder in #1195 +* Added a command to change the editor and app theme via the command palette by @bajrangCoder in #1197 +* Added option to install plugins directly from sidebar extensions app by @bajrangCoder in #1200 + +### Improvements +* Improved paste operation with proper error handling in #1162 +* Rewritten SFTP implementation(#1167): + * Better performance and stability + * Improved symlink support with better visual distinction + * Proper error handling + * Enhanced file reading (downloading) and writing + * Uses native APIs for file system operations + * Better buffer handling—now even 30-40 minute videos load within seconds (faster than internal storage) + * Emoji support added +* Improved the FTP client (#1193) by @bajrangCoder + * Supports emoji-named files + * Improved symlink handling + * Better handling of videos and images as binary files + * Displays file names instead of full paths +* Reworked the plugin page UI—now displays essential info such as author, license, price, etc., in the list view by @bajrangCoder in #1196 +* Tweaked breadcrumbs in the file browser to follow the app theme in #1167 +* Updated the SSH library to `v3.1.2` in #1167 +* Removed deprecated APIs in #1167 +* Added experimental support for saving native logs in Acode Logger in #1167 +* Tweaked the donation page #1188 + +### Other Changes +* **Chore**: Updated Ace Editor to `v1.39.0` + * Added CSV & TSV mode + * Improved search support for multi-line patterns (`\n`, `\t`) + * And more—see the Ace Changelog +* Many translation updates for `hu-hu` by @summoner + +## v1.10.7 (955) + +* Update hu-hu.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1092 +* build(deps): bump path-to-regexp and express by @dependabot in https://github.com/Acode-Foundation/Acode/pull/1093 +* Update hu-hu.json by @summoner001 in https://github.com/Acode-Foundation/Acode/pull/1094 +* Exclude python `venv` and php `vendor` folders to speedup startup by @Jobians in https://github.com/Acode-Foundation/Acode/pull/1096 +* Update de-de.json to 1.10.6.954 by @Micha-he in https://github.com/Acode-Foundation/Acode/pull/1097 +* Update pl-pl.json by @andrewczm in https://github.com/Acode-Foundation/Acode/pull/1099 +* minor fixes and tweaks by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1103 + * Added new command(file explorer) to open file manager + * Added copy button to code blocks on plugin page + * some error logging for debugging + * few markdown tweaks +* Updating Brazilian Portuguese language by @sebastianjnuwu in https://github.com/Acode-Foundation/Acode/pull/1102 +* add className by @NezitX in https://github.com/Acode-Foundation/Acode/pull/1104 +* Add monochrome icon by @Npepperlinux in https://github.com/Acode-Foundation/Acode/pull/1108 +* fix: issue while making request to any ipv4, etc from app by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1107 +* Update zh-cn.json and zh-hant.json by @LaunchLee in https://github.com/Acode-Foundation/Acode/pull/1109 +* fix: show "No matches found" when palette has no matching items by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1110 +* build(deps): bump systeminformation from 5.21.8 to 5.23.14 by @dependabot in https://github.com/Acode-Foundation/Acode/pull/1111 +* Follow up for #1110 by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1112 +* fix: cleanup plugin install state on failed installations by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1113 +* feat: implement infinite scroll for plugin list by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1114 +* feat: add quick install button for plugins in sidebar by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1115 +* Plugin Dependencies by @alMukaafih in https://github.com/Acode-Foundation/Acode/pull/1030 +* updated install state to reflect fs behaviour of android by @alMukaafih in https://github.com/Acode-Foundation/Acode/pull/1118 +* fix: clean broken or half installed plugins on start by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1121 +* few improvements by @bajrangCoder in https://github.com/Acode-Foundation/Acode/pull/1122 + +## v1.10.6 (954) + +### New Features +- **Install State for Plugins**: Added an install state to improve plugin updates (#1026) by @alMukaafih, further enhanced by @bajrangCoder. +- **Selection Mode in File Browser**: Introduced a selection mode in the file browser by @bajrangCoder. +- **Persistent Notification System**: Added a persistent notification system with toast notifications by @bajrangCoder. +- **In-App Browser Command**: Added a command to open an in-app browser with a given URL by @angeloyana. +- **Font Size Shortcut Keys**: Added new key shortcuts for changing font size by @bajrangCoder: + - Increase Font Size: `Ctrl - +` or `Ctrl - =` + - Decrease Font Size: `Ctrl + -` or `Ctrl - _` +- **Command Palette Enhancements**: + - "Open Plugin Page" command for quick access to plugin pages, especially for keyboard users. + - "Copy Device Info" command to share device information for troubleshooting. +- **GitHub Alert Support**: Added GitHub alert support in plugin descriptions by @bajrangCoder. +- **File Tab Drop Behavior**: Dropping a file tab into any input or editor now inserts its path by @bajrangCoder. +- **File Browser Context Menu**: Added a "Copy URI" option in the file browser context menu by @bajrangCoder. +- **Project Import as ZIP**: Added the option to import projects as ZIP files by @bajrangCoder. +- **Backup Plugins**: You can now back up plugins, whether they are paid or free by @bajrangCoder. +- **Task List Markdown Support**: Added support for task lists (`- [x]`) in the plugin page markdown by @bajrangCoder. +- **Install as Plugin for ZIP Files**: Added the "Install as Plugin" option in the sidebar files section for ZIP files containing a `plugin.json` in the root directory by @bajrangCoder. +- **`acode.installPlugin` API**: Introduced an API for plugins to install other plugins with user consent by @bajrangCoder(available from versionCode: `954`). +- **View Changelogs in Settings**: Added an option in the settings page to view changelogs directly inside the app by @bajrangCoder. +- **App Update Checker**: Implemented an app update checker that runs on startup by @bajrangCoder. +- feat: copy/cut current line when selection is empty with same key shortcut by @angeloyana +- feat: add symlinks support in SFTP by @bajrangCoder + +### Fixes +- **Plugin Loading Failures**: Improved handling of plugin loading failures by @bajrangCoder: + - Prevents the app from crashing when plugins fail to load. + - Shows user feedback for each failed plugin while continuing to load others. +- **Internal URL Navigation**: Replaced browser navigation with scroll behavior for internal links in plugin descriptions. Links to the same markdown now scroll instead of opening a browser by @bajrangCoder. +- **Pro Version Ads Issue**: Fixed an issue where plugin context menu actions displayed ads even if the Pro version was purchased by @UnschooledGamer. +- **Termux Private URI Operations**: Resolved issues with deleting folders/files and renaming files in Termux private URI file systems. +- **Logger Enhancements**: Improved the logger to automatically detect failures and use `console.error` in Acode. +- **Preview and Server Port Issue**: Fixed an issue where the browser did not open on the given port when the preview port and server port differed. +- **Font Persistence**: Resolved an issue where fonts did not persist after restarting the app. +- **Markdown Linking**: Fixed issues with linking to headings within the same page in markdown. +- **Search Bar in File Browser**: Fixed a bug where the search bar in the file browser would get stuck and become unclosable. +- **Theme Page Issues**: Addressed issues with theme plugins, including preview rendering and checkbox state changes. +- **Formatter Mode Selection**: Fixed the formatter ignoring the selected mode for files by @alMukaafih. +- fix: fetch plugin updates even if any fails by @UnschooledGamer +- fix: plugin update page by removing unwanted option icon @bajrangCoder + +### Others +- **Plugin Refactor**: Migrated the old plugin update icon to a new toast-like notification widget. + +### Translators +- Updated translations for specific languages contributed by: + - **@Micha-he**: `de-de.json` + - **@LaunchLee**: `zh-cn.json` and `zh-hant.json` + - **@andrewczm**: `pl-pl.json` + - **@Nekitori17**: `vi-vn` + - **@s4ntiksu**: `ru-ru.json` + - **@summoner001**: `hu-hu.json` + - **@antikruk**: `be-by.json` + +--- + +## [1.10.5] (953) + +- New + - Plugin Filtering System in #1011 + - feat: Add more action menu in sidebar plugin in #1017 + - Implement Logger system in #1020 + - Feat: Use Current File for preview (Toggle option) in #1006 + - updated ace editor to v1.36.2 in #1025 + +- Fixes + - Update de-de.json in #1039 + - fixed sidebar plugin search list scrolling in #1002 + - Improve zh-TW traditional Chinese translation in #1004 + - fix: Fixed save all changes option in #1010 + - chore(i18n): vi-vn in #1016 + - removed auto paste of url on plugin page in #1023 + - fixed weird spacing issue on header #925 in #1024 + - Update zh-cn.json and zh-hant.json in #1031 + - Refactor Iap.java: Use WeakReference for Context and Activity to prevent memory leaks in #1040 + - Updated Polish translation in #1043 + - ru-ru improved in #1041 + - Update pl-pl.json in #1044 & #1045 + - fix: termux related fs operations failure in #1046 + +## [1.10.4] (952) + +- New + - Nested Files/Folder Creation + - Updated ace to latest version + - Improved displaying of Download count on Plugins page as well as on Sidebar + - Enhanced search functionality to allow searching across all available plugins from the "all" section of the plugin page. + - Added a new option on Help page for submitting bug reports. +- Fixes + - Fixed issue with the search bar on the plugin page + - Fixed issue with the search bar closing accidentally when clicking elsewhere on the screen + +## [1.10.2] + +- New + - [x] **Updated Ace editor** | 947 + - Updated Ace editor to version 1.33.1. + +## [1.10.1] + +- New + - [x] **Updated Ace editor** | 946 + - Updated Ace editor to version 1.32.9 +- Fixes + - [x] **Scrolling** | 946 + - Fixed scrollbars not showing up properly. + +## [1.10.0] + +- New + - [x] **Ace editor** | 937 + - Updated Ace editor to version 1.32.7 +- Fixes + - [x] **UI** | 944 + - Fixed status and navigation text color not visible in light theme. + - [x] **Plugin** | 944 + - Fixed updates for plugin not showing up. + - [x] **Markdown** | 945 + - Fixed markdown preview not working properly. + - [x] **Text selection** | 937 + - Fixed context menu not showing up when selecting all text from context menu after click and hold. + +## [1.9.0] + +- New + - [x] **New in app browser** | 324 + - New in app browser with new UI. + - You can emulate multiple devices. + - [x] **New mode** | 933 + - Zig mode + - Astro mode +- Fixes + - [x] **File** | 931 + - Fixed not able share, edit or open with other apps. + - Fixed file rename not working properly. | 934 + - [x] **Preview** | 934 + - Fixed preview where it opens browser two times. + +## [1.8.8] + +- New + - [x] **Natural Scrolling** | 331 + - Acode now uses natural scrolling. +- Fixes + - [x] **Selecting text** | 331 + - Fixed an issue where selecting text using long press and adding text to selection behaves unexpectedly. + - [x] **Open folders** | 331 + - Fixed an issue where removing folder from sidebar doesn't remove the selected folder. + +## [1.8.7] + +- New + - [x] **Updated Ace editor** | 318 + - Updated Ace editor to version 1.28.0 + - [x] **New problems page** | 318 + - You can now see all the problems in one place. + - You can also see the problems in opened file. + - [x] **New settings** | 318 + - New settings to toggle side buttons. + - [x] **New Plugin API** | 318 + - `SideButton` is a new component that can be used to add side buttons. + - [x] **New theme color** | 318 + - New `danger-color` and `danger-text-color` theme color. + - [x] **New key binding** | 318 + - Use `Ctrl+Shift+X` key binding to open problems page. + - [x] **Plugin** | 320 + - Install plugin directly from browser. + - [x] **Intent** | 323 + - Plugin has now API to handle intent with uri acode://module/action/value. +- Fixes + - [x] **Plugin page** | 318 + - Improved plugin page UI. + - Shows plugin quickly when opened and loads new information in background. + - [x] **Unsaved changes** | 318 + - Fixed unsaved changes not showing up in file when app restarted. + - [x] **Quicktools** | 319 + - Fixed quicktools slides back when touch moved slightly. + - [x] **Settings** | 321 + - Fixed settings not saving properly. + - [x] **Internal storage** | 322 + - Fixed renaming file. + - [x] **Side buttons** | 323 + - Fixed side buttons not shown properly. + - [x] **Open folders** | 330 + - Fixed move file/folder not working properly. + - [x] **Editor** | 330 + - Improved scrolling. + - [x] **Quicktools** | 330 + - Improved quicktools. + +## [1.8.6] - Build 313 + +- New + - [x] **Search in settings** + - You can now search for any settings in settings page. +- Updates + - [x] **Language** + - Updated language pack for Russian, Spanish, Portuguese and Deutsche. + - [x] **Updated Ace editor** + - Updated Ace editor to version 1.5.0 +- Fixes + - [x] **Sidebar search** + - Fixed sidebar search not rendering words with special characters. + - [x] **Not Loading** + - Fixed app not loading on older devices. + - [x] **Scrolling** + - Fixed scrolling not working properly on some devices. + - [x] **Eruda console** + - Fixed eruda console not working properly. + - [x] **Scrollbar** + - Fixed scrollbar not working properly. + - [x] **Custom theme** + - Fixed custom theme not working properly. + +## [1.8.5] - Build 295 + +- New + - [x] **Scroll speed** + - New 'Fast x2' scroll speed. + - [x] **Touch handling** + - Prevent accidental touch when tapping tear drop. + - [x] **Color Preview** + - You can now see color preview in css, scss, less, stylus and sass codes. + - No need to select the whole color. + - Enable/disable this feature from editor settings. + - [x] **Smaller app size** + - Reduced app size. + - [x] **Updated icon pack** + - Updated icon pack (mono color). + - [x] **Default file encoding** + - You can set default file encoding from settings. + - [x] **File encoding** + - Remember file encoding for each file. + - [x] **Sidebar apps** + - File list and extension list now remembers scroll position. + - [x] **File tab bar** + - When repositioning file tab bar, tab container will scroll when current tab is at the edge. +- Fixes + - [x] **Touch handling** + - Fixed teardrop and text menu not updated when switching tabs. + - [x] **File encoding** + - Fixed file encoding not working properly. + - [x] **File icon** + - Fixed inconsistent file icon. + - [x] **JavaScript console** + - Fixed JavaScript console not opening. + - [x] **Ads** + - Fixed ads taking screen when keyboard is open. + - [x] **Insert file** + - Fixed 'insert file' in opened folder not working properly. + +## [1.8.4] - Build 283 + +- New + - [x] **Updated Ace editor** + - Updated Ace editor to version 1.22.0 + - [x] **Open files position** + - **Bottom** `beta`: This is new option for open files position. You can change + this from settings. This will open files in bottom of the screen. + - [x] **Search in All Files** `beta` + - This feature can be used to search and replace in all files in the opened projects. + - To use this feature, open side bar and click on the search icon. + - Note: This feature is in beta, so it may not work as expected. + - [x] **Fast File Listing in Find Files (Ctrl + P)** + - Loads files at startup and caches them for faster loading. + - Watches file being created or modified from sidebar and updates the list + accordingly. + - [x] **Ctrl Key Functionality** + - Keyboard shortcuts: + - Ctrl+S: Save + - Ctrl+Shift+P: Open the command palette. (Your shortcut may be different + depending on what is saved in .keybindings.json file.) + - [x] **Plugin API** + - `contextMenu` is a component that can be used to show context menu in your plugin page. + - [x] **Customisable quick tools** + - You can now customise quick tools from settings. +- Fixes + - [x] **Scrolling Issue** + - Resolved an issue causing automatic scrolling from the cursor's + position when the back button is pressed with the soft keyboard up. + - Fixed a bug where scrollbar gets visible even when the file is not + scrollable. + - [x] **Active files in sidebar** + - Fixed active files taking whole height of sidebar. + - [x] **File opened using intent** + - Fixed file opened using intent is not set as active file. + - [x] **App doesn't load** + - Fixed an issue where the app wouldn't load when an error occurred. + - [x] **File tab bar** + - Changing file tab bar position will not make editor lose focus. + - [x] **Sidebar** + - Fixed sidebar resized unknowingly when dragged to open or close it. + - [x] **Close all tabs** + - Fixed "close all" action opens up multiple confirm dialog for every unsaved file. + - Now it will ask what to do with unsaved files. + - [x] **File changed alert** + - Fixed file changed alert showing up even when file is not changed. + - [x] **Explore** + - Fixed file not opening when opened from Explore. + - [x] **Extensions app in sidebar** + - Fixed extensions app's explore not rendering properly. + - [x] **Minor bugs** + - Fixed many minor bugs. + - Improved stability. + +## [1.8.3] - Build 278 + +- [x] Bugs fixes + +## [1.8.2] - Build 276 + +- [x] Updated ace editor to version v1.18.0 +- [x] Bugs fixes + +## [1.8.1] - Build 274 + +- [x] Clicking on gutter will go to that line +- [x] Plugin Stability improvement +- [x] Updated ace editor +- [x] Bugs fixes + +## [1.8.0] - Build 272 + +- [x] Plugins can support themes, fonts and sidebar items +- [x] Redesigned sidebar and quicktools +- [x] UI improvements +- [x] Bugs fixes + +## [1.7.2] - Build 268 + +- [x] Added new command to toggle quick tools +- [x] Added back search in quick tools +- [x] Palette will close on ESC key +- [x] Plugin settings UI +- [x] Bugs fixes + +## [1.7.1] - Build 266 + +- [x] Swipe to change tab in plugins page +- [x] Fixed update paid plugin +- [x] Bugs fixes + +## [1.7.0] - Build 262 + +- [x] New medium size teardrop +- [x] Fixed some indic languages rendering +- [x] Fixed selection bug +- [x] Support for paid plugins +- [x] Quick tools improvement +- [x] Settings will have info button, you can see more info about settings +- [x] Updated plugin system +- [x] You can see plugin review and rating +- [x] GitHub is removed from app but, you can still use it from plugin +- [x] Bugs fixes + +## [1.7.0] - Build 260 + +- [x] Quick tools improvement +- [x] Settings will have info button, you can see more info about settings +- [x] Updated plugin system +- [x] You can see plugin review and rating +- [x] GitHub is removed from app but, you can still use it from plugin +- [x] Bugs fixes + +## [1.6.1] - Build 245 + +- [x] Updated plugin CDN + +## [1.6.0] - Build 244 + +- [x] Updated plugin APIs +- [x] Updated text menu +- [x] Install plugin form device +- [x] Updated ace editor + +## [1.6.0] - Build 239 + +- [x] Fixed horizontal scroll bug +- [x] Updated ace editor + +## [1.6.0] - Build 235 + +- [x] Retry FTP/SFTP connection when fail +- [x] Supports plugin +- [x] Updated custom theme settings +- [x] Set custom port for preview in app settings +- [x] New option find file +- [x] Stability improvement +- [x] UI improvement +- [x] Fixed keyboard issues +- [x] Fixed tap hold to select text +- [x] Fixed loading files using FTP/SFTP +- [x] Fixed File checking +- [x] Fixed settings +- [x] Various fixes diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..04ecaec81 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,126 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at Acode.CODE_OF_CONDUCT.md +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Corrections Issues + +**Community Impact**: Must Not Use of inappropriate coding language or other hacker behavior deemed +Any professional or manipulative findings like ease dropping hackers, malware bots, or faulty A.I. that breaks code for attacks against citizens cut-off for those programs and users are rendered fictitious businesses spammers using meta-trans-users causing confusion and corruption problems recirculating systems. Without help fixing these misconducts are responsible with talk back in any encryptions Acode intelligence blocking them from entry to another account. Issues and comments are welcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Guidance +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent view + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent free service for bandwidth/LTE technology, for opening arguments within discussions hearing any testing that class forms, and any sort of arbitration claims processed are settled. Giving back to private sectors,to public interaction within +the community, state, country, and never excludes global conglomerates due to consumer reports, feedbacks, sharing viable information that interests any disadvantages against + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement reversal legislation relativity](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 000000000..0c52a6934 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,53 @@ +[default] +check-filename = true + +[files] +extend-exclude = [ + "node_modules", + "www", + "*.yaml", + ".vscode", + "fastlane", + "hooks", + "*.gradle", + "plugins", + "platforms", + "src/lang/ar-ye.json", + "src/lang/be-by.json", + "src/lang/bn-bd.json", + "src/lang/cs-cz.json", + "src/lang/de-de.json", + "src/lang/es-sv.json", + "src/lang/fr-fr.json", + "src/lang/hi-in.json", + "src/lang/hu-hu.json", + "src/lang/id-id.json", + "src/lang/ir-fa.json", + "src/lang/it-it.json", + "src/lang/ja-jp.json", + "src/lang/ko-kr.json", + "src/lang/ml-in.json", + "src/lang/mm-unicode.json", + "src/lang/mm-zawgyi.json", + "src/lang/pl-pl.json", + "src/lang/pt-br.json", + "src/lang/pu-in.json", + "src/lang/ru-ru.json", + "src/lang/tl-ph.json", + "src/lang/tr-tr.json", + "src/lang/uk-ua.json", + "src/lang/uz-uz.json", + "src/lang/vi-vn.json", + "src/lang/zh-cn.json", + "src/lang/zh-hant.json", + "src/lang/zh-tw.json", +] + +[default.extend-words] +# temporary thing to staisfy the linter +strech = "strech" +contaienr = "contaienr" +formate = "formate" +collapsable = "collapsable" +styl = "styl" +shft = "shft" diff --git a/biome.json b/biome.json new file mode 100644 index 000000000..40b499694 --- /dev/null +++ b/biome.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.1.4/schema.json", + "formatter": { + "enabled": true, + "indentStyle": "tab" + }, + "assist": { + "actions": { + "source": { + "organizeImports": "on" + } + } + }, + "linter": { + "enabled": true, + "rules": { + "recommended": false, + "complexity": { + "noForEach": "off", + "noStaticOnlyClass": "error", + "noUselessSwitchCase": "error", + "useFlatMap": "error" + }, + "style": { + "noNegationElse": "off", + "useForOf": "error", + "useNodejsImportProtocol": "error", + "useNumberNamespace": "error" + }, + "suspicious": { + "noDoubleEquals": "error", + "noThenProperty": "error", + "useIsArray": "error" + } + } + }, + "javascript": { + "globals": ["Global1"] + }, + "files": { + "includes": [ + "**/src/**/*", + "**/utils/**/*.js", + "!**/www/build/**/*", + "**/www/res/**/*.css", + "**/src/plugins/terminal/**", + "!**/ace-builds", + "!**/src/plugins/**/*", + "!**/plugins/**/*", + "!**/hooks/**/*", + "!**/fastlane/**/*", + "!**/res/**/*", + "!**/platforms/**/*" + ] + } +} diff --git a/build-extras.gradle b/build-extras.gradle index de342b6b9..6b606e0ed 100644 --- a/build-extras.gradle +++ b/build-extras.gradle @@ -1,7 +1,15 @@ - ext.cdvCompileSdkVersion = 30 - - configurations { - all { - exclude module: 'commons-logging' +android { + packagingOptions { + pickFirst 'META-INF/versions/9/OSGI-INF/MANIFEST.MF' } - } \ No newline at end of file +} + +configurations { + all { + exclude module: 'commons-logging' + exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on' + exclude group: 'org.bouncycastle', module: 'bcpkix-jdk15on' + exclude group: 'org.bouncycastle', module: 'bcpkix-jdk18on' + exclude group: 'org.bouncycastle', module: 'bcprov-jdk18on' + } +} \ No newline at end of file diff --git a/bun.lock b/bun.lock new file mode 100644 index 000000000..caba5e279 --- /dev/null +++ b/bun.lock @@ -0,0 +1,1509 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "com.foxdebug.acode", + "dependencies": { + "@deadlyjack/ajax": "^1.2.6", + "@ungap/custom-elements": "^1.3.0", + "@xterm/addon-attach": "^0.11.0", + "@xterm/addon-fit": "^0.10.0", + "@xterm/addon-image": "^0.8.0", + "@xterm/addon-search": "^0.15.0", + "@xterm/addon-unicode11": "^0.8.0", + "@xterm/addon-web-links": "^0.11.0", + "@xterm/addon-webgl": "^0.18.0", + "@xterm/xterm": "^5.5.0", + "autosize": "^6.0.1", + "cordova": "13.0.0", + "core-js": "^3.45.0", + "crypto-js": "^4.2.0", + "dompurify": "^3.2.6", + "escape-string-regexp": "^5.0.0", + "esprima": "^4.0.1", + "filesize": "^11.0.2", + "html-tag-js": "^2.4.15", + "js-base64": "^3.7.7", + "jszip": "^3.10.1", + "markdown-it": "^14.1.0", + "markdown-it-anchor": "^9.2.0", + "markdown-it-footnote": "^4.0.0", + "markdown-it-github-alerts": "^1.0.0", + "markdown-it-task-lists": "^2.1.1", + "mime-types": "^3.0.1", + "minimatch": "^10.0.3", + "moment": "^2.30.1", + "mustache": "^4.2.0", + "url-parse": "^1.5.10", + "vanilla-picker": "^2.12.3", + "yargs": "^18.0.0", + }, + "devDependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-runtime": "^7.28.0", + "@babel/preset-env": "^7.28.0", + "@babel/runtime": "^7.28.2", + "@babel/runtime-corejs3": "^7.28.2", + "@biomejs/biome": "2.1.4", + "@types/ace": "^0.0.52", + "@types/url-parse": "^1.4.11", + "autoprefixer": "^10.4.21", + "babel-loader": "^10.0.0", + "com.foxdebug.acode.rk.exec.proot": "file:src/plugins/proot", + "com.foxdebug.acode.rk.exec.terminal": "file:src/plugins/terminal", + "cordova-android": "^14.0.1", + "cordova-clipboard": "^1.3.0", + "cordova-plugin-advanced-http": "^3.3.1", + "cordova-plugin-browser": "file:src/plugins/browser", + "cordova-plugin-buildinfo": "file:src/plugins/cordova-plugin-buildinfo", + "cordova-plugin-device": "^2.0.3", + "cordova-plugin-file": "^8.0.1", + "cordova-plugin-ftp": "file:src/plugins/ftp", + "cordova-plugin-iap": "file:src/plugins/iap", + "cordova-plugin-sdcard": "file:src/plugins/sdcard", + "cordova-plugin-server": "file:src/plugins/server", + "cordova-plugin-sftp": "file:src/plugins/sftp", + "cordova-plugin-system": "file:src/plugins/system", + "cordova-plugin-websocket": "file:src/plugins/websocket", + "css-loader": "^7.1.2", + "mini-css-extract-plugin": "^2.9.3", + "path-browserify": "^1.0.1", + "postcss-loader": "^8.1.1", + "prettier": "^3.6.2", + "prettier-plugin-java": "^2.7.4", + "raw-loader": "^4.0.2", + "sass": "^1.90.0", + "sass-loader": "^16.0.5", + "style-loader": "^4.0.0", + "terminal": "^0.1.4", + "webpack": "^5.101.0", + "webpack-cli": "^6.0.1", + }, + }, + }, + "packages": { + "@ampproject/remapping": ["@ampproject/remapping@2.2.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.1.0", "@jridgewell/trace-mapping": "^0.3.9" } }, ""], + + "@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="], + + "@babel/compat-data": ["@babel/compat-data@7.28.0", "", {}, "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw=="], + + "@babel/core": ["@babel/core@7.28.0", "", { "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.0", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-module-transforms": "^7.27.3", "@babel/helpers": "^7.27.6", "@babel/parser": "^7.28.0", "@babel/template": "^7.27.2", "@babel/traverse": "^7.28.0", "@babel/types": "^7.28.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ=="], + + "@babel/generator": ["@babel/generator@7.28.0", "", { "dependencies": { "@babel/parser": "^7.28.0", "@babel/types": "^7.28.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg=="], + + "@babel/helper-annotate-as-pure": ["@babel/helper-annotate-as-pure@7.27.3", "", { "dependencies": { "@babel/types": "^7.27.3" } }, "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg=="], + + "@babel/helper-compilation-targets": ["@babel/helper-compilation-targets@7.27.2", "", { "dependencies": { "@babel/compat-data": "^7.27.2", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ=="], + + "@babel/helper-create-class-features-plugin": ["@babel/helper-create-class-features-plugin@7.27.1", "", { "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.1", "@babel/helper-member-expression-to-functions": "^7.27.1", "@babel/helper-optimise-call-expression": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", "@babel/traverse": "^7.27.1", "semver": "^6.3.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A=="], + + "@babel/helper-create-regexp-features-plugin": ["@babel/helper-create-regexp-features-plugin@7.27.1", "", { "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.1", "regexpu-core": "^6.2.0", "semver": "^6.3.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-uVDC72XVf8UbrH5qQTc18Agb8emwjTiZrQE11Nv3CuBEZmVvTwwE9CBUEvHku06gQCAyYf8Nv6ja1IN+6LMbxQ=="], + + "@babel/helper-define-polyfill-provider": ["@babel/helper-define-polyfill-provider@0.6.5", "", { "dependencies": { "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", "debug": "^4.4.1", "lodash.debounce": "^4.0.8", "resolve": "^1.22.10" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "sha512-uJnGFcPsWQK8fvjgGP5LZUZZsYGIoPeRjSF5PGwrelYgq7Q15/Ft9NGFp1zglwgIv//W0uG4BevRuSJRyylZPg=="], + + "@babel/helper-globals": ["@babel/helper-globals@7.28.0", "", {}, "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw=="], + + "@babel/helper-member-expression-to-functions": ["@babel/helper-member-expression-to-functions@7.27.1", "", { "dependencies": { "@babel/traverse": "^7.27.1", "@babel/types": "^7.27.1" } }, "sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA=="], + + "@babel/helper-module-imports": ["@babel/helper-module-imports@7.27.1", "", { "dependencies": { "@babel/traverse": "^7.27.1", "@babel/types": "^7.27.1" } }, "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w=="], + + "@babel/helper-module-transforms": ["@babel/helper-module-transforms@7.27.3", "", { "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", "@babel/traverse": "^7.27.3" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg=="], + + "@babel/helper-optimise-call-expression": ["@babel/helper-optimise-call-expression@7.27.1", "", { "dependencies": { "@babel/types": "^7.27.1" } }, "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw=="], + + "@babel/helper-plugin-utils": ["@babel/helper-plugin-utils@7.27.1", "", {}, "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw=="], + + "@babel/helper-remap-async-to-generator": ["@babel/helper-remap-async-to-generator@7.27.1", "", { "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.1", "@babel/helper-wrap-function": "^7.27.1", "@babel/traverse": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA=="], + + "@babel/helper-replace-supers": ["@babel/helper-replace-supers@7.27.1", "", { "dependencies": { "@babel/helper-member-expression-to-functions": "^7.27.1", "@babel/helper-optimise-call-expression": "^7.27.1", "@babel/traverse": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA=="], + + "@babel/helper-skip-transparent-expression-wrappers": ["@babel/helper-skip-transparent-expression-wrappers@7.27.1", "", { "dependencies": { "@babel/traverse": "^7.27.1", "@babel/types": "^7.27.1" } }, "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg=="], + + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="], + + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.27.1", "", {}, "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow=="], + + "@babel/helper-validator-option": ["@babel/helper-validator-option@7.27.1", "", {}, "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg=="], + + "@babel/helper-wrap-function": ["@babel/helper-wrap-function@7.27.1", "", { "dependencies": { "@babel/template": "^7.27.1", "@babel/traverse": "^7.27.1", "@babel/types": "^7.27.1" } }, "sha512-NFJK2sHUvrjo8wAU/nQTWU890/zB2jj0qBcCbZbbf+005cAsv6tMjXz31fBign6M5ov1o0Bllu+9nbqkfsjjJQ=="], + + "@babel/helpers": ["@babel/helpers@7.28.2", "", { "dependencies": { "@babel/template": "^7.27.2", "@babel/types": "^7.28.2" } }, "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw=="], + + "@babel/parser": ["@babel/parser@7.28.0", "", { "dependencies": { "@babel/types": "^7.28.0" }, "bin": { "parser": "bin/babel-parser.js" } }, "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g=="], + + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": ["@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/traverse": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-QPG3C9cCVRQLxAVwmefEmwdTanECuUBMQZ/ym5kiw3XKCGA7qkuQLcjWWHcrD/GKbn/WmJwaezfuuAOcyKlRPA=="], + + "@babel/plugin-bugfix-safari-class-field-initializer-scope": ["@babel/plugin-bugfix-safari-class-field-initializer-scope@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-qNeq3bCKnGgLkEXUuFry6dPlGfCdQNZbn7yUAPCInwAJHMU7THJfrBSozkcWq5sNM6RcF3S8XyQL2A52KNR9IA=="], + + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": ["@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-g4L7OYun04N1WyqMNjldFwlfPCLVkgB54A/YCXICZYBsvJJE3kByKv9c9+R/nAfmIfjl2rKYLNyMHboYbZaWaA=="], + + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": ["@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", "@babel/plugin-transform-optional-chaining": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.13.0" } }, "sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw=="], + + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": ["@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/traverse": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-6BpaYGDavZqkI6yT+KSPdpZFfpnd68UKXbcjI9pJ13pvHhPrCKWOOLp+ysvMeA+DxnhuPpgIaRpxRxo5A9t5jw=="], + + "@babel/plugin-proposal-private-property-in-object": ["@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2", "", { "peerDependencies": { "@babel/core": "^7.0.0-0" } }, ""], + + "@babel/plugin-syntax-import-assertions": ["@babel/plugin-syntax-import-assertions@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-UT/Jrhw57xg4ILHLFnzFpPDlMbcdEicaAtjPQpbj9wa8T4r5KVWCimHcL/460g8Ht0DMxDyjsLgiWSkVjnwPFg=="], + + "@babel/plugin-syntax-import-attributes": ["@babel/plugin-syntax-import-attributes@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww=="], + + "@babel/plugin-syntax-unicode-sets-regex": ["@babel/plugin-syntax-unicode-sets-regex@7.18.6", "", { "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, ""], + + "@babel/plugin-transform-arrow-functions": ["@babel/plugin-transform-arrow-functions@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA=="], + + "@babel/plugin-transform-async-generator-functions": ["@babel/plugin-transform-async-generator-functions@7.28.0", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-remap-async-to-generator": "^7.27.1", "@babel/traverse": "^7.28.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q=="], + + "@babel/plugin-transform-async-to-generator": ["@babel/plugin-transform-async-to-generator@7.27.1", "", { "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-remap-async-to-generator": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA=="], + + "@babel/plugin-transform-block-scoped-functions": ["@babel/plugin-transform-block-scoped-functions@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-cnqkuOtZLapWYZUYM5rVIdv1nXYuFVIltZ6ZJ7nIj585QsjKM5dhL2Fu/lICXZ1OyIAFc7Qy+bvDAtTXqGrlhg=="], + + "@babel/plugin-transform-block-scoping": ["@babel/plugin-transform-block-scoping@7.28.0", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-gKKnwjpdx5sER/wl0WN0efUBFzF/56YZO0RJrSYP4CljXnP31ByY7fol89AzomdlLNzI36AvOTmYHsnZTCkq8Q=="], + + "@babel/plugin-transform-class-properties": ["@babel/plugin-transform-class-properties@7.27.1", "", { "dependencies": { "@babel/helper-create-class-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA=="], + + "@babel/plugin-transform-class-static-block": ["@babel/plugin-transform-class-static-block@7.27.1", "", { "dependencies": { "@babel/helper-create-class-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.12.0" } }, "sha512-s734HmYU78MVzZ++joYM+NkJusItbdRcbm+AGRgJCt3iA+yux0QpD9cBVdz3tKyrjVYWRl7j0mHSmv4lhV0aoA=="], + + "@babel/plugin-transform-classes": ["@babel/plugin-transform-classes@7.28.0", "", { "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-globals": "^7.28.0", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", "@babel/traverse": "^7.28.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-IjM1IoJNw72AZFlj33Cu8X0q2XK/6AaVC3jQu+cgQ5lThWD5ajnuUAml80dqRmOhmPkTH8uAwnpMu9Rvj0LTRA=="], + + "@babel/plugin-transform-computed-properties": ["@babel/plugin-transform-computed-properties@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/template": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-lj9PGWvMTVksbWiDT2tW68zGS/cyo4AkZ/QTp0sQT0mjPopCmrSkzxeXkznjqBxzDI6TclZhOJbBmbBLjuOZUw=="], + + "@babel/plugin-transform-destructuring": ["@babel/plugin-transform-destructuring@7.28.0", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/traverse": "^7.28.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-v1nrSMBiKcodhsyJ4Gf+Z0U/yawmJDBOTpEB3mcQY52r9RIyPneGyAS/yM6seP/8I+mWI3elOMtT5dB8GJVs+A=="], + + "@babel/plugin-transform-dotall-regex": ["@babel/plugin-transform-dotall-regex@7.27.1", "", { "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-gEbkDVGRvjj7+T1ivxrfgygpT7GUd4vmODtYpbs0gZATdkX8/iSnOtZSxiZnsgm1YjTgjI6VKBGSJJevkrclzw=="], + + "@babel/plugin-transform-duplicate-keys": ["@babel/plugin-transform-duplicate-keys@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-MTyJk98sHvSs+cvZ4nOauwTTG1JeonDjSGvGGUNHreGQns+Mpt6WX/dVzWBHgg+dYZhkC4X+zTDfkTU+Vy9y7Q=="], + + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": ["@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.27.1", "", { "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-hkGcueTEzuhB30B3eJCbCYeCaaEQOmQR0AdvzpD4LoN0GXMWzzGSuRrxR2xTnCrvNbVwK9N6/jQ92GSLfiZWoQ=="], + + "@babel/plugin-transform-dynamic-import": ["@babel/plugin-transform-dynamic-import@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-MHzkWQcEmjzzVW9j2q8LGjwGWpG2mjwaaB0BNQwst3FIjqsg8Ct/mIZlvSPJvfi9y2AC8mi/ktxbFVL9pZ1I4A=="], + + "@babel/plugin-transform-explicit-resource-management": ["@babel/plugin-transform-explicit-resource-management@7.28.0", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/plugin-transform-destructuring": "^7.28.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-K8nhUcn3f6iB+P3gwCv/no7OdzOZQcKchW6N389V6PD8NUWKZHzndOd9sPDVbMoBsbmjMqlB4L9fm+fEFNVlwQ=="], + + "@babel/plugin-transform-exponentiation-operator": ["@babel/plugin-transform-exponentiation-operator@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-uspvXnhHvGKf2r4VVtBpeFnuDWsJLQ6MF6lGJLC89jBR1uoVeqM416AZtTuhTezOfgHicpJQmoD5YUakO/YmXQ=="], + + "@babel/plugin-transform-export-namespace-from": ["@babel/plugin-transform-export-namespace-from@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-tQvHWSZ3/jH2xuq/vZDy0jNn+ZdXJeM8gHvX4lnJmsc3+50yPlWdZXIc5ay+umX+2/tJIqHqiEqcJvxlmIvRvQ=="], + + "@babel/plugin-transform-for-of": ["@babel/plugin-transform-for-of@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw=="], + + "@babel/plugin-transform-function-name": ["@babel/plugin-transform-function-name@7.27.1", "", { "dependencies": { "@babel/helper-compilation-targets": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1", "@babel/traverse": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ=="], + + "@babel/plugin-transform-json-strings": ["@babel/plugin-transform-json-strings@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-6WVLVJiTjqcQauBhn1LkICsR2H+zm62I3h9faTDKt1qP4jn2o72tSvqMwtGFKGTpojce0gJs+76eZ2uCHRZh0Q=="], + + "@babel/plugin-transform-literals": ["@babel/plugin-transform-literals@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA=="], + + "@babel/plugin-transform-logical-assignment-operators": ["@babel/plugin-transform-logical-assignment-operators@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-SJvDs5dXxiae4FbSL1aBJlG4wvl594N6YEVVn9e3JGulwioy6z3oPjx/sQBO3Y4NwUu5HNix6KJ3wBZoewcdbw=="], + + "@babel/plugin-transform-member-expression-literals": ["@babel/plugin-transform-member-expression-literals@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-hqoBX4dcZ1I33jCSWcXrP+1Ku7kdqXf1oeah7ooKOIiAdKQ+uqftgCFNOSzA5AMS2XIHEYeGFg4cKRCdpxzVOQ=="], + + "@babel/plugin-transform-modules-amd": ["@babel/plugin-transform-modules-amd@7.27.1", "", { "dependencies": { "@babel/helper-module-transforms": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-iCsytMg/N9/oFq6n+gFTvUYDZQOMK5kEdeYxmxt91fcJGycfxVP9CnrxoliM0oumFERba2i8ZtwRUCMhvP1LnA=="], + + "@babel/plugin-transform-modules-commonjs": ["@babel/plugin-transform-modules-commonjs@7.27.1", "", { "dependencies": { "@babel/helper-module-transforms": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw=="], + + "@babel/plugin-transform-modules-systemjs": ["@babel/plugin-transform-modules-systemjs@7.27.1", "", { "dependencies": { "@babel/helper-module-transforms": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", "@babel/traverse": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-w5N1XzsRbc0PQStASMksmUeqECuzKuTJer7kFagK8AXgpCMkeDMO5S+aaFb7A51ZYDF7XI34qsTX+fkHiIm5yA=="], + + "@babel/plugin-transform-modules-umd": ["@babel/plugin-transform-modules-umd@7.27.1", "", { "dependencies": { "@babel/helper-module-transforms": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-iQBE/xC5BV1OxJbp6WG7jq9IWiD+xxlZhLrdwpPkTX3ydmXdvoCpyfJN7acaIBZaOqTfr76pgzqBJflNbeRK+w=="], + + "@babel/plugin-transform-named-capturing-groups-regex": ["@babel/plugin-transform-named-capturing-groups-regex@7.27.1", "", { "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-SstR5JYy8ddZvD6MhV0tM/j16Qds4mIpJTOd1Yu9J9pJjH93bxHECF7pgtc28XvkzTD6Pxcm/0Z73Hvk7kb3Ng=="], + + "@babel/plugin-transform-new-target": ["@babel/plugin-transform-new-target@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-f6PiYeqXQ05lYq3TIfIDu/MtliKUbNwkGApPUvyo6+tc7uaR4cPjPe7DFPr15Uyycg2lZU6btZ575CuQoYh7MQ=="], + + "@babel/plugin-transform-nullish-coalescing-operator": ["@babel/plugin-transform-nullish-coalescing-operator@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA=="], + + "@babel/plugin-transform-numeric-separator": ["@babel/plugin-transform-numeric-separator@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-fdPKAcujuvEChxDBJ5c+0BTaS6revLV7CJL08e4m3de8qJfNIuCc2nc7XJYOjBoTMJeqSmwXJ0ypE14RCjLwaw=="], + + "@babel/plugin-transform-object-rest-spread": ["@babel/plugin-transform-object-rest-spread@7.28.0", "", { "dependencies": { "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", "@babel/plugin-transform-destructuring": "^7.28.0", "@babel/plugin-transform-parameters": "^7.27.7", "@babel/traverse": "^7.28.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-9VNGikXxzu5eCiQjdE4IZn8sb9q7Xsk5EXLDBKUYg1e/Tve8/05+KJEtcxGxAgCY5t/BpKQM+JEL/yT4tvgiUA=="], + + "@babel/plugin-transform-object-super": ["@babel/plugin-transform-object-super@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-SFy8S9plRPbIcxlJ8A6mT/CxFdJx/c04JEctz4jf8YZaVS2px34j7NXRrlGlHkN/M2gnpL37ZpGRGVFLd3l8Ng=="], + + "@babel/plugin-transform-optional-catch-binding": ["@babel/plugin-transform-optional-catch-binding@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-txEAEKzYrHEX4xSZN4kJ+OfKXFVSWKB2ZxM9dpcE3wT7smwkNmXo5ORRlVzMVdJbD+Q8ILTgSD7959uj+3Dm3Q=="], + + "@babel/plugin-transform-optional-chaining": ["@babel/plugin-transform-optional-chaining@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg=="], + + "@babel/plugin-transform-parameters": ["@babel/plugin-transform-parameters@7.27.7", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-qBkYTYCb76RRxUM6CcZA5KRu8K4SM8ajzVeUgVdMVO9NN9uI/GaVmBg/WKJJGnNokV9SY8FxNOVWGXzqzUidBg=="], + + "@babel/plugin-transform-private-methods": ["@babel/plugin-transform-private-methods@7.27.1", "", { "dependencies": { "@babel/helper-create-class-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-10FVt+X55AjRAYI9BrdISN9/AQWHqldOeZDUoLyif1Kn05a56xVBXb8ZouL8pZ9jem8QpXaOt8TS7RHUIS+GPA=="], + + "@babel/plugin-transform-private-property-in-object": ["@babel/plugin-transform-private-property-in-object@7.27.1", "", { "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.1", "@babel/helper-create-class-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-5J+IhqTi1XPa0DXF83jYOaARrX+41gOewWbkPyjMNRDqgOCqdffGh8L3f/Ek5utaEBZExjSAzcyjmV9SSAWObQ=="], + + "@babel/plugin-transform-property-literals": ["@babel/plugin-transform-property-literals@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-oThy3BCuCha8kDZ8ZkgOg2exvPYUlprMukKQXI1r1pJ47NCvxfkEy8vK+r/hT9nF0Aa4H1WUPZZjHTFtAhGfmQ=="], + + "@babel/plugin-transform-regenerator": ["@babel/plugin-transform-regenerator@7.28.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-P0QiV/taaa3kXpLY+sXla5zec4E+4t4Aqc9ggHlfZ7a2cp8/x/Gv08jfwEtn9gnnYIMvHx6aoOZ8XJL8eU71Dg=="], + + "@babel/plugin-transform-regexp-modifiers": ["@babel/plugin-transform-regexp-modifiers@7.27.1", "", { "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-TtEciroaiODtXvLZv4rmfMhkCv8jx3wgKpL68PuiPh2M4fvz5jhsA7697N1gMvkvr/JTF13DrFYyEbY9U7cVPA=="], + + "@babel/plugin-transform-reserved-words": ["@babel/plugin-transform-reserved-words@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-V2ABPHIJX4kC7HegLkYoDpfg9PVmuWy/i6vUM5eGK22bx4YVFD3M5F0QQnWQoDs6AGsUWTVOopBiMFQgHaSkVw=="], + + "@babel/plugin-transform-runtime": ["@babel/plugin-transform-runtime@7.28.0", "", { "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1", "babel-plugin-polyfill-corejs2": "^0.4.14", "babel-plugin-polyfill-corejs3": "^0.13.0", "babel-plugin-polyfill-regenerator": "^0.6.5", "semver": "^6.3.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-dGopk9nZrtCs2+nfIem25UuHyt5moSJamArzIoh9/vezUQPmYDOzjaHDCkAzuGJibCIkPup8rMT2+wYB6S73cA=="], + + "@babel/plugin-transform-shorthand-properties": ["@babel/plugin-transform-shorthand-properties@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ=="], + + "@babel/plugin-transform-spread": ["@babel/plugin-transform-spread@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-kpb3HUqaILBJcRFVhFUs6Trdd4mkrzcGXss+6/mxUd273PfbWqSDHRzMT2234gIg2QYfAjvXLSquP1xECSg09Q=="], + + "@babel/plugin-transform-sticky-regex": ["@babel/plugin-transform-sticky-regex@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g=="], + + "@babel/plugin-transform-template-literals": ["@babel/plugin-transform-template-literals@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg=="], + + "@babel/plugin-transform-typeof-symbol": ["@babel/plugin-transform-typeof-symbol@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-RiSILC+nRJM7FY5srIyc4/fGIwUhyDuuBSdWn4y6yT6gm652DpCHZjIipgn6B7MQ1ITOUnAKWixEUjQRIBIcLw=="], + + "@babel/plugin-transform-unicode-escapes": ["@babel/plugin-transform-unicode-escapes@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-Ysg4v6AmF26k9vpfFuTZg8HRfVWzsh1kVfowA23y9j/Gu6dOuahdUVhkLqpObp3JIv27MLSii6noRnuKN8H0Mg=="], + + "@babel/plugin-transform-unicode-property-regex": ["@babel/plugin-transform-unicode-property-regex@7.27.1", "", { "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-uW20S39PnaTImxp39O5qFlHLS9LJEmANjMG7SxIhap8rCHqu0Ik+tLEPX5DKmHn6CsWQ7j3lix2tFOa5YtL12Q=="], + + "@babel/plugin-transform-unicode-regex": ["@babel/plugin-transform-unicode-regex@7.27.1", "", { "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw=="], + + "@babel/plugin-transform-unicode-sets-regex": ["@babel/plugin-transform-unicode-sets-regex@7.27.1", "", { "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-EtkOujbc4cgvb0mlpQefi4NTPBzhSIevblFevACNLUspmrALgmEBdL/XfnyyITfd8fKBZrZys92zOWcik7j9Tw=="], + + "@babel/preset-env": ["@babel/preset-env@7.28.0", "", { "dependencies": { "@babel/compat-data": "^7.28.0", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-validator-option": "^7.27.1", "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.27.1", "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1", "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.27.1", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-import-assertions": "^7.27.1", "@babel/plugin-syntax-import-attributes": "^7.27.1", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.27.1", "@babel/plugin-transform-async-generator-functions": "^7.28.0", "@babel/plugin-transform-async-to-generator": "^7.27.1", "@babel/plugin-transform-block-scoped-functions": "^7.27.1", "@babel/plugin-transform-block-scoping": "^7.28.0", "@babel/plugin-transform-class-properties": "^7.27.1", "@babel/plugin-transform-class-static-block": "^7.27.1", "@babel/plugin-transform-classes": "^7.28.0", "@babel/plugin-transform-computed-properties": "^7.27.1", "@babel/plugin-transform-destructuring": "^7.28.0", "@babel/plugin-transform-dotall-regex": "^7.27.1", "@babel/plugin-transform-duplicate-keys": "^7.27.1", "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.27.1", "@babel/plugin-transform-dynamic-import": "^7.27.1", "@babel/plugin-transform-explicit-resource-management": "^7.28.0", "@babel/plugin-transform-exponentiation-operator": "^7.27.1", "@babel/plugin-transform-export-namespace-from": "^7.27.1", "@babel/plugin-transform-for-of": "^7.27.1", "@babel/plugin-transform-function-name": "^7.27.1", "@babel/plugin-transform-json-strings": "^7.27.1", "@babel/plugin-transform-literals": "^7.27.1", "@babel/plugin-transform-logical-assignment-operators": "^7.27.1", "@babel/plugin-transform-member-expression-literals": "^7.27.1", "@babel/plugin-transform-modules-amd": "^7.27.1", "@babel/plugin-transform-modules-commonjs": "^7.27.1", "@babel/plugin-transform-modules-systemjs": "^7.27.1", "@babel/plugin-transform-modules-umd": "^7.27.1", "@babel/plugin-transform-named-capturing-groups-regex": "^7.27.1", "@babel/plugin-transform-new-target": "^7.27.1", "@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1", "@babel/plugin-transform-numeric-separator": "^7.27.1", "@babel/plugin-transform-object-rest-spread": "^7.28.0", "@babel/plugin-transform-object-super": "^7.27.1", "@babel/plugin-transform-optional-catch-binding": "^7.27.1", "@babel/plugin-transform-optional-chaining": "^7.27.1", "@babel/plugin-transform-parameters": "^7.27.7", "@babel/plugin-transform-private-methods": "^7.27.1", "@babel/plugin-transform-private-property-in-object": "^7.27.1", "@babel/plugin-transform-property-literals": "^7.27.1", "@babel/plugin-transform-regenerator": "^7.28.0", "@babel/plugin-transform-regexp-modifiers": "^7.27.1", "@babel/plugin-transform-reserved-words": "^7.27.1", "@babel/plugin-transform-shorthand-properties": "^7.27.1", "@babel/plugin-transform-spread": "^7.27.1", "@babel/plugin-transform-sticky-regex": "^7.27.1", "@babel/plugin-transform-template-literals": "^7.27.1", "@babel/plugin-transform-typeof-symbol": "^7.27.1", "@babel/plugin-transform-unicode-escapes": "^7.27.1", "@babel/plugin-transform-unicode-property-regex": "^7.27.1", "@babel/plugin-transform-unicode-regex": "^7.27.1", "@babel/plugin-transform-unicode-sets-regex": "^7.27.1", "@babel/preset-modules": "0.1.6-no-external-plugins", "babel-plugin-polyfill-corejs2": "^0.4.14", "babel-plugin-polyfill-corejs3": "^0.13.0", "babel-plugin-polyfill-regenerator": "^0.6.5", "core-js-compat": "^3.43.0", "semver": "^6.3.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-VmaxeGOwuDqzLl5JUkIRM1X2Qu2uKGxHEQWh+cvvbl7JuJRgKGJSfsEF/bUaxFhJl/XAyxBe7q7qSuTbKFuCyg=="], + + "@babel/preset-modules": ["@babel/preset-modules@0.1.6-no-external-plugins", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/types": "^7.4.4", "esutils": "^2.0.2" }, "peerDependencies": { "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" } }, ""], + + "@babel/runtime": ["@babel/runtime@7.28.2", "", {}, "sha512-KHp2IflsnGywDjBWDkR9iEqiWSpc8GIi0lgTT3mOElT0PP1tG26P4tmFI2YvAdzgq9RGyoHZQEIEdZy6Ec5xCA=="], + + "@babel/runtime-corejs3": ["@babel/runtime-corejs3@7.28.2", "", { "dependencies": { "core-js-pure": "^3.43.0" } }, "sha512-FVFaVs2/dZgD3Y9ZD+AKNKjyGKzwu0C54laAXWUXgLcVXcCX6YZ6GhK2cp7FogSN2OA0Fu+QT8dP3FUdo9ShSQ=="], + + "@babel/template": ["@babel/template@7.27.2", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/parser": "^7.27.2", "@babel/types": "^7.27.1" } }, "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw=="], + + "@babel/traverse": ["@babel/traverse@7.28.0", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.0", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.0", "@babel/template": "^7.27.2", "@babel/types": "^7.28.0", "debug": "^4.3.1" } }, "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg=="], + + "@babel/types": ["@babel/types@7.28.2", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" } }, "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ=="], + + "@biomejs/biome": ["@biomejs/biome@2.1.4", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.1.4", "@biomejs/cli-darwin-x64": "2.1.4", "@biomejs/cli-linux-arm64": "2.1.4", "@biomejs/cli-linux-arm64-musl": "2.1.4", "@biomejs/cli-linux-x64": "2.1.4", "@biomejs/cli-linux-x64-musl": "2.1.4", "@biomejs/cli-win32-arm64": "2.1.4", "@biomejs/cli-win32-x64": "2.1.4" }, "bin": { "biome": "bin/biome" } }, "sha512-QWlrqyxsU0FCebuMnkvBIkxvPqH89afiJzjMl+z67ybutse590jgeaFdDurE9XYtzpjRGTI1tlUZPGWmbKsElA=="], + + "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.1.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-sCrNENE74I9MV090Wq/9Dg7EhPudx3+5OiSoQOkIe3DLPzFARuL1dOwCWhKCpA3I5RHmbrsbNSRfZwCabwd8Qg=="], + + "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.1.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-gOEICJbTCy6iruBywBDcG4X5rHMbqCPs3clh3UQ+hRKlgvJTk4NHWQAyHOXvaLe+AxD1/TNX1jbZeffBJzcrOw=="], + + "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.1.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-juhEkdkKR4nbUi5k/KRp1ocGPNWLgFRD4NrHZSveYrD6i98pyvuzmS9yFYgOZa5JhaVqo0HPnci0+YuzSwT2fw=="], + + "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.1.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-nYr7H0CyAJPaLupFE2cH16KZmRC5Z9PEftiA2vWxk+CsFkPZQ6dBRdcC6RuS+zJlPc/JOd8xw3uCCt9Pv41WvQ=="], + + "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.1.4", "", { "os": "linux", "cpu": "x64" }, "sha512-Eoy9ycbhpJVYuR+LskV9s3uyaIkp89+qqgqhGQsWnp/I02Uqg2fXFblHJOpGZR8AxdB9ADy87oFVxn9MpFKUrw=="], + + "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.1.4", "", { "os": "linux", "cpu": "x64" }, "sha512-lvwvb2SQQHctHUKvBKptR6PLFCM7JfRjpCCrDaTmvB7EeZ5/dQJPhTYBf36BE/B4CRWR2ZiBLRYhK7hhXBCZAg=="], + + "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.1.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-3WRYte7orvyi6TRfIZkDN9Jzoogbv+gSvR+b9VOXUg1We1XrjBg6WljADeVEaKTvOcpVdH0a90TwyOQ6ue4fGw=="], + + "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.1.4", "", { "os": "win32", "cpu": "x64" }, "sha512-tBc+W7anBPSFXGAoQW+f/+svkpt8/uXfRwDzN1DvnatkRMt16KIYpEi/iw8u9GahJlFv98kgHcIrSsZHZTR0sw=="], + + "@chevrotain/cst-dts-gen": ["@chevrotain/cst-dts-gen@11.0.3", "", { "dependencies": { "@chevrotain/gast": "11.0.3", "@chevrotain/types": "11.0.3", "lodash-es": "4.17.21" } }, "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ=="], + + "@chevrotain/gast": ["@chevrotain/gast@11.0.3", "", { "dependencies": { "@chevrotain/types": "11.0.3", "lodash-es": "4.17.21" } }, "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q=="], + + "@chevrotain/regexp-to-ast": ["@chevrotain/regexp-to-ast@11.0.3", "", {}, "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA=="], + + "@chevrotain/types": ["@chevrotain/types@11.0.3", "", {}, "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ=="], + + "@chevrotain/utils": ["@chevrotain/utils@11.0.3", "", {}, "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ=="], + + "@deadlyjack/ajax": ["@deadlyjack/ajax@1.2.6", "", {}, ""], + + "@discoveryjs/json-ext": ["@discoveryjs/json-ext@0.6.3", "", {}, "sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ=="], + + "@isaacs/balanced-match": ["@isaacs/balanced-match@4.0.1", "", {}, "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ=="], + + "@isaacs/brace-expansion": ["@isaacs/brace-expansion@5.0.0", "", { "dependencies": { "@isaacs/balanced-match": "^4.0.1" } }, "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA=="], + + "@isaacs/fs-minipass": ["@isaacs/fs-minipass@4.0.1", "", { "dependencies": { "minipass": "^7.0.4" } }, "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w=="], + + "@isaacs/string-locale-compare": ["@isaacs/string-locale-compare@1.1.0", "", {}, "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ=="], + + "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.1.1", "", { "dependencies": { "@jridgewell/set-array": "^1.0.0", "@jridgewell/sourcemap-codec": "^1.4.10" } }, ""], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.0", "", {}, ""], + + "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="], + + "@jridgewell/source-map": ["@jridgewell/source-map@0.3.10", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" } }, "sha512-0pPkgz9dY+bijgistcTTJ5mR+ocqRXLuhXHYdzoMmmoJ2C9S46RCm2GMUbatPEUK9Yjy26IrAy8D/M00lLkv+Q=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.4", "", {}, "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.29", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ=="], + + "@netflix/nerror": ["@netflix/nerror@1.1.3", "", { "dependencies": { "assert-plus": "^1.0.0", "extsprintf": "^1.4.0", "lodash": "^4.17.15" } }, ""], + + "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, ""], + + "@nodelib/fs.stat": ["@nodelib/fs.stat@2.0.5", "", {}, ""], + + "@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, ""], + + "@npmcli/agent": ["@npmcli/agent@4.0.0", "", { "dependencies": { "agent-base": "^7.1.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.1", "lru-cache": "^11.2.1", "socks-proxy-agent": "^8.0.3" } }, "sha512-kAQTcEN9E8ERLVg5AsGwLNoFb+oEG6engbqAU2P43gD4JEIkNGMHdVQ096FsOAAYpZPB0RSt0zgInKIAS1l5QA=="], + + "@npmcli/arborist": ["@npmcli/arborist@9.1.8", "", { "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/fs": "^5.0.0", "@npmcli/installed-package-contents": "^4.0.0", "@npmcli/map-workspaces": "^5.0.0", "@npmcli/metavuln-calculator": "^9.0.2", "@npmcli/name-from-folder": "^4.0.0", "@npmcli/node-gyp": "^5.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/query": "^5.0.0", "@npmcli/redact": "^4.0.0", "@npmcli/run-script": "^10.0.0", "bin-links": "^6.0.0", "cacache": "^20.0.1", "common-ancestor-path": "^1.0.1", "hosted-git-info": "^9.0.0", "json-stringify-nice": "^1.1.4", "lru-cache": "^11.2.1", "minimatch": "^10.0.3", "nopt": "^9.0.0", "npm-install-checks": "^8.0.0", "npm-package-arg": "^13.0.0", "npm-pick-manifest": "^11.0.1", "npm-registry-fetch": "^19.0.0", "pacote": "^21.0.2", "parse-conflict-json": "^5.0.1", "proc-log": "^6.0.0", "proggy": "^4.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^3.0.1", "semver": "^7.3.7", "ssri": "^13.0.0", "treeverse": "^3.0.0", "walk-up-path": "^4.0.0" }, "bin": { "arborist": "bin/index.js" } }, "sha512-TYAzq0oaXQU+uLfXFbR2wYx62qHIOSg/TYhGWJSphJDypyjdNXC7B/+k29ElC2vWlWfX4OJnhmSY5DTwSFiNpg=="], + + "@npmcli/fs": ["@npmcli/fs@5.0.0", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-7OsC1gNORBEawOa5+j2pXN9vsicaIOH5cPXxoR6fJOmH6/EXpJB2CajXOu1fPRFun2m1lktEFX11+P89hqO/og=="], + + "@npmcli/git": ["@npmcli/git@7.0.1", "", { "dependencies": { "@npmcli/promise-spawn": "^9.0.0", "ini": "^6.0.0", "lru-cache": "^11.2.1", "npm-pick-manifest": "^11.0.1", "proc-log": "^6.0.0", "promise-retry": "^2.0.1", "semver": "^7.3.5", "which": "^6.0.0" } }, "sha512-+XTFxK2jJF/EJJ5SoAzXk3qwIDfvFc5/g+bD274LZ7uY7LE8sTfG6Z8rOanPl2ZEvZWqNvmEdtXC25cE54VcoA=="], + + "@npmcli/installed-package-contents": ["@npmcli/installed-package-contents@4.0.0", "", { "dependencies": { "npm-bundled": "^5.0.0", "npm-normalize-package-bin": "^5.0.0" }, "bin": { "installed-package-contents": "bin/index.js" } }, "sha512-yNyAdkBxB72gtZ4GrwXCM0ZUedo9nIbOMKfGjt6Cu6DXf0p8y1PViZAKDC8q8kv/fufx0WTjRBdSlyrvnP7hmA=="], + + "@npmcli/map-workspaces": ["@npmcli/map-workspaces@5.0.3", "", { "dependencies": { "@npmcli/name-from-folder": "^4.0.0", "@npmcli/package-json": "^7.0.0", "glob": "^13.0.0", "minimatch": "^10.0.3" } }, "sha512-o2grssXo1e774E5OtEwwrgoszYRh0lqkJH+Pb9r78UcqdGJRDRfhpM8DvZPjzNLLNYeD/rNbjOKM3Ss5UABROw=="], + + "@npmcli/metavuln-calculator": ["@npmcli/metavuln-calculator@9.0.3", "", { "dependencies": { "cacache": "^20.0.0", "json-parse-even-better-errors": "^5.0.0", "pacote": "^21.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5" } }, "sha512-94GLSYhLXF2t2LAC7pDwLaM4uCARzxShyAQKsirmlNcpidH89VA4/+K1LbJmRMgz5gy65E/QBBWQdUvGLe2Frg=="], + + "@npmcli/name-from-folder": ["@npmcli/name-from-folder@4.0.0", "", {}, "sha512-qfrhVlOSqmKM8i6rkNdZzABj8MKEITGFAY+4teqBziksCQAOLutiAxM1wY2BKEd8KjUSpWmWCYxvXr0y4VTlPg=="], + + "@npmcli/node-gyp": ["@npmcli/node-gyp@5.0.0", "", {}, "sha512-uuG5HZFXLfyFKqg8QypsmgLQW7smiRjVc45bqD/ofZZcR/uxEjgQU8qDPv0s9TEeMUiAAU/GC5bR6++UdTirIQ=="], + + "@npmcli/package-json": ["@npmcli/package-json@7.0.4", "", { "dependencies": { "@npmcli/git": "^7.0.0", "glob": "^13.0.0", "hosted-git-info": "^9.0.0", "json-parse-even-better-errors": "^5.0.0", "proc-log": "^6.0.0", "semver": "^7.5.3", "validate-npm-package-license": "^3.0.4" } }, "sha512-0wInJG3j/K40OJt/33ax47WfWMzZTm6OQxB9cDhTt5huCP2a9g2GnlsxmfN+PulItNPIpPrZ+kfwwUil7eHcZQ=="], + + "@npmcli/promise-spawn": ["@npmcli/promise-spawn@9.0.1", "", { "dependencies": { "which": "^6.0.0" } }, "sha512-OLUaoqBuyxeTqUvjA3FZFiXUfYC1alp3Sa99gW3EUDz3tZ3CbXDdcZ7qWKBzicrJleIgucoWamWH1saAmH/l2Q=="], + + "@npmcli/query": ["@npmcli/query@5.0.0", "", { "dependencies": { "postcss-selector-parser": "^7.0.0" } }, "sha512-8TZWfTQOsODpLqo9SVhVjHovmKXNpevHU0gO9e+y4V4fRIOneiXy0u0sMP9LmS71XivrEWfZWg50ReH4WRT4aQ=="], + + "@npmcli/redact": ["@npmcli/redact@4.0.0", "", {}, "sha512-gOBg5YHMfZy+TfHArfVogwgfBeQnKbbGo3pSUyK/gSI0AVu+pEiDVcKlQb0D8Mg1LNRZILZ6XG8I5dJ4KuAd9Q=="], + + "@npmcli/run-script": ["@npmcli/run-script@10.0.3", "", { "dependencies": { "@npmcli/node-gyp": "^5.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/promise-spawn": "^9.0.0", "node-gyp": "^12.1.0", "proc-log": "^6.0.0", "which": "^6.0.0" } }, "sha512-ER2N6itRkzWbbtVmZ9WKaWxVlKlOeBFF1/7xx+KA5J1xKa4JjUwBdb6tDpk0v1qA+d+VDwHI9qmLcXSWcmi+Rw=="], + + "@parcel/watcher": ["@parcel/watcher@2.5.1", "", { "dependencies": { "detect-libc": "^1.0.3", "is-glob": "^4.0.3", "micromatch": "^4.0.5", "node-addon-api": "^7.0.0" }, "optionalDependencies": { "@parcel/watcher-android-arm64": "2.5.1", "@parcel/watcher-darwin-arm64": "2.5.1", "@parcel/watcher-darwin-x64": "2.5.1", "@parcel/watcher-freebsd-x64": "2.5.1", "@parcel/watcher-linux-arm-glibc": "2.5.1", "@parcel/watcher-linux-arm-musl": "2.5.1", "@parcel/watcher-linux-arm64-glibc": "2.5.1", "@parcel/watcher-linux-arm64-musl": "2.5.1", "@parcel/watcher-linux-x64-glibc": "2.5.1", "@parcel/watcher-linux-x64-musl": "2.5.1", "@parcel/watcher-win32-arm64": "2.5.1", "@parcel/watcher-win32-ia32": "2.5.1", "@parcel/watcher-win32-x64": "2.5.1" } }, "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg=="], + + "@parcel/watcher-android-arm64": ["@parcel/watcher-android-arm64@2.5.1", "", { "os": "android", "cpu": "arm64" }, "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA=="], + + "@parcel/watcher-darwin-arm64": ["@parcel/watcher-darwin-arm64@2.5.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw=="], + + "@parcel/watcher-darwin-x64": ["@parcel/watcher-darwin-x64@2.5.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg=="], + + "@parcel/watcher-freebsd-x64": ["@parcel/watcher-freebsd-x64@2.5.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ=="], + + "@parcel/watcher-linux-arm-glibc": ["@parcel/watcher-linux-arm-glibc@2.5.1", "", { "os": "linux", "cpu": "arm" }, "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA=="], + + "@parcel/watcher-linux-arm-musl": ["@parcel/watcher-linux-arm-musl@2.5.1", "", { "os": "linux", "cpu": "arm" }, "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q=="], + + "@parcel/watcher-linux-arm64-glibc": ["@parcel/watcher-linux-arm64-glibc@2.5.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w=="], + + "@parcel/watcher-linux-arm64-musl": ["@parcel/watcher-linux-arm64-musl@2.5.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg=="], + + "@parcel/watcher-linux-x64-glibc": ["@parcel/watcher-linux-x64-glibc@2.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A=="], + + "@parcel/watcher-linux-x64-musl": ["@parcel/watcher-linux-x64-musl@2.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg=="], + + "@parcel/watcher-win32-arm64": ["@parcel/watcher-win32-arm64@2.5.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw=="], + + "@parcel/watcher-win32-ia32": ["@parcel/watcher-win32-ia32@2.5.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ=="], + + "@parcel/watcher-win32-x64": ["@parcel/watcher-win32-x64@2.5.1", "", { "os": "win32", "cpu": "x64" }, "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA=="], + + "@sigstore/bundle": ["@sigstore/bundle@4.0.0", "", { "dependencies": { "@sigstore/protobuf-specs": "^0.5.0" } }, "sha512-NwCl5Y0V6Di0NexvkTqdoVfmjTaQwoLM236r89KEojGmq/jMls8S+zb7yOwAPdXvbwfKDlP+lmXgAL4vKSQT+A=="], + + "@sigstore/core": ["@sigstore/core@3.0.0", "", {}, "sha512-NgbJ+aW9gQl/25+GIEGYcCyi8M+ng2/5X04BMuIgoDfgvp18vDcoNHOQjQsG9418HGNYRxG3vfEXaR1ayD37gg=="], + + "@sigstore/protobuf-specs": ["@sigstore/protobuf-specs@0.5.0", "", {}, "sha512-MM8XIwUjN2bwvCg1QvrMtbBmpcSHrkhFSCu1D11NyPvDQ25HEc4oG5/OcQfd/Tlf/OxmKWERDj0zGE23jQaMwA=="], + + "@sigstore/sign": ["@sigstore/sign@4.0.1", "", { "dependencies": { "@sigstore/bundle": "^4.0.0", "@sigstore/core": "^3.0.0", "@sigstore/protobuf-specs": "^0.5.0", "make-fetch-happen": "^15.0.2", "proc-log": "^5.0.0", "promise-retry": "^2.0.1" } }, "sha512-KFNGy01gx9Y3IBPG/CergxR9RZpN43N+lt3EozEfeoyqm8vEiLxwRl3ZO5sPx3Obv1ix/p7FWOlPc2Jgwfp9PA=="], + + "@sigstore/tuf": ["@sigstore/tuf@4.0.0", "", { "dependencies": { "@sigstore/protobuf-specs": "^0.5.0", "tuf-js": "^4.0.0" } }, "sha512-0QFuWDHOQmz7t66gfpfNO6aEjoFrdhkJaej/AOqb4kqWZVbPWFZifXZzkxyQBB1OwTbkhdT3LNpMFxwkTvf+2w=="], + + "@sigstore/verify": ["@sigstore/verify@3.0.0", "", { "dependencies": { "@sigstore/bundle": "^4.0.0", "@sigstore/core": "^3.0.0", "@sigstore/protobuf-specs": "^0.5.0" } }, "sha512-moXtHH33AobOhTZF8xcX1MpOFqdvfCk7v6+teJL8zymBiDXwEsQH6XG9HGx2VIxnJZNm4cNSzflTLDnQLmIdmw=="], + + "@sphinxxxx/color-conversion": ["@sphinxxxx/color-conversion@2.2.2", "", {}, ""], + + "@tufjs/canonical-json": ["@tufjs/canonical-json@2.0.0", "", {}, "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA=="], + + "@tufjs/models": ["@tufjs/models@4.0.0", "", { "dependencies": { "@tufjs/canonical-json": "2.0.0", "minimatch": "^9.0.5" } }, "sha512-h5x5ga/hh82COe+GoD4+gKUeV4T3iaYOxqLt41GRKApinPI7DMidhCmNVTjKfhCWFJIGXaFJee07XczdT4jdZQ=="], + + "@types/ace": ["@types/ace@0.0.52", "", {}, "sha512-YPF9S7fzpuyrxru+sG/rrTpZkC6gpHBPF14W3x70kqVOD+ks6jkYLapk4yceh36xej7K4HYxcyz9ZDQ2lTvwgQ=="], + + "@types/eslint": ["@types/eslint@9.6.1", "", { "dependencies": { "@types/estree": "*", "@types/json-schema": "*" } }, "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag=="], + + "@types/eslint-scope": ["@types/eslint-scope@3.7.7", "", { "dependencies": { "@types/eslint": "*", "@types/estree": "*" } }, "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg=="], + + "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], + + "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="], + + "@types/linkify-it": ["@types/linkify-it@5.0.0", "", {}, "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q=="], + + "@types/markdown-it": ["@types/markdown-it@14.1.2", "", { "dependencies": { "@types/linkify-it": "^5", "@types/mdurl": "^2" } }, "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog=="], + + "@types/mdurl": ["@types/mdurl@2.0.0", "", {}, "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg=="], + + "@types/node": ["@types/node@24.2.1", "", { "dependencies": { "undici-types": "~7.10.0" } }, "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ=="], + + "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], + + "@types/url-parse": ["@types/url-parse@1.4.11", "", {}, "sha512-FKvKIqRaykZtd4n47LbK/W/5fhQQ1X7cxxzG9A48h0BGN+S04NH7ervcCjM8tyR0lyGru83FAHSmw2ObgKoESg=="], + + "@ungap/custom-elements": ["@ungap/custom-elements@1.3.0", "", {}, ""], + + "@webassemblyjs/ast": ["@webassemblyjs/ast@1.14.1", "", { "dependencies": { "@webassemblyjs/helper-numbers": "1.13.2", "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ=="], + + "@webassemblyjs/floating-point-hex-parser": ["@webassemblyjs/floating-point-hex-parser@1.13.2", "", {}, "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA=="], + + "@webassemblyjs/helper-api-error": ["@webassemblyjs/helper-api-error@1.13.2", "", {}, "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ=="], + + "@webassemblyjs/helper-buffer": ["@webassemblyjs/helper-buffer@1.14.1", "", {}, "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA=="], + + "@webassemblyjs/helper-numbers": ["@webassemblyjs/helper-numbers@1.13.2", "", { "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.13.2", "@webassemblyjs/helper-api-error": "1.13.2", "@xtuc/long": "4.2.2" } }, "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA=="], + + "@webassemblyjs/helper-wasm-bytecode": ["@webassemblyjs/helper-wasm-bytecode@1.13.2", "", {}, "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA=="], + + "@webassemblyjs/helper-wasm-section": ["@webassemblyjs/helper-wasm-section@1.14.1", "", { "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-buffer": "1.14.1", "@webassemblyjs/helper-wasm-bytecode": "1.13.2", "@webassemblyjs/wasm-gen": "1.14.1" } }, "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw=="], + + "@webassemblyjs/ieee754": ["@webassemblyjs/ieee754@1.13.2", "", { "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw=="], + + "@webassemblyjs/leb128": ["@webassemblyjs/leb128@1.13.2", "", { "dependencies": { "@xtuc/long": "4.2.2" } }, "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw=="], + + "@webassemblyjs/utf8": ["@webassemblyjs/utf8@1.13.2", "", {}, "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ=="], + + "@webassemblyjs/wasm-edit": ["@webassemblyjs/wasm-edit@1.14.1", "", { "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-buffer": "1.14.1", "@webassemblyjs/helper-wasm-bytecode": "1.13.2", "@webassemblyjs/helper-wasm-section": "1.14.1", "@webassemblyjs/wasm-gen": "1.14.1", "@webassemblyjs/wasm-opt": "1.14.1", "@webassemblyjs/wasm-parser": "1.14.1", "@webassemblyjs/wast-printer": "1.14.1" } }, "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ=="], + + "@webassemblyjs/wasm-gen": ["@webassemblyjs/wasm-gen@1.14.1", "", { "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-wasm-bytecode": "1.13.2", "@webassemblyjs/ieee754": "1.13.2", "@webassemblyjs/leb128": "1.13.2", "@webassemblyjs/utf8": "1.13.2" } }, "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg=="], + + "@webassemblyjs/wasm-opt": ["@webassemblyjs/wasm-opt@1.14.1", "", { "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-buffer": "1.14.1", "@webassemblyjs/wasm-gen": "1.14.1", "@webassemblyjs/wasm-parser": "1.14.1" } }, "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw=="], + + "@webassemblyjs/wasm-parser": ["@webassemblyjs/wasm-parser@1.14.1", "", { "dependencies": { "@webassemblyjs/ast": "1.14.1", "@webassemblyjs/helper-api-error": "1.13.2", "@webassemblyjs/helper-wasm-bytecode": "1.13.2", "@webassemblyjs/ieee754": "1.13.2", "@webassemblyjs/leb128": "1.13.2", "@webassemblyjs/utf8": "1.13.2" } }, "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ=="], + + "@webassemblyjs/wast-printer": ["@webassemblyjs/wast-printer@1.14.1", "", { "dependencies": { "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" } }, "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw=="], + + "@webpack-cli/configtest": ["@webpack-cli/configtest@3.0.1", "", { "peerDependencies": { "webpack": "^5.82.0", "webpack-cli": "6.x.x" } }, "sha512-u8d0pJ5YFgneF/GuvEiDA61Tf1VDomHHYMjv/wc9XzYj7nopltpG96nXN5dJRstxZhcNpV1g+nT6CydO7pHbjA=="], + + "@webpack-cli/info": ["@webpack-cli/info@3.0.1", "", { "peerDependencies": { "webpack": "^5.82.0", "webpack-cli": "6.x.x" } }, "sha512-coEmDzc2u/ffMvuW9aCjoRzNSPDl/XLuhPdlFRpT9tZHmJ/039az33CE7uH+8s0uL1j5ZNtfdv0HkfaKRBGJsQ=="], + + "@webpack-cli/serve": ["@webpack-cli/serve@3.0.1", "", { "peerDependencies": { "webpack": "^5.82.0", "webpack-cli": "6.x.x" } }, "sha512-sbgw03xQaCLiT6gcY/6u3qBDn01CWw/nbaXl3gTdTFuJJ75Gffv3E3DBpgvY2fkkrdS1fpjaXNOmJlnbtKauKg=="], + + "@xmldom/xmldom": ["@xmldom/xmldom@0.8.10", "", {}, "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw=="], + + "@xterm/addon-attach": ["@xterm/addon-attach@0.11.0", "", { "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "sha512-JboCN0QAY6ZLY/SSB/Zl2cQ5zW1Eh4X3fH7BnuR1NB7xGRhzbqU2Npmpiw/3zFlxDaU88vtKzok44JKi2L2V2Q=="], + + "@xterm/addon-fit": ["@xterm/addon-fit@0.10.0", "", { "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ=="], + + "@xterm/addon-image": ["@xterm/addon-image@0.8.0", "", { "peerDependencies": { "@xterm/xterm": "^5.2.0" } }, "sha512-b/dqpFn3jUad2pUP5UpF4scPIh0WdxRQL/1qyiahGfUI85XZTCXo0py9G6AcOR2QYUw8eJ8EowGspT7BQcgw6A=="], + + "@xterm/addon-search": ["@xterm/addon-search@0.15.0", "", { "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "sha512-ZBZKLQ+EuKE83CqCmSSz5y1tx+aNOCUaA7dm6emgOX+8J9H1FWXZyrKfzjwzV+V14TV3xToz1goIeRhXBS5qjg=="], + + "@xterm/addon-unicode11": ["@xterm/addon-unicode11@0.8.0", "", { "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "sha512-LxinXu8SC4OmVa6FhgwsVCBZbr8WoSGzBl2+vqe8WcQ6hb1r6Gj9P99qTNdPiFPh4Ceiu2pC8xukZ6+2nnh49Q=="], + + "@xterm/addon-web-links": ["@xterm/addon-web-links@0.11.0", "", { "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "sha512-nIHQ38pQI+a5kXnRaTgwqSHnX7KE6+4SVoceompgHL26unAxdfP6IPqUTSYPQgSwM56hsElfoNrrW5V7BUED/Q=="], + + "@xterm/addon-webgl": ["@xterm/addon-webgl@0.18.0", "", { "peerDependencies": { "@xterm/xterm": "^5.0.0" } }, "sha512-xCnfMBTI+/HKPdRnSOHaJDRqEpq2Ugy8LEj9GiY4J3zJObo3joylIFaMvzBwbYRg8zLtkO0KQaStCeSfoaI2/w=="], + + "@xterm/xterm": ["@xterm/xterm@5.5.0", "", {}, "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A=="], + + "@xtuc/ieee754": ["@xtuc/ieee754@1.2.0", "", {}, "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA=="], + + "@xtuc/long": ["@xtuc/long@4.2.2", "", {}, "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="], + + "abbrev": ["abbrev@3.0.1", "", {}, "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg=="], + + "acorn": ["acorn@8.15.0", "", { "bin": "bin/acorn" }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], + + "acorn-import-phases": ["acorn-import-phases@1.0.4", "", { "peerDependencies": { "acorn": "^8.14.0" } }, "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ=="], + + "agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], + + "ajv": ["ajv@8.12.0", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, ""], + + "ajv-formats": ["ajv-formats@2.1.1", "", { "dependencies": { "ajv": "^8.0.0" }, "peerDependencies": { "ajv": "^8.0.0" } }, ""], + + "ajv-keywords": ["ajv-keywords@5.1.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3" }, "peerDependencies": { "ajv": "^8.8.2" } }, ""], + + "android-versions": ["android-versions@2.1.0", "", { "dependencies": { "semver": "^7.5.2" } }, "sha512-oCBvVs2uaL8ohQtesGs78/X7QvFDLbKgTosBRiOIBCss1a/yiakQm/ADuoG2k/AUaI0FfrsFeMl/a+GtEtjEeA=="], + + "ansi": ["ansi@0.3.1", "", {}, ""], + + "ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], + + "ansi-styles": ["ansi-styles@6.2.1", "", {}, "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="], + + "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + + "array-union": ["array-union@2.1.0", "", {}, "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="], + + "assert-plus": ["assert-plus@1.0.0", "", {}, ""], + + "autoprefixer": ["autoprefixer@10.4.21", "", { "dependencies": { "browserslist": "^4.24.4", "caniuse-lite": "^1.0.30001702", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.1.1", "postcss-value-parser": "^4.2.0" }, "peerDependencies": { "postcss": "^8.1.0" }, "bin": "bin/autoprefixer" }, "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ=="], + + "autosize": ["autosize@6.0.1", "", {}, ""], + + "babel-loader": ["babel-loader@10.0.0", "", { "dependencies": { "find-up": "^5.0.0" }, "peerDependencies": { "@babel/core": "^7.12.0", "webpack": ">=5.61.0" } }, "sha512-z8jt+EdS61AMw22nSfoNJAZ0vrtmhPRVi6ghL3rCeRZI8cdNYFiV5xeV3HbE7rlZZNmGH8BVccwWt8/ED0QOHA=="], + + "babel-plugin-polyfill-corejs2": ["babel-plugin-polyfill-corejs2@0.4.14", "", { "dependencies": { "@babel/compat-data": "^7.27.7", "@babel/helper-define-polyfill-provider": "^0.6.5", "semver": "^6.3.1" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "sha512-Co2Y9wX854ts6U8gAAPXfn0GmAyctHuK8n0Yhfjd6t30g7yvKjspvvOo9yG+z52PZRgFErt7Ka2pYnXCjLKEpg=="], + + "babel-plugin-polyfill-corejs3": ["babel-plugin-polyfill-corejs3@0.13.0", "", { "dependencies": { "@babel/helper-define-polyfill-provider": "^0.6.5", "core-js-compat": "^3.43.0" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "sha512-U+GNwMdSFgzVmfhNm8GJUX88AadB3uo9KpJqS3FaqNIPKgySuvMb+bHPsOmmuWyIcuqZj/pzt1RUIUZns4y2+A=="], + + "babel-plugin-polyfill-regenerator": ["babel-plugin-polyfill-regenerator@0.6.5", "", { "dependencies": { "@babel/helper-define-polyfill-provider": "^0.6.5" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "sha512-ISqQ2frbiNU9vIJkzg7dlPpznPZ4jOiUQ1uSmB0fEHeowtN3COYRsXr/xexn64NpU13P06jc/L5TgiJXOgrbEg=="], + + "balanced-match": ["balanced-match@1.0.2", "", {}, ""], + + "base64-js": ["base64-js@1.5.1", "", {}, ""], + + "big-integer": ["big-integer@1.6.51", "", {}, ""], + + "big.js": ["big.js@5.2.2", "", {}, ""], + + "bin-links": ["bin-links@6.0.0", "", { "dependencies": { "cmd-shim": "^8.0.0", "npm-normalize-package-bin": "^5.0.0", "proc-log": "^6.0.0", "read-cmd-shim": "^6.0.0", "write-file-atomic": "^7.0.0" } }, "sha512-X4CiKlcV2GjnCMwnKAfbVWpHa++65th9TuzAEYtZoATiOE2DQKhSp4CJlyLoTqdhBKlXjpXjCTYPNNFS33Fi6w=="], + + "bplist-parser": ["bplist-parser@0.3.2", "", { "dependencies": { "big-integer": "1.6.x" } }, ""], + + "brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + + "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], + + "browserslist": ["browserslist@4.25.2", "", { "dependencies": { "caniuse-lite": "^1.0.30001733", "electron-to-chromium": "^1.5.199", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, "bin": "cli.js" }, "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA=="], + + "buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="], + + "cacache": ["cacache@20.0.3", "", { "dependencies": { "@npmcli/fs": "^5.0.0", "fs-minipass": "^3.0.0", "glob": "^13.0.0", "lru-cache": "^11.1.0", "minipass": "^7.0.3", "minipass-collect": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "p-map": "^7.0.2", "ssri": "^13.0.0", "unique-filename": "^5.0.0" } }, "sha512-3pUp4e8hv07k1QlijZu6Kn7c9+ZpWWk4j3F8N3xPuCExULobqJydKYOTj1FTq58srkJsXvO7LbGAH4C0ZU3WGw=="], + + "callsites": ["callsites@3.1.0", "", {}, ""], + + "caniuse-lite": ["caniuse-lite@1.0.30001733", "", {}, "sha512-e4QKw/O2Kavj2VQTKZWrwzkt3IxOmIlU6ajRb6LP64LHpBo1J67k2Hi4Vu/TgJWsNtynurfS0uK3MaUTCPfu5Q=="], + + "chevrotain": ["chevrotain@11.0.3", "", { "dependencies": { "@chevrotain/cst-dts-gen": "11.0.3", "@chevrotain/gast": "11.0.3", "@chevrotain/regexp-to-ast": "11.0.3", "@chevrotain/types": "11.0.3", "@chevrotain/utils": "11.0.3", "lodash-es": "4.17.21" } }, "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw=="], + + "chevrotain-allstar": ["chevrotain-allstar@0.3.1", "", { "dependencies": { "lodash-es": "^4.17.21" }, "peerDependencies": { "chevrotain": "^11.0.0" } }, "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw=="], + + "chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="], + + "chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="], + + "chrome-trace-event": ["chrome-trace-event@1.0.3", "", {}, ""], + + "cli": ["cli@1.0.1", "", { "dependencies": { "exit": "0.1.2", "glob": "^7.1.1" } }, "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg=="], + + "cliui": ["cliui@9.0.1", "", { "dependencies": { "string-width": "^7.2.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w=="], + + "clone-deep": ["clone-deep@4.0.1", "", { "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", "shallow-clone": "^3.0.0" } }, "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ=="], + + "cmd-shim": ["cmd-shim@8.0.0", "", {}, "sha512-Jk/BK6NCapZ58BKUxlSI+ouKRbjH1NLZCgJkYoab+vEHUY3f6OzpNBN9u7HFSv9J6TRDGs4PLOHezoKGaFRSCA=="], + + "colorette": ["colorette@2.0.19", "", {}, ""], + + "com.foxdebug.acode.rk.exec.proot": ["com.foxdebug.acode.rk.exec.proot@file:src/plugins/proot", {}], + + "com.foxdebug.acode.rk.exec.terminal": ["com.foxdebug.acode.rk.exec.terminal@file:src/plugins/terminal", {}], + + "commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="], + + "common-ancestor-path": ["common-ancestor-path@1.0.1", "", {}, "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w=="], + + "concat-map": ["concat-map@0.0.1", "", {}, ""], + + "configstore": ["configstore@5.0.1", "", { "dependencies": { "dot-prop": "^5.2.0", "graceful-fs": "^4.1.2", "make-dir": "^3.0.0", "unique-string": "^2.0.0", "write-file-atomic": "^3.0.0", "xdg-basedir": "^4.0.0" } }, ""], + + "console-browserify": ["console-browserify@1.1.0", "", { "dependencies": { "date-now": "^0.1.4" } }, "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg=="], + + "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], + + "cordova": ["cordova@13.0.0", "", { "dependencies": { "configstore": "^5.0.1", "cordova-common": "^6.0.0", "cordova-create": "^6.0.0", "cordova-lib": "^13.0.0", "editor": "^1.0.0", "execa": "^5.1.1", "nopt": "^9.0.0", "semver": "^7.7.3", "systeminformation": "^5.27.11" }, "bin": "bin/cordova" }, "sha512-QAIMwmYLL0jHo4vauWSnRd2fr9l+wajG+F5aUkrC6e4ZQGSTv0wAiRmpqQUkIc1ZdELisKDQws/BjHz5nP/sLw=="], + + "cordova-android": ["cordova-android@14.0.1", "", { "dependencies": { "android-versions": "^2.1.0", "cordova-common": "^5.0.1", "dedent": "^1.5.3", "execa": "^5.1.1", "fast-glob": "^3.3.3", "is-path-inside": "^3.0.3", "nopt": "^8.1.0", "properties-parser": "^0.6.0", "semver": "^7.7.1", "string-argv": "^0.3.1", "untildify": "^4.0.0", "which": "^5.0.0" } }, "sha512-HMBMdGu/JlSQtmBuDEpKWf/pE75SpF3FksxZ+mqYuL3qSIN8lN/QsNurwYaPAP7zWXN2DNpvwlpOJItS5VhdLg=="], + + "cordova-app-hello-world": ["cordova-app-hello-world@7.0.0", "", {}, "sha512-uDTncFkI73ko+wEf6IEO9bw8lQRMQGnfdi5pPMei4P8+plChNcRW5fxjKlhM/8ZrT8OAWiHsQRrP4pIAn3HQ4g=="], + + "cordova-clipboard": ["cordova-clipboard@1.3.0", "", {}, ""], + + "cordova-common": ["cordova-common@5.0.1", "", { "dependencies": { "@netflix/nerror": "^1.1.3", "ansi": "^0.3.1", "bplist-parser": "^0.3.2", "cross-spawn": "^7.0.6", "elementtree": "^0.1.7", "endent": "^2.1.0", "fast-glob": "^3.3.3", "lodash.zip": "^4.2.0", "plist": "^3.1.0", "q": "^1.5.1", "read-chunk": "^3.2.0", "strip-bom": "^4.0.0" } }, "sha512-OA2NQ6wvhNz4GytPYwTdlA9xfG7Yf7ufkj4u97m3rUfoL/AECwwj0GVT2CYpk/0Fk6HyuHA3QYCxfDPYsKzI1A=="], + + "cordova-create": ["cordova-create@6.0.0", "", { "dependencies": { "cordova-app-hello-world": "^7.0.0", "cordova-common": "^6.0.0", "cordova-fetch": "^5.0.0", "globby": "^11.1.0", "import-fresh": "^3.3.1", "isobject": "^4.0.0", "npm-package-arg": "^13.0.0", "path-is-inside": "^1.0.2", "tmp": "^0.2.5", "valid-identifier": "0.0.2" } }, "sha512-LD41sLn2GsmAlj3576R3xlUM3BP0rt0CYd5LdbzU82WBI3ApMrrhM6xcHDYJfe1nfSL89O/nb/u/h7+7DhPQeA=="], + + "cordova-fetch": ["cordova-fetch@5.0.0", "", { "dependencies": { "@npmcli/arborist": "^9.1.3", "cordova-common": "^6.0.0", "execa": "^5.1.1", "npm-package-arg": "^13.0.0", "pacote": "^21.0.0", "resolve": "^1.22.10", "semver": "^7.7.2", "which": "^5.0.0" } }, "sha512-fsYnVfx32AOrFO6tw4EkzSig7WjNhze35dKIzdw20zTQetDKEfWA79PpCaoiSeahGi6O2MdnOFabLhEa8se6jg=="], + + "cordova-lib": ["cordova-lib@13.0.0", "", { "dependencies": { "cordova-common": "^6.0.0", "cordova-fetch": "^5.0.0", "detect-indent": "^6.1.0", "detect-newline": "^3.1.0", "execa": "^5.1.1", "globby": "^11.1.0", "semver": "^7.7.2", "stringify-package": "^1.0.1", "write-file-atomic": "^7.0.0" } }, "sha512-y8WQ+J6JtiU9C72ujvI3p+ScFJkg0VJwNfaUCqk9nPAssw2C6HltHk+ik/WrLUn6uDmwAM6gmfGUIMU2iVrNxA=="], + + "cordova-plugin-advanced-http": ["cordova-plugin-advanced-http@3.3.1", "", {}, "sha512-hESuB3mxIHCUrzb5lm7juda6PSNcC5N8Invizj5wGV2rSldCapiNxMTEpzKR1UVPDDP2XOtBzO0SAYS+3+g/ig=="], + + "cordova-plugin-browser": ["cordova-plugin-browser@file:src/plugins/browser", {}], + + "cordova-plugin-buildinfo": ["/cordova-plugin-buildinfo@file:src/plugins/cordova-plugin-buildinfo", { "devDependencies": { "jshint": "^2.6.0" } }], + + "cordova-plugin-device": ["cordova-plugin-device@2.1.0", "", {}, ""], + + "cordova-plugin-file": ["cordova-plugin-file@8.0.1", "", {}, "sha512-LgFLNQN58xguoJkNc8eGBmg/Vuaah9lY3Nye27OAfWCKalXPRjExIg5r8L3qlfiJxzmzupjrF0M4KdU2Lovm3Q=="], + + "cordova-plugin-ftp": ["cordova-plugin-ftp@file:src/plugins/ftp", {}], + + "cordova-plugin-iap": ["cordova-plugin-iap@file:src/plugins/iap", {}], + + "cordova-plugin-sdcard": ["cordova-plugin-sdcard@file:src/plugins/sdcard", {}], + + "cordova-plugin-server": ["cordova-plugin-server@file:src/plugins/server", {}], + + "cordova-plugin-sftp": ["cordova-plugin-sftp@file:src/plugins/sftp", {}], + + "cordova-plugin-system": ["cordova-plugin-system@file:src/plugins/system", {}], + + "cordova-plugin-websocket": ["cordova-plugin-websocket@file:src/plugins/websocket", {}], + + "core-js": ["core-js@3.45.0", "", {}, "sha512-c2KZL9lP4DjkN3hk/an4pWn5b5ZefhRJnAc42n6LJ19kSnbeRbdQZE5dSeE2LBol1OwJD3X1BQvFTAsa8ReeDA=="], + + "core-js-compat": ["core-js-compat@3.45.0", "", { "dependencies": { "browserslist": "^4.25.1" } }, "sha512-gRoVMBawZg0OnxaVv3zpqLLxaHmsubEGyTnqdpI/CEBvX4JadI1dMSHxagThprYRtSVbuQxvi6iUatdPxohHpA=="], + + "core-js-pure": ["core-js-pure@3.45.0", "", {}, "sha512-OtwjqcDpY2X/eIIg1ol/n0y/X8A9foliaNt1dSK0gV3J2/zw+89FcNG3mPK+N8YWts4ZFUPxnrAzsxs/lf8yDA=="], + + "core-util-is": ["core-util-is@1.0.3", "", {}, ""], + + "cosmiconfig": ["cosmiconfig@9.0.0", "", { "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", "parse-json": "^5.2.0" }, "peerDependencies": { "typescript": ">=4.9.5" }, "optionalPeers": ["typescript"] }, "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg=="], + + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + + "crypto-js": ["crypto-js@4.2.0", "", {}, "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="], + + "crypto-random-string": ["crypto-random-string@2.0.0", "", {}, ""], + + "css-loader": ["css-loader@7.1.2", "", { "dependencies": { "icss-utils": "^5.1.0", "postcss": "^8.4.33", "postcss-modules-extract-imports": "^3.1.0", "postcss-modules-local-by-default": "^4.0.5", "postcss-modules-scope": "^3.2.0", "postcss-modules-values": "^4.0.0", "postcss-value-parser": "^4.2.0", "semver": "^7.5.4" }, "peerDependencies": { "@rspack/core": "0.x || 1.x", "webpack": "^5.27.0" }, "optionalPeers": ["@rspack/core"] }, "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA=="], + + "cssesc": ["cssesc@3.0.0", "", { "bin": "bin/cssesc" }, ""], + + "date-now": ["date-now@0.1.4", "", {}, "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw=="], + + "debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], + + "dedent": ["dedent@1.7.0", "", { "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, "optionalPeers": ["babel-plugin-macros"] }, "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ=="], + + "detect-indent": ["detect-indent@6.1.0", "", {}, "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA=="], + + "detect-libc": ["detect-libc@1.0.3", "", { "bin": "bin/detect-libc.js" }, "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="], + + "detect-newline": ["detect-newline@3.1.0", "", {}, "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA=="], + + "dir-glob": ["dir-glob@3.0.1", "", { "dependencies": { "path-type": "^4.0.0" } }, "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA=="], + + "dom-serializer": ["dom-serializer@0.2.2", "", { "dependencies": { "domelementtype": "^2.0.1", "entities": "^2.0.0" } }, "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g=="], + + "domelementtype": ["domelementtype@1.3.1", "", {}, "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w=="], + + "domhandler": ["domhandler@2.3.0", "", { "dependencies": { "domelementtype": "1" } }, "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ=="], + + "dompurify": ["dompurify@3.2.6", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ=="], + + "domutils": ["domutils@1.5.1", "", { "dependencies": { "dom-serializer": "0", "domelementtype": "1" } }, "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw=="], + + "dot-prop": ["dot-prop@5.3.0", "", { "dependencies": { "is-obj": "^2.0.0" } }, ""], + + "editor": ["editor@1.0.0", "", {}, ""], + + "electron-to-chromium": ["electron-to-chromium@1.5.199", "", {}, "sha512-3gl0S7zQd88kCAZRO/DnxtBKuhMO4h0EaQIN3YgZfV6+pW+5+bf2AdQeHNESCoaQqo/gjGVYEf2YM4O5HJQqpQ=="], + + "elementtree": ["elementtree@0.1.7", "", { "dependencies": { "sax": "1.1.4" } }, ""], + + "emoji-regex": ["emoji-regex@10.4.0", "", {}, "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw=="], + + "emojis-list": ["emojis-list@3.0.0", "", {}, ""], + + "encoding": ["encoding@0.1.13", "", { "dependencies": { "iconv-lite": "^0.6.2" } }, "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A=="], + + "endent": ["endent@2.1.0", "", { "dependencies": { "dedent": "^0.7.0", "fast-json-parse": "^1.0.3", "objectorarray": "^1.0.5" } }, ""], + + "enhanced-resolve": ["enhanced-resolve@5.18.3", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" } }, "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww=="], + + "entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="], + + "env-paths": ["env-paths@2.2.1", "", {}, ""], + + "envinfo": ["envinfo@7.14.0", "", { "bin": "dist/cli.js" }, "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg=="], + + "err-code": ["err-code@2.0.3", "", {}, "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA=="], + + "error-ex": ["error-ex@1.3.2", "", { "dependencies": { "is-arrayish": "^0.2.1" } }, "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g=="], + + "es-module-lexer": ["es-module-lexer@1.2.1", "", {}, ""], + + "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + + "escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, ""], + + "eslint-scope": ["eslint-scope@5.1.1", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, ""], + + "esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" } }, ""], + + "esrecurse": ["esrecurse@4.3.0", "", { "dependencies": { "estraverse": "^5.2.0" } }, ""], + + "estraverse": ["estraverse@4.3.0", "", {}, ""], + + "esutils": ["esutils@2.0.3", "", {}, ""], + + "events": ["events@3.3.0", "", {}, ""], + + "execa": ["execa@5.1.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, ""], + + "exit": ["exit@0.1.2", "", {}, "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ=="], + + "exponential-backoff": ["exponential-backoff@3.1.3", "", {}, "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA=="], + + "extsprintf": ["extsprintf@1.4.1", "", {}, ""], + + "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, ""], + + "fast-glob": ["fast-glob@3.3.3", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" } }, "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg=="], + + "fast-json-parse": ["fast-json-parse@1.0.3", "", {}, ""], + + "fast-json-stable-stringify": ["fast-json-stable-stringify@2.1.0", "", {}, ""], + + "fastest-levenshtein": ["fastest-levenshtein@1.0.16", "", {}, ""], + + "fastq": ["fastq@1.15.0", "", { "dependencies": { "reusify": "^1.0.4" } }, ""], + + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" } }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], + + "filesize": ["filesize@11.0.2", "", {}, "sha512-s/iAeeWLk5BschUIpmdrF8RA8lhFZ/xDZgKw1Tan72oGws1/dFGB06nYEiyyssWUfjKNQTNRlrwMVjO9/hvXDw=="], + + "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], + + "find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], + + "flat": ["flat@5.0.2", "", { "bin": "cli.js" }, "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ=="], + + "fraction.js": ["fraction.js@4.3.7", "", {}, "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew=="], + + "fs-minipass": ["fs-minipass@3.0.3", "", { "dependencies": { "minipass": "^7.0.3" } }, "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw=="], + + "fs.realpath": ["fs.realpath@1.0.0", "", {}, ""], + + "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], + + "gensync": ["gensync@1.0.0-beta.2", "", {}, ""], + + "get-caller-file": ["get-caller-file@2.0.5", "", {}, ""], + + "get-east-asian-width": ["get-east-asian-width@1.3.0", "", {}, "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ=="], + + "get-stream": ["get-stream@6.0.1", "", {}, ""], + + "glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, ""], + + "glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, ""], + + "glob-to-regexp": ["glob-to-regexp@0.4.1", "", {}, "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="], + + "globby": ["globby@11.1.0", "", { "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.2.9", "ignore": "^5.2.0", "merge2": "^1.4.1", "slash": "^3.0.0" } }, "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g=="], + + "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], + + "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + + "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + + "hosted-git-info": ["hosted-git-info@9.0.2", "", { "dependencies": { "lru-cache": "^11.1.0" } }, "sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg=="], + + "html-tag-js": ["html-tag-js@2.4.15", "", {}, "sha512-ll1CsDRYPQiUYv8DPUUnDy6k9CTwc7jMObXr7BYV6iuLm7ZUZ4ZSo5CjaU7qh1qL7S4TGaGT+JKqYXksa8dWrg=="], + + "htmlparser2": ["htmlparser2@3.8.3", "", { "dependencies": { "domelementtype": "1", "domhandler": "2.3", "domutils": "1.5", "entities": "1.0", "readable-stream": "1.1" } }, "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q=="], + + "http-cache-semantics": ["http-cache-semantics@4.2.0", "", {}, "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="], + + "http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="], + + "https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="], + + "human-signals": ["human-signals@2.1.0", "", {}, ""], + + "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], + + "icss-utils": ["icss-utils@5.1.0", "", { "peerDependencies": { "postcss": "^8.1.0" } }, ""], + + "ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="], + + "ignore-walk": ["ignore-walk@8.0.0", "", { "dependencies": { "minimatch": "^10.0.3" } }, "sha512-FCeMZT4NiRQGh+YkeKMtWrOmBgWjHjMJ26WQWrRQyoyzqevdaGSakUaJW5xQYmjLlUVk2qUnCjYVBax9EKKg8A=="], + + "immediate": ["immediate@3.0.6", "", {}, ""], + + "immutable": ["immutable@5.1.3", "", {}, "sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg=="], + + "import-fresh": ["import-fresh@3.3.1", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ=="], + + "import-local": ["import-local@3.1.0", "", { "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" }, "bin": { "import-local-fixture": "fixtures/cli.js" } }, ""], + + "imurmurhash": ["imurmurhash@0.1.4", "", {}, ""], + + "inflight": ["inflight@1.0.6", "", { "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, ""], + + "inherits": ["inherits@2.0.4", "", {}, ""], + + "ini": ["ini@6.0.0", "", {}, "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ=="], + + "interpret": ["interpret@3.1.1", "", {}, ""], + + "ip-address": ["ip-address@10.1.0", "", {}, "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q=="], + + "is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="], + + "is-core-module": ["is-core-module@2.16.1", "", { "dependencies": { "hasown": "^2.0.2" } }, "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w=="], + + "is-extglob": ["is-extglob@2.1.1", "", {}, ""], + + "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, ""], + + "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + + "is-obj": ["is-obj@2.0.0", "", {}, ""], + + "is-path-inside": ["is-path-inside@3.0.3", "", {}, "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ=="], + + "is-plain-object": ["is-plain-object@2.0.4", "", { "dependencies": { "isobject": "^3.0.1" } }, "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og=="], + + "is-stream": ["is-stream@2.0.1", "", {}, ""], + + "is-typedarray": ["is-typedarray@1.0.0", "", {}, ""], + + "isarray": ["isarray@1.0.0", "", {}, ""], + + "isexe": ["isexe@3.1.1", "", {}, "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ=="], + + "isobject": ["isobject@4.0.0", "", {}, "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA=="], + + "java-parser": ["java-parser@3.0.1", "", { "dependencies": { "chevrotain": "11.0.3", "chevrotain-allstar": "0.3.1", "lodash": "4.17.21" } }, "sha512-sDIR7u9b7O2JViNUxiZRhnRz7URII/eE7g2B+BmGxDeS6Ex3OYAcCyz5oh0H4LQ+hL/BS8OJTz8apMy9xtGmrQ=="], + + "jest-worker": ["jest-worker@27.5.1", "", { "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" } }, "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg=="], + + "jiti": ["jiti@1.21.0", "", { "bin": "bin/jiti.js" }, "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q=="], + + "js-base64": ["js-base64@3.7.7", "", {}, "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw=="], + + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + + "js-yaml": ["js-yaml@4.1.1", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": "bin/js-yaml.js" }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="], + + "jsesc": ["jsesc@3.1.0", "", { "bin": "bin/jsesc" }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], + + "jshint": ["jshint@2.13.6", "", { "dependencies": { "cli": "~1.0.0", "console-browserify": "1.1.x", "exit": "0.1.x", "htmlparser2": "3.8.x", "lodash": "~4.17.21", "minimatch": "~3.0.2", "strip-json-comments": "1.0.x" }, "bin": "bin/jshint" }, "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ=="], + + "json-parse-even-better-errors": ["json-parse-even-better-errors@2.3.1", "", {}, ""], + + "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, ""], + + "json-stringify-nice": ["json-stringify-nice@1.1.4", "", {}, "sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw=="], + + "json5": ["json5@2.2.3", "", { "bin": "lib/cli.js" }, ""], + + "jsonparse": ["jsonparse@1.3.1", "", {}, "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg=="], + + "jszip": ["jszip@3.10.1", "", { "dependencies": { "lie": "~3.3.0", "pako": "~1.0.2", "readable-stream": "~2.3.6", "setimmediate": "^1.0.5" } }, ""], + + "just-diff": ["just-diff@6.0.2", "", {}, "sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA=="], + + "just-diff-apply": ["just-diff-apply@5.5.0", "", {}, "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw=="], + + "kind-of": ["kind-of@6.0.3", "", {}, "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="], + + "lie": ["lie@3.3.0", "", { "dependencies": { "immediate": "~3.0.5" } }, ""], + + "lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="], + + "linkify-it": ["linkify-it@5.0.0", "", { "dependencies": { "uc.micro": "^2.0.0" } }, "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ=="], + + "loader-runner": ["loader-runner@4.3.0", "", {}, ""], + + "loader-utils": ["loader-utils@2.0.4", "", { "dependencies": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", "json5": "^2.1.2" } }, ""], + + "locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], + + "lodash": ["lodash@4.17.21", "", {}, ""], + + "lodash-es": ["lodash-es@4.17.21", "", {}, "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="], + + "lodash.debounce": ["lodash.debounce@4.0.8", "", {}, ""], + + "lodash.zip": ["lodash.zip@4.2.0", "", {}, ""], + + "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + + "make-dir": ["make-dir@3.1.0", "", { "dependencies": { "semver": "^6.0.0" } }, ""], + + "make-fetch-happen": ["make-fetch-happen@15.0.3", "", { "dependencies": { "@npmcli/agent": "^4.0.0", "cacache": "^20.0.1", "http-cache-semantics": "^4.1.1", "minipass": "^7.0.2", "minipass-fetch": "^5.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^1.0.0", "proc-log": "^6.0.0", "promise-retry": "^2.0.1", "ssri": "^13.0.0" } }, "sha512-iyyEpDty1mwW3dGlYXAJqC/azFn5PPvgKVwXayOGBSmKLxhKZ9fg4qIan2ePpp1vJIwfFiO34LAPZgq9SZW9Aw=="], + + "markdown-it": ["markdown-it@14.1.0", "", { "dependencies": { "argparse": "^2.0.1", "entities": "^4.4.0", "linkify-it": "^5.0.0", "mdurl": "^2.0.0", "punycode.js": "^2.3.1", "uc.micro": "^2.1.0" }, "bin": "bin/markdown-it.mjs" }, "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg=="], + + "markdown-it-anchor": ["markdown-it-anchor@9.2.0", "", { "peerDependencies": { "@types/markdown-it": "*", "markdown-it": "*" } }, "sha512-sa2ErMQ6kKOA4l31gLGYliFQrMKkqSO0ZJgGhDHKijPf0pNFM9vghjAh3gn26pS4JDRs7Iwa9S36gxm3vgZTzg=="], + + "markdown-it-footnote": ["markdown-it-footnote@4.0.0", "", {}, "sha512-WYJ7urf+khJYl3DqofQpYfEYkZKbmXmwxQV8c8mO/hGIhgZ1wOe7R4HLFNwqx7TjILbnC98fuyeSsin19JdFcQ=="], + + "markdown-it-github-alerts": ["markdown-it-github-alerts@1.0.0", "", { "peerDependencies": { "markdown-it": ">= 13.0.0" } }, "sha512-RU3cbB/ewujrDpYNdyabvp4CscZ5J/3D71NWbJW+JSA0nplfutIXDMCwtGWlMLwzgBDAYkFMvYGkigq8nWOVdA=="], + + "markdown-it-task-lists": ["markdown-it-task-lists@2.1.1", "", {}, "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA=="], + + "mdurl": ["mdurl@2.0.0", "", {}, "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w=="], + + "merge-stream": ["merge-stream@2.0.0", "", {}, ""], + + "merge2": ["merge2@1.4.1", "", {}, ""], + + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], + + "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], + + "mime-types": ["mime-types@3.0.1", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA=="], + + "mimic-fn": ["mimic-fn@2.1.0", "", {}, ""], + + "mini-css-extract-plugin": ["mini-css-extract-plugin@2.9.3", "", { "dependencies": { "schema-utils": "^4.0.0", "tapable": "^2.2.1" }, "peerDependencies": { "webpack": "^5.0.0" } }, "sha512-tRA0+PsS4kLVijnN1w9jUu5lkxBwUk9E8SbgEB5dBJqchE6pVYdawROG6uQtpmAri7tdCK9i7b1bULeVWqS6Ag=="], + + "minimatch": ["minimatch@10.1.1", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.0" } }, "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ=="], + + "minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], + + "minipass-collect": ["minipass-collect@2.0.1", "", { "dependencies": { "minipass": "^7.0.3" } }, "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw=="], + + "minipass-fetch": ["minipass-fetch@5.0.0", "", { "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", "minizlib": "^3.0.1" }, "optionalDependencies": { "encoding": "^0.1.13" } }, "sha512-fiCdUALipqgPWrOVTz9fw0XhcazULXOSU6ie40DDbX1F49p1dBrSRBuswndTx1x3vEb/g0FT7vC4c4C2u/mh3A=="], + + "minipass-flush": ["minipass-flush@1.0.5", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw=="], + + "minipass-pipeline": ["minipass-pipeline@1.2.4", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A=="], + + "minipass-sized": ["minipass-sized@1.0.3", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g=="], + + "minizlib": ["minizlib@3.1.0", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw=="], + + "moment": ["moment@2.30.1", "", {}, "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="], + + "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + + "mustache": ["mustache@4.2.0", "", { "bin": "bin/mustache" }, ""], + + "nanoid": ["nanoid@3.3.7", "", { "bin": "bin/nanoid.cjs" }, "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g=="], + + "negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="], + + "neo-async": ["neo-async@2.6.2", "", {}, ""], + + "node-addon-api": ["node-addon-api@7.1.1", "", {}, "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="], + + "node-gyp": ["node-gyp@12.1.0", "", { "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", "graceful-fs": "^4.2.6", "make-fetch-happen": "^15.0.0", "nopt": "^9.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5", "tar": "^7.5.2", "tinyglobby": "^0.2.12", "which": "^6.0.0" }, "bin": "bin/node-gyp.js" }, "sha512-W+RYA8jBnhSr2vrTtlPYPc1K+CSjGpVDRZxcqJcERZ8ND3A1ThWPHRwctTx3qC3oW99jt726jhdz3Y6ky87J4g=="], + + "node-releases": ["node-releases@2.0.19", "", {}, "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw=="], + + "nopt": ["nopt@8.1.0", "", { "dependencies": { "abbrev": "^3.0.0" }, "bin": "bin/nopt.js" }, "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A=="], + + "normalize-range": ["normalize-range@0.1.2", "", {}, ""], + + "npm-bundled": ["npm-bundled@5.0.0", "", { "dependencies": { "npm-normalize-package-bin": "^5.0.0" } }, "sha512-JLSpbzh6UUXIEoqPsYBvVNVmyrjVZ1fzEFbqxKkTJQkWBO3xFzFT+KDnSKQWwOQNbuWRwt5LSD6HOTLGIWzfrw=="], + + "npm-install-checks": ["npm-install-checks@8.0.0", "", { "dependencies": { "semver": "^7.1.1" } }, "sha512-ScAUdMpyzkbpxoNekQ3tNRdFI8SJ86wgKZSQZdUxT+bj0wVFpsEMWnkXP0twVe1gJyNF5apBWDJhhIbgrIViRA=="], + + "npm-normalize-package-bin": ["npm-normalize-package-bin@5.0.0", "", {}, "sha512-CJi3OS4JLsNMmr2u07OJlhcrPxCeOeP/4xq67aWNai6TNWWbTrlNDgl8NcFKVlcBKp18GPj+EzbNIgrBfZhsag=="], + + "npm-package-arg": ["npm-package-arg@13.0.2", "", { "dependencies": { "hosted-git-info": "^9.0.0", "proc-log": "^6.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^7.0.0" } }, "sha512-IciCE3SY3uE84Ld8WZU23gAPPV9rIYod4F+rc+vJ7h7cwAJt9Vk6TVsK60ry7Uj3SRS3bqRRIGuTp9YVlk6WNA=="], + + "npm-packlist": ["npm-packlist@10.0.3", "", { "dependencies": { "ignore-walk": "^8.0.0", "proc-log": "^6.0.0" } }, "sha512-zPukTwJMOu5X5uvm0fztwS5Zxyvmk38H/LfidkOMt3gbZVCyro2cD/ETzwzVPcWZA3JOyPznfUN/nkyFiyUbxg=="], + + "npm-pick-manifest": ["npm-pick-manifest@11.0.3", "", { "dependencies": { "npm-install-checks": "^8.0.0", "npm-normalize-package-bin": "^5.0.0", "npm-package-arg": "^13.0.0", "semver": "^7.3.5" } }, "sha512-buzyCfeoGY/PxKqmBqn1IUJrZnUi1VVJTdSSRPGI60tJdUhUoSQFhs0zycJokDdOznQentgrpf8LayEHyyYlqQ=="], + + "npm-registry-fetch": ["npm-registry-fetch@19.1.1", "", { "dependencies": { "@npmcli/redact": "^4.0.0", "jsonparse": "^1.3.1", "make-fetch-happen": "^15.0.0", "minipass": "^7.0.2", "minipass-fetch": "^5.0.0", "minizlib": "^3.0.1", "npm-package-arg": "^13.0.0", "proc-log": "^6.0.0" } }, "sha512-TakBap6OM1w0H73VZVDf44iFXsOS3h+L4wVMXmbWOQroZgFhMch0juN6XSzBNlD965yIKvWg2dfu7NSiaYLxtw=="], + + "npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, ""], + + "objectorarray": ["objectorarray@1.0.5", "", {}, ""], + + "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, ""], + + "onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, ""], + + "p-finally": ["p-finally@1.0.0", "", {}, ""], + + "p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], + + "p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], + + "p-map": ["p-map@7.0.4", "", {}, "sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ=="], + + "p-try": ["p-try@2.2.0", "", {}, ""], + + "pacote": ["pacote@21.0.4", "", { "dependencies": { "@npmcli/git": "^7.0.0", "@npmcli/installed-package-contents": "^4.0.0", "@npmcli/package-json": "^7.0.0", "@npmcli/promise-spawn": "^9.0.0", "@npmcli/run-script": "^10.0.0", "cacache": "^20.0.0", "fs-minipass": "^3.0.0", "minipass": "^7.0.2", "npm-package-arg": "^13.0.0", "npm-packlist": "^10.0.1", "npm-pick-manifest": "^11.0.1", "npm-registry-fetch": "^19.0.0", "proc-log": "^6.0.0", "promise-retry": "^2.0.1", "sigstore": "^4.0.0", "ssri": "^13.0.0", "tar": "^7.4.3" }, "bin": "bin/index.js" }, "sha512-RplP/pDW0NNNDh3pnaoIWYPvNenS7UqMbXyvMqJczosiFWTeGGwJC2NQBLqKf4rGLFfwCOnntw1aEp9Jiqm1MA=="], + + "pako": ["pako@1.0.11", "", {}, ""], + + "parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, ""], + + "parse-conflict-json": ["parse-conflict-json@5.0.1", "", { "dependencies": { "json-parse-even-better-errors": "^5.0.0", "just-diff": "^6.0.0", "just-diff-apply": "^5.2.0" } }, "sha512-ZHEmNKMq1wyJXNwLxyHnluPfRAFSIliBvbK/UiOceROt4Xh9Pz0fq49NytIaeaCUf5VR86hwQ/34FCcNU5/LKQ=="], + + "parse-json": ["parse-json@5.2.0", "", { "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } }, "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg=="], + + "path-browserify": ["path-browserify@1.0.1", "", {}, ""], + + "path-exists": ["path-exists@4.0.0", "", {}, ""], + + "path-is-absolute": ["path-is-absolute@1.0.1", "", {}, ""], + + "path-is-inside": ["path-is-inside@1.0.2", "", {}, "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w=="], + + "path-key": ["path-key@3.1.1", "", {}, ""], + + "path-parse": ["path-parse@1.0.7", "", {}, ""], + + "path-scurry": ["path-scurry@2.0.1", "", { "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" } }, "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA=="], + + "path-type": ["path-type@4.0.0", "", {}, "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "picomatch": ["picomatch@2.3.1", "", {}, ""], + + "pify": ["pify@4.0.1", "", {}, ""], + + "pkg-dir": ["pkg-dir@4.2.0", "", { "dependencies": { "find-up": "^4.0.0" } }, ""], + + "plist": ["plist@3.1.0", "", { "dependencies": { "@xmldom/xmldom": "^0.8.8", "base64-js": "^1.5.1", "xmlbuilder": "^15.1.1" } }, "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ=="], + + "postcss": ["postcss@8.4.33", "", { "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } }, "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg=="], + + "postcss-loader": ["postcss-loader@8.1.1", "", { "dependencies": { "cosmiconfig": "^9.0.0", "jiti": "^1.20.0", "semver": "^7.5.4" }, "peerDependencies": { "@rspack/core": "0.x || 1.x", "postcss": "^7.0.0 || ^8.0.1", "webpack": "^5.0.0" }, "optionalPeers": ["@rspack/core"] }, "sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ=="], + + "postcss-modules-extract-imports": ["postcss-modules-extract-imports@3.1.0", "", { "peerDependencies": { "postcss": "^8.1.0" } }, "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q=="], + + "postcss-modules-local-by-default": ["postcss-modules-local-by-default@4.0.5", "", { "dependencies": { "icss-utils": "^5.0.0", "postcss-selector-parser": "^6.0.2", "postcss-value-parser": "^4.1.0" }, "peerDependencies": { "postcss": "^8.1.0" } }, "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw=="], + + "postcss-modules-scope": ["postcss-modules-scope@3.2.0", "", { "dependencies": { "postcss-selector-parser": "^6.0.4" }, "peerDependencies": { "postcss": "^8.1.0" } }, "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ=="], + + "postcss-modules-values": ["postcss-modules-values@4.0.0", "", { "dependencies": { "icss-utils": "^5.0.0" }, "peerDependencies": { "postcss": "^8.1.0" } }, ""], + + "postcss-selector-parser": ["postcss-selector-parser@6.0.11", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, ""], + + "postcss-value-parser": ["postcss-value-parser@4.2.0", "", {}, ""], + + "prettier": ["prettier@3.6.2", "", { "bin": "bin/prettier.cjs" }, "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ=="], + + "prettier-plugin-java": ["prettier-plugin-java@2.7.4", "", { "dependencies": { "java-parser": "3.0.1" }, "peerDependencies": { "prettier": "^3.0.0" } }, "sha512-RiRNkumIW9vaDpxirgIPI+oLSRmuCmoVZuTax9i3cWzWnxd+uKyAfDe4efS+ce00owAeh0a1DI5eFaH1xYWNPg=="], + + "proc-log": ["proc-log@6.1.0", "", {}, "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ=="], + + "process-nextick-args": ["process-nextick-args@2.0.1", "", {}, ""], + + "proggy": ["proggy@4.0.0", "", {}, "sha512-MbA4R+WQT76ZBm/5JUpV9yqcJt92175+Y0Bodg3HgiXzrmKu7Ggq+bpn6y6wHH+gN9NcyKn3yg1+d47VaKwNAQ=="], + + "promise-all-reject-late": ["promise-all-reject-late@1.0.1", "", {}, "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw=="], + + "promise-call-limit": ["promise-call-limit@3.0.2", "", {}, "sha512-mRPQO2T1QQVw11E7+UdCJu7S61eJVWknzml9sC1heAdj1jxl0fWMBypIt9ZOcLFf8FkG995ZD7RnVk7HH72fZw=="], + + "promise-retry": ["promise-retry@2.0.1", "", { "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" } }, "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g=="], + + "properties-parser": ["properties-parser@0.6.0", "", {}, "sha512-qvr2cSmoA0dln0MARAKwBzPkkXn7FqwX+RVVNpMdMJc7rt9mqO2cXwluxtux9fHrLhjnPFaQkS8BM0kFrTCnSw=="], + + "punycode": ["punycode@2.3.0", "", {}, ""], + + "punycode.js": ["punycode.js@2.3.1", "", {}, "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA=="], + + "q": ["q@1.5.1", "", {}, ""], + + "querystringify": ["querystringify@2.2.0", "", {}, ""], + + "queue-microtask": ["queue-microtask@1.2.3", "", {}, ""], + + "randombytes": ["randombytes@2.1.0", "", { "dependencies": { "safe-buffer": "^5.1.0" } }, "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ=="], + + "raw-loader": ["raw-loader@4.0.2", "", { "dependencies": { "loader-utils": "^2.0.0", "schema-utils": "^3.0.0" }, "peerDependencies": { "webpack": "^4.0.0 || ^5.0.0" } }, ""], + + "read-chunk": ["read-chunk@3.2.0", "", { "dependencies": { "pify": "^4.0.1", "with-open-file": "^0.1.6" } }, ""], + + "read-cmd-shim": ["read-cmd-shim@6.0.0", "", {}, "sha512-1zM5HuOfagXCBWMN83fuFI/x+T/UhZ7k+KIzhrHXcQoeX5+7gmaDYjELQHmmzIodumBHeByBJT4QYS7ufAgs7A=="], + + "readable-stream": ["readable-stream@2.3.7", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, ""], + + "readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="], + + "rechoir": ["rechoir@0.8.0", "", { "dependencies": { "resolve": "^1.20.0" } }, ""], + + "regenerate": ["regenerate@1.4.2", "", {}, "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A=="], + + "regenerate-unicode-properties": ["regenerate-unicode-properties@10.2.0", "", { "dependencies": { "regenerate": "^1.4.2" } }, "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA=="], + + "regexpu-core": ["regexpu-core@6.2.0", "", { "dependencies": { "regenerate": "^1.4.2", "regenerate-unicode-properties": "^10.2.0", "regjsgen": "^0.8.0", "regjsparser": "^0.12.0", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.1.0" } }, "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA=="], + + "regjsgen": ["regjsgen@0.8.0", "", {}, "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q=="], + + "regjsparser": ["regjsparser@0.12.0", "", { "dependencies": { "jsesc": "~3.0.2" }, "bin": "bin/parser" }, "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ=="], + + "require-from-string": ["require-from-string@2.0.2", "", {}, ""], + + "requires-port": ["requires-port@1.0.0", "", {}, ""], + + "resolve": ["resolve@1.22.10", "", { "dependencies": { "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": "bin/resolve" }, "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w=="], + + "resolve-cwd": ["resolve-cwd@3.0.0", "", { "dependencies": { "resolve-from": "^5.0.0" } }, ""], + + "resolve-from": ["resolve-from@4.0.0", "", {}, ""], + + "retry": ["retry@0.12.0", "", {}, "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow=="], + + "reusify": ["reusify@1.0.4", "", {}, ""], + + "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, ""], + + "safe-buffer": ["safe-buffer@5.1.2", "", {}, ""], + + "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], + + "sass": ["sass@1.90.0", "", { "dependencies": { "chokidar": "^4.0.0", "immutable": "^5.0.2", "source-map-js": ">=0.6.2 <2.0.0" }, "optionalDependencies": { "@parcel/watcher": "^2.4.1" }, "bin": "sass.js" }, "sha512-9GUyuksjw70uNpb1MTYWsH9MQHOHY6kwfnkafC24+7aOMZn9+rVMBxRbLvw756mrBFbIsFg6Xw9IkR2Fnn3k+Q=="], + + "sass-loader": ["sass-loader@16.0.5", "", { "dependencies": { "neo-async": "^2.6.2" }, "peerDependencies": { "@rspack/core": "0.x || 1.x", "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", "sass": "^1.3.0", "sass-embedded": "*", "webpack": "^5.0.0" }, "optionalPeers": ["@rspack/core", "node-sass", "sass-embedded"] }, "sha512-oL+CMBXrj6BZ/zOq4os+UECPL+bWqt6OAC6DWS8Ln8GZRcMDjlJ4JC3FBDuHJdYaFWIdKNIBYmtZtK2MaMkNIw=="], + + "sax": ["sax@1.1.4", "", {}, ""], + + "schema-utils": ["schema-utils@4.3.2", "", { "dependencies": { "@types/json-schema": "^7.0.9", "ajv": "^8.9.0", "ajv-formats": "^2.1.1", "ajv-keywords": "^5.1.0" } }, "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ=="], + + "semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, ""], + + "serialize-javascript": ["serialize-javascript@6.0.2", "", { "dependencies": { "randombytes": "^2.1.0" } }, "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g=="], + + "setimmediate": ["setimmediate@1.0.5", "", {}, ""], + + "shallow-clone": ["shallow-clone@3.0.1", "", { "dependencies": { "kind-of": "^6.0.2" } }, "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA=="], + + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, ""], + + "shebang-regex": ["shebang-regex@3.0.0", "", {}, ""], + + "signal-exit": ["signal-exit@3.0.7", "", {}, ""], + + "sigstore": ["sigstore@4.0.0", "", { "dependencies": { "@sigstore/bundle": "^4.0.0", "@sigstore/core": "^3.0.0", "@sigstore/protobuf-specs": "^0.5.0", "@sigstore/sign": "^4.0.0", "@sigstore/tuf": "^4.0.0", "@sigstore/verify": "^3.0.0" } }, "sha512-Gw/FgHtrLM9WP8P5lLcSGh9OQcrTruWCELAiS48ik1QbL0cH+dfjomiRTUE9zzz+D1N6rOLkwXUvVmXZAsNE0Q=="], + + "slash": ["slash@3.0.0", "", {}, "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="], + + "smart-buffer": ["smart-buffer@4.2.0", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="], + + "socks": ["socks@2.8.7", "", { "dependencies": { "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" } }, "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A=="], + + "socks-proxy-agent": ["socks-proxy-agent@8.0.5", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="], + + "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + + "source-map-js": ["source-map-js@1.0.2", "", {}, ""], + + "source-map-support": ["source-map-support@0.5.21", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w=="], + + "spdx-correct": ["spdx-correct@3.2.0", "", { "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA=="], + + "spdx-exceptions": ["spdx-exceptions@2.5.0", "", {}, "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w=="], + + "spdx-expression-parse": ["spdx-expression-parse@3.0.1", "", { "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q=="], + + "spdx-license-ids": ["spdx-license-ids@3.0.22", "", {}, "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ=="], + + "sprintf": ["sprintf@0.1.5", "", {}, "sha512-4X5KsuXFQ7f+d7Y+bi4qSb6eI+YoifDTGr0MQJXRoYO7BO7evfRCjds6kk3z7l5CiJYxgDN1x5Er4WiyCt+zTQ=="], + + "ssri": ["ssri@13.0.0", "", { "dependencies": { "minipass": "^7.0.3" } }, "sha512-yizwGBpbCn4YomB2lzhZqrHLJoqFGXihNbib3ozhqF/cIp5ue+xSmOQrjNasEE62hFxsCcg/V/z23t4n8jMEng=="], + + "string-argv": ["string-argv@0.3.2", "", {}, "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q=="], + + "string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + + "string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, ""], + + "stringify-package": ["stringify-package@1.0.1", "", {}, "sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg=="], + + "strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="], + + "strip-bom": ["strip-bom@4.0.0", "", {}, ""], + + "strip-final-newline": ["strip-final-newline@2.0.0", "", {}, ""], + + "strip-json-comments": ["strip-json-comments@1.0.4", "", { "bin": "cli.js" }, "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg=="], + + "style-loader": ["style-loader@4.0.0", "", { "peerDependencies": { "webpack": "^5.27.0" } }, "sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA=="], + + "supports-color": ["supports-color@8.1.1", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="], + + "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, ""], + + "systeminformation": ["systeminformation@5.27.14", "", { "os": "!aix", "bin": "lib/cli.js" }, "sha512-3DoNDYSZBLxBwaJtQGWNpq0fonga/VZ47HY1+7/G3YoIPaPz93Df6egSzzTKbEMmlzUpy3eQ0nR9REuYIycXGg=="], + + "tapable": ["tapable@2.2.1", "", {}, ""], + + "tar": ["tar@7.5.2", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.1.0", "yallist": "^5.0.0" } }, "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg=="], + + "terminal": ["terminal@0.1.4", "", { "dependencies": { "sprintf": ">= 0.1.1" } }, "sha512-w6OAFpUO+TimZUdQ46dK3fYYOCCBIsS2QUfIEkzX21oJ8tvJOJvJkcmrbleLH5KG02SNohYFDj81bL3VPaULsQ=="], + + "terser": ["terser@5.43.1", "", { "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.14.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, "bin": "bin/terser" }, "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg=="], + + "terser-webpack-plugin": ["terser-webpack-plugin@5.3.14", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", "jest-worker": "^27.4.5", "schema-utils": "^4.3.0", "serialize-javascript": "^6.0.2", "terser": "^5.31.1" }, "peerDependencies": { "webpack": "^5.1.0" } }, "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw=="], + + "tinyglobby": ["tinyglobby@0.2.15", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" } }, "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ=="], + + "tmp": ["tmp@0.2.5", "", {}, "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow=="], + + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + + "treeverse": ["treeverse@3.0.0", "", {}, "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ=="], + + "tuf-js": ["tuf-js@4.0.0", "", { "dependencies": { "@tufjs/models": "4.0.0", "debug": "^4.4.1", "make-fetch-happen": "^15.0.0" } }, "sha512-Lq7ieeGvXDXwpoSmOSgLWVdsGGV9J4a77oDTAPe/Ltrqnnm/ETaRlBAQTH5JatEh8KXuE6sddf9qAv1Q2282Hg=="], + + "typedarray-to-buffer": ["typedarray-to-buffer@3.1.5", "", { "dependencies": { "is-typedarray": "^1.0.0" } }, ""], + + "uc.micro": ["uc.micro@2.1.0", "", {}, "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A=="], + + "undici-types": ["undici-types@7.10.0", "", {}, "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="], + + "unicode-canonical-property-names-ecmascript": ["unicode-canonical-property-names-ecmascript@2.0.1", "", {}, "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg=="], + + "unicode-match-property-ecmascript": ["unicode-match-property-ecmascript@2.0.0", "", { "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", "unicode-property-aliases-ecmascript": "^2.0.0" } }, "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q=="], + + "unicode-match-property-value-ecmascript": ["unicode-match-property-value-ecmascript@2.2.0", "", {}, "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg=="], + + "unicode-property-aliases-ecmascript": ["unicode-property-aliases-ecmascript@2.1.0", "", {}, "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w=="], + + "unique-filename": ["unique-filename@5.0.0", "", { "dependencies": { "unique-slug": "^6.0.0" } }, "sha512-2RaJTAvAb4owyjllTfXzFClJ7WsGxlykkPvCr9pA//LD9goVq+m4PPAeBgNodGZ7nSrntT/auWpJ6Y5IFXcfjg=="], + + "unique-slug": ["unique-slug@6.0.0", "", { "dependencies": { "imurmurhash": "^0.1.4" } }, "sha512-4Lup7Ezn8W3d52/xBhZBVdx323ckxa7DEvd9kPQHppTkLoJXw6ltrBCyj5pnrxj0qKDxYMJ56CoxNuFCscdTiw=="], + + "unique-string": ["unique-string@2.0.0", "", { "dependencies": { "crypto-random-string": "^2.0.0" } }, ""], + + "untildify": ["untildify@4.0.0", "", {}, "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw=="], + + "update-browserslist-db": ["update-browserslist-db@1.1.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": "cli.js" }, "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw=="], + + "uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, ""], + + "url-parse": ["url-parse@1.5.10", "", { "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" } }, ""], + + "util-deprecate": ["util-deprecate@1.0.2", "", {}, ""], + + "valid-identifier": ["valid-identifier@0.0.2", "", {}, "sha512-zaSmOW6ykXwrkX0YTuFUSoALNEKGaQHpxBJQLb3TXspRNDpBwbfrIQCZqAQ0LKBlKuyn2YOq7NNd6415hvZ33g=="], + + "validate-npm-package-license": ["validate-npm-package-license@3.0.4", "", { "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew=="], + + "validate-npm-package-name": ["validate-npm-package-name@7.0.0", "", {}, "sha512-bwVk/OK+Qu108aJcMAEiU4yavHUI7aN20TgZNBj9MR2iU1zPUl1Z1Otr7771ExfYTPTvfN8ZJ1pbr5Iklgt4xg=="], + + "vanilla-picker": ["vanilla-picker@2.12.3", "", { "dependencies": { "@sphinxxxx/color-conversion": "^2.2.2" } }, "sha512-qVkT1E7yMbUsB2mmJNFmaXMWE2hF8ffqzMMwe9zdAikd8u2VfnsVY2HQcOUi2F38bgbxzlJBEdS1UUhOXdF9GQ=="], + + "walk-up-path": ["walk-up-path@4.0.0", "", {}, "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A=="], + + "watchpack": ["watchpack@2.4.1", "", { "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" } }, "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg=="], + + "webpack": ["webpack@5.101.0", "", { "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", "@types/json-schema": "^7.0.15", "@webassemblyjs/ast": "^1.14.1", "@webassemblyjs/wasm-edit": "^1.14.1", "@webassemblyjs/wasm-parser": "^1.14.1", "acorn": "^8.15.0", "acorn-import-phases": "^1.0.3", "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^5.17.2", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^4.3.2", "tapable": "^2.1.1", "terser-webpack-plugin": "^5.3.11", "watchpack": "^2.4.1", "webpack-sources": "^3.3.3" }, "bin": "bin/webpack.js" }, "sha512-B4t+nJqytPeuZlHuIKTbalhljIFXeNRqrUGAQgTGlfOl2lXXKXw+yZu6bicycP+PUlM44CxBjCFD6aciKFT3LQ=="], + + "webpack-cli": ["webpack-cli@6.0.1", "", { "dependencies": { "@discoveryjs/json-ext": "^0.6.1", "@webpack-cli/configtest": "^3.0.1", "@webpack-cli/info": "^3.0.1", "@webpack-cli/serve": "^3.0.1", "colorette": "^2.0.14", "commander": "^12.1.0", "cross-spawn": "^7.0.3", "envinfo": "^7.14.0", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", "interpret": "^3.1.1", "rechoir": "^0.8.0", "webpack-merge": "^6.0.1" }, "peerDependencies": { "webpack": "^5.82.0" }, "bin": "bin/cli.js" }, "sha512-MfwFQ6SfwinsUVi0rNJm7rHZ31GyTcpVE5pgVA3hwFRb7COD4TzjUUwhGWKfO50+xdc2MQPuEBBJoqIMGt3JDw=="], + + "webpack-merge": ["webpack-merge@6.0.1", "", { "dependencies": { "clone-deep": "^4.0.1", "flat": "^5.0.2", "wildcard": "^2.0.1" } }, "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg=="], + + "webpack-sources": ["webpack-sources@3.3.3", "", {}, "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg=="], + + "which": ["which@5.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ=="], + + "wildcard": ["wildcard@2.0.1", "", {}, "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ=="], + + "with-open-file": ["with-open-file@0.1.7", "", { "dependencies": { "p-finally": "^1.0.0", "p-try": "^2.1.0", "pify": "^4.0.1" } }, ""], + + "wrap-ansi": ["wrap-ansi@9.0.0", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q=="], + + "wrappy": ["wrappy@1.0.2", "", {}, ""], + + "write-file-atomic": ["write-file-atomic@3.0.3", "", { "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", "signal-exit": "^3.0.2", "typedarray-to-buffer": "^3.1.5" } }, ""], + + "xdg-basedir": ["xdg-basedir@4.0.0", "", {}, ""], + + "xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], + + "y18n": ["y18n@5.0.8", "", {}, ""], + + "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], + + "yargs": ["yargs@18.0.0", "", { "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "string-width": "^7.2.0", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" } }, "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg=="], + + "yargs-parser": ["yargs-parser@22.0.0", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="], + + "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + + "@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.12", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg=="], + + "@jridgewell/source-map/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.12", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg=="], + + "@npmcli/agent/lru-cache": ["lru-cache@11.2.2", "", {}, "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg=="], + + "@npmcli/arborist/lru-cache": ["lru-cache@11.2.2", "", {}, "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg=="], + + "@npmcli/arborist/nopt": ["nopt@9.0.0", "", { "dependencies": { "abbrev": "^4.0.0" }, "bin": "bin/nopt.js" }, "sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw=="], + + "@npmcli/arborist/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "@npmcli/fs/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "@npmcli/git/lru-cache": ["lru-cache@11.2.2", "", {}, "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg=="], + + "@npmcli/git/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "@npmcli/git/which": ["which@6.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg=="], + + "@npmcli/map-workspaces/glob": ["glob@13.0.0", "", { "dependencies": { "minimatch": "^10.1.1", "minipass": "^7.1.2", "path-scurry": "^2.0.0" } }, "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA=="], + + "@npmcli/metavuln-calculator/json-parse-even-better-errors": ["json-parse-even-better-errors@5.0.0", "", {}, "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ=="], + + "@npmcli/metavuln-calculator/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "@npmcli/package-json/glob": ["glob@13.0.0", "", { "dependencies": { "minimatch": "^10.1.1", "minipass": "^7.1.2", "path-scurry": "^2.0.0" } }, "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA=="], + + "@npmcli/package-json/json-parse-even-better-errors": ["json-parse-even-better-errors@5.0.0", "", {}, "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ=="], + + "@npmcli/package-json/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "@npmcli/promise-spawn/which": ["which@6.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg=="], + + "@npmcli/query/postcss-selector-parser": ["postcss-selector-parser@7.1.0", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA=="], + + "@npmcli/run-script/which": ["which@6.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg=="], + + "@sigstore/sign/proc-log": ["proc-log@5.0.0", "", {}, "sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ=="], + + "@tufjs/models/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + + "android-versions/semver": ["semver@7.7.2", "", { "bin": "bin/semver.js" }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + + "bin-links/write-file-atomic": ["write-file-atomic@7.0.0", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" } }, "sha512-YnlPC6JqnZl6aO4uRc+dx5PHguiR9S6WeoLtpxNT9wIG+BDya7ZNE1q7KOjVgaA73hKhKLpVPgJ5QA9THQ5BRg=="], + + "cacache/glob": ["glob@13.0.0", "", { "dependencies": { "minimatch": "^10.1.1", "minipass": "^7.1.2", "path-scurry": "^2.0.0" } }, "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA=="], + + "cacache/lru-cache": ["lru-cache@11.2.2", "", {}, "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg=="], + + "cliui/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + + "cordova/cordova-common": ["cordova-common@6.0.0", "", { "dependencies": { "@netflix/nerror": "^1.1.3", "ansi": "^0.3.1", "bplist-parser": "^0.3.2", "elementtree": "^0.1.7", "endent": "^2.1.0", "fast-glob": "^3.3.3", "plist": "^3.1.0" } }, "sha512-16WPC1DuxVdshV3RoQUXqhcJVdhxWGwiFysA4TkYuboqoev6mgt0JuIJFxmQbzR/DuyuONaVe0L0O0Hf1C08Mg=="], + + "cordova/nopt": ["nopt@9.0.0", "", { "dependencies": { "abbrev": "^4.0.0" }, "bin": "bin/nopt.js" }, "sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw=="], + + "cordova/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "cordova-android/semver": ["semver@7.7.2", "", { "bin": "bin/semver.js" }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + + "cordova-create/cordova-common": ["cordova-common@6.0.0", "", { "dependencies": { "@netflix/nerror": "^1.1.3", "ansi": "^0.3.1", "bplist-parser": "^0.3.2", "elementtree": "^0.1.7", "endent": "^2.1.0", "fast-glob": "^3.3.3", "plist": "^3.1.0" } }, "sha512-16WPC1DuxVdshV3RoQUXqhcJVdhxWGwiFysA4TkYuboqoev6mgt0JuIJFxmQbzR/DuyuONaVe0L0O0Hf1C08Mg=="], + + "cordova-fetch/cordova-common": ["cordova-common@6.0.0", "", { "dependencies": { "@netflix/nerror": "^1.1.3", "ansi": "^0.3.1", "bplist-parser": "^0.3.2", "elementtree": "^0.1.7", "endent": "^2.1.0", "fast-glob": "^3.3.3", "plist": "^3.1.0" } }, "sha512-16WPC1DuxVdshV3RoQUXqhcJVdhxWGwiFysA4TkYuboqoev6mgt0JuIJFxmQbzR/DuyuONaVe0L0O0Hf1C08Mg=="], + + "cordova-fetch/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "cordova-fetch/which": ["which@5.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ=="], + + "cordova-lib/cordova-common": ["cordova-common@6.0.0", "", { "dependencies": { "@netflix/nerror": "^1.1.3", "ansi": "^0.3.1", "bplist-parser": "^0.3.2", "elementtree": "^0.1.7", "endent": "^2.1.0", "fast-glob": "^3.3.3", "plist": "^3.1.0" } }, "sha512-16WPC1DuxVdshV3RoQUXqhcJVdhxWGwiFysA4TkYuboqoev6mgt0JuIJFxmQbzR/DuyuONaVe0L0O0Hf1C08Mg=="], + + "cordova-lib/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "cordova-lib/write-file-atomic": ["write-file-atomic@7.0.0", "", { "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" } }, "sha512-YnlPC6JqnZl6aO4uRc+dx5PHguiR9S6WeoLtpxNT9wIG+BDya7ZNE1q7KOjVgaA73hKhKLpVPgJ5QA9THQ5BRg=="], + + "cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "bin/node-which" } }, ""], + + "css-loader/semver": ["semver@7.5.4", "", { "dependencies": { "lru-cache": "^6.0.0" }, "bin": "bin/semver.js" }, ""], + + "dom-serializer/domelementtype": ["domelementtype@2.3.0", "", {}, "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw=="], + + "dom-serializer/entities": ["entities@2.2.0", "", {}, "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A=="], + + "endent/dedent": ["dedent@0.7.0", "", {}, ""], + + "esrecurse/estraverse": ["estraverse@5.3.0", "", {}, ""], + + "fdir/picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="], + + "glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, ""], + + "hosted-git-info/lru-cache": ["lru-cache@11.2.2", "", {}, "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg=="], + + "htmlparser2/entities": ["entities@1.0.0", "", {}, "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ=="], + + "htmlparser2/readable-stream": ["readable-stream@1.1.14", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", "isarray": "0.0.1", "string_decoder": "~0.10.x" } }, "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ=="], + + "is-plain-object/isobject": ["isobject@3.0.1", "", {}, "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg=="], + + "jshint/minimatch": ["minimatch@3.0.8", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q=="], + + "minipass-flush/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], + + "minipass-pipeline/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], + + "minipass-sized/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], + + "node-gyp/nopt": ["nopt@9.0.0", "", { "dependencies": { "abbrev": "^4.0.0" }, "bin": "bin/nopt.js" }, "sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw=="], + + "node-gyp/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "node-gyp/which": ["which@6.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg=="], + + "npm-install-checks/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "npm-package-arg/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "npm-pick-manifest/semver": ["semver@7.7.3", "", { "bin": "bin/semver.js" }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "parse-conflict-json/json-parse-even-better-errors": ["json-parse-even-better-errors@5.0.0", "", {}, "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ=="], + + "path-scurry/lru-cache": ["lru-cache@11.2.2", "", {}, "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg=="], + + "pkg-dir/find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, ""], + + "postcss-loader/semver": ["semver@7.5.4", "", { "dependencies": { "lru-cache": "^6.0.0" }, "bin": "bin/semver.js" }, ""], + + "raw-loader/schema-utils": ["schema-utils@3.1.1", "", { "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } }, ""], + + "regjsparser/jsesc": ["jsesc@3.0.2", "", { "bin": "bin/jsesc" }, "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g=="], + + "resolve-cwd/resolve-from": ["resolve-from@5.0.0", "", {}, ""], + + "string-width/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="], + + "tar/yallist": ["yallist@5.0.0", "", {}, "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw=="], + + "terser/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], + + "tinyglobby/picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="], + + "webpack/mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="], + + "wrap-ansi/string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + + "wrap-ansi/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="], + + "@npmcli/arborist/nopt/abbrev": ["abbrev@4.0.0", "", {}, "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA=="], + + "@npmcli/git/which/isexe": ["isexe@3.1.1", "", {}, "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ=="], + + "@npmcli/promise-spawn/which/isexe": ["isexe@3.1.1", "", {}, "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ=="], + + "@npmcli/run-script/which/isexe": ["isexe@3.1.1", "", {}, "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ=="], + + "@tufjs/models/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="], + + "bin-links/write-file-atomic/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], + + "cliui/string-width/emoji-regex": ["emoji-regex@10.4.0", "", {}, "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw=="], + + "cordova-fetch/which/isexe": ["isexe@3.1.1", "", {}, "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ=="], + + "cordova-lib/write-file-atomic/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], + + "cordova/nopt/abbrev": ["abbrev@4.0.0", "", {}, "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA=="], + + "cross-spawn/which/isexe": ["isexe@2.0.0", "", {}, ""], + + "css-loader/semver/lru-cache": ["lru-cache@6.0.0", "", { "dependencies": { "yallist": "^4.0.0" } }, ""], + + "glob/minimatch/brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + + "htmlparser2/readable-stream/isarray": ["isarray@0.0.1", "", {}, "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ=="], + + "htmlparser2/readable-stream/string_decoder": ["string_decoder@0.10.31", "", {}, "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ=="], + + "minipass-flush/minipass/yallist": ["yallist@4.0.0", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="], + + "minipass-pipeline/minipass/yallist": ["yallist@4.0.0", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="], + + "minipass-sized/minipass/yallist": ["yallist@4.0.0", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="], + + "node-gyp/nopt/abbrev": ["abbrev@4.0.0", "", {}, "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA=="], + + "node-gyp/which/isexe": ["isexe@3.1.1", "", {}, "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ=="], + + "pkg-dir/find-up/locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, ""], + + "postcss-loader/semver/lru-cache": ["lru-cache@6.0.0", "", { "dependencies": { "yallist": "^4.0.0" } }, ""], + + "raw-loader/schema-utils/ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, ""], + + "raw-loader/schema-utils/ajv-keywords": ["ajv-keywords@3.5.2", "", { "peerDependencies": { "ajv": "^6.9.1" } }, ""], + + "string-width/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], + + "webpack/mime-types/mime-db": ["mime-db@1.52.0", "", {}, ""], + + "wrap-ansi/string-width/emoji-regex": ["emoji-regex@10.4.0", "", {}, "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw=="], + + "wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], + + "css-loader/semver/lru-cache/yallist": ["yallist@4.0.0", "", {}, ""], + + "pkg-dir/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, ""], + + "postcss-loader/semver/lru-cache/yallist": ["yallist@4.0.0", "", {}, ""], + + "raw-loader/schema-utils/ajv/json-schema-traverse": ["json-schema-traverse@0.4.1", "", {}, ""], + + "pkg-dir/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, ""], + } +} diff --git a/config.xml b/config.xml index 16918d5f3..591b89b1a 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - @@ -22,9 +22,6 @@ - - - @@ -32,16 +29,22 @@ - - + + + - + + + + + + @@ -50,24 +53,26 @@ - - + + + + + + + + + + - - - - - - - - - + + + diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt new file mode 100644 index 000000000..a63f7c008 --- /dev/null +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -0,0 +1,40 @@ +Welcome to Acode! + +A powerful, lightweight code editor, and web IDE for Android. Now enhanced with cutting-edge features and updates to transform your coding experience. + +What's New? + +Step into the future of coding with our innovative Plugin System. This brand new feature supports a wide range of plugins, boosting the functionality of Acode to meet all your development needs. With over 30 plugins already available in the Plugin Store, the possibilities are endless. + +Latest Updates Include: + +- Enhanced Ace Editor: Now updated to version 1.22.0 for more efficient editing. +- Search in All Files: Our beta feature lets you search and replace text in all files within your opened projects. +- Customizable Quick Tools: Personalize your quick tools to enhance your workflow. +- Fast File Listing in Find Files (Ctrl + P): Acode now loads and caches files at startup, leading to faster file listing. +- Ctrl Key Functionality: Take advantage of keyboard shortcuts for actions such as save (Ctrl+S) and open command palette (Ctrl+Shift+P). + +Why Choose Acode? + +Acode lets you build and run websites directly within your browser, debug with ease using the integrated console, and edit a wide range of source files - from Python and CSS to Java, JavaScript, Dart, and more. + +Key Features: + +- Universal File Editor: Edit any file directly from your device. +- GitHub Integration: Seamlessly sync your projects with GitHub. +- FTP/SFTP Support: Manage your files efficiently with FTP/SFTP. +- Extensive Syntax Highlighting: Supports over 100 programming languages. +- Personalized Themes: Choose from dozens of unique themes to match your style. +- User-Friendly Interface: Navigate with ease through our intuitive design. +- In-App Preview: Instantly view your HTML/MarkDown files within the app. +- Interactive JavaScript Console: Debug JavaScript code right from the console. +- In-App File Browser: Access your files directly within Acode. +- Open Source: Benefit from our transparent and community-driven project. +- High Performance: Supports files with over 50,000 lines, ensuring smooth workflow. +- Multi-File Support: Work on multiple files simultaneously for productive multitasking. +- Customizable Interface: Adapt Acode to your personal coding style. +- Keyboard Shortcuts: Speed up your coding with handy shortcuts. +- File Recovery: Never lose your work with our reliable file recovery feature. +- File Management: Keep your projects organized with effective file management. + +Start your streamlined coding journey with Acode today. Join our ever-growing community of developers and experience the difference for yourself! \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png new file mode 100644 index 000000000..18046a82b Binary files /dev/null and b/fastlane/metadata/android/en-US/images/icon.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png new file mode 100644 index 000000000..44a0fa09e Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png new file mode 100644 index 000000000..a454ea880 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png new file mode 100644 index 000000000..db83a538e Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png new file mode 100644 index 000000000..78a907c21 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png new file mode 100644 index 000000000..6a46586cf Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png new file mode 100644 index 000000000..de4505c6c Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/7.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/7.png new file mode 100644 index 000000000..a61b3651c Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/7.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/8.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/8.png new file mode 100644 index 000000000..1d1e005fc Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/8.png differ diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt new file mode 100644 index 000000000..6910feedd --- /dev/null +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -0,0 +1 @@ +A lightweight but powerful text/code editor. \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt new file mode 100644 index 000000000..fac58fc6b --- /dev/null +++ b/fastlane/metadata/android/en-US/title.txt @@ -0,0 +1 @@ +Acode editor - Android code editor \ No newline at end of file diff --git a/hooks/add-input-type.js b/hooks/add-input-type.js deleted file mode 100644 index 6050f63a2..000000000 --- a/hooks/add-input-type.js +++ /dev/null @@ -1,229 +0,0 @@ -const path = require('path'); -const fs = require('fs'); -const prettier = require('prettier'); - -const flagFile = path.resolve(__dirname, '../platforms/android/.flag_done'); -if (fs.existsSync(flagFile)) { - return; -} - -const base = path.resolve(__dirname, `../platforms/android/CordovaLib/src/org/apache/cordova`); -const files = { - 'SystemWebView.java': `${base}/engine/SystemWebView.java`, - 'SystemWebViewEngine.java': `${base}/engine/SystemWebViewEngine.java`, - 'CordovaWebViewEngine.java': `${base}/CordovaWebViewEngine.java`, - 'CordovaWebView.java': `${base}/CordovaWebView.java`, - 'CordovaWebViewImpl.java': `${base}/CordovaWebViewImpl.java`, -}; - -const interfaceMethod = { - name: 'setInputType', - modifier: 'public', - returnType: 'void', - params: [ - { - type: 'int', - name: 'type', - } - ], -}; - -const setInputTypeMethod = { - name: 'setInputType', - modifier: 'public', - returnType: 'void', - params: [ - { - type: 'int', - name: 'type', - } - ], - body: ['webView.setInputType(type);'], -}; - -const contentToAdd = { - 'SystemWebView.java': { - 'import': [ - 'android.text.InputType', - 'android.view.inputmethod.InputConnection', - 'android.view.inputmethod.EditorInfo', - ], - 'feilds': [ - { - type: 'int', - name: 'type', - modifier: 'private', - value: 'InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL', - } - ], - methods: [ - { - ...setInputTypeMethod, - body: [`this.type = type;`] - }, - { - name: 'onCreateInputConnection', - modifier: 'public', - returnType: 'InputConnection', - params: [ - { - type: 'EditorInfo', - name: 'outAttrs', - } - ], - body: [ - `InputConnection ic = super.onCreateInputConnection(outAttrs);`, - `outAttrs.inputType = this.type;`, - `return ic;`, - ], - notation: '@Override', - } - ] - }, - 'SystemWebViewEngine.java': { - methods: [ - setInputTypeMethod - ] - }, - 'CordovaWebViewEngine.java': { - methods: [ - interfaceMethod - ] - }, - 'CordovaWebView.java': { - methods: [ - interfaceMethod - ] - }, - 'CordovaWebViewImpl.java': { - methods: [ - { - ...setInputTypeMethod, - body: [`engine.setInputType(type);`] - } - ] - } -} - -const fileContent = {}; - -for (let file in files) { - fileContent[file] = fs.readFileSync(files[file], 'utf8'); -} - -for (let file in contentToAdd) { - const content = fileContent[file]; - const contentToAddTo = contentToAdd[file]; - let newContent = prettier.format(removeComments(content), { - parser: 'java', - printWidth: Infinity - }); - if (contentToAddTo.import) { - const imports = contentToAddTo.import.map(importStr => { - return `import ${importStr};`; - }).join('\n'); - - newContent = newContent.replace( - /^(\s*)(import.*;)/m, - `$1${imports}\n$2` - ); - } - if (contentToAddTo.feilds) { - const feilds = contentToAddTo.feilds.map(feild => { - return getFeildString(feild); - }).join('\n'); - newContent = newContent.replace( - /^(\s*)(\w+\s+\w+\s*;)/m, - `$1${feilds}\n$2` - ); - } - if (contentToAddTo.methods) { - const methods = contentToAddTo.methods.map(method => { - return getMethodString(method); - }).join('\n'); - - if (isInterface(file, content)) { - const regex = getInterfaceDeclarationRegex(file); - newContent = newContent.replace( - regex, - `$1${methods}\n$2` - ); - } else { - let regex = getConstructorRegex(file); - if (regex.test(newContent)) { - newContent = newContent.replace( - regex, - `$1${methods}\n$2` - ); - } else { - regex = getClassDeclarationRegex(file); - newContent = newContent.replace( - regex, - `$1${methods}\n$2` - ); - } - } - } - - newContent = prettier.format(newContent, { - parser: 'java', - tabWidth: 2, - printWidth: Infinity, - }); - fs.writeFile(files[file], newContent, err => { - if (err) { - console.log(err); - process.exit(1); - } - - console.log(`${files[file]} updated`); - }); -} - -fs.writeFile(flagFile, '', err => { - if (err) { - console.log(err); - process.exit(1); - } - - console.log(`${flagFile} updated`); -}); - -function getMethodString(method) { - const params = method.params.map(param => { - return `${param.type} ${param.name}`; - }).join(', '); - - let str = `${method.modifier} ${method.returnType} ${method.name}(${params})`; - if (method.notation) { - str = `\n${method.notation}\n${str}`; - } - if (method.body) { - return str + `{${method.body.join('')}}`; - } - return str + ';'; -} - -function getFeildString(feild) { - return `${feild.modifier} ${feild.type} ${feild.name}${feild.value ? ` = ${feild.value}` : ''};`; -} - -function isInterface(filename, content) { - return content.indexOf(`interface ${filename.split('.')[0]}`) > -1; -} - -function getConstructorRegex(filename) { - return new RegExp(`([^]*${filename.split('.')[0]}\\s*\\(.*\\)\\s*{[^}]*})([^]*)`, 'm'); -} - -function getInterfaceDeclarationRegex(filename) { - return new RegExp(`([^]*interface\\s+${filename.split('.')[0]}[\\s\\w]*{)([^]*})`, 'm'); -} - -function getClassDeclarationRegex(filename) { - return new RegExp(`([^]*class\\s+${filename.split('.')[0]}[\\s\\w]*{)([^]*})`, 'm'); -} - -function removeComments(content) { - return content.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm, ''); -} \ No newline at end of file diff --git a/hooks/modify-java-files.js b/hooks/modify-java-files.js new file mode 100644 index 000000000..7cf9e06b3 --- /dev/null +++ b/hooks/modify-java-files.js @@ -0,0 +1,257 @@ +const path = require('path'); +const fs = require('fs'); +const prettier = require('prettier'); + +main(); + +async function main() { + const flagFile = path.resolve(__dirname, '../platforms/android/.flag_done'); + if (fs.existsSync(flagFile)) { + return; + } + + const base = path.resolve(__dirname, `../platforms/android/CordovaLib/src/org/apache/cordova`); + const files = { + 'SystemWebView.java': `${base}/engine/SystemWebView.java`, + 'SystemWebViewEngine.java': `${base}/engine/SystemWebViewEngine.java`, + 'CordovaWebViewEngine.java': `${base}/CordovaWebViewEngine.java`, + 'CordovaWebView.java': `${base}/CordovaWebView.java`, + 'CordovaWebViewImpl.java': `${base}/CordovaWebViewImpl.java`, + }; + + const interfaceMethod = { + name: 'setInputType', + modifier: 'public', + returnType: 'void', + params: [ + { + type: 'int', + name: 'type', + } + ], + }; + + const setInputTypeMethod = { + name: 'setInputType', + modifier: 'public', + returnType: 'void', + params: [ + { + type: 'int', + name: 'type', + } + ], + body: ['webView.setInputType(type);'], + }; + + const contentToAdd = { + 'SystemWebView.java': { + 'import': [ + 'android.text.InputType', + 'android.view.inputmethod.InputConnection', + 'android.view.inputmethod.EditorInfo', + ], + 'fields': [ + { + type: 'int', + name: 'type', + modifier: 'private', + value: '-1', + }, + { + type: 'int', + name: 'NO_SUGGESTIONS', + modifier: 'private', + value: '0', + }, + { + type: 'int', + name: 'NO_SUGGESTIONS_AGGRESSIVE', + modifier: 'private', + value: '1', + }, + ], + methods: [ + { + ...setInputTypeMethod, + body: [`this.type = type;`] + }, + { + name: 'onCreateInputConnection', + modifier: 'public', + returnType: 'InputConnection', + params: [ + { + type: 'EditorInfo', + name: 'outAttrs', + } + ], + body: [ + `InputConnection ic = super.onCreateInputConnection(outAttrs); + if (type == NO_SUGGESTIONS) { + outAttrs.inputType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS; + } else if (type == NO_SUGGESTIONS_AGGRESSIVE) { + outAttrs.inputType = + InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | + InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD; + } else { + outAttrs.inputType |= InputType.TYPE_NULL; + } + + return ic;`, + ], + notation: '@Override', + }, + ] + }, + 'SystemWebViewEngine.java': { + methods: [ + setInputTypeMethod + ] + }, + 'CordovaWebViewEngine.java': { + methods: [ + interfaceMethod + ] + }, + 'CordovaWebView.java': { + methods: [ + interfaceMethod + ] + }, + 'CordovaWebViewImpl.java': { + methods: [ + { + ...setInputTypeMethod, + body: [`engine.setInputType(type);`] + } + ] + } + }; + + const fileContent = {}; + + for (let file in files) { + fileContent[file] = fs.readFileSync(files[file], 'utf8'); + } + + for (let file in contentToAdd) { + const content = fileContent[file]; + const contentToAddTo = contentToAdd[file]; + const text = removeComments(content); + let newContent = await format(text); + if (contentToAddTo.import) { + const imports = contentToAddTo.import.map(importStr => { + return `import ${importStr};`; + }).join('\n'); + + newContent = newContent.replace( + /^(\s*)(import.*;)/m, + `$1${imports}\n$2` + ); + } + if (contentToAddTo.fields) { + const fields = contentToAddTo.fields.map(field => { + return getFieldString(field); + }).join('\n'); + newContent = newContent.replace( + /^(\s*)(\w+\s+\w+\s*;)/m, + `$1${fields}\n$2` + ); + } + if (contentToAddTo.methods) { + const methods = contentToAddTo.methods.map(method => { + return getMethodString(method); + }).join('\n'); + + if (isInterface(file, content)) { + const regex = getInterfaceDeclarationRegex(file); + newContent = newContent.replace( + regex, + `$1${methods}\n$2` + ); + } else { + let regex = getConstructorRegex(file); + if (regex.test(newContent)) { + newContent = newContent.replace( + regex, + `$1${methods}\n$2` + ); + } else { + regex = getClassDeclarationRegex(file); + newContent = newContent.replace( + regex, + `$1${methods}\n$2` + ); + } + } + } + + newContent = await format(newContent); + fs.writeFile(files[file], newContent, err => { + if (err) { + console.log(err); + process.exit(1); + } + + console.log(`${files[file]} updated`); + }); + } + + fs.writeFile(flagFile, '', err => { + if (err) { + console.log(err); + process.exit(1); + } + + console.log(`${flagFile} updated`); + }); + + async function format(content) { + return prettier.format(content, { + plugins: ['prettier-plugin-java'], + parser: 'java', + tabWidth: 2, + printWidth: Infinity + }); + } + + function getMethodString(method) { + const params = method.params.map(param => { + return `${param.type} ${param.name}`; + }).join(', '); + + let str = `${method.modifier} ${method.returnType} ${method.name}(${params})`; + if (method.notation) { + str = `\n${method.notation}\n${str}`; + } + if (method.body) { + return str + `{${method.body.join('')}}`; + } + return str + ';'; + } + + function getFieldString(field) { + return `${field.modifier} ${field.type} ${field.name}${field.value ? ` = ${field.value}` : ''};`; + } + + function isInterface(filename, content) { + return content.indexOf(`interface ${filename.split('.')[0]}`) > -1; + } + + function getConstructorRegex(filename) { + return new RegExp(`([^]*${filename.split('.')[0]}\\s*\\(.*\\)\\s*{[^}]*})([^]*)`, 'm'); + } + + function getInterfaceDeclarationRegex(filename) { + return new RegExp(`([^]*interface\\s+${filename.split('.')[0]}[\\s\\w]*{)([^]*})`, 'm'); + } + + function getClassDeclarationRegex(filename) { + return new RegExp(`([^]*class\\s+${filename.split('.')[0]}[\\s\\w]*{)([^]*})`, 'm'); + } + + function removeComments(content) { + return content.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm, ''); + } +} \ No newline at end of file diff --git a/hooks/post-process.js b/hooks/post-process.js index f9e25f450..e0b7f5a08 100644 --- a/hooks/post-process.js +++ b/hooks/post-process.js @@ -1,32 +1,279 @@ +/* eslint-disable no-console */ const path = require('path'); const fs = require('fs'); +const { execSync } = require('child_process'); -const resPath = path.resolve( +const buildFilePath = path.resolve(__dirname, '../build.json'); +const copyToPath = path.resolve(__dirname, '../platforms/android/build.json'); +const gradleFilePath = path.resolve(__dirname, '../build-extras.gradle'); +const androidGradleFilePath = path.resolve( __dirname, - '../platforms/android/app/src/main/res/' + '../platforms/android/app/build-extras.gradle' ); +const resPath = path.resolve(__dirname, '../platforms/android/app/src/main/res/'); +const localResPath = path.resolve(__dirname, '../res/android/'); -const splashScreens = [ - 'drawable-land-hdpi', - 'drawable-land-ldpi', - 'drawable-land-mdpi', - 'drawable-land-xhdpi', - 'drawable-land-xxhdpi', - 'drawable-land-xxxhdpi', - 'drawable-port-hdpi', - 'drawable-port-ldpi', - 'drawable-port-mdpi', - 'drawable-port-xhdpi', - 'drawable-port-xxhdpi', - 'drawable-port-xxxhdpi', -]; - -for (let splashScreen of splashScreens) { - const file = path.join(resPath, splashScreen); - if (fs.existsSync(file)) { - fs.rmdirSync(file, { - recursive: true, +if ( + !fs.existsSync(copyToPath) + && fs.existsSync(buildFilePath) +) fs.copyFileSync(buildFilePath, copyToPath); + +if (fs.existsSync(androidGradleFilePath)) fs.unlinkSync(androidGradleFilePath); +fs.copyFileSync(gradleFilePath, androidGradleFilePath); + +deleteDirRecursively(resPath, [ + path.join('values', 'strings.xml'), + path.join('values', 'colors.xml'), + path.join('values', 'styles.xml'), + 'anim', + 'xml', +]); +copyDirRecursively(localResPath, resPath); +enableLegacyJni(); +enableStaticContext(); +patchTargetSdkVersion(); + + +function getTmpDir() { + const tmpdirEnv = process.env.TMPDIR; + + if (tmpdirEnv) { + try { + fs.accessSync(tmpdirEnv, fs.constants.R_OK | fs.constants.W_OK); + return tmpdirEnv; + } catch { + // TMPDIR exists but not accessible + } + } + + try { + fs.accessSync("/tmp", fs.constants.R_OK | fs.constants.W_OK); + return "/tmp"; + } catch { + console.log("Error: No usable temporary directory found (TMPDIR or /tmp not accessible)."); + return null; + // process.exit(1); + } +} + +function patchTargetSdkVersion() { + const prefix = execSync('npm prefix').toString().trim(); + const gradleFile = path.join(prefix, 'platforms/android/app/build.gradle'); + + if (!fs.existsSync(gradleFile)) { + console.warn('[Cordova Hook] ⚠️ build.gradle not found'); + return; + } + + let content = fs.readFileSync(gradleFile, 'utf-8'); + + const sdkRegex = /targetSdkVersion\s+(cordovaConfig\.SDK_VERSION|\d+)/; + + if (sdkRegex.test(content)) { + let api = "35"; + const tmp = getTmpDir(); + if (tmp == null) { + console.warn("---------------------------------------------------------------------------------\n\n\n\n"); + console.warn(`⚠️ fdroid.bool not found`); + console.warn("⚠️ Fdroid flavour will be built"); + api = "28"; + console.warn("\n\n\n\n---------------------------------------------------------------------------------"); + } else { + const froidFlag = path.join(getTmpDir(), 'fdroid.bool'); + + if (fs.existsSync(froidFlag)) { + const fdroid = fs.readFileSync(froidFlag, 'utf-8').trim(); + if (fdroid == "true") { + api = "28"; + } + } else { + console.warn("---------------------------------------------------------------------------------\n\n\n\n"); + console.warn(`⚠️ fdroid.bool not found`); + console.warn("⚠️ Fdroid flavour will be built"); + api = "28"; + console.warn("\n\n\n\n---------------------------------------------------------------------------------"); + //process.exit(1); + } + } + + + content = content.replace(sdkRegex, 'targetSdkVersion ' + api); + fs.writeFileSync(gradleFile, content, 'utf-8'); + console.log('[Cordova Hook] ✅ Patched targetSdkVersion to ' + api); + } else { + console.warn('[Cordova Hook] ⚠️ targetSdkVersion not found'); + } +} + + +function enableLegacyJni() { + const prefix = execSync('npm prefix').toString().trim(); + const gradleFile = path.join(prefix, 'platforms/android/app/build.gradle'); + + if (!fs.existsSync(gradleFile)) return; + + let content = fs.readFileSync(gradleFile, 'utf-8'); + // Check for correct block to avoid duplicate insertion + if (content.includes('useLegacyPackaging = true')) return; + + // Inject under android block with correct Groovy syntax + content = content.replace(/android\s*{/, match => { + return ( + match + + ` + packagingOptions { + jniLibs { + useLegacyPackaging = true + } + }` + ); + }); + + fs.writeFileSync(gradleFile, content, 'utf-8'); + console.log('[Cordova Hook] ✅ Enabled legacy JNI packaging'); +} + +function enableStaticContext() { + try { + const prefix = execSync('npm prefix').toString().trim(); + const mainActivityPath = path.join( + prefix, + 'platforms/android/app/src/main/java/com/foxdebug/acode/MainActivity.java' + ); + + if (!fs.existsSync(mainActivityPath)) { + return; + } + + let content = fs.readFileSync(mainActivityPath, 'utf-8'); + + // Skip if fully patched + if ( + content.includes('WeakReference') && + content.includes('public static Context getContext()') && + content.includes('weakContext = new WeakReference<>(this);') + ) { + return; + } + + // Add missing imports + if (!content.includes('import java.lang.ref.WeakReference;')) { + content = content.replace( + /import org\.apache\.cordova\.\*;/, + match => + match + + '\nimport android.content.Context;\nimport java.lang.ref.WeakReference;' + ); + } + + // Inject static field and method into class body + content = content.replace( + /public class MainActivity extends CordovaActivity\s*\{/, + match => + match + + `\n\n private static WeakReference weakContext;\n\n` + + ` public static Context getContext() {\n` + + ` return weakContext != null ? weakContext.get() : null;\n` + + ` }\n` + ); + + // Insert weakContext assignment inside onCreate + content = content.replace( + /super\.onCreate\(savedInstanceState\);/, + `super.onCreate(savedInstanceState);\n weakContext = new WeakReference<>(this);` + ); + + fs.writeFileSync(mainActivityPath, content, 'utf-8'); + } catch (err) { + console.error('[Cordova Hook] ❌ Failed to patch MainActivity:', err.message); + } +} + + +/** + * Copy directory recursively + * @param {string} src Source directory + * @param {string} dest Destination directory + * @param {string[]} skip Files to not copy + */ +function copyDirRecursively(src, dest, skip = [], currPath = '') { + const exists = fs.existsSync(src); + const stats = exists && fs.statSync(src); + const isDirectory = exists && stats.isDirectory(); + + if (!exists) { + console.log(`File ${src} does not exist`); + return; + } + + if (!fs.existsSync(dest) && isDirectory) { + fs.mkdirSync(dest); + } + + if (exists && isDirectory) { + fs.mkdirSync(dest, { recursive: true }); + fs.readdirSync(src).forEach((childItemName) => { + const relativePath = path.join(currPath, childItemName); + if (childItemName.startsWith('.')) return; + if (skip.includes(childItemName) || skip.includes(relativePath)) return; + copyDirRecursively( + path.join(src, childItemName), + path.join(dest, childItemName), + skip, + childItemName, + ); }); - console.log('Removed: ', splashScreen); + } else { + fs.copyFileSync(src, dest); + + // log + const message = `copied: ${path.basename(src)}`; + console.log('\x1b[32m%s\x1b[0m', message); // green + } +} + +/** + * Delete directory recursively + * @param {string} dir Directory to delete + * @param {string[]} except Files to not delete + */ +function deleteDirRecursively(dir, except = [], currPath = '') { + const exists = fs.existsSync(dir); + const stats = exists && fs.statSync(dir); + const isDirectory = exists && stats.isDirectory(); + + if (!exists) { + console.log(`File ${dir} does not exist`); + return; + } + + if (exists && isDirectory) { + let deleteDir = true; + fs.readdirSync(dir).forEach((childItemName) => { + const relativePath = path.join(currPath, childItemName); + if ( + childItemName.startsWith('.') + || except.includes(childItemName) + || except.includes(relativePath) + ) { + console.log('\x1b[33m%s\x1b[0m', `skipped: ${relativePath}`); // yellow + deleteDir = false; + return; + } + + deleteDirRecursively( + path.join(dir, childItemName), + except, + childItemName, + ); + }); + + if (deleteDir) { + console.log('\x1b[31m%s\x1b[0m', `deleted: ${currPath || path.basename(dir)}`); // red + fs.rmSync(dir, { recursive: true }); + } + } else { + console.log('\x1b[31m%s\x1b[0m', `deleted: ${currPath || path.basename(dir)}`); // red + fs.rmSync(dir); } } diff --git a/jsconfig.json b/jsconfig.json index fe933ab9b..89b465f62 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,8 +1,13 @@ { - "exclude": [ - "**/node_modules", - "**/platforms", - "**/plugings", - "**/www" - ] -} \ No newline at end of file + "exclude": ["**/node_modules", "**/platforms", "**/www", "www/js/ace/**/*"], + "compilerOptions": { + "baseUrl": "./src", + "paths": { + "*": ["*"] + } + }, + "include": ["src/**/*"], + "typeAcquisition": { + "enable": true + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..a1e7dd570 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8815 @@ +{ + "name": "com.foxdebug.acode", + "version": "1.11.7", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "com.foxdebug.acode", + "version": "1.11.7", + "license": "MIT", + "dependencies": { + "@deadlyjack/ajax": "^1.2.6", + "@ungap/custom-elements": "^1.3.0", + "@xterm/addon-attach": "^0.11.0", + "@xterm/addon-fit": "^0.10.0", + "@xterm/addon-image": "^0.8.0", + "@xterm/addon-search": "^0.15.0", + "@xterm/addon-unicode11": "^0.8.0", + "@xterm/addon-web-links": "^0.11.0", + "@xterm/addon-webgl": "^0.18.0", + "@xterm/xterm": "^5.5.0", + "autosize": "^6.0.1", + "cordova": "13.0.0", + "core-js": "^3.45.0", + "crypto-js": "^4.2.0", + "dompurify": "^3.2.6", + "escape-string-regexp": "^5.0.0", + "esprima": "^4.0.1", + "filesize": "^11.0.2", + "html-tag-js": "^2.4.15", + "js-base64": "^3.7.7", + "jszip": "^3.10.1", + "markdown-it": "^14.1.0", + "markdown-it-anchor": "^9.2.0", + "markdown-it-footnote": "^4.0.0", + "markdown-it-github-alerts": "^1.0.0", + "markdown-it-task-lists": "^2.1.1", + "mime-types": "^3.0.1", + "minimatch": "^10.0.3", + "moment": "^2.30.1", + "mustache": "^4.2.0", + "url-parse": "^1.5.10", + "vanilla-picker": "^2.12.3", + "yargs": "^18.0.0" + }, + "devDependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-runtime": "^7.28.0", + "@babel/preset-env": "^7.28.0", + "@babel/runtime": "^7.28.2", + "@babel/runtime-corejs3": "^7.28.2", + "@biomejs/biome": "2.1.4", + "@types/ace": "^0.0.52", + "@types/url-parse": "^1.4.11", + "autoprefixer": "^10.4.21", + "babel-loader": "^10.0.0", + "com.foxdebug.acode.rk.customtabs": "file:src/plugins/custom-tabs", + "com.foxdebug.acode.rk.exec.proot": "file:src/plugins/proot", + "com.foxdebug.acode.rk.exec.terminal": "file:src/plugins/terminal", + "cordova-android": "^14.0.1", + "cordova-clipboard": "^1.3.0", + "cordova-plugin-advanced-http": "^3.3.1", + "cordova-plugin-browser": "file:src/plugins/browser", + "cordova-plugin-buildinfo": "file:src/plugins/cordova-plugin-buildinfo", + "cordova-plugin-device": "^2.0.3", + "cordova-plugin-file": "^8.0.1", + "cordova-plugin-ftp": "file:src/plugins/ftp", + "cordova-plugin-iap": "file:src/plugins/iap", + "cordova-plugin-sdcard": "file:src/plugins/sdcard", + "cordova-plugin-server": "file:src/plugins/server", + "cordova-plugin-sftp": "file:src/plugins/sftp", + "cordova-plugin-system": "file:src/plugins/system", + "cordova-plugin-websocket": "file:src/plugins/websocket", + "css-loader": "^7.1.2", + "mini-css-extract-plugin": "^2.9.3", + "path-browserify": "^1.0.1", + "postcss-loader": "^8.1.1", + "prettier": "^3.6.2", + "prettier-plugin-java": "^2.7.4", + "raw-loader": "^4.0.2", + "sass": "^1.90.0", + "sass-loader": "^16.0.5", + "style-loader": "^4.0.0", + "terminal": "^0.1.4", + "webpack": "^5.101.0", + "webpack-cli": "^6.0.1" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz", + "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.0.tgz", + "integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.6", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.0", + "@babel/types": "^7.28.0", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", + "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.0", + "@babel/types": "^7.28.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz", + "integrity": "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.3" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.27.1.tgz", + "integrity": "sha512-QwGAmuvM17btKU5VqXfb+Giw4JcN0hjuufz3DYnpeVDvZLAObloM77bhMXiqry3Iio+Ai4phVRDwl6WU10+r5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-optimise-call-expression": "^7.27.1", + "@babel/helper-replace-supers": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/traverse": "^7.27.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.27.1.tgz", + "integrity": "sha512-uVDC72XVf8UbrH5qQTc18Agb8emwjTiZrQE11Nv3CuBEZmVvTwwE9CBUEvHku06gQCAyYf8Nv6ja1IN+6LMbxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.1", + "regexpu-core": "^6.2.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.5.tgz", + "integrity": "sha512-uJnGFcPsWQK8fvjgGP5LZUZZsYGIoPeRjSF5PGwrelYgq7Q15/Ft9NGFp1zglwgIv//W0uG4BevRuSJRyylZPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-plugin-utils": "^7.27.1", + "debug": "^4.4.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.22.10" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz", + "integrity": "sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz", + "integrity": "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.27.1.tgz", + "integrity": "sha512-7fiA521aVw8lSPeI4ZOD3vRFkoqkJcS+z4hFo82bFSH/2tNd6eJ5qCVMS5OzDmZh/kaHQeBaeyxK6wljcPtveA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-wrap-function": "^7.27.1", + "@babel/traverse": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz", + "integrity": "sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-optimise-call-expression": "^7.27.1", + "@babel/traverse": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz", + "integrity": "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.27.1.tgz", + "integrity": "sha512-NFJK2sHUvrjo8wAU/nQTWU890/zB2jj0qBcCbZbbf+005cAsv6tMjXz31fBign6M5ov1o0Bllu+9nbqkfsjjJQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.27.1", + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz", + "integrity": "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.27.1.tgz", + "integrity": "sha512-QPG3C9cCVRQLxAVwmefEmwdTanECuUBMQZ/ym5kiw3XKCGA7qkuQLcjWWHcrD/GKbn/WmJwaezfuuAOcyKlRPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.27.1.tgz", + "integrity": "sha512-qNeq3bCKnGgLkEXUuFry6dPlGfCdQNZbn7yUAPCInwAJHMU7THJfrBSozkcWq5sNM6RcF3S8XyQL2A52KNR9IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.27.1.tgz", + "integrity": "sha512-g4L7OYun04N1WyqMNjldFwlfPCLVkgB54A/YCXICZYBsvJJE3kByKv9c9+R/nAfmIfjl2rKYLNyMHboYbZaWaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.27.1.tgz", + "integrity": "sha512-oO02gcONcD5O1iTLi/6frMJBIwWEHceWGSGqrpCmEL8nogiS6J9PBlE48CaK20/Jx1LuRml9aDftLgdjXT8+Cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", + "@babel/plugin-transform-optional-chaining": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.27.1.tgz", + "integrity": "sha512-6BpaYGDavZqkI6yT+KSPdpZFfpnd68UKXbcjI9pJ13pvHhPrCKWOOLp+ysvMeA+DxnhuPpgIaRpxRxo5A9t5jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.27.1.tgz", + "integrity": "sha512-UT/Jrhw57xg4ILHLFnzFpPDlMbcdEicaAtjPQpbj9wa8T4r5KVWCimHcL/460g8Ht0DMxDyjsLgiWSkVjnwPFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.27.1.tgz", + "integrity": "sha512-8Z4TGic6xW70FKThA5HYEKKyBpOOsucTOD1DjU3fZxDg+K3zBJcXMFnt/4yQiZnf5+MiOMSXQ9PaEK/Ilh1DeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.0.tgz", + "integrity": "sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-remap-async-to-generator": "^7.27.1", + "@babel/traverse": "^7.28.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.27.1.tgz", + "integrity": "sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-remap-async-to-generator": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.27.1.tgz", + "integrity": "sha512-cnqkuOtZLapWYZUYM5rVIdv1nXYuFVIltZ6ZJ7nIj585QsjKM5dhL2Fu/lICXZ1OyIAFc7Qy+bvDAtTXqGrlhg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.0.tgz", + "integrity": "sha512-gKKnwjpdx5sER/wl0WN0efUBFzF/56YZO0RJrSYP4CljXnP31ByY7fol89AzomdlLNzI36AvOTmYHsnZTCkq8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.27.1.tgz", + "integrity": "sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.27.1.tgz", + "integrity": "sha512-s734HmYU78MVzZ++joYM+NkJusItbdRcbm+AGRgJCt3iA+yux0QpD9cBVdz3tKyrjVYWRl7j0mHSmv4lhV0aoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.0.tgz", + "integrity": "sha512-IjM1IoJNw72AZFlj33Cu8X0q2XK/6AaVC3jQu+cgQ5lThWD5ajnuUAml80dqRmOhmPkTH8uAwnpMu9Rvj0LTRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-globals": "^7.28.0", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-replace-supers": "^7.27.1", + "@babel/traverse": "^7.28.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.27.1.tgz", + "integrity": "sha512-lj9PGWvMTVksbWiDT2tW68zGS/cyo4AkZ/QTp0sQT0mjPopCmrSkzxeXkznjqBxzDI6TclZhOJbBmbBLjuOZUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/template": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.28.0.tgz", + "integrity": "sha512-v1nrSMBiKcodhsyJ4Gf+Z0U/yawmJDBOTpEB3mcQY52r9RIyPneGyAS/yM6seP/8I+mWI3elOMtT5dB8GJVs+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.28.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.27.1.tgz", + "integrity": "sha512-gEbkDVGRvjj7+T1ivxrfgygpT7GUd4vmODtYpbs0gZATdkX8/iSnOtZSxiZnsgm1YjTgjI6VKBGSJJevkrclzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.27.1.tgz", + "integrity": "sha512-MTyJk98sHvSs+cvZ4nOauwTTG1JeonDjSGvGGUNHreGQns+Mpt6WX/dVzWBHgg+dYZhkC4X+zTDfkTU+Vy9y7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.27.1.tgz", + "integrity": "sha512-hkGcueTEzuhB30B3eJCbCYeCaaEQOmQR0AdvzpD4LoN0GXMWzzGSuRrxR2xTnCrvNbVwK9N6/jQ92GSLfiZWoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.27.1.tgz", + "integrity": "sha512-MHzkWQcEmjzzVW9j2q8LGjwGWpG2mjwaaB0BNQwst3FIjqsg8Ct/mIZlvSPJvfi9y2AC8mi/ktxbFVL9pZ1I4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-explicit-resource-management": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.28.0.tgz", + "integrity": "sha512-K8nhUcn3f6iB+P3gwCv/no7OdzOZQcKchW6N389V6PD8NUWKZHzndOd9sPDVbMoBsbmjMqlB4L9fm+fEFNVlwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/plugin-transform-destructuring": "^7.28.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.27.1.tgz", + "integrity": "sha512-uspvXnhHvGKf2r4VVtBpeFnuDWsJLQ6MF6lGJLC89jBR1uoVeqM416AZtTuhTezOfgHicpJQmoD5YUakO/YmXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.27.1.tgz", + "integrity": "sha512-tQvHWSZ3/jH2xuq/vZDy0jNn+ZdXJeM8gHvX4lnJmsc3+50yPlWdZXIc5ay+umX+2/tJIqHqiEqcJvxlmIvRvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.27.1.tgz", + "integrity": "sha512-BfbWFFEJFQzLCQ5N8VocnCtA8J1CLkNTe2Ms2wocj75dd6VpiqS5Z5quTYcUoo4Yq+DN0rtikODccuv7RU81sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.27.1.tgz", + "integrity": "sha512-1bQeydJF9Nr1eBCMMbC+hdwmRlsv5XYOMu03YSWFwNs0HsAmtSxxF1fyuYPqemVldVyFmlCU7w8UE14LupUSZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/traverse": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.27.1.tgz", + "integrity": "sha512-6WVLVJiTjqcQauBhn1LkICsR2H+zm62I3h9faTDKt1qP4jn2o72tSvqMwtGFKGTpojce0gJs+76eZ2uCHRZh0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.27.1.tgz", + "integrity": "sha512-0HCFSepIpLTkLcsi86GG3mTUzxV5jpmbv97hTETW3yzrAij8aqlD36toB1D0daVFJM8NK6GvKO0gslVQmm+zZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.27.1.tgz", + "integrity": "sha512-SJvDs5dXxiae4FbSL1aBJlG4wvl594N6YEVVn9e3JGulwioy6z3oPjx/sQBO3Y4NwUu5HNix6KJ3wBZoewcdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.27.1.tgz", + "integrity": "sha512-hqoBX4dcZ1I33jCSWcXrP+1Ku7kdqXf1oeah7ooKOIiAdKQ+uqftgCFNOSzA5AMS2XIHEYeGFg4cKRCdpxzVOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.27.1.tgz", + "integrity": "sha512-iCsytMg/N9/oFq6n+gFTvUYDZQOMK5kEdeYxmxt91fcJGycfxVP9CnrxoliM0oumFERba2i8ZtwRUCMhvP1LnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz", + "integrity": "sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.27.1.tgz", + "integrity": "sha512-w5N1XzsRbc0PQStASMksmUeqECuzKuTJer7kFagK8AXgpCMkeDMO5S+aaFb7A51ZYDF7XI34qsTX+fkHiIm5yA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.27.1.tgz", + "integrity": "sha512-iQBE/xC5BV1OxJbp6WG7jq9IWiD+xxlZhLrdwpPkTX3ydmXdvoCpyfJN7acaIBZaOqTfr76pgzqBJflNbeRK+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.27.1.tgz", + "integrity": "sha512-SstR5JYy8ddZvD6MhV0tM/j16Qds4mIpJTOd1Yu9J9pJjH93bxHECF7pgtc28XvkzTD6Pxcm/0Z73Hvk7kb3Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.27.1.tgz", + "integrity": "sha512-f6PiYeqXQ05lYq3TIfIDu/MtliKUbNwkGApPUvyo6+tc7uaR4cPjPe7DFPr15Uyycg2lZU6btZ575CuQoYh7MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.27.1.tgz", + "integrity": "sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.27.1.tgz", + "integrity": "sha512-fdPKAcujuvEChxDBJ5c+0BTaS6revLV7CJL08e4m3de8qJfNIuCc2nc7XJYOjBoTMJeqSmwXJ0ypE14RCjLwaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.0.tgz", + "integrity": "sha512-9VNGikXxzu5eCiQjdE4IZn8sb9q7Xsk5EXLDBKUYg1e/Tve8/05+KJEtcxGxAgCY5t/BpKQM+JEL/yT4tvgiUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/plugin-transform-destructuring": "^7.28.0", + "@babel/plugin-transform-parameters": "^7.27.7", + "@babel/traverse": "^7.28.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.27.1.tgz", + "integrity": "sha512-SFy8S9plRPbIcxlJ8A6mT/CxFdJx/c04JEctz4jf8YZaVS2px34j7NXRrlGlHkN/M2gnpL37ZpGRGVFLd3l8Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-replace-supers": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.27.1.tgz", + "integrity": "sha512-txEAEKzYrHEX4xSZN4kJ+OfKXFVSWKB2ZxM9dpcE3wT7smwkNmXo5ORRlVzMVdJbD+Q8ILTgSD7959uj+3Dm3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.27.1.tgz", + "integrity": "sha512-BQmKPPIuc8EkZgNKsv0X4bPmOoayeu4F1YCwx2/CfmDSXDbp7GnzlUH+/ul5VGfRg1AoFPsrIThlEBj2xb4CAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.27.7.tgz", + "integrity": "sha512-qBkYTYCb76RRxUM6CcZA5KRu8K4SM8ajzVeUgVdMVO9NN9uI/GaVmBg/WKJJGnNokV9SY8FxNOVWGXzqzUidBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.27.1.tgz", + "integrity": "sha512-10FVt+X55AjRAYI9BrdISN9/AQWHqldOeZDUoLyif1Kn05a56xVBXb8ZouL8pZ9jem8QpXaOt8TS7RHUIS+GPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.27.1.tgz", + "integrity": "sha512-5J+IhqTi1XPa0DXF83jYOaARrX+41gOewWbkPyjMNRDqgOCqdffGh8L3f/Ek5utaEBZExjSAzcyjmV9SSAWObQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.27.1", + "@babel/helper-create-class-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.27.1.tgz", + "integrity": "sha512-oThy3BCuCha8kDZ8ZkgOg2exvPYUlprMukKQXI1r1pJ47NCvxfkEy8vK+r/hT9nF0Aa4H1WUPZZjHTFtAhGfmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.28.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.1.tgz", + "integrity": "sha512-P0QiV/taaa3kXpLY+sXla5zec4E+4t4Aqc9ggHlfZ7a2cp8/x/Gv08jfwEtn9gnnYIMvHx6aoOZ8XJL8eU71Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regexp-modifiers": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.27.1.tgz", + "integrity": "sha512-TtEciroaiODtXvLZv4rmfMhkCv8jx3wgKpL68PuiPh2M4fvz5jhsA7697N1gMvkvr/JTF13DrFYyEbY9U7cVPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.27.1.tgz", + "integrity": "sha512-V2ABPHIJX4kC7HegLkYoDpfg9PVmuWy/i6vUM5eGK22bx4YVFD3M5F0QQnWQoDs6AGsUWTVOopBiMFQgHaSkVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.28.0.tgz", + "integrity": "sha512-dGopk9nZrtCs2+nfIem25UuHyt5moSJamArzIoh9/vezUQPmYDOzjaHDCkAzuGJibCIkPup8rMT2+wYB6S73cA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1", + "babel-plugin-polyfill-corejs2": "^0.4.14", + "babel-plugin-polyfill-corejs3": "^0.13.0", + "babel-plugin-polyfill-regenerator": "^0.6.5", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.27.1.tgz", + "integrity": "sha512-N/wH1vcn4oYawbJ13Y/FxcQrWk63jhfNa7jef0ih7PHSIHX2LB7GWE1rkPrOnka9kwMxb6hMl19p7lidA+EHmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.27.1.tgz", + "integrity": "sha512-kpb3HUqaILBJcRFVhFUs6Trdd4mkrzcGXss+6/mxUd273PfbWqSDHRzMT2234gIg2QYfAjvXLSquP1xECSg09Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.27.1.tgz", + "integrity": "sha512-lhInBO5bi/Kowe2/aLdBAawijx+q1pQzicSgnkB6dUPc1+RC8QmJHKf2OjvU+NZWitguJHEaEmbV6VWEouT58g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.27.1.tgz", + "integrity": "sha512-fBJKiV7F2DxZUkg5EtHKXQdbsbURW3DZKQUWphDum0uRP6eHGGa/He9mc0mypL680pb+e/lDIthRohlv8NCHkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.27.1.tgz", + "integrity": "sha512-RiSILC+nRJM7FY5srIyc4/fGIwUhyDuuBSdWn4y6yT6gm652DpCHZjIipgn6B7MQ1ITOUnAKWixEUjQRIBIcLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.27.1.tgz", + "integrity": "sha512-Ysg4v6AmF26k9vpfFuTZg8HRfVWzsh1kVfowA23y9j/Gu6dOuahdUVhkLqpObp3JIv27MLSii6noRnuKN8H0Mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.27.1.tgz", + "integrity": "sha512-uW20S39PnaTImxp39O5qFlHLS9LJEmANjMG7SxIhap8rCHqu0Ik+tLEPX5DKmHn6CsWQ7j3lix2tFOa5YtL12Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.27.1.tgz", + "integrity": "sha512-xvINq24TRojDuyt6JGtHmkVkrfVV3FPT16uytxImLeBZqW3/H52yN+kM1MGuyPkIQxrzKwPHs5U/MP3qKyzkGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.27.1.tgz", + "integrity": "sha512-EtkOujbc4cgvb0mlpQefi4NTPBzhSIevblFevACNLUspmrALgmEBdL/XfnyyITfd8fKBZrZys92zOWcik7j9Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.27.1", + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.0.tgz", + "integrity": "sha512-VmaxeGOwuDqzLl5JUkIRM1X2Qu2uKGxHEQWh+cvvbl7JuJRgKGJSfsEF/bUaxFhJl/XAyxBe7q7qSuTbKFuCyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.0", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-validator-option": "^7.27.1", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.27.1", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.27.1", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-import-assertions": "^7.27.1", + "@babel/plugin-syntax-import-attributes": "^7.27.1", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.27.1", + "@babel/plugin-transform-async-generator-functions": "^7.28.0", + "@babel/plugin-transform-async-to-generator": "^7.27.1", + "@babel/plugin-transform-block-scoped-functions": "^7.27.1", + "@babel/plugin-transform-block-scoping": "^7.28.0", + "@babel/plugin-transform-class-properties": "^7.27.1", + "@babel/plugin-transform-class-static-block": "^7.27.1", + "@babel/plugin-transform-classes": "^7.28.0", + "@babel/plugin-transform-computed-properties": "^7.27.1", + "@babel/plugin-transform-destructuring": "^7.28.0", + "@babel/plugin-transform-dotall-regex": "^7.27.1", + "@babel/plugin-transform-duplicate-keys": "^7.27.1", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.27.1", + "@babel/plugin-transform-dynamic-import": "^7.27.1", + "@babel/plugin-transform-explicit-resource-management": "^7.28.0", + "@babel/plugin-transform-exponentiation-operator": "^7.27.1", + "@babel/plugin-transform-export-namespace-from": "^7.27.1", + "@babel/plugin-transform-for-of": "^7.27.1", + "@babel/plugin-transform-function-name": "^7.27.1", + "@babel/plugin-transform-json-strings": "^7.27.1", + "@babel/plugin-transform-literals": "^7.27.1", + "@babel/plugin-transform-logical-assignment-operators": "^7.27.1", + "@babel/plugin-transform-member-expression-literals": "^7.27.1", + "@babel/plugin-transform-modules-amd": "^7.27.1", + "@babel/plugin-transform-modules-commonjs": "^7.27.1", + "@babel/plugin-transform-modules-systemjs": "^7.27.1", + "@babel/plugin-transform-modules-umd": "^7.27.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.27.1", + "@babel/plugin-transform-new-target": "^7.27.1", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1", + "@babel/plugin-transform-numeric-separator": "^7.27.1", + "@babel/plugin-transform-object-rest-spread": "^7.28.0", + "@babel/plugin-transform-object-super": "^7.27.1", + "@babel/plugin-transform-optional-catch-binding": "^7.27.1", + "@babel/plugin-transform-optional-chaining": "^7.27.1", + "@babel/plugin-transform-parameters": "^7.27.7", + "@babel/plugin-transform-private-methods": "^7.27.1", + "@babel/plugin-transform-private-property-in-object": "^7.27.1", + "@babel/plugin-transform-property-literals": "^7.27.1", + "@babel/plugin-transform-regenerator": "^7.28.0", + "@babel/plugin-transform-regexp-modifiers": "^7.27.1", + "@babel/plugin-transform-reserved-words": "^7.27.1", + "@babel/plugin-transform-shorthand-properties": "^7.27.1", + "@babel/plugin-transform-spread": "^7.27.1", + "@babel/plugin-transform-sticky-regex": "^7.27.1", + "@babel/plugin-transform-template-literals": "^7.27.1", + "@babel/plugin-transform-typeof-symbol": "^7.27.1", + "@babel/plugin-transform-unicode-escapes": "^7.27.1", + "@babel/plugin-transform-unicode-property-regex": "^7.27.1", + "@babel/plugin-transform-unicode-regex": "^7.27.1", + "@babel/plugin-transform-unicode-sets-regex": "^7.27.1", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "babel-plugin-polyfill-corejs2": "^0.4.14", + "babel-plugin-polyfill-corejs3": "^0.13.0", + "babel-plugin-polyfill-regenerator": "^0.6.5", + "core-js-compat": "^3.43.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.6-no-external-plugins", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.2.tgz", + "integrity": "sha512-KHp2IflsnGywDjBWDkR9iEqiWSpc8GIi0lgTT3mOElT0PP1tG26P4tmFI2YvAdzgq9RGyoHZQEIEdZy6Ec5xCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/runtime-corejs3": { + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.28.2.tgz", + "integrity": "sha512-FVFaVs2/dZgD3Y9ZD+AKNKjyGKzwu0C54laAXWUXgLcVXcCX6YZ6GhK2cp7FogSN2OA0Fu+QT8dP3FUdo9ShSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-js-pure": "^3.43.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", + "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@biomejs/biome": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.1.4.tgz", + "integrity": "sha512-QWlrqyxsU0FCebuMnkvBIkxvPqH89afiJzjMl+z67ybutse590jgeaFdDurE9XYtzpjRGTI1tlUZPGWmbKsElA==", + "dev": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-darwin-arm64": "2.1.4", + "@biomejs/cli-darwin-x64": "2.1.4", + "@biomejs/cli-linux-arm64": "2.1.4", + "@biomejs/cli-linux-arm64-musl": "2.1.4", + "@biomejs/cli-linux-x64": "2.1.4", + "@biomejs/cli-linux-x64-musl": "2.1.4", + "@biomejs/cli-win32-arm64": "2.1.4", + "@biomejs/cli-win32-x64": "2.1.4" + } + }, + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.1.4.tgz", + "integrity": "sha512-sCrNENE74I9MV090Wq/9Dg7EhPudx3+5OiSoQOkIe3DLPzFARuL1dOwCWhKCpA3I5RHmbrsbNSRfZwCabwd8Qg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.1.4.tgz", + "integrity": "sha512-gOEICJbTCy6iruBywBDcG4X5rHMbqCPs3clh3UQ+hRKlgvJTk4NHWQAyHOXvaLe+AxD1/TNX1jbZeffBJzcrOw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.1.4.tgz", + "integrity": "sha512-juhEkdkKR4nbUi5k/KRp1ocGPNWLgFRD4NrHZSveYrD6i98pyvuzmS9yFYgOZa5JhaVqo0HPnci0+YuzSwT2fw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.1.4.tgz", + "integrity": "sha512-nYr7H0CyAJPaLupFE2cH16KZmRC5Z9PEftiA2vWxk+CsFkPZQ6dBRdcC6RuS+zJlPc/JOd8xw3uCCt9Pv41WvQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.1.4.tgz", + "integrity": "sha512-Eoy9ycbhpJVYuR+LskV9s3uyaIkp89+qqgqhGQsWnp/I02Uqg2fXFblHJOpGZR8AxdB9ADy87oFVxn9MpFKUrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.1.4.tgz", + "integrity": "sha512-lvwvb2SQQHctHUKvBKptR6PLFCM7JfRjpCCrDaTmvB7EeZ5/dQJPhTYBf36BE/B4CRWR2ZiBLRYhK7hhXBCZAg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.1.4.tgz", + "integrity": "sha512-3WRYte7orvyi6TRfIZkDN9Jzoogbv+gSvR+b9VOXUg1We1XrjBg6WljADeVEaKTvOcpVdH0a90TwyOQ6ue4fGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.1.4.tgz", + "integrity": "sha512-tBc+W7anBPSFXGAoQW+f/+svkpt8/uXfRwDzN1DvnatkRMt16KIYpEi/iw8u9GahJlFv98kgHcIrSsZHZTR0sw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@chevrotain/cst-dts-gen": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-11.0.3.tgz", + "integrity": "sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/gast": "11.0.3", + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/gast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-11.0.3.tgz", + "integrity": "sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/types": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/@chevrotain/regexp-to-ast": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/regexp-to-ast/-/regexp-to-ast-11.0.3.tgz", + "integrity": "sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/types": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.0.3.tgz", + "integrity": "sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/utils": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-11.0.3.tgz", + "integrity": "sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@deadlyjack/ajax": { + "version": "1.2.6", + "license": "MIT" + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz", + "integrity": "sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.17.0" + } + }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@isaacs/string-locale-compare": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz", + "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", + "license": "ISC" + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.10.tgz", + "integrity": "sha512-0pPkgz9dY+bijgistcTTJ5mR+ocqRXLuhXHYdzoMmmoJ2C9S46RCm2GMUbatPEUK9Yjy26IrAy8D/M00lLkv+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@netflix/nerror": { + "version": "1.1.3", + "license": "MIT", + "dependencies": { + "assert-plus": "^1.0.0", + "extsprintf": "^1.4.0", + "lodash": "^4.17.15" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-4.0.0.tgz", + "integrity": "sha512-kAQTcEN9E8ERLVg5AsGwLNoFb+oEG6engbqAU2P43gD4JEIkNGMHdVQ096FsOAAYpZPB0RSt0zgInKIAS1l5QA==", + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^11.2.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/agent/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@npmcli/arborist": { + "version": "9.1.8", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-9.1.8.tgz", + "integrity": "sha512-TYAzq0oaXQU+uLfXFbR2wYx62qHIOSg/TYhGWJSphJDypyjdNXC7B/+k29ElC2vWlWfX4OJnhmSY5DTwSFiNpg==", + "license": "ISC", + "dependencies": { + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/fs": "^5.0.0", + "@npmcli/installed-package-contents": "^4.0.0", + "@npmcli/map-workspaces": "^5.0.0", + "@npmcli/metavuln-calculator": "^9.0.2", + "@npmcli/name-from-folder": "^4.0.0", + "@npmcli/node-gyp": "^5.0.0", + "@npmcli/package-json": "^7.0.0", + "@npmcli/query": "^5.0.0", + "@npmcli/redact": "^4.0.0", + "@npmcli/run-script": "^10.0.0", + "bin-links": "^6.0.0", + "cacache": "^20.0.1", + "common-ancestor-path": "^1.0.1", + "hosted-git-info": "^9.0.0", + "json-stringify-nice": "^1.1.4", + "lru-cache": "^11.2.1", + "minimatch": "^10.0.3", + "nopt": "^9.0.0", + "npm-install-checks": "^8.0.0", + "npm-package-arg": "^13.0.0", + "npm-pick-manifest": "^11.0.1", + "npm-registry-fetch": "^19.0.0", + "pacote": "^21.0.2", + "parse-conflict-json": "^5.0.1", + "proc-log": "^6.0.0", + "proggy": "^4.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^3.0.1", + "semver": "^7.3.7", + "ssri": "^13.0.0", + "treeverse": "^3.0.0", + "walk-up-path": "^4.0.0" + }, + "bin": { + "arborist": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/arborist/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@npmcli/arborist/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/fs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-5.0.0.tgz", + "integrity": "sha512-7OsC1gNORBEawOa5+j2pXN9vsicaIOH5cPXxoR6fJOmH6/EXpJB2CajXOu1fPRFun2m1lktEFX11+P89hqO/og==", + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/git": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-7.0.1.tgz", + "integrity": "sha512-+XTFxK2jJF/EJJ5SoAzXk3qwIDfvFc5/g+bD274LZ7uY7LE8sTfG6Z8rOanPl2ZEvZWqNvmEdtXC25cE54VcoA==", + "license": "ISC", + "dependencies": { + "@npmcli/promise-spawn": "^9.0.0", + "ini": "^6.0.0", + "lru-cache": "^11.2.1", + "npm-pick-manifest": "^11.0.1", + "proc-log": "^6.0.0", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^6.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/git/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/git/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@npmcli/git/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/git/node_modules/which": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-6.0.0.tgz", + "integrity": "sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/installed-package-contents": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-4.0.0.tgz", + "integrity": "sha512-yNyAdkBxB72gtZ4GrwXCM0ZUedo9nIbOMKfGjt6Cu6DXf0p8y1PViZAKDC8q8kv/fufx0WTjRBdSlyrvnP7hmA==", + "license": "ISC", + "dependencies": { + "npm-bundled": "^5.0.0", + "npm-normalize-package-bin": "^5.0.0" + }, + "bin": { + "installed-package-contents": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/map-workspaces": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-5.0.3.tgz", + "integrity": "sha512-o2grssXo1e774E5OtEwwrgoszYRh0lqkJH+Pb9r78UcqdGJRDRfhpM8DvZPjzNLLNYeD/rNbjOKM3Ss5UABROw==", + "license": "ISC", + "dependencies": { + "@npmcli/name-from-folder": "^4.0.0", + "@npmcli/package-json": "^7.0.0", + "glob": "^13.0.0", + "minimatch": "^10.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/map-workspaces/node_modules/glob": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", + "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "path-scurry": "^2.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@npmcli/metavuln-calculator": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-9.0.3.tgz", + "integrity": "sha512-94GLSYhLXF2t2LAC7pDwLaM4uCARzxShyAQKsirmlNcpidH89VA4/+K1LbJmRMgz5gy65E/QBBWQdUvGLe2Frg==", + "license": "ISC", + "dependencies": { + "cacache": "^20.0.0", + "json-parse-even-better-errors": "^5.0.0", + "pacote": "^21.0.0", + "proc-log": "^6.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/metavuln-calculator/node_modules/json-parse-even-better-errors": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz", + "integrity": "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ==", + "license": "MIT", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/metavuln-calculator/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/name-from-folder": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-4.0.0.tgz", + "integrity": "sha512-qfrhVlOSqmKM8i6rkNdZzABj8MKEITGFAY+4teqBziksCQAOLutiAxM1wY2BKEd8KjUSpWmWCYxvXr0y4VTlPg==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/node-gyp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-5.0.0.tgz", + "integrity": "sha512-uuG5HZFXLfyFKqg8QypsmgLQW7smiRjVc45bqD/ofZZcR/uxEjgQU8qDPv0s9TEeMUiAAU/GC5bR6++UdTirIQ==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/package-json": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-7.0.4.tgz", + "integrity": "sha512-0wInJG3j/K40OJt/33ax47WfWMzZTm6OQxB9cDhTt5huCP2a9g2GnlsxmfN+PulItNPIpPrZ+kfwwUil7eHcZQ==", + "license": "ISC", + "dependencies": { + "@npmcli/git": "^7.0.0", + "glob": "^13.0.0", + "hosted-git-info": "^9.0.0", + "json-parse-even-better-errors": "^5.0.0", + "proc-log": "^6.0.0", + "semver": "^7.5.3", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/glob": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", + "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "path-scurry": "^2.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@npmcli/package-json/node_modules/json-parse-even-better-errors": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz", + "integrity": "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ==", + "license": "MIT", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/package-json/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/promise-spawn": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-9.0.1.tgz", + "integrity": "sha512-OLUaoqBuyxeTqUvjA3FZFiXUfYC1alp3Sa99gW3EUDz3tZ3CbXDdcZ7qWKBzicrJleIgucoWamWH1saAmH/l2Q==", + "license": "ISC", + "dependencies": { + "which": "^6.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/which": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-6.0.0.tgz", + "integrity": "sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/query": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-5.0.0.tgz", + "integrity": "sha512-8TZWfTQOsODpLqo9SVhVjHovmKXNpevHU0gO9e+y4V4fRIOneiXy0u0sMP9LmS71XivrEWfZWg50ReH4WRT4aQ==", + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/query/node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@npmcli/redact": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-4.0.0.tgz", + "integrity": "sha512-gOBg5YHMfZy+TfHArfVogwgfBeQnKbbGo3pSUyK/gSI0AVu+pEiDVcKlQb0D8Mg1LNRZILZ6XG8I5dJ4KuAd9Q==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/run-script": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-10.0.3.tgz", + "integrity": "sha512-ER2N6itRkzWbbtVmZ9WKaWxVlKlOeBFF1/7xx+KA5J1xKa4JjUwBdb6tDpk0v1qA+d+VDwHI9qmLcXSWcmi+Rw==", + "license": "ISC", + "dependencies": { + "@npmcli/node-gyp": "^5.0.0", + "@npmcli/package-json": "^7.0.0", + "@npmcli/promise-spawn": "^9.0.0", + "node-gyp": "^12.1.0", + "proc-log": "^6.0.0", + "which": "^6.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/run-script/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/run-script/node_modules/which": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-6.0.0.tgz", + "integrity": "sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@sigstore/bundle": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-4.0.0.tgz", + "integrity": "sha512-NwCl5Y0V6Di0NexvkTqdoVfmjTaQwoLM236r89KEojGmq/jMls8S+zb7yOwAPdXvbwfKDlP+lmXgAL4vKSQT+A==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.5.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/core": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-3.0.0.tgz", + "integrity": "sha512-NgbJ+aW9gQl/25+GIEGYcCyi8M+ng2/5X04BMuIgoDfgvp18vDcoNHOQjQsG9418HGNYRxG3vfEXaR1ayD37gg==", + "license": "Apache-2.0", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/protobuf-specs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.5.0.tgz", + "integrity": "sha512-MM8XIwUjN2bwvCg1QvrMtbBmpcSHrkhFSCu1D11NyPvDQ25HEc4oG5/OcQfd/Tlf/OxmKWERDj0zGE23jQaMwA==", + "license": "Apache-2.0", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@sigstore/sign": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-4.0.1.tgz", + "integrity": "sha512-KFNGy01gx9Y3IBPG/CergxR9RZpN43N+lt3EozEfeoyqm8vEiLxwRl3ZO5sPx3Obv1ix/p7FWOlPc2Jgwfp9PA==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^4.0.0", + "@sigstore/core": "^3.0.0", + "@sigstore/protobuf-specs": "^0.5.0", + "make-fetch-happen": "^15.0.2", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/sign/node_modules/proc-log": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-5.0.0.tgz", + "integrity": "sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@sigstore/tuf": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-4.0.0.tgz", + "integrity": "sha512-0QFuWDHOQmz7t66gfpfNO6aEjoFrdhkJaej/AOqb4kqWZVbPWFZifXZzkxyQBB1OwTbkhdT3LNpMFxwkTvf+2w==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.5.0", + "tuf-js": "^4.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sigstore/verify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-3.0.0.tgz", + "integrity": "sha512-moXtHH33AobOhTZF8xcX1MpOFqdvfCk7v6+teJL8zymBiDXwEsQH6XG9HGx2VIxnJZNm4cNSzflTLDnQLmIdmw==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^4.0.0", + "@sigstore/core": "^3.0.0", + "@sigstore/protobuf-specs": "^0.5.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@sphinxxxx/color-conversion": { + "version": "2.2.2", + "license": "ISC" + }, + "node_modules/@tufjs/canonical-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz", + "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==", + "license": "MIT", + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@tufjs/models": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-4.0.0.tgz", + "integrity": "sha512-h5x5ga/hh82COe+GoD4+gKUeV4T3iaYOxqLt41GRKApinPI7DMidhCmNVTjKfhCWFJIGXaFJee07XczdT4jdZQ==", + "license": "MIT", + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^9.0.5" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@tufjs/models/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@types/ace": { + "version": "0.0.52", + "resolved": "https://registry.npmjs.org/@types/ace/-/ace-0.0.52.tgz", + "integrity": "sha512-YPF9S7fzpuyrxru+sG/rrTpZkC6gpHBPF14W3x70kqVOD+ks6jkYLapk4yceh36xej7K4HYxcyz9ZDQ2lTvwgQ==", + "dev": true + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/markdown-it": { + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", + "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/linkify-it": "^5", + "@types/mdurl": "^2" + } + }, + "node_modules/@types/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", + "license": "MIT", + "peer": true + }, + "node_modules/@types/node": { + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true + }, + "node_modules/@types/url-parse": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.11.tgz", + "integrity": "sha512-FKvKIqRaykZtd4n47LbK/W/5fhQQ1X7cxxzG9A48h0BGN+S04NH7ervcCjM8tyR0lyGru83FAHSmw2ObgKoESg==", + "dev": true + }, + "node_modules/@ungap/custom-elements": { + "version": "1.3.0", + "license": "ISC" + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-3.0.1.tgz", + "integrity": "sha512-u8d0pJ5YFgneF/GuvEiDA61Tf1VDomHHYMjv/wc9XzYj7nopltpG96nXN5dJRstxZhcNpV1g+nT6CydO7pHbjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-3.0.1.tgz", + "integrity": "sha512-coEmDzc2u/ffMvuW9aCjoRzNSPDl/XLuhPdlFRpT9tZHmJ/039az33CE7uH+8s0uL1j5ZNtfdv0HkfaKRBGJsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-3.0.1.tgz", + "integrity": "sha512-sbgw03xQaCLiT6gcY/6u3qBDn01CWw/nbaXl3gTdTFuJJ75Gffv3E3DBpgvY2fkkrdS1fpjaXNOmJlnbtKauKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "webpack": "^5.82.0", + "webpack-cli": "6.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@xterm/addon-attach": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-attach/-/addon-attach-0.11.0.tgz", + "integrity": "sha512-JboCN0QAY6ZLY/SSB/Zl2cQ5zW1Eh4X3fH7BnuR1NB7xGRhzbqU2Npmpiw/3zFlxDaU88vtKzok44JKi2L2V2Q==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/addon-fit": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.10.0.tgz", + "integrity": "sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/addon-image": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-image/-/addon-image-0.8.0.tgz", + "integrity": "sha512-b/dqpFn3jUad2pUP5UpF4scPIh0WdxRQL/1qyiahGfUI85XZTCXo0py9G6AcOR2QYUw8eJ8EowGspT7BQcgw6A==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.2.0" + } + }, + "node_modules/@xterm/addon-search": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-search/-/addon-search-0.15.0.tgz", + "integrity": "sha512-ZBZKLQ+EuKE83CqCmSSz5y1tx+aNOCUaA7dm6emgOX+8J9H1FWXZyrKfzjwzV+V14TV3xToz1goIeRhXBS5qjg==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/addon-unicode11": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-unicode11/-/addon-unicode11-0.8.0.tgz", + "integrity": "sha512-LxinXu8SC4OmVa6FhgwsVCBZbr8WoSGzBl2+vqe8WcQ6hb1r6Gj9P99qTNdPiFPh4Ceiu2pC8xukZ6+2nnh49Q==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/addon-web-links": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-web-links/-/addon-web-links-0.11.0.tgz", + "integrity": "sha512-nIHQ38pQI+a5kXnRaTgwqSHnX7KE6+4SVoceompgHL26unAxdfP6IPqUTSYPQgSwM56hsElfoNrrW5V7BUED/Q==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/addon-webgl": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-webgl/-/addon-webgl-0.18.0.tgz", + "integrity": "sha512-xCnfMBTI+/HKPdRnSOHaJDRqEpq2Ugy8LEj9GiY4J3zJObo3joylIFaMvzBwbYRg8zLtkO0KQaStCeSfoaI2/w==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/xterm": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0.tgz", + "integrity": "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==", + "license": "MIT" + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/abbrev": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-4.0.0.tgz", + "integrity": "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "8.12.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/android-versions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-2.1.0.tgz", + "integrity": "sha512-oCBvVs2uaL8ohQtesGs78/X7QvFDLbKgTosBRiOIBCss1a/yiakQm/ADuoG2k/AUaI0FfrsFeMl/a+GtEtjEeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.2" + } + }, + "node_modules/android-versions/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ansi": { + "version": "0.3.1", + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/autoprefixer": { + "version": "10.4.21", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.21.tgz", + "integrity": "sha512-O+A6LWV5LDHSJD3LjHYoNi4VLsj/Whi7k6zG12xTYaU4cQ8oxQGckXNX8cRHK5yOZ/ppVHe0ZBXGzSV9jXdVbQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "browserslist": "^4.24.4", + "caniuse-lite": "^1.0.30001702", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.1.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/autosize": { + "version": "6.0.1", + "license": "MIT" + }, + "node_modules/babel-loader": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-10.0.0.tgz", + "integrity": "sha512-z8jt+EdS61AMw22nSfoNJAZ0vrtmhPRVi6ghL3rCeRZI8cdNYFiV5xeV3HbE7rlZZNmGH8BVccwWt8/ED0QOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^5.0.0" + }, + "engines": { + "node": "^18.20.0 || ^20.10.0 || >=22.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0", + "webpack": ">=5.61.0" + } + }, + "node_modules/babel-loader/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-loader/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.14.tgz", + "integrity": "sha512-Co2Y9wX854ts6U8gAAPXfn0GmAyctHuK8n0Yhfjd6t30g7yvKjspvvOo9yG+z52PZRgFErt7Ka2pYnXCjLKEpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.27.7", + "@babel/helper-define-polyfill-provider": "^0.6.5", + "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.13.0.tgz", + "integrity": "sha512-U+GNwMdSFgzVmfhNm8GJUX88AadB3uo9KpJqS3FaqNIPKgySuvMb+bHPsOmmuWyIcuqZj/pzt1RUIUZns4y2+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.5", + "core-js-compat": "^3.43.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.5.tgz", + "integrity": "sha512-ISqQ2frbiNU9vIJkzg7dlPpznPZ4jOiUQ1uSmB0fEHeowtN3COYRsXr/xexn64NpU13P06jc/L5TgiJXOgrbEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.5" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/big-integer": { + "version": "1.6.51", + "license": "Unlicense", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/big.js": { + "version": "5.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/bin-links": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-6.0.0.tgz", + "integrity": "sha512-X4CiKlcV2GjnCMwnKAfbVWpHa++65th9TuzAEYtZoATiOE2DQKhSp4CJlyLoTqdhBKlXjpXjCTYPNNFS33Fi6w==", + "license": "ISC", + "dependencies": { + "cmd-shim": "^8.0.0", + "npm-normalize-package-bin": "^5.0.0", + "proc-log": "^6.0.0", + "read-cmd-shim": "^6.0.0", + "write-file-atomic": "^7.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/bin-links/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/bin-links/node_modules/write-file-atomic": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-7.0.0.tgz", + "integrity": "sha512-YnlPC6JqnZl6aO4uRc+dx5PHguiR9S6WeoLtpxNT9wIG+BDya7ZNE1q7KOjVgaA73hKhKLpVPgJ5QA9THQ5BRg==", + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/bplist-parser": { + "version": "0.3.2", + "license": "MIT", + "dependencies": { + "big-integer": "1.6.x" + }, + "engines": { + "node": ">= 5.10.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.25.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.2.tgz", + "integrity": "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001733", + "electron-to-chromium": "^1.5.199", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cacache": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-20.0.3.tgz", + "integrity": "sha512-3pUp4e8hv07k1QlijZu6Kn7c9+ZpWWk4j3F8N3xPuCExULobqJydKYOTj1FTq58srkJsXvO7LbGAH4C0ZU3WGw==", + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^5.0.0", + "fs-minipass": "^3.0.0", + "glob": "^13.0.0", + "lru-cache": "^11.1.0", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^13.0.0", + "unique-filename": "^5.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", + "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "path-scurry": "^2.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001733", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001733.tgz", + "integrity": "sha512-e4QKw/O2Kavj2VQTKZWrwzkt3IxOmIlU6ajRb6LP64LHpBo1J67k2Hi4Vu/TgJWsNtynurfS0uK3MaUTCPfu5Q==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chevrotain": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz", + "integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/cst-dts-gen": "11.0.3", + "@chevrotain/gast": "11.0.3", + "@chevrotain/regexp-to-ast": "11.0.3", + "@chevrotain/types": "11.0.3", + "@chevrotain/utils": "11.0.3", + "lodash-es": "4.17.21" + } + }, + "node_modules/chevrotain-allstar": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/chevrotain-allstar/-/chevrotain-allstar-0.3.1.tgz", + "integrity": "sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash-es": "^4.17.21" + }, + "peerDependencies": { + "chevrotain": "^11.0.0" + } + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", + "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "exit": "0.1.2", + "glob": "^7.1.1" + }, + "engines": { + "node": ">=0.2.5" + } + }, + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cmd-shim": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-8.0.0.tgz", + "integrity": "sha512-Jk/BK6NCapZ58BKUxlSI+ouKRbjH1NLZCgJkYoab+vEHUY3f6OzpNBN9u7HFSv9J6TRDGs4PLOHezoKGaFRSCA==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/colorette": { + "version": "2.0.19", + "dev": true, + "license": "MIT" + }, + "node_modules/com.foxdebug.acode.rk.customtabs": { + "resolved": "src/plugins/custom-tabs", + "link": true + }, + "node_modules/com.foxdebug.acode.rk.exec.proot": { + "resolved": "src/plugins/proot", + "link": true + }, + "node_modules/com.foxdebug.acode.rk.exec.terminal": { + "resolved": "src/plugins/terminal", + "link": true + }, + "node_modules/common-ancestor-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", + "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==", + "license": "ISC" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/configstore": { + "version": "5.0.1", + "license": "BSD-2-Clause", + "dependencies": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/configstore/node_modules/make-dir": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", + "dev": true, + "dependencies": { + "date-now": "^0.1.4" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/cordova": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/cordova/-/cordova-13.0.0.tgz", + "integrity": "sha512-QAIMwmYLL0jHo4vauWSnRd2fr9l+wajG+F5aUkrC6e4ZQGSTv0wAiRmpqQUkIc1ZdELisKDQws/BjHz5nP/sLw==", + "license": "Apache-2.0", + "dependencies": { + "configstore": "^5.0.1", + "cordova-common": "^6.0.0", + "cordova-create": "^6.0.0", + "cordova-lib": "^13.0.0", + "editor": "^1.0.0", + "execa": "^5.1.1", + "nopt": "^9.0.0", + "semver": "^7.7.3", + "systeminformation": "^5.27.11" + }, + "bin": { + "cordova": "bin/cordova" + }, + "engines": { + "node": ">=20.17.0 || >=22.9.0" + } + }, + "node_modules/cordova-android": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-14.0.1.tgz", + "integrity": "sha512-HMBMdGu/JlSQtmBuDEpKWf/pE75SpF3FksxZ+mqYuL3qSIN8lN/QsNurwYaPAP7zWXN2DNpvwlpOJItS5VhdLg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "android-versions": "^2.1.0", + "cordova-common": "^5.0.1", + "dedent": "^1.5.3", + "execa": "^5.1.1", + "fast-glob": "^3.3.3", + "is-path-inside": "^3.0.3", + "nopt": "^8.1.0", + "properties-parser": "^0.6.0", + "semver": "^7.7.1", + "string-argv": "^0.3.1", + "untildify": "^4.0.0", + "which": "^5.0.0" + }, + "engines": { + "node": ">=20.5.0" + } + }, + "node_modules/cordova-android/node_modules/abbrev": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz", + "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/cordova-android/node_modules/dedent": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/cordova-android/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/cordova-android/node_modules/nopt": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", + "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", + "dev": true, + "license": "ISC", + "dependencies": { + "abbrev": "^3.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/cordova-android/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cordova-android/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/cordova-app-hello-world": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cordova-app-hello-world/-/cordova-app-hello-world-7.0.0.tgz", + "integrity": "sha512-uDTncFkI73ko+wEf6IEO9bw8lQRMQGnfdi5pPMei4P8+plChNcRW5fxjKlhM/8ZrT8OAWiHsQRrP4pIAn3HQ4g==", + "license": "Apache-2.0" + }, + "node_modules/cordova-clipboard": { + "version": "1.3.0", + "dev": true, + "license": "MIT" + }, + "node_modules/cordova-common": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-5.0.1.tgz", + "integrity": "sha512-OA2NQ6wvhNz4GytPYwTdlA9xfG7Yf7ufkj4u97m3rUfoL/AECwwj0GVT2CYpk/0Fk6HyuHA3QYCxfDPYsKzI1A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@netflix/nerror": "^1.1.3", + "ansi": "^0.3.1", + "bplist-parser": "^0.3.2", + "cross-spawn": "^7.0.6", + "elementtree": "^0.1.7", + "endent": "^2.1.0", + "fast-glob": "^3.3.3", + "lodash.zip": "^4.2.0", + "plist": "^3.1.0", + "q": "^1.5.1", + "read-chunk": "^3.2.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/cordova-create": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cordova-create/-/cordova-create-6.0.0.tgz", + "integrity": "sha512-LD41sLn2GsmAlj3576R3xlUM3BP0rt0CYd5LdbzU82WBI3ApMrrhM6xcHDYJfe1nfSL89O/nb/u/h7+7DhPQeA==", + "license": "Apache-2.0", + "dependencies": { + "cordova-app-hello-world": "^7.0.0", + "cordova-common": "^6.0.0", + "cordova-fetch": "^5.0.0", + "globby": "^11.1.0", + "import-fresh": "^3.3.1", + "isobject": "^4.0.0", + "npm-package-arg": "^13.0.0", + "path-is-inside": "^1.0.2", + "tmp": "^0.2.5", + "valid-identifier": "0.0.2" + }, + "engines": { + "node": ">=20.17.0 || >=22.9.0" + } + }, + "node_modules/cordova-create/node_modules/cordova-common": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-6.0.0.tgz", + "integrity": "sha512-16WPC1DuxVdshV3RoQUXqhcJVdhxWGwiFysA4TkYuboqoev6mgt0JuIJFxmQbzR/DuyuONaVe0L0O0Hf1C08Mg==", + "license": "Apache-2.0", + "dependencies": { + "@netflix/nerror": "^1.1.3", + "ansi": "^0.3.1", + "bplist-parser": "^0.3.2", + "elementtree": "^0.1.7", + "endent": "^2.1.0", + "fast-glob": "^3.3.3", + "plist": "^3.1.0" + }, + "engines": { + "node": ">=20.9.0" + } + }, + "node_modules/cordova-create/node_modules/isobject": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cordova-fetch": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cordova-fetch/-/cordova-fetch-5.0.0.tgz", + "integrity": "sha512-fsYnVfx32AOrFO6tw4EkzSig7WjNhze35dKIzdw20zTQetDKEfWA79PpCaoiSeahGi6O2MdnOFabLhEa8se6jg==", + "license": "Apache-2.0", + "dependencies": { + "@npmcli/arborist": "^9.1.3", + "cordova-common": "^6.0.0", + "execa": "^5.1.1", + "npm-package-arg": "^13.0.0", + "pacote": "^21.0.0", + "resolve": "^1.22.10", + "semver": "^7.7.2", + "which": "^5.0.0" + }, + "engines": { + "node": ">=20.9.0", + "npm": ">=8.1.0" + } + }, + "node_modules/cordova-fetch/node_modules/cordova-common": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-6.0.0.tgz", + "integrity": "sha512-16WPC1DuxVdshV3RoQUXqhcJVdhxWGwiFysA4TkYuboqoev6mgt0JuIJFxmQbzR/DuyuONaVe0L0O0Hf1C08Mg==", + "license": "Apache-2.0", + "dependencies": { + "@netflix/nerror": "^1.1.3", + "ansi": "^0.3.1", + "bplist-parser": "^0.3.2", + "elementtree": "^0.1.7", + "endent": "^2.1.0", + "fast-glob": "^3.3.3", + "plist": "^3.1.0" + }, + "engines": { + "node": ">=20.9.0" + } + }, + "node_modules/cordova-fetch/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/cordova-fetch/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cordova-fetch/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/cordova-lib": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/cordova-lib/-/cordova-lib-13.0.0.tgz", + "integrity": "sha512-y8WQ+J6JtiU9C72ujvI3p+ScFJkg0VJwNfaUCqk9nPAssw2C6HltHk+ik/WrLUn6uDmwAM6gmfGUIMU2iVrNxA==", + "license": "Apache-2.0", + "dependencies": { + "cordova-common": "^6.0.0", + "cordova-fetch": "^5.0.0", + "detect-indent": "^6.1.0", + "detect-newline": "^3.1.0", + "execa": "^5.1.1", + "globby": "^11.1.0", + "semver": "^7.7.2", + "stringify-package": "^1.0.1", + "write-file-atomic": "^7.0.0" + }, + "engines": { + "node": ">=20.17.0 || >=22.9.0" + } + }, + "node_modules/cordova-lib/node_modules/cordova-common": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-6.0.0.tgz", + "integrity": "sha512-16WPC1DuxVdshV3RoQUXqhcJVdhxWGwiFysA4TkYuboqoev6mgt0JuIJFxmQbzR/DuyuONaVe0L0O0Hf1C08Mg==", + "license": "Apache-2.0", + "dependencies": { + "@netflix/nerror": "^1.1.3", + "ansi": "^0.3.1", + "bplist-parser": "^0.3.2", + "elementtree": "^0.1.7", + "endent": "^2.1.0", + "fast-glob": "^3.3.3", + "plist": "^3.1.0" + }, + "engines": { + "node": ">=20.9.0" + } + }, + "node_modules/cordova-lib/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cordova-lib/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cordova-lib/node_modules/write-file-atomic": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-7.0.0.tgz", + "integrity": "sha512-YnlPC6JqnZl6aO4uRc+dx5PHguiR9S6WeoLtpxNT9wIG+BDya7ZNE1q7KOjVgaA73hKhKLpVPgJ5QA9THQ5BRg==", + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/cordova-plugin-advanced-http": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/cordova-plugin-advanced-http/-/cordova-plugin-advanced-http-3.3.1.tgz", + "integrity": "sha512-hESuB3mxIHCUrzb5lm7juda6PSNcC5N8Invizj5wGV2rSldCapiNxMTEpzKR1UVPDDP2XOtBzO0SAYS+3+g/ig==", + "dev": true, + "engines": [ + { + "name": "cordova", + "version": ">=4.0.0" + } + ], + "license": "MIT" + }, + "node_modules/cordova-plugin-browser": { + "resolved": "src/plugins/browser", + "link": true + }, + "node_modules/cordova-plugin-buildinfo": { + "resolved": "src/plugins/cordova-plugin-buildinfo", + "link": true + }, + "node_modules/cordova-plugin-device": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "cordovaDependencies": { + "3.0.0": { + "cordova": ">100", + "cordova-electron": ">=3.0.0" + } + } + } + }, + "node_modules/cordova-plugin-file": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-8.0.1.tgz", + "integrity": "sha512-LgFLNQN58xguoJkNc8eGBmg/Vuaah9lY3Nye27OAfWCKalXPRjExIg5r8L3qlfiJxzmzupjrF0M4KdU2Lovm3Q==", + "dev": true, + "engines": { + "cordovaDependencies": { + "5.0.0": { + "cordova-android": ">=6.3.0" + }, + "7.0.0": { + "cordova-android": ">=10.0.0" + }, + "8.0.0": { + "cordova-android": ">=12.0.0" + }, + "9.0.0": { + "cordova": ">100" + } + } + } + }, + "node_modules/cordova-plugin-ftp": { + "resolved": "src/plugins/ftp", + "link": true + }, + "node_modules/cordova-plugin-iap": { + "resolved": "src/plugins/iap", + "link": true + }, + "node_modules/cordova-plugin-sdcard": { + "resolved": "src/plugins/sdcard", + "link": true + }, + "node_modules/cordova-plugin-server": { + "resolved": "src/plugins/server", + "link": true + }, + "node_modules/cordova-plugin-sftp": { + "resolved": "src/plugins/sftp", + "link": true + }, + "node_modules/cordova-plugin-system": { + "resolved": "src/plugins/system", + "link": true + }, + "node_modules/cordova-plugin-websocket": { + "resolved": "src/plugins/websocket", + "link": true + }, + "node_modules/cordova/node_modules/cordova-common": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-6.0.0.tgz", + "integrity": "sha512-16WPC1DuxVdshV3RoQUXqhcJVdhxWGwiFysA4TkYuboqoev6mgt0JuIJFxmQbzR/DuyuONaVe0L0O0Hf1C08Mg==", + "license": "Apache-2.0", + "dependencies": { + "@netflix/nerror": "^1.1.3", + "ansi": "^0.3.1", + "bplist-parser": "^0.3.2", + "elementtree": "^0.1.7", + "endent": "^2.1.0", + "fast-glob": "^3.3.3", + "plist": "^3.1.0" + }, + "engines": { + "node": ">=20.9.0" + } + }, + "node_modules/cordova/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/core-js": { + "version": "3.45.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.45.0.tgz", + "integrity": "sha512-c2KZL9lP4DjkN3hk/an4pWn5b5ZefhRJnAc42n6LJ19kSnbeRbdQZE5dSeE2LBol1OwJD3X1BQvFTAsa8ReeDA==", + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat": { + "version": "3.45.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.45.0.tgz", + "integrity": "sha512-gRoVMBawZg0OnxaVv3zpqLLxaHmsubEGyTnqdpI/CEBvX4JadI1dMSHxagThprYRtSVbuQxvi6iUatdPxohHpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.25.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-pure": { + "version": "3.45.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.45.0.tgz", + "integrity": "sha512-OtwjqcDpY2X/eIIg1ol/n0y/X8A9foliaNt1dSK0gV3J2/zw+89FcNG3mPK+N8YWts4ZFUPxnrAzsxs/lf8yDA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + }, + "node_modules/crypto-random-string": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/css-loader": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz", + "integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==", + "dev": true, + "license": "MIT", + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.27.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/css-loader/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/css-loader/node_modules/semver": { + "version": "7.5.4", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/css-loader/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/cssesc": { + "version": "3.0.0", + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==", + "dev": true + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "license": "MIT" + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", + "dev": true, + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/dompurify": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.6.tgz", + "integrity": "sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", + "dev": true, + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/dot-prop": { + "version": "5.3.0", + "license": "MIT", + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/editor": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.199.tgz", + "integrity": "sha512-3gl0S7zQd88kCAZRO/DnxtBKuhMO4h0EaQIN3YgZfV6+pW+5+bf2AdQeHNESCoaQqo/gjGVYEf2YM4O5HJQqpQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/elementtree": { + "version": "0.1.7", + "license": "Apache-2.0", + "dependencies": { + "sax": "1.1.4" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/endent": { + "version": "2.1.0", + "license": "MIT", + "dependencies": { + "dedent": "^0.7.0", + "fast-json-parse": "^1.0.3", + "objectorarray": "^1.0.5" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/envinfo": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-module-lexer": { + "version": "1.2.1", + "dev": true, + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "5.0.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/events": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/exponential-backoff": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz", + "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==", + "license": "Apache-2.0" + }, + "node_modules/extsprintf": { + "version": "1.4.1", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-parse": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fastq": { + "version": "1.15.0", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/filesize": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-11.0.2.tgz", + "integrity": "sha512-s/iAeeWLk5BschUIpmdrF8RA8lhFZ/xDZgKw1Tan72oGws1/dFGB06nYEiyyssWUfjKNQTNRlrwMVjO9/hvXDw==", + "license": "BSD-3-Clause", + "engines": { + "node": ">= 10.4.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hosted-git-info": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.2.tgz", + "integrity": "sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==", + "license": "ISC", + "dependencies": { + "lru-cache": "^11.1.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/html-tag-js": { + "version": "2.4.15", + "resolved": "https://registry.npmjs.org/html-tag-js/-/html-tag-js-2.4.15.tgz", + "integrity": "sha512-ll1CsDRYPQiUYv8DPUUnDy6k9CTwc7jMObXr7BYV6iuLm7ZUZ4ZSo5CjaU7qh1qL7S4TGaGT+JKqYXksa8dWrg==", + "license": "MIT" + }, + "node_modules/htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", + "dev": true, + "license": "BSD-like" + }, + "node_modules/htmlparser2/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/htmlparser2/node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/htmlparser2/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "license": "BSD-2-Clause" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-walk": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-8.0.0.tgz", + "integrity": "sha512-FCeMZT4NiRQGh+YkeKMtWrOmBgWjHjMJ26WQWrRQyoyzqevdaGSakUaJW5xQYmjLlUVk2qUnCjYVBax9EKKg8A==", + "license": "ISC", + "dependencies": { + "minimatch": "^10.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "license": "MIT" + }, + "node_modules/immutable": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.3.tgz", + "integrity": "sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==", + "dev": true, + "license": "MIT" + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/ini": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz", + "integrity": "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/interpret": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ip-address": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-obj": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/isarray": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/java-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/java-parser/-/java-parser-3.0.1.tgz", + "integrity": "sha512-sDIR7u9b7O2JViNUxiZRhnRz7URII/eE7g2B+BmGxDeS6Ex3OYAcCyz5oh0H4LQ+hL/BS8OJTz8apMy9xtGmrQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "chevrotain": "11.0.3", + "chevrotain-allstar": "0.3.1", + "lodash": "4.17.21" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-base64": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz", + "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jshint": { + "version": "2.13.6", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", + "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.21", + "minimatch": "~3.0.2", + "strip-json-comments": "1.0.x" + }, + "bin": { + "jshint": "bin/jshint" + } + }, + "node_modules/jshint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jshint/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-nice": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", + "integrity": "sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw==", + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/jszip": { + "version": "3.10.1", + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/just-diff": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-6.0.2.tgz", + "integrity": "sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA==", + "license": "MIT" + }, + "node_modules/just-diff-apply": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz", + "integrity": "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw==", + "license": "MIT" + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/loader-utils": { + "version": "2.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "license": "MIT" + }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.zip": { + "version": "4.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-fetch-happen": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.3.tgz", + "integrity": "sha512-iyyEpDty1mwW3dGlYXAJqC/azFn5PPvgKVwXayOGBSmKLxhKZ9fg4qIan2ePpp1vJIwfFiO34LAPZgq9SZW9Aw==", + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^4.0.0", + "cacache": "^20.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^5.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^6.0.0", + "promise-retry": "^2.0.1", + "ssri": "^13.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/markdown-it-anchor": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-9.2.0.tgz", + "integrity": "sha512-sa2ErMQ6kKOA4l31gLGYliFQrMKkqSO0ZJgGhDHKijPf0pNFM9vghjAh3gn26pS4JDRs7Iwa9S36gxm3vgZTzg==", + "license": "Unlicense", + "peerDependencies": { + "@types/markdown-it": "*", + "markdown-it": "*" + } + }, + "node_modules/markdown-it-footnote": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-4.0.0.tgz", + "integrity": "sha512-WYJ7urf+khJYl3DqofQpYfEYkZKbmXmwxQV8c8mO/hGIhgZ1wOe7R4HLFNwqx7TjILbnC98fuyeSsin19JdFcQ==", + "license": "MIT" + }, + "node_modules/markdown-it-github-alerts": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-github-alerts/-/markdown-it-github-alerts-1.0.0.tgz", + "integrity": "sha512-RU3cbB/ewujrDpYNdyabvp4CscZ5J/3D71NWbJW+JSA0nplfutIXDMCwtGWlMLwzgBDAYkFMvYGkigq8nWOVdA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "markdown-it": ">= 13.0.0" + } + }, + "node_modules/markdown-it-task-lists": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/markdown-it-task-lists/-/markdown-it-task-lists-2.1.1.tgz", + "integrity": "sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==", + "license": "ISC" + }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==" + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/mini-css-extract-plugin": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.3.tgz", + "integrity": "sha512-tRA0+PsS4kLVijnN1w9jUu5lkxBwUk9E8SbgEB5dBJqchE6pVYdawROG6uQtpmAri7tdCK9i7b1bULeVWqS6Ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "schema-utils": "^4.0.0", + "tapable": "^2.2.1" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-5.0.0.tgz", + "integrity": "sha512-fiCdUALipqgPWrOVTz9fw0XhcazULXOSU6ie40DDbX1F49p1dBrSRBuswndTx1x3vEb/g0FT7vC4c4C2u/mh3A==", + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^3.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/mustache": { + "version": "4.2.0", + "license": "MIT", + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "dev": true, + "license": "MIT" + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/node-gyp": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-12.1.0.tgz", + "integrity": "sha512-W+RYA8jBnhSr2vrTtlPYPc1K+CSjGpVDRZxcqJcERZ8ND3A1ThWPHRwctTx3qC3oW99jt726jhdz3Y6ky87J4g==", + "license": "MIT", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^15.0.0", + "nopt": "^9.0.0", + "proc-log": "^6.0.0", + "semver": "^7.3.5", + "tar": "^7.5.2", + "tinyglobby": "^0.2.12", + "which": "^6.0.0" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/node-gyp/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-6.0.0.tgz", + "integrity": "sha512-f+gEpIKMR9faW/JgAgPK1D7mekkFoqbmiwvNzuhsHetni20QSgzg9Vhn0g2JSJkkfehQnqdUAx7/e15qS1lPxg==", + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true, + "license": "MIT" + }, + "node_modules/nopt": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-9.0.0.tgz", + "integrity": "sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw==", + "license": "ISC", + "dependencies": { + "abbrev": "^4.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-bundled": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-5.0.0.tgz", + "integrity": "sha512-JLSpbzh6UUXIEoqPsYBvVNVmyrjVZ1fzEFbqxKkTJQkWBO3xFzFT+KDnSKQWwOQNbuWRwt5LSD6HOTLGIWzfrw==", + "license": "ISC", + "dependencies": { + "npm-normalize-package-bin": "^5.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-install-checks": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-8.0.0.tgz", + "integrity": "sha512-ScAUdMpyzkbpxoNekQ3tNRdFI8SJ86wgKZSQZdUxT+bj0wVFpsEMWnkXP0twVe1gJyNF5apBWDJhhIbgrIViRA==", + "license": "BSD-2-Clause", + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-install-checks/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-5.0.0.tgz", + "integrity": "sha512-CJi3OS4JLsNMmr2u07OJlhcrPxCeOeP/4xq67aWNai6TNWWbTrlNDgl8NcFKVlcBKp18GPj+EzbNIgrBfZhsag==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-package-arg": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-13.0.2.tgz", + "integrity": "sha512-IciCE3SY3uE84Ld8WZU23gAPPV9rIYod4F+rc+vJ7h7cwAJt9Vk6TVsK60ry7Uj3SRS3bqRRIGuTp9YVlk6WNA==", + "license": "ISC", + "dependencies": { + "hosted-git-info": "^9.0.0", + "proc-log": "^6.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^7.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-package-arg/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-packlist": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-10.0.3.tgz", + "integrity": "sha512-zPukTwJMOu5X5uvm0fztwS5Zxyvmk38H/LfidkOMt3gbZVCyro2cD/ETzwzVPcWZA3JOyPznfUN/nkyFiyUbxg==", + "license": "ISC", + "dependencies": { + "ignore-walk": "^8.0.0", + "proc-log": "^6.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-pick-manifest": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-11.0.3.tgz", + "integrity": "sha512-buzyCfeoGY/PxKqmBqn1IUJrZnUi1VVJTdSSRPGI60tJdUhUoSQFhs0zycJokDdOznQentgrpf8LayEHyyYlqQ==", + "license": "ISC", + "dependencies": { + "npm-install-checks": "^8.0.0", + "npm-normalize-package-bin": "^5.0.0", + "npm-package-arg": "^13.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-pick-manifest/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/npm-registry-fetch": { + "version": "19.1.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-19.1.1.tgz", + "integrity": "sha512-TakBap6OM1w0H73VZVDf44iFXsOS3h+L4wVMXmbWOQroZgFhMch0juN6XSzBNlD965yIKvWg2dfu7NSiaYLxtw==", + "license": "ISC", + "dependencies": { + "@npmcli/redact": "^4.0.0", + "jsonparse": "^1.3.1", + "make-fetch-happen": "^15.0.0", + "minipass": "^7.0.2", + "minipass-fetch": "^5.0.0", + "minizlib": "^3.0.1", + "npm-package-arg": "^13.0.0", + "proc-log": "^6.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/objectorarray": { + "version": "1.0.5", + "license": "ISC" + }, + "node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.4.tgz", + "integrity": "sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pacote": { + "version": "21.0.4", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-21.0.4.tgz", + "integrity": "sha512-RplP/pDW0NNNDh3pnaoIWYPvNenS7UqMbXyvMqJczosiFWTeGGwJC2NQBLqKf4rGLFfwCOnntw1aEp9Jiqm1MA==", + "license": "ISC", + "dependencies": { + "@npmcli/git": "^7.0.0", + "@npmcli/installed-package-contents": "^4.0.0", + "@npmcli/package-json": "^7.0.0", + "@npmcli/promise-spawn": "^9.0.0", + "@npmcli/run-script": "^10.0.0", + "cacache": "^20.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^7.0.2", + "npm-package-arg": "^13.0.0", + "npm-packlist": "^10.0.1", + "npm-pick-manifest": "^11.0.1", + "npm-registry-fetch": "^19.0.0", + "proc-log": "^6.0.0", + "promise-retry": "^2.0.1", + "sigstore": "^4.0.0", + "ssri": "^13.0.0", + "tar": "^7.4.3" + }, + "bin": { + "pacote": "bin/index.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "license": "(MIT AND Zlib)" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-conflict-json": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-5.0.1.tgz", + "integrity": "sha512-ZHEmNKMq1wyJXNwLxyHnluPfRAFSIliBvbK/UiOceROt4Xh9Pz0fq49NytIaeaCUf5VR86hwQ/34FCcNU5/LKQ==", + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^5.0.0", + "just-diff": "^6.0.0", + "just-diff-apply": "^5.2.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/parse-conflict-json/node_modules/json-parse-even-better-errors": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-5.0.0.tgz", + "integrity": "sha512-ZF1nxZ28VhQouRWhUcVlUIN3qwSgPuswK05s/HIaoetAoE/9tngVmCHjSxmSQPav1nd+lPtTL0YZ/2AFdR/iYQ==", + "license": "MIT", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "license": "(WTFPL OR MIT)" + }, + "node_modules/path-key": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", + "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/plist": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz", + "integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==", + "license": "MIT", + "dependencies": { + "@xmldom/xmldom": "^0.8.8", + "base64-js": "^1.5.1", + "xmlbuilder": "^15.1.1" + }, + "engines": { + "node": ">=10.4.0" + } + }, + "node_modules/postcss": { + "version": "8.4.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", + "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-loader": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-8.1.1.tgz", + "integrity": "sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ==", + "dev": true, + "dependencies": { + "cosmiconfig": "^9.0.0", + "jiti": "^1.20.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "postcss": "^7.0.0 || ^8.0.1", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/postcss-loader/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postcss-loader/node_modules/semver": { + "version": "7.5.4", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postcss-loader/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", + "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", + "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.11", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-java": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/prettier-plugin-java/-/prettier-plugin-java-2.7.4.tgz", + "integrity": "sha512-RiRNkumIW9vaDpxirgIPI+oLSRmuCmoVZuTax9i3cWzWnxd+uKyAfDe4efS+ce00owAeh0a1DI5eFaH1xYWNPg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "java-parser": "3.0.1" + }, + "peerDependencies": { + "prettier": "^3.0.0" + } + }, + "node_modules/proc-log": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-6.1.0.tgz", + "integrity": "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "license": "MIT" + }, + "node_modules/proggy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/proggy/-/proggy-4.0.0.tgz", + "integrity": "sha512-MbA4R+WQT76ZBm/5JUpV9yqcJt92175+Y0Bodg3HgiXzrmKu7Ggq+bpn6y6wHH+gN9NcyKn3yg1+d47VaKwNAQ==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/promise-all-reject-late": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", + "integrity": "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw==", + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/promise-call-limit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-3.0.2.tgz", + "integrity": "sha512-mRPQO2T1QQVw11E7+UdCJu7S61eJVWknzml9sC1heAdj1jxl0fWMBypIt9ZOcLFf8FkG995ZD7RnVk7HH72fZw==", + "license": "ISC", + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/properties-parser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.6.0.tgz", + "integrity": "sha512-qvr2cSmoA0dln0MARAKwBzPkkXn7FqwX+RVVNpMdMJc7rt9mqO2cXwluxtux9fHrLhjnPFaQkS8BM0kFrTCnSw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/q": { + "version": "1.5.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/querystringify": { + "version": "2.2.0", + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/raw-loader": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/raw-loader/node_modules/ajv": { + "version": "6.12.6", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/raw-loader/node_modules/ajv-keywords": { + "version": "3.5.2", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/raw-loader/node_modules/json-schema-traverse": { + "version": "0.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/raw-loader/node_modules/schema-utils": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/read-chunk": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^4.0.1", + "with-open-file": "^0.1.6" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-cmd-shim": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-6.0.0.tgz", + "integrity": "sha512-1zM5HuOfagXCBWMN83fuFI/x+T/UhZ7k+KIzhrHXcQoeX5+7gmaDYjELQHmmzIodumBHeByBJT4QYS7ufAgs7A==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/rechoir": { + "version": "0.8.0", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", + "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regexpu-core": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz", + "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.2.0", + "regjsgen": "^0.8.0", + "regjsparser": "^0.12.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/regjsparser": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", + "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~3.0.2" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT", + "optional": true + }, + "node_modules/sass": { + "version": "1.90.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.90.0.tgz", + "integrity": "sha512-9GUyuksjw70uNpb1MTYWsH9MQHOHY6kwfnkafC24+7aOMZn9+rVMBxRbLvw756mrBFbIsFg6Xw9IkR2Fnn3k+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/sass-loader": { + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-16.0.5.tgz", + "integrity": "sha512-oL+CMBXrj6BZ/zOq4os+UECPL+bWqt6OAC6DWS8Ln8GZRcMDjlJ4JC3FBDuHJdYaFWIdKNIBYmtZtK2MaMkNIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/sass/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/sass/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/sax": { + "version": "1.1.4", + "license": "ISC" + }, + "node_modules/schema-utils": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", + "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "license": "MIT" + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "license": "ISC" + }, + "node_modules/sigstore": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-4.0.0.tgz", + "integrity": "sha512-Gw/FgHtrLM9WP8P5lLcSGh9OQcrTruWCELAiS48ik1QbL0cH+dfjomiRTUE9zzz+D1N6rOLkwXUvVmXZAsNE0Q==", + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^4.0.0", + "@sigstore/core": "^3.0.0", + "@sigstore/protobuf-specs": "^0.5.0", + "@sigstore/sign": "^4.0.0", + "@sigstore/tuf": "^4.0.0", + "@sigstore/verify": "^3.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "license": "MIT", + "dependencies": { + "ip-address": "^10.0.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.22", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", + "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", + "license": "CC0-1.0" + }, + "node_modules/sprintf": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/sprintf/-/sprintf-0.1.5.tgz", + "integrity": "sha512-4X5KsuXFQ7f+d7Y+bi4qSb6eI+YoifDTGr0MQJXRoYO7BO7evfRCjds6kk3z7l5CiJYxgDN1x5Er4WiyCt+zTQ==", + "deprecated": "The sprintf package is deprecated in favor of sprintf-js.", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.2.4" + } + }, + "node_modules/ssri": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-13.0.0.tgz", + "integrity": "sha512-yizwGBpbCn4YomB2lzhZqrHLJoqFGXihNbib3ozhqF/cIp5ue+xSmOQrjNasEE62hFxsCcg/V/z23t4n8jMEng==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/stringify-package": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stringify-package/-/stringify-package-1.0.1.tgz", + "integrity": "sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg==", + "deprecated": "This module is not used anymore, and has been replaced by @npmcli/package-json", + "license": "ISC" + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", + "dev": true, + "license": "MIT", + "bin": { + "strip-json-comments": "cli.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/style-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-4.0.0.tgz", + "integrity": "sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.27.0" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/systeminformation": { + "version": "5.27.14", + "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.27.14.tgz", + "integrity": "sha512-3DoNDYSZBLxBwaJtQGWNpq0fonga/VZ47HY1+7/G3YoIPaPz93Df6egSzzTKbEMmlzUpy3eQ0nR9REuYIycXGg==", + "license": "MIT", + "os": [ + "darwin", + "linux", + "win32", + "freebsd", + "openbsd", + "netbsd", + "sunos", + "android" + ], + "bin": { + "systeminformation": "lib/cli.js" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "Buy me a coffee", + "url": "https://www.buymeacoffee.com/systeminfo" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz", + "integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.1.0", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/terminal": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/terminal/-/terminal-0.1.4.tgz", + "integrity": "sha512-w6OAFpUO+TimZUdQ46dK3fYYOCCBIsS2QUfIEkzX21oJ8tvJOJvJkcmrbleLH5KG02SNohYFDj81bL3VPaULsQ==", + "dev": true, + "dependencies": { + "sprintf": ">= 0.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/terser": { + "version": "5.43.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.43.1.tgz", + "integrity": "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.14.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz", + "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tmp": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", + "integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==", + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/treeverse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-3.0.0.tgz", + "integrity": "sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==", + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tuf-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-4.0.0.tgz", + "integrity": "sha512-Lq7ieeGvXDXwpoSmOSgLWVdsGGV9J4a77oDTAPe/Ltrqnnm/ETaRlBAQTH5JatEh8KXuE6sddf9qAv1Q2282Hg==", + "license": "MIT", + "dependencies": { + "@tufjs/models": "4.0.0", + "debug": "^4.4.1", + "make-fetch-happen": "^15.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "license": "MIT", + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==" + }, + "node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", + "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unique-filename": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-5.0.0.tgz", + "integrity": "sha512-2RaJTAvAb4owyjllTfXzFClJ7WsGxlykkPvCr9pA//LD9goVq+m4PPAeBgNodGZ7nSrntT/auWpJ6Y5IFXcfjg==", + "license": "ISC", + "dependencies": { + "unique-slug": "^6.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/unique-slug": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-6.0.0.tgz", + "integrity": "sha512-4Lup7Ezn8W3d52/xBhZBVdx323ckxa7DEvd9kPQHppTkLoJXw6ltrBCyj5pnrxj0qKDxYMJ56CoxNuFCscdTiw==", + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/unique-string": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "license": "MIT", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/valid-identifier": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/valid-identifier/-/valid-identifier-0.0.2.tgz", + "integrity": "sha512-zaSmOW6ykXwrkX0YTuFUSoALNEKGaQHpxBJQLb3TXspRNDpBwbfrIQCZqAQ0LKBlKuyn2YOq7NNd6415hvZ33g==", + "license": "Apache-2.0" + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-name": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.0.tgz", + "integrity": "sha512-bwVk/OK+Qu108aJcMAEiU4yavHUI7aN20TgZNBj9MR2iU1zPUl1Z1Otr7771ExfYTPTvfN8ZJ1pbr5Iklgt4xg==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/vanilla-picker": { + "version": "2.12.3", + "resolved": "https://registry.npmjs.org/vanilla-picker/-/vanilla-picker-2.12.3.tgz", + "integrity": "sha512-qVkT1E7yMbUsB2mmJNFmaXMWE2hF8ffqzMMwe9zdAikd8u2VfnsVY2HQcOUi2F38bgbxzlJBEdS1UUhOXdF9GQ==", + "license": "ISC", + "dependencies": { + "@sphinxxxx/color-conversion": "^2.2.2" + } + }, + "node_modules/walk-up-path": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-4.0.0.tgz", + "integrity": "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==", + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/watchpack": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack": { + "version": "5.101.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.101.0.tgz", + "integrity": "sha512-B4t+nJqytPeuZlHuIKTbalhljIFXeNRqrUGAQgTGlfOl2lXXKXw+yZu6bicycP+PUlM44CxBjCFD6aciKFT3LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.15.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.24.0", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.2", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.2", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.11", + "watchpack": "^2.4.1", + "webpack-sources": "^3.3.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-6.0.1.tgz", + "integrity": "sha512-MfwFQ6SfwinsUVi0rNJm7rHZ31GyTcpVE5pgVA3hwFRb7COD4TzjUUwhGWKfO50+xdc2MQPuEBBJoqIMGt3JDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "^0.6.1", + "@webpack-cli/configtest": "^3.0.1", + "@webpack-cli/info": "^3.0.1", + "@webpack-cli/serve": "^3.0.1", + "colorette": "^2.0.14", + "commander": "^12.1.0", + "cross-spawn": "^7.0.3", + "envinfo": "^7.14.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^6.0.1" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.82.0" + }, + "peerDependenciesMeta": { + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/webpack-merge": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", + "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", + "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/which": { + "version": "2.0.2", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/with-open-file": { + "version": "0.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "p-finally": "^1.0.0", + "p-try": "^2.1.0", + "pify": "^4.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "license": "MIT" + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/xdg-basedir": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "license": "MIT", + "engines": { + "node": ">=8.0" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^7.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "src/plugins/browser": { + "name": "cordova-plugin-browser", + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "src/plugins/cordova-plugin-buildinfo": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "devDependencies": { + "jshint": "^2.6.0" + }, + "engines": { + "cordovaDependencies": { + "0.0.0": { + "cordova": ">=4.0.0" + }, + "2.0.0": { + "cordova": ">=5.4.0", + "cordova-android": ">=5.0.0" + }, + "3.0.0": { + "cordova": ">=5.4.0", + "cordova-android": ">=5.0.0" + }, + "4.0.0": { + "cordova": ">=5.4.0", + "cordova-android": ">=5.0.0" + }, + "5.0.0": { + "cordova": ">100" + } + } + } + }, + "src/plugins/custom-tabs": { + "name": "com.foxdebug.acode.rk.customtabs", + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "src/plugins/Executor": { + "name": "com.foxdebug.acode.rk.exec.terminal", + "version": "1.0.0", + "extraneous": true, + "license": "MIT" + }, + "src/plugins/ftp": { + "name": "cordova-plugin-ftp", + "version": "1.1.1", + "dev": true, + "license": "Apache-2.0" + }, + "src/plugins/iap": { + "name": "cordova-plugin-iap", + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "src/plugins/proot": { + "name": "com.foxdebug.acode.rk.exec.proot", + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "src/plugins/sdcard": { + "name": "cordova-plugin-sdcard", + "version": "1.1.0", + "dev": true, + "license": "ISC" + }, + "src/plugins/server": { + "name": "cordova-plugin-server", + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "src/plugins/sftp": { + "name": "cordova-plugin-sftp", + "version": "1.1.1", + "dev": true, + "license": "Apache-2.0" + }, + "src/plugins/system": { + "name": "cordova-plugin-system", + "version": "1.0.3", + "dev": true, + "license": "ISC" + }, + "src/plugins/terminal": { + "name": "com.foxdebug.acode.rk.exec.terminal", + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "src/plugins/websocket": { + "name": "cordova-plugin-websocket", + "version": "0.0.1", + "dev": true, + "license": "Apache-2.0" + } + } +} diff --git a/package.json b/package.json index da9f3c0f9..6f81a0789 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,19 @@ { "name": "com.foxdebug.acode", "displayName": "Acode", - "version": "1.4.165", + "version": "1.11.7", "description": "Acode is a code editor for android", - "main": "index.js", "scripts": { "lang": "node ./utils/lang.js", "build": "sh utils/scripts/build.sh", "start": "sh utils/scripts/start.sh", - "start:debug": "sh utils/scripts/start.sh", - "clean": "sh utils/scripts/clean.sh", + "clean": "sh utils/scripts/clean.sh android android", "plugin": "sh utils/scripts/plugin.sh", - "test": "jest", - "build-ace": "node ./utils/build-ace.js" + "setup": "node ./utils/setup.js", + "lint": "biome lint --write", + "format": "biome format --write", + "check": "biome check --write", + "updateAce": "node ./utils/updateAce.js" }, "keywords": [ "ecosystem:cordova" @@ -22,17 +23,23 @@ "cordova": { "plugins": { "cordova-clipboard": {}, - "cordova-plugin-vibration": {}, - "cordova-plugin-file": {}, - "cordova-plugin-buildinfo": {}, "cordova-plugin-device": {}, - "cordova-plugin-whitelist": {}, + "cordova-plugin-file": {}, + "cordova-plugin-server": {}, "cordova-plugin-ftp": {}, - "cordova-plugin-webserver": {}, - "cordova-plugin-sftp": {}, - "cordova-plugin-iap": {}, "cordova-plugin-sdcard": {}, - "cordova-plugin-system": {} + "cordova-plugin-iap": {}, + "cordova-plugin-advanced-http": { + "ANDROIDBLACKLISTSECURESOCKETPROTOCOLS": "SSLv3,TLSv1" + }, + "cordova-plugin-websocket": {}, + "cordova-plugin-buildinfo": {}, + "cordova-plugin-browser": {}, + "cordova-plugin-sftp": {}, + "cordova-plugin-system": {}, + "com.foxdebug.acode.rk.exec.proot": {}, + "com.foxdebug.acode.rk.exec.terminal": {}, + "com.foxdebug.acode.rk.customtabs": {} }, "platforms": [ "android" @@ -46,67 +53,82 @@ "url": "https://github.com/deadlyjack/acode/issues" }, "homepage": "https://github.com/deadlyjack/acode#readme", - "browserslist": [ - "> 50%", - "last 2 versions" - ], "devDependencies": { - "@babel/cli": "^7.16.8", - "@babel/plugin-transform-runtime": "^7.16.10", - "@babel/preset-env": "^7.16.11", - "@types/ace": "0.0.47", - "@types/url-parse": "^1.4.7", - "autoprefixer": "^10.4.2", - "babel-loader": "^8.2.2", - "cordova-android": "^9.1.0", + "@babel/core": "^7.28.0", + "@babel/plugin-transform-runtime": "^7.28.0", + "@babel/preset-env": "^7.28.0", + "@babel/runtime": "^7.28.2", + "@babel/runtime-corejs3": "^7.28.2", + "@biomejs/biome": "2.1.4", + "@types/ace": "^0.0.52", + "@types/url-parse": "^1.4.11", + "autoprefixer": "^10.4.21", + "babel-loader": "^10.0.0", + "com.foxdebug.acode.rk.customtabs": "file:src/plugins/custom-tabs", + "com.foxdebug.acode.rk.exec.proot": "file:src/plugins/proot", + "com.foxdebug.acode.rk.exec.terminal": "file:src/plugins/terminal", + "cordova-android": "^14.0.1", "cordova-clipboard": "^1.3.0", - "cordova-plugin-buildinfo": "^4.0.0", + "cordova-plugin-advanced-http": "^3.3.1", + "cordova-plugin-browser": "file:src/plugins/browser", + "cordova-plugin-buildinfo": "file:src/plugins/cordova-plugin-buildinfo", "cordova-plugin-device": "^2.0.3", - "cordova-plugin-file": "^6.0.2", + "cordova-plugin-file": "^8.0.1", "cordova-plugin-ftp": "file:src/plugins/ftp", "cordova-plugin-iap": "file:src/plugins/iap", - "cordova-plugin-sdcard": "^1.1.0", + "cordova-plugin-sdcard": "file:src/plugins/sdcard", + "cordova-plugin-server": "file:src/plugins/server", "cordova-plugin-sftp": "file:src/plugins/sftp", "cordova-plugin-system": "file:src/plugins/system", - "cordova-plugin-vibration": "^3.1.1", - "cordova-plugin-webserver": "file:src/plugins/webserver", - "cordova-plugin-whitelist": "^1.3.5", - "css-loader": "^6.2.0", - "mini-css-extract-plugin": "^2.5.2", - "node-sass": "^7.0.1", + "cordova-plugin-websocket": "file:src/plugins/websocket", + "css-loader": "^7.1.2", + "mini-css-extract-plugin": "^2.9.3", "path-browserify": "^1.0.1", - "postcss-loader": "^6.2.1", - "prettier": "2.5.1", - "prettier-plugin-java": "^1.6.1", + "postcss-loader": "^8.1.1", + "prettier": "^3.6.2", + "prettier-plugin-java": "^2.7.4", "raw-loader": "^4.0.2", - "sass-loader": "^12.4.0", - "style-loader": "^3.1.0", - "webpack": "^5.67.0", - "webpack-cli": "^4.7.0" + "sass": "^1.90.0", + "sass-loader": "^16.0.5", + "style-loader": "^4.0.0", + "terminal": "^0.1.4", + "webpack": "^5.101.0", + "webpack-cli": "^6.0.1" }, "dependencies": { - "@babel/core": "^7.16.10", - "@babel/runtime": "^7.16.7", - "@deadlyjack/ajax": "^1.0.9", - "autosize": "^5.0.0", - "axios": "^0.21.1", - "core-js": "^3.20.3", - "crypto": "^1.0.1", - "crypto-js": "^4.0.0", + "@deadlyjack/ajax": "^1.2.6", + "@ungap/custom-elements": "^1.3.0", + "@xterm/addon-attach": "^0.11.0", + "@xterm/addon-fit": "^0.10.0", + "@xterm/addon-image": "^0.8.0", + "@xterm/addon-search": "^0.15.0", + "@xterm/addon-unicode11": "^0.8.0", + "@xterm/addon-web-links": "^0.11.0", + "@xterm/addon-webgl": "^0.18.0", + "@xterm/xterm": "^5.5.0", + "autosize": "^6.0.1", + "cordova": "13.0.0", + "core-js": "^3.45.0", + "crypto-js": "^4.2.0", + "dompurify": "^3.2.6", + "escape-string-regexp": "^5.0.0", "esprima": "^4.0.1", - "filesize": "^8.0.7", - "glob": "^7.2.0", - "html-tag-js": "^1.0.2", - "irid": "^2.0.2", - "marked": "^4.0.10", - "mime-types": "^2.1.30", + "filesize": "^11.0.2", + "html-tag-js": "^2.4.15", + "js-base64": "^3.7.7", + "jszip": "^3.10.1", + "markdown-it": "^14.1.0", + "markdown-it-anchor": "^9.2.0", + "markdown-it-footnote": "^4.0.0", + "markdown-it-github-alerts": "^1.0.0", + "markdown-it-task-lists": "^2.1.1", + "mime-types": "^3.0.1", + "minimatch": "^10.0.3", + "moment": "^2.30.1", "mustache": "^4.2.0", - "url-parse": "^1.5.4", - "utf8": "^3.0.0", - "vanilla-picker": "^2.11.2", - "yargs": "^17.3.1" + "url-parse": "^1.5.10", + "vanilla-picker": "^2.12.3", + "yargs": "^18.0.0" }, - "resolutions": { - "dummy": "^0.1.5" - } -} \ No newline at end of file + "browserslist": "cover 100%,not android < 5" +} diff --git a/plugins/android.json b/plugins/android.json deleted file mode 100644 index fe4ae31f8..000000000 --- a/plugins/android.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "prepare_queue": { - "installed": [], - "uninstalled": [] - }, - "config_munge": { - "files": {} - }, - "installed_plugins": { - "cordova-clipboard": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-buildinfo": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-device": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-file": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-ftp": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-iap": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-sdcard": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-sftp": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-system": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-vibration": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-webserver": { - "PACKAGE_NAME": "com.foxdebug.acode" - }, - "cordova-plugin-whitelist": { - "PACKAGE_NAME": "com.foxdebug.acode" - } - }, - "dependent_plugins": {} -} diff --git a/plugins/cordova-clipboard/LICENSE b/plugins/cordova-clipboard/LICENSE deleted file mode 100644 index 9593150df..000000000 --- a/plugins/cordova-clipboard/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Verso Solutions LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/cordova-clipboard/README.md b/plugins/cordova-clipboard/README.md deleted file mode 100644 index c786b1df7..000000000 --- a/plugins/cordova-clipboard/README.md +++ /dev/null @@ -1,64 +0,0 @@ -Clipboard -========= - -Clipboard management plugin for Cordova/PhoneGap that supports iOS, Android, and Windows Phone 8. - -## Usage - -``` -cordova plugin add cordova-clipboard -``` - -The plugin creates the object `cordova.plugins.clipboard` with the methods `copy(text, onSuccess, onError)`, `paste(onSuccess, onError)` and `clear(onSuccess, onError)` - -Example: - - var text = "Hello World!"; - - cordova.plugins.clipboard.copy(text); - - cordova.plugins.clipboard.paste(function (text) { alert(text); }); - - cordova.plugins.clipboard.clear(); - -## Notes - -### All platforms - -- The plugin only works with text content. - -### Windows Phone - -- The Windows Phone platform doesn't allow applications to read the content of the clipboard. Using the `paste` method will return an error. - -### Android - -- The minimum supported API Level is 11. Make sure that `minSdkVersion` is larger or equal to 11 in `AndroidManifest.xml`. - -## Acknowledgements - -This plugin was inspired by [ClipboardManagerPlugin](https://github.com/jacob/ClipboardManagerPlugin) (Android) and [ClipboardPlugin](https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/ClipboardPlugin) (iOS). - -## License - -The MIT License (MIT) - -Copyright (c) 2013 Verso Solutions LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/plugins/cordova-clipboard/package.json b/plugins/cordova-clipboard/package.json deleted file mode 100644 index 06d32a51e..000000000 --- a/plugins/cordova-clipboard/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "cordova-clipboard", - "version": "1.3.0", - "description": "Clipboard management plugin for Cordova/PhoneGap that supports iOS, Android, and WP8", - "cordova": { - "id": "cordova-clipboard", - "platforms": [ - "android", - "ios", - "wp8" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ihadeed/cordova-clipboard.git" - }, - "keywords": [ - "cordova", - "plugin", - "clipboard", - "phonegap", - "ionic" - ], - "author": "Ibrahim Hadeed", - "license": "MIT", - "bugs": { - "url": "https://github.com/ihadeed/cordova-clipboard/issues" - }, - "homepage": "https://github.com/ihadeed/cordova-clipboard#readme" -} diff --git a/plugins/cordova-clipboard/plugin.xml b/plugins/cordova-clipboard/plugin.xml deleted file mode 100644 index 698bab5ab..000000000 --- a/plugins/cordova-clipboard/plugin.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - Clipboard - - Clipboard management plugin for Cordova/PhoneGap - - Verso Solutions LLC - - clipboard,copy,paste,clear - - MIT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/cordova-clipboard/src/android/Clipboard.java b/plugins/cordova-clipboard/src/android/Clipboard.java deleted file mode 100644 index 8f8a9b87a..000000000 --- a/plugins/cordova-clipboard/src/android/Clipboard.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.verso.cordova.clipboard; - -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.PluginResult; -import org.apache.cordova.CallbackContext; - -import org.json.JSONArray; -import org.json.JSONException; - -import android.content.Context; -import android.content.ClipboardManager; -import android.content.ClipData; -import android.content.ClipDescription; - -public class Clipboard extends CordovaPlugin { - - private static final String actionCopy = "copy"; - private static final String actionPaste = "paste"; - private static final String actionClear = "clear"; - - @Override - public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { - ClipboardManager clipboard = (ClipboardManager) cordova.getActivity().getSystemService(Context.CLIPBOARD_SERVICE); - - if (action.equals(actionCopy)) { - try { - String text = args.getString(0); - ClipData clip = ClipData.newPlainText("Text", text); - - clipboard.setPrimaryClip(clip); - - callbackContext.success(text); - - return true; - } catch (JSONException e) { - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION)); - } catch (Exception e) { - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, e.toString())); - } - } else if (action.equals(actionPaste)) { - try { - String text = ""; - - ClipData clip = clipboard.getPrimaryClip(); - if (clip != null) { - ClipData.Item item = clip.getItemAt(0); - text = item.getText().toString(); - } - callbackContext.success(text); - - return true; - } catch (Exception e) { - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, e.toString())); - } - } else if (action.equals(actionClear)) { - try { - ClipData clip = ClipData.newPlainText("", ""); - clipboard.setPrimaryClip(clip); - - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK)); - - return true; - } catch (Exception e) { - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, e.toString())); - } - } - - return false; - } -} - - diff --git a/plugins/cordova-clipboard/src/ios/CDVClipboard.h b/plugins/cordova-clipboard/src/ios/CDVClipboard.h deleted file mode 100644 index a3576e3f8..000000000 --- a/plugins/cordova-clipboard/src/ios/CDVClipboard.h +++ /dev/null @@ -1,10 +0,0 @@ -#import -#import - -@interface CDVClipboard : CDVPlugin {} - -- (void)copy:(CDVInvokedUrlCommand*)command; -- (void)paste:(CDVInvokedUrlCommand*)command; -- (void)clear:(CDVInvokedUrlCommand*)command; - -@end \ No newline at end of file diff --git a/plugins/cordova-clipboard/src/ios/CDVClipboard.m b/plugins/cordova-clipboard/src/ios/CDVClipboard.m deleted file mode 100644 index 395cc4c4f..000000000 --- a/plugins/cordova-clipboard/src/ios/CDVClipboard.m +++ /dev/null @@ -1,43 +0,0 @@ -#import -#import -#import -#import "CDVClipboard.h" - -@implementation CDVClipboard - -- (void)copy:(CDVInvokedUrlCommand*)command { - [self.commandDelegate runInBackground:^{ - UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; - NSString *text = [command.arguments objectAtIndex:0]; - - pasteboard.string = text; - - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:text]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - }]; -} - -- (void)paste:(CDVInvokedUrlCommand*)command { - [self.commandDelegate runInBackground:^{ - UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; - NSString *text = [pasteboard valueForPasteboardType:@"public.text"]; - if (text == nil) { - text = @""; - } - - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:text]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - }]; -} - -- (void)clear:(CDVInvokedUrlCommand*)command { - [self.commandDelegate runInBackground:^{ - UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; - [pasteboard setValue:@"" forPasteboardType:UIPasteboardNameGeneral]; - - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:true]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - }]; -} - -@end diff --git a/plugins/cordova-clipboard/src/osx/CDVClipboard.h b/plugins/cordova-clipboard/src/osx/CDVClipboard.h deleted file mode 100644 index 29a6c035b..000000000 --- a/plugins/cordova-clipboard/src/osx/CDVClipboard.h +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import - -@interface CDVClipboard : CDVPlugin {} - -- (void)copy:(CDVInvokedUrlCommand*)command; -- (void)paste:(CDVInvokedUrlCommand*)command; - -@end \ No newline at end of file diff --git a/plugins/cordova-clipboard/src/osx/CDVClipboard.m b/plugins/cordova-clipboard/src/osx/CDVClipboard.m deleted file mode 100644 index aafaedf16..000000000 --- a/plugins/cordova-clipboard/src/osx/CDVClipboard.m +++ /dev/null @@ -1,34 +0,0 @@ -#import -#import -#import -#import "CDVClipboard.h" - -@implementation CDVClipboard - -- (void)copy:(CDVInvokedUrlCommand*)command { - [self.commandDelegate runInBackground:^{ - NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; - NSString *text = [command.arguments objectAtIndex:0]; - - [pasteboard clearContents]; - [pasteboard setString:text forType:NSStringPboardType]; - - CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:text]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - }]; -} - -- (void)paste:(CDVInvokedUrlCommand*)command { - [self.commandDelegate runInBackground:^{ - NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; - NSString *text = [pasteboard stringForType:NSPasteboardTypeString]; - if (text == nil) { - text = @""; - } - - CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:text]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - }]; -} - -@end diff --git a/plugins/cordova-clipboard/src/windows/ClipboardProxy.js b/plugins/cordova-clipboard/src/windows/ClipboardProxy.js deleted file mode 100644 index fbbe951a1..000000000 --- a/plugins/cordova-clipboard/src/windows/ClipboardProxy.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -/*jslint sloppy:true */ -/*global Windows:true, require, document, window, module */ - -var cordova = require('cordova'); - -module.exports = { - - copy: function (successCallback, errorCallback, args) { - try { - var text = args[0]; - - var dataPackage = new Windows.ApplicationModel.DataTransfer.DataPackage(); - dataPackage.setText(text); - Windows.ApplicationModel.DataTransfer.Clipboard.setContent(dataPackage); - successCallback(text); - } catch (e) { - errorCallback(e);; - } - }, - paste: function (successCallback, errorCallback, args) { - try { - var text = ""; - - var dataPackageView = Windows.ApplicationModel.DataTransfer.Clipboard.getContent(); - if (dataPackageView.contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.text)) { - dataPackageView.getTextAsync().then(function (value) { - text = value; - successCallback(text); - }); - } - } catch (e) { - errorCallback(e);; - } - }, - clear: function (successCallback, errorCallback, args) { - try { - if(Windows.ApplicationModel.DataTransfer.Clipboard.getContent()){ - successCallback(true); - } - } catch (e) { - errorCallback(e);; - } - } -}; // exports - -require("cordova/exec/proxy").add("Clipboard", module.exports); \ No newline at end of file diff --git a/plugins/cordova-clipboard/src/wp8/Clipboard.cs b/plugins/cordova-clipboard/src/wp8/Clipboard.cs deleted file mode 100644 index 5ade987f1..000000000 --- a/plugins/cordova-clipboard/src/wp8/Clipboard.cs +++ /dev/null @@ -1,74 +0,0 @@ -using WPCordovaClassLib.Cordova; -using WPCordovaClassLib.Cordova.Commands; -using WPCordovaClassLib.Cordova.JSON; - -namespace Cordova.Extension.Commands -{ - public class Clipboard : BaseCommand - { - public void copy(string options) - { - string text = ""; - - try - { - text = JsonHelper.Deserialize(options)[0]; - } - catch - { - DispatchCommandResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION)); - - return; - } - - try - { - System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => - { - System.Windows.Clipboard.SetText(text); - }); - DispatchCommandResult(new PluginResult(PluginResult.Status.OK, text)); - } - catch - { - DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR)); - } - - } - - public void paste() - { - string text = ""; - - System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => - { - try - { - text = System.Windows.Clipboard.GetText(); - - DispatchCommandResult(new PluginResult(PluginResult.Status.OK, text)); - } - catch - { - DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR)); - } - }); - } - - public void clear() - { - System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() => - { - try - { - System.Windows.Clipboard.Clear(); - DispatchCommandResult(new PluginResult(PluginResult.Status.OK, true)); - } - catch - { - DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR)); - } - }); - } - } -} \ No newline at end of file diff --git a/plugins/cordova-clipboard/www/clipboard.js b/plugins/cordova-clipboard/www/clipboard.js deleted file mode 100644 index 35153c390..000000000 --- a/plugins/cordova-clipboard/www/clipboard.js +++ /dev/null @@ -1,44 +0,0 @@ -var cordova = require('cordova'); - -/** - * Clipboard plugin for Cordova - * - * @constructor - */ -function Clipboard () {} - -/** - * Sets the clipboard content - * - * @param {String} text The content to copy to the clipboard - * @param {Function} onSuccess The function to call in case of success (takes the copied text as argument) - * @param {Function} onFail The function to call in case of error - */ -Clipboard.prototype.copy = function (text, onSuccess, onFail) { - if (typeof text === "undefined" || text === null) text = ""; - cordova.exec(onSuccess, onFail, "Clipboard", "copy", [text]); -}; - -/** - * Gets the clipboard content - * - * @param {Function} onSuccess The function to call in case of success - * @param {Function} onFail The function to call in case of error - */ -Clipboard.prototype.paste = function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, "Clipboard", "paste", []); -}; - -/** - * Clear the clipboard content - * - * @param {Function} onSuccess The function to call in case of success - * @param {Function} onFail The function to call in case of error - */ -Clipboard.prototype.clear = function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, "Clipboard", "clear", []); -}; - -// Register the plugin -var clipboard = new Clipboard(); -module.exports = clipboard; diff --git a/plugins/cordova-plugin-buildinfo/README-jp.md b/plugins/cordova-plugin-buildinfo/README-jp.md deleted file mode 100644 index 35f98bcba..000000000 --- a/plugins/cordova-plugin-buildinfo/README-jp.md +++ /dev/null @@ -1,296 +0,0 @@ -# cordova-plugin-buildinfo - -このプラグインは、BuildInfoをグローバルのオブジェクトとして定義します。 - -BuildInfoは deviceready イベントが発火した時点で有効になっています。 - -```js -document.addEventListener("deviceready", onDeviceReady, false); - -function onDeviceReady() { - console.log('BuildInfo.baseUrl =' + BuildInfo.baseUrl); - console.log('BuildInfo.packageName =' + BuildInfo.packageName); - console.log('BuildInfo.basePackageName=' + BuildInfo.basePackageName); - console.log('BuildInfo.displayName =' + BuildInfo.displayName); - console.log('BuildInfo.name =' + BuildInfo.name); - console.log('BuildInfo.version =' + BuildInfo.version); - console.log('BuildInfo.versionCode =' + BuildInfo.versionCode); - console.log('BuildInfo.debug =' + BuildInfo.debug); - console.log('BuildInfo.buildType =' + BuildInfo.buildType); - console.log('BuildInfo.flavor =' + BuildInfo.flavor); - console.log('BuildInfo.buildDate =' + BuildInfo.buildDate); - console.log('BuildInfo.installDate =' + BuildInfo.installDate); -} -``` - -## インストール - -```sh -cordova plugin add cordova-plugin-buildinfo -``` - -## サポートプラットフォーム - -* Android -* iOS -* Windows -* macOS(OS X) -* Browser -* Electron - -## プロパティ - -- [`BuildInfo.baseUrl`](#BuildInfo.baseUrl) -- [`BuildInfo.packageName`](#BuildInfo.packageName) -- [`BuildInfo.basePackageName`](#BuildInfo.basePackageName) -- [`BuildInfo.displayName`](#BuildInfo.displayName) -- [`BuildInfo.name`](#BuildInfo.name) -- [`BuildInfo.version`](#BuildInfo.version) -- [`BuildInfo.versionCode`](#BuildInfo.versionCode) -- [`BuildInfo.debug`](#BuildInfo.debug) -- [`BuildInfo.buildType`](#BuildInfo.buildType) -- [`BuildInfo.flavor`](#BuildInfo.flavor) -- [`BuildInfo.buildDate`](#BuildInfo.buildDate) -- [`BuildInfo.installDate`](#BuildInfo.installDate) -- [`BuildInfo.windows`](#BuildInfo.windows) - - [`logo`](#BuildInfo.windows.logo) - - [`version`](#BuildInfo.windows.version) - -### BuildInfo.baseUrl - -cordova.js ファイルがあるパスを取得します。 -パスの最後は "/" が付きます。 - -|Platform|Value|Type| -|--------|-----|----| -|Android|Path|String| -|iOS|Path|String| -|Windows|Path|String| -|macOS(OS X)|Path|String| -|Browser|Path|String| -|Electron|Path|String| - -### BuildInfo.packageName - -Application IDをpackageNameとして取得します。 - -|Platform|Value|Type| -|--------|-----|----| -|Android|Package Name|String| -|iOS|Bundle Identifier|String| -|Windows|Identity name|String| -|macOS(OS X)|Bundle Identifier|String| -|Browser|config.xml の widget 要素に設定されている id 属性の値が入ります|String| -|Electron|config.xml の widget 要素に設定されている id 属性の値が入ります|String| - - -### BuildInfo.basePackageName - -Androidのみ。 - -BuildConfigクラスのpackageNameを取得します。 - -ビルドタイプやFlavorを利用すると、config.xmlのwidget要素で指定したidとは異なるパッケージ名を指定できるため、BuildConfigクラスが属するパッケージ名を取得するためのプロパティです。 -(config.xmlのwidget要素にあるid属性と同じになるはずです) - - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfigクラスにあるパッケージ名|String| -|iOS|Bundle Identifier(BuildInfo.packageNameと同一)|String| -|Windows|Identity name(BuildInfo.packageNameと同一)|String| -|macOS(OS X)|Bundle Identifier(BuildInfo.packageNameと同一)|String| -|Browser|BuildInfo.packageName と同一|String| -|Electron|BuildInfo.packageName と同一|String| - - -### BuildInfo.displayName - -アプリのホーム画面での表示名を取得します。 - -|Platform|Value|Type| -|--------|-----|----| -|Android|Application Label|String| -|iOS|CFBundleDisplayName(存在しない場合はCFBundleName)|String| -|Windows|AppxManifest.xmlのVisualElements要素にあるDisplayName属性|String| -|macOS(OS X)|CFBundleDisplayName(存在しない場合はCFBundleName)|String| -|Browser|config.xml の name 要素の short 属性の値が入ります|String| -|Electron|config.xml の name 要素の short 属性の値が入ります|String| - -### BuildInfo.name - -アプリの名前を取得します。 -(iOSのみ。Androidでは、displayNameと同一になります) - -|Platform|Value|Type| -|--------|-----|----| -|Android|Application Label(BuildInfo.displayNameと同一)|String| -|iOS|CFBundleName|String| -|Windows|Windows Store display name|String| -|macOS(OS X)|CFBundleName|String| -|Browser|config.xml の name 要素の内容が入ります|String| -|Electron|config.xml の name 要素の内容が入ります|String| - - -### BuildInfo.version - -バージョンを取得します。 - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.VERSION_NAME|String| -|iOS|CFBundleShortVersionString|String| -|Windows|Major.Minor.Build 例) "1.2.3"|String| -|macOS(OS X)|CFBundleShortVersionString|String| -|Browser|config.xml の widget 要素の version 属性の値が入ります|String| -|Electron|config.xml の widget 要素の version 属性の値が入ります|String| - - -### BuildInfo.versionCode - -Version Codeを取得します。 -AndroidではINT型で提供されます。 - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.VERSION_CODE|int| -|iOS|CFBundleVersion|string| -|Windows|Major.Minor.Build.Revision 例) "1.2.3.4"|String| -|macOS(OS X)|CFBundleVersion|string| -|Browser|BuildInfo.version と同一|String| -|Electron|BuildInfo.version と同一|String| - - -### BuildInfo.debug - -デバッグビルドかどうかを取得します。 - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.DEBUG|Boolean| -|iOS|defined "DEBUG" is true|Boolean| -|Windows|isDevelopmentMode is true|Boolean| -|Browser|常に false|Boolean| -|Electron|```cordova build electron --debug``` とした場合 true となります|Boolean| - - -### BuildInfo.buildType - -ビルドタイプを取得します。(AndroidおよびWindowsのみ) - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.BUILD_TYPE|String| -|iOS|empty string|String| -|Windows|"release" or "debug"|String| -|macOS(OS X)|empty string|String| -|Browser|empty string|String| -|Electron|empty string|String| - - -### BuildInfo.flavor - -フレーバーを取得します。(Androidのみ) - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.FLAVOR|String| -|iOS|empty string|String| -|Windows|empty string|String| -|macOS(OS X)|empty string|String| -|Browser|empty string|String| -|Electron|empty string|String| - - -### BuildInfo.buildDate - -Dateオブジェクトとしてビルド日時を取得します。 - -注意: - -- Aandroid: BuildInfo.gradeファイルをAndroidプロジェクトに追加します。 - BuildInfo.gradeファイルは、BuildConfigクラスに_BUILDINFO_TIMESTAMPというプロパティを追加します。 -- Windows: buildinfo.resjsonファイルをWindowsプロジェクトのstringsフォルダに追加します。 - また、buildinfo.resjsonファイルはCordovaApp.projitemsファイルに追記されたタスクよにりビルド実行時に書き換えられます。 -- Browser と Electron: ```cordova prepare``` が実行されたタイミングで - platforms/browser/www/plugins/cordova-plugin-buildinfo/src/browser/BuildInfoProxy.js - (または platforms/electron/www/plugins/cordova-plugin-buildinfo/src/browser/BuildInfoProxy.js) - ファイル内にビルド日時を埋め込みます。 - ```cordova prepare``` は、```cordova build```、```cordova run```、```cordova platform add```の場合も実行されます。 - (参照: [Hooks Guide - Apache Cordova](https://cordova.apache.org/docs/en/9.x/guide/appdev/hooks/index.html)) - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.\_BUILDINFO\_TIMESTAMP value|Date| -|iOS|メインバンドルのexecutionPathから取得したInfo.plistの更新日時|Date| -|Windows|文字列リソースの "/buildinfo/Timestamp" 値を返します|Date| -|macOS(OS X)|メインバンドルのリソースから取得したconfig.xmlの更新日時|Date| -|Browser|```cordova prepare```が実行された日時|Date| -|Electron|```cordova prepare```が実行された日時|Date| - - -### BuildInfo.installDate - -Dateオブジェクトとしてインストール日時を返します - -注意: -- Browser と Electron: インストール日時は不明です。 - -|Platform|Value|Type| -|--------|-----|----| -|Android|PackageInfoのfirstInstallTimeプロパティ|Date| -|iOS|documentディレクトリの作成日時|Date| -|Windows|Windows.ApplicatinoModel.Package.currentのinstalledDateプロパティ|Date| -|macOS(OS X)|アプリケーションパッケージのFile Metadataに記録されている kMDItemDateAdded の日時|Date| -|Browser|常に null|null| -|Electron|常に null|null| - - -### BuildInfo.windows - -Windowsのみ。 - -Windowsの追加情報を格納しています。 - -|Platform|Value|Type| -|--------|-----|----| -|Android|(未定義)|undefined| -|iOS|(未定義)|undefined| -|Windows|Object|Object| -|macOS(OS X)|(未定義)|undefined| -|Browser|(未定義)|undefined| -|Electron|(未定義)|undefined| - -|Property name|Value|Type| -|-------------|-----|----| -|architecture|Windows.ApplicationModel.Package.current.id.architecture|integer| -|description|Windows.ApplicationModel.Package.current.description|String| -|displayName|Windows.ApplicationModel.Package.current.displayName|String| -|familyName|Windows.ApplicationModel.Package.current.id.familyName|String| -|fullName|Windows.ApplicationModel.Package.current.id.fullName|String| -|logo|Object|Object| -|publisher|Windows.ApplicationModel.Package.current.id.publisher|String| -|publisherId|Windows.ApplicationModel.Package.current.id.publisherId|String| -|publisherDisplayName|Windows.ApplicationModel.Package.current.publisherDisplayName|String| -|resourceId|Windows.ApplicationModel.Package.current.id.resourceId|String| -|version|Windows.ApplicationModel.Package.current.id.version|Object| - -#### BuildInfo.windows.logo - -|Property name|Value|Type| -|-------------|-----|----| -|absoluteCannonicalUri|Windows.ApplicationModel.Package.logo.absoluteCanonicalUri|String| -|absoluteUri|Windows.ApplicationModel.Package.logo.absoluteUri|String| -|displayIri|Windows.ApplicationModel.Package.logo.displayIri|String| -|displayUri|Windows.ApplicationModel.Package.logo.displayUri|String| -|path|Windows.ApplicationModel.Package.logo.path|String| -|rawUri|Windows.ApplicationModel.Package.logo.rawUri|String| - -#### BuildInfo.windows.version - -|Property name|Value|Type| -|-------------|-----|----| -|major|Windows.ApplicationModel.Package.current.id.version.major|integer| -|minor|Windows.ApplicationModel.Package.current.id.version.minor|integer| -|build|Windows.ApplicationModel.Package.current.id.version.build|integer| -|revision|Windows.ApplicationModel.Package.current.id.version.revision|integer| diff --git a/plugins/cordova-plugin-buildinfo/README.md b/plugins/cordova-plugin-buildinfo/README.md deleted file mode 100644 index d714e9bb4..000000000 --- a/plugins/cordova-plugin-buildinfo/README.md +++ /dev/null @@ -1,303 +0,0 @@ -[![Build Status](https://travis-ci.org/lynrin/cordova-plugin-buildinfo.svg?branch=master)](https://travis-ci.org/lynrin/cordova-plugin-buildinfo) -[![Code Climate](https://codeclimate.com/github/lynrin/cordova-plugin-buildinfo/badges/gpa.svg)](https://codeclimate.com/github/lynrin/cordova-plugin-buildinfo) -[![MIT License](https://img.shields.io/github/license/lynrin/cordova-plugin-buildinfo)](LICENSE) -[![downloads](https://img.shields.io/npm/dm/cordova-plugin-buildinfo)](https://www.npmjs.com/package/cordova-plugin-buildinfo) - - -# cordova-plugin-buildinfo - -This plugin defines a global BuildInfo object. - -BuildInfo object is available at the time the deviceready event fires. - -```js -document.addEventListener("deviceready", onDeviceReady, false); - -function onDeviceReady() { - console.log('BuildInfo.baseUrl =' + BuildInfo.baseUrl); - console.log('BuildInfo.packageName =' + BuildInfo.packageName); - console.log('BuildInfo.basePackageName=' + BuildInfo.basePackageName); - console.log('BuildInfo.displayName =' + BuildInfo.displayName); - console.log('BuildInfo.name =' + BuildInfo.name); - console.log('BuildInfo.version =' + BuildInfo.version); - console.log('BuildInfo.versionCode =' + BuildInfo.versionCode); - console.log('BuildInfo.debug =' + BuildInfo.debug); - console.log('BuildInfo.buildType =' + BuildInfo.buildType); - console.log('BuildInfo.flavor =' + BuildInfo.flavor); - console.log('BuildInfo.buildDate =' + BuildInfo.buildDate); - console.log('BuildInfo.installDate =' + BuildInfo.installDate); -} -``` - -## Installation - -```sh -cordova plugin add cordova-plugin-buildinfo -``` - -## Supported Platforms - -* Android -* iOS -* Windows -* macOS(OS X) -* Browser -* Electron - -## Properties - -- [`BuildInfo.baseUrl`](#BuildInfo.baseUrl) -- [`BuildInfo.packageName`](#BuildInfo.packageName) -- [`BuildInfo.basePackageName`](#BuildInfo.basePackageName) -- [`BuildInfo.displayName`](#BuildInfo.displayName) -- [`BuildInfo.name`](#BuildInfo.name) -- [`BuildInfo.version`](#BuildInfo.version) -- [`BuildInfo.versionCode`](#BuildInfo.versionCode) -- [`BuildInfo.debug`](#BuildInfo.debug) -- [`BuildInfo.buildType`](#BuildInfo.buildType) -- [`BuildInfo.flavor`](#BuildInfo.flavor) -- [`BuildInfo.buildDate`](#BuildInfo.buildDate) -- [`BuildInfo.installDate`](#BuildInfo.installDate) -- [`BuildInfo.windows`](#BuildInfo.windows) - - [`logo`](#BuildInfo.windows.logo) - - [`version`](#BuildInfo.windows.version) - -### BuildInfo.baseUrl - -Get the cordova.js file exists path. -Path last character is '/'. - -|Platform|Value|Type| -|--------|-----|----| -|Android|Path|String| -|iOS|Path|String| -|Windows|Path|String| -|macOS(OS X)|Path|String| -|Browser|Path|String| -|Electron|Path|String| - -### BuildInfo.packageName - -Get the packageName of Application ID. - -|Platform|Value|Type| -|--------|-----|----| -|Android|Package Name|String| -|iOS|Bundle Identifier|String| -|Windows|Identity name|String| -|macOS(OS X)|Bundle Identifier|String| -|Browser|Get the id attribute of the widget element in config.xml file.|String| -|Electron|Get the id attribute of the widget element in config.xml file.|String| - - -### BuildInfo.basePackageName - -Android only. - -Get the packageName of BuildConfig class. - -If you use the configure of "build types" or "product flavors", because you can specify a different package name is the id attribute of the widget element of config.xml, is the property to get the package name that BuildConfig class belongs. -(ought be the same as the id attribute of the widget element of config.xml) - - -|Platform|Value|Type| -|--------|-----|----| -|Android|Package name of BuildConfig class|String| -|iOS|Bundle Identifier(equals BuildInfo.packageName)|String| -|Windows|Identity name(equals BuildInfo.packageName)|String| -|macOS(OS X)|Bundle Identifier(equals BuildInfo.packageName)|String| -|Browser|equals BuildInfo.packageName|String| -|Electron|equals BuildInfo.packageName|String| - - -### BuildInfo.displayName - -Get the displayName. - -|Platform|Value|Type| -|--------|-----|----| -|Android|Application Label|String| -|iOS|CFBundleDisplayName (CFBundleName if not present)|String| -|Windows|Get the DisplayName attribute of the VisualElements element in AppxManifest.xml file.|String| -|macOS(OS X)|CFBundleDisplayName (CFBundleName if not present)|String| -|Browser|Get the short attribute of the name element in config.xml file.|String| -|Electron|Get the short attribute of the name element in config.xml file.|String| - -### BuildInfo.name - -Get the name. - -|Platform|Value|Type| -|--------|-----|----| -|Android|Application Label(equal BuildInfo.displayName)|String| -|iOS|CFBundleName|String| -|Windows|Windows Store display name|String| -|macOS(OS X)|CFBundleName|String| -|Browser|Get value of the name element in config.xml file.|String| -|Electron|Get value of the name element in config.xml file.|String| - - -### BuildInfo.version - -Get the version. - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.VERSION_NAME|String| -|iOS|CFBundleShortVersionString|String| -|Windows|Major.Minor.Build ex) "1.2.3"|String| -|macOS(OS X)|CFBundleShortVersionString|String| -|Browser|Get the version attribute of the widget element in config.xml file.|String| -|Electron|Get the version attribute of the widget element in config.xml file.|String| - - -### BuildInfo.versionCode - -Get the version code. - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.VERSION_CODE|integer| -|iOS|CFBundleVersion|String| -|Windows|Major.Minor.Build.Revision ex) "1.2.3.4"|String| -|macOS(OS X)|CFBundleVersion|String| -|Browser|equals BuildInfo.version|String| -|Electron|equals BuildInfo.version|String| - - -### BuildInfo.debug - -Get the debug flag. - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.DEBUG|Boolean| -|iOS|defined "DEBUG" is true|Boolean| -|Windows|isDevelopmentMode is true|Boolean| -|macOS(OS X)|defined "DEBUG" is true|Boolean| -|Browser|Always false|Boolean| -|Electron|True when ```cordova build electron --debug``` is executed with the "--debug" flag.|Boolean| - - -### BuildInfo.buildType - -Android , Windows Only. - -Get the build type. - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.BUILD_TYPE|String| -|iOS|empty string|String| -|Windows|"release" or "debug"|String| -|macOS(OS X)|empty string|String| -|Browser|empty string|String| -|Electron|empty string|String| - - -### BuildInfo.flavor - -Android Only. - -Get the flavor. - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.FLAVOR|String| -|iOS|empty string|String| -|Windows|empty string|String| -|macOS(OS X)|empty string|String| -|Browser|empty string|String| -|Electron|empty string|String| - -### BuildInfo.buildDate - -Get the build date and time in the Date object returns. - -Attention: -- Android: Add the BuildInfo.gradle file to your Android project. - The BuildInfo.gradle file contains the setting to add the _BUILDINFO_TIMESTAMP field to the BuildConfig class. -- Windows: Add the buildinfo.resjson file to your Windows project. - The buildinfo.resjson file into the "strings" folder. - And also add a task to rewrite buildinfo.resjson in the CordovaApp.projitems file. -- Browser and Electron: When ```cordova prepare``` is executed Build date and time is embedded in - platforms/**browser**/www/plugins/cordova-plugin-buildinfo/src/browser/BuildInfoProxy.js file. - (Or platforms/**electron**/www/plugins/cordova-plugin-buildinfo/src/browser/BuildInfoProxy.js file.) - ```cordova prepare``` is also executed for ```cordova build```, ```cordova run``` and ```cordova platform add```. - (Reference: [Hooks Guide - Apache Cordova](https://cordova.apache.org/docs/en/9.x/guide/appdev/hooks/index.html)) - -|Platform|Value|Type| -|--------|-----|----| -|Android|BuildConfig.\_BUILDINFO\_TIMESTAMP value|Date| -|iOS|Get the modification date and time of the Info.plist file acquired from the executionPath property of the main bundle.|Date| -|Windows|Resource value of "/buildinfo/Timestamp" string.|Date| -|macOS(OS X)|Get the modification date and time of the config.xml file acquired from the resource of the main bundle.|Date| -|Browser|The date and time when ```cordova prepare``` was executed.|Date| -|Electron|The date and time when ```cordova prepare``` was executed.|Date| - - -### BuildInfo.installDate - -Get the install date and time in the Date object returns. - -Attention: -- Browser and Electron: Installation date and time is unknown. - -|Platform|Value|Type| -|--------|-----|----| -|Android|The firstInstallTime property of PackageInfo|Date| -|iOS|Get the creation date and time of the document directory.|Date| -|Windows|The installedDate property of Windows.ApplicatinoModel.Package.current|Date| -|macOS(OS X)|Date and time of kMDItemDateAdded recorded in File Metadata of application package.|Date| -|Browser|Not available.|null| -|Electron|Not available.|null| - - -### BuildInfo.windows - -Windows Only. - -Get the windows extra information. - -|Platform|Value|Type| -|--------|-----|----| -|Android|undefined|undefined| -|iOS|undefined|undefined| -|Windows|Object|Object| -|macOS(OS X)|undefined|undefined| -|Browser|undefined|undefined| -|Electron|undefined|undefined| - -|Property name|Value|Type| -|-------------|-----|----| -|architecture|Windows.ApplicationModel.Package.current.id.architecture|integer| -|description|Windows.ApplicationModel.Package.current.description|String| -|displayName|Windows.ApplicationModel.Package.current.displayName|String| -|familyName|Windows.ApplicationModel.Package.current.id.familyName|String| -|fullName|Windows.ApplicationModel.Package.current.id.fullName|String| -|logo|Object|Object| -|publisher|Windows.ApplicationModel.Package.current.id.publisher|String| -|publisherId|Windows.ApplicationModel.Package.current.id.publisherId|String| -|publisherDisplayName|Windows.ApplicationModel.Package.current.publisherDisplayName|String| -|resourceId|Windows.ApplicationModel.Package.current.id.resourceId|String| -|version|Windows.ApplicationModel.Package.current.id.version|Object| - -#### BuildInfo.windows.logo - -|Property name|Value|Type| -|-------------|-----|----| -|absoluteCannonicalUri|Windows.ApplicationModel.Package.logo.absoluteCanonicalUri|String| -|absoluteUri|Windows.ApplicationModel.Package.logo.absoluteUri|String| -|displayIri|Windows.ApplicationModel.Package.logo.displayIri|String| -|displayUri|Windows.ApplicationModel.Package.logo.displayUri|String| -|path|Windows.ApplicationModel.Package.logo.path|String| -|rawUri|Windows.ApplicationModel.Package.logo.rawUri|String| - -#### BuildInfo.windows.version - -|Property name|Value|Type| -|-------------|-----|----| -|major|Windows.ApplicationModel.Package.current.id.version.major|integer| -|minor|Windows.ApplicationModel.Package.current.id.version.minor|integer| -|build|Windows.ApplicationModel.Package.current.id.version.build|integer| -|revision|Windows.ApplicationModel.Package.current.id.version.revision|integer| \ No newline at end of file diff --git a/plugins/cordova-plugin-buildinfo/package.json b/plugins/cordova-plugin-buildinfo/package.json deleted file mode 100644 index 1a17acecf..000000000 --- a/plugins/cordova-plugin-buildinfo/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "cordova-plugin-buildinfo", - "version": "4.0.0", - "description": "Cordova/PhoneGap Build Information Plugin. Get PackageName, Version, Debug and more...", - "cordova": { - "id": "cordova-plugin-buildinfo", - "platforms": [ - "android", - "ios", - "osx", - "windows", - "browser", - "electron" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/lynrin/cordova-plugin-buildinfo.git" - }, - "keywords": [ - "debug", - "buildconfig", - "buildinfo", - "phonegap", - "cordova", - "ecosystem:cordova", - "cordova-android", - "cordova-ios", - "cordova-windows", - "cordova-osx", - "cordova-browser", - "cordova-electron" - ], - "scripts": { - "test": "npm run jshint", - "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests" - }, - "engines": { - "cordovaDependencies": { - "0.0.0": { - "cordova": ">=4.0.0" - }, - "2.0.0": { - "cordova": ">=5.4.0", - "cordova-ios": ">=4.0.0", - "cordova-android": ">=5.0.0", - "cordova-windows": ">=4.0.0" - }, - "3.0.0": { - "cordova": ">=5.4.0", - "cordova-ios": ">=4.0.0", - "cordova-android": ">=5.0.0", - "cordova-windows": ">=4.0.0", - "cordova-browser": ">=6.0.0", - "cordova-electron": ">=1.1.0" - }, - "4.0.0": { - "cordova": ">=5.4.0", - "cordova-ios": ">=4.0.0", - "cordova-android": ">=5.0.0", - "cordova-windows": ">=4.0.0", - "cordova-osx": ">=4.0.0", - "cordova-browser": ">=6.0.0", - "cordova-electron": ">=1.1.0" - }, - "5.0.0": { - "cordova": ">100" - } - } - }, - "author": "Mikihiro Hayashi", - "license": "MIT", - "bugs": { - "url": "https://github.com/lynrin/cordova-plugin-buildinfo/issues" - }, - "homepage": "https://github.com/lynrin/cordova-plugin-buildinfo#readme", - "devDependencies": { - "jshint": "^2.6.0" - } -} diff --git a/plugins/cordova-plugin-buildinfo/plugin.xml b/plugins/cordova-plugin-buildinfo/plugin.xml deleted file mode 100644 index d46144362..000000000 --- a/plugins/cordova-plugin-buildinfo/plugin.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - BuildInfo - Cordova/Phonegap Build Information Plugin. Get PackageName, Version, Debug and more... - MIT - debug,buildconfig,buildinfo,phonegap,cordova - Mikihiro Hayashi - https://github.com/lynrin/cordova-plugin-buildinfo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.gradle b/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.gradle deleted file mode 100644 index c6401fc71..000000000 --- a/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.gradle +++ /dev/null @@ -1,5 +0,0 @@ -android { - defaultConfig { - buildConfigField "long", "_BUILDINFO_TIMESTAMP", System.currentTimeMillis() + "L" - } -} \ No newline at end of file diff --git a/plugins/cordova-plugin-buildinfo/src/browser/BuildInfoProxy.js b/plugins/cordova-plugin-buildinfo/src/browser/BuildInfoProxy.js deleted file mode 100644 index a9b597f2c..000000000 --- a/plugins/cordova-plugin-buildinfo/src/browser/BuildInfoProxy.js +++ /dev/null @@ -1,60 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2019 Mikihiro Hayashi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -BuildInfoProxy = { - _cache: null, - - init: function (successCallback, errorCallback, args) { - var self = BuildInfoProxy; - - if (null !== self._cache) { - successCallback(self._cache); - return; - } - - try { - /* */ - var json = {"debug":null,"buildDate":null,"packageName":null,"basePackageName":null,"name":null,"displayName":null,"version":null,"versionCode":null,"buildType":null,"flavor":null}; - /* */ - - var ret = { - packageName : json.packageName || null, - basePackageName: json.basePackageName || null, - displayName : json.displayName || json.name || null, - name : json.name || null, - version : json.version || null, - versionCode : json.versionCode || null, - debug : json.debug || false, - buildDate : json.buildDate || null - }; - - self._cache = ret; - successCallback(ret); - } catch (e) { - errorCallback(e.message); - } - } -}; - -cordova.commandProxy.add("BuildInfo", BuildInfoProxy); \ No newline at end of file diff --git a/plugins/cordova-plugin-buildinfo/src/ios/CDVBuildInfo.h b/plugins/cordova-plugin-buildinfo/src/ios/CDVBuildInfo.h deleted file mode 100644 index 4ca290b28..000000000 --- a/plugins/cordova-plugin-buildinfo/src/ios/CDVBuildInfo.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Mikihiro Hayashi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#import - -@interface CDVBuildInfo : CDVPlugin - -- (void)init:(CDVInvokedUrlCommand*)command; - -@end diff --git a/plugins/cordova-plugin-buildinfo/src/ios/CDVBuildInfo.m b/plugins/cordova-plugin-buildinfo/src/ios/CDVBuildInfo.m deleted file mode 100644 index 1716becf5..000000000 --- a/plugins/cordova-plugin-buildinfo/src/ios/CDVBuildInfo.m +++ /dev/null @@ -1,148 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Mikihiro Hayashi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#import "CDVBuildInfo.h" -#import - -#import - -@implementation CDVBuildInfo - -CDVPluginResult* _cachePluginResult = nil; - -static mach_timebase_info_data_t sTimebaseInfo; - -void _BuildInfo_reportProfileProcessTime(const uint64_t start, const NSString *text) { - - uint64_t elapsedNano = (mach_absolute_time() - start) * sTimebaseInfo.numer / sTimebaseInfo.denom; - - NSLog(@"BuildInfo init: %.4f sec(%llu nsec): %@", elapsedNano / 1000000000.0, elapsedNano, text); -} - -const NSString* _BuildInfo_GetDictionaryValue(const NSDictionary *dict, const NSString *key, const NSString *defaultValue) { - - const NSString *value = dict[key]; - - if (!value) { - value = defaultValue; - } - - return value; -} - -/* init */ -- (void)init:(CDVInvokedUrlCommand*)command -{ - // init mach_timebase - if (sTimebaseInfo.denom == 0) { - mach_timebase_info(&sTimebaseInfo); - } - - // Method start time. - uint64_t profilrStart = mach_absolute_time(); - - // Cache - if (nil != _cachePluginResult) { - [self.commandDelegate sendPluginResult:_cachePluginResult callbackId:command.callbackId]; - _BuildInfo_reportProfileProcessTime(profilrStart, @"Cache data return"); - return; - } - - - NSBundle* bundle = [NSBundle mainBundle]; - NSDictionary* info = [bundle infoDictionary]; -#ifdef DEBUG - NSNumber* debug = [NSNumber numberWithBool:YES]; -#else - NSNumber* debug = [NSNumber numberWithBool:NO]; -#endif - - NSString *buildDate = @""; - NSString *installDate = @""; - - NSDateFormatter *dfRFC3339 = [[NSDateFormatter alloc] init]; - [dfRFC3339 setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZZZ"]; - - // Info.plist modification date - NSString *path = [bundle pathForResource:@"Info.plist" ofType:nil]; - if (path) { - NSDictionary* attr = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil]; - NSDate* modificationDate = [attr objectForKey:NSFileModificationDate]; - - if (modificationDate) { - buildDate = [dfRFC3339 stringFromDate:modificationDate]; - } - } - - // Document folder creation date - NSURL *urlDocument = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; - if (urlDocument) { - NSDate *creationDate = [[[NSFileManager defaultManager] attributesOfItemAtPath:urlDocument.path error:nil] objectForKey:NSFileCreationDate]; - if (creationDate) { - installDate = [dfRFC3339 stringFromDate:creationDate]; - } - } - - const NSString *bundleName = _BuildInfo_GetDictionaryValue(info, @"CFBundleName", @""); - - NSDictionary* result = @{ - @"packageName" : [bundle bundleIdentifier], - @"basePackageName": [bundle bundleIdentifier], - @"displayName" : _BuildInfo_GetDictionaryValue(info, @"CFBundleDisplayName", bundleName), - @"name" : bundleName, - @"version" : _BuildInfo_GetDictionaryValue(info, @"CFBundleShortVersionString", @""), - @"versionCode" : _BuildInfo_GetDictionaryValue(info, @"CFBundleVersion", @""), - @"debug" : debug, - @"buildDate" : buildDate, - @"installDate" : installDate, - @"buildType" : @"", // Android Only - @"flavor" : @"" // Android Only - }; - - if ([debug boolValue]) { - NSLog(@"BuildInfo packageName : \"%@\"", [result objectForKey:@"packageName"]); - NSLog(@"BuildInfo basePackageName: \"%@\"", [result objectForKey:@"basePackageName"]); - NSLog(@"BuildInfo displayName : \"%@\"", [result objectForKey:@"displayName"]); - NSLog(@"BuildInfo name : \"%@\"", [result objectForKey:@"name"]); - NSLog(@"BuildInfo version : \"%@\"", [result objectForKey:@"version"]); - NSLog(@"BuildInfo versionCode : \"%@\"", [result objectForKey:@"versionCode"]); - NSLog(@"BuildInfo debug : %@" , [[result objectForKey:@"debug"] boolValue] ? @"YES" : @"NO"); - NSLog(@"BuildInfo buildType : \"%@\"", [result objectForKey:@"buildType"]); - NSLog(@"BuildInfo buildDate : \"%@\"", [result objectForKey:@"buildDate"]); - NSLog(@"BuildInfo installDate : \"%@\"", [result objectForKey:@"installDate"]); - NSLog(@"BuildInfo flavor : \"%@\"", [result objectForKey:@"flavor"]); - } - - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:result]; - - // Reulst cache - if (nil == _cachePluginResult) { - _cachePluginResult = pluginResult; - } - - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - _BuildInfo_reportProfileProcessTime(profilrStart, @"Return"); -} - -@end diff --git a/plugins/cordova-plugin-buildinfo/src/osx/CDVBuildInfo.h b/plugins/cordova-plugin-buildinfo/src/osx/CDVBuildInfo.h deleted file mode 100644 index e2fff9922..000000000 --- a/plugins/cordova-plugin-buildinfo/src/osx/CDVBuildInfo.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2019 Mikihiro Hayashi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#import - -@interface CDVBuildInfo : CDVPlugin - -- (void)init:(CDVInvokedUrlCommand*)command; - -@end diff --git a/plugins/cordova-plugin-buildinfo/src/osx/CDVBuildInfo.m b/plugins/cordova-plugin-buildinfo/src/osx/CDVBuildInfo.m deleted file mode 100644 index dd84804b8..000000000 --- a/plugins/cordova-plugin-buildinfo/src/osx/CDVBuildInfo.m +++ /dev/null @@ -1,156 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2019 Mikihiro Hayashi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#import "CDVBuildInfo.h" -#import - -#import - -@implementation CDVBuildInfo - -CDVPluginResult* _cachePluginResult = nil; - -static mach_timebase_info_data_t sTimebaseInfo; - -void _BuildInfo_reportProfileProcessTime(const uint64_t start, const NSString *text) { - - uint64_t elapsedNano = (mach_absolute_time() - start) * sTimebaseInfo.numer / sTimebaseInfo.denom; - - NSLog(@"BuildInfo init: %.4f sec(%llu nsec): %@", elapsedNano / 1000000000.0, elapsedNano, text); -} - -const NSString* _BuildInfo_GetDictionaryValue(const NSDictionary *dict, const NSString *key, const NSString *defaultValue) { - - const NSString *value = dict[key]; - - if (!value) { - value = defaultValue; - } - - return value; -} - -/* init */ -- (void)init:(CDVInvokedUrlCommand*)command -{ - // init mach_timebase - if (sTimebaseInfo.denom == 0) { - mach_timebase_info(&sTimebaseInfo); - } - - // Method start time. - uint64_t profilrStart = mach_absolute_time(); - - // Cache - if (nil != _cachePluginResult) { - [self.commandDelegate sendPluginResult:_cachePluginResult callbackId:command.callbackId]; - _BuildInfo_reportProfileProcessTime(profilrStart, @"Cache data return"); - return; - } - - - NSBundle* bundle = [NSBundle mainBundle]; - NSDictionary* info = [bundle infoDictionary]; -#ifdef DEBUG - NSNumber* debug = [NSNumber numberWithBool:YES]; -#else - NSNumber* debug = [NSNumber numberWithBool:NO]; -#endif - - NSString *buildDate = @""; - NSString *installDate = @""; - - NSDateFormatter *dfRFC3339 = [[NSDateFormatter alloc] init]; - [dfRFC3339 setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZZZ"]; - - // config.xml modification date - NSString *path = [bundle pathForResource:@"config.xml" ofType:nil]; - if (path) { - NSDictionary* attr = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil]; - NSDate* modificationDate = [attr objectForKey:NSFileModificationDate]; - - if (modificationDate) { - buildDate = [dfRFC3339 stringFromDate:modificationDate]; - } - } - - // app date added - NSString *pathBundle = [bundle bundlePath]; - if (pathBundle) { - NSURL *urlBundle = [NSURL fileURLWithPath:pathBundle]; - - MDItemRef itemRef = MDItemCreateWithURL(kCFAllocatorDefault, (CFURLRef)urlBundle); - if (itemRef) { - CFTypeRef typeRef = MDItemCopyAttribute(itemRef, kMDItemDateAdded); - if (typeRef && CFGetTypeID(typeRef) == CFDateGetTypeID()) { - NSDate *dateAdded = (__bridge NSDate*)typeRef; - installDate = [dfRFC3339 stringFromDate:dateAdded]; - } - CFRelease(typeRef); - } - CFRelease(itemRef); - } - - const NSString *bundleName = _BuildInfo_GetDictionaryValue(info, @"CFBundleName", @""); - - NSDictionary* result = @{ - @"packageName" : [bundle bundleIdentifier], - @"basePackageName": [bundle bundleIdentifier], - @"displayName" : _BuildInfo_GetDictionaryValue(info, @"CFBundleDisplayName", bundleName), - @"name" : bundleName, - @"version" : _BuildInfo_GetDictionaryValue(info, @"CFBundleShortVersionString", @""), - @"versionCode" : _BuildInfo_GetDictionaryValue(info, @"CFBundleVersion", @""), - @"debug" : debug, - @"buildDate" : buildDate, - @"installDate" : installDate, - @"buildType" : @"", // Android Only - @"flavor" : @"" // Android Only*/ - }; - - if ([debug boolValue]) { - NSLog(@"BuildInfo packageName : \"%@\"", [result objectForKey:@"packageName"]); - NSLog(@"BuildInfo basePackageName: \"%@\"", [result objectForKey:@"basePackageName"]); - NSLog(@"BuildInfo displayName : \"%@\"", [result objectForKey:@"displayName"]); - NSLog(@"BuildInfo name : \"%@\"", [result objectForKey:@"name"]); - NSLog(@"BuildInfo version : \"%@\"", [result objectForKey:@"version"]); - NSLog(@"BuildInfo versionCode : \"%@\"", [result objectForKey:@"versionCode"]); - NSLog(@"BuildInfo debug : %@" , [[result objectForKey:@"debug"] boolValue] ? @"YES" : @"NO"); - NSLog(@"BuildInfo buildType : \"%@\"", [result objectForKey:@"buildType"]); - NSLog(@"BuildInfo buildDate : \"%@\"", [result objectForKey:@"buildDate"]); - NSLog(@"BuildInfo installDate : \"%@\"", [result objectForKey:@"installDate"]); - NSLog(@"BuildInfo flavor : \"%@\"", [result objectForKey:@"flavor"]); - } - - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:result]; - - // Reulst cache - if (nil == _cachePluginResult) { - _cachePluginResult = pluginResult; - } - - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - _BuildInfo_reportProfileProcessTime(profilrStart, @"Return"); -} - -@end diff --git a/plugins/cordova-plugin-buildinfo/src/windows/BuildInfoProxy.js b/plugins/cordova-plugin-buildinfo/src/windows/BuildInfoProxy.js deleted file mode 100644 index 0d216b9fe..000000000 --- a/plugins/cordova-plugin-buildinfo/src/windows/BuildInfoProxy.js +++ /dev/null @@ -1,146 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2017 Mikihiro Hayashi - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -BuildInfoProxy = { - _cache: null, - - init: function (successCallback, errorCallback, args) { - var self = BuildInfoProxy; - - if (null !== self._cache) { - successCallback(self._cache); - return; - } - - var res = {}; - - var package = Windows.ApplicationModel.Package.current; - var packId = package.id; - var version = packId.version; - - var timestamp = WinJS.Resources.getString('/buildinfo/Timestamp'); - - res.packageName = packId.name; - res.basePackageName = packId.name; - res.displayName = package.displayName; - res.name = package.displayName; - res.version = [version.major, version.minor, version.build].join('.'); - res.versionCode = [version.major, version.minor, version.build, version.revision].join('.'); - res.debug = package.isDevelopmentMode; - res.buildType = (res.debug) ? "debug" : "release"; - res.flavor = ""; - res.installDate = package.installedDate; - res.buildDate = timestamp ? new Date(timestamp.value) : null; - - // Windows - res.windows = { - description: package.description, - displayName: package.displayName, - publisherDisplayName: package.publisherDisplayName, - architecture: packId.architecture, - familyName: packId.familyName, - fullName: packId.fullName, - publisher: packId.publisher, - publisherId: packId.publisherId, - resourceId: packId.resourceId, - version: packId.version, - logo: { - absoluteCanonicalUri: package.logo.absoluteCanonicalUri, - absoluteUri: package.logo.absoluteUri, - displayIri: package.logo.displayIri, - displayUri: package.logo.displayUri, - path: package.logo.path, - rawUri: package.logo.rawUri - } - }; - - var promiseDoneFunc = function done(res) { - if (res.debug) { - var log = console.debug ? console.debug : console.log; - log("packageName : \"" + res.packageName + "\""); - log("basePackageName: \"" + res.basePackageName + "\""); - log("displayName : \"" + res.displayName + "\""); - log("name : \"" + res.name + "\""); - log("version : \"" + res.version + "\""); - log("versionCode : \"" + res.versionCode + "\""); - log("debug : " + (res.debug ? "true" : "false")); - log("buildType : \"" + res.buildType + "\""); - log("flavor : \"" + res.flavor + "\""); - log("buildDate : \"" + res.buildDate + "\""); - log("installDate : \"" + res.installDate + "\""); - } - - self._cache = res; - - successCallback(res); - }; - - package.installedLocation.getFileAsync('AppxManifest.xml') - .then(function (file) { - // File read and parse - return Windows.Storage.FileIO.readTextAsync(file).then(function (text) { - var xdoc = new Windows.Data.Xml.Dom.XmlDocument(); - xdoc.loadXml(text); - - var node = xdoc.selectSingleNode("//*[local-name()='VisualElements']"); - var displayName = res.displayName; - if (node && node.attributes) { - var nodeDisplayName = node.attributes.getNamedItem('DisplayName'); - - if (nodeDisplayName && nodeDisplayName.nodeValue) { - displayName = nodeDisplayName.nodeValue; - } - } - - // ms-resource: - if (displayName.startsWith('ms-resource:')) { - var resDisplayName = WinJS.Resources.getString(displayName.substr(12)); - if (resDisplayName) { - displayName = resDisplayName.value; - } - } - - return { displayName: displayName }; - }); - }) - .then(function (result) { - if (result.displayName) { - res.displayName = result.displayName; - } - - return res; - }) - .done( - function (res) { - promiseDoneFunc(res); - }, - function (err) { - console.error(err); - promiseDoneFunc(res); - } - ); - } -}; - -cordova.commandProxy.add("BuildInfo", BuildInfoProxy); diff --git a/plugins/cordova-plugin-buildinfo/src/windows/buildinfo.resjson b/plugins/cordova-plugin-buildinfo/src/windows/buildinfo.resjson deleted file mode 100644 index e02aef276..000000000 --- a/plugins/cordova-plugin-buildinfo/src/windows/buildinfo.resjson +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/plugins/cordova-plugin-buildinfo/tests/package.json b/plugins/cordova-plugin-buildinfo/tests/package.json deleted file mode 100644 index e91561f59..000000000 --- a/plugins/cordova-plugin-buildinfo/tests/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "cordova-plugin-buildinfo", - "version": "2.0.0", - "description": "Cordova/Phonegap Build Information Plugin. Get PackageName, Version, Debug and more... TEST!", - "cordova": { - "id": "cordova-plugin-buildinfo-test", - "platforms": [ - "android", - "ios", - "windows" - ] - }, - "engines": [ - { - "name": "cordova", - "version": ">=4.0.0" - } - ], - "author": "Mikihiro Hayashi", - "license": "MIT", - "bugs": { - "url": "https://github.com/lynrin/cordova-plugin-buildinfo/issues" - }, - "homepage": "https://github.com/lynrin/cordova-plugin-buildinfo#readme" -} diff --git a/plugins/cordova-plugin-buildinfo/tests/plugin.xml b/plugins/cordova-plugin-buildinfo/tests/plugin.xml deleted file mode 100644 index e7f39b39b..000000000 --- a/plugins/cordova-plugin-buildinfo/tests/plugin.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Cordova BuildInof Plugin Tests - MIT - - - - diff --git a/plugins/cordova-plugin-buildinfo/tests/tests.js b/plugins/cordova-plugin-buildinfo/tests/tests.js deleted file mode 100644 index 898e5305a..000000000 --- a/plugins/cordova-plugin-buildinfo/tests/tests.js +++ /dev/null @@ -1,103 +0,0 @@ -exports.defineAutoTests = function () { - describe('BuildInfo', function () { - it ('should exist', function () { - expect(window.BuildInfo).toBeDefined(); - }); - - it ('should contain a Base URL specification that is a string', function () { - expect(window.BuildInfo.baseUrl).toBeDefined(); - expect((String(window.BuildInfo.baseUrl)).length > 0).toBe(true); - }); - - it ('should contain a PackageName specification that is a string', function () { - expect(window.BuildInfo.packageName).toBeDefined(); - expect((String(window.BuildInfo.packageName)).length > 0).toBe(true); - }); - - it ('should contain a Base PackageName specification that is a string', function () { - expect(window.BuildInfo.basePackageName).toBeDefined(); - expect((String(window.BuildInfo.basePackageName)).length > 0).toBe(true); - }); - - it ('should contain a DisplayName specification that is a string', function () { - expect(window.BuildInfo.displayName).toBeDefined(); - expect((String(window.BuildInfo.displayName)).length > 0).toBe(true); - }); - - it ('should contain a Name specification that is a string', function () { - expect(window.BuildInfo.name).toBeDefined(); - expect((String(window.BuildInfo.name)).length > 0).toBe(true); - }); - - it ('should contain a Version specification that is a string', function () { - expect(window.BuildInfo.version).toBeDefined(); - expect((String(window.BuildInfo.version)).length > 0).toBe(true); - }); - - it ('should contain a VersionCode specification that is a string or int', function () { - expect(window.BuildInfo.versionCode).toBeDefined(); - if ('string' === typeof window.BuildInfo.versionCode || 'object' === typeof window.BuildInfo.versionCode) { - expect((String(window.BuildInfo.versionCode)).length > 0).toBe(true); - } else { - expect(window.BuildInfo.versionCode > 0).toBe(true); - } - }); - - it ('should contain a debug specification that is a boolean', function () { - expect(window.BuildInfo.debug).toBeDefined(); - expect(typeof window.BuildInfo.debug).toBe('boolean'); - }); - - it ('should contain a BuildType specification that is a string', function () { - expect(window.BuildInfo.buildType).toBeDefined(); - expect(typeof window.BuildInfo.buildType).toBe('string'); - }); - - it ('should contain a Flavor specification that is a string', function () { - expect(window.BuildInfo.flavor).toBeDefined(); - expect(typeof window.BuildInfo.flavor).toBe('string'); - }); - - it ('should contain a BuildDate specification that is a Date', function () { - expect(window.BuildInfo.buildDate).toBeDefined(); - expect(window.BuildInfo.buildDate instanceof Date).toBe(true); - }); - - it ('should contain a InstallDate specification that is a Date', function () { - expect(window.BuildInfo.installDate).toBeDefined(); - if (null !== window.BuildInfo.installDate) { - expect(window.BuildInfo.installDate instanceof Date).toBe(true); - } - }); - }); -}; - -exports.defineManualTests = function (contentEl, createActionButton) { - var logMessage = function (message, color) { - var log = document.getElementById('info'); - var logLine = document.createElement('div'); - - if (color) { - logLine.style.color = color; - } - - logLine.innerHTML = message; - log.appendChild(logLine); - }; - - var clearLog = function () { - var log = document.getElementById('info'); - log.innerHTML = ''; - }; - - var tests = '

Press Dump BuildInfo button to get build information

' + - '
' + - 'Expected result: Status box will get updated with build info.'; - - contentEl.innerHTML = '
' + tests; - - createActionButton('Dump BuildInfo', function () { - clearLog(); - logMessage(JSON.stringify(window.BuildInfo, null, "¥t")); - }, 'dump_info'); -}; diff --git a/plugins/cordova-plugin-device/CONTRIBUTING.md b/plugins/cordova-plugin-device/CONTRIBUTING.md deleted file mode 100644 index 4c8e6a5ea..000000000 --- a/plugins/cordova-plugin-device/CONTRIBUTING.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# Contributing to Apache Cordova - -Anyone can contribute to Cordova. And we need your contributions. - -There are multiple ways to contribute: report bugs, improve the docs, and -contribute code. - -For instructions on this, start with the -[contribution overview](http://cordova.apache.org/contribute/). - -The details are explained there, but the important items are: - - Sign and submit an Apache ICLA (Contributor License Agreement). - - Have a Jira issue open that corresponds to your contribution. - - Run the tests so your patch doesn't break existing functionality. - -We look forward to your contributions! diff --git a/plugins/cordova-plugin-device/LICENSE b/plugins/cordova-plugin-device/LICENSE deleted file mode 100644 index 7a4a3ea24..000000000 --- a/plugins/cordova-plugin-device/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-device/NOTICE b/plugins/cordova-plugin-device/NOTICE deleted file mode 100644 index 8ec56a524..000000000 --- a/plugins/cordova-plugin-device/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -Apache Cordova -Copyright 2012 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). diff --git a/plugins/cordova-plugin-device/README.md b/plugins/cordova-plugin-device/README.md deleted file mode 100644 index 91612e0ca..000000000 --- a/plugins/cordova-plugin-device/README.md +++ /dev/null @@ -1,264 +0,0 @@ ---- -title: Device -description: Get device information. ---- - - -|AppVeyor|Travis CI| -|:-:|:-:| -|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-device?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-device)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-device.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-device)| - -# cordova-plugin-device - -This plugin defines a global `device` object, which describes the device's hardware and software. -Although the object is in the global scope, it is not available until after the `deviceready` event. - -```js -document.addEventListener("deviceready", onDeviceReady, false); -function onDeviceReady() { - console.log(device.cordova); -} -``` - -## Installation - - cordova plugin add cordova-plugin-device - -## Properties - -- device.cordova -- device.model -- device.platform -- device.uuid -- device.version -- device.manufacturer -- device.isVirtual -- device.serial - -## device.cordova - -Get the version of Cordova running on the device. - -### Supported Platforms - -- Android -- Browser -- iOS -- Windows -- OSX - -## device.model - -The `device.model` returns the name of the device's model or -product. The value is set by the device manufacturer and may be -different across versions of the same product. - -### Supported Platforms - -- Android -- Browser -- iOS -- Windows -- OSX - -### Quick Example - -```js -// Android: Nexus One returns "Passion" (Nexus One code name) -// Motorola Droid returns "voles" -// BlackBerry: Torch 9800 returns "9800" -// Browser: Google Chrome returns "Chrome" -// Safari returns "Safari" -// iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models -// OSX: returns "x86_64" -// -var model = device.model; -``` - -### Android Quirks - -- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`. - -## device.platform - -Get the device's operating system name. - -```js -var string = device.platform; -``` -### Supported Platforms - -- Android -- Browser -- iOS -- Windows -- OSX - -### Quick Example - -```js -// Depending on the device, a few examples are: -// - "Android" -// - "BlackBerry 10" -// - "browser" -// - "iOS" -// - "WinCE" -// - "Tizen" -// - "Mac OS X" -var devicePlatform = device.platform; -``` - -## device.uuid - -Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)). - -```js -var string = device.uuid; -``` - -### Description - -The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model. - -### Supported Platforms - -- Android -- iOS -- Windows -- OSX - -### Quick Example - -```js -// Android: Returns a random 64-bit integer (as a string, again!) -// The integer is generated on the device's first boot -// -// BlackBerry: Returns the PIN number of the device -// This is a nine-digit unique integer (as a string, though!) -// -// iPhone: (Paraphrased from the UIDevice Class documentation) -// Returns the [UIDevice identifierForVendor] UUID which is unique and the same for all apps installed by the same vendor. However the UUID can be different if the user deletes all apps from the vendor and then reinstalls it. -// Windows Phone 7 : Returns a hash of device+current user, -// if the user is not defined, a guid is generated and will persist until the app is uninstalled -// Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number -// unique to every GSM and UMTS mobile phone. -var deviceID = device.uuid; -``` - -### iOS Quirk - -The `uuid` on iOS uses the identifierForVendor property. It is unique to the device across the same vendor, but will be different for different vendors and will change if all apps from the vendor are deleted and then reinstalled. -Refer [here](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/#//apple_ref/occ/instp/UIDevice/identifierForVendor) for details. -The UUID will be the same if app is restored from a backup or iCloud as it is saved in preferences. Users using older versions of this plugin will still receive the same previous UUID generated by another means as it will be retrieved from preferences. - -### OSX Quirk - -The `uuid` on OSX is generated automatically if it does not exist yet and is stored in the `standardUserDefaults` in the `CDVUUID` property. - -## device.version - -Get the operating system version. - - var string = device.version; - -### Supported Platforms - -- Android 2.1+ -- Browser -- iOS -- Windows -- OSX - -### Quick Example - -```js -// Android: Froyo OS would return "2.2" -// Eclair OS would return "2.1", "2.0.1", or "2.0" -// Version can also return update level "2.1-update1" -// -// BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" -// -// Browser: Returns version number for the browser -// -// iPhone: iOS 3.2 returns "3.2" -// -// Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 -// Windows 8: return the current OS version, ex on Windows 8.1 returns 6.3.9600.16384 -// Tizen: returns "TIZEN_20120425_2" -// OSX: El Capitan would return "10.11.2" -// -var deviceVersion = device.version; -``` - -## device.manufacturer - -Get the device's manufacturer. - - var string = device.manufacturer; - -### Supported Platforms - -- Android -- iOS -- Windows - -### Quick Example - -```js -// Android: Motorola XT1032 would return "motorola" -// BlackBerry: returns "BlackBerry" -// iPhone: returns "Apple" -// -var deviceManufacturer = device.manufacturer; -``` - -## device.isVirtual - -whether the device is running on a simulator. - -```js -var isSim = device.isVirtual; -``` - -### Supported Platforms - -- Android 2.1+ -- Browser -- iOS -- Windows -- OSX - -### OSX and Browser Quirk - -The `isVirtual` property on OS X and Browser always returns false. - -## device.serial - -Get the device hardware serial number ([SERIAL](http://developer.android.com/reference/android/os/Build.html#SERIAL)). - -```js -var string = device.serial; -``` - -### Supported Platforms - -- Android -- OSX - diff --git a/plugins/cordova-plugin-device/RELEASENOTES.md b/plugins/cordova-plugin-device/RELEASENOTES.md deleted file mode 100644 index 83eef7bf3..000000000 --- a/plugins/cordova-plugin-device/RELEASENOTES.md +++ /dev/null @@ -1,194 +0,0 @@ - -# Release Notes - -### 2.0.3 (Jun 14, 2019) - -- build: add .gitattributes to force LF (instead of possible CRLF on Windows) ([`02ae405`](https://github.com/apache/cordova-plugin-device/commit/02ae405)) -- build: add .npmignore to remove unneeded files from npm package ([`8dbe703`](https://github.com/apache/cordova-plugin-device/commit/8dbe703)) -- docs: remove outdated translations ([`db4e1f1`](https://github.com/apache/cordova-plugin-device/commit/db4e1f1)) -- ci(travis): Remove android 4.4 that SauceLabs removed ([`594fa61`](https://github.com/apache/cordova-plugin-device/commit/594fa61)) -- ci(travis): Update Travis CI configuration for new paramedic ([#97](https://github.com/apache/cordova-plugin-device/issues/97)) ([`db0ad32`](https://github.com/apache/cordova-plugin-device/commit/db0ad32)) -- feat: update typings ([#90](https://github.com/apache/cordova-plugin-device/issues/90)) ([`52a0655`](https://github.com/apache/cordova-plugin-device/commit/52a0655), [`61ad76c`](https://github.com/apache/cordova-plugin-device/commit/61ad76c)) -- chore(github): Add or update GitHub pull request and issue template ([`e213286`](https://github.com/apache/cordova-plugin-device/commit/e213286)) -- docs: remove JIRA link ([`2d12d55`](https://github.com/apache/cordova-plugin-device/commit/2d12d55)) -- ci(travis): also accept terms for android sdk `android-27` ([`f870c9b`](https://github.com/apache/cordova-plugin-device/commit/f870c9b)) -- fix: [CB-14106](https://issues.apache.org/jira/browse/CB-14106) - device.model is different on simulator and on real device ([#80](https://github.com/apache/cordova-plugin-device/issues/80)) ([`d65cdf6`](https://github.com/apache/cordova-plugin-device/commit/d65cdf6)) - -### 2.0.2 (Apr 12, 2018) -* [CB-13893](https://issues.apache.org/jira/browse/CB-13893) **iOS** delete `libz.tbd` from device plugin - -### 2.0.1 (Dec 27, 2017) -* [CB-13702](https://issues.apache.org/jira/browse/CB-13702) Fix to allow 2.0.0 version install - -### 2.0.0 (Dec 15, 2017) -* [CB-13670](https://issues.apache.org/jira/browse/CB-13670) Remove deprecated platforms - -### 1.1.7 (Nov 06, 2017) -* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again -* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) setup `eslint` and removed `jshint` -* [CB-13113](https://issues.apache.org/jira/browse/CB-13113) (browser) `device.isVirtual` is always false -* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on Travis and AppVeyor -* [CB-13000](https://issues.apache.org/jira/browse/CB-13000) (CI) Speed up **Android** builds -* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. - -### 1.1.6 (Apr 27, 2017) -* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` -* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder -* [CB-12105](https://issues.apache.org/jira/browse/CB-12105) (browser) Properly detect Edge - -### 1.1.5 (Feb 28, 2017) -* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml` -* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` -* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** -* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges - -### 1.1.4 (Dec 07, 2016) -* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.1.4 -* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" -* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. - -### 1.1.3 (Sep 08, 2016) -* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies -* Add badges for paramedic builds on Jenkins -* Add pull request template. -* Readme: Add fenced code blocks with langauage hints -* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to `README.md` - -### 1.1.2 (Apr 15, 2016) -* Use passed device, follow create policy forf `CFUUIDCreate` -* [CB-10631](https://issues.apache.org/jira/browse/CB-10631) Fix for `device.uuid` in **iOS 5.1.1** -* Updating the comment to exclude URL -* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins -* Refactored `deviceInfo` on **iOS** for better readability. - -### 1.1.1 (Jan 15, 2016) -* [CB-10238](https://issues.apache.org/jira/browse/CB-10238) **OSX** Move `device-plugin` out from `cordovalib` to the plugin repository -* [CB-9923](https://issues.apache.org/jira/browse/CB-9923) Update `device.platform` documentation for **Browser** platform - -### 1.1.0 (Nov 18, 2015) -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest -* Add `isVirtual` for **Windows Phone 8.x** -* Added basic **Android** support for hardware serial number -* [CB-9865](https://issues.apache.org/jira/browse/CB-9865) Better simulator detection for **iOS** -* Fixing contribute link. -* Added **WP8** implementation -* update to use `TARGET_OS_SIMULATOR` as `TARGET_IPHONE_SIMULATOR` is deprecated. -* update code to use 'isVirtual' -* create test to verify existence and type of new property 'isVirtual' -* add `isSimulator` for **iOS** & **Android** device -* Updated documentation to mention backwards compatibility -* Updated **README** to reflect new behaviour and quirks on **iOS** -* Check user defaults first to maintain backwards compatibility -* Changed `UUID` to use `[UIDevice identifierForVendor]` - -### 1.0.1 (Jun 17, 2015) -* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-device documentation translation: cordova-plugin-device -* Attempts to corrent npm markdown issue - -### 1.0.0 (Apr 15, 2015) -* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump -* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id -* Use TRAVIS_BUILD_DIR, install paramedic by npm -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme -* remove defunct windows8 version -* add travis badge -* Add cross-plugin ios paramedic test running for TravisCI -* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file - -### 0.3.0 (Feb 04, 2015) -* Added device.manufacturer property for Android, iOS, Blackberry, WP8 -* Support for Windows Phone 8 ANID2 ANID is only supported up to Windows Phone 7.5 -* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) Use a local copy of uniqueAppInstanceIdentifier rather than CordovaLib's version -* browser: Fixed a bug that caused an "cannot call method of undefined" error if the browser's user agent wasn't recognized - -### 0.2.13 (Dec 02, 2014) -* Changing `device.platform` to always report the platform as "browser". -* [CB-5892](https://issues.apache.org/jira/browse/CB-5892) - Remove deprecated `window.Settings` -* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-device documentation translation: cordova-plugin-device -* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin - -### 0.2.12 (Sep 17, 2014) -* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-device documentation translation -* [CB-7552](https://issues.apache.org/jira/browse/CB-7552) device.name docs have not been removed -* [fxos] Fix cordova version -* added status box and documentation to manual tests -* [fxos] Fix cordova version -* added status box and documentation to manual tests -* Added plugin support for the browser -* [CB-7262](https://issues.apache.org/jira/browse/CB-7262) Adds support for universal windows apps. - -### 0.2.11 (Aug 06, 2014) -* [FFOS] update DeviceProxy.js -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs -* Use Windows system calls to get better info - -### 0.2.10 (Jun 05, 2014) -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and French Translations added. Github close #12 -* Changing 1.5 to 2.0 -* added firefoxos version - conversion -* added firefoxos version -* [CB-6800](https://issues.apache.org/jira/browse/CB-6800) Add license -* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md - -### 0.2.9 (Apr 17, 2014) -* [CB-5105](https://issues.apache.org/jira/browse/CB-5105): [Android, windows8, WP, BlackBerry10] Removed dead code for device.version -* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy -* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers -* Add NOTICE file - -### 0.2.8 (Feb 05, 2014) -* Tizen support added - -### 0.2.7 (Jan 07, 2014) -* [CB-5737](https://issues.apache.org/jira/browse/CB-5737) Fix exception on close caused by left over telephony code from [CB-5504](https://issues.apache.org/jira/browse/CB-5504) - -### 0.2.6 (Jan 02, 2014) -* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc/index.md for Device plugin -* [CB-5504](https://issues.apache.org/jira/browse/CB-5504) Moving Telephony Logic out of Device - -### 0.2.5 (Dec 4, 2013) -* [CB-5316](https://issues.apache.org/jira/browse/CB-5316) Spell Cordova as a brand unless it's a command or script -* [ubuntu] use cordova/exec/proxy -* add ubuntu platform -* Modify Device.platform logic to use amazon-fireos as the platform for Amazon Devices -* 1. Added amazon-fireos platform. 2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos' - -### 0.2.4 (Oct 28, 2013) -* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag in plugin.xml for device plugin -* [CB-5085](https://issues.apache.org/jira/browse/CB-5085) device.cordova returning wrong value -* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. - -### 0.2.3 (Sept 25, 2013) -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version -* [windows8] commandProxy has moved -* [BlackBerry10] removed uneeded permission tags in plugin.xml -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.device to org.apache.cordova.device -* Rename CHANGELOG.md -> RELEASENOTES.md -* updated to use commandProxy for ffos -* add firefoxos support -* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. - -### 0.2.1 (Sept 5, 2013) -* removed extraneous print statement -* [CB-4432](https://issues.apache.org/jira/browse/CB-4432) copyright notice change diff --git a/plugins/cordova-plugin-device/package.json b/plugins/cordova-plugin-device/package.json deleted file mode 100644 index d429ba660..000000000 --- a/plugins/cordova-plugin-device/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "cordova-plugin-device", - "version": "2.0.3", - "description": "Cordova Device Plugin", - "types": "./types/index.d.ts", - "cordova": { - "id": "cordova-plugin-device", - "platforms": [ - "android", - "ios", - "windows", - "browser", - "osx" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/apache/cordova-plugin-device" - }, - "bugs": { - "url": "https://issues.apache.org/jira/browse/CB" - }, - "keywords": [ - "cordova", - "device", - "ecosystem:cordova", - "cordova-android", - "cordova-ios", - "cordova-windows", - "cordova-browser", - "cordova-osx" - ], - "scripts": { - "test": "npm run eslint", - "eslint": "node node_modules/eslint/bin/eslint www && node node_modules/eslint/bin/eslint src && node node_modules/eslint/bin/eslint tests" - }, - "author": "Apache Software Foundation", - "license": "Apache-2.0", - "engines": { - "cordovaDependencies": { - "3.0.0": { - "cordova": ">100" - } - } - }, - "devDependencies": { - "eslint": "^3.19.0", - "eslint-config-semistandard": "^11.0.0", - "eslint-config-standard": "^10.2.1", - "eslint-plugin-import": "^2.3.0", - "eslint-plugin-node": "^5.0.0", - "eslint-plugin-promise": "^3.5.0", - "eslint-plugin-standard": "^3.0.1" - } -} diff --git a/plugins/cordova-plugin-device/plugin.xml b/plugins/cordova-plugin-device/plugin.xml deleted file mode 100644 index 1adf4a428..000000000 --- a/plugins/cordova-plugin-device/plugin.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Device - Cordova Device Plugin - Apache 2.0 - cordova,device - https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git - https://issues.apache.org/jira/browse/CB/component/12320648 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/cordova-plugin-device/src/android/Device.java b/plugins/cordova-plugin-device/src/android/Device.java deleted file mode 100644 index e9efcb49b..000000000 --- a/plugins/cordova-plugin-device/src/android/Device.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.device; - -import java.util.TimeZone; - -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaInterface; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import android.provider.Settings; - -public class Device extends CordovaPlugin { - public static final String TAG = "Device"; - - public static String platform; // Device OS - public static String uuid; // Device UUID - - private static final String ANDROID_PLATFORM = "Android"; - private static final String AMAZON_PLATFORM = "amazon-fireos"; - private static final String AMAZON_DEVICE = "Amazon"; - - /** - * Constructor. - */ - public Device() { - } - - /** - * Sets the context of the Command. This can then be used to do things like - * get file paths associated with the Activity. - * - * @param cordova The context of the main Activity. - * @param webView The CordovaWebView Cordova is running in. - */ - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - Device.uuid = getUuid(); - } - - /** - * Executes the request and returns PluginResult. - * - * @param action The action to execute. - * @param args JSONArry of arguments for the plugin. - * @param callbackContext The callback id used when calling back into JavaScript. - * @return True if the action was valid, false if not. - */ - public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { - if ("getDeviceInfo".equals(action)) { - JSONObject r = new JSONObject(); - r.put("uuid", Device.uuid); - r.put("version", this.getOSVersion()); - r.put("platform", this.getPlatform()); - r.put("model", this.getModel()); - r.put("manufacturer", this.getManufacturer()); - r.put("isVirtual", this.isVirtual()); - r.put("serial", this.getSerialNumber()); - callbackContext.success(r); - } - else { - return false; - } - return true; - } - - //-------------------------------------------------------------------------- - // LOCAL METHODS - //-------------------------------------------------------------------------- - - /** - * Get the OS name. - * - * @return - */ - public String getPlatform() { - String platform; - if (isAmazonDevice()) { - platform = AMAZON_PLATFORM; - } else { - platform = ANDROID_PLATFORM; - } - return platform; - } - - /** - * Get the device's Universally Unique Identifier (UUID). - * - * @return - */ - public String getUuid() { - String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); - return uuid; - } - - public String getModel() { - String model = android.os.Build.MODEL; - return model; - } - - public String getProductName() { - String productname = android.os.Build.PRODUCT; - return productname; - } - - public String getManufacturer() { - String manufacturer = android.os.Build.MANUFACTURER; - return manufacturer; - } - - public String getSerialNumber() { - String serial = android.os.Build.SERIAL; - return serial; - } - - /** - * Get the OS version. - * - * @return - */ - public String getOSVersion() { - String osversion = android.os.Build.VERSION.RELEASE; - return osversion; - } - - public String getSDKVersion() { - @SuppressWarnings("deprecation") - String sdkversion = android.os.Build.VERSION.SDK; - return sdkversion; - } - - public String getTimeZoneID() { - TimeZone tz = TimeZone.getDefault(); - return (tz.getID()); - } - - /** - * Function to check if the device is manufactured by Amazon - * - * @return - */ - public boolean isAmazonDevice() { - if (android.os.Build.MANUFACTURER.equals(AMAZON_DEVICE)) { - return true; - } - return false; - } - - public boolean isVirtual() { - return android.os.Build.FINGERPRINT.contains("generic") || - android.os.Build.PRODUCT.contains("sdk"); - } - -} diff --git a/plugins/cordova-plugin-device/src/browser/DeviceProxy.js b/plugins/cordova-plugin-device/src/browser/DeviceProxy.js deleted file mode 100644 index 4dc80ec06..000000000 --- a/plugins/cordova-plugin-device/src/browser/DeviceProxy.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -var browser = require('cordova/platform'); - -function getPlatform () { - return 'browser'; -} - -function getModel () { - return getBrowserInfo(true); -} - -function getVersion () { - return getBrowserInfo(false); -} - -function getBrowserInfo (getModel) { - var userAgent = navigator.userAgent; - var returnVal = ''; - var offset; - - if ((offset = userAgent.indexOf('Edge')) !== -1) { - returnVal = (getModel) ? 'Edge' : userAgent.substring(offset + 5); - } else if ((offset = userAgent.indexOf('Chrome')) !== -1) { - returnVal = (getModel) ? 'Chrome' : userAgent.substring(offset + 7); - } else if ((offset = userAgent.indexOf('Safari')) !== -1) { - if (getModel) { - returnVal = 'Safari'; - } else { - returnVal = userAgent.substring(offset + 7); - - if ((offset = userAgent.indexOf('Version')) !== -1) { - returnVal = userAgent.substring(offset + 8); - } - } - } else if ((offset = userAgent.indexOf('Firefox')) !== -1) { - returnVal = (getModel) ? 'Firefox' : userAgent.substring(offset + 8); - } else if ((offset = userAgent.indexOf('MSIE')) !== -1) { - returnVal = (getModel) ? 'MSIE' : userAgent.substring(offset + 5); - } else if ((offset = userAgent.indexOf('Trident')) !== -1) { - returnVal = (getModel) ? 'MSIE' : '11'; - } - - if ((offset = returnVal.indexOf(';')) !== -1 || (offset = returnVal.indexOf(' ')) !== -1) { - returnVal = returnVal.substring(0, offset); - } - - return returnVal; -} - -module.exports = { - getDeviceInfo: function (success, error) { - setTimeout(function () { - success({ - cordova: browser.cordovaVersion, - platform: getPlatform(), - model: getModel(), - version: getVersion(), - uuid: null, - isVirtual: false - }); - }, 0); - } -}; - -require('cordova/exec/proxy').add('Device', module.exports); diff --git a/plugins/cordova-plugin-device/src/ios/CDVDevice.h b/plugins/cordova-plugin-device/src/ios/CDVDevice.h deleted file mode 100644 index a146d8829..000000000 --- a/plugins/cordova-plugin-device/src/ios/CDVDevice.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import - -@interface CDVDevice : CDVPlugin -{} - -+ (NSString*)cordovaVersion; - -- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command; - -@end diff --git a/plugins/cordova-plugin-device/src/ios/CDVDevice.m b/plugins/cordova-plugin-device/src/ios/CDVDevice.m deleted file mode 100644 index de535332f..000000000 --- a/plugins/cordova-plugin-device/src/ios/CDVDevice.m +++ /dev/null @@ -1,115 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#include -#include -#include "TargetConditionals.h" - -#import -#import "CDVDevice.h" - -@implementation UIDevice (ModelVersion) - -- (NSString*)modelVersion -{ -#if TARGET_IPHONE_SIMULATOR - NSString* platform = NSProcessInfo.processInfo.environment[@"SIMULATOR_MODEL_IDENTIFIER"]; -#else - size_t size; - - sysctlbyname("hw.machine", NULL, &size, NULL, 0); - char* machine = malloc(size); - sysctlbyname("hw.machine", machine, &size, NULL, 0); - NSString* platform = [NSString stringWithUTF8String:machine]; - free(machine); -#endif - return platform; -} - -@end - -@interface CDVDevice () {} -@end - -@implementation CDVDevice - -- (NSString*)uniqueAppInstanceIdentifier:(UIDevice*)device -{ - NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; - static NSString* UUID_KEY = @"CDVUUID"; - - // Check user defaults first to maintain backwards compaitibility with previous versions - // which didn't user identifierForVendor - NSString* app_uuid = [userDefaults stringForKey:UUID_KEY]; - if (app_uuid == nil) { - if ([device respondsToSelector:@selector(identifierForVendor)]) { - app_uuid = [[device identifierForVendor] UUIDString]; - } else { - CFUUIDRef uuid = CFUUIDCreate(NULL); - app_uuid = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, uuid); - CFRelease(uuid); - } - - [userDefaults setObject:app_uuid forKey:UUID_KEY]; - [userDefaults synchronize]; - } - - return app_uuid; -} - -- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command -{ - NSDictionary* deviceProperties = [self deviceProperties]; - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties]; - - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; -} - -- (NSDictionary*)deviceProperties -{ - UIDevice* device = [UIDevice currentDevice]; - - return @{ - @"manufacturer": @"Apple", - @"model": [device modelVersion], - @"platform": @"iOS", - @"version": [device systemVersion], - @"uuid": [self uniqueAppInstanceIdentifier:device], - @"cordova": [[self class] cordovaVersion], - @"isVirtual": @([self isVirtual]) - }; -} - -+ (NSString*)cordovaVersion -{ - return CDV_VERSION; -} - -- (BOOL)isVirtual -{ - #if TARGET_OS_SIMULATOR - return true; - #elif TARGET_IPHONE_SIMULATOR - return true; - #else - return false; - #endif -} - -@end diff --git a/plugins/cordova-plugin-device/src/osx/CDVDevice.h b/plugins/cordova-plugin-device/src/osx/CDVDevice.h deleted file mode 100644 index 9def25487..000000000 --- a/plugins/cordova-plugin-device/src/osx/CDVDevice.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import - -@interface CDVDevice : CDVPlugin - -+ (NSString*) cordovaVersion; - -- (void) getDeviceInfo:(CDVInvokedUrlCommand*)command; - -@end diff --git a/plugins/cordova-plugin-device/src/osx/CDVDevice.m b/plugins/cordova-plugin-device/src/osx/CDVDevice.m deleted file mode 100644 index 3a63588fa..000000000 --- a/plugins/cordova-plugin-device/src/osx/CDVDevice.m +++ /dev/null @@ -1,113 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#include - -#import "CDVDevice.h" - -#define SYSTEM_VERSION_PLIST @"/System/Library/CoreServices/SystemVersion.plist" - -@implementation CDVDevice - -- (NSString*) modelVersion { - size_t size; - - sysctlbyname("hw.machine", NULL, &size, NULL, 0); - char* machine = malloc(size); - sysctlbyname("hw.machine", machine, &size, NULL, 0); - NSString* modelVersion = [NSString stringWithUTF8String:machine]; - free(machine); - - return modelVersion; -} - - -- (NSString*) getSerialNr { - NSString* serialNr; - io_service_t platformExpert = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice")); - if (platformExpert) { - CFTypeRef serialNumberAsCFString = - IORegistryEntryCreateCFProperty(platformExpert, - CFSTR(kIOPlatformSerialNumberKey), - kCFAllocatorDefault, 0); - if (serialNumberAsCFString) { - serialNr = (__bridge NSString*) serialNumberAsCFString; - } - IOObjectRelease(platformExpert); - } - return serialNr; -} - -- (NSString*) uniqueAppInstanceIdentifier { - NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; - static NSString* UUID_KEY = @"CDVUUID"; - - NSString* app_uuid = [userDefaults stringForKey:UUID_KEY]; - - if (app_uuid == nil) { - CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); - CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef); - - app_uuid = [NSString stringWithString:(__bridge NSString*) uuidString]; - [userDefaults setObject:app_uuid forKey:UUID_KEY]; - [userDefaults synchronize]; - - CFRelease(uuidString); - CFRelease(uuidRef); - } - - return app_uuid; -} - -- (NSString*) platform { - return [NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST][@"ProductName"]; -} - -- (NSString*) systemVersion { - return [NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST][@"ProductVersion"]; -} - -- (void) getDeviceInfo:(CDVInvokedUrlCommand*) command { - NSDictionary* deviceProperties = [self deviceProperties]; - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties]; - - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; -} - -- (NSDictionary*) deviceProperties { - NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4]; - - devProps[@"manufacturer"] = @"Apple"; - devProps[@"model"] = [self modelVersion]; - devProps[@"platform"] = [self platform]; - devProps[@"version"] = [self systemVersion]; - devProps[@"uuid"] = [self uniqueAppInstanceIdentifier]; - devProps[@"cordova"] = [[self class] cordovaVersion]; - devProps[@"serial"] = [self getSerialNr]; - devProps[@"isVirtual"] = @NO; - - NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps]; - return devReturn; -} - -+ (NSString*) cordovaVersion { - return CDV_VERSION; -} - -@end diff --git a/plugins/cordova-plugin-device/src/windows/DeviceProxy.js b/plugins/cordova-plugin-device/src/windows/DeviceProxy.js deleted file mode 100644 index ccaaaee6d..000000000 --- a/plugins/cordova-plugin-device/src/windows/DeviceProxy.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/* global Windows, createUUID */ - -var ROOT_CONTAINER = '{00000000-0000-0000-FFFF-FFFFFFFFFFFF}'; -var DEVICE_CLASS_KEY = '{A45C254E-DF1C-4EFD-8020-67D146A850E0},10'; -var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10'; -var ROOT_CONTAINER_QUERY = 'System.Devices.ContainerId:="' + ROOT_CONTAINER + '"'; -var HAL_DEVICE_CLASS = '4d36e966-e325-11ce-bfc1-08002be10318'; -var DEVICE_DRIVER_VERSION_KEY = '{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3'; - -module.exports = { - - getDeviceInfo: function (win, fail, args) { - - // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId - var deviceId; - // get deviceId, or create and store one - var localSettings = Windows.Storage.ApplicationData.current.localSettings; - if (localSettings.values.deviceId) { - deviceId = localSettings.values.deviceId; - } else { - // App-specific hardware id could be used as uuid, but it changes if the hardware changes... - try { - var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id; - deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid(); - } catch (e) { - // Couldn't get the hardware UUID - deviceId = createUUID(); - } - // ...so cache it per-install - localSettings.values.deviceId = deviceId; - } - - var userAgent = window.clientInformation.userAgent; - // this will report "windows" in windows8.1 and windows phone 8.1 apps - // and "windows8" in windows 8.0 apps similar to cordova.js - // See https://github.com/apache/cordova-js/blob/master/src/windows/platform.js#L25 - var devicePlatform = userAgent.indexOf('MSAppHost/1.0') === -1 ? 'windows' : 'windows8'; - var versionString = userAgent.match(/Windows (?:Phone |NT )?([0-9.]+)/)[1]; - - var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation(); - // Running in the Windows Simulator is a remote session. - // Running in the Windows Phone Emulator has the systemProductName set to "Virtual" - var isVirtual = Windows.System.RemoteDesktop.InteractiveSession.isRemote || deviceInfo.systemProductName === 'Virtual'; - var manufacturer = deviceInfo.systemManufacturer; - var model = deviceInfo.systemProductName; - - var Pnp = Windows.Devices.Enumeration.Pnp; - - Pnp.PnpObject.findAllAsync(Pnp.PnpObjectType.device, - [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], - ROOT_CONTAINER_QUERY) - .then(function (rootDevices) { - for (var i = 0; i < rootDevices.length; i++) { - var rootDevice = rootDevices[i]; - if (!rootDevice.properties) continue; - if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] === HAL_DEVICE_CLASS) { - versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY]; - break; - } - } - - setTimeout(function () { - win({ platform: devicePlatform, - version: versionString, - uuid: deviceId, - isVirtual: isVirtual, - model: model, - manufacturer: manufacturer}); - }, 0); - }); - } - -}; // exports - -require('cordova/exec/proxy').add('Device', module.exports); diff --git a/plugins/cordova-plugin-device/tests/package.json b/plugins/cordova-plugin-device/tests/package.json deleted file mode 100644 index 7d7c905f7..000000000 --- a/plugins/cordova-plugin-device/tests/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "cordova-plugin-device-tests", - "version": "2.0.3", - "description": "", - "cordova": { - "id": "cordova-plugin-device-tests", - "platforms": [] - }, - "keywords": [ - "ecosystem:cordova" - ], - "author": "", - "license": "Apache 2.0" -} diff --git a/plugins/cordova-plugin-device/tests/plugin.xml b/plugins/cordova-plugin-device/tests/plugin.xml deleted file mode 100644 index a170a6f8c..000000000 --- a/plugins/cordova-plugin-device/tests/plugin.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Cordova Device Plugin Tests - Apache 2.0 - - - - diff --git a/plugins/cordova-plugin-device/tests/tests.js b/plugins/cordova-plugin-device/tests/tests.js deleted file mode 100644 index 03e1fc77b..000000000 --- a/plugins/cordova-plugin-device/tests/tests.js +++ /dev/null @@ -1,113 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/* eslint-env jasmine */ - -exports.defineAutoTests = function () { - describe('Device Information (window.device)', function () { - it('should exist', function () { - expect(window.device).toBeDefined(); - }); - - it('should contain a platform specification that is a string', function () { - expect(window.device.platform).toBeDefined(); - expect((String(window.device.platform)).length > 0).toBe(true); - }); - - it('should contain a version specification that is a string', function () { - expect(window.device.version).toBeDefined(); - expect((String(window.device.version)).length > 0).toBe(true); - }); - - it('should contain a UUID specification that is a string or a number', function () { - expect(window.device.uuid).toBeDefined(); - if (typeof window.device.uuid === 'string' || typeof window.device.uuid === 'object') { - expect((String(window.device.uuid)).length > 0).toBe(true); - } else { - expect(window.device.uuid > 0).toBe(true); - } - }); - - it('should contain a cordova specification that is a string', function () { - expect(window.device.cordova).toBeDefined(); - expect((String(window.device.cordova)).length > 0).toBe(true); - }); - - it('should depend on the presence of cordova.version string', function () { - expect(window.cordova.version).toBeDefined(); - expect((String(window.cordova.version)).length > 0).toBe(true); - }); - - it('should contain device.cordova equal to cordova.version', function () { - expect(window.device.cordova).toBe(window.cordova.version); - }); - - it('should contain a model specification that is a string', function () { - expect(window.device.model).toBeDefined(); - expect((String(window.device.model)).length > 0).toBe(true); - }); - - it('should contain a manufacturer property that is a string', function () { - expect(window.device.manufacturer).toBeDefined(); - expect((String(window.device.manufacturer)).length > 0).toBe(true); - }); - - it('should contain an isVirtual property that is a boolean', function () { - expect(window.device.isVirtual).toBeDefined(); - expect(typeof window.device.isVirtual).toBe('boolean'); - }); - - it('should contain a serial number specification that is a string', function () { - expect(window.device.serial).toBeDefined(); - expect((String(window.device.serial)).length > 0).toBe(true); - - }); - - }); -}; - -exports.defineManualTests = function (contentEl, createActionButton) { - var logMessage = function (message, color) { - var log = document.getElementById('info'); - var logLine = document.createElement('div'); - if (color) { - logLine.style.color = color; - } - logLine.innerHTML = message; - log.appendChild(logLine); - }; - - var clearLog = function () { - var log = document.getElementById('info'); - log.innerHTML = ''; - }; - - var device_tests = '

Press Dump Device button to get device information

' + - '
' + - 'Expected result: Status box will get updated with device info. (i.e. platform, version, uuid, model, etc)'; - - contentEl.innerHTML = '
' + device_tests; - - createActionButton('Dump device', function () { - clearLog(); - logMessage(JSON.stringify(window.device, null, '\t')); - }, 'dump_device'); -}; diff --git a/plugins/cordova-plugin-device/types/index.d.ts b/plugins/cordova-plugin-device/types/index.d.ts deleted file mode 100644 index cbb341bcd..000000000 --- a/plugins/cordova-plugin-device/types/index.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Type definitions for cordova-plugin-device 2.0 -// Project: https://github.com/apache/cordova-plugin-device -// Definitions by: Microsoft Open Technologies Inc -// Tim Brust -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/** - * This plugin defines a global device object, which describes the device's hardware and software. - * Although the object is in the global scope, it is not available until after the deviceready event. - */ -interface Device { - /** Get the version of Cordova running on the device. */ - cordova: string; - /** Indicates that Cordova initialize successfully. */ - available: boolean; - /** - * The device.model returns the name of the device's model or product. The value is set - * by the device manufacturer and may be different across versions of the same product. - */ - model: string; - /** Get the device's operating system name. */ - platform: string; - /** Get the device's Universally Unique Identifier (UUID). */ - uuid: string; - /** Get the operating system version. */ - version: string; - /** Get the device's manufacturer. */ - manufacturer: string; - /** Whether the device is running on a simulator. */ - isVirtual: boolean; - /** Get the device hardware serial number. */ - serial: string; -} - -declare var device: Device; \ No newline at end of file diff --git a/plugins/cordova-plugin-device/www/device.js b/plugins/cordova-plugin-device/www/device.js deleted file mode 100644 index 41ed04f66..000000000 --- a/plugins/cordova-plugin-device/www/device.js +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var argscheck = require('cordova/argscheck'); -var channel = require('cordova/channel'); -var utils = require('cordova/utils'); -var exec = require('cordova/exec'); -var cordova = require('cordova'); - -channel.createSticky('onCordovaInfoReady'); -// Tell cordova channel to wait on the CordovaInfoReady event -channel.waitForInitialization('onCordovaInfoReady'); - -/** - * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the - * phone, etc. - * @constructor - */ -function Device () { - this.available = false; - this.platform = null; - this.version = null; - this.uuid = null; - this.cordova = null; - this.model = null; - this.manufacturer = null; - this.isVirtual = null; - this.serial = null; - - var me = this; - - channel.onCordovaReady.subscribe(function () { - me.getInfo(function (info) { - // ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js - // TODO: CB-5105 native implementations should not return info.cordova - var buildLabel = cordova.version; - me.available = true; - me.platform = info.platform; - me.version = info.version; - me.uuid = info.uuid; - me.cordova = buildLabel; - me.model = info.model; - me.isVirtual = info.isVirtual; - me.manufacturer = info.manufacturer || 'unknown'; - me.serial = info.serial || 'unknown'; - channel.onCordovaInfoReady.fire(); - }, function (e) { - me.available = false; - utils.alert('[ERROR] Error initializing Cordova: ' + e); - }); - }); -} - -/** - * Get device info - * - * @param {Function} successCallback The function to call when the heading data is available - * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL) - */ -Device.prototype.getInfo = function (successCallback, errorCallback) { - argscheck.checkArgs('fF', 'Device.getInfo', arguments); - exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []); -}; - -module.exports = new Device(); diff --git a/plugins/cordova-plugin-file/.jshintrc b/plugins/cordova-plugin-file/.jshintrc deleted file mode 100644 index 177bbf924..000000000 --- a/plugins/cordova-plugin-file/.jshintrc +++ /dev/null @@ -1,30 +0,0 @@ -{ - "browser": true - , "devel": true - , "bitwise": true - , "undef": true - , "trailing": true - , "quotmark": false - , "indent": 4 - , "unused": "vars" - , "latedef": "nofunc" - , "globals": { - "module": false, - "exports": false, - "require": false, - "cordova": false, - "File": true, - "FileSystem": true, - "FileReader": true, - "FileWriter": true, - "FileError": true, - "LocalFileSystem": true, - "Metadata": true, - "Flags": true, - "DirectoryEntry": true, - "resolveLocalFileSystemURL": false, - "requestFileSystem": true, - "FILESYSTEM_PREFIX": true, - "FILESYSTEM_PROTOCOL": true - } -} diff --git a/plugins/cordova-plugin-file/.ratignore b/plugins/cordova-plugin-file/.ratignore deleted file mode 100644 index 1bc8940fa..000000000 --- a/plugins/cordova-plugin-file/.ratignore +++ /dev/null @@ -1 +0,0 @@ -asset-test.txt diff --git a/plugins/cordova-plugin-file/CONTRIBUTING.md b/plugins/cordova-plugin-file/CONTRIBUTING.md deleted file mode 100644 index 4c8e6a5ea..000000000 --- a/plugins/cordova-plugin-file/CONTRIBUTING.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# Contributing to Apache Cordova - -Anyone can contribute to Cordova. And we need your contributions. - -There are multiple ways to contribute: report bugs, improve the docs, and -contribute code. - -For instructions on this, start with the -[contribution overview](http://cordova.apache.org/contribute/). - -The details are explained there, but the important items are: - - Sign and submit an Apache ICLA (Contributor License Agreement). - - Have a Jira issue open that corresponds to your contribution. - - Run the tests so your patch doesn't break existing functionality. - -We look forward to your contributions! diff --git a/plugins/cordova-plugin-file/LICENSE b/plugins/cordova-plugin-file/LICENSE deleted file mode 100644 index 7a4a3ea24..000000000 --- a/plugins/cordova-plugin-file/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-file/NOTICE b/plugins/cordova-plugin-file/NOTICE deleted file mode 100644 index 8ec56a524..000000000 --- a/plugins/cordova-plugin-file/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -Apache Cordova -Copyright 2012 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). diff --git a/plugins/cordova-plugin-file/README.md b/plugins/cordova-plugin-file/README.md deleted file mode 100644 index 33057c71b..000000000 --- a/plugins/cordova-plugin-file/README.md +++ /dev/null @@ -1,833 +0,0 @@ ---- -title: File -description: Read/write files on the device. ---- - - -|AppVeyor|Travis CI| -|:-:|:-:| -|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-file?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-file)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-file.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-file)| - -# cordova-plugin-file - -This plugin implements a File API allowing read/write access to files residing on the device. - -This plugin is based on several specs, including : -The HTML5 File API -[http://www.w3.org/TR/FileAPI/](http://www.w3.org/TR/FileAPI/) - -The Directories and System extensions -Latest: -[http://www.w3.org/TR/2012/WD-file-system-api-20120417/](http://www.w3.org/TR/2012/WD-file-system-api-20120417/) -Although most of the plugin code was written when an earlier spec was current: -[http://www.w3.org/TR/2011/WD-file-system-api-20110419/](http://www.w3.org/TR/2011/WD-file-system-api-20110419/) - -It also implements the FileWriter spec : -[http://dev.w3.org/2009/dap/file-system/file-writer.html](http://dev.w3.org/2009/dap/file-system/file-writer.html) - ->*Note* While the W3C FileSystem spec is deprecated for web browsers, the FileSystem APIs are supported in Cordova applications with this plugin for the platforms listed in the _Supported Platforms_ list, with the exception of the Browser platform. - -To get a few ideas how to use the plugin, check out the [sample](#sample) at the bottom of this page. For additional examples (browser focused), see the HTML5 Rocks' [FileSystem article.](http://www.html5rocks.com/en/tutorials/file/filesystem/) - -For an overview of other storage options, refer to Cordova's -[storage guide](http://cordova.apache.org/docs/en/latest/cordova/storage/storage.html). - -This plugin defines global `cordova.file` object. - -Although in the global scope, it is not available until after the `deviceready` event. - - document.addEventListener("deviceready", onDeviceReady, false); - function onDeviceReady() { - console.log(cordova.file); - } - -## Installation - - cordova plugin add cordova-plugin-file - -## Supported Platforms - -- Android -- iOS -- OS X -- Windows* -- Browser - -\* _These platforms do not support `FileReader.readAsArrayBuffer` nor `FileWriter.write(blob)`._ - -## Where to Store Files - -As of v1.2.0, URLs to important file-system directories are provided. -Each URL is in the form _file:///path/to/spot/_, and can be converted to a -`DirectoryEntry` using `window.resolveLocalFileSystemURL()`. - -* `cordova.file.applicationDirectory` - Read-only directory where the application - is installed. (_iOS_, _Android_, _BlackBerry 10_, _OSX_, _windows_) - -* `cordova.file.applicationStorageDirectory` - Root directory of the application's - sandbox; on iOS & windows this location is read-only (but specific subdirectories [like - `/Documents` on iOS or `/localState` on windows] are read-write). All data contained within - is private to the app. (_iOS_, _Android_, _BlackBerry 10_, _OSX_) - -* `cordova.file.dataDirectory` - Persistent and private data storage within the - application's sandbox using internal memory (on Android, if you need to use - external memory, use `.externalDataDirectory`). On iOS, this directory is not - synced with iCloud (use `.syncedDataDirectory`). (_iOS_, _Android_, _BlackBerry 10_, _windows_) - -* `cordova.file.cacheDirectory` - Directory for cached data files or any files - that your app can re-create easily. The OS may delete these files when the device - runs low on storage, nevertheless, apps should not rely on the OS to delete files - in here. (_iOS_, _Android_, _BlackBerry 10_, _OSX_, _windows_) - -* `cordova.file.externalApplicationStorageDirectory` - Application space on - external storage. (_Android_) - -* `cordova.file.externalDataDirectory` - Where to put app-specific data files on - external storage. (_Android_) - -* `cordova.file.externalCacheDirectory` - Application cache on external storage. - (_Android_) - -* `cordova.file.externalRootDirectory` - External storage (SD card) root. (_Android_, _BlackBerry 10_) - -* `cordova.file.tempDirectory` - Temp directory that the OS can clear at will. Do not - rely on the OS to clear this directory; your app should always remove files as - applicable. (_iOS_, _OSX_, _windows_) - -* `cordova.file.syncedDataDirectory` - Holds app-specific files that should be synced - (e.g. to iCloud). (_iOS_, _windows_) - -* `cordova.file.documentsDirectory` - Files private to the app, but that are meaningful - to other application (e.g. Office files). Note that for _OSX_ this is the user's `~/Documents` directory. (_iOS_, _OSX_) - -* `cordova.file.sharedDirectory` - Files globally available to all applications (_BlackBerry 10_) - -## File System Layouts - -Although technically an implementation detail, it can be very useful to know how -the `cordova.file.*` properties map to physical paths on a real device. - -### iOS File System Layout - -| Device Path | `cordova.file.*` | `iosExtraFileSystems` | r/w? | persistent? | OS clears | sync | private | -|:-----------------------------------------------|:----------------------------|:----------------------|:----:|:-----------:|:---------:|:----:|:-------:| -| `/var/mobile/Applications//` | applicationStorageDirectory | - | r | N/A | N/A | N/A | Yes | -|    `appname.app/` | applicationDirectory | bundle | r | N/A | N/A | N/A | Yes | -|       `www/` | - | - | r | N/A | N/A | N/A | Yes | -|    `Documents/` | documentsDirectory | documents | r/w | Yes | No | Yes | Yes | -|       `NoCloud/` | - | documents-nosync | r/w | Yes | No | No | Yes | -|    `Library` | - | library | r/w | Yes | No | Yes? | Yes | -|       `NoCloud/` | dataDirectory | library-nosync | r/w | Yes | No | No | Yes | -|       `Cloud/` | syncedDataDirectory | - | r/w | Yes | No | Yes | Yes | -|       `Caches/` | cacheDirectory | cache | r/w | Yes* | Yes\*\*\*| No | Yes | -|    `tmp/` | tempDirectory | - | r/w | No\*\* | Yes\*\*\*| No | Yes | - - - \* Files persist across app restarts and upgrades, but this directory can - be cleared whenever the OS desires. Your app should be able to recreate any - content that might be deleted. - -\*\* Files may persist across app restarts, but do not rely on this behavior. Files - are not guaranteed to persist across updates. Your app should remove files from - this directory when it is applicable, as the OS does not guarantee when (or even - if) these files are removed. - -\*\*\* The OS may clear the contents of this directory whenever it feels it is - necessary, but do not rely on this. You should clear this directory as - appropriate for your application. - -### Android File System Layout - -| Device Path | `cordova.file.*` | `AndroidExtraFileSystems` | r/w? | persistent? | OS clears | private | -|:------------------------------------------------|:----------------------------|:--------------------------|:----:|:-----------:|:---------:|:-------:| -| `file:///android_asset/` | applicationDirectory | assets | r | N/A | N/A | Yes | -| `/data/data//` | applicationStorageDirectory | - | r/w | N/A | N/A | Yes | -|    `cache` | cacheDirectory | cache | r/w | Yes | Yes\* | Yes | -|    `files` | dataDirectory | files | r/w | Yes | No | Yes | -|       `Documents` | | documents | r/w | Yes | No | Yes | -| `/` | externalRootDirectory | sdcard | r/w | Yes | No | No | -|    `Android/data//` | externalApplicationStorageDirectory | - | r/w | Yes | No | No | -|       `cache` | externalCacheDirectory | cache-external | r/w | Yes | No\*\*| No | -|       `files` | externalDataDirectory | files-external | r/w | Yes | No | No | - -\* The OS may periodically clear this directory, but do not rely on this behavior. Clear - the contents of this directory as appropriate for your application. Should a user - purge the cache manually, the contents of this directory are removed. - -\*\* The OS does not clear this directory automatically; you are responsible for managing - the contents yourself. Should the user purge the cache manually, the contents of the - directory are removed. - -**Note**: If external storage can't be mounted, the `cordova.file.external*` -properties are `null`. - -### OS X File System Layout - -| Device Path | `cordova.file.*` | `iosExtraFileSystems` | r/w? | OS clears | private | -|:-------------------------------------------------|:----------------------------|:----------------------|:----:|:---------:|:-------:| -| `/Applications/.app/` | - | bundle | r | N/A | Yes | -|     `Content/Resources/` | applicationDirectory | - | r | N/A | Yes | -| `~/Library/Application Support//` | applicationStorageDirectory | - | r/w | No | Yes | -|     `files/` | dataDirectory | - | r/w | No | Yes | -| `~/Documents/` | documentsDirectory | documents | r/w | No | No | -| `~/Library/Caches//` | cacheDirectory | cache | r/w | No | Yes | -| `/tmp/` | tempDirectory | - | r/w | Yes\* | Yes | -| `/` | rootDirectory | root | r/w | No\*\* | No | - -**Note**: This is the layout for non sandboxed applications. I you enable sandboxing, the `applicationStorageDirectory` will be below ` ~/Library/Containers//Data/Library/Application Support`. - -\* Files persist across app restarts and upgrades, but this directory can - be cleared whenever the OS desires. Your app should be able to recreate any - content that might be deleted. You should clear this directory as - appropriate for your application. - -\*\* Allows access to the entire file system. This is only available for non sandboxed apps. - -### Windows File System Layout - -| Device Path | `cordova.file.*` | r/w? | persistent? | OS clears | private | -|:------------------------------------------------------|:----------------------------|:----:|:-----------:|:---------:|:-------:| -| `ms-appdata:///` | applicationDirectory | r | N/A | N/A | Yes | -|    `local/` | dataDirectory | r/w | Yes | No | Yes | -|    `temp/` | cacheDirectory | r/w | No | Yes\* | Yes | -|    `temp/` | tempDirectory | r/w | No | Yes\* | Yes | -|    `roaming/` | syncedDataDirectory | r/w | Yes | No | Yes | - -\* The OS may periodically clear this directory - - -## Android Quirks - -### Android Persistent storage location - -There are multiple valid locations to store persistent files on an Android -device. See [this page](http://developer.android.com/guide/topics/data/data-storage.html) -for an extensive discussion of the various possibilities. - -Previous versions of the plugin would choose the location of the temporary and -persistent files on startup, based on whether the device claimed that the SD -Card (or equivalent storage partition) was mounted. If the SD Card was mounted, -or if a large internal storage partition was available (such as on Nexus -devices,) then the persistent files would be stored in the root of that space. -This meant that all Cordova apps could see all of the files available on the -card. - -If the SD card was not available, then previous versions would store data under -`/data/data/`, which isolates apps from each other, but may still -cause data to be shared between users. - -It is now possible to choose whether to store files in the internal file -storage location, or using the previous logic, with a preference in your -application's `config.xml` file. To do this, add one of these two lines to -`config.xml`: - - - - - -Without this line, the File plugin will use `Internal` as the default. If -a preference tag is present, and is not one of these values, the application -will not start. - -If your application has previously been shipped to users, using an older (pre- -3.0.0) version of this plugin, and has stored files in the persistent filesystem, -then you should set the preference to `Compatibility` if your config.xml does not specify a location for the persistent filesystem. Switching the location to -"Internal" would mean that existing users who upgrade their application may be -unable to access their previously-stored files, depending on their device. - -If your application is new, or has never previously stored files in the -persistent filesystem, then the `Internal` setting is generally recommended. - -### Slow recursive operations for /android_asset - -Listing asset directories is really slow on Android. You can speed it up though, by -adding `src/android/build-extras.gradle` to the root of your android project (also -requires cordova-android@4.0.0 or greater). - -### Permisson to write to external storage when it's not mounted on Marshmallow - -Marshmallow requires the apps to ask for permissions when reading/writing to external locations. By -[default](http://developer.android.com/guide/topics/data/data-storage.html#filesExternal), your app has permission to write to -`cordova.file.applicationStorageDirectory` and `cordova.file.externalApplicationStorageDirectory`, and the plugin doesn't request permission -for these two directories unless external storage is not mounted. However due to a limitation, when external storage is not mounted, it would ask for -permission to write to `cordova.file.externalApplicationStorageDirectory`. - -## iOS Quirks - -- `cordova.file.applicationStorageDirectory` is read-only; attempting to store - files within the root directory will fail. Use one of the other `cordova.file.*` - properties defined for iOS (only `applicationDirectory` and `applicationStorageDirectory` are - read-only). -- `FileReader.readAsText(blob, encoding)` - - The `encoding` parameter is not supported, and UTF-8 encoding is always in effect. - -### iOS Persistent storage location - -There are two valid locations to store persistent files on an iOS device: the -Documents directory and the Library directory. Previous versions of the plugin -only ever stored persistent files in the Documents directory. This had the -side-effect of making all of an application's files visible in iTunes, which -was often unintended, especially for applications which handle lots of small -files, rather than producing complete documents for export, which is the -intended purpose of the directory. - -It is now possible to choose whether to store files in the documents or library -directory, with a preference in your application's `config.xml` file. To do this, -add one of these two lines to `config.xml`: - - - - - -Without this line, the File plugin will use `Compatibility` as the default. If -a preference tag is present, and is not one of these values, the application -will not start. - -If your application has previously been shipped to users, using an older (pre- -1.0) version of this plugin, and has stored files in the persistent filesystem, -then you should set the preference to `Compatibility`. Switching the location to -`Library` would mean that existing users who upgrade their application would be -unable to access their previously-stored files. - -If your application is new, or has never previously stored files in the -persistent filesystem, then the `Library` setting is generally recommended. - -## Browser Quirks - -### Common quirks and remarks -- Each browser uses its own sandboxed filesystem. IE and Firefox use IndexedDB as a base. -All browsers use forward slash as directory separator in a path. -- Directory entries have to be created successively. -For example, the call `fs.root.getDirectory('dir1/dir2', {create:true}, successCallback, errorCallback)` -will fail if dir1 did not exist. -- The plugin requests user permission to use persistent storage at the application first start. -- Plugin supports `cdvfile://localhost` (local resources) only. I.e. external resources are not supported via `cdvfile`. -- The plugin does not follow ["File System API 8.3 Naming restrictions"](http://www.w3.org/TR/2011/WD-file-system-api-20110419/#naming-restrictions). -- Blob and File' `close` function is not supported. -- `FileSaver` and `BlobBuilder` are not supported by this plugin and don't have stubs. -- The plugin does not support `requestAllFileSystems`. This function is also missing in the specifications. -- Entries in directory will not be removed if you use `create: true` flag for existing directory. -- Files created via constructor are not supported. You should use entry.file method instead. -- Each browser uses its own form for blob URL references. -- `readAsDataURL` function is supported, but the mediatype in Chrome depends on entry name extension, -mediatype in IE is always empty (which is the same as `text-plain` according the specification), -the mediatype in Firefox is always `application/octet-stream`. -For example, if the content is `abcdefg` then Firefox returns `data:application/octet-stream;base64,YWJjZGVmZw==`, -IE returns `data:;base64,YWJjZGVmZw==`, Chrome returns `data:;base64,YWJjZGVmZw==`. -- `toInternalURL` returns the path in the form `file:///persistent/path/to/entry` (Firefox, IE). -Chrome returns the path in the form `cdvfile://localhost/persistent/file`. - -### Chrome quirks -- Chrome filesystem is not immediately ready after device ready event. As a workaround you can subscribe to `filePluginIsReady` event. -Example: -```javascript -window.addEventListener('filePluginIsReady', function(){ console.log('File plugin is ready');}, false); -``` -You can use `window.isFilePluginReadyRaised` function to check whether event was already raised. -- window.requestFileSystem TEMPORARY and PERSISTENT filesystem quotas are not limited in Chrome. -- To increase persistent storage in Chrome you need to call `window.initPersistentFileSystem` method. Persistent storage quota is 5 MB by default. -- Chrome requires `--allow-file-access-from-files` run argument to support API via `file:///` protocol. -- `File` object will be not changed if you use flag `{create:true}` when getting an existing `Entry`. -- events `cancelable` property is set to true in Chrome. This is contrary to the [specification](http://dev.w3.org/2009/dap/file-system/file-writer.html). -- `toURL` function in Chrome returns `filesystem:`-prefixed path depending on application host. -For example, `filesystem:file:///persistent/somefile.txt`, `filesystem:http://localhost:8080/persistent/somefile.txt`. -- `toURL` function result does not contain trailing slash in case of directory entry. -Chrome resolves directories with slash-trailed urls correctly though. -- `resolveLocalFileSystemURL` method requires the inbound `url` to have `filesystem` prefix. For example, `url` parameter for `resolveLocalFileSystemURL` -should be in the form `filesystem:file:///persistent/somefile.txt` as opposed to the form `file:///persistent/somefile.txt` in Android. -- Deprecated `toNativeURL` function is not supported and does not have a stub. -- `setMetadata` function is not stated in the specifications and not supported. -- INVALID_MODIFICATION_ERR (code: 9) is thrown instead of SYNTAX_ERR(code: 8) on requesting of a non-existant filesystem. -- INVALID_MODIFICATION_ERR (code: 9) is thrown instead of PATH_EXISTS_ERR(code: 12) on trying to exclusively create a file or directory, which already exists. -- INVALID_MODIFICATION_ERR (code: 9) is thrown instead of NO_MODIFICATION_ALLOWED_ERR(code: 6) on trying to call removeRecursively on the root file system. -- INVALID_MODIFICATION_ERR (code: 9) is thrown instead of NOT_FOUND_ERR(code: 1) on trying to moveTo directory that does not exist. - -### IndexedDB-based impl quirks (Firefox and IE) -- `.` and `..` are not supported. -- IE does not support `file:///`-mode; only hosted mode is supported (http://localhost:xxxx). -- Firefox filesystem size is not limited but each 50MB extension will request a user permission. -IE10 allows up to 10mb of combined AppCache and IndexedDB used in implementation of filesystem without prompting, -once you hit that level you will be asked if you want to allow it to be increased up to a max of 250mb per site. -So `size` parameter for `requestFileSystem` function does not affect filesystem in Firefox and IE. -- `readAsBinaryString` function is not stated in the Specs and not supported in IE and does not have a stub. -- `file.type` is always null. -- You should not create entry using DirectoryEntry instance callback result which was deleted. -Otherwise, you will get a 'hanging entry'. -- Before you can read a file, which was just written you need to get a new instance of this file. -- `setMetadata` function, which is not stated in the Specs supports `modificationTime` field change only. -- `copyTo` and `moveTo` functions do not support directories. -- Directories metadata is not supported. -- Both Entry.remove and directoryEntry.removeRecursively don't fail when removing -non-empty directories - directories being removed are cleaned along with contents instead. -- `abort` and `truncate` functions are not supported. -- progress events are not fired. For example, this handler will be not executed: -```javascript -writer.onprogress = function() { /*commands*/ }; -``` - -## Upgrading Notes - -In v1.0.0 of this plugin, the `FileEntry` and `DirectoryEntry` structures have changed, -to be more in line with the published specification. - -Previous (pre-1.0.0) versions of the plugin stored the device-absolute-file-location -in the `fullPath` property of `Entry` objects. These paths would typically look like - - /var/mobile/Applications//Documents/path/to/file (iOS) - /storage/emulated/0/path/to/file (Android) - -These paths were also returned by the `toURL()` method of the `Entry` objects. - -With v1.0.0, the `fullPath` attribute is the path to the file, _relative to the root of -the HTML filesystem_. So, the above paths would now both be represented by a `FileEntry` -object with a `fullPath` of - - /path/to/file - -If your application works with device-absolute-paths, and you previously retrieved those -paths through the `fullPath` property of `Entry` objects, then you should update your code -to use `entry.toURL()` instead. - -For backwards compatibility, the `resolveLocalFileSystemURL()` method will accept a -device-absolute-path, and will return an `Entry` object corresponding to it, as long as that -file exists within either the `TEMPORARY` or `PERSISTENT` filesystems. - -This has particularly been an issue with the File-Transfer plugin, which previously used -device-absolute-paths (and can still accept them). It has been updated to work correctly -with FileSystem URLs, so replacing `entry.fullPath` with `entry.toURL()` should resolve any -issues getting that plugin to work with files on the device. - -In v1.1.0 the return value of `toURL()` was changed (see [CB-6394](https://issues.apache.org/jira/browse/CB-6394)) -to return an absolute 'file://' URL. wherever possible. To ensure a 'cdvfile:'-URL you can use `toInternalURL()` now. -This method will now return filesystem URLs of the form - - cdvfile://localhost/persistent/path/to/file - -which can be used to identify the file uniquely. - -## cdvfile protocol -**Purpose** - -`cdvfile://localhost/persistent|temporary|another-fs-root*/path/to/file` can be used for platform-independent file paths. -cdvfile paths are supported by core plugins - for example you can download an mp3 file to cdvfile-path via `cordova-plugin-file-transfer` and play it via `cordova-plugin-media`. - -__*Note__: See [Where to Store Files](#where-to-store-files), [File System Layouts](#file-system-layouts) and [Configuring the Plugin](#configuring-the-plugin-optional) for more details about available fs roots. - -To use `cdvfile` as a tag' `src` you can convert it to native path via `toURL()` method of the resolved fileEntry, which you can get via `resolveLocalFileSystemURL` - see examples below. - -You can also use `cdvfile://` paths directly in the DOM, for example: -```HTML - -``` - -__Note__: This method requires following Content Security rules updates: -* Add `cdvfile:` scheme to `Content-Security-Policy` meta tag of the index page, e.g.: - - `` -* Add `` to `config.xml`. - -**Converting cdvfile:// to native path** - -```javascript -resolveLocalFileSystemURL('cdvfile://localhost/temporary/path/to/file.mp4', function(entry) { - var nativePath = entry.toURL(); - console.log('Native URI: ' + nativePath); - document.getElementById('video').src = nativePath; -``` - -**Converting native path to cdvfile://** - -```javascript -resolveLocalFileSystemURL(nativePath, function(entry) { - console.log('cdvfile URI: ' + entry.toInternalURL()); -``` - -**Using cdvfile in core plugins** - -```javascript -fileTransfer.download(uri, 'cdvfile://localhost/temporary/path/to/file.mp3', function (entry) { ... -``` -```javascript -var my_media = new Media('cdvfile://localhost/temporary/path/to/file.mp3', ...); -my_media.play(); -``` - -#### cdvfile quirks -- Using `cdvfile://` paths in the DOM is not supported on Windows platform (a path can be converted to native instead). - - -## List of Error Codes and Meanings -When an error is thrown, one of the following codes will be used. - -| Code | Constant | -|-----:|:------------------------------| -| 1 | `NOT_FOUND_ERR` | -| 2 | `SECURITY_ERR` | -| 3 | `ABORT_ERR` | -| 4 | `NOT_READABLE_ERR` | -| 5 | `ENCODING_ERR` | -| 6 | `NO_MODIFICATION_ALLOWED_ERR` | -| 7 | `INVALID_STATE_ERR` | -| 8 | `SYNTAX_ERR` | -| 9 | `INVALID_MODIFICATION_ERR` | -| 10 | `QUOTA_EXCEEDED_ERR` | -| 11 | `TYPE_MISMATCH_ERR` | -| 12 | `PATH_EXISTS_ERR` | - -## Configuring the Plugin (Optional) - -The set of available filesystems can be configured per-platform. Both iOS and -Android recognize a tag in `config.xml` which names the -filesystems to be installed. By default, all file-system roots are enabled. - - - - -### Android - -* `files`: The application's internal file storage directory -* `files-external`: The application's external file storage directory -* `sdcard`: The global external file storage directory (this is the root of the SD card, if one is installed). You must have the `android.permission.WRITE_EXTERNAL_STORAGE` permission to use this. -* `cache`: The application's internal cache directory -* `cache-external`: The application's external cache directory -* `assets`: The application's bundle (read-only) -* `root`: The entire device filesystem -* `applicationDirectory`: ReadOnly with restricted access. Copying files in this directory is possible, but reading it directly results in 'file not found'. -Android also supports a special filesystem named "documents", which represents a "/Documents/" subdirectory within the "files" filesystem. - -### iOS - -* `library`: The application's Library directory -* `documents`: The application's Documents directory -* `cache`: The application's Cache directory -* `bundle`: The application's bundle; the location of the app itself on disk (read-only) -* `root`: The entire device filesystem - -By default, the library and documents directories can be synced to iCloud. You can also request two additional filesystems, `library-nosync` and `documents-nosync`, which represent a special non-synced directory within the `/Library` or `/Documents` filesystem. - -## Sample: Create Files and Directories, Write, Read, and Append files - -The File plugin allows you to do things like store files in a temporary or persistent storage location for your app (sandboxed storage) and to store files in other platform-dependent locations. The code snippets in this section demonstrate different tasks including: -* [Accessing the file system](#persistent) -* Using cross-platform Cordova file URLs to [store your files](#appendFile) (see _Where to Store Files_ for more info) -* Creating [files](#persistent) and [directories](#createDir) -* [Writing to files](#writeFile) -* [Reading files](#readFile) -* [Appending files](#appendFile) -* [Display an image file](#displayImage) - -## Create a persistent file - -Before you use the File plugin APIs, you can get access to the file system using `requestFileSystem`. When you do this, you can request either persistent or temporary storage. Persistent storage will not be removed unless permission is granted by the user. - -When you get file system access using `requestFileSystem`, access is granted for the sandboxed file system only (the sandbox limits access to the app itself), not for general access to any file system location on the device. (To access file system locations outside the sandboxed storage, use other methods such as window.resolveLocalFileSystemURL, which support platform-specific locations. For one example of this, see _Append a File_.) - -Here is a request for persistent storage. - ->*Note* When targeting WebView clients (instead of a browser) or native apps (Windows), you dont need to use `requestQuota` before using persistent storage. - -```js -window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) { - - console.log('file system open: ' + fs.name); - fs.root.getFile("newPersistentFile.txt", { create: true, exclusive: false }, function (fileEntry) { - - console.log("fileEntry is file?" + fileEntry.isFile.toString()); - // fileEntry.name == 'someFile.txt' - // fileEntry.fullPath == '/someFile.txt' - writeFile(fileEntry, null); - - }, onErrorCreateFile); - -}, onErrorLoadFs); -``` - -The success callback receives FileSystem object (fs). Use `fs.root` to return a DirectoryEntry object, which you can use to create or get a file (by calling `getFile`). In this example, `fs.root` is a DirectoryEntry object that represents the persistent storage in the sandboxed file system. - -The success callback for `getFile` receives a FileEntry object. You can use this to perform file write and file read operations. - -## Create a temporary file - -Here is an example of a request for temporary storage. Temporary storage may be deleted by the operating system if the device runs low on memory. - -```js -window.requestFileSystem(window.TEMPORARY, 5 * 1024 * 1024, function (fs) { - - console.log('file system open: ' + fs.name); - createFile(fs.root, "newTempFile.txt", false); - -}, onErrorLoadFs); -``` -When you are using temporary storage, you can create or get the file by calling `getFile`. As in the persistent storage example, this will give you a FileEntry object that you can use for read or write operations. - -```js -function createFile(dirEntry, fileName, isAppend) { - // Creates a new file or returns the file if it already exists. - dirEntry.getFile(fileName, {create: true, exclusive: false}, function(fileEntry) { - - writeFile(fileEntry, null, isAppend); - - }, onErrorCreateFile); - -} -``` - -## Write to a file - -Once you have a FileEntry object, you can write to the file by calling `createWriter`, which returns a FileWriter object in the success callback. Call the `write` method of FileWriter to write to the file. - -```js -function writeFile(fileEntry, dataObj) { - // Create a FileWriter object for our FileEntry (log.txt). - fileEntry.createWriter(function (fileWriter) { - - fileWriter.onwriteend = function() { - console.log("Successful file write..."); - readFile(fileEntry); - }; - - fileWriter.onerror = function (e) { - console.log("Failed file write: " + e.toString()); - }; - - // If data object is not passed in, - // create a new Blob instead. - if (!dataObj) { - dataObj = new Blob(['some file data'], { type: 'text/plain' }); - } - - fileWriter.write(dataObj); - }); -} -``` - -## Read a file - -You also need a FileEntry object to read an existing file. Use the file property of FileEntry to get the file reference, and then create a new FileReader object. You can use methods like `readAsText` to start the read operation. When the read operation is complete, `this.result` stores the result of the read operation. - -```js -function readFile(fileEntry) { - - fileEntry.file(function (file) { - var reader = new FileReader(); - - reader.onloadend = function() { - console.log("Successful file read: " + this.result); - displayFileData(fileEntry.fullPath + ": " + this.result); - }; - - reader.readAsText(file); - - }, onErrorReadFile); -} -``` - -## Append a file using alternative methods - -Of course, you will often want to append existing files instead of creating new ones. Here is an example of that. This example shows another way that you can access the file system using window.resolveLocalFileSystemURL. In this example, pass the cross-platform Cordova file URL, cordova.file.dataDirectory, to the function. The success callback receives a DirectoryEntry object, which you can use to do things like create a file. - -```js -window.resolveLocalFileSystemURL(cordova.file.dataDirectory, function (dirEntry) { - console.log('file system open: ' + dirEntry.name); - var isAppend = true; - createFile(dirEntry, "fileToAppend.txt", isAppend); -}, onErrorLoadFs); -``` - -In addition to this usage, you can use `resolveLocalFileSystemURL` to get access to some file system locations that are not part of the sandboxed storage system. See _Where to store Files_ for more information; many of these storage locations are platform-specific. You can also pass cross-platform file system locations to `resolveLocalFileSystemURL` using the _cdvfile protocol_. - -For the append operation, there is nothing new in the `createFile` function that is called in the preceding code (see the preceding examples for the actual code). `createFile` calls `writeFile`. In `writeFile`, you check whether an append operation is requested. - -Once you have a FileWriter object, call the `seek` method, and pass in the index value for the position where you want to write. In this example, you also test whether the file exists. After calling seek, then call the write method of FileWriter. - -```js -function writeFile(fileEntry, dataObj, isAppend) { - // Create a FileWriter object for our FileEntry (log.txt). - fileEntry.createWriter(function (fileWriter) { - - fileWriter.onwriteend = function() { - console.log("Successful file read..."); - readFile(fileEntry); - }; - - fileWriter.onerror = function (e) { - console.log("Failed file read: " + e.toString()); - }; - - // If we are appending data to file, go to the end of the file. - if (isAppend) { - try { - fileWriter.seek(fileWriter.length); - } - catch (e) { - console.log("file doesn't exist!"); - } - } - fileWriter.write(dataObj); - }); -} -``` - -## Store an existing binary file - -We already showed how to write to a file that you just created in the sandboxed file system. What if you need to get access to an existing file and convert that to something you can store on your device? In this example, you obtain a file using an xhr request, and then save it to the cache in the sandboxed file system. - -Before you get the file, get a FileSystem reference using `requestFileSystem`. By passing window.TEMPORARY in the method call (same as before), the returned FileSystem object (fs) represents the cache in the sandboxed file system. Use `fs.root` to get the DirectoryEntry object that you need. - -```js -window.requestFileSystem(window.TEMPORARY, 5 * 1024 * 1024, function (fs) { - - console.log('file system open: ' + fs.name); - getSampleFile(fs.root); - -}, onErrorLoadFs); -``` - -For completeness, here is the xhr request to get a Blob image. There is nothing Cordova-specific in this code, except that you forward the DirectoryEntry reference that you already obtained as an argument to the saveFile function. You will save the blob image and display it later after reading the file (to validate the operation). - -```js -function getSampleFile(dirEntry) { - - var xhr = new XMLHttpRequest(); - xhr.open('GET', 'http://cordova.apache.org/static/img/cordova_bot.png', true); - xhr.responseType = 'blob'; - - xhr.onload = function() { - if (this.status == 200) { - - var blob = new Blob([this.response], { type: 'image/png' }); - saveFile(dirEntry, blob, "downloadedImage.png"); - } - }; - xhr.send(); -} -``` ->*Note* For Cordova 5 security, the preceding code requires that you add the domain name, http://cordova.apache.org, to the Content-Security-Policy element in index.html. - -After getting the file, copy the contents to a new file. The current DirectoryEntry object is already associated with the app cache. - -```js -function saveFile(dirEntry, fileData, fileName) { - - dirEntry.getFile(fileName, { create: true, exclusive: false }, function (fileEntry) { - - writeFile(fileEntry, fileData); - - }, onErrorCreateFile); -} -``` - -In writeFile, you pass in the Blob object as the dataObj and you will save that in the new file. - -```js -function writeFile(fileEntry, dataObj, isAppend) { - - // Create a FileWriter object for our FileEntry (log.txt). - fileEntry.createWriter(function (fileWriter) { - - fileWriter.onwriteend = function() { - console.log("Successful file write..."); - if (dataObj.type == "image/png") { - readBinaryFile(fileEntry); - } - else { - readFile(fileEntry); - } - }; - - fileWriter.onerror = function(e) { - console.log("Failed file write: " + e.toString()); - }; - - fileWriter.write(dataObj); - }); -} -``` - -After writing to the file, read it and display it. You saved the image as binary data, so you can read it using FileReader.readAsArrayBuffer. - -```js -function readBinaryFile(fileEntry) { - - fileEntry.file(function (file) { - var reader = new FileReader(); - - reader.onloadend = function() { - - console.log("Successful file write: " + this.result); - displayFileData(fileEntry.fullPath + ": " + this.result); - - var blob = new Blob([new Uint8Array(this.result)], { type: "image/png" }); - displayImage(blob); - }; - - reader.readAsArrayBuffer(file); - - }, onErrorReadFile); -} -``` - -After reading the data, you can display the image using code like this. Use window.URL.createObjectURL to get a DOM string for the Blob image. - -```js -function displayImage(blob) { - - // Displays image if result is a valid DOM string for an image. - var elem = document.getElementById('imageFile'); - // Note: Use window.URL.revokeObjectURL when finished with image. - elem.src = window.URL.createObjectURL(blob); -} -``` - -## Display an image file - -To display an image using a FileEntry, you can call the `toURL` method. - -```js -function displayImageByFileURL(fileEntry) { - var elem = document.getElementById('imageFile'); - elem.src = fileEntry.toURL(); -} -``` - -If you are using some platform-specific URIs instead of a FileEntry and you want to display an image, you may need to include the main part of the URI in the Content-Security-Policy element in index.html. For example, on Windows 10, you can include `ms-appdata:` in your element. Here is an example. - -```html - -``` - -## Create Directories - -In the code here, you create directories in the root of the app storage location. You could use this code with any writable storage location (that is, any DirectoryEntry). Here, you write to the application cache (assuming that you used window.TEMPORARY to get your FileSystem object) by passing fs.root into this function. - -This code creates the /NewDirInRoot/images folder in the application cache. For platform-specific values, look at _File System Layouts_. - -```js -function createDirectory(rootDirEntry) { - rootDirEntry.getDirectory('NewDirInRoot', { create: true }, function (dirEntry) { - dirEntry.getDirectory('images', { create: true }, function (subDirEntry) { - - createFile(subDirEntry, "fileInNewSubDir.txt"); - - }, onErrorGetDir); - }, onErrorGetDir); -} -``` - -When creating subfolders, you need to create each folder separately as shown in the preceding code. diff --git a/plugins/cordova-plugin-file/RELEASENOTES.md b/plugins/cordova-plugin-file/RELEASENOTES.md deleted file mode 100644 index 3853525aa..000000000 --- a/plugins/cordova-plugin-file/RELEASENOTES.md +++ /dev/null @@ -1,496 +0,0 @@ - -# Release Notes - -### 6.0.2 (Jun 27, 2019) - -- fix: manually fix line endings of some files that were using CRLF ([`e8e06c3`](https://github.com/apache/cordova-plugin-file/commit/e8e06c3)) -- chore: fix repo and issue urls and license in package.json and plugin.xml ([`1bca166`](https://github.com/apache/cordova-plugin-file/commit/1bca166)) -- docs: remove outdated translations ([`a898b85`](https://github.com/apache/cordova-plugin-file/commit/a898b85)) -- build: add `.gitattributes` to force LF (instead of possible CRLF on Windows) ([`d691a04`](https://github.com/apache/cordova-plugin-file/commit/d691a04)) -- build: add `.npmignore` to remove unneeded files from npm package ([`a255202`](https://github.com/apache/cordova-plugin-file/commit/a255202)) -- ci(travis): Update Travis CI configuration for new paramedic ([#314](https://github.com/apache/cordova-plugin-file/issues/314)) ([`2b93a67`](https://github.com/apache/cordova-plugin-file/commit/2b93a67)) -- fix(browser): support safari private browsing mode by using base64 text instead of blob ([#301](https://github.com/apache/cordova-plugin-file/issues/301)) ([`c609ff6`](https://github.com/apache/cordova-plugin-file/commit/c609ff6)) -- chore(github): Add or update GitHub pull request and issue template ([`b762743`](https://github.com/apache/cordova-plugin-file/commit/b762743)) -- fix(types): CB-13569: fix inverted LocalFileSystem enum ([#274](https://github.com/apache/cordova-plugin-file/issues/274)) ([`d135cd0`](https://github.com/apache/cordova-plugin-file/commit/d135cd0)) -- docs: remove JIRA link ([`341fa9c`](https://github.com/apache/cordova-plugin-file/commit/341fa9c)) -- fix(types): CB-13850: Fix spelling in typed-file: property name filesystem (wrong… ([#229](https://github.com/apache/cordova-plugin-file/issues/229)) ([`4642fde`](https://github.com/apache/cordova-plugin-file/commit/4642fde)) -- fix(types): CB-13960: fix FileWriter.write argument type definition for typescript ([#231](https://github.com/apache/cordova-plugin-file/issues/231)) ([`5353b84`](https://github.com/apache/cordova-plugin-file/commit/5353b84)) -- ci(travis): also accept terms for android sdk `android-27` ([`6e7871b`](https://github.com/apache/cordova-plugin-file/commit/6e7871b)) -- docs: add details for `applicationDirectory` on android ([#234](https://github.com/apache/cordova-plugin-file/issues/234)) ([`c2f5216`](https://github.com/apache/cordova-plugin-file/commit/c2f5216)) -- fix: require FileReader in FileWriter to fix 'write' exec not being called ([#237](https://github.com/apache/cordova-plugin-file/issues/237)) ([`4a92bbb`](https://github.com/apache/cordova-plugin-file/commit/4a92bbb)) -- fix(android): CB-14181: (android) Fix bug - Cannot read property 'filesystemName' of null ([#235](https://github.com/apache/cordova-plugin-file/issues/235)) ([`cc3aedb`](https://github.com/apache/cordova-plugin-file/commit/cc3aedb)) -- ci(travis): CB-13753: Add build-tools-26.0.2 to travis ([#228](https://github.com/apache/cordova-plugin-file/issues/228)) ([`d8cc0fd`](https://github.com/apache/cordova-plugin-file/commit/d8cc0fd), [`5e12b5e`](https://github.com/apache/cordova-plugin-file/commit/5e12b5e)) -- chore: Fix release notes ([#227](https://github.com/apache/cordova-plugin-file/issues/227)) ([`c248827`](https://github.com/apache/cordova-plugin-file/commit/c248827)) - - -### 6.0.1 (Dec 27, 2017) -* [CB-13704](https://issues.apache.org/jira/browse/CB-13704) Fix to allow 6.0.0 version install - -### 6.0.0 (Dec 15, 2017) -* [CB-13668](https://issues.apache.org/jira/browse/CB-13668) Remove deprecated platforms - -### 5.0.0 (Nov 06, 2017) -* [CB-13481](https://issues.apache.org/jira/browse/CB-13481) (android) Don't ask for permission to read `file:///android_asset/` -* [CB-13518](https://issues.apache.org/jira/browse/CB-13518) Add 'protective' entry to `cordovaDependencies` -* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again -* [CB-13294](https://issues.apache.org/jira/browse/CB-13294) Remove `cordova-plugin-compat` -* fixing `README` in use of `window.resolveLocalFileSystemURL` -* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) setup `eslint` and took out `jshint` -* [CB-13028](https://issues.apache.org/jira/browse/CB-13028) (CI) **Browser** builds on Travis -* [CB-13000](https://issues.apache.org/jira/browse/CB-13000) (CI) Speed up **Android** builds -* [CB-12355](https://issues.apache.org/jira/browse/CB-12355) (iOS) add desciption about the `mimeTypeForFileAtPath` method -* [CB-12355](https://issues.apache.org/jira/browse/CB-12355) (iOS) fix `FileEntry.file.type` -* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. - -### 4.3.3 (Apr 27, 2017) -* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` -* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder - -### 4.3.2 (Feb 28, 2017) -* [CB-12353](https://issues.apache.org/jira/browse/CB-12353) Corrected merges usage in `plugin.xml` -* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` -* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** -* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges - -### 4.3.1 (Dec 07, 2016) -* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 4.3.1 -* [CB-12112](https://issues.apache.org/jira/browse/CB-12112) windows: Make available to move folder trees -* fix ENCODING_ERR for applicationDirectory -* [CB-11848](https://issues.apache.org/jira/browse/CB-11848) windows: Remove duplicate slash after file system path -* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" -* [CB-11947](https://issues.apache.org/jira/browse/CB-11947) fixed typo that occurs when adding file-transfer plugin -* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. - -### 4.3.0 (Sep 08, 2016) -* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies -* Add handling for `SecurityException` -* [CB-11368](https://issues.apache.org/jira/browse/CB-11368) **android**: Resolve content `URLs` produced by contacts plugin -* Plugin uses `Android Log class` and not `Cordova LOG class` -* [CB-11693](https://issues.apache.org/jira/browse/CB-11693) **ios**: Run copy and move operations in the background thread -* [CB-11699](https://issues.apache.org/jira/browse/CB-11699) Read files as Data URLs properly -* [CB-11305](https://issues.apache.org/jira/browse/CB-11305) Enable `cdvfile: assets fs root` for `DOM` requests -* [CB-11385](https://issues.apache.org/jira/browse/CB-11385) android: Import java.nio.charset.Charset in LocalFileSystem class -* Add badges for paramedic builds on Jenkins -* [CB-11407](https://issues.apache.org/jira/browse/CB-11407) ios: added extern keyword to constants to fix phonegap-webview-ios template issue. -* [CB-11385](https://issues.apache.org/jira/browse/CB-11385) **android**: Does not pass sonarqube scan -* Add pull request template. -* Minor edits to the `README.md` -* [CB-11142](https://issues.apache.org/jira/browse/CB-11142) Fix the `NeedPermission` code for the case when external media is not mounted in Android -* [CB-11003](https://issues.apache.org/jira/browse/CB-11003) Adding samples to Readme. -* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md -* [CB-11115](https://issues.apache.org/jira/browse/CB-11115) **android**: Removing dependency on FileDescriptor toString in content provider tests - -### 4.2.0 (Apr 15, 2016) -* [CB-10960](https://issues.apache.org/jira/browse/CB-10960) Uncaught `#` in `write()` when `readyState != WRITING ?` -* Replace `PermissionHelper.java` with `cordova-plugin-compat` -* [CB-10977](https://issues.apache.org/jira/browse/CB-10977) **Android** Removing global state used for permission requests -* CB-10798, [CB-10384](https://issues.apache.org/jira/browse/CB-10384) Fixing permissions for **Marshmallow**. -* Fix test failure on **WP 8.1** -* [CB-10577](https://issues.apache.org/jira/browse/CB-10577) **Windows** `resolveLocalFileSystemURL` should omit trailing slash for file -* [CB-7862](https://issues.apache.org/jira/browse/CB-7862) `FileReader` reads large files in chunks with progress. -* [CB-10577](https://issues.apache.org/jira/browse/CB-10577) **Android** `resolveLocalFileSystemURL` should detect directory vs file. -* [CB-9753](https://issues.apache.org/jira/browse/CB-9753) index out of bounds on `requestFileSystem`. -* Remove `warning` emoji, as it doesn't correctly display in the docs website: cordova.apache.org/docs/en/dev/cordova-plugin-file/index.html. This closes #166 -* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins -* [CB-10411](https://issues.apache.org/jira/browse/CB-10411) Error in `file.spec.129` of `cordova-plugin-file` - -### 4.1.1 (Feb 09, 2016) -* Edit package.json license to match SPDX id -* [CB-10419](https://issues.apache.org/jira/browse/CB-10419) cordova-plugin-file 4.0.0 error with browserify workflow - -### 4.1.0 (Jan 15, 2016) -* added `.ratignore` file -* [CB-10319](https://issues.apache.org/jira/browse/CB-10319) **android** Adding reflective helper methods for permission requests -* [CB-10023](https://issues.apache.org/jira/browse/CB-10023) Fix `proxy not found error` on Chrome. -* [CB-8863](https://issues.apache.org/jira/browse/CB-8863) **ios** Fix block usage of self - -### 4.0.0 (Nov 18, 2015) -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest -* [CB-8497](https://issues.apache.org/jira/browse/CB-8497) Fix handling of file paths with `#` character -* Do not inject default `AndroidPersistentFileLocation` into `config.xml` -* [CB-9891](https://issues.apache.org/jira/browse/CB-9891): Fix permission errors due to `URI encoding` inconsistency on **Android** -* Fixed `NullPointer Exception` in **Android 5** and above due to invalid column name on cursor -* Fix default persistent file location -* fix `applicationDirectory` to use `ms-appx:///` -* Add **Windows** paths to `cordova.file` object -* [CB-9851](https://issues.apache.org/jira/browse/CB-9851) Document `cdvfile` protocol quirk - using `cdvfile://` in the `DOM` is not supported on **Windows** -* [CB-9752](https://issues.apache.org/jira/browse/CB-9752) `getDirectory` fails on valid directory with assets filesystem -* [CB-7253](https://issues.apache.org/jira/browse/CB-7253) `requestFileSystem` fails when no external storage is present -* Adding permissions for **Marshmallow**. Now supports **Anrdoid 6.0** -* Fixing contribute link. -* always use setters to fix memory issues without `ARC` for **iOS** -* [CB-9331](https://issues.apache.org/jira/browse/CB-9331) `getFreeDiskSpace` **iOS**. -* override `resolveLocalFileSystemURL` by `webkitResolveLocalFileSystemURL` for **browser** platform add `.project` into git ignore list -* Fail with `FileError.ENCODING_ERR` on encoding exception. -* [CB-9544](https://issues.apache.org/jira/browse/CB-9544) Add file plugin for **OSX** -* [CB-9539](https://issues.apache.org/jira/browse/CB-9539) Fixed test failure on **Android** emulator -* Added docs on `CSP` rules needed for using `cdvfile` in DOM src. This closes #120 -* Added `cdvfile` protocol purpose description and examples - -### 3.0.0 (Aug 18, 2015) -* Make Android default persistent file location internal -* Fixed issue with file paths not existing when using browserify -* [CB-9251](https://issues.apache.org/jira/browse/CB-9251): Changed from Intents to Preferences object as per the issue -* [CB-9215](https://issues.apache.org/jira/browse/CB-9215) Add cordova-plugin-file manual test for windows platform - -### 2.1.0 (Jun 17, 2015) -* added missing license header -* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-file documentation translation: cordova-plugin-file -* fix npm md -* [CB-8844](https://issues.apache.org/jira/browse/CB-8844) Increased timeout for asset tests -* Updated resolveFileSystem.js so it can be parsed by uglifyJS -* [CB-8860](https://issues.apache.org/jira/browse/CB-8860) cordova-plugin-file documentation translation: cordova-plugin-file -* [CB-8792](https://issues.apache.org/jira/browse/CB-8792) Fixes reading of json files using readAsText - -### 2.0.0 (Apr 15, 2015) -* [CB-8849](https://issues.apache.org/jira/browse/CB-8849) Fixed ReadAsArrayBuffer to return ArrayBuffer and not Array on WP8 -* [CB-8819](https://issues.apache.org/jira/browse/CB-8819) Fixed FileReader's readAsBinaryString on wp8 -* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump -* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) android: Fix broken unit tests from plugin rename -* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id -* Use TRAVIS_BUILD_DIR, install paramedic by npm -* docs: added Windows to supported platforms -* [CB-8699](https://issues.apache.org/jira/browse/CB-8699) [CB-6428](https://issues.apache.org/jira/browse/CB-6428) Fix uncompressed assets being copied as zero length files -* [CB-6428](https://issues.apache.org/jira/browse/CB-6428) android: Fix assets FileEntry having size of -1 -* android: Move URLforFullPath into base class (and rename to localUrlforFullPath) -* [CB-6428](https://issues.apache.org/jira/browse/CB-6428) Mention build-extras.gradle in README -* [CB-7109](https://issues.apache.org/jira/browse/CB-7109) android: Parse arguments off of the main thread (close #97) -* [CB-8695](https://issues.apache.org/jira/browse/CB-8695) ios: Fix `blob.slice()` for `asset-library` URLs (close #105) -* Tweak build-extras.gradle to just read/write to main `assets/` instead of `build/` -* [CB-8689](https://issues.apache.org/jira/browse/CB-8689) Fix NPE in makeEntryForNativeUri (was affecting file-transfer) -* [CB-8675](https://issues.apache.org/jira/browse/CB-8675) Revert "CB-8351 ios: Use base64EncodedStringWithOptions instead of CordovaLib's class extension" -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme -* [CB-8659](https://issues.apache.org/jira/browse/CB-8659): ios: 4.0.x Compatibility: Remove use of initWebView method -* Add a cache to speed up AssetFilesystem directory listings -* [CB-8663](https://issues.apache.org/jira/browse/CB-8663) android: Don't notify MediaScanner of private files -* Don't log stacktrace for normal exceptions (e.g. file not found) -* android: Don't use LimitedInputStream when reading entire file (optimization) -* [CB-6428](https://issues.apache.org/jira/browse/CB-6428) android: Add support for directory copies from assets -> filesystem -* android: Add `listChildren()`: Java-consumable version of `readEntriesAtLocalURL()` -* [CB-6428](https://issues.apache.org/jira/browse/CB-6428) android: Add support for file:///android_asset URLs -* [CB-8642](https://issues.apache.org/jira/browse/CB-8642) android: Fix content URIs not working with resolve / copy -* Tweak tests to fail if deleteEntry fails (rather than time out) -* android: Ensure LocalFilesystemURL can only be created with "cdvfile" URLs -* android: Move CordovaResourceApi into Filesystem base class -* android: Use `CordovaResourceApi.mapUriToFile()` rather than own custom logic in ContentFilesystem -* android: Use Uri.parse rather than manual parsing in resolveLocalFileSystemURI -* Tweak test case that failed twice on error rather than just once -* android: Delete invalid JavaDoc (lint errors) -* android: Use CordovaResourceApi rather than FileHelper -* [CB-8032](https://issues.apache.org/jira/browse/CB-8032) - File Plugin - Add nativeURL external method support for CDVFileSystem->makeEntryForPath:isDirectory: (closes #96) -* [CB-8567](https://issues.apache.org/jira/browse/CB-8567) Integrate TravisCI -* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-file documentation translation: cordova-plugin-file -* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file -* [CB-7956](https://issues.apache.org/jira/browse/CB-7956) Add cordova-plugin-file support for browser platform -* [CB-8423](https://issues.apache.org/jira/browse/CB-8423) Corrected usage of done() in async tests -* [CB-8459](https://issues.apache.org/jira/browse/CB-8459) Fixes spec 111 failure due to incorrect relative paths handling -* Code cleanup, whitespace -* Added nativeURL property to FileEntry, implemented readAsArrayBuffer and readAsBinaryString - -### 1.3.3 (Feb 04, 2015) -* [CB-7927](https://issues.apache.org/jira/browse/CB-7927) Encoding data to bytes instead of chars when writing a file. -* ios: Fix compile warning about implicit int conversion -* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Use base64EncodedStringWithOptions instead of CordovaLib's class extension -* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Use argumentForIndex rather than NSArray extension -* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Use a local copy of valueForKeyIsNumber rather than CordovaLib's version -* windows: Handle url's containing absolute windows path starting with drive letter and colon (encoded as %3A) through root FS -* windows: Rework to use normal url form -* android: refactor: Make Filesystem base class store its own name, rootUri, and rootEntry -* android: Simplify code a bit by making makeEntryForPath not throw JSONException -* [CB-6431](https://issues.apache.org/jira/browse/CB-6431) android: Fix plugin breaking content: URLs -* [CB-7375](https://issues.apache.org/jira/browse/CB-7375) Never create new FileSystem instances (except on windows since they don't implement requestAllFileSystems()) - -### 1.3.2 (Dec 02, 2014) -* Gets rid of thread block error in File plugin -* [CB-7917](https://issues.apache.org/jira/browse/CB-7917) Made tests file.spec.114 - 116 pass for **Windows** platform -* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs -* [CB-7602](https://issues.apache.org/jira/browse/CB-7602): Fix `isCopyOnItself` logic -* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-file documentation translation: cordova-plugin-file -* Use one proxy for both **Windows** and **Windows8** platforms -* [CB-6994](https://issues.apache.org/jira/browse/CB-6994) Fixes result, returned by proxy's write method -* [fxos] update `__format__` to match `pathsPrefix` -* [CB-6994](https://issues.apache.org/jira/browse/CB-6994) Improves merged code to be able to write a File -* Optimize `FileProxy` for **Windows** platforms -* Synchronize changes with **Windows** platform -* Fix function write for big files on **Windows 8** -* Write file in background -* [CB-7487](https://issues.apache.org/jira/browse/CB-7487) **Android** Broadcast file write This allows MTP USB shares to show the file immediately without reboot/manual refresh using 3rd party app. -* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-file documentation translation: cordova-plugin-file -* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin - -### 1.3.1 (Sep 17, 2014) -* [CB-7471](https://issues.apache.org/jira/browse/CB-7471) cordova-plugin-file documentation translation -* [CB-7272](https://issues.apache.org/jira/browse/CB-7272) Replace confusing "r/o" abbreviation with just "r" -* [CB-7423](https://issues.apache.org/jira/browse/CB-7423) encode path before attempting to resolve -* [CB-7375](https://issues.apache.org/jira/browse/CB-7375) Fix the filesystem name in resolveLocalFileSystemUri -* [CB-7445](https://issues.apache.org/jira/browse/CB-7445) [BlackBerry10] resolveLocalFileSystemURI - change DEFAULT_SIZE to MAX_SIZE -* [CB-7458](https://issues.apache.org/jira/browse/CB-7458) [BlackBerry10] resolveLocalFileSystemURL - add filesystem property -* [CB-7445](https://issues.apache.org/jira/browse/CB-7445) [BlackBerry10] Add default file system size to prevent quota exceeded error on initial install -* [CB-7431](https://issues.apache.org/jira/browse/CB-7431) Avoid calling done() twice in file.spec.109 test -* [CB-7413](https://issues.apache.org/jira/browse/CB-7413) Adds support of 'ms-appdata://' URIs -* [CB-7422](https://issues.apache.org/jira/browse/CB-7422) [File Tests] Use proper fileSystem to create fullPath -* [CB-7375](https://issues.apache.org/jira/browse/CB-7375) [Entry] get proper filesystem in Entry -* Amazon related changes. -* [CB-7375](https://issues.apache.org/jira/browse/CB-7375) Remove leading slash statement from condition -* Refactored much of the logic in FileMetadata constructor. Directory.size will return 0 -* [CB-7419](https://issues.apache.org/jira/browse/CB-7419) [WP8] Added support to get metada from dir -* [CB-7418](https://issues.apache.org/jira/browse/CB-7418) [DirectoryEntry] Added fullPath variable as part of condition -* [CB-7417](https://issues.apache.org/jira/browse/CB-7417) [File tests] added proper matcher to compare fullPath property -* [CB-7375](https://issues.apache.org/jira/browse/CB-7375) Partial revert to resolve WP8 failures -* Overwrite existing file on getFile when create is true -* [CB-7375](https://issues.apache.org/jira/browse/CB-7375) [CB-6148](https://issues.apache.org/jira/browse/CB-6148): Ensure that return values from copy and move operations reference the correct filesystem -* [CB-6724](https://issues.apache.org/jira/browse/CB-6724) changed style detail on documentation -* Added new js files to amazon-fireos platform. -* Adds Windows platform -* Fixes multiple mobilespec tests errors -* Removed test/tests.js module from main plugin.xml -* [CB-7094](https://issues.apache.org/jira/browse/CB-7094) renamed folder to tests + added nested plugin.xml -* added documentation for manual tests -* [CB-6923](https://issues.apache.org/jira/browse/CB-6923) Adding support to handle relative paths -* Style improvements on Manual tests -* [CB-7094](https://issues.apache.org/jira/browse/CB-7094) Ported File manual tests - -### 1.3.0 (Aug 06, 2014) -* **FFOS** Remove unsupported paths from requestAllPaths -* **FFOS** Support for resolve URI, request all paths and local app directory. -* [CB-4263](https://issues.apache.org/jira/browse/CB-4263) set ready state to done before onload -* [CB-7167](https://issues.apache.org/jira/browse/CB-7167) [BlackBerry10] copyTo - return wrapped entry rather than native -* [CB-7167](https://issues.apache.org/jira/browse/CB-7167) [BlackBerry10] Add directory support to getFileMetadata -* [CB-7167](https://issues.apache.org/jira/browse/CB-7167) [BlackBerry10] Fix tests detection of blob support (window.Blob is BlobConstructor object) -* [CB-7161](https://issues.apache.org/jira/browse/CB-7161) [BlackBerry10] Add file system directory paths -* [CB-7093](https://issues.apache.org/jira/browse/CB-7093) Create separate plugin.xml for new-style tests -* [CB-7057](https://issues.apache.org/jira/browse/CB-7057) Docs update: elaborate on what directories are for -* [CB-7093](https://issues.apache.org/jira/browse/CB-7093): Undo the effects of an old bad S&R command -* [CB-7093](https://issues.apache.org/jira/browse/CB-7093): Remove a bunch of unneeded log messages -* [CB-7093](https://issues.apache.org/jira/browse/CB-7093): Add JS module to plugin.xml file for auto-tests -* [CB-7093](https://issues.apache.org/jira/browse/CB-7093) Ported automated file tests -* **WINDOWS** remove extra function closure, not needed -* **WINDOWS** remove check for undefined fail(), it is defined by the proxy and always exists -* **WINDOWS** re-apply readAsBinaryString and readAsArrayBuffer -* **WINDOWS** Moved similar calls to be the same calls, aliased long namespaced functions -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs. -* [CB-6571](https://issues.apache.org/jira/browse/CB-6571) Fix getParentForLocalURL to work correctly with directories with trailing '/' (This closes #58) -* UTTypeCopyPreferredTagWithClass returns nil mimetype for css when there is no network -* updated spec links in docs ( en only ) -* [CB-6571](https://issues.apache.org/jira/browse/CB-6571) add trailing space it is missing in DirectoryEnty constructor. -* [CB-6980](https://issues.apache.org/jira/browse/CB-6980) Fixing filesystem:null property in Entry -* Add win8 support for readAsBinaryString and readAsArrayBuffer -* [FFOS] Update FileProxy.js -* [CB-6940](https://issues.apache.org/jira/browse/CB-6940): Fixing up commit from dzeims -* [CB-6940](https://issues.apache.org/jira/browse/CB-6940): Android: cleanup try/catch exception handling -* [CB-6940](https://issues.apache.org/jira/browse/CB-6940): `context.getExternal*` methods return null if sdcard isn't in mounted state, causing exceptions that prevent startup from reaching readystate -* Fix mis-handling of filesystem reference in Entry.moveTo ('this' used in closure). -* [CB-6902](https://issues.apache.org/jira/browse/CB-6902): Use File.lastModified rather than .lastModifiedDate -* [CB-6922](https://issues.apache.org/jira/browse/CB-6922): Remove unused getMetadata native code -* [CB-6922](https://issues.apache.org/jira/browse/CB-6922): Use getFileMetadata consistently to get metadata -* changed fullPath to self.rootDocsPath -* [CB-6890](https://issues.apache.org/jira/browse/CB-6890): Fix pluginManager access for 4.0.x branch - -### 1.2.1 -* [CB-6922](https://issues.apache.org/jira/browse/CB-6922) Fix inconsistent handling of lastModifiedDate and modificationTime -* [CB-285](https://issues.apache.org/jira/browse/CB-285): Document filesystem root properties - -### 1.2.0 (Jun 05, 2014) -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and French Translations added. Github close #31 -* updated this reference to window -* Add missing semicolon (copy & paste error) -* Fix compiler warning about symbol in interface not matching implementation -* Fix sorting order in supported platforms -* ubuntu: increase quota value -* ubuntu: Change FS URL scheme to 'cdvfile' -* ubuntu: Return size with Entry.getMetadata() method -* [CB-6803](https://issues.apache.org/jira/browse/CB-6803) Add license -* Initial implementation for Firefox OS -* Small wording tweaks -* Fixed toURL() toInternalURL() information in the doku -* ios: Don't fail a write of zero-length payload. -* [CB-285](https://issues.apache.org/jira/browse/CB-285) Docs for cordova.file.\*Directory properties -* [CB-285](https://issues.apache.org/jira/browse/CB-285) Add cordova.file.\*Directory properties for iOS & Android -* [CB-3440](https://issues.apache.org/jira/browse/CB-3440) [BlackBerry10] Proxy based implementation -* Fix typo in docs "app-bundle" -> "bundle" -* [CB-6583](https://issues.apache.org/jira/browse/CB-6583) ios: Fix failing to create entry when space in parent path -* [CB-6571](https://issues.apache.org/jira/browse/CB-6571) android: Make DirectoryEntry.toURL() have a trailing / -* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md -* [CB-6525](https://issues.apache.org/jira/browse/CB-6525) android, ios: Allow file: URLs in all APIs. Fixes FileTransfer.download not being called. -* fix the Windows 8 implementation of the getFile method -* Update File.js for typo: lastModifiedData --> lastModifiedDate (closes #38) -* Add error codes. -* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 1.0.0 -* Add NOTICE file -* [CB-6114](https://issues.apache.org/jira/browse/CB-6114) Updated version and RELEASENOTES.md for release 1.0.1 -* [CB-5980](https://issues.apache.org/jira/browse/CB-5980) Updated version and RELEASENOTES.md for release 1.0.0 - -### 1.1.0 (Apr 17, 2014) -* [CB-4965](https://issues.apache.org/jira/browse/CB-4965): Remove tests from file plugin -* Android: Allow file:/ URLs -* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy -* [CB-6249](https://issues.apache.org/jira/browse/CB-6249): [android] Opportunistically resolve content urls to file -* [CB-6394](https://issues.apache.org/jira/browse/CB-6394): [ios, android] Add extra filesystem roots -* [CB-6394](https://issues.apache.org/jira/browse/CB-6394): [ios, android] Fix file resolution for the device root case -* [CB-6394](https://issues.apache.org/jira/browse/CB-6394): [ios] Return ENCODING_ERR when fs name is not valid -* [CB-6393](https://issues.apache.org/jira/browse/CB-6393): Change behaviour of toURL and toNativeURL -* ios: Style: plugin initialization -* ios: Fix handling of file URLs with encoded spaces -* Always use Android's recommended temp file location for temporary file system -* [CB-6352](https://issues.apache.org/jira/browse/CB-6352): Allow FileSystem objects to be serialized to JSON -* [CB-5959](https://issues.apache.org/jira/browse/CB-5959): size is explicitly 0 if not set, file.spec.46&47 are testing the type of size -* [CB-6242](https://issues.apache.org/jira/browse/CB-6242): [BlackBerry10] Add deprecated version of resolveLocalFileSystemURI -* [CB-6242](https://issues.apache.org/jira/browse/CB-6242): [BlackBerry10] add file:/// prefix for toURI / toURL -* [CB-6242](https://issues.apache.org/jira/browse/CB-6242): [BlackBerry10] Polyfill window.requestAnimationFrame for OS < 10.2 -* [CB-6242](https://issues.apache.org/jira/browse/CB-6242): [BlackBerry10] Override window.resolveLocalFileSystemURL -* [CB-6212](https://issues.apache.org/jira/browse/CB-6212): [iOS] fix warnings compiled under arm64 64-bit -* ios: Don't cache responses from CDVFile's URLProtocol -* [CB-6199](https://issues.apache.org/jira/browse/CB-6199): [iOS] Fix toNativeURL() not escaping characters properly -* [CB-6148](https://issues.apache.org/jira/browse/CB-6148): Fix cross-filesystem copy and move -* fixed setMetadata() to use the formatted fullPath -* corrected typo which leads to a "comma expression" -* [CB-4952](https://issues.apache.org/jira/browse/CB-4952): ios: Resolve symlinks in file:// URLs -* Add docs about the extraFileSystems preference -* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers - -### 1.0.1 (Feb 28, 2014) -* [CB-6116](https://issues.apache.org/jira/browse/CB-6116) Fix error where resolveLocalFileSystemURL would fail -* [CB-6106](https://issues.apache.org/jira/browse/CB-6106) Add support for nativeURL attribute on Entry objects -* [CB-6110](https://issues.apache.org/jira/browse/CB-6110) iOS: Fix typo in filesystemPathForURL: method -* Android: Use most specific FS match when resolving file: URIs -* iOS: Update fileSystemURLforLocalPath: to return the most match url. -* Allow third-party plugin registration, and the total count of fs type is not limited to just 4. -* [CB-6097](https://issues.apache.org/jira/browse/CB-6097) Added missing files for amazon-fireos platform. Added onLoad flag to true. -* [CB-6087](https://issues.apache.org/jira/browse/CB-6087) Android, iOS: Load file plugin on startup -* [CB-6013](https://issues.apache.org/jira/browse/CB-6013) BlackBerry10: wrap webkit prefixed called in requestAnimationFrame -* Update plugin writers' documentation -* [CB-6080](https://issues.apache.org/jira/browse/CB-6080) Fix file copy when src and dst are on different local file systems -* [CB-6057](https://issues.apache.org/jira/browse/CB-6057) Add methods for plugins to convert between URLs and paths -* [CB-6050](https://issues.apache.org/jira/browse/CB-6050) Public method for returning a FileEntry from a device file path -* [CB-2432](https://issues.apache.org/jira/browse/CB-2432) [CB-3185](https://issues.apache.org/jira/browse/CB-3185), [CB-5975](https://issues.apache.org/jira/browse/CB-5975): Fix Android handling of content:// URLs -* [CB-6022](https://issues.apache.org/jira/browse/CB-6022) Add upgrade notes to doc -* [CB-5233](https://issues.apache.org/jira/browse/CB-5233) Make asset-library urls work properly on iOS -* [CB-6012](https://issues.apache.org/jira/browse/CB-6012) Preserve query strings on cdvfile:// URLs where necessary -* [CB-6010](https://issues.apache.org/jira/browse/CB-6010) Test properly for presence of URLforFilesystemPath method -* [CB-5959](https://issues.apache.org/jira/browse/CB-5959) Entry.getMetadata should return size attribute - -### 1.0.0 (Feb 05, 2014) -* [CB-5974](https://issues.apache.org/jira/browse/CB-5974): Use safe 'Compatibilty' mode by default -* [CB-5915](https://issues.apache.org/jira/browse/CB-5915): [CB-5916](https://issues.apache.org/jira/browse/CB-5916): Reorganize preference code to make defaults possible -* [CB-5974](https://issues.apache.org/jira/browse/CB-5974): Android: Don't allow File operations to continue when not configured -* [CB-5960](https://issues.apache.org/jira/browse/CB-5960): ios: android: Properly handle parent references in getFile/getDirectory -* [ubuntu] adopt to recent changes -* Add default FS root to new FS objects -* [CB-5899](https://issues.apache.org/jira/browse/CB-5899): Make DirectoryReader.readEntries return properly formatted Entry objects -* Add constuctor params to FileUploadResult related to [CB-2421](https://issues.apache.org/jira/browse/CB-2421) -* Fill out filesystem attribute of entities returned from resolveLocalFileSystemURL -* [CB-5916](https://issues.apache.org/jira/browse/CB-5916): Create documents directories if they don't exist -* [CB-5915](https://issues.apache.org/jira/browse/CB-5915): Create documents directories if they don't exist -* [CB-5916](https://issues.apache.org/jira/browse/CB-5916): Android: Fix unfortunate NPE in config check -* [CB-5916](https://issues.apache.org/jira/browse/CB-5916): Android: Add "/files/" to persistent files path -* [CB-5915](https://issues.apache.org/jira/browse/CB-5915): ios: Update config preference (and docs) to match issue -* [CB-5916](https://issues.apache.org/jira/browse/CB-5916): Android: Add config preference for Android persistent storage location -* iOS: Add config preference for iOS persistent storage location -* iOS: Android: Allow third-party plugin registration -* Android: Expose filePlugin getter so that other plugins can register filesystems -* Fix typos in deprecation message -* Add backwards-compatibility shim for file-transfer -* Android: Allow third-party plugin registration -* [CB-5810](https://issues.apache.org/jira/browse/CB-5810) [BlackBerry10] resolve local:/// paths (application assets) -* [CB-5774](https://issues.apache.org/jira/browse/CB-5774): create DirectoryEntry instead of FileEntry -* Initial fix for [CB-5747](https://issues.apache.org/jira/browse/CB-5747) -* Change default FS URL scheme to "cdvfile" -* Android: Properly format content urls -* Android, iOS: Replace "filesystem" protocol string with constant -* Android: Allow absolute paths on Entry.getFile / Entry.getDirectory -* Android: Make clear that getFile takes a path, not just a filename -* [CB-5008](https://issues.apache.org/jira/browse/CB-5008): Rename resolveLocalFileSystemURI to resolveLocalFileSystemURL; deprecate original -* Remove old file reference from plugin.xml -* Android: Refactor File API -* [CB-4899](https://issues.apache.org/jira/browse/CB-4899) [BlackBerry10] Fix resolve directories -* [CB-5602](https://issues.apache.org/jira/browse/CB-5602) Windows8. Fix File Api mobile spec tests -* Android: Better support for content urls and cross-filesystem copy/move ops -* [CB-5699](https://issues.apache.org/jira/browse/CB-5699) [BlackBerry10] Update resolveLocalFileSystemURI implementation -* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Update license comment formatting of doc/index.md -* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc.index.md for File plugin. -* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Delete stale snapshot of plugin docs -* [CB-5403](https://issues.apache.org/jira/browse/CB-5403): Backwards-compatibility with file:// urls where possible -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Fixes for ContentFilesystem -* Android: Add method for testing backwards-compatibility of filetransfer plugin -* iOS: Add method for testing backwards-compatiblity of filetransfer plugin -* Android: Updates to allow FileTransfer to continue to work -* Android: Clean up unclosed file objects -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Cleanup -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Add new Android source files to plugin.xml -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Move read, write and truncate methods into modules -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Move copy/move methods into FS modules -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Move getParent into FS modules -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Move getmetadata methods into FS modules -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Move readdir methods into FS modules -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Move remove methods into FS modules -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Move getFile into FS modules -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Start refactoring android code: Modular filesystems, rfs, rlfsurl -* [CB-5407](https://issues.apache.org/jira/browse/CB-5407): Update android JS to use FS urls -* [CB-5405](https://issues.apache.org/jira/browse/CB-5405): Use URL formatting for Entry.toURL -* [CB-5532](https://issues.apache.org/jira/browse/CB-5532) Fix -* Log file path for File exceptions. -* Partial fix for iOS File compatibility with previous fileTransfer plugin -* [CB-5532](https://issues.apache.org/jira/browse/CB-5532) WP8. Add binary data support to FileWriter -* [CB-5531](https://issues.apache.org/jira/browse/CB-5531) WP8. File Api readAsText incorrectly handles position args -* Added ubuntu platform support -* Added amazon-fireos platform support -* [CB-5118](https://issues.apache.org/jira/browse/CB-5118) [BlackBerry10] Add check for undefined error handler -* [CB-5406](https://issues.apache.org/jira/browse/CB-5406): Extend public API for dependent plugins -* [CB-5403](https://issues.apache.org/jira/browse/CB-5403): Bump File plugin major version -* [CB-5406](https://issues.apache.org/jira/browse/CB-5406): Split iOS file plugin into modules -* [CB-5406](https://issues.apache.org/jira/browse/CB-5406): Factor out filesystem providers in iOS -* [CB-5408](https://issues.apache.org/jira/browse/CB-5408): Add handler for filesystem:// urls -* [CB-5406](https://issues.apache.org/jira/browse/CB-5406): Update iOS native code to use filesystem URLs internally -* [CB-5405](https://issues.apache.org/jira/browse/CB-5405): Update JS code to use URLs exclusively -* [CB-4816](https://issues.apache.org/jira/browse/CB-4816) Fix file creation outside sandbox for BB10 - -### 0.2.5 (Oct 28, 2013) -* [CB-5129](https://issues.apache.org/jira/browse/CB-5129): Add a consistent filesystem attribute to FileEntry and DirectoryEntry objects -* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): added repo + issue tag to plugin.xml for file plugin -* [CB-5015](https://issues.apache.org/jira/browse/CB-5015) [BlackBerry10] Add missing dependency for File.slice -* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. - -### 0.2.4 (Oct 9, 2013) -* [CB-5020](https://issues.apache.org/jira/browse/CB-5020) - File plugin should execute on a separate thread -* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. -* [CB-4504](https://issues.apache.org/jira/browse/CB-4504): Updating FileUtils.java to compensate for Java porting failures in the Android SDK. This fails because Java knows nothing about android_asset not being an actual filesystem - -### 0.2.3 (Sept 25, 2013) -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version -* [CB-4903](https://issues.apache.org/jira/browse/CB-4903) File Plugin not loading Windows8 -* [CB-4903](https://issues.apache.org/jira/browse/CB-4903) File Plugin not loading Windows8 -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming references -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.file to org.apache.cordova.file -* Rename CHANGELOG.md -> RELEASENOTES.md -* [CB-4771](https://issues.apache.org/jira/browse/CB-4771) Expose TEMPORARY and PERSISTENT constants on window. -* Fix compiler/lint warnings -* [CB-4764](https://issues.apache.org/jira/browse/CB-4764) Move DirectoryManager.java into file plugin -* [CB-4763](https://issues.apache.org/jira/browse/CB-4763) Copy FileHelper.java into the plugin. -* [CB-2901](https://issues.apache.org/jira/browse/CB-2901) [BlackBerry10] Automatically unsandbox filesystem if path is not in app sandbox -* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. - -### 0.2.1 (Sept 5, 2013) -* [CB-4656](https://issues.apache.org/jira/browse/CB-4656) Don't add newlines in data urls within readAsDataUrl. -* [CB-4514](https://issues.apache.org/jira/browse/CB-4514) Making DirectoryCopy Recursive -* [iOS] Simplify the code in resolveLocalFileSystemURI diff --git a/plugins/cordova-plugin-file/doc/plugins.md b/plugins/cordova-plugin-file/doc/plugins.md deleted file mode 100644 index a3329d671..000000000 --- a/plugins/cordova-plugin-file/doc/plugins.md +++ /dev/null @@ -1,120 +0,0 @@ - - -Notes for plugin developers -=========================== - -These notes are primarily intended for Android and iOS developers who want to write plugins which interface with the file system using the File plugin. - -Working with Cordova file system URLs -------------------------------------- - -Since version 1.0.0, this plugin has used URLs with a `cdvfile` scheme for all communication over the bridge, rather than exposing raw device file system paths to JavaScript. - -On the JavaScript side, this means that FileEntry and DirectoryEntry objects have a fullPath attribute which is relative to the root of the HTML file system. If your plugin's JavaScript API accepts a FileEntry or DirectoryEntry object, you should call `.toURL()` on that object before passing it across the bridge to native code. - -### Converting cdvfile:// URLs to fileystem paths - -Plugins which need to write to the filesystem may want to convert a received file system URL to an actual filesystem location. There are multiple ways of doing this, depending on the native platform. - -It is important to remember that not all `cdvfile://` URLs are mappable to real files on the device. Some URLs can refer to assets on device which are not represented by files, or can even refer to remote resources. Because of these possibilities, plugins should always test whether they get a meaningful result back when trying to convert URLs to paths. - -#### Android - -On Android, the simplest method to convert a `cdvfile://` URL to a filesystem path is to use `org.apache.cordova.CordovaResourceApi`. `CordovaResourceApi` has several methods which can handle `cdvfile://` URLs: - - // webView is a member of the Plugin class - CordovaResourceApi resourceApi = webView.getResourceApi(); - - // Obtain a file:/// URL representing this file on the device, - // or the same URL unchanged if it cannot be mapped to a file - Uri fileURL = resourceApi.remapUri(Uri.parse(cdvfileURL)); - -It is also possible to use the File plugin directly: - - import org.apache.cordova.file.FileUtils; - import org.apache.cordova.file.FileSystem; - import java.net.MalformedURLException; - - // Get the File plugin from the plugin manager - FileUtils filePlugin = (FileUtils)webView.pluginManager.getPlugin("File"); - - // Given a URL, get a path for it - try { - String path = filePlugin.filesystemPathForURL(cdvfileURL); - } catch (MalformedURLException e) { - // The filesystem url wasn't recognized - } - -To convert from a path to a `cdvfile://` URL: - - import org.apache.cordova.file.LocalFilesystemURL; - - // Get a LocalFilesystemURL object for a device path, - // or null if it cannot be represented as a cdvfile URL. - LocalFilesystemURL url = filePlugin.filesystemURLforLocalPath(path); - // Get the string representation of the URL object - String cdvfileURL = url.toString(); - -If your plugin creates a file, and you want to return a FileEntry object for it, use the File plugin: - - // Return a JSON structure suitable for returning to JavaScript, - // or null if this file is not representable as a cdvfile URL. - JSONObject entry = filePlugin.getEntryForFile(file); - -#### iOS - -Cordova on iOS does not use the same `CordovaResourceApi` concept as Android. On iOS, you should use the File plugin to convert between URLs and filesystem paths. - - // Get a CDVFilesystem URL object from a URL string - CDVFilesystemURL* url = [CDVFilesystemURL fileSystemURLWithString:cdvfileURL]; - // Get a path for the URL object, or nil if it cannot be mapped to a file - NSString* path = [filePlugin filesystemPathForURL:url]; - - - // Get a CDVFilesystem URL object for a device path, or - // nil if it cannot be represented as a cdvfile URL. - CDVFilesystemURL* url = [filePlugin fileSystemURLforLocalPath:path]; - // Get the string representation of the URL object - NSString* cdvfileURL = [url absoluteString]; - -If your plugin creates a file, and you want to return a FileEntry object for it, use the File plugin: - - // Get a CDVFilesystem URL object for a device path, or - // nil if it cannot be represented as a cdvfile URL. - CDVFilesystemURL* url = [filePlugin fileSystemURLforLocalPath:path]; - // Get a structure to return to JavaScript - NSDictionary* entry = [filePlugin makeEntryForLocalURL:url] - -#### JavaScript - -In JavaScript, to get a `cdvfile://` URL from a FileEntry or DirectoryEntry object, simply call `.toURL()` on it: - - var cdvfileURL = entry.toURL(); - -In plugin response handlers, to convert from a returned FileEntry structure to an actual Entry object, your handler code should import the File plugin and create a new object: - - // create appropriate Entry object - var entry; - if (entryStruct.isDirectory) { - entry = new DirectoryEntry(entryStruct.name, entryStruct.fullPath, new FileSystem(entryStruct.filesystemName)); - } else { - entry = new FileEntry(entryStruct.name, entryStruct.fullPath, new FileSystem(entryStruct.filesystemName)); - } - diff --git a/plugins/cordova-plugin-file/package.json b/plugins/cordova-plugin-file/package.json deleted file mode 100644 index 6340c66c0..000000000 --- a/plugins/cordova-plugin-file/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "cordova-plugin-file", - "version": "6.0.2", - "description": "Cordova File Plugin", - "types": "./types/index.d.ts", - "cordova": { - "id": "cordova-plugin-file", - "platforms": [ - "android", - "browser", - "ios", - "osx", - "windows" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/apache/cordova-plugin-file" - }, - "bugs": { - "url": "https://github.com/apache/cordova-plugin-file/issues" - }, - "keywords": [ - "cordova", - "file", - "ecosystem:cordova", - "cordova-android", - "cordova-browser", - "cordova-ios", - "cordova-osx", - "cordova-windows" - ], - "scripts": { - "test": "npm run eslint", - "eslint": "node node_modules/eslint/bin/eslint www && node node_modules/eslint/bin/eslint src && node node_modules/eslint/bin/eslint tests" - }, - "author": "Apache Software Foundation", - "license": "Apache-2.0", - "engines": { - "cordovaDependencies": { - "5.0.0": { - "cordova-android": ">=6.3.0" - }, - "7.0.0": { - "cordova": ">100" - } - } - }, - "devDependencies": { - "eslint": "^3.19.0", - "eslint-config-semistandard": "^11.0.0", - "eslint-config-standard": "^10.2.1", - "eslint-plugin-import": "^2.3.0", - "eslint-plugin-node": "^5.0.0", - "eslint-plugin-promise": "^3.5.0", - "eslint-plugin-standard": "^3.0.1" - } -} diff --git a/plugins/cordova-plugin-file/plugin.xml b/plugins/cordova-plugin-file/plugin.xml deleted file mode 100644 index 74543fba1..000000000 --- a/plugins/cordova-plugin-file/plugin.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - File - Cordova File Plugin - Apache 2.0 - cordova,file - https://github.com/apache/cordova-plugin-file - https://github.com/apache/cordova-plugin-file/issues - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml. - -If this is a new application no changes are required. - -If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add: - - "<preference name="AndroidPersistentFileLocation" value="Compatibility" />" - -to config.xml in order for the application to find previously stored files. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/cordova-plugin-file/src/android/AssetFilesystem.java b/plugins/cordova-plugin-file/src/android/AssetFilesystem.java deleted file mode 100644 index b035c40e6..000000000 --- a/plugins/cordova-plugin-file/src/android/AssetFilesystem.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -package org.apache.cordova.file; - -import android.content.res.AssetManager; -import android.net.Uri; - -import org.apache.cordova.CordovaResourceApi; -import org.apache.cordova.LOG; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.HashMap; -import java.util.Map; - -public class AssetFilesystem extends Filesystem { - - private final AssetManager assetManager; - - // A custom gradle hook creates the cdvasset.manifest file, which speeds up asset listing a tonne. - // See: http://stackoverflow.com/questions/16911558/android-assetmanager-list-incredibly-slow - private static Object listCacheLock = new Object(); - private static boolean listCacheFromFile; - private static Map listCache; - private static Map lengthCache; - - private static final String LOG_TAG = "AssetFilesystem"; - - private void lazyInitCaches() { - synchronized (listCacheLock) { - if (listCache == null) { - ObjectInputStream ois = null; - try { - ois = new ObjectInputStream(assetManager.open("cdvasset.manifest")); - listCache = (Map) ois.readObject(); - lengthCache = (Map) ois.readObject(); - listCacheFromFile = true; - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { - // Asset manifest won't exist if the gradle hook isn't set up correctly. - } finally { - if (ois != null) { - try { - ois.close(); - } catch (IOException e) { - LOG.d(LOG_TAG, e.getLocalizedMessage()); - } - } - } - if (listCache == null) { - LOG.w("AssetFilesystem", "Asset manifest not found. Recursive copies and directory listing will be slow."); - listCache = new HashMap(); - } - } - } - } - - private String[] listAssets(String assetPath) throws IOException { - if (assetPath.startsWith("/")) { - assetPath = assetPath.substring(1); - } - if (assetPath.endsWith("/")) { - assetPath = assetPath.substring(0, assetPath.length() - 1); - } - lazyInitCaches(); - String[] ret = listCache.get(assetPath); - if (ret == null) { - if (listCacheFromFile) { - ret = new String[0]; - } else { - ret = assetManager.list(assetPath); - listCache.put(assetPath, ret); - } - } - return ret; - } - - private long getAssetSize(String assetPath) throws FileNotFoundException { - if (assetPath.startsWith("/")) { - assetPath = assetPath.substring(1); - } - lazyInitCaches(); - if (lengthCache != null) { - Long ret = lengthCache.get(assetPath); - if (ret == null) { - throw new FileNotFoundException("Asset not found: " + assetPath); - } - return ret; - } - CordovaResourceApi.OpenForReadResult offr = null; - try { - offr = resourceApi.openForRead(nativeUriForFullPath(assetPath)); - long length = offr.length; - if (length < 0) { - // available() doesn't always yield the file size, but for assets it does. - length = offr.inputStream.available(); - } - return length; - } catch (IOException e) { - FileNotFoundException fnfe = new FileNotFoundException("File not found: " + assetPath); - fnfe.initCause(e); - throw fnfe; - } finally { - if (offr != null) { - try { - offr.inputStream.close(); - } catch (IOException e) { - LOG.d(LOG_TAG, e.getLocalizedMessage()); - } - } - } - } - - public AssetFilesystem(AssetManager assetManager, CordovaResourceApi resourceApi) { - super(Uri.parse("file:///android_asset/"), "assets", resourceApi); - this.assetManager = assetManager; - } - - @Override - public Uri toNativeUri(LocalFilesystemURL inputURL) { - return nativeUriForFullPath(inputURL.path); - } - - @Override - public LocalFilesystemURL toLocalUri(Uri inputURL) { - if (!"file".equals(inputURL.getScheme())) { - return null; - } - File f = new File(inputURL.getPath()); - // Removes and duplicate /s (e.g. file:///a//b/c) - Uri resolvedUri = Uri.fromFile(f); - String rootUriNoTrailingSlash = rootUri.getEncodedPath(); - rootUriNoTrailingSlash = rootUriNoTrailingSlash.substring(0, rootUriNoTrailingSlash.length() - 1); - if (!resolvedUri.getEncodedPath().startsWith(rootUriNoTrailingSlash)) { - return null; - } - String subPath = resolvedUri.getEncodedPath().substring(rootUriNoTrailingSlash.length()); - // Strip leading slash - if (!subPath.isEmpty()) { - subPath = subPath.substring(1); - } - Uri.Builder b = new Uri.Builder() - .scheme(LocalFilesystemURL.FILESYSTEM_PROTOCOL) - .authority("localhost") - .path(name); - if (!subPath.isEmpty()) { - b.appendEncodedPath(subPath); - } - if (isDirectory(subPath) || inputURL.getPath().endsWith("/")) { - // Add trailing / for directories. - b.appendEncodedPath(""); - } - return LocalFilesystemURL.parse(b.build()); - } - - private boolean isDirectory(String assetPath) { - try { - return listAssets(assetPath).length != 0; - } catch (IOException e) { - return false; - } - } - - @Override - public LocalFilesystemURL[] listChildren(LocalFilesystemURL inputURL) throws FileNotFoundException { - String pathNoSlashes = inputURL.path.substring(1); - if (pathNoSlashes.endsWith("/")) { - pathNoSlashes = pathNoSlashes.substring(0, pathNoSlashes.length() - 1); - } - - String[] files; - try { - files = listAssets(pathNoSlashes); - } catch (IOException e) { - FileNotFoundException fnfe = new FileNotFoundException(); - fnfe.initCause(e); - throw fnfe; - } - - LocalFilesystemURL[] entries = new LocalFilesystemURL[files.length]; - for (int i = 0; i < files.length; ++i) { - entries[i] = localUrlforFullPath(new File(inputURL.path, files[i]).getPath()); - } - return entries; - } - - @Override - public JSONObject getFileForLocalURL(LocalFilesystemURL inputURL, - String path, JSONObject options, boolean directory) - throws FileExistsException, IOException, TypeMismatchException, EncodingException, JSONException { - if (options != null && options.optBoolean("create")) { - throw new UnsupportedOperationException("Assets are read-only"); - } - - // Check whether the supplied path is absolute or relative - if (directory && !path.endsWith("/")) { - path += "/"; - } - - LocalFilesystemURL requestedURL; - if (path.startsWith("/")) { - requestedURL = localUrlforFullPath(normalizePath(path)); - } else { - requestedURL = localUrlforFullPath(normalizePath(inputURL.path + "/" + path)); - } - - // Throws a FileNotFoundException if it doesn't exist. - getFileMetadataForLocalURL(requestedURL); - - boolean isDir = isDirectory(requestedURL.path); - if (directory && !isDir) { - throw new TypeMismatchException("path doesn't exist or is file"); - } else if (!directory && isDir) { - throw new TypeMismatchException("path doesn't exist or is directory"); - } - - // Return the directory - return makeEntryForURL(requestedURL); - } - - @Override - public JSONObject getFileMetadataForLocalURL(LocalFilesystemURL inputURL) throws FileNotFoundException { - JSONObject metadata = new JSONObject(); - long size = inputURL.isDirectory ? 0 : getAssetSize(inputURL.path); - try { - metadata.put("size", size); - metadata.put("type", inputURL.isDirectory ? "text/directory" : resourceApi.getMimeType(toNativeUri(inputURL))); - metadata.put("name", new File(inputURL.path).getName()); - metadata.put("fullPath", inputURL.path); - metadata.put("lastModifiedDate", 0); - } catch (JSONException e) { - return null; - } - return metadata; - } - - @Override - public boolean canRemoveFileAtLocalURL(LocalFilesystemURL inputURL) { - return false; - } - - @Override - long writeToFileAtURL(LocalFilesystemURL inputURL, String data, int offset, boolean isBinary) throws NoModificationAllowedException, IOException { - throw new NoModificationAllowedException("Assets are read-only"); - } - - @Override - long truncateFileAtURL(LocalFilesystemURL inputURL, long size) throws IOException, NoModificationAllowedException { - throw new NoModificationAllowedException("Assets are read-only"); - } - - @Override - String filesystemPathForURL(LocalFilesystemURL url) { - return new File(rootUri.getPath(), url.path).toString(); - } - - @Override - LocalFilesystemURL URLforFilesystemPath(String path) { - return null; - } - - @Override - boolean removeFileAtLocalURL(LocalFilesystemURL inputURL) throws InvalidModificationException, NoModificationAllowedException { - throw new NoModificationAllowedException("Assets are read-only"); - } - - @Override - boolean recursiveRemoveFileAtLocalURL(LocalFilesystemURL inputURL) throws NoModificationAllowedException { - throw new NoModificationAllowedException("Assets are read-only"); - } - -} diff --git a/plugins/cordova-plugin-file/src/android/ContentFilesystem.java b/plugins/cordova-plugin-file/src/android/ContentFilesystem.java deleted file mode 100644 index 6b983c089..000000000 --- a/plugins/cordova-plugin-file/src/android/ContentFilesystem.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -package org.apache.cordova.file; - -import android.content.ContentResolver; -import android.content.Context; -import android.database.Cursor; -import android.net.Uri; -import android.provider.DocumentsContract; -import android.provider.MediaStore; -import android.provider.OpenableColumns; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import org.apache.cordova.CordovaResourceApi; -import org.json.JSONException; -import org.json.JSONObject; - -public class ContentFilesystem extends Filesystem { - - private final Context context; - - public ContentFilesystem(Context context, CordovaResourceApi resourceApi) { - super(Uri.parse("content://"), "content", resourceApi); - this.context = context; - } - - @Override - public Uri toNativeUri(LocalFilesystemURL inputURL) { - String authorityAndPath = inputURL.uri.getEncodedPath().substring(this.name.length() + 2); - if (authorityAndPath.length() < 2) { - return null; - } - String ret = "content://" + authorityAndPath; - String query = inputURL.uri.getEncodedQuery(); - if (query != null) { - ret += '?' + query; - } - String frag = inputURL.uri.getEncodedFragment(); - if (frag != null) { - ret += '#' + frag; - } - return Uri.parse(ret); - } - - @Override - public LocalFilesystemURL toLocalUri(Uri inputURL) { - if (!"content".equals(inputURL.getScheme())) { - return null; - } - String subPath = inputURL.getEncodedPath(); - if (subPath.length() > 0) { - subPath = subPath.substring(1); - } - Uri.Builder b = new Uri.Builder() - .scheme(LocalFilesystemURL.FILESYSTEM_PROTOCOL) - .authority("localhost") - .path(name) - .appendPath(inputURL.getAuthority()); - if (subPath.length() > 0) { - b.appendEncodedPath(subPath); - } - Uri localUri = b.encodedQuery(inputURL.getEncodedQuery()) - .encodedFragment(inputURL.getEncodedFragment()) - .build(); - return LocalFilesystemURL.parse(localUri); - } - - @Override - public JSONObject getFileForLocalURL(LocalFilesystemURL inputURL, - String fileName, JSONObject options, boolean directory) throws IOException, TypeMismatchException, JSONException { - throw new UnsupportedOperationException("getFile() not supported for content:. Use resolveLocalFileSystemURL instead."); - } - - @Override - public boolean removeFileAtLocalURL(LocalFilesystemURL inputURL) - throws NoModificationAllowedException { - Uri contentUri = toNativeUri(inputURL); - try { - context.getContentResolver().delete(contentUri, null, null); - } catch (UnsupportedOperationException t) { - // Was seeing this on the File mobile-spec tests on 4.0.3 x86 emulator. - // The ContentResolver applies only when the file was registered in the - // first case, which is generally only the case with images. - NoModificationAllowedException nmae = new NoModificationAllowedException("Deleting not supported for content uri: " + contentUri); - nmae.initCause(t); - throw nmae; - } - return true; - } - - @Override - public boolean recursiveRemoveFileAtLocalURL(LocalFilesystemURL inputURL) - throws NoModificationAllowedException { - throw new NoModificationAllowedException("Cannot remove content url"); - } - - @Override - public LocalFilesystemURL[] listChildren(LocalFilesystemURL inputURL) throws FileNotFoundException { - throw new UnsupportedOperationException("readEntriesAtLocalURL() not supported for content:. Use resolveLocalFileSystemURL instead."); - } - - @Override - public JSONObject getFileMetadataForLocalURL(LocalFilesystemURL inputURL) throws FileNotFoundException { - long size = -1; - long lastModified = 0; - Uri nativeUri = toNativeUri(inputURL); - String mimeType = resourceApi.getMimeType(nativeUri); - Cursor cursor = openCursorForURL(nativeUri); - try { - if (cursor != null && cursor.moveToFirst()) { - Long sizeForCursor = resourceSizeForCursor(cursor); - if (sizeForCursor != null) { - size = sizeForCursor.longValue(); - } - Long modified = lastModifiedDateForCursor(cursor); - if (modified != null) - lastModified = modified.longValue(); - } else { - // Some content providers don't support cursors at all! - CordovaResourceApi.OpenForReadResult offr = resourceApi.openForRead(nativeUri); - size = offr.length; - } - } catch (IOException e) { - FileNotFoundException fnfe = new FileNotFoundException(); - fnfe.initCause(e); - throw fnfe; - } finally { - if (cursor != null) - cursor.close(); - } - - JSONObject metadata = new JSONObject(); - try { - metadata.put("size", size); - metadata.put("type", mimeType); - metadata.put("name", name); - metadata.put("fullPath", inputURL.path); - metadata.put("lastModifiedDate", lastModified); - } catch (JSONException e) { - return null; - } - return metadata; - } - - @Override - public long writeToFileAtURL(LocalFilesystemURL inputURL, String data, - int offset, boolean isBinary) throws NoModificationAllowedException { - throw new NoModificationAllowedException("Couldn't write to file given its content URI"); - } - @Override - public long truncateFileAtURL(LocalFilesystemURL inputURL, long size) - throws NoModificationAllowedException { - throw new NoModificationAllowedException("Couldn't truncate file given its content URI"); - } - - protected Cursor openCursorForURL(Uri nativeUri) { - ContentResolver contentResolver = context.getContentResolver(); - try { - return contentResolver.query(nativeUri, null, null, null, null); - } catch (UnsupportedOperationException e) { - return null; - } - } - - private Long resourceSizeForCursor(Cursor cursor) { - int columnIndex = cursor.getColumnIndex(OpenableColumns.SIZE); - if (columnIndex != -1) { - String sizeStr = cursor.getString(columnIndex); - if (sizeStr != null) { - return Long.parseLong(sizeStr); - } - } - return null; - } - - protected Long lastModifiedDateForCursor(Cursor cursor) { - int columnIndex = cursor.getColumnIndex(MediaStore.MediaColumns.DATE_MODIFIED); - if (columnIndex == -1) { - columnIndex = cursor.getColumnIndex(DocumentsContract.Document.COLUMN_LAST_MODIFIED); - } - if (columnIndex != -1) { - String dateStr = cursor.getString(columnIndex); - if (dateStr != null) { - return Long.parseLong(dateStr); - } - } - return null; - } - - @Override - public String filesystemPathForURL(LocalFilesystemURL url) { - File f = resourceApi.mapUriToFile(toNativeUri(url)); - return f == null ? null : f.getAbsolutePath(); - } - - @Override - public LocalFilesystemURL URLforFilesystemPath(String path) { - // Returns null as we don't support reverse mapping back to content:// URLs - return null; - } - - @Override - public boolean canRemoveFileAtLocalURL(LocalFilesystemURL inputURL) { - return true; - } -} diff --git a/plugins/cordova-plugin-file/src/android/DirectoryManager.java b/plugins/cordova-plugin-file/src/android/DirectoryManager.java deleted file mode 100644 index 07af5ea20..000000000 --- a/plugins/cordova-plugin-file/src/android/DirectoryManager.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.file; - -import android.os.Environment; -import android.os.StatFs; - -import java.io.File; - -/** - * This class provides file directory utilities. - * All file operations are performed on the SD card. - * - * It is used by the FileUtils class. - */ -public class DirectoryManager { - - @SuppressWarnings("unused") - private static final String LOG_TAG = "DirectoryManager"; - - /** - * Determine if a file or directory exists. - * @param name The name of the file to check. - * @return T=exists, F=not found - */ - public static boolean testFileExists(String name) { - boolean status; - - // If SD card exists - if ((testSaveLocationExists()) && (!name.equals(""))) { - File path = Environment.getExternalStorageDirectory(); - File newPath = constructFilePaths(path.toString(), name); - status = newPath.exists(); - } - // If no SD card - else { - status = false; - } - return status; - } - - /** - * Get the free space in external storage - * - * @return Size in KB or -1 if not available - */ - public static long getFreeExternalStorageSpace() { - String status = Environment.getExternalStorageState(); - long freeSpaceInBytes = 0; - - // Check if external storage exists - if (status.equals(Environment.MEDIA_MOUNTED)) { - freeSpaceInBytes = getFreeSpaceInBytes(Environment.getExternalStorageDirectory().getPath()); - } else { - // If no external storage then return -1 - return -1; - } - - return freeSpaceInBytes / 1024; - } - - /** - * Given a path return the number of free bytes in the filesystem containing the path. - * - * @param path to the file system - * @return free space in bytes - */ - public static long getFreeSpaceInBytes(String path) { - try { - StatFs stat = new StatFs(path); - long blockSize = stat.getBlockSize(); - long availableBlocks = stat.getAvailableBlocks(); - return availableBlocks * blockSize; - } catch (IllegalArgumentException e) { - // The path was invalid. Just return 0 free bytes. - return 0; - } - } - - /** - * Determine if SD card exists. - * - * @return T=exists, F=not found - */ - public static boolean testSaveLocationExists() { - String sDCardStatus = Environment.getExternalStorageState(); - boolean status; - - // If SD card is mounted - if (sDCardStatus.equals(Environment.MEDIA_MOUNTED)) { - status = true; - } - - // If no SD card - else { - status = false; - } - return status; - } - - /** - * Create a new file object from two file paths. - * - * @param file1 Base file path - * @param file2 Remaining file path - * @return File object - */ - private static File constructFilePaths (String file1, String file2) { - File newPath; - if (file2.startsWith(file1)) { - newPath = new File(file2); - } - else { - newPath = new File(file1 + "/" + file2); - } - return newPath; - } -} diff --git a/plugins/cordova-plugin-file/src/android/EncodingException.java b/plugins/cordova-plugin-file/src/android/EncodingException.java deleted file mode 100644 index e9e1653bd..000000000 --- a/plugins/cordova-plugin-file/src/android/EncodingException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.file; - -@SuppressWarnings("serial") -public class EncodingException extends Exception { - - public EncodingException(String message) { - super(message); - } - -} diff --git a/plugins/cordova-plugin-file/src/android/FileExistsException.java b/plugins/cordova-plugin-file/src/android/FileExistsException.java deleted file mode 100644 index 5c4d83dc4..000000000 --- a/plugins/cordova-plugin-file/src/android/FileExistsException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.file; - -@SuppressWarnings("serial") -public class FileExistsException extends Exception { - - public FileExistsException(String msg) { - super(msg); - } - -} diff --git a/plugins/cordova-plugin-file/src/android/FileUtils.java b/plugins/cordova-plugin-file/src/android/FileUtils.java deleted file mode 100644 index 1d6e61fa3..000000000 --- a/plugins/cordova-plugin-file/src/android/FileUtils.java +++ /dev/null @@ -1,1225 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -package org.apache.cordova.file; - -import android.Manifest; -import android.app.Activity; -import android.content.Context; -import android.content.pm.PackageManager; -import android.net.Uri; -import android.os.Build; -import android.os.Environment; -import android.util.Base64; - -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.LOG; -import org.apache.cordova.PermissionHelper; -import org.apache.cordova.PluginResult; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.security.Permission; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; - -/** - * This class provides file and directory services to JavaScript. - */ -public class FileUtils extends CordovaPlugin { - private static final String LOG_TAG = "FileUtils"; - - public static int NOT_FOUND_ERR = 1; - public static int SECURITY_ERR = 2; - public static int ABORT_ERR = 3; - - public static int NOT_READABLE_ERR = 4; - public static int ENCODING_ERR = 5; - public static int NO_MODIFICATION_ALLOWED_ERR = 6; - public static int INVALID_STATE_ERR = 7; - public static int SYNTAX_ERR = 8; - public static int INVALID_MODIFICATION_ERR = 9; - public static int QUOTA_EXCEEDED_ERR = 10; - public static int TYPE_MISMATCH_ERR = 11; - public static int PATH_EXISTS_ERR = 12; - - /* - * Permission callback codes - */ - - public static final int ACTION_GET_FILE = 0; - public static final int ACTION_WRITE = 1; - public static final int ACTION_GET_DIRECTORY = 2; - - public static final int WRITE = 3; - public static final int READ = 4; - - public static int UNKNOWN_ERR = 1000; - - private boolean configured = false; - - private PendingRequests pendingRequests; - - - - /* - * We need both read and write when accessing the storage, I think. - */ - - private String [] permissions = { - Manifest.permission.READ_EXTERNAL_STORAGE, - Manifest.permission.WRITE_EXTERNAL_STORAGE }; - - // This field exists only to support getEntry, below, which has been deprecated - private static FileUtils filePlugin; - - private interface FileOp { - void run(JSONArray args) throws Exception; - } - - private ArrayList filesystems; - - public void registerFilesystem(Filesystem fs) { - if (fs != null && filesystemForName(fs.name)== null) { - this.filesystems.add(fs); - } - } - - private Filesystem filesystemForName(String name) { - for (Filesystem fs:filesystems) { - if (fs != null && fs.name != null && fs.name.equals(name)) { - return fs; - } - } - return null; - } - - protected String[] getExtraFileSystemsPreference(Activity activity) { - String fileSystemsStr = preferences.getString("androidextrafilesystems", "files,files-external,documents,sdcard,cache,cache-external,assets,root"); - return fileSystemsStr.split(","); - } - - protected void registerExtraFileSystems(String[] filesystems, HashMap availableFileSystems) { - HashSet installedFileSystems = new HashSet(); - - /* Register filesystems in order */ - for (String fsName : filesystems) { - if (!installedFileSystems.contains(fsName)) { - String fsRoot = availableFileSystems.get(fsName); - if (fsRoot != null) { - File newRoot = new File(fsRoot); - if (newRoot.mkdirs() || newRoot.isDirectory()) { - registerFilesystem(new LocalFilesystem(fsName, webView.getContext(), webView.getResourceApi(), newRoot)); - installedFileSystems.add(fsName); - } else { - LOG.d(LOG_TAG, "Unable to create root dir for filesystem \"" + fsName + "\", skipping"); - } - } else { - LOG.d(LOG_TAG, "Unrecognized extra filesystem identifier: " + fsName); - } - } - } - } - - protected HashMap getAvailableFileSystems(Activity activity) { - Context context = activity.getApplicationContext(); - HashMap availableFileSystems = new HashMap(); - - availableFileSystems.put("files", context.getFilesDir().getAbsolutePath()); - availableFileSystems.put("documents", new File(context.getFilesDir(), "Documents").getAbsolutePath()); - availableFileSystems.put("cache", context.getCacheDir().getAbsolutePath()); - availableFileSystems.put("root", "/"); - if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { - try { - availableFileSystems.put("files-external", context.getExternalFilesDir(null).getAbsolutePath()); - availableFileSystems.put("sdcard", Environment.getExternalStorageDirectory().getAbsolutePath()); - availableFileSystems.put("cache-external", context.getExternalCacheDir().getAbsolutePath()); - } - catch(NullPointerException e) { - LOG.d(LOG_TAG, "External storage unavailable, check to see if USB Mass Storage Mode is on"); - } - } - - return availableFileSystems; - } - - @Override - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - this.filesystems = new ArrayList(); - this.pendingRequests = new PendingRequests(); - - String tempRoot = null; - String persistentRoot = null; - - Activity activity = cordova.getActivity(); - String packageName = activity.getPackageName(); - - String location = preferences.getString("androidpersistentfilelocation", "internal"); - - tempRoot = activity.getCacheDir().getAbsolutePath(); - if ("internal".equalsIgnoreCase(location)) { - persistentRoot = activity.getFilesDir().getAbsolutePath() + "/files/"; - this.configured = true; - } else if ("compatibility".equalsIgnoreCase(location)) { - /* - * Fall-back to compatibility mode -- this is the logic implemented in - * earlier versions of this plugin, and should be maintained here so - * that apps which were originally deployed with older versions of the - * plugin can continue to provide access to files stored under those - * versions. - */ - if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { - persistentRoot = Environment.getExternalStorageDirectory().getAbsolutePath(); - tempRoot = Environment.getExternalStorageDirectory().getAbsolutePath() + - "/Android/data/" + packageName + "/cache/"; - } else { - persistentRoot = "/data/data/" + packageName; - } - this.configured = true; - } - - if (this.configured) { - // Create the directories if they don't exist. - File tmpRootFile = new File(tempRoot); - File persistentRootFile = new File(persistentRoot); - tmpRootFile.mkdirs(); - persistentRootFile.mkdirs(); - - // Register initial filesystems - // Note: The temporary and persistent filesystems need to be the first two - // registered, so that they will match window.TEMPORARY and window.PERSISTENT, - // per spec. - this.registerFilesystem(new LocalFilesystem("temporary", webView.getContext(), webView.getResourceApi(), tmpRootFile)); - this.registerFilesystem(new LocalFilesystem("persistent", webView.getContext(), webView.getResourceApi(), persistentRootFile)); - this.registerFilesystem(new ContentFilesystem(webView.getContext(), webView.getResourceApi())); - this.registerFilesystem(new AssetFilesystem(webView.getContext().getAssets(), webView.getResourceApi())); - - registerExtraFileSystems(getExtraFileSystemsPreference(activity), getAvailableFileSystems(activity)); - - // Initialize static plugin reference for deprecated getEntry method - if (filePlugin == null) { - FileUtils.filePlugin = this; - } - } else { - LOG.e(LOG_TAG, "File plugin configuration error: Please set AndroidPersistentFileLocation in config.xml to one of \"internal\" (for new applications) or \"compatibility\" (for compatibility with previous versions)"); - activity.finish(); - } - } - - public static FileUtils getFilePlugin() { - return filePlugin; - } - - private Filesystem filesystemForURL(LocalFilesystemURL localURL) { - if (localURL == null) return null; - return filesystemForName(localURL.fsName); - } - - @Override - public Uri remapUri(Uri uri) { - // Remap only cdvfile: URLs (not content:). - if (!LocalFilesystemURL.FILESYSTEM_PROTOCOL.equals(uri.getScheme())) { - return null; - } - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(uri); - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - return null; - } - String path = fs.filesystemPathForURL(inputURL); - if (path != null) { - return Uri.parse("file://" + fs.filesystemPathForURL(inputURL)); - } - return null; - } catch (IllegalArgumentException e) { - return null; - } - } - - public boolean execute(String action, final String rawArgs, final CallbackContext callbackContext) { - if (!configured) { - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, "File plugin is not configured. Please see the README.md file for details on how to update config.xml")); - return true; - } - if (action.equals("testSaveLocationExists")) { - threadhelper(new FileOp() { - public void run(JSONArray args) { - boolean b = DirectoryManager.testSaveLocationExists(); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, b)); - } - }, rawArgs, callbackContext); - } - else if (action.equals("getFreeDiskSpace")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) { - // The getFreeDiskSpace plugin API is not documented, but some apps call it anyway via exec(). - // For compatibility it always returns free space in the primary external storage, and - // does NOT fallback to internal store if external storage is unavailable. - long l = DirectoryManager.getFreeExternalStorageSpace(); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, l)); - } - }, rawArgs, callbackContext); - } - else if (action.equals("testFileExists")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException { - String fname=args.getString(0); - boolean b = DirectoryManager.testFileExists(fname); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, b)); - } - }, rawArgs, callbackContext); - } - else if (action.equals("testDirectoryExists")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException { - String fname=args.getString(0); - boolean b = DirectoryManager.testFileExists(fname); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, b)); - } - }, rawArgs, callbackContext); - } - else if (action.equals("readAsText")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, MalformedURLException { - String encoding = args.getString(1); - int start = args.getInt(2); - int end = args.getInt(3); - String fname=args.getString(0); - readFileAs(fname, start, end, callbackContext, encoding, PluginResult.MESSAGE_TYPE_STRING); - } - }, rawArgs, callbackContext); - } - else if (action.equals("readAsDataURL")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, MalformedURLException { - int start = args.getInt(1); - int end = args.getInt(2); - String fname=args.getString(0); - readFileAs(fname, start, end, callbackContext, null, -1); - } - }, rawArgs, callbackContext); - } - else if (action.equals("readAsArrayBuffer")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, MalformedURLException { - int start = args.getInt(1); - int end = args.getInt(2); - String fname=args.getString(0); - readFileAs(fname, start, end, callbackContext, null, PluginResult.MESSAGE_TYPE_ARRAYBUFFER); - } - }, rawArgs, callbackContext); - } - else if (action.equals("readAsBinaryString")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, MalformedURLException { - int start = args.getInt(1); - int end = args.getInt(2); - String fname=args.getString(0); - readFileAs(fname, start, end, callbackContext, null, PluginResult.MESSAGE_TYPE_BINARYSTRING); - } - }, rawArgs, callbackContext); - } - else if (action.equals("write")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, FileNotFoundException, IOException, NoModificationAllowedException { - String fname=args.getString(0); - String nativeURL = resolveLocalFileSystemURI(fname).getString("nativeURL"); - String data=args.getString(1); - int offset=args.getInt(2); - Boolean isBinary=args.getBoolean(3); - - if(needPermission(nativeURL, WRITE)) { - getWritePermission(rawArgs, ACTION_WRITE, callbackContext); - } - else { - long fileSize = write(fname, data, offset, isBinary); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, fileSize)); - } - - } - }, rawArgs, callbackContext); - } - else if (action.equals("truncate")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, FileNotFoundException, IOException, NoModificationAllowedException { - String fname=args.getString(0); - int offset=args.getInt(1); - long fileSize = truncateFile(fname, offset); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, fileSize)); - } - }, rawArgs, callbackContext); - } - else if (action.equals("requestAllFileSystems")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws IOException, JSONException { - callbackContext.success(requestAllFileSystems()); - } - }, rawArgs, callbackContext); - } else if (action.equals("requestAllPaths")) { - cordova.getThreadPool().execute( - new Runnable() { - public void run() { - try { - callbackContext.success(requestAllPaths()); - } catch (JSONException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - ); - } else if (action.equals("requestFileSystem")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException { - int fstype = args.getInt(0); - long requiredSize = args.optLong(1); - requestFileSystem(fstype, requiredSize, callbackContext); - } - }, rawArgs, callbackContext); - } - else if (action.equals("resolveLocalFileSystemURI")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws IOException, JSONException { - String fname=args.getString(0); - JSONObject obj = resolveLocalFileSystemURI(fname); - callbackContext.success(obj); - } - }, rawArgs, callbackContext); - } - else if (action.equals("getFileMetadata")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws FileNotFoundException, JSONException, MalformedURLException { - String fname=args.getString(0); - JSONObject obj = getFileMetadata(fname); - callbackContext.success(obj); - } - }, rawArgs, callbackContext); - } - else if (action.equals("getParent")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, IOException { - String fname=args.getString(0); - JSONObject obj = getParent(fname); - callbackContext.success(obj); - } - }, rawArgs, callbackContext); - } - else if (action.equals("getDirectory")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws FileExistsException, IOException, TypeMismatchException, EncodingException, JSONException { - String dirname = args.getString(0); - String path = args.getString(1); - String nativeURL = resolveLocalFileSystemURI(dirname).getString("nativeURL"); - boolean containsCreate = (args.isNull(2)) ? false : args.getJSONObject(2).optBoolean("create", false); - - if(containsCreate && needPermission(nativeURL, WRITE)) { - getWritePermission(rawArgs, ACTION_GET_DIRECTORY, callbackContext); - } - else if(!containsCreate && needPermission(nativeURL, READ)) { - getReadPermission(rawArgs, ACTION_GET_DIRECTORY, callbackContext); - } - else { - JSONObject obj = getFile(dirname, path, args.optJSONObject(2), true); - callbackContext.success(obj); - } - } - }, rawArgs, callbackContext); - } - else if (action.equals("getFile")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws FileExistsException, IOException, TypeMismatchException, EncodingException, JSONException { - String dirname = args.getString(0); - String path = args.getString(1); - String nativeURL = resolveLocalFileSystemURI(dirname).getString("nativeURL"); - boolean containsCreate = (args.isNull(2)) ? false : args.getJSONObject(2).optBoolean("create", false); - - if(containsCreate && needPermission(nativeURL, WRITE)) { - getWritePermission(rawArgs, ACTION_GET_FILE, callbackContext); - } - else if(!containsCreate && needPermission(nativeURL, READ)) { - getReadPermission(rawArgs, ACTION_GET_FILE, callbackContext); - } - else { - JSONObject obj = getFile(dirname, path, args.optJSONObject(2), false); - callbackContext.success(obj); - } - } - }, rawArgs, callbackContext); - } - else if (action.equals("remove")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, NoModificationAllowedException, InvalidModificationException, MalformedURLException { - String fname=args.getString(0); - boolean success = remove(fname); - if (success) { - callbackContext.success(); - } else { - callbackContext.error(FileUtils.NO_MODIFICATION_ALLOWED_ERR); - } - } - }, rawArgs, callbackContext); - } - else if (action.equals("removeRecursively")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, FileExistsException, MalformedURLException, NoModificationAllowedException { - String fname=args.getString(0); - boolean success = removeRecursively(fname); - if (success) { - callbackContext.success(); - } else { - callbackContext.error(FileUtils.NO_MODIFICATION_ALLOWED_ERR); - } - } - }, rawArgs, callbackContext); - } - else if (action.equals("moveTo")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, NoModificationAllowedException, IOException, InvalidModificationException, EncodingException, FileExistsException { - String fname=args.getString(0); - String newParent=args.getString(1); - String newName=args.getString(2); - JSONObject entry = transferTo(fname, newParent, newName, true); - callbackContext.success(entry); - } - }, rawArgs, callbackContext); - } - else if (action.equals("copyTo")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, NoModificationAllowedException, IOException, InvalidModificationException, EncodingException, FileExistsException { - String fname=args.getString(0); - String newParent=args.getString(1); - String newName=args.getString(2); - JSONObject entry = transferTo(fname, newParent, newName, false); - callbackContext.success(entry); - } - }, rawArgs, callbackContext); - } - else if (action.equals("readEntries")) { - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws FileNotFoundException, JSONException, MalformedURLException { - String fname=args.getString(0); - JSONArray entries = readEntries(fname); - callbackContext.success(entries); - } - }, rawArgs, callbackContext); - } - else if (action.equals("_getLocalFilesystemPath")) { - // Internal method for testing: Get the on-disk location of a local filesystem url. - // [Currently used for testing file-transfer] - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws FileNotFoundException, JSONException, MalformedURLException { - String localURLstr = args.getString(0); - String fname = filesystemPathForURL(localURLstr); - callbackContext.success(fname); - } - }, rawArgs, callbackContext); - } - else { - return false; - } - return true; - } - - private void getReadPermission(String rawArgs, int action, CallbackContext callbackContext) { - int requestCode = pendingRequests.createRequest(rawArgs, action, callbackContext); - PermissionHelper.requestPermission(this, requestCode, Manifest.permission.READ_EXTERNAL_STORAGE); - } - - private void getWritePermission(String rawArgs, int action, CallbackContext callbackContext) { - int requestCode = pendingRequests.createRequest(rawArgs, action, callbackContext); - PermissionHelper.requestPermission(this, requestCode, Manifest.permission.WRITE_EXTERNAL_STORAGE); - } - - private boolean hasReadPermission() { - return PermissionHelper.hasPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE); - } - - private boolean hasWritePermission() { - return PermissionHelper.hasPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE); - } - - private boolean needPermission(String nativeURL, int permissionType) throws JSONException { - JSONObject j = requestAllPaths(); - ArrayList allowedStorageDirectories = new ArrayList(); - allowedStorageDirectories.add(j.getString("applicationDirectory")); - allowedStorageDirectories.add(j.getString("applicationStorageDirectory")); - if(j.has("externalApplicationStorageDirectory")) { - allowedStorageDirectories.add(j.getString("externalApplicationStorageDirectory")); - } - - if(permissionType == READ && hasReadPermission()) { - return false; - } - else if(permissionType == WRITE && hasWritePermission()) { - return false; - } - - // Permission required if the native url lies outside the allowed storage directories - for(String directory : allowedStorageDirectories) { - if(nativeURL.startsWith(directory)) { - return false; - } - } - return true; - } - - - public LocalFilesystemURL resolveNativeUri(Uri nativeUri) { - LocalFilesystemURL localURL = null; - - // Try all installed filesystems. Return the best matching URL - // (determined by the shortest resulting URL) - for (Filesystem fs : filesystems) { - LocalFilesystemURL url = fs.toLocalUri(nativeUri); - if (url != null) { - // A shorter fullPath implies that the filesystem is a better - // match for the local path than the previous best. - if (localURL == null || (url.uri.toString().length() < localURL.toString().length())) { - localURL = url; - } - } - } - return localURL; - } - - /* - * These two native-only methods can be used by other plugins to translate between - * device file system paths and URLs. By design, there is no direct JavaScript - * interface to these methods. - */ - - public String filesystemPathForURL(String localURLstr) throws MalformedURLException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(localURLstr); - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - return fs.filesystemPathForURL(inputURL); - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - } - - public LocalFilesystemURL filesystemURLforLocalPath(String localPath) { - LocalFilesystemURL localURL = null; - int shortestFullPath = 0; - - // Try all installed filesystems. Return the best matching URL - // (determined by the shortest resulting URL) - for (Filesystem fs: filesystems) { - LocalFilesystemURL url = fs.URLforFilesystemPath(localPath); - if (url != null) { - // A shorter fullPath implies that the filesystem is a better - // match for the local path than the previous best. - if (localURL == null || (url.path.length() < shortestFullPath)) { - localURL = url; - shortestFullPath = url.path.length(); - } - } - } - return localURL; - } - - - /* helper to execute functions async and handle the result codes - * - */ - private void threadhelper(final FileOp f, final String rawArgs, final CallbackContext callbackContext){ - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - JSONArray args = new JSONArray(rawArgs); - f.run(args); - } catch ( Exception e) { - if( e instanceof EncodingException){ - callbackContext.error(FileUtils.ENCODING_ERR); - } else if(e instanceof FileNotFoundException) { - callbackContext.error(FileUtils.NOT_FOUND_ERR); - } else if(e instanceof FileExistsException) { - callbackContext.error(FileUtils.PATH_EXISTS_ERR); - } else if(e instanceof NoModificationAllowedException ) { - callbackContext.error(FileUtils.NO_MODIFICATION_ALLOWED_ERR); - } else if(e instanceof InvalidModificationException ) { - callbackContext.error(FileUtils.INVALID_MODIFICATION_ERR); - } else if(e instanceof MalformedURLException ) { - callbackContext.error(FileUtils.ENCODING_ERR); - } else if(e instanceof IOException ) { - callbackContext.error(FileUtils.INVALID_MODIFICATION_ERR); - } else if(e instanceof EncodingException ) { - callbackContext.error(FileUtils.ENCODING_ERR); - } else if(e instanceof TypeMismatchException ) { - callbackContext.error(FileUtils.TYPE_MISMATCH_ERR); - } else if(e instanceof JSONException ) { - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION)); - } else if (e instanceof SecurityException) { - callbackContext.error(FileUtils.SECURITY_ERR); - } else { - e.printStackTrace(); - callbackContext.error(FileUtils.UNKNOWN_ERR); - } - } - } - }); - } - - /** - * Allows the user to look up the Entry for a file or directory referred to by a local URI. - * - * @param uriString of the file/directory to look up - * @return a JSONObject representing a Entry from the filesystem - * @throws MalformedURLException if the url is not valid - * @throws FileNotFoundException if the file does not exist - * @throws IOException if the user can't read the file - * @throws JSONException - */ - private JSONObject resolveLocalFileSystemURI(String uriString) throws IOException, JSONException { - if (uriString == null) { - throw new MalformedURLException("Unrecognized filesystem URL"); - } - Uri uri = Uri.parse(uriString); - boolean isNativeUri = false; - - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(uri); - if (inputURL == null) { - /* Check for file://, content:// urls */ - inputURL = resolveNativeUri(uri); - isNativeUri = true; - } - - try { - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - if (fs.exists(inputURL)) { - if (!isNativeUri) { - // If not already resolved as native URI, resolve to a native URI and back to - // fix the terminating slash based on whether the entry is a directory or file. - inputURL = fs.toLocalUri(fs.toNativeUri(inputURL)); - } - - return fs.getEntryForLocalURL(inputURL); - } - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - throw new FileNotFoundException(); - } - - /** - * Read the list of files from this directory. - * - * @return a JSONArray containing JSONObjects that represent Entry objects. - * @throws FileNotFoundException if the directory is not found. - * @throws JSONException - * @throws MalformedURLException - */ - private JSONArray readEntries(String baseURLstr) throws FileNotFoundException, JSONException, MalformedURLException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(baseURLstr); - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - return fs.readEntriesAtLocalURL(inputURL); - - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - } - - /** - * A setup method that handles the move/copy of files/directories - * - * @param newName for the file directory to be called, if null use existing file name - * @param move if false do a copy, if true do a move - * @return a Entry object - * @throws NoModificationAllowedException - * @throws IOException - * @throws InvalidModificationException - * @throws EncodingException - * @throws JSONException - * @throws FileExistsException - */ - private JSONObject transferTo(String srcURLstr, String destURLstr, String newName, boolean move) throws JSONException, NoModificationAllowedException, IOException, InvalidModificationException, EncodingException, FileExistsException { - if (srcURLstr == null || destURLstr == null) { - // either no source or no destination provided - throw new FileNotFoundException(); - } - - LocalFilesystemURL srcURL = LocalFilesystemURL.parse(srcURLstr); - LocalFilesystemURL destURL = LocalFilesystemURL.parse(destURLstr); - - Filesystem srcFs = this.filesystemForURL(srcURL); - Filesystem destFs = this.filesystemForURL(destURL); - - // Check for invalid file name - if (newName != null && newName.contains(":")) { - throw new EncodingException("Bad file name"); - } - - return destFs.copyFileToURL(destURL, newName, srcFs, srcURL, move); - } - - /** - * Deletes a directory and all of its contents, if any. In the event of an error - * [e.g. trying to delete a directory that contains a file that cannot be removed], - * some of the contents of the directory may be deleted. - * It is an error to attempt to delete the root directory of a filesystem. - * - * @return a boolean representing success of failure - * @throws FileExistsException - * @throws NoModificationAllowedException - * @throws MalformedURLException - */ - private boolean removeRecursively(String baseURLstr) throws FileExistsException, NoModificationAllowedException, MalformedURLException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(baseURLstr); - // You can't delete the root directory. - if ("".equals(inputURL.path) || "/".equals(inputURL.path)) { - throw new NoModificationAllowedException("You can't delete the root directory"); - } - - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - return fs.recursiveRemoveFileAtLocalURL(inputURL); - - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - } - - - /** - * Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. - * It is an error to attempt to delete the root directory of a filesystem. - * - * @return a boolean representing success of failure - * @throws NoModificationAllowedException - * @throws InvalidModificationException - * @throws MalformedURLException - */ - private boolean remove(String baseURLstr) throws NoModificationAllowedException, InvalidModificationException, MalformedURLException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(baseURLstr); - // You can't delete the root directory. - if ("".equals(inputURL.path) || "/".equals(inputURL.path)) { - - throw new NoModificationAllowedException("You can't delete the root directory"); - } - - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - return fs.removeFileAtLocalURL(inputURL); - - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - } - - /** - * Creates or looks up a file. - * - * @param baseURLstr base directory - * @param path file/directory to lookup or create - * @param options specify whether to create or not - * @param directory if true look up directory, if false look up file - * @return a Entry object - * @throws FileExistsException - * @throws IOException - * @throws TypeMismatchException - * @throws EncodingException - * @throws JSONException - */ - private JSONObject getFile(String baseURLstr, String path, JSONObject options, boolean directory) throws FileExistsException, IOException, TypeMismatchException, EncodingException, JSONException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(baseURLstr); - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - return fs.getFileForLocalURL(inputURL, path, options, directory); - - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - - } - - /** - * Look up the parent DirectoryEntry containing this Entry. - * If this Entry is the root of its filesystem, its parent is itself. - */ - private JSONObject getParent(String baseURLstr) throws JSONException, IOException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(baseURLstr); - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - return fs.getParentForLocalURL(inputURL); - - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - } - - /** - * Returns a File that represents the current state of the file that this FileEntry represents. - * - * @return returns a JSONObject represent a W3C File object - */ - private JSONObject getFileMetadata(String baseURLstr) throws FileNotFoundException, JSONException, MalformedURLException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(baseURLstr); - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - return fs.getFileMetadataForLocalURL(inputURL); - - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - } - - /** - * Requests a filesystem in which to store application data. - * - * @param type of file system requested - * @param requiredSize required free space in the file system in bytes - * @param callbackContext context for returning the result or error - * @throws JSONException - */ - private void requestFileSystem(int type, long requiredSize, final CallbackContext callbackContext) throws JSONException { - Filesystem rootFs = null; - try { - rootFs = this.filesystems.get(type); - } catch (ArrayIndexOutOfBoundsException e) { - // Pass null through - } - if (rootFs == null) { - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, FileUtils.NOT_FOUND_ERR)); - } else { - // If a nonzero required size was specified, check that the retrieved filesystem has enough free space. - long availableSize = 0; - if (requiredSize > 0) { - availableSize = rootFs.getFreeSpaceInBytes(); - } - - if (availableSize < requiredSize) { - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, FileUtils.QUOTA_EXCEEDED_ERR)); - } else { - JSONObject fs = new JSONObject(); - fs.put("name", rootFs.name); - fs.put("root", rootFs.getRootEntry()); - callbackContext.success(fs); - } - } - } - - /** - * Requests a filesystem in which to store application data. - * - * @return a JSONObject representing the file system - */ - private JSONArray requestAllFileSystems() throws IOException, JSONException { - JSONArray ret = new JSONArray(); - for (Filesystem fs : filesystems) { - ret.put(fs.getRootEntry()); - } - return ret; - } - - private static String toDirUrl(File f) { - return Uri.fromFile(f).toString() + '/'; - } - - private JSONObject requestAllPaths() throws JSONException { - Context context = cordova.getActivity(); - JSONObject ret = new JSONObject(); - ret.put("applicationDirectory", "file:///android_asset/"); - ret.put("applicationStorageDirectory", toDirUrl(context.getFilesDir().getParentFile())); - ret.put("dataDirectory", toDirUrl(context.getFilesDir())); - ret.put("cacheDirectory", toDirUrl(context.getCacheDir())); - if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { - try { - ret.put("externalApplicationStorageDirectory", toDirUrl(context.getExternalFilesDir(null).getParentFile())); - ret.put("externalDataDirectory", toDirUrl(context.getExternalFilesDir(null))); - ret.put("externalCacheDirectory", toDirUrl(context.getExternalCacheDir())); - ret.put("externalRootDirectory", toDirUrl(Environment.getExternalStorageDirectory())); - } - catch(NullPointerException e) { - /* If external storage is unavailable, context.getExternal* returns null */ - LOG.d(LOG_TAG, "Unable to access these paths, most liklely due to USB storage"); - } - } - return ret; - } - - /** - * Returns a JSON object representing the given File. Internal APIs should be modified - * to use URLs instead of raw FS paths wherever possible, when interfacing with this plugin. - * - * @param file the File to convert - * @return a JSON representation of the given File - * @throws JSONException - */ - public JSONObject getEntryForFile(File file) throws JSONException { - JSONObject entry; - - for (Filesystem fs : filesystems) { - entry = fs.makeEntryForFile(file); - if (entry != null) { - return entry; - } - } - return null; - } - - /** - * Returns a JSON object representing the given File. Deprecated, as this is only used by - * FileTransfer, and because it is a static method that should really be an instance method, - * since it depends on the actual filesystem roots in use. Internal APIs should be modified - * to use URLs instead of raw FS paths wherever possible, when interfacing with this plugin. - * - * @param file the File to convert - * @return a JSON representation of the given File - * @throws JSONException - */ - @Deprecated - public static JSONObject getEntry(File file) throws JSONException { - if (getFilePlugin() != null) { - return getFilePlugin().getEntryForFile(file); - } - return null; - } - - /** - * Read the contents of a file. - * This is done in a background thread; the result is sent to the callback. - * - * @param start Start position in the file. - * @param end End position to stop at (exclusive). - * @param callbackContext The context through which to send the result. - * @param encoding The encoding to return contents as. Typical value is UTF-8. (see http://www.iana.org/assignments/character-sets) - * @param resultType The desired type of data to send to the callback. - * @return Contents of file. - */ - public void readFileAs(final String srcURLstr, final int start, final int end, final CallbackContext callbackContext, final String encoding, final int resultType) throws MalformedURLException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(srcURLstr); - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - - fs.readFileAtURL(inputURL, start, end, new Filesystem.ReadFileCallback() { - public void handleData(InputStream inputStream, String contentType) { - try { - ByteArrayOutputStream os = new ByteArrayOutputStream(); - final int BUFFER_SIZE = 8192; - byte[] buffer = new byte[BUFFER_SIZE]; - - for (;;) { - int bytesRead = inputStream.read(buffer, 0, BUFFER_SIZE); - - if (bytesRead <= 0) { - break; - } - os.write(buffer, 0, bytesRead); - } - - PluginResult result; - switch (resultType) { - case PluginResult.MESSAGE_TYPE_STRING: - result = new PluginResult(PluginResult.Status.OK, os.toString(encoding)); - break; - case PluginResult.MESSAGE_TYPE_ARRAYBUFFER: - result = new PluginResult(PluginResult.Status.OK, os.toByteArray()); - break; - case PluginResult.MESSAGE_TYPE_BINARYSTRING: - result = new PluginResult(PluginResult.Status.OK, os.toByteArray(), true); - break; - default: // Base64. - byte[] base64 = Base64.encode(os.toByteArray(), Base64.NO_WRAP); - String s = "data:" + contentType + ";base64," + new String(base64, "US-ASCII"); - result = new PluginResult(PluginResult.Status.OK, s); - } - - callbackContext.sendPluginResult(result); - } catch (IOException e) { - LOG.d(LOG_TAG, e.getLocalizedMessage()); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, NOT_READABLE_ERR)); - } - } - }); - - - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } catch (FileNotFoundException e) { - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, NOT_FOUND_ERR)); - } catch (IOException e) { - LOG.d(LOG_TAG, e.getLocalizedMessage()); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, NOT_READABLE_ERR)); - } - } - - - /** - * Write contents of file. - * - * @param data The contents of the file. - * @param offset The position to begin writing the file. - * @param isBinary True if the file contents are base64-encoded binary data - */ - /**/ - public long write(String srcURLstr, String data, int offset, boolean isBinary) throws FileNotFoundException, IOException, NoModificationAllowedException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(srcURLstr); - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - - long x = fs.writeToFileAtURL(inputURL, data, offset, isBinary); LOG.d("TEST",srcURLstr + ": "+x); return x; - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - - } - - /** - * Truncate the file to size - */ - private long truncateFile(String srcURLstr, long size) throws FileNotFoundException, IOException, NoModificationAllowedException { - try { - LocalFilesystemURL inputURL = LocalFilesystemURL.parse(srcURLstr); - Filesystem fs = this.filesystemForURL(inputURL); - if (fs == null) { - throw new MalformedURLException("No installed handlers for this URL"); - } - - return fs.truncateFileAtURL(inputURL, size); - } catch (IllegalArgumentException e) { - MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); - mue.initCause(e); - throw mue; - } - } - - - /* - * Handle the response - */ - - public void onRequestPermissionResult(int requestCode, String[] permissions, - int[] grantResults) throws JSONException { - - final PendingRequests.Request req = pendingRequests.getAndRemove(requestCode); - if (req != null) { - for(int r:grantResults) - { - if(r == PackageManager.PERMISSION_DENIED) - { - req.getCallbackContext().sendPluginResult(new PluginResult(PluginResult.Status.ERROR, SECURITY_ERR)); - return; - } - } - switch(req.getAction()) - { - case ACTION_GET_FILE: - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws FileExistsException, IOException, TypeMismatchException, EncodingException, JSONException { - String dirname = args.getString(0); - - String path = args.getString(1); - JSONObject obj = getFile(dirname, path, args.optJSONObject(2), false); - req.getCallbackContext().success(obj); - } - }, req.getRawArgs(), req.getCallbackContext()); - break; - case ACTION_GET_DIRECTORY: - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws FileExistsException, IOException, TypeMismatchException, EncodingException, JSONException { - String dirname = args.getString(0); - - String path = args.getString(1); - JSONObject obj = getFile(dirname, path, args.optJSONObject(2), true); - req.getCallbackContext().success(obj); - } - }, req.getRawArgs(), req.getCallbackContext()); - break; - case ACTION_WRITE: - threadhelper( new FileOp( ){ - public void run(JSONArray args) throws JSONException, FileNotFoundException, IOException, NoModificationAllowedException { - String fname=args.getString(0); - String data=args.getString(1); - int offset=args.getInt(2); - Boolean isBinary=args.getBoolean(3); - long fileSize = write(fname, data, offset, isBinary); - req.getCallbackContext().sendPluginResult(new PluginResult(PluginResult.Status.OK, fileSize)); - } - }, req.getRawArgs(), req.getCallbackContext()); - break; - } - } else { - LOG.d(LOG_TAG, "Received permission callback for unknown request code"); - } - } -} diff --git a/plugins/cordova-plugin-file/src/android/Filesystem.java b/plugins/cordova-plugin-file/src/android/Filesystem.java deleted file mode 100644 index c69d3bdd0..000000000 --- a/plugins/cordova-plugin-file/src/android/Filesystem.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -package org.apache.cordova.file; - -import android.net.Uri; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FilterInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.Arrays; - -import org.apache.cordova.CordovaResourceApi; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public abstract class Filesystem { - - protected final Uri rootUri; - protected final CordovaResourceApi resourceApi; - public final String name; - private JSONObject rootEntry; - - public Filesystem(Uri rootUri, String name, CordovaResourceApi resourceApi) { - this.rootUri = rootUri; - this.name = name; - this.resourceApi = resourceApi; - } - - public interface ReadFileCallback { - public void handleData(InputStream inputStream, String contentType) throws IOException; - } - - public static JSONObject makeEntryForURL(LocalFilesystemURL inputURL, Uri nativeURL) { - try { - String path = inputURL.path; - int end = path.endsWith("/") ? 1 : 0; - String[] parts = path.substring(0, path.length() - end).split("/+"); - String fileName = parts[parts.length - 1]; - - JSONObject entry = new JSONObject(); - entry.put("isFile", !inputURL.isDirectory); - entry.put("isDirectory", inputURL.isDirectory); - entry.put("name", fileName); - entry.put("fullPath", path); - // The file system can't be specified, as it would lead to an infinite loop, - // but the filesystem name can be. - entry.put("filesystemName", inputURL.fsName); - // Backwards compatibility - entry.put("filesystem", "temporary".equals(inputURL.fsName) ? 0 : 1); - - String nativeUrlStr = nativeURL.toString(); - if (inputURL.isDirectory && !nativeUrlStr.endsWith("/")) { - nativeUrlStr += "/"; - } - entry.put("nativeURL", nativeUrlStr); - return entry; - } catch (JSONException e) { - e.printStackTrace(); - throw new RuntimeException(e); - } - } - - public JSONObject makeEntryForURL(LocalFilesystemURL inputURL) { - Uri nativeUri = toNativeUri(inputURL); - return nativeUri == null ? null : makeEntryForURL(inputURL, nativeUri); - } - - public JSONObject makeEntryForNativeUri(Uri nativeUri) { - LocalFilesystemURL inputUrl = toLocalUri(nativeUri); - return inputUrl == null ? null : makeEntryForURL(inputUrl, nativeUri); - } - - public JSONObject getEntryForLocalURL(LocalFilesystemURL inputURL) throws IOException { - return makeEntryForURL(inputURL); - } - - public JSONObject makeEntryForFile(File file) { - return makeEntryForNativeUri(Uri.fromFile(file)); - } - - abstract JSONObject getFileForLocalURL(LocalFilesystemURL inputURL, String path, - JSONObject options, boolean directory) throws FileExistsException, IOException, TypeMismatchException, EncodingException, JSONException; - - abstract boolean removeFileAtLocalURL(LocalFilesystemURL inputURL) throws InvalidModificationException, NoModificationAllowedException; - - abstract boolean recursiveRemoveFileAtLocalURL(LocalFilesystemURL inputURL) throws FileExistsException, NoModificationAllowedException; - - abstract LocalFilesystemURL[] listChildren(LocalFilesystemURL inputURL) throws FileNotFoundException; - - public final JSONArray readEntriesAtLocalURL(LocalFilesystemURL inputURL) throws FileNotFoundException { - LocalFilesystemURL[] children = listChildren(inputURL); - JSONArray entries = new JSONArray(); - if (children != null) { - for (LocalFilesystemURL url : children) { - entries.put(makeEntryForURL(url)); - } - } - return entries; - } - - abstract JSONObject getFileMetadataForLocalURL(LocalFilesystemURL inputURL) throws FileNotFoundException; - - public Uri getRootUri() { - return rootUri; - } - - public boolean exists(LocalFilesystemURL inputURL) { - try { - getFileMetadataForLocalURL(inputURL); - } catch (FileNotFoundException e) { - return false; - } - return true; - } - - public Uri nativeUriForFullPath(String fullPath) { - Uri ret = null; - if (fullPath != null) { - String encodedPath = Uri.fromFile(new File(fullPath)).getEncodedPath(); - if (encodedPath.startsWith("/")) { - encodedPath = encodedPath.substring(1); - } - ret = rootUri.buildUpon().appendEncodedPath(encodedPath).build(); - } - return ret; - } - - public LocalFilesystemURL localUrlforFullPath(String fullPath) { - Uri nativeUri = nativeUriForFullPath(fullPath); - if (nativeUri != null) { - return toLocalUri(nativeUri); - } - return null; - } - - /** - * Removes multiple repeated //s, and collapses processes ../s. - */ - protected static String normalizePath(String rawPath) { - // If this is an absolute path, trim the leading "/" and replace it later - boolean isAbsolutePath = rawPath.startsWith("/"); - if (isAbsolutePath) { - rawPath = rawPath.replaceFirst("/+", ""); - } - ArrayList components = new ArrayList(Arrays.asList(rawPath.split("/+"))); - for (int index = 0; index < components.size(); ++index) { - if (components.get(index).equals("..")) { - components.remove(index); - if (index > 0) { - components.remove(index-1); - --index; - } - } - } - StringBuilder normalizedPath = new StringBuilder(); - for(String component: components) { - normalizedPath.append("/"); - normalizedPath.append(component); - } - if (isAbsolutePath) { - return normalizedPath.toString(); - } else { - return normalizedPath.toString().substring(1); - } - } - - /** - * Gets the free space in bytes available on this filesystem. - * Subclasses may override this method to return nonzero free space. - */ - public long getFreeSpaceInBytes() { - return 0; - } - - public abstract Uri toNativeUri(LocalFilesystemURL inputURL); - public abstract LocalFilesystemURL toLocalUri(Uri inputURL); - - public JSONObject getRootEntry() { - if (rootEntry == null) { - rootEntry = makeEntryForNativeUri(rootUri); - } - return rootEntry; - } - - public JSONObject getParentForLocalURL(LocalFilesystemURL inputURL) throws IOException { - Uri parentUri = inputURL.uri; - String parentPath = new File(inputURL.uri.getPath()).getParent(); - if (!"/".equals(parentPath)) { - parentUri = inputURL.uri.buildUpon().path(parentPath + '/').build(); - } - return getEntryForLocalURL(LocalFilesystemURL.parse(parentUri)); - } - - protected LocalFilesystemURL makeDestinationURL(String newName, LocalFilesystemURL srcURL, LocalFilesystemURL destURL, boolean isDirectory) { - // I know this looks weird but it is to work around a JSON bug. - if ("null".equals(newName) || "".equals(newName)) { - newName = srcURL.uri.getLastPathSegment();; - } - - String newDest = destURL.uri.toString(); - if (newDest.endsWith("/")) { - newDest = newDest + newName; - } else { - newDest = newDest + "/" + newName; - } - if (isDirectory) { - newDest += '/'; - } - return LocalFilesystemURL.parse(newDest); - } - - /* Read a source URL (possibly from a different filesystem, srcFs,) and copy it to - * the destination URL on this filesystem, optionally with a new filename. - * If move is true, then this method should either perform an atomic move operation - * or remove the source file when finished. - */ - public JSONObject copyFileToURL(LocalFilesystemURL destURL, String newName, - Filesystem srcFs, LocalFilesystemURL srcURL, boolean move) throws IOException, InvalidModificationException, JSONException, NoModificationAllowedException, FileExistsException { - // First, check to see that we can do it - if (move && !srcFs.canRemoveFileAtLocalURL(srcURL)) { - throw new NoModificationAllowedException("Cannot move file at source URL"); - } - final LocalFilesystemURL destination = makeDestinationURL(newName, srcURL, destURL, srcURL.isDirectory); - - Uri srcNativeUri = srcFs.toNativeUri(srcURL); - - CordovaResourceApi.OpenForReadResult ofrr = resourceApi.openForRead(srcNativeUri); - OutputStream os = null; - try { - os = getOutputStreamForURL(destination); - } catch (IOException e) { - ofrr.inputStream.close(); - throw e; - } - // Closes streams. - resourceApi.copyResource(ofrr, os); - - if (move) { - srcFs.removeFileAtLocalURL(srcURL); - } - return getEntryForLocalURL(destination); - } - - public OutputStream getOutputStreamForURL(LocalFilesystemURL inputURL) throws IOException { - return resourceApi.openOutputStream(toNativeUri(inputURL)); - } - - public void readFileAtURL(LocalFilesystemURL inputURL, long start, long end, - ReadFileCallback readFileCallback) throws IOException { - CordovaResourceApi.OpenForReadResult ofrr = resourceApi.openForRead(toNativeUri(inputURL)); - if (end < 0) { - end = ofrr.length; - } - long numBytesToRead = end - start; - try { - if (start > 0) { - ofrr.inputStream.skip(start); - } - InputStream inputStream = ofrr.inputStream; - if (end < ofrr.length) { - inputStream = new LimitedInputStream(inputStream, numBytesToRead); - } - readFileCallback.handleData(inputStream, ofrr.mimeType); - } finally { - ofrr.inputStream.close(); - } - } - - abstract long writeToFileAtURL(LocalFilesystemURL inputURL, String data, int offset, - boolean isBinary) throws NoModificationAllowedException, IOException; - - abstract long truncateFileAtURL(LocalFilesystemURL inputURL, long size) - throws IOException, NoModificationAllowedException; - - // This method should return null if filesystem urls cannot be mapped to paths - abstract String filesystemPathForURL(LocalFilesystemURL url); - - abstract LocalFilesystemURL URLforFilesystemPath(String path); - - abstract boolean canRemoveFileAtLocalURL(LocalFilesystemURL inputURL); - - protected class LimitedInputStream extends FilterInputStream { - long numBytesToRead; - public LimitedInputStream(InputStream in, long numBytesToRead) { - super(in); - this.numBytesToRead = numBytesToRead; - } - @Override - public int read() throws IOException { - if (numBytesToRead <= 0) { - return -1; - } - numBytesToRead--; - return in.read(); - } - @Override - public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { - if (numBytesToRead <= 0) { - return -1; - } - int bytesToRead = byteCount; - if (byteCount > numBytesToRead) { - bytesToRead = (int)numBytesToRead; // Cast okay; long is less than int here. - } - int numBytesRead = in.read(buffer, byteOffset, bytesToRead); - numBytesToRead -= numBytesRead; - return numBytesRead; - } - } -} diff --git a/plugins/cordova-plugin-file/src/android/InvalidModificationException.java b/plugins/cordova-plugin-file/src/android/InvalidModificationException.java deleted file mode 100644 index 8f6bec59c..000000000 --- a/plugins/cordova-plugin-file/src/android/InvalidModificationException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - - -package org.apache.cordova.file; - -@SuppressWarnings("serial") -public class InvalidModificationException extends Exception { - - public InvalidModificationException(String message) { - super(message); - } - -} diff --git a/plugins/cordova-plugin-file/src/android/LocalFilesystem.java b/plugins/cordova-plugin-file/src/android/LocalFilesystem.java deleted file mode 100644 index 051f99496..000000000 --- a/plugins/cordova-plugin-file/src/android/LocalFilesystem.java +++ /dev/null @@ -1,513 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -package org.apache.cordova.file; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.RandomAccessFile; -import java.nio.channels.FileChannel; -import org.apache.cordova.CordovaResourceApi; -import org.json.JSONException; -import org.json.JSONObject; - -import android.os.Build; -import android.os.Environment; -import android.util.Base64; -import android.net.Uri; -import android.content.Context; -import android.content.Intent; - -import java.nio.charset.Charset; - -public class LocalFilesystem extends Filesystem { - private final Context context; - - public LocalFilesystem(String name, Context context, CordovaResourceApi resourceApi, File fsRoot) { - super(Uri.fromFile(fsRoot).buildUpon().appendEncodedPath("").build(), name, resourceApi); - this.context = context; - } - - public String filesystemPathForFullPath(String fullPath) { - return new File(rootUri.getPath(), fullPath).toString(); - } - - @Override - public String filesystemPathForURL(LocalFilesystemURL url) { - return filesystemPathForFullPath(url.path); - } - - private String fullPathForFilesystemPath(String absolutePath) { - if (absolutePath != null && absolutePath.startsWith(rootUri.getPath())) { - return absolutePath.substring(rootUri.getPath().length() - 1); - } - return null; - } - - @Override - public Uri toNativeUri(LocalFilesystemURL inputURL) { - return nativeUriForFullPath(inputURL.path); - } - - @Override - public LocalFilesystemURL toLocalUri(Uri inputURL) { - if (!"file".equals(inputURL.getScheme())) { - return null; - } - File f = new File(inputURL.getPath()); - // Removes and duplicate /s (e.g. file:///a//b/c) - Uri resolvedUri = Uri.fromFile(f); - String rootUriNoTrailingSlash = rootUri.getEncodedPath(); - rootUriNoTrailingSlash = rootUriNoTrailingSlash.substring(0, rootUriNoTrailingSlash.length() - 1); - if (!resolvedUri.getEncodedPath().startsWith(rootUriNoTrailingSlash)) { - return null; - } - String subPath = resolvedUri.getEncodedPath().substring(rootUriNoTrailingSlash.length()); - // Strip leading slash - if (!subPath.isEmpty()) { - subPath = subPath.substring(1); - } - Uri.Builder b = new Uri.Builder() - .scheme(LocalFilesystemURL.FILESYSTEM_PROTOCOL) - .authority("localhost") - .path(name); - if (!subPath.isEmpty()) { - b.appendEncodedPath(subPath); - } - if (f.isDirectory()) { - // Add trailing / for directories. - b.appendEncodedPath(""); - } - return LocalFilesystemURL.parse(b.build()); - } - - @Override - public LocalFilesystemURL URLforFilesystemPath(String path) { - return localUrlforFullPath(fullPathForFilesystemPath(path)); - } - - @Override - public JSONObject getFileForLocalURL(LocalFilesystemURL inputURL, - String path, JSONObject options, boolean directory) throws FileExistsException, IOException, TypeMismatchException, EncodingException, JSONException { - boolean create = false; - boolean exclusive = false; - - if (options != null) { - create = options.optBoolean("create"); - if (create) { - exclusive = options.optBoolean("exclusive"); - } - } - - // Check for a ":" character in the file to line up with BB and iOS - if (path.contains(":")) { - throw new EncodingException("This path has an invalid \":\" in it."); - } - - LocalFilesystemURL requestedURL; - - // Check whether the supplied path is absolute or relative - if (directory && !path.endsWith("/")) { - path += "/"; - } - if (path.startsWith("/")) { - requestedURL = localUrlforFullPath(normalizePath(path)); - } else { - requestedURL = localUrlforFullPath(normalizePath(inputURL.path + "/" + path)); - } - - File fp = new File(this.filesystemPathForURL(requestedURL)); - - if (create) { - if (exclusive && fp.exists()) { - throw new FileExistsException("create/exclusive fails"); - } - if (directory) { - fp.mkdir(); - } else { - fp.createNewFile(); - } - if (!fp.exists()) { - throw new FileExistsException("create fails"); - } - } - else { - if (!fp.exists()) { - throw new FileNotFoundException("path does not exist"); - } - if (directory) { - if (fp.isFile()) { - throw new TypeMismatchException("path doesn't exist or is file"); - } - } else { - if (fp.isDirectory()) { - throw new TypeMismatchException("path doesn't exist or is directory"); - } - } - } - - // Return the directory - return makeEntryForURL(requestedURL); - } - - @Override - public boolean removeFileAtLocalURL(LocalFilesystemURL inputURL) throws InvalidModificationException { - - File fp = new File(filesystemPathForURL(inputURL)); - - // You can't delete a directory that is not empty - if (fp.isDirectory() && fp.list().length > 0) { - throw new InvalidModificationException("You can't delete a directory that is not empty."); - } - - return fp.delete(); - } - - @Override - public boolean exists(LocalFilesystemURL inputURL) { - File fp = new File(filesystemPathForURL(inputURL)); - return fp.exists(); - } - - @Override - public long getFreeSpaceInBytes() { - return DirectoryManager.getFreeSpaceInBytes(rootUri.getPath()); - } - - @Override - public boolean recursiveRemoveFileAtLocalURL(LocalFilesystemURL inputURL) throws FileExistsException { - File directory = new File(filesystemPathForURL(inputURL)); - return removeDirRecursively(directory); - } - - protected boolean removeDirRecursively(File directory) throws FileExistsException { - if (directory.isDirectory()) { - for (File file : directory.listFiles()) { - removeDirRecursively(file); - } - } - - if (!directory.delete()) { - throw new FileExistsException("could not delete: " + directory.getName()); - } else { - return true; - } - } - - @Override - public LocalFilesystemURL[] listChildren(LocalFilesystemURL inputURL) throws FileNotFoundException { - File fp = new File(filesystemPathForURL(inputURL)); - - if (!fp.exists()) { - // The directory we are listing doesn't exist so we should fail. - throw new FileNotFoundException(); - } - - File[] files = fp.listFiles(); - if (files == null) { - // inputURL is a directory - return null; - } - LocalFilesystemURL[] entries = new LocalFilesystemURL[files.length]; - for (int i = 0; i < files.length; i++) { - entries[i] = URLforFilesystemPath(files[i].getPath()); - } - - return entries; - } - - @Override - public JSONObject getFileMetadataForLocalURL(LocalFilesystemURL inputURL) throws FileNotFoundException { - File file = new File(filesystemPathForURL(inputURL)); - - if (!file.exists()) { - throw new FileNotFoundException("File at " + inputURL.uri + " does not exist."); - } - - JSONObject metadata = new JSONObject(); - try { - // Ensure that directories report a size of 0 - metadata.put("size", file.isDirectory() ? 0 : file.length()); - metadata.put("type", resourceApi.getMimeType(Uri.fromFile(file))); - metadata.put("name", file.getName()); - metadata.put("fullPath", inputURL.path); - metadata.put("lastModifiedDate", file.lastModified()); - } catch (JSONException e) { - return null; - } - return metadata; - } - - private void copyFile(Filesystem srcFs, LocalFilesystemURL srcURL, File destFile, boolean move) throws IOException, InvalidModificationException, NoModificationAllowedException { - if (move) { - String realSrcPath = srcFs.filesystemPathForURL(srcURL); - if (realSrcPath != null) { - File srcFile = new File(realSrcPath); - if (srcFile.renameTo(destFile)) { - return; - } - // Trying to rename the file failed. Possibly because we moved across file system on the device. - } - } - - CordovaResourceApi.OpenForReadResult offr = resourceApi.openForRead(srcFs.toNativeUri(srcURL)); - copyResource(offr, new FileOutputStream(destFile)); - - if (move) { - srcFs.removeFileAtLocalURL(srcURL); - } - } - - private void copyDirectory(Filesystem srcFs, LocalFilesystemURL srcURL, File dstDir, boolean move) throws IOException, NoModificationAllowedException, InvalidModificationException, FileExistsException { - if (move) { - String realSrcPath = srcFs.filesystemPathForURL(srcURL); - if (realSrcPath != null) { - File srcDir = new File(realSrcPath); - // If the destination directory already exists and is empty then delete it. This is according to spec. - if (dstDir.exists()) { - if (dstDir.list().length > 0) { - throw new InvalidModificationException("directory is not empty"); - } - dstDir.delete(); - } - // Try to rename the directory - if (srcDir.renameTo(dstDir)) { - return; - } - // Trying to rename the file failed. Possibly because we moved across file system on the device. - } - } - - if (dstDir.exists()) { - if (dstDir.list().length > 0) { - throw new InvalidModificationException("directory is not empty"); - } - } else { - if (!dstDir.mkdir()) { - // If we can't create the directory then fail - throw new NoModificationAllowedException("Couldn't create the destination directory"); - } - } - - LocalFilesystemURL[] children = srcFs.listChildren(srcURL); - for (LocalFilesystemURL childLocalUrl : children) { - File target = new File(dstDir, new File(childLocalUrl.path).getName()); - if (childLocalUrl.isDirectory) { - copyDirectory(srcFs, childLocalUrl, target, false); - } else { - copyFile(srcFs, childLocalUrl, target, false); - } - } - - if (move) { - srcFs.recursiveRemoveFileAtLocalURL(srcURL); - } - } - - @Override - public JSONObject copyFileToURL(LocalFilesystemURL destURL, String newName, - Filesystem srcFs, LocalFilesystemURL srcURL, boolean move) throws IOException, InvalidModificationException, JSONException, NoModificationAllowedException, FileExistsException { - - // Check to see if the destination directory exists - String newParent = this.filesystemPathForURL(destURL); - File destinationDir = new File(newParent); - if (!destinationDir.exists()) { - // The destination does not exist so we should fail. - throw new FileNotFoundException("The source does not exist"); - } - - // Figure out where we should be copying to - final LocalFilesystemURL destinationURL = makeDestinationURL(newName, srcURL, destURL, srcURL.isDirectory); - - Uri dstNativeUri = toNativeUri(destinationURL); - Uri srcNativeUri = srcFs.toNativeUri(srcURL); - // Check to see if source and destination are the same file - if (dstNativeUri.equals(srcNativeUri)) { - throw new InvalidModificationException("Can't copy onto itself"); - } - - if (move && !srcFs.canRemoveFileAtLocalURL(srcURL)) { - throw new InvalidModificationException("Source URL is read-only (cannot move)"); - } - - File destFile = new File(dstNativeUri.getPath()); - if (destFile.exists()) { - if (!srcURL.isDirectory && destFile.isDirectory()) { - throw new InvalidModificationException("Can't copy/move a file to an existing directory"); - } else if (srcURL.isDirectory && destFile.isFile()) { - throw new InvalidModificationException("Can't copy/move a directory to an existing file"); - } - } - - if (srcURL.isDirectory) { - // E.g. Copy /sdcard/myDir to /sdcard/myDir/backup - if (dstNativeUri.toString().startsWith(srcNativeUri.toString() + '/')) { - throw new InvalidModificationException("Can't copy directory into itself"); - } - copyDirectory(srcFs, srcURL, destFile, move); - } else { - copyFile(srcFs, srcURL, destFile, move); - } - return makeEntryForURL(destinationURL); - } - - @Override - public long writeToFileAtURL(LocalFilesystemURL inputURL, String data, - int offset, boolean isBinary) throws IOException, NoModificationAllowedException { - - boolean append = false; - if (offset > 0) { - this.truncateFileAtURL(inputURL, offset); - append = true; - } - - byte[] rawData; - if (isBinary) { - rawData = Base64.decode(data, Base64.DEFAULT); - } else { - rawData = data.getBytes(Charset.defaultCharset()); - } - ByteArrayInputStream in = new ByteArrayInputStream(rawData); - try - { - byte buff[] = new byte[rawData.length]; - String absolutePath = filesystemPathForURL(inputURL); - FileOutputStream out = new FileOutputStream(absolutePath, append); - try { - in.read(buff, 0, buff.length); - out.write(buff, 0, rawData.length); - out.flush(); - } finally { - // Always close the output - out.close(); - } - if (isPublicDirectory(absolutePath)) { - broadcastNewFile(Uri.fromFile(new File(absolutePath))); - } - } - catch (NullPointerException e) - { - // This is a bug in the Android implementation of the Java Stack - NoModificationAllowedException realException = new NoModificationAllowedException(inputURL.toString()); - realException.initCause(e); - throw realException; - } - - return rawData.length; - } - - private boolean isPublicDirectory(String absolutePath) { - // TODO: should expose a way to scan app's private files (maybe via a flag). - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - // Lollipop has a bug where SD cards are null. - for (File f : context.getExternalMediaDirs()) { - if(f != null && absolutePath.startsWith(f.getAbsolutePath())) { - return true; - } - } - } - - String extPath = Environment.getExternalStorageDirectory().getAbsolutePath(); - return absolutePath.startsWith(extPath); - } - - /** - * Send broadcast of new file so files appear over MTP - */ - private void broadcastNewFile(Uri nativeUri) { - Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, nativeUri); - context.sendBroadcast(intent); - } - - @Override - public long truncateFileAtURL(LocalFilesystemURL inputURL, long size) throws IOException { - File file = new File(filesystemPathForURL(inputURL)); - - if (!file.exists()) { - throw new FileNotFoundException("File at " + inputURL.uri + " does not exist."); - } - - RandomAccessFile raf = new RandomAccessFile(filesystemPathForURL(inputURL), "rw"); - try { - if (raf.length() >= size) { - FileChannel channel = raf.getChannel(); - channel.truncate(size); - return size; - } - - return raf.length(); - } finally { - raf.close(); - } - - - } - - @Override - public boolean canRemoveFileAtLocalURL(LocalFilesystemURL inputURL) { - String path = filesystemPathForURL(inputURL); - File file = new File(path); - return file.exists(); - } - - // This is a copy & paste from CordovaResource API that is required since CordovaResourceApi - // has a bug pre-4.0.0. - // TODO: Once cordova-android@4.0.0 is released, delete this copy and make the plugin depend on - // 4.0.0 with an engine tag. - private static void copyResource(CordovaResourceApi.OpenForReadResult input, OutputStream outputStream) throws IOException { - try { - InputStream inputStream = input.inputStream; - if (inputStream instanceof FileInputStream && outputStream instanceof FileOutputStream) { - FileChannel inChannel = ((FileInputStream)input.inputStream).getChannel(); - FileChannel outChannel = ((FileOutputStream)outputStream).getChannel(); - long offset = 0; - long length = input.length; - if (input.assetFd != null) { - offset = input.assetFd.getStartOffset(); - } - // transferFrom()'s 2nd arg is a relative position. Need to set the absolute - // position first. - inChannel.position(offset); - outChannel.transferFrom(inChannel, 0, length); - } else { - final int BUFFER_SIZE = 8192; - byte[] buffer = new byte[BUFFER_SIZE]; - - for (;;) { - int bytesRead = inputStream.read(buffer, 0, BUFFER_SIZE); - - if (bytesRead <= 0) { - break; - } - outputStream.write(buffer, 0, bytesRead); - } - } - } finally { - input.inputStream.close(); - if (outputStream != null) { - outputStream.close(); - } - } - } -} diff --git a/plugins/cordova-plugin-file/src/android/LocalFilesystemURL.java b/plugins/cordova-plugin-file/src/android/LocalFilesystemURL.java deleted file mode 100644 index b96b6ee49..000000000 --- a/plugins/cordova-plugin-file/src/android/LocalFilesystemURL.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -package org.apache.cordova.file; - -import android.net.Uri; - -public class LocalFilesystemURL { - - public static final String FILESYSTEM_PROTOCOL = "cdvfile"; - - public final Uri uri; - public final String fsName; - public final String path; - public final boolean isDirectory; - - private LocalFilesystemURL(Uri uri, String fsName, String fsPath, boolean isDirectory) { - this.uri = uri; - this.fsName = fsName; - this.path = fsPath; - this.isDirectory = isDirectory; - } - - public static LocalFilesystemURL parse(Uri uri) { - if (!FILESYSTEM_PROTOCOL.equals(uri.getScheme())) { - return null; - } - String path = uri.getPath(); - if (path.length() < 1) { - return null; - } - int firstSlashIdx = path.indexOf('/', 1); - if (firstSlashIdx < 0) { - return null; - } - String fsName = path.substring(1, firstSlashIdx); - path = path.substring(firstSlashIdx); - boolean isDirectory = path.charAt(path.length() - 1) == '/'; - return new LocalFilesystemURL(uri, fsName, path, isDirectory); - } - - public static LocalFilesystemURL parse(String uri) { - return parse(Uri.parse(uri)); - } - - public String toString() { - return uri.toString(); - } -} diff --git a/plugins/cordova-plugin-file/src/android/NoModificationAllowedException.java b/plugins/cordova-plugin-file/src/android/NoModificationAllowedException.java deleted file mode 100644 index 627eafb56..000000000 --- a/plugins/cordova-plugin-file/src/android/NoModificationAllowedException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.file; - -@SuppressWarnings("serial") -public class NoModificationAllowedException extends Exception { - - public NoModificationAllowedException(String message) { - super(message); - } - -} diff --git a/plugins/cordova-plugin-file/src/android/PendingRequests.java b/plugins/cordova-plugin-file/src/android/PendingRequests.java deleted file mode 100644 index 4c75f4231..000000000 --- a/plugins/cordova-plugin-file/src/android/PendingRequests.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ -package org.apache.cordova.file; - -import android.util.SparseArray; - -import org.apache.cordova.CallbackContext; - -/** - * Holds pending runtime permission requests - */ -class PendingRequests { - private int currentReqId = 0; - private SparseArray requests = new SparseArray(); - - /** - * Creates a request and adds it to the array of pending requests. Each created request gets a - * unique result code for use with requestPermission() - * @param rawArgs The raw arguments passed to the plugin - * @param action The action this request corresponds to (get file, etc.) - * @param callbackContext The CallbackContext for this plugin call - * @return The request code that can be used to retrieve the Request object - */ - public synchronized int createRequest(String rawArgs, int action, CallbackContext callbackContext) { - Request req = new Request(rawArgs, action, callbackContext); - requests.put(req.requestCode, req); - return req.requestCode; - } - - /** - * Gets the request corresponding to this request code and removes it from the pending requests - * @param requestCode The request code for the desired request - * @return The request corresponding to the given request code or null if such a - * request is not found - */ - public synchronized Request getAndRemove(int requestCode) { - Request result = requests.get(requestCode); - requests.remove(requestCode); - return result; - } - - /** - * Holds the options and CallbackContext for a call made to the plugin. - */ - public class Request { - - // Unique int used to identify this request in any Android permission callback - private int requestCode; - - // Action to be performed after permission request result - private int action; - - // Raw arguments passed to plugin - private String rawArgs; - - // The callback context for this plugin request - private CallbackContext callbackContext; - - private Request(String rawArgs, int action, CallbackContext callbackContext) { - this.rawArgs = rawArgs; - this.action = action; - this.callbackContext = callbackContext; - this.requestCode = currentReqId ++; - } - - public int getAction() { - return this.action; - } - - public String getRawArgs() { - return rawArgs; - } - - public CallbackContext getCallbackContext() { - return callbackContext; - } - } -} diff --git a/plugins/cordova-plugin-file/src/android/TypeMismatchException.java b/plugins/cordova-plugin-file/src/android/TypeMismatchException.java deleted file mode 100644 index 1315f9a9e..000000000 --- a/plugins/cordova-plugin-file/src/android/TypeMismatchException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - - -package org.apache.cordova.file; - -@SuppressWarnings("serial") -public class TypeMismatchException extends Exception { - - public TypeMismatchException(String message) { - super(message); - } - -} diff --git a/plugins/cordova-plugin-file/src/android/build-extras.gradle b/plugins/cordova-plugin-file/src/android/build-extras.gradle deleted file mode 100644 index a0a7844af..000000000 --- a/plugins/cordova-plugin-file/src/android/build-extras.gradle +++ /dev/null @@ -1,47 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -ext.postBuildExtras = { - def inAssetsDir = file("assets") - def outAssetsDir = inAssetsDir - def outFile = new File(outAssetsDir, "cdvasset.manifest") - - def newTask = task("cdvCreateAssetManifest") << { - def contents = new HashMap() - def sizes = new HashMap() - contents[""] = inAssetsDir.list() - def tree = fileTree(dir: inAssetsDir) - tree.visit { fileDetails -> - if (fileDetails.isDirectory()) { - contents[fileDetails.relativePath.toString()] = fileDetails.file.list() - } else { - sizes[fileDetails.relativePath.toString()] = fileDetails.file.length() - } - } - - outAssetsDir.mkdirs() - outFile.withObjectOutputStream { oos -> - oos.writeObject(contents) - oos.writeObject(sizes) - } - } - newTask.inputs.dir inAssetsDir - newTask.outputs.file outFile - def preBuildTask = tasks["preBuild"] - preBuildTask.dependsOn(newTask) -} diff --git a/plugins/cordova-plugin-file/src/browser/FileProxy.js b/plugins/cordova-plugin-file/src/browser/FileProxy.js deleted file mode 100644 index 17955b686..000000000 --- a/plugins/cordova-plugin-file/src/browser/FileProxy.js +++ /dev/null @@ -1,1059 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -(function () { - /* global require, exports, module */ - /* global FILESYSTEM_PREFIX */ - /* global IDBKeyRange */ - /* global FileReader */ - /* global atob, btoa, Blob */ - - /* Heavily based on https://github.com/ebidel/idb.filesystem.js */ - - // For chrome we don't need to implement proxy methods - // All functionality can be accessed natively. - if (require('./isChrome')()) { - var pathsPrefix = { - // Read-only directory where the application is installed. - applicationDirectory: location.origin + '/', // eslint-disable-line no-undef - // Where to put app-specific data files. - dataDirectory: 'filesystem:file:///persistent/', - // Cached files that should survive app restarts. - // Apps should not rely on the OS to delete files in here. - cacheDirectory: 'filesystem:file:///temporary/' - }; - - exports.requestAllPaths = function (successCallback) { - successCallback(pathsPrefix); - }; - - require('cordova/exec/proxy').add('File', module.exports); - return; - } - - var LocalFileSystem = require('./LocalFileSystem'); - var FileSystem = require('./FileSystem'); - var FileEntry = require('./FileEntry'); - var FileError = require('./FileError'); - var DirectoryEntry = require('./DirectoryEntry'); - var File = require('./File'); - - (function (exports, global) { - var indexedDB = global.indexedDB || global.mozIndexedDB; - if (!indexedDB) { - throw 'Firefox OS File plugin: indexedDB not supported'; - } - - var fs_ = null; - - var idb_ = {}; - idb_.db = null; - var FILE_STORE_ = 'entries'; - - var DIR_SEPARATOR = '/'; - - var pathsPrefix = { - // Read-only directory where the application is installed. - applicationDirectory: location.origin + '/', // eslint-disable-line no-undef - // Where to put app-specific data files. - dataDirectory: 'file:///persistent/', - // Cached files that should survive app restarts. - // Apps should not rely on the OS to delete files in here. - cacheDirectory: 'file:///temporary/' - }; - - var unicodeLastChar = 65535; - - /** * Exported functionality ***/ - - exports.requestFileSystem = function (successCallback, errorCallback, args) { - var type = args[0]; - // Size is ignored since IDB filesystem size depends - // on browser implementation and can't be set up by user - var size = args[1]; // eslint-disable-line no-unused-vars - - if (type !== LocalFileSystem.TEMPORARY && type !== LocalFileSystem.PERSISTENT) { - if (errorCallback) { - errorCallback(FileError.INVALID_MODIFICATION_ERR); - } - return; - } - - var name = type === LocalFileSystem.TEMPORARY ? 'temporary' : 'persistent'; - var storageName = (location.protocol + location.host).replace(/:/g, '_'); // eslint-disable-line no-undef - - var root = new DirectoryEntry('', DIR_SEPARATOR); - fs_ = new FileSystem(name, root); - - idb_.open(storageName, function () { - successCallback(fs_); - }, errorCallback); - }; - - // Overridden by Android, BlackBerry 10 and iOS to populate fsMap - require('./fileSystems').getFs = function (name, callback) { - callback(new FileSystem(name, fs_.root)); - }; - - // list a directory's contents (files and folders). - exports.readEntries = function (successCallback, errorCallback, args) { - var fullPath = args[0]; - - if (typeof successCallback !== 'function') { - throw Error('Expected successCallback argument.'); - } - - var path = resolveToFullPath_(fullPath); - - exports.getDirectory(function () { - idb_.getAllEntries(path.fullPath + DIR_SEPARATOR, path.storagePath, function (entries) { - successCallback(entries); - }, errorCallback); - }, function () { - if (errorCallback) { - errorCallback(FileError.NOT_FOUND_ERR); - } - }, [path.storagePath, path.fullPath, {create: false}]); - }; - - exports.getFile = function (successCallback, errorCallback, args) { - var fullPath = args[0]; - var path = args[1]; - var options = args[2] || {}; - - // Create an absolute path if we were handed a relative one. - path = resolveToFullPath_(fullPath, path); - - idb_.get(path.storagePath, function (fileEntry) { - if (options.create === true && options.exclusive === true && fileEntry) { - // If create and exclusive are both true, and the path already exists, - // getFile must fail. - - if (errorCallback) { - errorCallback(FileError.PATH_EXISTS_ERR); - } - } else if (options.create === true && !fileEntry) { - // If create is true, the path doesn't exist, and no other error occurs, - // getFile must create it as a zero-length file and return a corresponding - // FileEntry. - var newFileEntry = new FileEntry(path.fileName, path.fullPath, new FileSystem(path.fsName, fs_.root)); - - newFileEntry.file_ = new MyFile({ - size: 0, - name: newFileEntry.name, - lastModifiedDate: new Date(), - storagePath: path.storagePath - }); - - idb_.put(newFileEntry, path.storagePath, successCallback, errorCallback); - } else if (options.create === true && fileEntry) { - if (fileEntry.isFile) { - // Overwrite file, delete then create new. - idb_['delete'](path.storagePath, function () { - var newFileEntry = new FileEntry(path.fileName, path.fullPath, new FileSystem(path.fsName, fs_.root)); - - newFileEntry.file_ = new MyFile({ - size: 0, - name: newFileEntry.name, - lastModifiedDate: new Date(), - storagePath: path.storagePath - }); - - idb_.put(newFileEntry, path.storagePath, successCallback, errorCallback); - }, errorCallback); - } else { - if (errorCallback) { - errorCallback(FileError.INVALID_MODIFICATION_ERR); - } - } - } else if ((!options.create || options.create === false) && !fileEntry) { - // If create is not true and the path doesn't exist, getFile must fail. - if (errorCallback) { - errorCallback(FileError.NOT_FOUND_ERR); - } - } else if ((!options.create || options.create === false) && fileEntry && - fileEntry.isDirectory) { - // If create is not true and the path exists, but is a directory, getFile - // must fail. - if (errorCallback) { - errorCallback(FileError.TYPE_MISMATCH_ERR); - } - } else { - // Otherwise, if no other error occurs, getFile must return a FileEntry - // corresponding to path. - - successCallback(fileEntryFromIdbEntry(fileEntry)); - } - }, errorCallback); - }; - - exports.getFileMetadata = function (successCallback, errorCallback, args) { - var fullPath = args[0]; - - exports.getFile(function (fileEntry) { - successCallback(new File(fileEntry.file_.name, fileEntry.fullPath, '', fileEntry.file_.lastModifiedDate, - fileEntry.file_.size)); - }, errorCallback, [fullPath, null]); - }; - - exports.getMetadata = function (successCallback, errorCallback, args) { - exports.getFile(function (fileEntry) { - successCallback( - { - modificationTime: fileEntry.file_.lastModifiedDate, - size: fileEntry.file_.lastModifiedDate - }); - }, errorCallback, args); - }; - - exports.setMetadata = function (successCallback, errorCallback, args) { - var fullPath = args[0]; - var metadataObject = args[1]; - - exports.getFile(function (fileEntry) { - fileEntry.file_.lastModifiedDate = metadataObject.modificationTime; - idb_.put(fileEntry, fileEntry.file_.storagePath, successCallback, errorCallback); - }, errorCallback, [fullPath, null]); - }; - - exports.write = function (successCallback, errorCallback, args) { - var fileName = args[0]; - var data = args[1]; - var position = args[2]; - var isBinary = args[3]; // eslint-disable-line no-unused-vars - - if (!data) { - if (errorCallback) { - errorCallback(FileError.INVALID_MODIFICATION_ERR); - } - return; - } - - if (typeof data === 'string' || data instanceof String) { - data = new Blob([data]); // eslint-disable-line no-undef - } - - exports.getFile(function (fileEntry) { - var blob_ = fileEntry.file_.blob_; - - if (!blob_) { - blob_ = new Blob([data], {type: data.type}); // eslint-disable-line no-undef - } else { - // Calc the head and tail fragments - var head = blob_.slice(0, position); - var tail = blob_.slice(position + (data.size || data.byteLength)); - - // Calc the padding - var padding = position - head.size; - if (padding < 0) { - padding = 0; - } - - // Do the "write". In fact, a full overwrite of the Blob. - blob_ = new Blob([head, new Uint8Array(padding), data, tail], // eslint-disable-line no-undef - {type: data.type}); - } - - // Set the blob we're writing on this file entry so we can recall it later. - fileEntry.file_.blob_ = blob_; - fileEntry.file_.lastModifiedDate = new Date() || null; - fileEntry.file_.size = blob_.size; - fileEntry.file_.name = blob_.name; - fileEntry.file_.type = blob_.type; - - idb_.put(fileEntry, fileEntry.file_.storagePath, function () { - successCallback(data.size || data.byteLength); - }, errorCallback); - }, errorCallback, [fileName, null]); - }; - - exports.readAsText = function (successCallback, errorCallback, args) { - var fileName = args[0]; - var enc = args[1]; - var startPos = args[2]; - var endPos = args[3]; - - readAs('text', fileName, enc, startPos, endPos, successCallback, errorCallback); - }; - - exports.readAsDataURL = function (successCallback, errorCallback, args) { - var fileName = args[0]; - var startPos = args[1]; - var endPos = args[2]; - - readAs('dataURL', fileName, null, startPos, endPos, successCallback, errorCallback); - }; - - exports.readAsBinaryString = function (successCallback, errorCallback, args) { - var fileName = args[0]; - var startPos = args[1]; - var endPos = args[2]; - - readAs('binaryString', fileName, null, startPos, endPos, successCallback, errorCallback); - }; - - exports.readAsArrayBuffer = function (successCallback, errorCallback, args) { - var fileName = args[0]; - var startPos = args[1]; - var endPos = args[2]; - - readAs('arrayBuffer', fileName, null, startPos, endPos, successCallback, errorCallback); - }; - - exports.removeRecursively = exports.remove = function (successCallback, errorCallback, args) { - if (typeof successCallback !== 'function') { - throw Error('Expected successCallback argument.'); - } - - var fullPath = resolveToFullPath_(args[0]).storagePath; - if (fullPath === pathsPrefix.cacheDirectory || fullPath === pathsPrefix.dataDirectory) { - errorCallback(FileError.NO_MODIFICATION_ALLOWED_ERR); - return; - } - - function deleteEntry (isDirectory) { - // TODO: This doesn't protect against directories that have content in it. - // Should throw an error instead if the dirEntry is not empty. - idb_['delete'](fullPath, function () { - successCallback(); - }, function () { - if (errorCallback) { errorCallback(); } - }, isDirectory); - } - - // We need to to understand what we are deleting: - exports.getDirectory(function (entry) { - deleteEntry(entry.isDirectory); - }, function () { - // DirectoryEntry was already deleted or entry is FileEntry - deleteEntry(false); - }, [fullPath, null, {create: false}]); - }; - - exports.getDirectory = function (successCallback, errorCallback, args) { - var fullPath = args[0]; - var path = args[1]; - var options = args[2]; - - // Create an absolute path if we were handed a relative one. - path = resolveToFullPath_(fullPath, path); - - idb_.get(path.storagePath, function (folderEntry) { - if (!options) { - options = {}; - } - - if (options.create === true && options.exclusive === true && folderEntry) { - // If create and exclusive are both true, and the path already exists, - // getDirectory must fail. - if (errorCallback) { - errorCallback(FileError.PATH_EXISTS_ERR); - } - // There is a strange bug in mobilespec + FF, which results in coming to multiple else-if's - // so we are shielding from it with returns. - return; - } - - if (options.create === true && !folderEntry) { - // If create is true, the path doesn't exist, and no other error occurs, - // getDirectory must create it as a zero-length file and return a corresponding - // MyDirectoryEntry. - var dirEntry = new DirectoryEntry(path.fileName, path.fullPath, new FileSystem(path.fsName, fs_.root)); - - idb_.put(dirEntry, path.storagePath, successCallback, errorCallback); - return; - } - - if (options.create === true && folderEntry) { - - if (folderEntry.isDirectory) { - // IDB won't save methods, so we need re-create the MyDirectoryEntry. - successCallback(new DirectoryEntry(folderEntry.name, folderEntry.fullPath, folderEntry.filesystem)); - } else { - if (errorCallback) { - errorCallback(FileError.INVALID_MODIFICATION_ERR); - } - } - return; - } - - if ((!options.create || options.create === false) && !folderEntry) { - // Handle root special. It should always exist. - if (path.fullPath === DIR_SEPARATOR) { - successCallback(fs_.root); - return; - } - - // If create is not true and the path doesn't exist, getDirectory must fail. - if (errorCallback) { - errorCallback(FileError.NOT_FOUND_ERR); - } - - return; - } - if ((!options.create || options.create === false) && folderEntry && folderEntry.isFile) { - // If create is not true and the path exists, but is a file, getDirectory - // must fail. - if (errorCallback) { - errorCallback(FileError.TYPE_MISMATCH_ERR); - } - return; - } - - // Otherwise, if no other error occurs, getDirectory must return a - // MyDirectoryEntry corresponding to path. - - // IDB won't' save methods, so we need re-create MyDirectoryEntry. - successCallback(new DirectoryEntry(folderEntry.name, folderEntry.fullPath, folderEntry.filesystem)); - }, errorCallback); - }; - - exports.getParent = function (successCallback, errorCallback, args) { - if (typeof successCallback !== 'function') { - throw Error('Expected successCallback argument.'); - } - - var fullPath = args[0]; - // fullPath is like this: - // file:///persistent/path/to/file or - // file:///persistent/path/to/directory/ - - if (fullPath === DIR_SEPARATOR || fullPath === pathsPrefix.cacheDirectory || - fullPath === pathsPrefix.dataDirectory) { - successCallback(fs_.root); - return; - } - - // To delete all slashes at the end - while (fullPath[fullPath.length - 1] === '/') { - fullPath = fullPath.substr(0, fullPath.length - 1); - } - - var pathArr = fullPath.split(DIR_SEPARATOR); - pathArr.pop(); - var parentName = pathArr.pop(); - var path = pathArr.join(DIR_SEPARATOR) + DIR_SEPARATOR; - - // To get parent of root files - var joined = path + parentName + DIR_SEPARATOR;// is like this: file:///persistent/ - if (joined === pathsPrefix.cacheDirectory || joined === pathsPrefix.dataDirectory) { - exports.getDirectory(successCallback, errorCallback, [joined, DIR_SEPARATOR, {create: false}]); - return; - } - - exports.getDirectory(successCallback, errorCallback, [path, parentName, {create: false}]); - }; - - exports.copyTo = function (successCallback, errorCallback, args) { - var srcPath = args[0]; - var parentFullPath = args[1]; - var name = args[2]; - - if (name.indexOf('/') !== -1 || srcPath === parentFullPath + name) { - if (errorCallback) { - errorCallback(FileError.INVALID_MODIFICATION_ERR); - } - - return; - } - - // Read src file - exports.getFile(function (srcFileEntry) { - - var path = resolveToFullPath_(parentFullPath); - // Check directory - exports.getDirectory(function () { - - // Create dest file - exports.getFile(function (dstFileEntry) { - - exports.write(function () { - successCallback(dstFileEntry); - }, errorCallback, [dstFileEntry.file_.storagePath, srcFileEntry.file_.blob_, 0]); - - }, errorCallback, [parentFullPath, name, {create: true}]); - - }, function () { if (errorCallback) { errorCallback(FileError.NOT_FOUND_ERR); } }, - [path.storagePath, null, {create: false}]); - - }, errorCallback, [srcPath, null]); - }; - - exports.moveTo = function (successCallback, errorCallback, args) { - var srcPath = args[0]; - // parentFullPath and name parameters is ignored because - // args is being passed downstream to exports.copyTo method - var parentFullPath = args[1]; // eslint-disable-line - var name = args[2]; // eslint-disable-line - - exports.copyTo(function (fileEntry) { - - exports.remove(function () { - successCallback(fileEntry); - }, errorCallback, [srcPath]); - - }, errorCallback, args); - }; - - exports.resolveLocalFileSystemURI = function (successCallback, errorCallback, args) { - var path = args[0]; - - // Ignore parameters - if (path.indexOf('?') !== -1) { - path = String(path).split('?')[0]; - } - - // support for encodeURI - if (/\%5/g.test(path) || /\%20/g.test(path)) { // eslint-disable-line no-useless-escape - path = decodeURI(path); - } - - if (path.trim()[0] === '/') { - if (errorCallback) { - errorCallback(FileError.ENCODING_ERR); - } - return; - } - - // support for cdvfile - if (path.trim().substr(0, 7) === 'cdvfile') { - if (path.indexOf('cdvfile://localhost') === -1) { - if (errorCallback) { - errorCallback(FileError.ENCODING_ERR); - } - return; - } - - var indexPersistent = path.indexOf('persistent'); - var indexTemporary = path.indexOf('temporary'); - - // cdvfile://localhost/persistent/path/to/file - if (indexPersistent !== -1) { - path = 'file:///persistent' + path.substr(indexPersistent + 10); - } else if (indexTemporary !== -1) { - path = 'file:///temporary' + path.substr(indexTemporary + 9); - } else { - if (errorCallback) { - errorCallback(FileError.ENCODING_ERR); - } - return; - } - } - - // to avoid path form of '///path/to/file' - function handlePathSlashes (path) { - var cutIndex = 0; - for (var i = 0; i < path.length - 1; i++) { - if (path[i] === DIR_SEPARATOR && path[i + 1] === DIR_SEPARATOR) { - cutIndex = i + 1; - } else break; - } - - return path.substr(cutIndex); - } - - // Handle localhost containing paths (see specs ) - if (path.indexOf('file://localhost/') === 0) { - path = path.replace('file://localhost/', 'file:///'); - } - - if (path.indexOf(pathsPrefix.dataDirectory) === 0) { - path = path.substring(pathsPrefix.dataDirectory.length - 1); - path = handlePathSlashes(path); - - exports.requestFileSystem(function () { - exports.getFile(successCallback, function () { - exports.getDirectory(successCallback, errorCallback, [pathsPrefix.dataDirectory, path, - {create: false}]); - }, [pathsPrefix.dataDirectory, path, {create: false}]); - }, errorCallback, [LocalFileSystem.PERSISTENT]); - } else if (path.indexOf(pathsPrefix.cacheDirectory) === 0) { - path = path.substring(pathsPrefix.cacheDirectory.length - 1); - path = handlePathSlashes(path); - - exports.requestFileSystem(function () { - exports.getFile(successCallback, function () { - exports.getDirectory(successCallback, errorCallback, [pathsPrefix.cacheDirectory, path, - {create: false}]); - }, [pathsPrefix.cacheDirectory, path, {create: false}]); - }, errorCallback, [LocalFileSystem.TEMPORARY]); - } else if (path.indexOf(pathsPrefix.applicationDirectory) === 0) { - path = path.substring(pathsPrefix.applicationDirectory.length); - // TODO: need to cut out redundant slashes? - - var xhr = new XMLHttpRequest(); // eslint-disable-line no-undef - xhr.open('GET', path, true); - xhr.onreadystatechange = function () { - if (xhr.status === 200 && xhr.readyState === 4) { - exports.requestFileSystem(function (fs) { - fs.name = location.hostname; // eslint-disable-line no-undef - - // TODO: need to call exports.getFile(...) to handle errors correct - fs.root.getFile(path, {create: true}, writeFile, errorCallback); - }, errorCallback, [LocalFileSystem.PERSISTENT]); - } - }; - - xhr.onerror = function () { - if (errorCallback) { - errorCallback(FileError.NOT_READABLE_ERR); - } - }; - - xhr.send(); - } else { - if (errorCallback) { - errorCallback(FileError.NOT_FOUND_ERR); - } - } - - function writeFile (entry) { - entry.createWriter(function (fileWriter) { - fileWriter.onwriteend = function (evt) { - if (!evt.target.error) { - entry.filesystemName = location.hostname; // eslint-disable-line no-undef - successCallback(entry); - } - }; - fileWriter.onerror = function () { - if (errorCallback) { - errorCallback(FileError.NOT_READABLE_ERR); - } - }; - fileWriter.write(new Blob([xhr.response])); // eslint-disable-line no-undef - }, errorCallback); // eslint-disable-line no-undef - } - }; - - exports.requestAllPaths = function (successCallback) { - successCallback(pathsPrefix); - }; - - /** * Helpers ***/ - - /** - * Interface to wrap the native File interface. - * - * This interface is necessary for creating zero-length (empty) files, - * something the Filesystem API allows you to do. Unfortunately, File's - * constructor cannot be called directly, making it impossible to instantiate - * an empty File in JS. - * - * @param {Object} opts Initial values. - * @constructor - */ - function MyFile (opts) { - var blob_ = new Blob(); // eslint-disable-line no-undef - - this.size = opts.size || 0; - this.name = opts.name || ''; - this.type = opts.type || ''; - this.lastModifiedDate = opts.lastModifiedDate || null; - this.storagePath = opts.storagePath || ''; - - // Need some black magic to correct the object's size/name/type based on the - // blob that is saved. - Object.defineProperty(this, 'blob_', { - enumerable: true, - get: function () { - return blob_; - }, - set: function (val) { - blob_ = val; - this.size = blob_.size; - this.name = blob_.name; - this.type = blob_.type; - this.lastModifiedDate = blob_.lastModifiedDate; - }.bind(this) - }); - } - - MyFile.prototype.constructor = MyFile; - - var MyFileHelper = { - toJson: function (myFile, success) { - /* - Safari private browse mode cannot store Blob object to indexeddb. - Then use pure json object instead of Blob object. - */ - var fr = new FileReader(); - fr.onload = function (ev) { - var base64 = btoa(String.fromCharCode.apply(null, new Uint8Array(fr.result))); - success({ - opt: { - size: myFile.size, - name: myFile.name, - type: myFile.type, - lastModifiedDate: myFile.lastModifiedDate, - storagePath: myFile.storagePath - }, - base64: base64 - }); - }; - fr.readAsArrayBuffer(myFile.blob_); - }, - setBase64: function (myFile, base64) { - if (base64) { - var arrayBuffer = (new Uint8Array( - [].map.call(atob(base64), function (c) { return c.charCodeAt(0); }) - )).buffer; - - myFile.blob_ = new Blob([arrayBuffer], { type: myFile.type }); - } else { - myFile.blob_ = new Blob(); - } - } - }; - - // When saving an entry, the fullPath should always lead with a slash and never - // end with one (e.g. a directory). Also, resolve '.' and '..' to an absolute - // one. This method ensures path is legit! - function resolveToFullPath_ (cwdFullPath, path) { - path = path || ''; - var fullPath = path; - var prefix = ''; - - cwdFullPath = cwdFullPath || DIR_SEPARATOR; - if (cwdFullPath.indexOf(FILESYSTEM_PREFIX) === 0) { - prefix = cwdFullPath.substring(0, cwdFullPath.indexOf(DIR_SEPARATOR, FILESYSTEM_PREFIX.length)); - cwdFullPath = cwdFullPath.substring(cwdFullPath.indexOf(DIR_SEPARATOR, FILESYSTEM_PREFIX.length)); - } - - var relativePath = path[0] !== DIR_SEPARATOR; - if (relativePath) { - fullPath = cwdFullPath; - if (cwdFullPath !== DIR_SEPARATOR) { - fullPath += DIR_SEPARATOR + path; - } else { - fullPath += path; - } - } - - // Remove doubled separator substrings - var re = new RegExp(DIR_SEPARATOR + DIR_SEPARATOR, 'g'); - fullPath = fullPath.replace(re, DIR_SEPARATOR); - - // Adjust '..'s by removing parent directories when '..' flows in path. - var parts = fullPath.split(DIR_SEPARATOR); - for (var i = 0; i < parts.length; ++i) { - var part = parts[i]; - if (part === '..') { - parts[i - 1] = ''; - parts[i] = ''; - } - } - fullPath = parts.filter(function (el) { - return el; - }).join(DIR_SEPARATOR); - - // Add back in leading slash. - if (fullPath[0] !== DIR_SEPARATOR) { - fullPath = DIR_SEPARATOR + fullPath; - } - - // Replace './' by current dir. ('./one/./two' -> one/two) - fullPath = fullPath.replace(/\.\//g, DIR_SEPARATOR); - - // Replace '//' with '/'. - fullPath = fullPath.replace(/\/\//g, DIR_SEPARATOR); - - // Replace '/.' with '/'. - fullPath = fullPath.replace(/\/\./g, DIR_SEPARATOR); - - // Remove '/' if it appears on the end. - if (fullPath[fullPath.length - 1] === DIR_SEPARATOR && - fullPath !== DIR_SEPARATOR) { - fullPath = fullPath.substring(0, fullPath.length - 1); - } - - var storagePath = prefix + fullPath; - storagePath = decodeURI(storagePath); - fullPath = decodeURI(fullPath); - - return { - storagePath: storagePath, - fullPath: fullPath, - fileName: fullPath.split(DIR_SEPARATOR).pop(), - fsName: prefix.split(DIR_SEPARATOR).pop() - }; - } - - function fileEntryFromIdbEntry (fileEntry) { - // IDB won't save methods, so we need re-create the FileEntry. - var clonedFileEntry = new FileEntry(fileEntry.name, fileEntry.fullPath, fileEntry.filesystem); - clonedFileEntry.file_ = fileEntry.file_; - - return clonedFileEntry; - } - - function readAs (what, fullPath, encoding, startPos, endPos, successCallback, errorCallback) { - exports.getFile(function (fileEntry) { - var fileReader = new FileReader(); // eslint-disable-line no-undef - var blob = fileEntry.file_.blob_.slice(startPos, endPos); - - fileReader.onload = function (e) { - successCallback(e.target.result); - }; - - fileReader.onerror = errorCallback; - - switch (what) { - case 'text': - fileReader.readAsText(blob, encoding); - break; - case 'dataURL': - fileReader.readAsDataURL(blob); - break; - case 'arrayBuffer': - fileReader.readAsArrayBuffer(blob); - break; - case 'binaryString': - fileReader.readAsBinaryString(blob); - break; - } - - }, errorCallback, [fullPath, null]); - } - - /** * Core logic to handle IDB operations ***/ - - idb_.open = function (dbName, successCallback, errorCallback) { - var self = this; - - // TODO: FF 12.0a1 isn't liking a db name with : in it. - var request = indexedDB.open(dbName.replace(':', '_')/*, 1 /*version */); - - request.onerror = errorCallback || onError; - - request.onupgradeneeded = function (e) { - // First open was called or higher db version was used. - - // console.log('onupgradeneeded: oldVersion:' + e.oldVersion, - // 'newVersion:' + e.newVersion); - - self.db = e.target.result; - self.db.onerror = onError; - - if (!self.db.objectStoreNames.contains(FILE_STORE_)) { - self.db.createObjectStore(FILE_STORE_/*, {keyPath: 'id', autoIncrement: true} */); - } - }; - - request.onsuccess = function (e) { - self.db = e.target.result; - self.db.onerror = onError; - successCallback(e); - }; - - request.onblocked = errorCallback || onError; - }; - - idb_.close = function () { - this.db.close(); - this.db = null; - }; - - idb_.get = function (fullPath, successCallback, errorCallback) { - if (!this.db) { - if (errorCallback) { - errorCallback(FileError.INVALID_MODIFICATION_ERR); - } - return; - } - - var tx = this.db.transaction([FILE_STORE_], 'readonly'); - - var request = tx.objectStore(FILE_STORE_).get(fullPath); - - tx.onabort = errorCallback || onError; - tx.oncomplete = function () { - var entry = request.result; - if (entry && entry.file_json) { - /* - Safari private browse mode cannot store Blob object to indexeddb. - Then use pure json object instead of Blob object. - */ - entry.file_ = new MyFile(entry.file_json.opt); - MyFileHelper.setBase64(entry.file_, entry.file_json.base64); - delete entry.file_json; - } - successCallback(entry); - }; - }; - - idb_.getAllEntries = function (fullPath, storagePath, successCallback, errorCallback) { - if (!this.db) { - if (errorCallback) { - errorCallback(FileError.INVALID_MODIFICATION_ERR); - } - return; - } - - var results = []; - - if (storagePath[storagePath.length - 1] === DIR_SEPARATOR) { - storagePath = storagePath.substring(0, storagePath.length - 1); - } - - var range = IDBKeyRange.bound(storagePath + DIR_SEPARATOR + ' ', - storagePath + DIR_SEPARATOR + String.fromCharCode(unicodeLastChar)); - - var tx = this.db.transaction([FILE_STORE_], 'readonly'); - tx.onabort = errorCallback || onError; - tx.oncomplete = function () { - results = results.filter(function (val) { - var pathWithoutSlash = val.fullPath; - - if (val.fullPath[val.fullPath.length - 1] === DIR_SEPARATOR) { - pathWithoutSlash = pathWithoutSlash.substr(0, pathWithoutSlash.length - 1); - } - - var valPartsLen = pathWithoutSlash.split(DIR_SEPARATOR).length; - var fullPathPartsLen = fullPath.split(DIR_SEPARATOR).length; - - /* Input fullPath parameter equals '//' for root folder */ - /* Entries in root folder has valPartsLen equals 2 (see below) */ - if (fullPath[fullPath.length - 1] === DIR_SEPARATOR && fullPath.trim().length === 2) { - fullPathPartsLen = 1; - } else if (fullPath[fullPath.length - 1] === DIR_SEPARATOR) { - fullPathPartsLen = fullPath.substr(0, fullPath.length - 1).split(DIR_SEPARATOR).length; - } else { - fullPathPartsLen = fullPath.split(DIR_SEPARATOR).length; - } - - if (valPartsLen === fullPathPartsLen + 1) { - // If this a subfolder and entry is a direct child, include it in - // the results. Otherwise, it's not an entry of this folder. - return val; - } else return false; - }); - - successCallback(results); - }; - - var request = tx.objectStore(FILE_STORE_).openCursor(range); - - request.onsuccess = function (e) { - var cursor = e.target.result; - if (cursor) { - var val = cursor.value; - - results.push(val.isFile ? fileEntryFromIdbEntry(val) : new DirectoryEntry(val.name, val.fullPath, val.filesystem)); - cursor['continue'](); - } - }; - }; - - idb_['delete'] = function (fullPath, successCallback, errorCallback, isDirectory) { - if (!idb_.db) { - if (errorCallback) { - errorCallback(FileError.INVALID_MODIFICATION_ERR); - } - return; - } - - var tx = this.db.transaction([FILE_STORE_], 'readwrite'); - tx.oncomplete = successCallback; - tx.onabort = errorCallback || onError; - tx.oncomplete = function () { - if (isDirectory) { - // We delete nested files and folders after deleting parent folder - // We use ranges: https://developer.mozilla.org/en-US/docs/Web/API/IDBKeyRange - fullPath = fullPath + DIR_SEPARATOR; - - // Range contains all entries in the form fullPath where - // symbol in the range from ' ' to symbol which has code `unicodeLastChar` - var range = IDBKeyRange.bound(fullPath + ' ', fullPath + String.fromCharCode(unicodeLastChar)); - - var newTx = this.db.transaction([FILE_STORE_], 'readwrite'); - newTx.oncomplete = successCallback; - newTx.onabort = errorCallback || onError; - newTx.objectStore(FILE_STORE_)['delete'](range); - } else { - successCallback(); - } - }; - tx.objectStore(FILE_STORE_)['delete'](fullPath); - }; - - idb_.put = function (entry, storagePath, successCallback, errorCallback, retry) { - if (!this.db) { - if (errorCallback) { - errorCallback(FileError.INVALID_MODIFICATION_ERR); - } - return; - } - - var tx = this.db.transaction([FILE_STORE_], 'readwrite'); - tx.onabort = errorCallback || onError; - tx.oncomplete = function () { - // TODO: Error is thrown if we pass the request event back instead. - successCallback(entry); - }; - - try { - tx.objectStore(FILE_STORE_).put(entry, storagePath); - } catch (e) { - if (e.name === 'DataCloneError') { - tx.oncomplete = null; - /* - Safari private browse mode cannot store Blob object to indexeddb. - Then use pure json object instead of Blob object. - */ - - var successCallback2 = function (entry) { - entry.file_ = new MyFile(entry.file_json.opt); - delete entry.file_json; - successCallback(entry); - }; - - if (!retry) { - if (entry.file_ && entry.file_ instanceof MyFile && entry.file_.blob_) { - MyFileHelper.toJson(entry.file_, function (json) { - entry.file_json = json; - delete entry.file_; - idb_.put(entry, storagePath, successCallback2, errorCallback, true); - }); - return; - } - } - } - throw e; - } - }; - - // Global error handler. Errors bubble from request, to transaction, to db. - function onError (e) { - switch (e.target.errorCode) { - case 12: - console.log('Error - Attempt to open db with a lower version than the ' + - 'current one.'); - break; - default: - console.log('errorCode: ' + e.target.errorCode); - } - - console.log(e, e.code, e.message); - } - - })(module.exports, window); - - require('cordova/exec/proxy').add('File', module.exports); -})(); diff --git a/plugins/cordova-plugin-file/src/ios/CDVAssetLibraryFilesystem.h b/plugins/cordova-plugin-file/src/ios/CDVAssetLibraryFilesystem.h deleted file mode 100644 index e09e2250e..000000000 --- a/plugins/cordova-plugin-file/src/ios/CDVAssetLibraryFilesystem.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVFile.h" - -extern NSString* const kCDVAssetsLibraryPrefix; -extern NSString* const kCDVAssetsLibraryScheme; - -@interface CDVAssetLibraryFilesystem : NSObject { -} - -- (id) initWithName:(NSString *)name; - -@end diff --git a/plugins/cordova-plugin-file/src/ios/CDVAssetLibraryFilesystem.m b/plugins/cordova-plugin-file/src/ios/CDVAssetLibraryFilesystem.m deleted file mode 100644 index 8486b7be1..000000000 --- a/plugins/cordova-plugin-file/src/ios/CDVAssetLibraryFilesystem.m +++ /dev/null @@ -1,253 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVFile.h" -#import "CDVAssetLibraryFilesystem.h" -#import -#import -#import -#import -#import - -NSString* const kCDVAssetsLibraryPrefix = @"assets-library://"; -NSString* const kCDVAssetsLibraryScheme = @"assets-library"; - -@implementation CDVAssetLibraryFilesystem -@synthesize name=_name, urlTransformer; - - -/* - The CDVAssetLibraryFilesystem works with resources which are identified - by iOS as - asset-library:// - and represents them internally as URLs of the form - cdvfile://localhost/assets-library/ - */ - -- (NSURL *)assetLibraryURLForLocalURL:(CDVFilesystemURL *)url -{ - if ([url.url.scheme isEqualToString:kCDVFilesystemURLPrefix]) { - NSString *path = [[url.url absoluteString] substringFromIndex:[@"cdvfile://localhost/assets-library" length]]; - return [NSURL URLWithString:[NSString stringWithFormat:@"assets-library:/%@", path]]; - } - return url.url; -} - -- (CDVPluginResult *)entryForLocalURI:(CDVFilesystemURL *)url -{ - NSDictionary* entry = [self makeEntryForLocalURL:url]; - return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:entry]; -} - -- (NSDictionary *)makeEntryForLocalURL:(CDVFilesystemURL *)url { - return [self makeEntryForPath:url.fullPath isDirectory:NO]; -} - -- (NSDictionary*)makeEntryForPath:(NSString*)fullPath isDirectory:(BOOL)isDir -{ - NSMutableDictionary* dirEntry = [NSMutableDictionary dictionaryWithCapacity:5]; - NSString* lastPart = [fullPath lastPathComponent]; - if (isDir && ![fullPath hasSuffix:@"/"]) { - fullPath = [fullPath stringByAppendingString:@"/"]; - } - [dirEntry setObject:[NSNumber numberWithBool:!isDir] forKey:@"isFile"]; - [dirEntry setObject:[NSNumber numberWithBool:isDir] forKey:@"isDirectory"]; - [dirEntry setObject:fullPath forKey:@"fullPath"]; - [dirEntry setObject:lastPart forKey:@"name"]; - [dirEntry setObject:self.name forKey: @"filesystemName"]; - - NSURL* nativeURL = [NSURL URLWithString:[NSString stringWithFormat:@"assets-library:/%@",fullPath]]; - if (self.urlTransformer) { - nativeURL = self.urlTransformer(nativeURL); - } - dirEntry[@"nativeURL"] = [nativeURL absoluteString]; - - return dirEntry; -} - -/* helper function to get the mimeType from the file extension - * IN: - * NSString* fullPath - filename (may include path) - * OUT: - * NSString* the mime type as type/subtype. nil if not able to determine - */ -+ (NSString*)getMimeTypeFromPath:(NSString*)fullPath -{ - NSString* mimeType = nil; - - if (fullPath) { - CFStringRef typeId = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)[fullPath pathExtension], NULL); - if (typeId) { - mimeType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass(typeId, kUTTagClassMIMEType); - if (!mimeType) { - // special case for m4a - if ([(__bridge NSString*)typeId rangeOfString : @"m4a-audio"].location != NSNotFound) { - mimeType = @"audio/mp4"; - } else if ([[fullPath pathExtension] rangeOfString:@"wav"].location != NSNotFound) { - mimeType = @"audio/wav"; - } else if ([[fullPath pathExtension] rangeOfString:@"css"].location != NSNotFound) { - mimeType = @"text/css"; - } - } - CFRelease(typeId); - } - } - return mimeType; -} - -- (id)initWithName:(NSString *)name -{ - if (self) { - self.name = name; - } - return self; -} - -- (CDVPluginResult *)getFileForURL:(CDVFilesystemURL *)baseURI requestedPath:(NSString *)requestedPath options:(NSDictionary *)options -{ - // return unsupported result for assets-library URLs - return [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"getFile not supported for assets-library URLs."]; -} - -- (CDVPluginResult*)getParentForURL:(CDVFilesystemURL *)localURI -{ - // we don't (yet?) support getting the parent of an asset - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_READABLE_ERR]; -} - -- (CDVPluginResult*)setMetadataForURL:(CDVFilesystemURL *)localURI withObject:(NSDictionary *)options -{ - // setMetadata doesn't make sense for asset library files - return [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR]; -} - -- (CDVPluginResult *)removeFileAtURL:(CDVFilesystemURL *)localURI -{ - // return error for assets-library URLs - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:INVALID_MODIFICATION_ERR]; -} - -- (CDVPluginResult *)recursiveRemoveFileAtURL:(CDVFilesystemURL *)localURI -{ - // return error for assets-library URLs - return [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"removeRecursively not supported for assets-library URLs."]; -} - -- (CDVPluginResult *)readEntriesAtURL:(CDVFilesystemURL *)localURI -{ - // return unsupported result for assets-library URLs - return [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"readEntries not supported for assets-library URLs."]; -} - -- (CDVPluginResult *)truncateFileAtURL:(CDVFilesystemURL *)localURI atPosition:(unsigned long long)pos -{ - // assets-library files can't be truncated - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NO_MODIFICATION_ALLOWED_ERR]; -} - -- (CDVPluginResult *)writeToFileAtURL:(CDVFilesystemURL *)localURL withData:(NSData*)encData append:(BOOL)shouldAppend -{ - // text can't be written into assets-library files - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NO_MODIFICATION_ALLOWED_ERR]; -} - -- (void)copyFileToURL:(CDVFilesystemURL *)destURL withName:(NSString *)newName fromFileSystem:(NSObject *)srcFs atURL:(CDVFilesystemURL *)srcURL copy:(BOOL)bCopy callback:(void (^)(CDVPluginResult *))callback -{ - // Copying to an assets library file is not doable, since we can't write it. - CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:INVALID_MODIFICATION_ERR]; - callback(result); -} - -- (NSString *)filesystemPathForURL:(CDVFilesystemURL *)url -{ - NSString *path = nil; - if ([[url.url scheme] isEqualToString:kCDVAssetsLibraryScheme]) { - path = [url.url path]; - } else { - path = url.fullPath; - } - if ([path hasSuffix:@"/"]) { - path = [path substringToIndex:([path length]-1)]; - } - return path; -} - -- (void)readFileAtURL:(CDVFilesystemURL *)localURL start:(NSInteger)start end:(NSInteger)end callback:(void (^)(NSData*, NSString* mimeType, CDVFileError))callback -{ - ALAssetsLibraryAssetForURLResultBlock resultBlock = ^(ALAsset* asset) { - if (asset) { - // We have the asset! Get the data and send it off. - ALAssetRepresentation* assetRepresentation = [asset defaultRepresentation]; - NSUInteger size = (end > start) ? (end - start) : [assetRepresentation size]; - Byte* buffer = (Byte*)malloc(size); - NSUInteger bufferSize = [assetRepresentation getBytes:buffer fromOffset:start length:size error:nil]; - NSData* data = [NSData dataWithBytesNoCopy:buffer length:bufferSize freeWhenDone:YES]; - NSString* MIMEType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)[assetRepresentation UTI], kUTTagClassMIMEType); - - callback(data, MIMEType, NO_ERROR); - } else { - callback(nil, nil, NOT_FOUND_ERR); - } - }; - - ALAssetsLibraryAccessFailureBlock failureBlock = ^(NSError* error) { - // Retrieving the asset failed for some reason. Send the appropriate error. - NSLog(@"Error: %@", error); - callback(nil, nil, SECURITY_ERR); - }; - - ALAssetsLibrary* assetsLibrary = [[ALAssetsLibrary alloc] init]; - [assetsLibrary assetForURL:[self assetLibraryURLForLocalURL:localURL] resultBlock:resultBlock failureBlock:failureBlock]; -} - -- (void)getFileMetadataForURL:(CDVFilesystemURL *)localURL callback:(void (^)(CDVPluginResult *))callback -{ - // In this case, we need to use an asynchronous method to retrieve the file. - // Because of this, we can't just assign to `result` and send it at the end of the method. - // Instead, we return after calling the asynchronous method and send `result` in each of the blocks. - ALAssetsLibraryAssetForURLResultBlock resultBlock = ^(ALAsset* asset) { - if (asset) { - // We have the asset! Populate the dictionary and send it off. - NSMutableDictionary* fileInfo = [NSMutableDictionary dictionaryWithCapacity:5]; - ALAssetRepresentation* assetRepresentation = [asset defaultRepresentation]; - [fileInfo setObject:[NSNumber numberWithUnsignedLongLong:[assetRepresentation size]] forKey:@"size"]; - [fileInfo setObject:localURL.fullPath forKey:@"fullPath"]; - NSString* filename = [assetRepresentation filename]; - [fileInfo setObject:filename forKey:@"name"]; - [fileInfo setObject:[CDVAssetLibraryFilesystem getMimeTypeFromPath:filename] forKey:@"type"]; - NSDate* creationDate = [asset valueForProperty:ALAssetPropertyDate]; - NSNumber* msDate = [NSNumber numberWithDouble:[creationDate timeIntervalSince1970] * 1000]; - [fileInfo setObject:msDate forKey:@"lastModifiedDate"]; - - callback([CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:fileInfo]); - } else { - // We couldn't find the asset. Send the appropriate error. - callback([CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]); - } - }; - ALAssetsLibraryAccessFailureBlock failureBlock = ^(NSError* error) { - // Retrieving the asset failed for some reason. Send the appropriate error. - callback([CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsString:[error localizedDescription]]); - }; - - ALAssetsLibrary* assetsLibrary = [[ALAssetsLibrary alloc] init]; - [assetsLibrary assetForURL:[self assetLibraryURLForLocalURL:localURL] resultBlock:resultBlock failureBlock:failureBlock]; - return; -} -@end diff --git a/plugins/cordova-plugin-file/src/ios/CDVFile.h b/plugins/cordova-plugin-file/src/ios/CDVFile.h deleted file mode 100644 index 987c66b5c..000000000 --- a/plugins/cordova-plugin-file/src/ios/CDVFile.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import - -extern NSString* const kCDVAssetsLibraryPrefix; -extern NSString* const kCDVFilesystemURLPrefix; - -enum CDVFileError { - NO_ERROR = 0, - NOT_FOUND_ERR = 1, - SECURITY_ERR = 2, - ABORT_ERR = 3, - NOT_READABLE_ERR = 4, - ENCODING_ERR = 5, - NO_MODIFICATION_ALLOWED_ERR = 6, - INVALID_STATE_ERR = 7, - SYNTAX_ERR = 8, - INVALID_MODIFICATION_ERR = 9, - QUOTA_EXCEEDED_ERR = 10, - TYPE_MISMATCH_ERR = 11, - PATH_EXISTS_ERR = 12 -}; -typedef int CDVFileError; - -@interface CDVFilesystemURL : NSObject { - NSURL *_url; - NSString *_fileSystemName; - NSString *_fullPath; -} - -- (id) initWithString:(NSString*)strURL; -- (id) initWithURL:(NSURL*)URL; -+ (CDVFilesystemURL *)fileSystemURLWithString:(NSString *)strURL; -+ (CDVFilesystemURL *)fileSystemURLWithURL:(NSURL *)URL; - -- (NSString *)absoluteURL; - -@property (atomic) NSURL *url; -@property (atomic) NSString *fileSystemName; -@property (atomic) NSString *fullPath; - -@end - -@interface CDVFilesystemURLProtocol : NSURLProtocol -@end - -@protocol CDVFileSystem -- (CDVPluginResult *)entryForLocalURI:(CDVFilesystemURL *)url; -- (CDVPluginResult *)getFileForURL:(CDVFilesystemURL *)baseURI requestedPath:(NSString *)requestedPath options:(NSDictionary *)options; -- (CDVPluginResult *)getParentForURL:(CDVFilesystemURL *)localURI; -- (CDVPluginResult *)setMetadataForURL:(CDVFilesystemURL *)localURI withObject:(NSDictionary *)options; -- (CDVPluginResult *)removeFileAtURL:(CDVFilesystemURL *)localURI; -- (CDVPluginResult *)recursiveRemoveFileAtURL:(CDVFilesystemURL *)localURI; -- (CDVPluginResult *)readEntriesAtURL:(CDVFilesystemURL *)localURI; -- (CDVPluginResult *)truncateFileAtURL:(CDVFilesystemURL *)localURI atPosition:(unsigned long long)pos; -- (CDVPluginResult *)writeToFileAtURL:(CDVFilesystemURL *)localURL withData:(NSData*)encData append:(BOOL)shouldAppend; -- (void)copyFileToURL:(CDVFilesystemURL *)destURL withName:(NSString *)newName fromFileSystem:(NSObject *)srcFs atURL:(CDVFilesystemURL *)srcURL copy:(BOOL)bCopy callback:(void (^)(CDVPluginResult *))callback; -- (void)readFileAtURL:(CDVFilesystemURL *)localURL start:(NSInteger)start end:(NSInteger)end callback:(void (^)(NSData*, NSString* mimeType, CDVFileError))callback; -- (void)getFileMetadataForURL:(CDVFilesystemURL *)localURL callback:(void (^)(CDVPluginResult *))callback; - -- (NSDictionary *)makeEntryForLocalURL:(CDVFilesystemURL *)url; -- (NSDictionary*)makeEntryForPath:(NSString*)fullPath isDirectory:(BOOL)isDir; - -@property (nonatomic,strong) NSString *name; -@property (nonatomic, copy) NSURL*(^urlTransformer)(NSURL*); - -@optional -- (NSString *)filesystemPathForURL:(CDVFilesystemURL *)localURI; -- (CDVFilesystemURL *)URLforFilesystemPath:(NSString *)path; - -@end - -@interface CDVFile : CDVPlugin { - NSString* rootDocsPath; - NSString* appDocsPath; - NSString* appLibraryPath; - NSString* appTempPath; - - NSMutableArray* fileSystems_; - BOOL userHasAllowed; -} - -- (NSNumber*)checkFreeDiskSpace:(NSString*)appPath; -- (NSDictionary*)makeEntryForPath:(NSString*)fullPath fileSystemName:(NSString *)fsName isDirectory:(BOOL)isDir; -- (NSDictionary *)makeEntryForURL:(NSURL *)URL; -- (CDVFilesystemURL *)fileSystemURLforLocalPath:(NSString *)localPath; - -- (NSObject *)filesystemForURL:(CDVFilesystemURL *)localURL; - -/* Native Registration API */ -- (void)registerFilesystem:(NSObject *)fs; -- (NSObject *)fileSystemByName:(NSString *)fsName; - -/* Exec API */ -- (void)requestFileSystem:(CDVInvokedUrlCommand*)command; -- (void)resolveLocalFileSystemURI:(CDVInvokedUrlCommand*)command; -- (void)getDirectory:(CDVInvokedUrlCommand*)command; -- (void)getFile:(CDVInvokedUrlCommand*)command; -- (void)getParent:(CDVInvokedUrlCommand*)command; -- (void)removeRecursively:(CDVInvokedUrlCommand*)command; -- (void)remove:(CDVInvokedUrlCommand*)command; -- (void)copyTo:(CDVInvokedUrlCommand*)command; -- (void)moveTo:(CDVInvokedUrlCommand*)command; -- (void)getFileMetadata:(CDVInvokedUrlCommand*)command; -- (void)readEntries:(CDVInvokedUrlCommand*)command; -- (void)readAsText:(CDVInvokedUrlCommand*)command; -- (void)readAsDataURL:(CDVInvokedUrlCommand*)command; -- (void)readAsArrayBuffer:(CDVInvokedUrlCommand*)command; -- (void)write:(CDVInvokedUrlCommand*)command; -- (void)testFileExists:(CDVInvokedUrlCommand*)command; -- (void)testDirectoryExists:(CDVInvokedUrlCommand*)command; -- (void)getFreeDiskSpace:(CDVInvokedUrlCommand*)command; -- (void)truncate:(CDVInvokedUrlCommand*)command; -- (void)doCopyMove:(CDVInvokedUrlCommand*)command isCopy:(BOOL)bCopy; - -/* Compatibilty with older File API */ -- (NSString*)getMimeTypeFromPath:(NSString*)fullPath; -- (NSDictionary *)getDirectoryEntry:(NSString *)target isDirectory:(BOOL)bDirRequest; - -/* Conversion between filesystem paths and URLs */ -- (NSString *)filesystemPathForURL:(CDVFilesystemURL *)URL; - -/* Internal methods for testing */ -- (void)_getLocalFilesystemPath:(CDVInvokedUrlCommand*)command; - -@property (nonatomic, strong) NSString* rootDocsPath; -@property (nonatomic, strong) NSString* appDocsPath; -@property (nonatomic, strong) NSString* appLibraryPath; -@property (nonatomic, strong) NSString* appTempPath; -@property (nonatomic, strong) NSString* persistentPath; -@property (nonatomic, strong) NSString* temporaryPath; -@property (nonatomic, strong) NSMutableArray* fileSystems; - -@property BOOL userHasAllowed; - -@end - -#define kW3FileTemporary @"temporary" -#define kW3FilePersistent @"persistent" diff --git a/plugins/cordova-plugin-file/src/ios/CDVFile.m b/plugins/cordova-plugin-file/src/ios/CDVFile.m deleted file mode 100644 index 59e7d6407..000000000 --- a/plugins/cordova-plugin-file/src/ios/CDVFile.m +++ /dev/null @@ -1,1119 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import "CDVFile.h" -#import "CDVLocalFilesystem.h" -#import "CDVAssetLibraryFilesystem.h" -#import - -static NSString* toBase64(NSData* data) { - SEL s1 = NSSelectorFromString(@"cdv_base64EncodedString"); - SEL s2 = NSSelectorFromString(@"base64EncodedString"); - SEL s3 = NSSelectorFromString(@"base64EncodedStringWithOptions:"); - - if ([data respondsToSelector:s1]) { - NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s1]; - return func(data, s1); - } else if ([data respondsToSelector:s2]) { - NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s2]; - return func(data, s2); - } else if ([data respondsToSelector:s3]) { - NSString* (*func)(id, SEL, NSUInteger) = (void *)[data methodForSelector:s3]; - return func(data, s3, 0); - } else { - return nil; - } -} - -CDVFile *filePlugin = nil; - -extern NSString * const NSURLIsExcludedFromBackupKey __attribute__((weak_import)); - -#ifndef __IPHONE_5_1 - NSString* const NSURLIsExcludedFromBackupKey = @"NSURLIsExcludedFromBackupKey"; -#endif - -NSString* const kCDVFilesystemURLPrefix = @"cdvfile"; - -@implementation CDVFilesystemURL -@synthesize url=_url; -@synthesize fileSystemName=_fileSystemName; -@synthesize fullPath=_fullPath; - -- (id) initWithString:(NSString *)strURL -{ - if ( self = [super init] ) { - NSURL *decodedURL = [NSURL URLWithString:strURL]; - return [self initWithURL:decodedURL]; - } - return nil; -} - --(id) initWithURL:(NSURL *)URL -{ - if ( self = [super init] ) { - self.url = URL; - self.fileSystemName = [self filesystemNameForLocalURI:URL]; - self.fullPath = [self fullPathForLocalURI:URL]; - } - return self; -} - -/* - * IN - * NSString localURI - * OUT - * NSString FileSystem Name for this URI, or nil if it is not recognized. - */ -- (NSString *)filesystemNameForLocalURI:(NSURL *)uri -{ - if ([[uri scheme] isEqualToString:kCDVFilesystemURLPrefix] && [[uri host] isEqualToString:@"localhost"]) { - NSArray *pathComponents = [uri pathComponents]; - if (pathComponents != nil && pathComponents.count > 1) { - return [pathComponents objectAtIndex:1]; - } - } else if ([[uri scheme] isEqualToString:kCDVAssetsLibraryScheme]) { - return @"assets-library"; - } - return nil; -} - -/* - * IN - * NSString localURI - * OUT - * NSString fullPath component suitable for an Entry object. - * The incoming URI should be properly escaped. The returned fullPath is unescaped. - */ -- (NSString *)fullPathForLocalURI:(NSURL *)uri -{ - if ([[uri scheme] isEqualToString:kCDVFilesystemURLPrefix] && [[uri host] isEqualToString:@"localhost"]) { - NSString *path = [uri path]; - if ([uri query]) { - path = [NSString stringWithFormat:@"%@?%@", path, [uri query]]; - } - NSRange slashRange = [path rangeOfString:@"/" options:0 range:NSMakeRange(1, path.length-1)]; - if (slashRange.location == NSNotFound) { - return @""; - } - return [path substringFromIndex:slashRange.location]; - } else if ([[uri scheme] isEqualToString:kCDVAssetsLibraryScheme]) { - return [[uri absoluteString] substringFromIndex:[kCDVAssetsLibraryScheme length]+2]; - } - return nil; -} - -+ (CDVFilesystemURL *)fileSystemURLWithString:(NSString *)strURL -{ - return [[CDVFilesystemURL alloc] initWithString:strURL]; -} - -+ (CDVFilesystemURL *)fileSystemURLWithURL:(NSURL *)URL -{ - return [[CDVFilesystemURL alloc] initWithURL:URL]; -} - -- (NSString *)absoluteURL -{ - return [NSString stringWithFormat:@"cdvfile://localhost/%@%@", self.fileSystemName, self.fullPath]; -} - -@end - -@implementation CDVFilesystemURLProtocol - -+ (BOOL)canInitWithRequest:(NSURLRequest*)request -{ - NSURL* url = [request URL]; - return [[url scheme] isEqualToString:kCDVFilesystemURLPrefix]; -} - -+ (NSURLRequest*)canonicalRequestForRequest:(NSURLRequest*)request -{ - return request; -} - -+ (BOOL)requestIsCacheEquivalent:(NSURLRequest*)requestA toRequest:(NSURLRequest*)requestB -{ - return [[[requestA URL] resourceSpecifier] isEqualToString:[[requestB URL] resourceSpecifier]]; -} - -- (void)startLoading -{ - CDVFilesystemURL* url = [CDVFilesystemURL fileSystemURLWithURL:[[self request] URL]]; - NSObject *fs = [filePlugin filesystemForURL:url]; - __weak CDVFilesystemURLProtocol* weakSelf = self; - - [fs readFileAtURL:url start:0 end:-1 callback:^void(NSData *data, NSString *mimetype, CDVFileError error) { - NSMutableDictionary* responseHeaders = [[NSMutableDictionary alloc] init]; - responseHeaders[@"Cache-Control"] = @"no-cache"; - - if (!error) { - responseHeaders[@"Content-Type"] = mimetype; - NSURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:url.url statusCode:200 HTTPVersion:@"HTTP/1.1"headerFields:responseHeaders]; - [[weakSelf client] URLProtocol:weakSelf didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; - [[weakSelf client] URLProtocol:weakSelf didLoadData:data]; - [[weakSelf client] URLProtocolDidFinishLoading:weakSelf]; - } else { - NSURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:url.url statusCode:404 HTTPVersion:@"HTTP/1.1"headerFields:responseHeaders]; - [[weakSelf client] URLProtocol:weakSelf didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; - [[weakSelf client] URLProtocolDidFinishLoading:weakSelf]; - } - }]; -} - -- (void)stopLoading -{} - -- (NSCachedURLResponse *)connection:(NSURLConnection *)connection - willCacheResponse:(NSCachedURLResponse*)cachedResponse { - return nil; -} - -@end - - -@implementation CDVFile - -@synthesize rootDocsPath, appDocsPath, appLibraryPath, appTempPath, userHasAllowed, fileSystems=fileSystems_; - -- (void)registerFilesystem:(NSObject *)fs { - __weak CDVFile* weakSelf = self; - SEL sel = NSSelectorFromString(@"urlTransformer"); - // for backwards compatibility - we check if this property is there - // we create a wrapper block because the urlTransformer property - // on the commandDelegate might be set dynamically at a future time - // (and not dependent on plugin loading order) - if ([self.commandDelegate respondsToSelector:sel]) { - fs.urlTransformer = ^NSURL*(NSURL* urlToTransform) { - // grab the block from the commandDelegate - NSURL* (^urlTransformer)(NSURL*) = ((id(*)(id, SEL))objc_msgSend)(weakSelf.commandDelegate, sel); - // if block is not null, we call it - if (urlTransformer) { - return urlTransformer(urlToTransform); - } else { // else we return the same url - return urlToTransform; - } - }; - } - [fileSystems_ addObject:fs]; -} - -- (NSObject *)fileSystemByName:(NSString *)fsName -{ - if (self.fileSystems != nil) { - for (NSObject *fs in self.fileSystems) { - if ([fs.name isEqualToString:fsName]) { - return fs; - } - } - } - return nil; -} - -- (NSObject *)filesystemForURL:(CDVFilesystemURL *)localURL { - if (localURL.fileSystemName == nil) return nil; - @try { - return [self fileSystemByName:localURL.fileSystemName]; - } - @catch (NSException *e) { - return nil; - } -} - -- (NSArray *)getExtraFileSystemsPreference:(UIViewController *)vc -{ - NSString *filesystemsStr = nil; - if([self.viewController isKindOfClass:[CDVViewController class]]) { - CDVViewController *vc = (CDVViewController *)self.viewController; - NSDictionary *settings = [vc settings]; - filesystemsStr = [settings[@"iosextrafilesystems"] lowercaseString]; - } - if (!filesystemsStr) { - filesystemsStr = @"library,library-nosync,documents,documents-nosync,cache,bundle,root"; - } - return [filesystemsStr componentsSeparatedByString:@","]; -} - -- (void)makeNonSyncable:(NSString*)path { - [[NSFileManager defaultManager] createDirectoryAtPath:path - withIntermediateDirectories:YES - attributes:nil - error:nil]; - NSURL* url = [NSURL fileURLWithPath:path]; - [url setResourceValue: [NSNumber numberWithBool: YES] - forKey: NSURLIsExcludedFromBackupKey error:nil]; - -} - -- (void)registerExtraFileSystems:(NSArray *)filesystems fromAvailableSet:(NSDictionary *)availableFileSystems -{ - NSMutableSet *installedFilesystems = [[NSMutableSet alloc] initWithCapacity:7]; - - /* Build non-syncable directories as necessary */ - for (NSString *nonSyncFS in @[@"library-nosync", @"documents-nosync"]) { - if ([filesystems containsObject:nonSyncFS]) { - [self makeNonSyncable:availableFileSystems[nonSyncFS]]; - } - } - - /* Register filesystems in order */ - for (NSString *fsName in filesystems) { - if (![installedFilesystems containsObject:fsName]) { - NSString *fsRoot = availableFileSystems[fsName]; - if (fsRoot) { - [filePlugin registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:fsName root:fsRoot]]; - [installedFilesystems addObject:fsName]; - } else { - NSLog(@"Unrecognized extra filesystem identifier: %@", fsName); - } - } - } -} - -- (NSDictionary *)getAvailableFileSystems -{ - NSString *libPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; - NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; - return @{ - @"library": libPath, - @"library-nosync": [libPath stringByAppendingPathComponent:@"NoCloud"], - @"documents": docPath, - @"documents-nosync": [docPath stringByAppendingPathComponent:@"NoCloud"], - @"cache": [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0], - @"bundle": [[NSBundle mainBundle] bundlePath], - @"root": @"/" - }; -} - -- (void)pluginInitialize -{ - filePlugin = self; - [NSURLProtocol registerClass:[CDVFilesystemURLProtocol class]]; - - fileSystems_ = [[NSMutableArray alloc] initWithCapacity:3]; - - // Get the Library directory path - NSArray* paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); - self.appLibraryPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"files"]; - - // Get the Temporary directory path - self.appTempPath = [NSTemporaryDirectory()stringByStandardizingPath]; // remove trailing slash from NSTemporaryDirectory() - - // Get the Documents directory path - paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - self.rootDocsPath = [paths objectAtIndex:0]; - self.appDocsPath = [self.rootDocsPath stringByAppendingPathComponent:@"files"]; - - - NSString *location = nil; - if([self.viewController isKindOfClass:[CDVViewController class]]) { - CDVViewController *vc = (CDVViewController *)self.viewController; - NSMutableDictionary *settings = vc.settings; - location = [[settings objectForKey:@"iospersistentfilelocation"] lowercaseString]; - } - if (location == nil) { - // Compatibilty by default (if the config preference is not set, or - // if we're not embedded in a CDVViewController somehow.) - location = @"compatibility"; - } - - NSError *error; - if ([[NSFileManager defaultManager] createDirectoryAtPath:self.appTempPath - withIntermediateDirectories:YES - attributes:nil - error:&error]) { - [self registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:@"temporary" root:self.appTempPath]]; - } else { - NSLog(@"Unable to create temporary directory: %@", error); - } - if ([location isEqualToString:@"library"]) { - if ([[NSFileManager defaultManager] createDirectoryAtPath:self.appLibraryPath - withIntermediateDirectories:YES - attributes:nil - error:&error]) { - [self registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:@"persistent" root:self.appLibraryPath]]; - } else { - NSLog(@"Unable to create library directory: %@", error); - } - } else if ([location isEqualToString:@"compatibility"]) { - /* - * Fall-back to compatibility mode -- this is the logic implemented in - * earlier versions of this plugin, and should be maintained here so - * that apps which were originally deployed with older versions of the - * plugin can continue to provide access to files stored under those - * versions. - */ - [self registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:@"persistent" root:self.rootDocsPath]]; - } else { - NSAssert(false, - @"File plugin configuration error: Please set iosPersistentFileLocation in config.xml to one of \"library\" (for new applications) or \"compatibility\" (for compatibility with previous versions)"); - } - [self registerFilesystem:[[CDVAssetLibraryFilesystem alloc] initWithName:@"assets-library"]]; - - [self registerExtraFileSystems:[self getExtraFileSystemsPreference:self.viewController] - fromAvailableSet:[self getAvailableFileSystems]]; - -} - -- (CDVFilesystemURL *)fileSystemURLforArg:(NSString *)urlArg -{ - CDVFilesystemURL* ret = nil; - if ([urlArg hasPrefix:@"file://"]) { - /* This looks like a file url. Get the path, and see if any handlers recognize it. */ - NSURL *fileURL = [NSURL URLWithString:urlArg]; - NSURL *resolvedFileURL = [fileURL URLByResolvingSymlinksInPath]; - NSString *path = [resolvedFileURL path]; - ret = [self fileSystemURLforLocalPath:path]; - } else { - ret = [CDVFilesystemURL fileSystemURLWithString:urlArg]; - } - return ret; -} - -- (CDVFilesystemURL *)fileSystemURLforLocalPath:(NSString *)localPath -{ - CDVFilesystemURL *localURL = nil; - NSUInteger shortestFullPath = 0; - - // Try all installed filesystems, in order. Return the most match url. - for (id object in self.fileSystems) { - if ([object respondsToSelector:@selector(URLforFilesystemPath:)]) { - CDVFilesystemURL *url = [object URLforFilesystemPath:localPath]; - if (url){ - // A shorter fullPath would imply that the filesystem is a better match for the local path - if (!localURL || ([[url fullPath] length] < shortestFullPath)) { - localURL = url; - shortestFullPath = [[url fullPath] length]; - } - } - } - } - return localURL; -} - -- (NSNumber*)checkFreeDiskSpace:(NSString*)appPath -{ - NSFileManager* fMgr = [[NSFileManager alloc] init]; - - NSError* __autoreleasing pError = nil; - - NSDictionary* pDict = [fMgr attributesOfFileSystemForPath:appPath error:&pError]; - NSNumber* pNumAvail = (NSNumber*)[pDict objectForKey:NSFileSystemFreeSize]; - - return pNumAvail; -} - -/* Request the File System info - * - * IN: - * arguments[0] - type (number as string) - * TEMPORARY = 0, PERSISTENT = 1; - * arguments[1] - size - * - * OUT: - * Dictionary representing FileSystem object - * name - the human readable directory name - * root = DirectoryEntry object - * bool isDirectory - * bool isFile - * string name - * string fullPath - * fileSystem = FileSystem object - !! ignored because creates circular reference !! - */ - -- (void)requestFileSystem:(CDVInvokedUrlCommand*)command -{ - // arguments - NSString* strType = [command argumentAtIndex:0]; - unsigned long long size = [[command argumentAtIndex:1] longLongValue]; - - int type = [strType intValue]; - CDVPluginResult* result = nil; - - if (type >= self.fileSystems.count) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:NOT_FOUND_ERR]; - NSLog(@"No filesystem of type requested"); - } else { - NSString* fullPath = @"/"; - // check for avail space for size request - NSNumber* pNumAvail = [self checkFreeDiskSpace:self.rootDocsPath]; - // NSLog(@"Free space: %@", [NSString stringWithFormat:@"%qu", [ pNumAvail unsignedLongLongValue ]]); - if (pNumAvail && ([pNumAvail unsignedLongLongValue] < size)) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:QUOTA_EXCEEDED_ERR]; - } else { - NSObject *rootFs = [self.fileSystems objectAtIndex:type]; - if (rootFs == nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:NOT_FOUND_ERR]; - NSLog(@"No filesystem of type requested"); - } else { - NSMutableDictionary* fileSystem = [NSMutableDictionary dictionaryWithCapacity:2]; - [fileSystem setObject:rootFs.name forKey:@"name"]; - NSDictionary* dirEntry = [self makeEntryForPath:fullPath fileSystemName:rootFs.name isDirectory:YES]; - [fileSystem setObject:dirEntry forKey:@"root"]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:fileSystem]; - } - } - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - - -- (void)requestAllFileSystems:(CDVInvokedUrlCommand*)command -{ - NSMutableArray* ret = [[NSMutableArray alloc] init]; - for (NSObject* root in fileSystems_) { - [ret addObject:[self makeEntryForPath:@"/" fileSystemName:root.name isDirectory:YES]]; - } - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:ret]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -- (void)requestAllPaths:(CDVInvokedUrlCommand*)command -{ - NSString* libPath = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES)[0]; - NSString* libPathSync = [libPath stringByAppendingPathComponent:@"Cloud"]; - NSString* libPathNoSync = [libPath stringByAppendingPathComponent:@"NoCloud"]; - NSString* docPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; - NSString* storagePath = [libPath stringByDeletingLastPathComponent]; - NSString* cachePath = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0]; - - // Create the directories if necessary. - [[NSFileManager defaultManager] createDirectoryAtPath:libPathSync withIntermediateDirectories:YES attributes:nil error:nil]; - [[NSFileManager defaultManager] createDirectoryAtPath:libPathNoSync withIntermediateDirectories:YES attributes:nil error:nil]; - // Mark NoSync as non-iCloud. - [[NSURL fileURLWithPath:libPathNoSync] setResourceValue: [NSNumber numberWithBool: YES] - forKey: NSURLIsExcludedFromBackupKey error:nil]; - - NSDictionary* ret = @{ - @"applicationDirectory": [[NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]] absoluteString], - @"applicationStorageDirectory": [[NSURL fileURLWithPath:storagePath] absoluteString], - @"dataDirectory": [[NSURL fileURLWithPath:libPathNoSync] absoluteString], - @"syncedDataDirectory": [[NSURL fileURLWithPath:libPathSync] absoluteString], - @"documentsDirectory": [[NSURL fileURLWithPath:docPath] absoluteString], - @"cacheDirectory": [[NSURL fileURLWithPath:cachePath] absoluteString], - @"tempDirectory": [[NSURL fileURLWithPath:NSTemporaryDirectory()] absoluteString] - }; - - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:ret]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* Creates and returns a dictionary representing an Entry Object - * - * IN: - * NSString* fullPath of the entry - * int fsType - FileSystem type - * BOOL isDirectory - YES if this is a directory, NO if is a file - * OUT: - * NSDictionary* Entry object - * bool as NSNumber isDirectory - * bool as NSNumber isFile - * NSString* name - last part of path - * NSString* fullPath - * NSString* filesystemName - FileSystem name -- actual filesystem will be created on the JS side if necessary, to avoid - * creating circular reference (FileSystem contains DirectoryEntry which contains FileSystem.....!!) - */ -- (NSDictionary*)makeEntryForPath:(NSString*)fullPath fileSystemName:(NSString *)fsName isDirectory:(BOOL)isDir -{ - NSObject *fs = [self fileSystemByName:fsName]; - return [fs makeEntryForPath:fullPath isDirectory:isDir]; -} - -- (NSDictionary *)makeEntryForLocalURL:(CDVFilesystemURL *)localURL -{ - NSObject *fs = [self filesystemForURL:localURL]; - return [fs makeEntryForLocalURL:localURL]; -} - -- (NSDictionary *)makeEntryForURL:(NSURL *)URL -{ - CDVFilesystemURL* fsURL = [self fileSystemURLforArg:[URL absoluteString]]; - return [self makeEntryForLocalURL:fsURL]; -} - -/* - * Given a URI determine the File System information associated with it and return an appropriate W3C entry object - * IN - * NSString* localURI: Should be an escaped local filesystem URI - * OUT - * Entry object - * bool isDirectory - * bool isFile - * string name - * string fullPath - * fileSystem = FileSystem object - !! ignored because creates circular reference FileSystem contains DirectoryEntry which contains FileSystem.....!! - */ -- (void)resolveLocalFileSystemURI:(CDVInvokedUrlCommand*)command -{ - // arguments - NSString* localURIstr = [command argumentAtIndex:0]; - CDVPluginResult* result; - - localURIstr = [self encodePath:localURIstr]; //encode path before resolving - CDVFilesystemURL* inputURI = [self fileSystemURLforArg:localURIstr]; - - if (inputURI == nil || inputURI.fileSystemName == nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:ENCODING_ERR]; - } else { - NSObject *fs = [self filesystemForURL:inputURI]; - if (fs == nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:ENCODING_ERR]; - } else { - result = [fs entryForLocalURI:inputURI]; - } - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -//encode path with percent escapes --(NSString *)encodePath:(NSString *)path -{ - NSString *decodedPath = [path stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; //decode incase it's already encoded to avoid encoding twice - return [decodedPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; -} - - -/* Part of DirectoryEntry interface, creates or returns the specified directory - * IN: - * NSString* localURI - local filesystem URI for this directory - * NSString* path - directory to be created/returned; may be full path or relative path - * NSDictionary* - Flags object - * boolean as NSNumber create - - * if create is true and directory does not exist, create dir and return directory entry - * if create is true and exclusive is true and directory does exist, return error - * if create is false and directory does not exist, return error - * if create is false and the path represents a file, return error - * boolean as NSNumber exclusive - used in conjunction with create - * if exclusive is true and create is true - specifies failure if directory already exists - * - * - */ -- (void)getDirectory:(CDVInvokedUrlCommand*)command -{ - NSMutableArray* arguments = [NSMutableArray arrayWithArray:command.arguments]; - NSMutableDictionary* options = nil; - - if ([arguments count] >= 3) { - options = [command argumentAtIndex:2 withDefault:nil]; - } - // add getDir to options and call getFile() - if (options != nil) { - options = [NSMutableDictionary dictionaryWithDictionary:options]; - } else { - options = [NSMutableDictionary dictionaryWithCapacity:1]; - } - [options setObject:[NSNumber numberWithInt:1] forKey:@"getDir"]; - if ([arguments count] >= 3) { - [arguments replaceObjectAtIndex:2 withObject:options]; - } else { - [arguments addObject:options]; - } - CDVInvokedUrlCommand* subCommand = - [[CDVInvokedUrlCommand alloc] initWithArguments:arguments - callbackId:command.callbackId - className:command.className - methodName:command.methodName]; - - [self getFile:subCommand]; -} - -/* Part of DirectoryEntry interface, creates or returns the specified file - * IN: - * NSString* baseURI - local filesytem URI for the base directory to search - * NSString* requestedPath - file to be created/returned; may be absolute path or relative path - * NSDictionary* options - Flags object - * boolean as NSNumber create - - * if create is true and file does not exist, create file and return File entry - * if create is true and exclusive is true and file does exist, return error - * if create is false and file does not exist, return error - * if create is false and the path represents a directory, return error - * boolean as NSNumber exclusive - used in conjunction with create - * if exclusive is true and create is true - specifies failure if file already exists - */ -- (void)getFile:(CDVInvokedUrlCommand*)command -{ - NSString* baseURIstr = [command argumentAtIndex:0]; - CDVFilesystemURL* baseURI = [self fileSystemURLforArg:baseURIstr]; - NSString* requestedPath = [command argumentAtIndex:1]; - NSDictionary* options = [command argumentAtIndex:2 withDefault:nil]; - - NSObject *fs = [self filesystemForURL:baseURI]; - CDVPluginResult* result = [fs getFileForURL:baseURI requestedPath:requestedPath options:options]; - - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* - * Look up the parent Entry containing this Entry. - * If this Entry is the root of its filesystem, its parent is itself. - * IN: - * NSArray* arguments - * 0 - NSString* localURI - * NSMutableDictionary* options - * empty - */ -- (void)getParent:(CDVInvokedUrlCommand*)command -{ - // arguments are URL encoded - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - - NSObject *fs = [self filesystemForURL:localURI]; - CDVPluginResult* result = [fs getParentForURL:localURI]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* - * set MetaData of entry - * Currently we only support "com.apple.MobileBackup" (boolean) - */ -- (void)setMetadata:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSDictionary* options = [command argumentAtIndex:1 withDefault:nil]; - NSObject *fs = [self filesystemForURL:localURI]; - CDVPluginResult* result = [fs setMetadataForURL:localURI withObject:options]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* removes the directory or file entry - * IN: - * NSArray* arguments - * 0 - NSString* localURI - * - * returns NO_MODIFICATION_ALLOWED_ERR if is top level directory or no permission to delete dir - * returns INVALID_MODIFICATION_ERR if is non-empty dir or asset library file - * returns NOT_FOUND_ERR if file or dir is not found -*/ -- (void)remove:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - CDVPluginResult* result = nil; - - if ([localURI.fullPath isEqualToString:@""]) { - // error if try to remove top level (documents or tmp) dir - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NO_MODIFICATION_ALLOWED_ERR]; - } else { - NSObject *fs = [self filesystemForURL:localURI]; - result = [fs removeFileAtURL:localURI]; - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* recursively removes the directory - * IN: - * NSArray* arguments - * 0 - NSString* localURI - * - * returns NO_MODIFICATION_ALLOWED_ERR if is top level directory or no permission to delete dir - * returns NOT_FOUND_ERR if file or dir is not found - */ -- (void)removeRecursively:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - CDVPluginResult* result = nil; - - if ([localURI.fullPath isEqualToString:@""]) { - // error if try to remove top level (documents or tmp) dir - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NO_MODIFICATION_ALLOWED_ERR]; - } else { - NSObject *fs = [self filesystemForURL:localURI]; - result = [fs recursiveRemoveFileAtURL:localURI]; - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -- (void)copyTo:(CDVInvokedUrlCommand*)command -{ - [self doCopyMove:command isCopy:YES]; -} - -- (void)moveTo:(CDVInvokedUrlCommand*)command -{ - [self doCopyMove:command isCopy:NO]; -} - -/* Copy/move a file or directory to a new location - * IN: - * NSArray* arguments - * 0 - NSString* URL of entry to copy - * 1 - NSString* URL of the directory into which to copy/move the entry - * 2 - Optionally, the new name of the entry, defaults to the current name - * BOOL - bCopy YES if copy, NO if move - */ -- (void)doCopyMove:(CDVInvokedUrlCommand*)command isCopy:(BOOL)bCopy -{ - NSArray* arguments = command.arguments; - - // arguments - NSString* srcURLstr = [command argumentAtIndex:0]; - NSString* destURLstr = [command argumentAtIndex:1]; - - CDVPluginResult *result; - - if (!srcURLstr || !destURLstr) { - // either no source or no destination provided - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - return; - } - - CDVFilesystemURL* srcURL = [self fileSystemURLforArg:srcURLstr]; - CDVFilesystemURL* destURL = [self fileSystemURLforArg:destURLstr]; - - NSObject *srcFs = [self filesystemForURL:srcURL]; - NSObject *destFs = [self filesystemForURL:destURL]; - - // optional argument; use last component from srcFullPath if new name not provided - NSString* newName = ([arguments count] > 2) ? [command argumentAtIndex:2] : [srcURL.url lastPathComponent]; - if ([newName rangeOfString:@":"].location != NSNotFound) { - // invalid chars in new name - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:ENCODING_ERR]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - return; - } - - __weak CDVFile* weakSelf = self; - [self.commandDelegate runInBackground:^ { - [destFs copyFileToURL:destURL withName:newName fromFileSystem:srcFs atURL:srcURL copy:bCopy callback:^(CDVPluginResult* result) { - [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - }]; - -} - -- (void)getFileMetadata:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSObject *fs = [self filesystemForURL:localURI]; - __weak CDVFile* weakSelf = self; - [fs getFileMetadataForURL:localURI callback:^(CDVPluginResult* result) { - [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; -} - -- (void)readEntries:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSObject *fs = [self filesystemForURL:localURI]; - CDVPluginResult *result = [fs readEntriesAtURL:localURI]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* read and return file data - * IN: - * NSArray* arguments - * 0 - NSString* fullPath - * 1 - NSString* encoding - * 2 - NSString* start - * 3 - NSString* end - */ -- (void)readAsText:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSString* encoding = [command argumentAtIndex:1]; - NSInteger start = [[command argumentAtIndex:2] integerValue]; - NSInteger end = [[command argumentAtIndex:3] integerValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - if (fs == nil) { - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - return; - } - - // TODO: implement - if ([@"UTF-8" caseInsensitiveCompare : encoding] != NSOrderedSame) { - NSLog(@"Only UTF-8 encodings are currently supported by readAsText"); - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:ENCODING_ERR]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - return; - } - - __weak CDVFile* weakSelf = self; - - [self.commandDelegate runInBackground:^ { - [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - NSString* str = [[NSString alloc] initWithBytesNoCopy:(void*)[data bytes] length:[data length] encoding:NSUTF8StringEncoding freeWhenDone:NO]; - // Check that UTF8 conversion did not fail. - if (str != nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:str]; - result.associatedObject = data; - } else { - errorCode = ENCODING_ERR; - } - } - if (result == nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - - [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - }]; -} - -/* Read content of text file and return as base64 encoded data url. - * IN: - * NSArray* arguments - * 0 - NSString* fullPath - * 1 - NSString* start - * 2 - NSString* end - * - * Determines the mime type from the file extension, returns ENCODING_ERR if mimetype can not be determined. - */ - -- (void)readAsDataURL:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSInteger start = [[command argumentAtIndex:1] integerValue]; - NSInteger end = [[command argumentAtIndex:2] integerValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - __weak CDVFile* weakSelf = self; - [self.commandDelegate runInBackground:^ { - [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - NSString* b64Str = toBase64(data); - NSString* output = [NSString stringWithFormat:@"data:%@;base64,%@", mimeType, b64Str]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:output]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - - [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - }]; -} - -/* Read content of text file and return as an arraybuffer - * IN: - * NSArray* arguments - * 0 - NSString* fullPath - * 1 - NSString* start - * 2 - NSString* end - */ - -- (void)readAsArrayBuffer:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSInteger start = [[command argumentAtIndex:1] integerValue]; - NSInteger end = [[command argumentAtIndex:2] integerValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - __weak CDVFile* weakSelf = self; - - [self.commandDelegate runInBackground:^ { - [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArrayBuffer:data]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - - [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - }]; -} - -- (void)readAsBinaryString:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSInteger start = [[command argumentAtIndex:1] integerValue]; - NSInteger end = [[command argumentAtIndex:2] integerValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - __weak CDVFile* weakSelf = self; - - [self.commandDelegate runInBackground:^ { - [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - NSString* payload = [[NSString alloc] initWithBytesNoCopy:(void*)[data bytes] length:[data length] encoding:NSASCIIStringEncoding freeWhenDone:NO]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:payload]; - result.associatedObject = data; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - - [weakSelf.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - }]; -} - - -- (void)truncate:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - unsigned long long pos = (unsigned long long)[[command argumentAtIndex:1] longLongValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - CDVPluginResult *result = [fs truncateFileAtURL:localURI atPosition:pos]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* write - * IN: - * NSArray* arguments - * 0 - NSString* localURI of file to write to - * 1 - NSString* or NSData* data to write - * 2 - NSNumber* position to begin writing - */ -- (void)write:(CDVInvokedUrlCommand*)command -{ - __weak CDVFile* weakSelf = self; - - [self.commandDelegate runInBackground:^ { - NSString* callbackId = command.callbackId; - - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - id argData = [command argumentAtIndex:1]; - unsigned long long pos = (unsigned long long)[[command argumentAtIndex:2] longLongValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - - [fs truncateFileAtURL:localURI atPosition:pos]; - CDVPluginResult *result; - if ([argData isKindOfClass:[NSString class]]) { - NSData *encData = [argData dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; - result = [fs writeToFileAtURL:localURI withData:encData append:YES]; - } else if ([argData isKindOfClass:[NSData class]]) { - result = [fs writeToFileAtURL:localURI withData:argData append:YES]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Invalid parameter type"]; - } - [weakSelf.commandDelegate sendPluginResult:result callbackId:callbackId]; - }]; -} - -#pragma mark Methods for converting between URLs and paths - -- (NSString *)filesystemPathForURL:(CDVFilesystemURL *)localURL -{ - for (NSObject *fs in self.fileSystems) { - if ([fs.name isEqualToString:localURL.fileSystemName]) { - if ([fs respondsToSelector:@selector(filesystemPathForURL:)]) { - return [fs filesystemPathForURL:localURL]; - } - } - } - return nil; -} - -#pragma mark Undocumented Filesystem API - -- (void)testFileExists:(CDVInvokedUrlCommand*)command -{ - // arguments - NSString* argPath = [command argumentAtIndex:0]; - - // Get the file manager - NSFileManager* fMgr = [NSFileManager defaultManager]; - NSString* appFile = argPath; // [ self getFullPath: argPath]; - - BOOL bExists = [fMgr fileExistsAtPath:appFile]; - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(bExists ? 1 : 0)]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -- (void)testDirectoryExists:(CDVInvokedUrlCommand*)command -{ - // arguments - NSString* argPath = [command argumentAtIndex:0]; - - // Get the file manager - NSFileManager* fMgr = [[NSFileManager alloc] init]; - NSString* appFile = argPath; // [self getFullPath: argPath]; - BOOL bIsDir = NO; - BOOL bExists = [fMgr fileExistsAtPath:appFile isDirectory:&bIsDir]; - - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:((bExists && bIsDir) ? 1 : 0)]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -// Returns number of bytes available via callback -- (void)getFreeDiskSpace:(CDVInvokedUrlCommand*)command -{ - // no arguments - - NSNumber* pNumAvail = [self checkFreeDiskSpace:self.rootDocsPath]; - - NSString* strFreeSpace = [NSString stringWithFormat:@"%qu", [pNumAvail unsignedLongLongValue]]; - // NSLog(@"Free space is %@", strFreeSpace ); - - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:strFreeSpace]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -#pragma mark Compatibility with older File API - -- (NSString*)getMimeTypeFromPath:(NSString*)fullPath -{ - return [CDVLocalFilesystem getMimeTypeFromPath:fullPath]; -} - -- (NSDictionary *)getDirectoryEntry:(NSString *)localPath isDirectory:(BOOL)bDirRequest -{ - CDVFilesystemURL *localURL = [self fileSystemURLforLocalPath:localPath]; - return [self makeEntryForPath:localURL.fullPath fileSystemName:localURL.fileSystemName isDirectory:bDirRequest]; -} - -#pragma mark Internal methods for testing -// Internal methods for testing: Get the on-disk location of a local filesystem url. -// [Currently used for testing file-transfer] - -- (void)_getLocalFilesystemPath:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURL = [self fileSystemURLforArg:command.arguments[0]]; - - NSString* fsPath = [self filesystemPathForURL:localURL]; - CDVPluginResult* result; - if (fsPath) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:fsPath]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Cannot resolve URL to a file"]; - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -@end diff --git a/plugins/cordova-plugin-file/src/ios/CDVLocalFilesystem.h b/plugins/cordova-plugin-file/src/ios/CDVLocalFilesystem.h deleted file mode 100644 index a0186c853..000000000 --- a/plugins/cordova-plugin-file/src/ios/CDVLocalFilesystem.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVFile.h" - -@interface CDVLocalFilesystem : NSObject { - NSString *_name; - NSString *_fsRoot; -} - -- (id) initWithName:(NSString *)name root:(NSString *)fsRoot; -+ (NSString*)getMimeTypeFromPath:(NSString*)fullPath; - -@property (nonatomic,strong) NSString *fsRoot; - -@end diff --git a/plugins/cordova-plugin-file/src/ios/CDVLocalFilesystem.m b/plugins/cordova-plugin-file/src/ios/CDVLocalFilesystem.m deleted file mode 100644 index c340ce0cc..000000000 --- a/plugins/cordova-plugin-file/src/ios/CDVLocalFilesystem.m +++ /dev/null @@ -1,750 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVFile.h" -#import "CDVLocalFilesystem.h" -#import -#import -#import - -@implementation CDVLocalFilesystem -@synthesize name=_name, fsRoot=_fsRoot, urlTransformer; - -- (id) initWithName:(NSString *)name root:(NSString *)fsRoot -{ - if (self) { - self.name = name; - self.fsRoot = fsRoot; - } - return self; -} - -/* - * IN - * NSString localURI - * OUT - * CDVPluginResult result containing a file or directoryEntry for the localURI, or an error if the - * URI represents a non-existent path, or is unrecognized or otherwise malformed. - */ -- (CDVPluginResult *)entryForLocalURI:(CDVFilesystemURL *)url -{ - CDVPluginResult* result = nil; - NSDictionary* entry = [self makeEntryForLocalURL:url]; - if (entry) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:entry]; - } else { - // return NOT_FOUND_ERR - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - } - return result; -} -- (NSDictionary *)makeEntryForLocalURL:(CDVFilesystemURL *)url { - NSString *path = [self filesystemPathForURL:url]; - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - BOOL isDir = NO; - // see if exists and is file or dir - BOOL bExists = [fileMgr fileExistsAtPath:path isDirectory:&isDir]; - if (bExists) { - return [self makeEntryForPath:url.fullPath isDirectory:isDir]; - } else { - return nil; - } -} -- (NSDictionary*)makeEntryForPath:(NSString*)fullPath isDirectory:(BOOL)isDir -{ - NSMutableDictionary* dirEntry = [NSMutableDictionary dictionaryWithCapacity:5]; - NSString* lastPart = [[self stripQueryParametersFromPath:fullPath] lastPathComponent]; - if (isDir && ![fullPath hasSuffix:@"/"]) { - fullPath = [fullPath stringByAppendingString:@"/"]; - } - [dirEntry setObject:[NSNumber numberWithBool:!isDir] forKey:@"isFile"]; - [dirEntry setObject:[NSNumber numberWithBool:isDir] forKey:@"isDirectory"]; - [dirEntry setObject:fullPath forKey:@"fullPath"]; - [dirEntry setObject:lastPart forKey:@"name"]; - [dirEntry setObject:self.name forKey: @"filesystemName"]; - - NSURL* nativeURL = [NSURL fileURLWithPath:[self filesystemPathForFullPath:fullPath]]; - if (self.urlTransformer) { - nativeURL = self.urlTransformer(nativeURL); - } - - dirEntry[@"nativeURL"] = [nativeURL absoluteString]; - - return dirEntry; -} - -- (NSString *)stripQueryParametersFromPath:(NSString *)fullPath -{ - NSRange questionMark = [fullPath rangeOfString:@"?"]; - if (questionMark.location != NSNotFound) { - return [fullPath substringWithRange:NSMakeRange(0,questionMark.location)]; - } - return fullPath; -} - -- (NSString *)filesystemPathForFullPath:(NSString *)fullPath -{ - NSString *path = nil; - NSString *strippedFullPath = [self stripQueryParametersFromPath:fullPath]; - path = [NSString stringWithFormat:@"%@%@", self.fsRoot, strippedFullPath]; - if ([path length] > 1 && [path hasSuffix:@"/"]) { - path = [path substringToIndex:([path length]-1)]; - } - return path; -} -/* - * IN - * NSString localURI - * OUT - * NSString full local filesystem path for the represented file or directory, or nil if no such path is possible - * The file or directory does not necessarily have to exist. nil is returned if the filesystem type is not recognized, - * or if the URL is malformed. - * The incoming URI should be properly escaped (no raw spaces, etc. URI percent-encoding is expected). - */ -- (NSString *)filesystemPathForURL:(CDVFilesystemURL *)url -{ - return [self filesystemPathForFullPath:url.fullPath]; -} - -- (CDVFilesystemURL *)URLforFullPath:(NSString *)fullPath -{ - if (fullPath) { - NSString* escapedPath = [fullPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - if ([fullPath hasPrefix:@"/"]) { - return [CDVFilesystemURL fileSystemURLWithString:[NSString stringWithFormat:@"%@://localhost/%@%@", kCDVFilesystemURLPrefix, self.name, escapedPath]]; - } - return [CDVFilesystemURL fileSystemURLWithString:[NSString stringWithFormat:@"%@://localhost/%@/%@", kCDVFilesystemURLPrefix, self.name, escapedPath]]; - } - return nil; -} - -- (CDVFilesystemURL *)URLforFilesystemPath:(NSString *)path -{ - return [self URLforFullPath:[self fullPathForFileSystemPath:path]]; - -} - -- (NSString *)normalizePath:(NSString *)rawPath -{ - // If this is an absolute path, the first path component will be '/'. Skip it if that's the case - BOOL isAbsolutePath = [rawPath hasPrefix:@"/"]; - if (isAbsolutePath) { - rawPath = [rawPath substringFromIndex:1]; - } - NSMutableArray *components = [NSMutableArray arrayWithArray:[rawPath pathComponents]]; - for (int index = 0; index < [components count]; ++index) { - if ([[components objectAtIndex:index] isEqualToString:@".."]) { - [components removeObjectAtIndex:index]; - if (index > 0) { - [components removeObjectAtIndex:index-1]; - --index; - } - } - } - - if (isAbsolutePath) { - return [NSString stringWithFormat:@"/%@", [components componentsJoinedByString:@"/"]]; - } else { - return [components componentsJoinedByString:@"/"]; - } - - -} - -- (BOOL)valueForKeyIsNumber:(NSDictionary*)dict key:(NSString*)key -{ - BOOL bNumber = NO; - NSObject* value = dict[key]; - if (value) { - bNumber = [value isKindOfClass:[NSNumber class]]; - } - return bNumber; -} - -- (CDVPluginResult *)getFileForURL:(CDVFilesystemURL *)baseURI requestedPath:(NSString *)requestedPath options:(NSDictionary *)options -{ - CDVPluginResult* result = nil; - BOOL bDirRequest = NO; - BOOL create = NO; - BOOL exclusive = NO; - int errorCode = 0; // !!! risky - no error code currently defined for 0 - - if ([self valueForKeyIsNumber:options key:@"create"]) { - create = [(NSNumber*)[options valueForKey:@"create"] boolValue]; - } - if ([self valueForKeyIsNumber:options key:@"exclusive"]) { - exclusive = [(NSNumber*)[options valueForKey:@"exclusive"] boolValue]; - } - if ([self valueForKeyIsNumber:options key:@"getDir"]) { - // this will not exist for calls directly to getFile but will have been set by getDirectory before calling this method - bDirRequest = [(NSNumber*)[options valueForKey:@"getDir"] boolValue]; - } - // see if the requested path has invalid characters - should we be checking for more than just ":"? - if ([requestedPath rangeOfString:@":"].location != NSNotFound) { - errorCode = ENCODING_ERR; - } else { - // Build new fullPath for the requested resource. - // We concatenate the two paths together, and then scan the resulting string to remove - // parent ("..") references. Any parent references at the beginning of the string are - // silently removed. - NSString *combinedPath = [baseURI.fullPath stringByAppendingPathComponent:requestedPath]; - combinedPath = [self normalizePath:combinedPath]; - CDVFilesystemURL* requestedURL = [self URLforFullPath:combinedPath]; - - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - BOOL bIsDir; - BOOL bExists = [fileMgr fileExistsAtPath:[self filesystemPathForURL:requestedURL] isDirectory:&bIsDir]; - if (bExists && (create == NO) && (bIsDir == !bDirRequest)) { - // path exists and is not of requested type - return TYPE_MISMATCH_ERR - errorCode = TYPE_MISMATCH_ERR; - } else if (!bExists && (create == NO)) { - // path does not exist and create is false - return NOT_FOUND_ERR - errorCode = NOT_FOUND_ERR; - } else if (bExists && (create == YES) && (exclusive == YES)) { - // file/dir already exists and exclusive and create are both true - return PATH_EXISTS_ERR - errorCode = PATH_EXISTS_ERR; - } else { - // if bExists and create == YES - just return data - // if bExists and create == NO - just return data - // if !bExists and create == YES - create and return data - BOOL bSuccess = YES; - NSError __autoreleasing* pError = nil; - if (!bExists && (create == YES)) { - if (bDirRequest) { - // create the dir - bSuccess = [fileMgr createDirectoryAtPath:[self filesystemPathForURL:requestedURL] withIntermediateDirectories:NO attributes:nil error:&pError]; - } else { - // create the empty file - bSuccess = [fileMgr createFileAtPath:[self filesystemPathForURL:requestedURL] contents:nil attributes:nil]; - } - } - if (!bSuccess) { - errorCode = ABORT_ERR; - if (pError) { - NSLog(@"error creating directory: %@", [pError localizedDescription]); - } - } else { - // NSLog(@"newly created file/dir (%@) exists: %d", reqFullPath, [fileMgr fileExistsAtPath:reqFullPath]); - // file existed or was created - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:[self makeEntryForPath:requestedURL.fullPath isDirectory:bDirRequest]]; - } - } // are all possible conditions met? - } - - if (errorCode > 0) { - // create error callback - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - return result; - -} - -- (CDVPluginResult*)getParentForURL:(CDVFilesystemURL *)localURI -{ - CDVPluginResult* result = nil; - CDVFilesystemURL *newURI = nil; - if ([localURI.fullPath isEqualToString:@""]) { - // return self - newURI = localURI; - } else { - newURI = [CDVFilesystemURL fileSystemURLWithURL:[localURI.url URLByDeletingLastPathComponent]]; /* TODO: UGLY - FIX */ - } - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - BOOL bIsDir; - BOOL bExists = [fileMgr fileExistsAtPath:[self filesystemPathForURL:newURI] isDirectory:&bIsDir]; - if (bExists) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:[self makeEntryForPath:newURI.fullPath isDirectory:bIsDir]]; - } else { - // invalid path or file does not exist - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - } - return result; -} - -- (CDVPluginResult*)setMetadataForURL:(CDVFilesystemURL *)localURI withObject:(NSDictionary *)options -{ - BOOL ok = NO; - - NSString* filePath = [self filesystemPathForURL:localURI]; - // we only care about this iCloud key for now. - // set to 1/true to skip backup, set to 0/false to back it up (effectively removing the attribute) - NSString* iCloudBackupExtendedAttributeKey = @"com.apple.MobileBackup"; - id iCloudBackupExtendedAttributeValue = [options objectForKey:iCloudBackupExtendedAttributeKey]; - - if ((iCloudBackupExtendedAttributeValue != nil) && [iCloudBackupExtendedAttributeValue isKindOfClass:[NSNumber class]]) { - if (IsAtLeastiOSVersion(@"5.1")) { - NSURL* url = [NSURL fileURLWithPath:filePath]; - NSError* __autoreleasing error = nil; - - ok = [url setResourceValue:[NSNumber numberWithBool:[iCloudBackupExtendedAttributeValue boolValue]] forKey:NSURLIsExcludedFromBackupKey error:&error]; - } else { // below 5.1 (deprecated - only really supported in 5.01) - u_int8_t value = [iCloudBackupExtendedAttributeValue intValue]; - if (value == 0) { // remove the attribute (allow backup, the default) - ok = (removexattr([filePath fileSystemRepresentation], [iCloudBackupExtendedAttributeKey cStringUsingEncoding:NSUTF8StringEncoding], 0) == 0); - } else { // set the attribute (skip backup) - ok = (setxattr([filePath fileSystemRepresentation], [iCloudBackupExtendedAttributeKey cStringUsingEncoding:NSUTF8StringEncoding], &value, sizeof(value), 0, 0) == 0); - } - } - } - - if (ok) { - return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else { - return [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR]; - } -} - -/* remove the file or directory (recursively) - * IN: - * NSString* fullPath - the full path to the file or directory to be removed - * NSString* callbackId - * called from remove and removeRecursively - check all pubic api specific error conditions (dir not empty, etc) before calling - */ - -- (CDVPluginResult*)doRemove:(NSString*)fullPath -{ - CDVPluginResult* result = nil; - BOOL bSuccess = NO; - NSError* __autoreleasing pError = nil; - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - - @try { - bSuccess = [fileMgr removeItemAtPath:fullPath error:&pError]; - if (bSuccess) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else { - // see if we can give a useful error - CDVFileError errorCode = ABORT_ERR; - NSLog(@"error removing filesystem entry at %@: %@", fullPath, [pError localizedDescription]); - if ([pError code] == NSFileNoSuchFileError) { - errorCode = NOT_FOUND_ERR; - } else if ([pError code] == NSFileWriteNoPermissionError) { - errorCode = NO_MODIFICATION_ALLOWED_ERR; - } - - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - } @catch(NSException* e) { // NSInvalidArgumentException if path is . or .. - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:SYNTAX_ERR]; - } - - return result; -} - -- (CDVPluginResult *)removeFileAtURL:(CDVFilesystemURL *)localURI -{ - NSString *fileSystemPath = [self filesystemPathForURL:localURI]; - - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - BOOL bIsDir = NO; - BOOL bExists = [fileMgr fileExistsAtPath:fileSystemPath isDirectory:&bIsDir]; - if (!bExists) { - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - } - if (bIsDir && ([[fileMgr contentsOfDirectoryAtPath:fileSystemPath error:nil] count] != 0)) { - // dir is not empty - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:INVALID_MODIFICATION_ERR]; - } - return [self doRemove:fileSystemPath]; -} - -- (CDVPluginResult *)recursiveRemoveFileAtURL:(CDVFilesystemURL *)localURI -{ - NSString *fileSystemPath = [self filesystemPathForURL:localURI]; - return [self doRemove:fileSystemPath]; -} - -/* - * IN - * NSString localURI - * OUT - * NSString full local filesystem path for the represented file or directory, or nil if no such path is possible - * The file or directory does not necessarily have to exist. nil is returned if the filesystem type is not recognized, - * or if the URL is malformed. - * The incoming URI should be properly escaped (no raw spaces, etc. URI percent-encoding is expected). - */ -- (NSString *)fullPathForFileSystemPath:(NSString *)fsPath -{ - if ([fsPath hasPrefix:self.fsRoot]) { - return [fsPath substringFromIndex:[self.fsRoot length]]; - } - return nil; -} - - -- (CDVPluginResult *)readEntriesAtURL:(CDVFilesystemURL *)localURI -{ - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - NSError* __autoreleasing error = nil; - NSString *fileSystemPath = [self filesystemPathForURL:localURI]; - - NSArray* contents = [fileMgr contentsOfDirectoryAtPath:fileSystemPath error:&error]; - - if (contents) { - NSMutableArray* entries = [NSMutableArray arrayWithCapacity:1]; - if ([contents count] > 0) { - // create an Entry (as JSON) for each file/dir - for (NSString* name in contents) { - // see if is dir or file - NSString* entryPath = [fileSystemPath stringByAppendingPathComponent:name]; - BOOL bIsDir = NO; - [fileMgr fileExistsAtPath:entryPath isDirectory:&bIsDir]; - NSDictionary* entryDict = [self makeEntryForPath:[self fullPathForFileSystemPath:entryPath] isDirectory:bIsDir]; - [entries addObject:entryDict]; - } - } - return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:entries]; - } else { - // assume not found but could check error for more specific error conditions - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - } -} - -- (unsigned long long)truncateFile:(NSString*)filePath atPosition:(unsigned long long)pos -{ - unsigned long long newPos = 0UL; - - NSFileHandle* file = [NSFileHandle fileHandleForWritingAtPath:filePath]; - - if (file) { - [file truncateFileAtOffset:(unsigned long long)pos]; - newPos = [file offsetInFile]; - [file synchronizeFile]; - [file closeFile]; - } - return newPos; -} - -- (CDVPluginResult *)truncateFileAtURL:(CDVFilesystemURL *)localURI atPosition:(unsigned long long)pos -{ - unsigned long long newPos = [self truncateFile:[self filesystemPathForURL:localURI] atPosition:pos]; - return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)newPos]; -} - -- (CDVPluginResult *)writeToFileAtURL:(CDVFilesystemURL *)localURL withData:(NSData*)encData append:(BOOL)shouldAppend -{ - NSString *filePath = [self filesystemPathForURL:localURL]; - - CDVPluginResult* result = nil; - CDVFileError errCode = INVALID_MODIFICATION_ERR; - int bytesWritten = 0; - - if (filePath) { - NSOutputStream* fileStream = [NSOutputStream outputStreamToFileAtPath:filePath append:shouldAppend]; - if (fileStream) { - NSUInteger len = [encData length]; - if (len == 0) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDouble:(double)len]; - } else { - [fileStream open]; - - bytesWritten = (int)[fileStream write:[encData bytes] maxLength:len]; - - [fileStream close]; - if (bytesWritten > 0) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:bytesWritten]; - // } else { - // can probably get more detailed error info via [fileStream streamError] - // errCode already set to INVALID_MODIFICATION_ERR; - // bytesWritten = 0; // may be set to -1 on error - } - } - } // else fileStream not created return INVALID_MODIFICATION_ERR - } else { - // invalid filePath - errCode = NOT_FOUND_ERR; - } - if (!result) { - // was an error - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errCode]; - } - return result; -} - -/** - * Helper function to check to see if the user attempted to copy an entry into its parent without changing its name, - * or attempted to copy a directory into a directory that it contains directly or indirectly. - * - * IN: - * NSString* srcDir - * NSString* destinationDir - * OUT: - * YES copy/ move is allows - * NO move is onto itself - */ -- (BOOL)canCopyMoveSrc:(NSString*)src ToDestination:(NSString*)dest -{ - // This weird test is to determine if we are copying or moving a directory into itself. - // Copy /Documents/myDir to /Documents/myDir-backup is okay but - // Copy /Documents/myDir to /Documents/myDir/backup not okay - BOOL copyOK = YES; - NSRange range = [dest rangeOfString:src]; - - if (range.location != NSNotFound) { - NSRange testRange = {range.length - 1, ([dest length] - range.length)}; - NSRange resultRange = [dest rangeOfString:@"/" options:0 range:testRange]; - if (resultRange.location != NSNotFound) { - copyOK = NO; - } - } - return copyOK; -} - -- (void)copyFileToURL:(CDVFilesystemURL *)destURL withName:(NSString *)newName fromFileSystem:(NSObject *)srcFs atURL:(CDVFilesystemURL *)srcURL copy:(BOOL)bCopy callback:(void (^)(CDVPluginResult *))callback -{ - NSFileManager *fileMgr = [[NSFileManager alloc] init]; - NSString *destRootPath = [self filesystemPathForURL:destURL]; - BOOL bDestIsDir = NO; - BOOL bDestExists = [fileMgr fileExistsAtPath:destRootPath isDirectory:&bDestIsDir]; - - NSString *newFileSystemPath = [destRootPath stringByAppendingPathComponent:newName]; - NSString *newFullPath = [self fullPathForFileSystemPath:newFileSystemPath]; - - BOOL bNewIsDir = NO; - BOOL bNewExists = [fileMgr fileExistsAtPath:newFileSystemPath isDirectory:&bNewIsDir]; - - CDVPluginResult *result = nil; - int errCode = 0; - - if (!bDestExists) { - // the destination root does not exist - errCode = NOT_FOUND_ERR; - } - - else if ([srcFs isKindOfClass:[CDVLocalFilesystem class]]) { - /* Same FS, we can shortcut with NSFileManager operations */ - NSString *srcFullPath = [srcFs filesystemPathForURL:srcURL]; - - BOOL bSrcIsDir = NO; - BOOL bSrcExists = [fileMgr fileExistsAtPath:srcFullPath isDirectory:&bSrcIsDir]; - - if (!bSrcExists) { - // the source does not exist - errCode = NOT_FOUND_ERR; - } else if ([newFileSystemPath isEqualToString:srcFullPath]) { - // source and destination can not be the same - errCode = INVALID_MODIFICATION_ERR; - } else if (bSrcIsDir && (bNewExists && !bNewIsDir)) { - // can't copy/move dir to file - errCode = INVALID_MODIFICATION_ERR; - } else { // no errors yet - NSError* __autoreleasing error = nil; - BOOL bSuccess = NO; - if (bCopy) { - if (bSrcIsDir && ![self canCopyMoveSrc:srcFullPath ToDestination:newFileSystemPath]) { - // can't copy dir into self - errCode = INVALID_MODIFICATION_ERR; - } else if (bNewExists) { - // the full destination should NOT already exist if a copy - errCode = PATH_EXISTS_ERR; - } else { - bSuccess = [fileMgr copyItemAtPath:srcFullPath toPath:newFileSystemPath error:&error]; - } - } else { // move - // iOS requires that destination must not exist before calling moveTo - // is W3C INVALID_MODIFICATION_ERR error if destination dir exists and has contents - // - if (!bSrcIsDir && (bNewExists && bNewIsDir)) { - // can't move a file to directory - errCode = INVALID_MODIFICATION_ERR; - } else if (bSrcIsDir && ![self canCopyMoveSrc:srcFullPath ToDestination:newFileSystemPath]) { - // can't move a dir into itself - errCode = INVALID_MODIFICATION_ERR; - } else if (bNewExists) { - if (bNewIsDir && ([[fileMgr contentsOfDirectoryAtPath:newFileSystemPath error:NULL] count] != 0)) { - // can't move dir to a dir that is not empty - errCode = INVALID_MODIFICATION_ERR; - newFileSystemPath = nil; // so we won't try to move - } else { - // remove destination so can perform the moveItemAtPath - bSuccess = [fileMgr removeItemAtPath:newFileSystemPath error:NULL]; - if (!bSuccess) { - errCode = INVALID_MODIFICATION_ERR; // is this the correct error? - newFileSystemPath = nil; - } - } - } else if (bNewIsDir && [newFileSystemPath hasPrefix:srcFullPath]) { - // can't move a directory inside itself or to any child at any depth; - errCode = INVALID_MODIFICATION_ERR; - newFileSystemPath = nil; - } - - if (newFileSystemPath != nil) { - bSuccess = [fileMgr moveItemAtPath:srcFullPath toPath:newFileSystemPath error:&error]; - } - } - if (bSuccess) { - // should verify it is there and of the correct type??? - NSDictionary* newEntry = [self makeEntryForPath:newFullPath isDirectory:bSrcIsDir]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:newEntry]; - } else { - if (error) { - if (([error code] == NSFileReadUnknownError) || ([error code] == NSFileReadTooLargeError)) { - errCode = NOT_READABLE_ERR; - } else if ([error code] == NSFileWriteOutOfSpaceError) { - errCode = QUOTA_EXCEEDED_ERR; - } else if ([error code] == NSFileWriteNoPermissionError) { - errCode = NO_MODIFICATION_ALLOWED_ERR; - } - } - } - } - } else { - // Need to copy the hard way - [srcFs readFileAtURL:srcURL start:0 end:-1 callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - BOOL bSuccess = [data writeToFile:newFileSystemPath atomically:YES]; - if (bSuccess) { - // should verify it is there and of the correct type??? - NSDictionary* newEntry = [self makeEntryForPath:newFullPath isDirectory:NO]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:newEntry]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:ABORT_ERR]; - } - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - callback(result); - }]; - return; // Async IO; return without callback. - } - if (result == nil) { - if (!errCode) { - errCode = INVALID_MODIFICATION_ERR; // Catch-all default - } - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errCode]; - } - callback(result); -} - -/* helper function to get the mimeType from the file extension - * IN: - * NSString* fullPath - filename (may include path) - * OUT: - * NSString* the mime type as type/subtype. nil if not able to determine - */ -+ (NSString*)getMimeTypeFromPath:(NSString*)fullPath -{ - NSString* mimeType = nil; - - if (fullPath) { - CFStringRef typeId = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)[fullPath pathExtension], NULL); - if (typeId) { - mimeType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass(typeId, kUTTagClassMIMEType); - if (!mimeType) { - // special case for m4a - if ([(__bridge NSString*)typeId rangeOfString : @"m4a-audio"].location != NSNotFound) { - mimeType = @"audio/mp4"; - } else if ([[fullPath pathExtension] rangeOfString:@"wav"].location != NSNotFound) { - mimeType = @"audio/wav"; - } else if ([[fullPath pathExtension] rangeOfString:@"css"].location != NSNotFound) { - mimeType = @"text/css"; - } - } - CFRelease(typeId); - } - } - return mimeType; -} - -- (void)readFileAtURL:(CDVFilesystemURL *)localURL start:(NSInteger)start end:(NSInteger)end callback:(void (^)(NSData*, NSString* mimeType, CDVFileError))callback -{ - NSString *path = [self filesystemPathForURL:localURL]; - - NSString* mimeType = [CDVLocalFilesystem getMimeTypeFromPath:path]; - if (mimeType == nil) { - mimeType = @"*/*"; - } - NSFileHandle* file = [NSFileHandle fileHandleForReadingAtPath:path]; - if (start > 0) { - [file seekToFileOffset:start]; - } - - NSData* readData; - if (end < 0) { - readData = [file readDataToEndOfFile]; - } else { - readData = [file readDataOfLength:(end - start)]; - } - [file closeFile]; - - callback(readData, mimeType, readData != nil ? NO_ERROR : NOT_FOUND_ERR); -} - -- (void)getFileMetadataForURL:(CDVFilesystemURL *)localURL callback:(void (^)(CDVPluginResult *))callback -{ - NSString *path = [self filesystemPathForURL:localURL]; - CDVPluginResult *result; - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - - NSError* __autoreleasing error = nil; - NSDictionary* fileAttrs = [fileMgr attributesOfItemAtPath:path error:&error]; - - if (fileAttrs) { - - // create dictionary of file info - NSMutableDictionary* fileInfo = [NSMutableDictionary dictionaryWithCapacity:5]; - - [fileInfo setObject:localURL.fullPath forKey:@"fullPath"]; - [fileInfo setObject:[self mimeTypeForFileAtPath: path] forKey:@"type"]; - [fileInfo setObject:[path lastPathComponent] forKey:@"name"]; - - // Ensure that directories (and other non-regular files) report size of 0 - unsigned long long size = ([fileAttrs fileType] == NSFileTypeRegular ? [fileAttrs fileSize] : 0); - [fileInfo setObject:[NSNumber numberWithUnsignedLongLong:size] forKey:@"size"]; - - NSDate* modDate = [fileAttrs fileModificationDate]; - if (modDate) { - [fileInfo setObject:[NSNumber numberWithDouble:[modDate timeIntervalSince1970] * 1000] forKey:@"lastModifiedDate"]; - } - - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:fileInfo]; - - } else { - // didn't get fileAttribs - CDVFileError errorCode = ABORT_ERR; - NSLog(@"error getting metadata: %@", [error localizedDescription]); - if ([error code] == NSFileNoSuchFileError || [error code] == NSFileReadNoSuchFileError) { - errorCode = NOT_FOUND_ERR; - } - // log [NSNumber numberWithDouble: theMessage] objCtype to see what it returns - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errorCode]; - } - - callback(result); -} - -// fix errors that base on Alexsander Akers from http://stackoverflow.com/a/5998683/2613194 -- (NSString*) mimeTypeForFileAtPath: (NSString *) path { - if (![[NSFileManager defaultManager] fileExistsAtPath:path]) { - return nil; - } - - CFStringRef UTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)[path pathExtension], NULL); - CFStringRef mimeType = UTTypeCopyPreferredTagWithClass (UTI, kUTTagClassMIMEType); - CFRelease(UTI); - - if (!mimeType) { - return @"application/octet-stream"; - } - return (__bridge NSString *)mimeType; -} - -@end diff --git a/plugins/cordova-plugin-file/src/osx/CDVFile.h b/plugins/cordova-plugin-file/src/osx/CDVFile.h deleted file mode 100644 index 13a9360ea..000000000 --- a/plugins/cordova-plugin-file/src/osx/CDVFile.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import - -NSString* const kCDVFilesystemURLPrefix; - -/** -* The default filesystems if non are specified. -*/ -#define CDV_FILESYSTEMS_DEFAULT @"documents,cache,bundle,root" - -/** -* Preference name of the extra filesystems to be "mounted". the following are supported: -* 'bundle' - mounts the application directory -* 'documents' - mounts the users Documents directory (~/Documents) -* 'root' - mounts the root file system -* 'cache' - mounts the caches directory (~/Library/Caches/ *)srcFs atURL:(CDVFilesystemURL *)srcURL copy:(BOOL)bCopy callback:(void (^)(CDVPluginResult *))callback; -- (void)readFileAtURL:(CDVFilesystemURL *)localURL start:(NSInteger)start end:(NSInteger)end callback:(void (^)(NSData*, NSString* mimeType, CDVFileError))callback; -- (void)getFileMetadataForURL:(CDVFilesystemURL *)localURL callback:(void (^)(CDVPluginResult *))callback; - -- (NSDictionary *)makeEntryForLocalURL:(CDVFilesystemURL *)url; -- (NSDictionary*)makeEntryForPath:(NSString*)fullPath isDirectory:(BOOL)isDir; - -@property (nonatomic,strong) NSString *name; -@property (nonatomic, copy) NSURL*(^urlTransformer)(NSURL*); - -@optional -- (NSString *)filesystemPathForURL:(CDVFilesystemURL *)localURI; -- (CDVFilesystemURL *)URLforFilesystemPath:(NSString *)path; - -@end - -@interface CDVFile : CDVPlugin { - NSString* rootDocsPath; - NSString* appDocsPath; - NSString* appLibraryPath; - NSString* appTempPath; - - NSMutableArray* fileSystems_; - BOOL userHasAllowed; -} - -- (NSNumber*)checkFreeDiskSpace:(NSString*)appPath; -- (NSDictionary*)makeEntryForPath:(NSString*)fullPath fileSystemName:(NSString *)fsName isDirectory:(BOOL)isDir; -- (NSDictionary *)makeEntryForURL:(NSURL *)URL; -- (CDVFilesystemURL *)fileSystemURLforLocalPath:(NSString *)localPath; - -- (NSObject *)filesystemForURL:(CDVFilesystemURL *)localURL; - -/* Native Registration API */ -- (void)registerFilesystem:(NSObject *)fs; -- (NSObject *)fileSystemByName:(NSString *)fsName; - -/* Exec API */ -- (void)requestFileSystem:(CDVInvokedUrlCommand*)command; -- (void)resolveLocalFileSystemURI:(CDVInvokedUrlCommand*)command; -- (void)getDirectory:(CDVInvokedUrlCommand*)command; -- (void)getFile:(CDVInvokedUrlCommand*)command; -- (void)getParent:(CDVInvokedUrlCommand*)command; -- (void)removeRecursively:(CDVInvokedUrlCommand*)command; -- (void)remove:(CDVInvokedUrlCommand*)command; -- (void)copyTo:(CDVInvokedUrlCommand*)command; -- (void)moveTo:(CDVInvokedUrlCommand*)command; -- (void)getFileMetadata:(CDVInvokedUrlCommand*)command; -- (void)readEntries:(CDVInvokedUrlCommand*)command; -- (void)readAsText:(CDVInvokedUrlCommand*)command; -- (void)readAsDataURL:(CDVInvokedUrlCommand*)command; -- (void)readAsArrayBuffer:(CDVInvokedUrlCommand*)command; -- (void)write:(CDVInvokedUrlCommand*)command; -- (void)testFileExists:(CDVInvokedUrlCommand*)command; -- (void)testDirectoryExists:(CDVInvokedUrlCommand*)command; -- (void)getFreeDiskSpace:(CDVInvokedUrlCommand*)command; -- (void)truncate:(CDVInvokedUrlCommand*)command; -- (void)doCopyMove:(CDVInvokedUrlCommand*)command isCopy:(BOOL)bCopy; - -/* Compatibilty with older File API */ -- (NSString*)getMimeTypeFromPath:(NSString*)fullPath; -- (NSDictionary *)getDirectoryEntry:(NSString *)target isDirectory:(BOOL)bDirRequest; - -/* Conversion between filesystem paths and URLs */ -- (NSString *)filesystemPathForURL:(CDVFilesystemURL *)URL; - -/* Internal methods for testing */ -- (void)_getLocalFilesystemPath:(CDVInvokedUrlCommand*)command; - -/** - * local path of the 'documents' file system (~/Documents) - */ -@property (nonatomic, strong) NSString* appDocsPath; - -/** -* local path of the 'applicationStorageDirectory' file system (~/Library/Application Support/) -*/ -@property (nonatomic, strong) NSString* appSupportPath; - -/** -* local path of the 'persistent' file system (~/Library/Application Support//files) -*/ -@property (nonatomic, strong) NSString* appDataPath; - -/** -* local path of the 'documents' file system (~/Documents) -*/ -@property (nonatomic, strong) NSString* appTempPath; - -/** -* local path of the 'cache' file system (~/Library/Caches/) -*/ -@property (nonatomic, strong) NSString* appCachePath; - -/** - * registered file systems - */ -@property (nonatomic, strong) NSMutableArray* fileSystems; - -@property BOOL userHasAllowed; - -@end diff --git a/plugins/cordova-plugin-file/src/osx/CDVFile.m b/plugins/cordova-plugin-file/src/osx/CDVFile.m deleted file mode 100644 index 75a600195..000000000 --- a/plugins/cordova-plugin-file/src/osx/CDVFile.m +++ /dev/null @@ -1,1056 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVFile.h" -#import "CDVLocalFilesystem.h" -#import - -static NSString* toBase64(NSData* data) { - SEL s1 = NSSelectorFromString(@"cdv_base64EncodedString"); - SEL s2 = NSSelectorFromString(@"base64EncodedString"); - SEL s3 = NSSelectorFromString(@"base64EncodedStringWithOptions:"); - - if ([data respondsToSelector:s1]) { - NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s1]; - return func(data, s1); - } else if ([data respondsToSelector:s2]) { - NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s2]; - return func(data, s2); - } else if ([data respondsToSelector:s3]) { - NSString* (*func)(id, SEL, NSUInteger) = (void *)[data methodForSelector:s3]; - return func(data, s3, 0); - } else { - return nil; - } -} - -CDVFile *filePlugin = nil; - -extern NSString * const NSURLIsExcludedFromBackupKey __attribute__((weak_import)); - -#ifndef __IPHONE_5_1 - NSString* const NSURLIsExcludedFromBackupKey = @"NSURLIsExcludedFromBackupKey"; -#endif - -NSString* const kCDVFilesystemURLPrefix = @"cdvfile"; - -@implementation CDVFilesystemURL -@synthesize url=_url; -@synthesize fileSystemName=_fileSystemName; -@synthesize fullPath=_fullPath; - -- (id) initWithString:(NSString *)strURL -{ - if ( self = [super init] ) { - NSURL *decodedURL = [NSURL URLWithString:strURL]; - return [self initWithURL:decodedURL]; - } - return nil; -} - --(id) initWithURL:(NSURL *)URL -{ - if ( self = [super init] ) { - _url = URL; - _fileSystemName = [self filesystemNameForLocalURI:URL]; - _fullPath = [self fullPathForLocalURI:URL]; - } - return self; -} - -/* - * IN - * NSString localURI - * OUT - * NSString FileSystem Name for this URI, or nil if it is not recognized. - */ -- (NSString *)filesystemNameForLocalURI:(NSURL *)uri -{ - if ([[uri scheme] isEqualToString:kCDVFilesystemURLPrefix] && [[uri host] isEqualToString:@"localhost"]) { - NSArray *pathComponents = [uri pathComponents]; - if (pathComponents != nil && pathComponents.count > 1) { - return [pathComponents objectAtIndex:1]; - } - } - return nil; -} - -/* - * IN - * NSString localURI - * OUT - * NSString fullPath component suitable for an Entry object. - * The incoming URI should be properly escaped. The returned fullPath is unescaped. - */ -- (NSString *)fullPathForLocalURI:(NSURL *)uri -{ - if ([[uri scheme] isEqualToString:kCDVFilesystemURLPrefix] && [[uri host] isEqualToString:@"localhost"]) { - NSString *path = [uri path]; - if ([uri query]) { - path = [NSString stringWithFormat:@"%@?%@", path, [uri query]]; - } - NSRange slashRange = [path rangeOfString:@"/" options:0 range:NSMakeRange(1, path.length-1)]; - if (slashRange.location == NSNotFound) { - return @""; - } - return [path substringFromIndex:slashRange.location]; - } - return nil; -} - -+ (CDVFilesystemURL *)fileSystemURLWithString:(NSString *)strURL -{ - return [[CDVFilesystemURL alloc] initWithString:strURL]; -} - -+ (CDVFilesystemURL *)fileSystemURLWithURL:(NSURL *)URL -{ - return [[CDVFilesystemURL alloc] initWithURL:URL]; -} - -- (NSString *)absoluteURL -{ - return [NSString stringWithFormat:@"cdvfile://localhost/%@%@", self.fileSystemName, self.fullPath]; -} - -@end - -@implementation CDVFilesystemURLProtocol - -+ (BOOL)canInitWithRequest:(NSURLRequest*)request -{ - NSURL* url = [request URL]; - return [[url scheme] isEqualToString:kCDVFilesystemURLPrefix]; -} - -+ (NSURLRequest*)canonicalRequestForRequest:(NSURLRequest*)request -{ - return request; -} - -+ (BOOL)requestIsCacheEquivalent:(NSURLRequest*)requestA toRequest:(NSURLRequest*)requestB -{ - return [[[requestA URL] resourceSpecifier] isEqualToString:[[requestB URL] resourceSpecifier]]; -} - -- (void)startLoading -{ - CDVFilesystemURL* url = [CDVFilesystemURL fileSystemURLWithURL:[[self request] URL]]; - NSObject *fs = [filePlugin filesystemForURL:url]; - [fs readFileAtURL:url start:0 end:-1 callback:^void(NSData *data, NSString *mimetype, CDVFileError error) { - NSMutableDictionary* responseHeaders = [[NSMutableDictionary alloc] init]; - responseHeaders[@"Cache-Control"] = @"no-cache"; - - if (!error) { - responseHeaders[@"Content-Type"] = mimetype; - NSURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:url.url statusCode:200 HTTPVersion:@"HTTP/1.1"headerFields:responseHeaders]; - [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; - [[self client] URLProtocol:self didLoadData:data]; - [[self client] URLProtocolDidFinishLoading:self]; - } else { - NSURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:url.url statusCode:404 HTTPVersion:@"HTTP/1.1"headerFields:responseHeaders]; - [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; - [[self client] URLProtocolDidFinishLoading:self]; - } - }]; -} - -- (void)stopLoading -{} - -- (NSCachedURLResponse *)connection:(NSURLConnection *)connection - willCacheResponse:(NSCachedURLResponse*)cachedResponse { - return nil; -} - -@end - - -@implementation CDVFile - -@synthesize appDocsPath, appDataPath, appSupportPath, appTempPath, appCachePath, userHasAllowed, fileSystems=fileSystems_; - -- (void)registerFilesystem:(NSObject *)fs { - __weak CDVFile* weakSelf = self; - SEL sel = NSSelectorFromString(@"urlTransformer"); - // for backwards compatibility - we check if this property is there - // we create a wrapper block because the urlTransformer property - // on the commandDelegate might be set dynamically at a future time - // (and not dependent on plugin loading order) - if ([self.commandDelegate respondsToSelector:sel]) { - fs.urlTransformer = ^NSURL*(NSURL* urlToTransform) { - // grab the block from the commandDelegate - NSURL* (^urlTransformer)(NSURL*) = ((id(*)(id, SEL))objc_msgSend)(weakSelf.commandDelegate, sel); - // if block is not null, we call it - if (urlTransformer) { - return urlTransformer(urlToTransform); - } else { // else we return the same url - return urlToTransform; - } - }; - } - [fileSystems_ addObject:fs]; -} - -- (NSObject *)fileSystemByName:(NSString *)fsName -{ - if (self.fileSystems != nil) { - for (NSObject *fs in self.fileSystems) { - if ([fs.name isEqualToString:fsName]) { - return fs; - } - } - } - return nil; - -} - -- (NSObject *)filesystemForURL:(CDVFilesystemURL *)localURL { - if (localURL.fileSystemName == nil) return nil; - @try { - return [self fileSystemByName:localURL.fileSystemName]; - } - @catch (NSException *e) { - return nil; - } -} - -- (NSArray *)getExtraFileSystemsPreference:(NSWindowController *)vc -{ - NSString *filesystemsStr = nil; - if([self.viewController isKindOfClass:[CDVViewController class]]) { - CDVViewController *vc = self.viewController; - NSDictionary *settings = [vc settings]; - filesystemsStr = [settings[CDV_PREF_EXTRA_FILESYSTEM] lowercaseString]; - } - if (!filesystemsStr) { - filesystemsStr = CDV_FILESYSTEMS_DEFAULT; - } - return [filesystemsStr componentsSeparatedByString:@","]; -} - -- (void)makeNonSyncable:(NSString*)path { - [[NSFileManager defaultManager] createDirectoryAtPath:path - withIntermediateDirectories:YES - attributes:nil - error:nil]; - NSURL* url = [NSURL fileURLWithPath:path]; - [url setResourceValue: [NSNumber numberWithBool: YES] - forKey: NSURLIsExcludedFromBackupKey error:nil]; - -} - -- (void)registerExtraFileSystems:(NSArray *)filesystems fromAvailableSet:(NSDictionary *)availableFileSystems -{ - NSMutableSet *installedFilesystems = [[NSMutableSet alloc] initWithCapacity:7]; - - /* Register filesystems in order */ - for (NSString *fsName in filesystems) { - if (![installedFilesystems containsObject:fsName]) { - NSString *fsRoot = availableFileSystems[fsName]; - if (fsRoot) { - [filePlugin registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:fsName root:fsRoot]]; - [installedFilesystems addObject:fsName]; - } else { - NSLog(@"Unrecognized extra filesystem identifier: %@", fsName); - } - } - } -} - -- (NSDictionary *)getAvailableFileSystems -{ - return @{ - @"documents": self.appDocsPath, - @"cache": self.appCachePath, - @"bundle": [[NSBundle mainBundle] bundlePath], - @"root": @"/" - }; -} - -- (void)pluginInitialize -{ filePlugin = self; - [NSURLProtocol registerClass:[CDVFilesystemURLProtocol class]]; - - fileSystems_ = [[NSMutableArray alloc] initWithCapacity:3]; - - // Get the Temporary directory path - self.appTempPath = [NSTemporaryDirectory()stringByStandardizingPath]; // remove trailing slash from NSTemporaryDirectory() - [self registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:@"temporary" root:self.appTempPath]]; - - // ~/Library/Application Support/ - self.appSupportPath = [self getSupportDirectoryFor:NSApplicationSupportDirectory pathComponents:nil]; - - // ~/Library/Application Support//files - self.appDataPath = [self getSupportDirectoryFor:NSApplicationSupportDirectory pathComponents:@[@"files"]]; - [self registerFilesystem:[[CDVLocalFilesystem alloc] initWithName:@"persistent" root:self.appDataPath]]; - - // ~/Documents/ - self.appDocsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; - - // ~/Library/Caches//files - self.appCachePath = [self getSupportDirectoryFor:NSCachesDirectory pathComponents:nil]; - - [self registerExtraFileSystems:[self getExtraFileSystemsPreference:self.viewController] - fromAvailableSet:[self getAvailableFileSystems]]; -} - -- (NSString*) getSupportDirectoryFor: (NSSearchPathDirectory) directory pathComponents: (NSArray*) components { - NSError* error; - NSFileManager* fm = [NSFileManager defaultManager]; - NSURL* supportDir = [fm URLForDirectory:directory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:&error]; - if (supportDir == nil) { - NSLog(@"unable to get support directory: %@", error); - return nil; - } - - NSString* bundleID = [[NSBundle mainBundle] bundleIdentifier]; - NSURL *dirPath = [supportDir URLByAppendingPathComponent:bundleID]; - for (NSString* pathComponent in components) { - dirPath = [dirPath URLByAppendingPathComponent:pathComponent]; - } - - if (![fm fileExistsAtPath:dirPath.path]) { - if (![fm createDirectoryAtURL:dirPath withIntermediateDirectories:YES attributes:nil error:&error]) { - NSLog(@"unable to create support directory: %@", error); - return nil; - } - } - return dirPath.path; -} - - -- (CDVFilesystemURL *)fileSystemURLforArg:(NSString *)urlArg -{ - CDVFilesystemURL* ret = nil; - if ([urlArg hasPrefix:@"file://"]) { - /* This looks like a file url. Get the path, and see if any handlers recognize it. */ - NSURL *fileURL = [NSURL URLWithString:urlArg]; - NSURL *resolvedFileURL = [fileURL URLByResolvingSymlinksInPath]; - NSString *path = [resolvedFileURL path]; - ret = [self fileSystemURLforLocalPath:path]; - } else { - ret = [CDVFilesystemURL fileSystemURLWithString:urlArg]; - } - return ret; -} - -- (CDVFilesystemURL *)fileSystemURLforLocalPath:(NSString *)localPath -{ - CDVFilesystemURL *localURL = nil; - NSUInteger shortestFullPath = 0; - - // Try all installed filesystems, in order. Return the most match url. - for (id object in self.fileSystems) { - if ([object respondsToSelector:@selector(URLforFilesystemPath:)]) { - CDVFilesystemURL *url = [object URLforFilesystemPath:localPath]; - if (url){ - // A shorter fullPath would imply that the filesystem is a better match for the local path - if (!localURL || ([[url fullPath] length] < shortestFullPath)) { - localURL = url; - shortestFullPath = [[url fullPath] length]; - } - } - } - } - return localURL; -} - -- (NSNumber*)checkFreeDiskSpace:(NSString*)appPath -{ - NSFileManager* fMgr = [[NSFileManager alloc] init]; - - NSError* __autoreleasing pError = nil; - - NSDictionary* pDict = [fMgr attributesOfFileSystemForPath:appPath error:&pError]; - NSNumber* pNumAvail = (NSNumber*)[pDict objectForKey:NSFileSystemFreeSize]; - - return pNumAvail; -} - -/* Request the File System info - * - * IN: - * arguments[0] - type (number as string) - * TEMPORARY = 0, PERSISTENT = 1; - * arguments[1] - size - * - * OUT: - * Dictionary representing FileSystem object - * name - the human readable directory name - * root = DirectoryEntry object - * bool isDirectory - * bool isFile - * string name - * string fullPath - * fileSystem = FileSystem object - !! ignored because creates circular reference !! - */ - -- (void)requestFileSystem:(CDVInvokedUrlCommand*)command -{ - // arguments - NSString* strType = [command argumentAtIndex:0]; - unsigned long long size = [[command argumentAtIndex:1] longLongValue]; - - int type = [strType intValue]; - CDVPluginResult* result = nil; - - if (type > self.fileSystems.count) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:NOT_FOUND_ERR]; - NSLog(@"No filesystem of type requested"); - } else { - NSString* fullPath = @"/"; - // check for avail space for size request - NSNumber* pNumAvail = [self checkFreeDiskSpace:self.appSupportPath]; - // NSLog(@"Free space: %@", [NSString stringWithFormat:@"%qu", [ pNumAvail unsignedLongLongValue ]]); - if (pNumAvail && ([pNumAvail unsignedLongLongValue] < size)) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:QUOTA_EXCEEDED_ERR]; - } else { - NSObject *rootFs = [self.fileSystems objectAtIndex:type]; - if (rootFs == nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:NOT_FOUND_ERR]; - NSLog(@"No filesystem of type requested"); - } else { - NSMutableDictionary* fileSystem = [NSMutableDictionary dictionaryWithCapacity:2]; - [fileSystem setObject:rootFs.name forKey:@"name"]; - NSDictionary* dirEntry = [self makeEntryForPath:fullPath fileSystemName:rootFs.name isDirectory:YES]; - [fileSystem setObject:dirEntry forKey:@"root"]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:fileSystem]; - } - } - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - - -- (void)requestAllFileSystems:(CDVInvokedUrlCommand*)command -{ - NSMutableArray* ret = [[NSMutableArray alloc] init]; - for (NSObject* root in fileSystems_) { - [ret addObject:[self makeEntryForPath:@"/" fileSystemName:root.name isDirectory:YES]]; - } - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:ret]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -- (void)requestAllPaths:(CDVInvokedUrlCommand*)command -{ - NSDictionary* ret = @{ - @"applicationDirectory": [[NSURL fileURLWithPath:[[NSBundle mainBundle] resourcePath]] absoluteString], - @"applicationStorageDirectory": [[NSURL fileURLWithPath:self.appSupportPath] absoluteString], - @"dataDirectory": [[NSURL fileURLWithPath:self.appDataPath] absoluteString], - @"documentsDirectory": [[NSURL fileURLWithPath:self.appDocsPath] absoluteString], - @"cacheDirectory": [[NSURL fileURLWithPath:self.appCachePath] absoluteString], - @"tempDirectory":[[NSURL fileURLWithPath:self.appTempPath] absoluteString], - @"rootDirectory": @"file:///", - }; - - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:ret]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* Creates and returns a dictionary representing an Entry Object - * - * IN: - * NSString* fullPath of the entry - * int fsType - FileSystem type - * BOOL isDirectory - YES if this is a directory, NO if is a file - * OUT: - * NSDictionary* Entry object - * bool as NSNumber isDirectory - * bool as NSNumber isFile - * NSString* name - last part of path - * NSString* fullPath - * NSString* filesystemName - FileSystem name -- actual filesystem will be created on the JS side if necessary, to avoid - * creating circular reference (FileSystem contains DirectoryEntry which contains FileSystem.....!!) - */ -- (NSDictionary*)makeEntryForPath:(NSString*)fullPath fileSystemName:(NSString *)fsName isDirectory:(BOOL)isDir -{ - NSObject *fs = [self fileSystemByName:fsName]; - return [fs makeEntryForPath:fullPath isDirectory:isDir]; -} - -- (NSDictionary *)makeEntryForLocalURL:(CDVFilesystemURL *)localURL -{ - NSObject *fs = [self filesystemForURL:localURL]; - return [fs makeEntryForLocalURL:localURL]; -} - -- (NSDictionary *)makeEntryForURL:(NSURL *)URL -{ - CDVFilesystemURL* fsURL = [self fileSystemURLforArg:[URL absoluteString]]; - return [self makeEntryForLocalURL:fsURL]; -} - -/* - * Given a URI determine the File System information associated with it and return an appropriate W3C entry object - * IN - * NSString* localURI: Should be an escaped local filesystem URI - * OUT - * Entry object - * bool isDirectory - * bool isFile - * string name - * string fullPath - * fileSystem = FileSystem object - !! ignored because creates circular reference FileSystem contains DirectoryEntry which contains FileSystem.....!! - */ -- (void)resolveLocalFileSystemURI:(CDVInvokedUrlCommand*)command -{ - // arguments - NSString* localURIstr = [command argumentAtIndex:0]; - CDVPluginResult* result; - - localURIstr = [self encodePath:localURIstr]; //encode path before resolving - CDVFilesystemURL* inputURI = [self fileSystemURLforArg:localURIstr]; - - if (inputURI == nil || inputURI.fileSystemName == nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:ENCODING_ERR]; - } else { - NSObject *fs = [self filesystemForURL:inputURI]; - if (fs == nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:ENCODING_ERR]; - } else { - result = [fs entryForLocalURI:inputURI]; - } - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -//encode path with percent escapes --(NSString *)encodePath:(NSString *)path -{ - NSString *decodedPath = [path stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; //decode incase it's already encoded to avoid encoding twice - return [decodedPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; -} - - -/* Part of DirectoryEntry interface, creates or returns the specified directory - * IN: - * NSString* localURI - local filesystem URI for this directory - * NSString* path - directory to be created/returned; may be full path or relative path - * NSDictionary* - Flags object - * boolean as NSNumber create - - * if create is true and directory does not exist, create dir and return directory entry - * if create is true and exclusive is true and directory does exist, return error - * if create is false and directory does not exist, return error - * if create is false and the path represents a file, return error - * boolean as NSNumber exclusive - used in conjunction with create - * if exclusive is true and create is true - specifies failure if directory already exists - * - * - */ -- (void)getDirectory:(CDVInvokedUrlCommand*)command -{ - NSMutableArray* arguments = [NSMutableArray arrayWithArray:command.arguments]; - NSMutableDictionary* options = nil; - - if ([arguments count] >= 3) { - options = [command argumentAtIndex:2 withDefault:nil]; - } - // add getDir to options and call getFile() - if (options != nil) { - options = [NSMutableDictionary dictionaryWithDictionary:options]; - } else { - options = [NSMutableDictionary dictionaryWithCapacity:1]; - } - [options setObject:[NSNumber numberWithInt:1] forKey:@"getDir"]; - if ([arguments count] >= 3) { - [arguments replaceObjectAtIndex:2 withObject:options]; - } else { - [arguments addObject:options]; - } - CDVInvokedUrlCommand* subCommand = - [[CDVInvokedUrlCommand alloc] initWithArguments:arguments - callbackId:command.callbackId - className:command.className - methodName:command.methodName]; - - [self getFile:subCommand]; -} - -/* Part of DirectoryEntry interface, creates or returns the specified file - * IN: - * NSString* baseURI - local filesytem URI for the base directory to search - * NSString* requestedPath - file to be created/returned; may be absolute path or relative path - * NSDictionary* options - Flags object - * boolean as NSNumber create - - * if create is true and file does not exist, create file and return File entry - * if create is true and exclusive is true and file does exist, return error - * if create is false and file does not exist, return error - * if create is false and the path represents a directory, return error - * boolean as NSNumber exclusive - used in conjunction with create - * if exclusive is true and create is true - specifies failure if file already exists - */ -- (void)getFile:(CDVInvokedUrlCommand*)command -{ - NSString* baseURIstr = [command argumentAtIndex:0]; - CDVFilesystemURL* baseURI = [self fileSystemURLforArg:baseURIstr]; - NSString* requestedPath = [command argumentAtIndex:1]; - NSDictionary* options = [command argumentAtIndex:2 withDefault:nil]; - - NSObject *fs = [self filesystemForURL:baseURI]; - CDVPluginResult* result = [fs getFileForURL:baseURI requestedPath:requestedPath options:options]; - - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* - * Look up the parent Entry containing this Entry. - * If this Entry is the root of its filesystem, its parent is itself. - * IN: - * NSArray* arguments - * 0 - NSString* localURI - * NSMutableDictionary* options - * empty - */ -- (void)getParent:(CDVInvokedUrlCommand*)command -{ - // arguments are URL encoded - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - - NSObject *fs = [self filesystemForURL:localURI]; - CDVPluginResult* result = [fs getParentForURL:localURI]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* - * set MetaData of entry - * Currently we only support "com.apple.MobileBackup" (boolean) - */ -- (void)setMetadata:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSDictionary* options = [command argumentAtIndex:1 withDefault:nil]; - NSObject *fs = [self filesystemForURL:localURI]; - CDVPluginResult* result = [fs setMetadataForURL:localURI withObject:options]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* removes the directory or file entry - * IN: - * NSArray* arguments - * 0 - NSString* localURI - * - * returns NO_MODIFICATION_ALLOWED_ERR if is top level directory or no permission to delete dir - * returns INVALID_MODIFICATION_ERR if is non-empty dir or asset library file - * returns NOT_FOUND_ERR if file or dir is not found -*/ -- (void)remove:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - CDVPluginResult* result = nil; - - if ([localURI.fullPath isEqualToString:@""]) { - // error if try to remove top level (documents or tmp) dir - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NO_MODIFICATION_ALLOWED_ERR]; - } else { - NSObject *fs = [self filesystemForURL:localURI]; - result = [fs removeFileAtURL:localURI]; - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* recursively removes the directory - * IN: - * NSArray* arguments - * 0 - NSString* localURI - * - * returns NO_MODIFICATION_ALLOWED_ERR if is top level directory or no permission to delete dir - * returns NOT_FOUND_ERR if file or dir is not found - */ -- (void)removeRecursively:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - CDVPluginResult* result = nil; - - if ([localURI.fullPath isEqualToString:@""]) { - // error if try to remove top level (documents or tmp) dir - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NO_MODIFICATION_ALLOWED_ERR]; - } else { - NSObject *fs = [self filesystemForURL:localURI]; - result = [fs recursiveRemoveFileAtURL:localURI]; - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -- (void)copyTo:(CDVInvokedUrlCommand*)command -{ - [self doCopyMove:command isCopy:YES]; -} - -- (void)moveTo:(CDVInvokedUrlCommand*)command -{ - [self doCopyMove:command isCopy:NO]; -} - -/* Copy/move a file or directory to a new location - * IN: - * NSArray* arguments - * 0 - NSString* URL of entry to copy - * 1 - NSString* URL of the directory into which to copy/move the entry - * 2 - Optionally, the new name of the entry, defaults to the current name - * BOOL - bCopy YES if copy, NO if move - */ -- (void)doCopyMove:(CDVInvokedUrlCommand*)command isCopy:(BOOL)bCopy -{ - NSArray* arguments = command.arguments; - - // arguments - NSString* srcURLstr = [command argumentAtIndex:0]; - NSString* destURLstr = [command argumentAtIndex:1]; - - CDVPluginResult *result; - - if (!srcURLstr || !destURLstr) { - // either no source or no destination provided - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - return; - } - - CDVFilesystemURL* srcURL = [self fileSystemURLforArg:srcURLstr]; - CDVFilesystemURL* destURL = [self fileSystemURLforArg:destURLstr]; - - NSObject *srcFs = [self filesystemForURL:srcURL]; - NSObject *destFs = [self filesystemForURL:destURL]; - - // optional argument; use last component from srcFullPath if new name not provided - NSString* newName = ([arguments count] > 2) ? [command argumentAtIndex:2] : [srcURL.url lastPathComponent]; - if ([newName rangeOfString:@":"].location != NSNotFound) { - // invalid chars in new name - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:ENCODING_ERR]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - return; - } - - [destFs copyFileToURL:destURL withName:newName fromFileSystem:srcFs atURL:srcURL copy:bCopy callback:^(CDVPluginResult* result) { - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - -} - -- (void)getFileMetadata:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSObject *fs = [self filesystemForURL:localURI]; - - [fs getFileMetadataForURL:localURI callback:^(CDVPluginResult* result) { - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; -} - -- (void)readEntries:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSObject *fs = [self filesystemForURL:localURI]; - CDVPluginResult *result = [fs readEntriesAtURL:localURI]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* read and return file data - * IN: - * NSArray* arguments - * 0 - NSString* fullPath - * 1 - NSString* encoding - * 2 - NSString* start - * 3 - NSString* end - */ -- (void)readAsText:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSString* encoding = [command argumentAtIndex:1]; - NSInteger start = [[command argumentAtIndex:2] integerValue]; - NSInteger end = [[command argumentAtIndex:3] integerValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - if (fs == nil) { - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - return; - } - - // TODO: implement - if ([@"UTF-8" caseInsensitiveCompare : encoding] != NSOrderedSame) { - NSLog(@"Only UTF-8 encodings are currently supported by readAsText"); - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:ENCODING_ERR]; - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - return; - } - - [self.commandDelegate runInBackground:^ { - [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - NSString* str = [[NSString alloc] initWithBytesNoCopy:(void*)[data bytes] length:[data length] encoding:NSUTF8StringEncoding freeWhenDone:NO]; - // Check that UTF8 conversion did not fail. - if (str != nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:str]; - result.associatedObject = data; - } else { - errorCode = ENCODING_ERR; - } - } - if (result == nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - }]; -} - -/* Read content of text file and return as base64 encoded data url. - * IN: - * NSArray* arguments - * 0 - NSString* fullPath - * 1 - NSString* start - * 2 - NSString* end - * - * Determines the mime type from the file extension, returns ENCODING_ERR if mimetype can not be determined. - */ - -- (void)readAsDataURL:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSInteger start = [[command argumentAtIndex:1] integerValue]; - NSInteger end = [[command argumentAtIndex:2] integerValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - [self.commandDelegate runInBackground:^ { - [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - NSString* b64Str = toBase64(data); - NSString* output = [NSString stringWithFormat:@"data:%@;base64,%@", mimeType, b64Str]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:output]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - }]; -} - -/* Read content of text file and return as an arraybuffer - * IN: - * NSArray* arguments - * 0 - NSString* fullPath - * 1 - NSString* start - * 2 - NSString* end - */ - -- (void)readAsArrayBuffer:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSInteger start = [[command argumentAtIndex:1] integerValue]; - NSInteger end = [[command argumentAtIndex:2] integerValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - [self.commandDelegate runInBackground:^ { - [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArrayBuffer:data]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - }]; -} - -- (void)readAsBinaryString:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - NSInteger start = [[command argumentAtIndex:1] integerValue]; - NSInteger end = [[command argumentAtIndex:2] integerValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - [self.commandDelegate runInBackground:^ { - [fs readFileAtURL:localURI start:start end:end callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - NSString* payload = [[NSString alloc] initWithBytesNoCopy:(void*)[data bytes] length:[data length] encoding:NSASCIIStringEncoding freeWhenDone:NO]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:payload]; - result.associatedObject = data; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; - }]; - }]; -} - - -- (void)truncate:(CDVInvokedUrlCommand*)command -{ - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - unsigned long long pos = (unsigned long long)[[command argumentAtIndex:1] longLongValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - CDVPluginResult *result = [fs truncateFileAtURL:localURI atPosition:pos]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -/* write - * IN: - * NSArray* arguments - * 0 - NSString* localURI of file to write to - * 1 - NSString* or NSData* data to write - * 2 - NSNumber* position to begin writing - */ -- (void)write:(CDVInvokedUrlCommand*)command -{ - [self.commandDelegate runInBackground:^ { - NSString* callbackId = command.callbackId; - - // arguments - CDVFilesystemURL* localURI = [self fileSystemURLforArg:command.arguments[0]]; - id argData = [command argumentAtIndex:1]; - unsigned long long pos = (unsigned long long)[[command argumentAtIndex:2] longLongValue]; - - NSObject *fs = [self filesystemForURL:localURI]; - - - [fs truncateFileAtURL:localURI atPosition:pos]; - CDVPluginResult *result; - if ([argData isKindOfClass:[NSString class]]) { - NSData *encData = [argData dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; - result = [fs writeToFileAtURL:localURI withData:encData append:YES]; - } else if ([argData isKindOfClass:[NSData class]]) { - result = [fs writeToFileAtURL:localURI withData:argData append:YES]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Invalid parameter type"]; - } - [self.commandDelegate sendPluginResult:result callbackId:callbackId]; - }]; -} - -#pragma mark Methods for converting between URLs and paths - -- (NSString *)filesystemPathForURL:(CDVFilesystemURL *)localURL -{ - for (NSObject *fs in self.fileSystems) { - if ([fs.name isEqualToString:localURL.fileSystemName]) { - if ([fs respondsToSelector:@selector(filesystemPathForURL:)]) { - return [fs filesystemPathForURL:localURL]; - } - } - } - return nil; -} - -#pragma mark Undocumented Filesystem API - -- (void)testFileExists:(CDVInvokedUrlCommand*)command -{ - // arguments - NSString* argPath = [command argumentAtIndex:0]; - - // Get the file manager - NSFileManager* fMgr = [NSFileManager defaultManager]; - NSString* appFile = argPath; // [ self getFullPath: argPath]; - - BOOL bExists = [fMgr fileExistsAtPath:appFile]; - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(bExists ? 1 : 0)]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -- (void)testDirectoryExists:(CDVInvokedUrlCommand*)command -{ - // arguments - NSString* argPath = [command argumentAtIndex:0]; - - // Get the file manager - NSFileManager* fMgr = [[NSFileManager alloc] init]; - NSString* appFile = argPath; // [self getFullPath: argPath]; - BOOL bIsDir = NO; - BOOL bExists = [fMgr fileExistsAtPath:appFile isDirectory:&bIsDir]; - - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:((bExists && bIsDir) ? 1 : 0)]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -// Returns number of bytes available via callback -- (void)getFreeDiskSpace:(CDVInvokedUrlCommand*)command -{ - // no arguments - - NSNumber* pNumAvail = [self checkFreeDiskSpace:self.appDocsPath]; - - NSString* strFreeSpace = [NSString stringWithFormat:@"%qu", [pNumAvail unsignedLongLongValue]]; - // NSLog(@"Free space is %@", strFreeSpace ); - - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:strFreeSpace]; - - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -#pragma mark Compatibility with older File API - -- (NSString*)getMimeTypeFromPath:(NSString*)fullPath -{ - return [CDVLocalFilesystem getMimeTypeFromPath:fullPath]; -} - -- (NSDictionary *)getDirectoryEntry:(NSString *)localPath isDirectory:(BOOL)bDirRequest -{ - CDVFilesystemURL *localURL = [self fileSystemURLforLocalPath:localPath]; - return [self makeEntryForPath:localURL.fullPath fileSystemName:localURL.fileSystemName isDirectory:bDirRequest]; -} - -#pragma mark Internal methods for testing -// Internal methods for testing: Get the on-disk location of a local filesystem url. -// [Currently used for testing file-transfer] - -- (void)_getLocalFilesystemPath:(CDVInvokedUrlCommand*)command -{ - CDVFilesystemURL* localURL = [self fileSystemURLforArg:command.arguments[0]]; - - NSString* fsPath = [self filesystemPathForURL:localURL]; - CDVPluginResult* result; - if (fsPath) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:fsPath]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Cannot resolve URL to a file"]; - } - [self.commandDelegate sendPluginResult:result callbackId:command.callbackId]; -} - -@end diff --git a/plugins/cordova-plugin-file/src/osx/CDVLocalFilesystem.h b/plugins/cordova-plugin-file/src/osx/CDVLocalFilesystem.h deleted file mode 100644 index a0186c853..000000000 --- a/plugins/cordova-plugin-file/src/osx/CDVLocalFilesystem.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVFile.h" - -@interface CDVLocalFilesystem : NSObject { - NSString *_name; - NSString *_fsRoot; -} - -- (id) initWithName:(NSString *)name root:(NSString *)fsRoot; -+ (NSString*)getMimeTypeFromPath:(NSString*)fullPath; - -@property (nonatomic,strong) NSString *fsRoot; - -@end diff --git a/plugins/cordova-plugin-file/src/osx/CDVLocalFilesystem.m b/plugins/cordova-plugin-file/src/osx/CDVLocalFilesystem.m deleted file mode 100644 index 016e39994..000000000 --- a/plugins/cordova-plugin-file/src/osx/CDVLocalFilesystem.m +++ /dev/null @@ -1,733 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVFile.h" -#import "CDVLocalFilesystem.h" -#import - -@implementation CDVLocalFilesystem -@synthesize name=_name, fsRoot=_fsRoot, urlTransformer; - -- (id) initWithName:(NSString *)name root:(NSString *)fsRoot -{ - if (self) { - _name = name; - _fsRoot = fsRoot; - } - return self; -} - -/* - * IN - * NSString localURI - * OUT - * CDVPluginResult result containing a file or directoryEntry for the localURI, or an error if the - * URI represents a non-existent path, or is unrecognized or otherwise malformed. - */ -- (CDVPluginResult *)entryForLocalURI:(CDVFilesystemURL *)url -{ - CDVPluginResult* result = nil; - NSDictionary* entry = [self makeEntryForLocalURL:url]; - if (entry) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:entry]; - } else { - // return NOT_FOUND_ERR - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - } - return result; -} -- (NSDictionary *)makeEntryForLocalURL:(CDVFilesystemURL *)url { - NSString *path = [self filesystemPathForURL:url]; - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - BOOL isDir = NO; - // see if exists and is file or dir - BOOL bExists = [fileMgr fileExistsAtPath:path isDirectory:&isDir]; - if (bExists) { - return [self makeEntryForPath:url.fullPath isDirectory:isDir]; - } else { - return nil; - } -} -- (NSDictionary*)makeEntryForPath:(NSString*)fullPath isDirectory:(BOOL)isDir -{ - NSMutableDictionary* dirEntry = [NSMutableDictionary dictionaryWithCapacity:5]; - NSString* lastPart = [[self stripQueryParametersFromPath:fullPath] lastPathComponent]; - if (isDir && ![fullPath hasSuffix:@"/"]) { - fullPath = [fullPath stringByAppendingString:@"/"]; - } - [dirEntry setObject:[NSNumber numberWithBool:!isDir] forKey:@"isFile"]; - [dirEntry setObject:[NSNumber numberWithBool:isDir] forKey:@"isDirectory"]; - [dirEntry setObject:fullPath forKey:@"fullPath"]; - [dirEntry setObject:lastPart forKey:@"name"]; - [dirEntry setObject:self.name forKey: @"filesystemName"]; - - NSURL* nativeURL = [NSURL fileURLWithPath:[self filesystemPathForFullPath:fullPath]]; - if (self.urlTransformer) { - nativeURL = self.urlTransformer(nativeURL); - } - - dirEntry[@"nativeURL"] = [nativeURL absoluteString]; - - return dirEntry; -} - -- (NSString *)stripQueryParametersFromPath:(NSString *)fullPath -{ - NSRange questionMark = [fullPath rangeOfString:@"?"]; - if (questionMark.location != NSNotFound) { - return [fullPath substringWithRange:NSMakeRange(0,questionMark.location)]; - } - return fullPath; -} - -- (NSString *)filesystemPathForFullPath:(NSString *)fullPath -{ - NSString *path = nil; - NSString *strippedFullPath = [self stripQueryParametersFromPath:fullPath]; - path = [NSString stringWithFormat:@"%@%@", self.fsRoot, strippedFullPath]; - if ([path length] > 1 && [path hasSuffix:@"/"]) { - path = [path substringToIndex:([path length]-1)]; - } - return path; -} -/* - * IN - * NSString localURI - * OUT - * NSString full local filesystem path for the represented file or directory, or nil if no such path is possible - * The file or directory does not necessarily have to exist. nil is returned if the filesystem type is not recognized, - * or if the URL is malformed. - * The incoming URI should be properly escaped (no raw spaces, etc. URI percent-encoding is expected). - */ -- (NSString *)filesystemPathForURL:(CDVFilesystemURL *)url -{ - return [self filesystemPathForFullPath:url.fullPath]; -} - -- (CDVFilesystemURL *)URLforFullPath:(NSString *)fullPath -{ - if (fullPath) { - NSString* escapedPath = [fullPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - if ([fullPath hasPrefix:@"/"]) { - return [CDVFilesystemURL fileSystemURLWithString:[NSString stringWithFormat:@"%@://localhost/%@%@", kCDVFilesystemURLPrefix, self.name, escapedPath]]; - } - return [CDVFilesystemURL fileSystemURLWithString:[NSString stringWithFormat:@"%@://localhost/%@/%@", kCDVFilesystemURLPrefix, self.name, escapedPath]]; - } - return nil; -} - -- (CDVFilesystemURL *)URLforFilesystemPath:(NSString *)path -{ - return [self URLforFullPath:[self fullPathForFileSystemPath:path]]; - -} - -- (NSString *)normalizePath:(NSString *)rawPath -{ - // If this is an absolute path, the first path component will be '/'. Skip it if that's the case - BOOL isAbsolutePath = [rawPath hasPrefix:@"/"]; - if (isAbsolutePath) { - rawPath = [rawPath substringFromIndex:1]; - } - NSMutableArray *components = [NSMutableArray arrayWithArray:[rawPath pathComponents]]; - for (int index = 0; index < [components count]; ++index) { - if ([[components objectAtIndex:index] isEqualToString:@".."]) { - [components removeObjectAtIndex:index]; - if (index > 0) { - [components removeObjectAtIndex:index-1]; - --index; - } - } - } - - if (isAbsolutePath) { - return [NSString stringWithFormat:@"/%@", [components componentsJoinedByString:@"/"]]; - } else { - return [components componentsJoinedByString:@"/"]; - } - - -} - -- (BOOL)valueForKeyIsNumber:(NSDictionary*)dict key:(NSString*)key -{ - BOOL bNumber = NO; - NSObject* value = dict[key]; - if (value) { - bNumber = [value isKindOfClass:[NSNumber class]]; - } - return bNumber; -} - -- (CDVPluginResult *)getFileForURL:(CDVFilesystemURL *)baseURI requestedPath:(NSString *)requestedPath options:(NSDictionary *)options -{ - CDVPluginResult* result = nil; - BOOL bDirRequest = NO; - BOOL create = NO; - BOOL exclusive = NO; - int errorCode = 0; // !!! risky - no error code currently defined for 0 - - if ([self valueForKeyIsNumber:options key:@"create"]) { - create = [(NSNumber*)[options valueForKey:@"create"] boolValue]; - } - if ([self valueForKeyIsNumber:options key:@"exclusive"]) { - exclusive = [(NSNumber*)[options valueForKey:@"exclusive"] boolValue]; - } - if ([self valueForKeyIsNumber:options key:@"getDir"]) { - // this will not exist for calls directly to getFile but will have been set by getDirectory before calling this method - bDirRequest = [(NSNumber*)[options valueForKey:@"getDir"] boolValue]; - } - // see if the requested path has invalid characters - should we be checking for more than just ":"? - if ([requestedPath rangeOfString:@":"].location != NSNotFound) { - errorCode = ENCODING_ERR; - } else { - // Build new fullPath for the requested resource. - // We concatenate the two paths together, and then scan the resulting string to remove - // parent ("..") references. Any parent references at the beginning of the string are - // silently removed. - NSString *combinedPath = [baseURI.fullPath stringByAppendingPathComponent:requestedPath]; - combinedPath = [self normalizePath:combinedPath]; - CDVFilesystemURL* requestedURL = [self URLforFullPath:combinedPath]; - - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - BOOL bIsDir; - BOOL bExists = [fileMgr fileExistsAtPath:[self filesystemPathForURL:requestedURL] isDirectory:&bIsDir]; - if (bExists && (create == NO) && (bIsDir == !bDirRequest)) { - // path exists and is not of requested type - return TYPE_MISMATCH_ERR - errorCode = TYPE_MISMATCH_ERR; - } else if (!bExists && (create == NO)) { - // path does not exist and create is false - return NOT_FOUND_ERR - errorCode = NOT_FOUND_ERR; - } else if (bExists && (create == YES) && (exclusive == YES)) { - // file/dir already exists and exclusive and create are both true - return PATH_EXISTS_ERR - errorCode = PATH_EXISTS_ERR; - } else { - // if bExists and create == YES - just return data - // if bExists and create == NO - just return data - // if !bExists and create == YES - create and return data - BOOL bSuccess = YES; - NSError __autoreleasing* pError = nil; - if (!bExists && (create == YES)) { - if (bDirRequest) { - // create the dir - bSuccess = [fileMgr createDirectoryAtPath:[self filesystemPathForURL:requestedURL] withIntermediateDirectories:NO attributes:nil error:&pError]; - } else { - // create the empty file - bSuccess = [fileMgr createFileAtPath:[self filesystemPathForURL:requestedURL] contents:nil attributes:nil]; - } - } - if (!bSuccess) { - errorCode = ABORT_ERR; - if (pError) { - NSLog(@"error creating directory: %@", [pError localizedDescription]); - } - } else { - // NSLog(@"newly created file/dir (%@) exists: %d", reqFullPath, [fileMgr fileExistsAtPath:reqFullPath]); - // file existed or was created - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:[self makeEntryForPath:requestedURL.fullPath isDirectory:bDirRequest]]; - } - } // are all possible conditions met? - } - - if (errorCode > 0) { - // create error callback - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - return result; - -} - -- (CDVPluginResult*)getParentForURL:(CDVFilesystemURL *)localURI -{ - CDVPluginResult* result = nil; - CDVFilesystemURL *newURI = nil; - if ([localURI.fullPath isEqualToString:@""]) { - // return self - newURI = localURI; - } else { - newURI = [CDVFilesystemURL fileSystemURLWithURL:[localURI.url URLByDeletingLastPathComponent]]; /* TODO: UGLY - FIX */ - } - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - BOOL bIsDir; - BOOL bExists = [fileMgr fileExistsAtPath:[self filesystemPathForURL:newURI] isDirectory:&bIsDir]; - if (bExists) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:[self makeEntryForPath:newURI.fullPath isDirectory:bIsDir]]; - } else { - // invalid path or file does not exist - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - } - return result; -} - -- (CDVPluginResult*)setMetadataForURL:(CDVFilesystemURL *)localURI withObject:(NSDictionary *)options -{ - BOOL ok = NO; - - NSString* filePath = [self filesystemPathForURL:localURI]; - // we only care about this iCloud key for now. - // set to 1/true to skip backup, set to 0/false to back it up (effectively removing the attribute) - NSString* iCloudBackupExtendedAttributeKey = @"com.apple.MobileBackup"; - id iCloudBackupExtendedAttributeValue = [options objectForKey:iCloudBackupExtendedAttributeKey]; - - if ((iCloudBackupExtendedAttributeValue != nil) && [iCloudBackupExtendedAttributeValue isKindOfClass:[NSNumber class]]) { -// todo: fix me -// if (IsAtLeastiOSVersion(@"5.1")) { -// NSURL* url = [NSURL fileURLWithPath:filePath]; -// NSError* __autoreleasing error = nil; -// -// ok = [url setResourceValue:[NSNumber numberWithBool:[iCloudBackupExtendedAttributeValue boolValue]] forKey:NSURLIsExcludedFromBackupKey error:&error]; -// } else { // below 5.1 (deprecated - only really supported in 5.01) -// u_int8_t value = [iCloudBackupExtendedAttributeValue intValue]; -// if (value == 0) { // remove the attribute (allow backup, the default) -// ok = (removexattr([filePath fileSystemRepresentation], [iCloudBackupExtendedAttributeKey cStringUsingEncoding:NSUTF8StringEncoding], 0) == 0); -// } else { // set the attribute (skip backup) -// ok = (setxattr([filePath fileSystemRepresentation], [iCloudBackupExtendedAttributeKey cStringUsingEncoding:NSUTF8StringEncoding], &value, sizeof(value), 0, 0) == 0); -// } -// } - } - - if (ok) { - return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else { - return [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR]; - } -} - -/* remove the file or directory (recursively) - * IN: - * NSString* fullPath - the full path to the file or directory to be removed - * NSString* callbackId - * called from remove and removeRecursively - check all pubic api specific error conditions (dir not empty, etc) before calling - */ - -- (CDVPluginResult*)doRemove:(NSString*)fullPath -{ - CDVPluginResult* result = nil; - BOOL bSuccess = NO; - NSError* __autoreleasing pError = nil; - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - - @try { - bSuccess = [fileMgr removeItemAtPath:fullPath error:&pError]; - if (bSuccess) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else { - // see if we can give a useful error - CDVFileError errorCode = ABORT_ERR; - NSLog(@"error removing filesystem entry at %@: %@", fullPath, [pError localizedDescription]); - if ([pError code] == NSFileNoSuchFileError) { - errorCode = NOT_FOUND_ERR; - } else if ([pError code] == NSFileWriteNoPermissionError) { - errorCode = NO_MODIFICATION_ALLOWED_ERR; - } - - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - } @catch(NSException* e) { // NSInvalidArgumentException if path is . or .. - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:SYNTAX_ERR]; - } - - return result; -} - -- (CDVPluginResult *)removeFileAtURL:(CDVFilesystemURL *)localURI -{ - NSString *fileSystemPath = [self filesystemPathForURL:localURI]; - - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - BOOL bIsDir = NO; - BOOL bExists = [fileMgr fileExistsAtPath:fileSystemPath isDirectory:&bIsDir]; - if (!bExists) { - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - } - if (bIsDir && ([[fileMgr contentsOfDirectoryAtPath:fileSystemPath error:nil] count] != 0)) { - // dir is not empty - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:INVALID_MODIFICATION_ERR]; - } - return [self doRemove:fileSystemPath]; -} - -- (CDVPluginResult *)recursiveRemoveFileAtURL:(CDVFilesystemURL *)localURI -{ - NSString *fileSystemPath = [self filesystemPathForURL:localURI]; - return [self doRemove:fileSystemPath]; -} - -/* - * IN - * NSString localURI - * OUT - * NSString full local filesystem path for the represented file or directory, or nil if no such path is possible - * The file or directory does not necessarily have to exist. nil is returned if the filesystem type is not recognized, - * or if the URL is malformed. - * The incoming URI should be properly escaped (no raw spaces, etc. URI percent-encoding is expected). - */ -- (NSString *)fullPathForFileSystemPath:(NSString *)fsPath -{ - if ([fsPath hasPrefix:self.fsRoot]) { - return [fsPath substringFromIndex:[self.fsRoot length]]; - } - return nil; -} - - -- (CDVPluginResult *)readEntriesAtURL:(CDVFilesystemURL *)localURI -{ - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - NSError* __autoreleasing error = nil; - NSString *fileSystemPath = [self filesystemPathForURL:localURI]; - - NSArray* contents = [fileMgr contentsOfDirectoryAtPath:fileSystemPath error:&error]; - - if (contents) { - NSMutableArray* entries = [NSMutableArray arrayWithCapacity:1]; - if ([contents count] > 0) { - // create an Entry (as JSON) for each file/dir - for (NSString* name in contents) { - // see if is dir or file - NSString* entryPath = [fileSystemPath stringByAppendingPathComponent:name]; - BOOL bIsDir = NO; - [fileMgr fileExistsAtPath:entryPath isDirectory:&bIsDir]; - NSDictionary* entryDict = [self makeEntryForPath:[self fullPathForFileSystemPath:entryPath] isDirectory:bIsDir]; - [entries addObject:entryDict]; - } - } - return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:entries]; - } else { - // assume not found but could check error for more specific error conditions - return [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:NOT_FOUND_ERR]; - } -} - -- (unsigned long long)truncateFile:(NSString*)filePath atPosition:(unsigned long long)pos -{ - unsigned long long newPos = 0UL; - - NSFileHandle* file = [NSFileHandle fileHandleForWritingAtPath:filePath]; - - if (file) { - [file truncateFileAtOffset:(unsigned long long)pos]; - newPos = [file offsetInFile]; - [file synchronizeFile]; - [file closeFile]; - } - return newPos; -} - -- (CDVPluginResult *)truncateFileAtURL:(CDVFilesystemURL *)localURI atPosition:(unsigned long long)pos -{ - unsigned long long newPos = [self truncateFile:[self filesystemPathForURL:localURI] atPosition:pos]; - return [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)newPos]; -} - -- (CDVPluginResult *)writeToFileAtURL:(CDVFilesystemURL *)localURL withData:(NSData*)encData append:(BOOL)shouldAppend -{ - NSString *filePath = [self filesystemPathForURL:localURL]; - - CDVPluginResult* result = nil; - CDVFileError errCode = INVALID_MODIFICATION_ERR; - int bytesWritten = 0; - - if (filePath) { - NSOutputStream* fileStream = [NSOutputStream outputStreamToFileAtPath:filePath append:shouldAppend]; - if (fileStream) { - NSUInteger len = [encData length]; - if (len == 0) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDouble:(double)len]; - } else { - [fileStream open]; - - bytesWritten = (int)[fileStream write:[encData bytes] maxLength:len]; - - [fileStream close]; - if (bytesWritten > 0) { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:bytesWritten]; - // } else { - // can probably get more detailed error info via [fileStream streamError] - // errCode already set to INVALID_MODIFICATION_ERR; - // bytesWritten = 0; // may be set to -1 on error - } - } - } // else fileStream not created return INVALID_MODIFICATION_ERR - } else { - // invalid filePath - errCode = NOT_FOUND_ERR; - } - if (!result) { - // was an error - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errCode]; - } - return result; -} - -/** - * Helper function to check to see if the user attempted to copy an entry into its parent without changing its name, - * or attempted to copy a directory into a directory that it contains directly or indirectly. - * - * IN: - * NSString* srcDir - * NSString* destinationDir - * OUT: - * YES copy/ move is allows - * NO move is onto itself - */ -- (BOOL)canCopyMoveSrc:(NSString*)src ToDestination:(NSString*)dest -{ - // This weird test is to determine if we are copying or moving a directory into itself. - // Copy /Documents/myDir to /Documents/myDir-backup is okay but - // Copy /Documents/myDir to /Documents/myDir/backup not okay - BOOL copyOK = YES; - NSRange range = [dest rangeOfString:src]; - - if (range.location != NSNotFound) { - NSRange testRange = {range.length - 1, ([dest length] - range.length)}; - NSRange resultRange = [dest rangeOfString:@"/" options:0 range:testRange]; - if (resultRange.location != NSNotFound) { - copyOK = NO; - } - } - return copyOK; -} - -- (void)copyFileToURL:(CDVFilesystemURL *)destURL withName:(NSString *)newName fromFileSystem:(NSObject *)srcFs atURL:(CDVFilesystemURL *)srcURL copy:(BOOL)bCopy callback:(void (^)(CDVPluginResult *))callback -{ - NSFileManager *fileMgr = [[NSFileManager alloc] init]; - NSString *destRootPath = [self filesystemPathForURL:destURL]; - BOOL bDestIsDir = NO; - BOOL bDestExists = [fileMgr fileExistsAtPath:destRootPath isDirectory:&bDestIsDir]; - - NSString *newFileSystemPath = [destRootPath stringByAppendingPathComponent:newName]; - NSString *newFullPath = [self fullPathForFileSystemPath:newFileSystemPath]; - - BOOL bNewIsDir = NO; - BOOL bNewExists = [fileMgr fileExistsAtPath:newFileSystemPath isDirectory:&bNewIsDir]; - - CDVPluginResult *result = nil; - int errCode = 0; - - if (!bDestExists) { - // the destination root does not exist - errCode = NOT_FOUND_ERR; - } - - else if ([srcFs isKindOfClass:[CDVLocalFilesystem class]]) { - /* Same FS, we can shortcut with NSFileManager operations */ - NSString *srcFullPath = [srcFs filesystemPathForURL:srcURL]; - - BOOL bSrcIsDir = NO; - BOOL bSrcExists = [fileMgr fileExistsAtPath:srcFullPath isDirectory:&bSrcIsDir]; - - if (!bSrcExists) { - // the source does not exist - errCode = NOT_FOUND_ERR; - } else if ([newFileSystemPath isEqualToString:srcFullPath]) { - // source and destination can not be the same - errCode = INVALID_MODIFICATION_ERR; - } else if (bSrcIsDir && (bNewExists && !bNewIsDir)) { - // can't copy/move dir to file - errCode = INVALID_MODIFICATION_ERR; - } else { // no errors yet - NSError* __autoreleasing error = nil; - BOOL bSuccess = NO; - if (bCopy) { - if (bSrcIsDir && ![self canCopyMoveSrc:srcFullPath ToDestination:newFileSystemPath]) { - // can't copy dir into self - errCode = INVALID_MODIFICATION_ERR; - } else if (bNewExists) { - // the full destination should NOT already exist if a copy - errCode = PATH_EXISTS_ERR; - } else { - bSuccess = [fileMgr copyItemAtPath:srcFullPath toPath:newFileSystemPath error:&error]; - } - } else { // move - // iOS requires that destination must not exist before calling moveTo - // is W3C INVALID_MODIFICATION_ERR error if destination dir exists and has contents - // - if (!bSrcIsDir && (bNewExists && bNewIsDir)) { - // can't move a file to directory - errCode = INVALID_MODIFICATION_ERR; - } else if (bSrcIsDir && ![self canCopyMoveSrc:srcFullPath ToDestination:newFileSystemPath]) { - // can't move a dir into itself - errCode = INVALID_MODIFICATION_ERR; - } else if (bNewExists) { - if (bNewIsDir && ([[fileMgr contentsOfDirectoryAtPath:newFileSystemPath error:NULL] count] != 0)) { - // can't move dir to a dir that is not empty - errCode = INVALID_MODIFICATION_ERR; - newFileSystemPath = nil; // so we won't try to move - } else { - // remove destination so can perform the moveItemAtPath - bSuccess = [fileMgr removeItemAtPath:newFileSystemPath error:NULL]; - if (!bSuccess) { - errCode = INVALID_MODIFICATION_ERR; // is this the correct error? - newFileSystemPath = nil; - } - } - } else if (bNewIsDir && [newFileSystemPath hasPrefix:srcFullPath]) { - // can't move a directory inside itself or to any child at any depth; - errCode = INVALID_MODIFICATION_ERR; - newFileSystemPath = nil; - } - - if (newFileSystemPath != nil) { - bSuccess = [fileMgr moveItemAtPath:srcFullPath toPath:newFileSystemPath error:&error]; - } - } - if (bSuccess) { - // should verify it is there and of the correct type??? - NSDictionary* newEntry = [self makeEntryForPath:newFullPath isDirectory:bSrcIsDir]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:newEntry]; - } else { - if (error) { - if (([error code] == NSFileReadUnknownError) || ([error code] == NSFileReadTooLargeError)) { - errCode = NOT_READABLE_ERR; - } else if ([error code] == NSFileWriteOutOfSpaceError) { - errCode = QUOTA_EXCEEDED_ERR; - } else if ([error code] == NSFileWriteNoPermissionError) { - errCode = NO_MODIFICATION_ALLOWED_ERR; - } - } - } - } - } else { - // Need to copy the hard way - [srcFs readFileAtURL:srcURL start:0 end:-1 callback:^(NSData* data, NSString* mimeType, CDVFileError errorCode) { - CDVPluginResult* result = nil; - if (data != nil) { - BOOL bSuccess = [data writeToFile:newFileSystemPath atomically:YES]; - if (bSuccess) { - // should verify it is there and of the correct type??? - NSDictionary* newEntry = [self makeEntryForPath:newFullPath isDirectory:NO]; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:newEntry]; - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:ABORT_ERR]; - } - } else { - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errorCode]; - } - callback(result); - }]; - return; // Async IO; return without callback. - } - if (result == nil) { - if (!errCode) { - errCode = INVALID_MODIFICATION_ERR; // Catch-all default - } - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsInt:errCode]; - } - callback(result); -} - -/* helper function to get the mimeType from the file extension - * IN: - * NSString* fullPath - filename (may include path) - * OUT: - * NSString* the mime type as type/subtype. nil if not able to determine - */ -+ (NSString*)getMimeTypeFromPath:(NSString*)fullPath -{ - NSString* mimeType = nil; - - if (fullPath) { - CFStringRef typeId = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)[fullPath pathExtension], NULL); - if (typeId) { - mimeType = (__bridge_transfer NSString*)UTTypeCopyPreferredTagWithClass(typeId, kUTTagClassMIMEType); - if (!mimeType) { - // special case for m4a - if ([(__bridge NSString*)typeId rangeOfString : @"m4a-audio"].location != NSNotFound) { - mimeType = @"audio/mp4"; - } else if ([[fullPath pathExtension] rangeOfString:@"wav"].location != NSNotFound) { - mimeType = @"audio/wav"; - } else if ([[fullPath pathExtension] rangeOfString:@"css"].location != NSNotFound) { - mimeType = @"text/css"; - } - } - CFRelease(typeId); - } - } - return mimeType; -} - -- (void)readFileAtURL:(CDVFilesystemURL *)localURL start:(NSInteger)start end:(NSInteger)end callback:(void (^)(NSData*, NSString* mimeType, CDVFileError))callback -{ - NSString *path = [self filesystemPathForURL:localURL]; - - NSString* mimeType = [CDVLocalFilesystem getMimeTypeFromPath:path]; - if (mimeType == nil) { - mimeType = @"*/*"; - } - NSFileHandle* file = [NSFileHandle fileHandleForReadingAtPath:path]; - if (start > 0) { - [file seekToFileOffset:start]; - } - - NSData* readData; - if (end < 0) { - readData = [file readDataToEndOfFile]; - } else { - readData = [file readDataOfLength:(end - start)]; - } - [file closeFile]; - - callback(readData, mimeType, readData != nil ? NO_ERROR : NOT_FOUND_ERR); -} - -- (void)getFileMetadataForURL:(CDVFilesystemURL *)localURL callback:(void (^)(CDVPluginResult *))callback -{ - NSString *path = [self filesystemPathForURL:localURL]; - CDVPluginResult *result; - NSFileManager* fileMgr = [[NSFileManager alloc] init]; - - NSError* __autoreleasing error = nil; - NSDictionary* fileAttrs = [fileMgr attributesOfItemAtPath:path error:&error]; - - if (fileAttrs) { - - // create dictionary of file info - NSMutableDictionary* fileInfo = [NSMutableDictionary dictionaryWithCapacity:5]; - - [fileInfo setObject:localURL.fullPath forKey:@"fullPath"]; - [fileInfo setObject:@"" forKey:@"type"]; // can't easily get the mimetype unless create URL, send request and read response so skipping - [fileInfo setObject:[path lastPathComponent] forKey:@"name"]; - - // Ensure that directories (and other non-regular files) report size of 0 - unsigned long long size = ([fileAttrs fileType] == NSFileTypeRegular ? [fileAttrs fileSize] : 0); - [fileInfo setObject:[NSNumber numberWithUnsignedLongLong:size] forKey:@"size"]; - - NSDate* modDate = [fileAttrs fileModificationDate]; - if (modDate) { - [fileInfo setObject:[NSNumber numberWithDouble:[modDate timeIntervalSince1970] * 1000] forKey:@"lastModifiedDate"]; - } - - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:fileInfo]; - - } else { - // didn't get fileAttribs - CDVFileError errorCode = ABORT_ERR; - NSLog(@"error getting metadata: %@", [error localizedDescription]); - if ([error code] == NSFileNoSuchFileError || [error code] == NSFileReadNoSuchFileError) { - errorCode = NOT_FOUND_ERR; - } - // log [NSNumber numberWithDouble: theMessage] objCtype to see what it returns - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsInt:errorCode]; - } - - callback(result); -} - -@end diff --git a/plugins/cordova-plugin-file/src/windows/FileProxy.js b/plugins/cordova-plugin-file/src/windows/FileProxy.js deleted file mode 100644 index d829d7755..000000000 --- a/plugins/cordova-plugin-file/src/windows/FileProxy.js +++ /dev/null @@ -1,1190 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/* global Windows, WinJS, MSApp */ - -var File = require('./File'); -var FileError = require('./FileError'); -var Flags = require('./Flags'); -var FileSystem = require('./FileSystem'); -var LocalFileSystem = require('./LocalFileSystem'); -var utils = require('cordova/utils'); - -function Entry (isFile, isDirectory, name, fullPath, filesystemName, nativeURL) { - this.isFile = !!isFile; - this.isDirectory = !!isDirectory; - this.name = name || ''; - this.fullPath = fullPath || ''; - this.filesystemName = filesystemName || null; - this.nativeURL = nativeURL || null; -} - -var FileEntry = function (name, fullPath, filesystemName, nativeURL) { - FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath, filesystemName, nativeURL]); -}; - -utils.extend(FileEntry, Entry); - -var DirectoryEntry = function (name, fullPath, filesystemName, nativeURL) { - DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath, filesystemName, nativeURL); -}; - -utils.extend(DirectoryEntry, Entry); - -var getFolderFromPathAsync = Windows.Storage.StorageFolder.getFolderFromPathAsync; -var getFileFromPathAsync = Windows.Storage.StorageFile.getFileFromPathAsync; - -function writeBytesAsync (storageFile, data, position) { - return storageFile.openAsync(Windows.Storage.FileAccessMode.readWrite) - .then(function (output) { - output.seek(position); - var dataWriter = new Windows.Storage.Streams.DataWriter(output); - dataWriter.writeBytes(data); - return dataWriter.storeAsync().then(function (size) { - output.size = position + size; - return dataWriter.flushAsync().then(function () { - output.close(); - return size; - }); - }); - }); -} - -function writeTextAsync (storageFile, data, position) { - return storageFile.openAsync(Windows.Storage.FileAccessMode.readWrite) - .then(function (output) { - output.seek(position); - var dataWriter = new Windows.Storage.Streams.DataWriter(output); - dataWriter.writeString(data); - return dataWriter.storeAsync().then(function (size) { - output.size = position + size; - return dataWriter.flushAsync().then(function () { - output.close(); - return size; - }); - }); - }); -} - -function writeBlobAsync (storageFile, data, position) { - return storageFile.openAsync(Windows.Storage.FileAccessMode.readWrite) - .then(function (output) { - output.seek(position); - var dataSize = data.size; - var input = (data.detachStream || data.msDetachStream).call(data); - - // Copy the stream from the blob to the File stream - return Windows.Storage.Streams.RandomAccessStream.copyAsync(input, output) - .then(function () { - output.size = position + dataSize; - return output.flushAsync().then(function () { - input.close(); - output.close(); - - return dataSize; - }); - }); - }); -} - -function writeArrayBufferAsync (storageFile, data, position) { - return writeBlobAsync(storageFile, new Blob([data]), position); // eslint-disable-line no-undef -} - -function cordovaPathToNative (path) { - // turn / into \\ - var cleanPath = path.replace(/\//g, '\\'); - // turn \\ into \ - cleanPath = cleanPath.replace(/\\+/g, '\\'); - return cleanPath; -} - -function nativePathToCordova (path) { - var cleanPath = path.replace(/\\/g, '/'); - return cleanPath; -} - -var driveRE = new RegExp('^[/]*([A-Z]:)'); -var invalidNameRE = /[\\?*|"<>:]/; -function validName (name) { - return !invalidNameRE.test(name.replace(driveRE, '')); -} - -function sanitize (path) { - var slashesRE = new RegExp('/{2,}', 'g'); - var components = path.replace(slashesRE, '/').split(/\/+/); - // Remove double dots, use old school array iteration instead of RegExp - // since it is impossible to debug them - for (var index = 0; index < components.length; ++index) { - if (components[index] === '..') { - components.splice(index, 1); - if (index > 0) { - // if we're not in the start of array then remove preceeding path component, - // In case if relative path points above the root directory, just ignore double dots - // See file.spec.111 should not traverse above above the root directory for test case - components.splice(index - 1, 1); - --index; - } - } - } - return components.join('/'); -} - -var WinFS = function (name, root) { - this.winpath = root.winpath; - if (this.winpath && !/\/$/.test(this.winpath)) { - this.winpath += '/'; - } - this.makeNativeURL = function (path) { - // CB-11848: This RE supposed to match all leading slashes in sanitized path. - // Removing leading slash to avoid duplicating because this.root.nativeURL already has trailing slash - var regLeadingSlashes = /^\/*/; - var sanitizedPath = sanitize(path.replace(':', '%3A')).replace(regLeadingSlashes, ''); - return FileSystem.encodeURIPath(this.root.nativeURL + sanitizedPath); - }; - root.fullPath = '/'; - if (!root.nativeURL) { root.nativeURL = 'file://' + sanitize(this.winpath + root.fullPath).replace(':', '%3A'); } - WinFS.__super__.constructor.call(this, name, root); -}; - -utils.extend(WinFS, FileSystem); - -WinFS.prototype.__format__ = function (fullPath) { - var path = sanitize('/' + this.name + (fullPath[0] === '/' ? '' : '/') + FileSystem.encodeURIPath(fullPath)); - return 'cdvfile://localhost' + path; -}; - -var windowsPaths = { - dataDirectory: 'ms-appdata:///local/', - cacheDirectory: 'ms-appdata:///temp/', - tempDirectory: 'ms-appdata:///temp/', - syncedDataDirectory: 'ms-appdata:///roaming/', - applicationDirectory: 'ms-appx:///', - applicationStorageDirectory: 'ms-appx:///' -}; - -var AllFileSystems; - -function getAllFS () { - if (!AllFileSystems) { - AllFileSystems = { - 'persistent': - Object.freeze(new WinFS('persistent', { - name: 'persistent', - nativeURL: 'ms-appdata:///local', - winpath: nativePathToCordova(Windows.Storage.ApplicationData.current.localFolder.path) - })), - 'temporary': - Object.freeze(new WinFS('temporary', { - name: 'temporary', - nativeURL: 'ms-appdata:///temp', - winpath: nativePathToCordova(Windows.Storage.ApplicationData.current.temporaryFolder.path) - })), - 'application': - Object.freeze(new WinFS('application', { - name: 'application', - nativeURL: 'ms-appx:///', - winpath: nativePathToCordova(Windows.ApplicationModel.Package.current.installedLocation.path) - })), - 'root': - Object.freeze(new WinFS('root', { - name: 'root', - // nativeURL: 'file:///' - winpath: '' - })) - }; - } - return AllFileSystems; -} - -function getFS (name) { - return getAllFS()[name]; -} - -FileSystem.prototype.__format__ = function (fullPath) { - return getFS(this.name).__format__(fullPath); -}; - -require('./fileSystems').getFs = function (name, callback) { - setTimeout(function () { callback(getFS(name)); }); -}; - -function getFilesystemFromPath (path) { - var res; - var allfs = getAllFS(); - Object.keys(allfs).some(function (fsn) { - var fs = allfs[fsn]; - if (path.indexOf(fs.winpath) === 0) { res = fs; } - return res; - }); - return res; -} - -var msapplhRE = new RegExp('^ms-appdata://localhost/'); -function pathFromURL (url) { - url = url.replace(msapplhRE, 'ms-appdata:///'); - var path = decodeURIComponent(url); - // support for file name with parameters - if (/\?/g.test(path)) { - path = String(path).split('?')[0]; - } - if (path.indexOf('file:/') === 0) { - if (path.indexOf('file://') !== 0) { - url = 'file:///' + url.substr(6); - } - } - - ['file://', 'ms-appdata:///', 'ms-appx://', 'cdvfile://localhost/'].every(function (p) { - if (path.indexOf(p) !== 0) { return true; } - var thirdSlash = path.indexOf('/', p.length); - if (thirdSlash < 0) { - path = ''; - } else { - path = sanitize(path.substr(thirdSlash)); - } - }); - - return path.replace(driveRE, '$1'); -} - -function getFilesystemFromURL (url) { - url = url.replace(msapplhRE, 'ms-appdata:///'); - var res; - if (url.indexOf('file:/') === 0) { res = getFilesystemFromPath(pathFromURL(url)); } else { - var allfs = getAllFS(); - Object.keys(allfs).every(function (fsn) { - var fs = allfs[fsn]; - if (url.indexOf(fs.root.nativeURL) === 0 || - url.indexOf('cdvfile://localhost/' + fs.name + '/') === 0) { - res = fs; - return false; - } - return true; - }); - } - return res; -} - -function getFsPathForWinPath (fs, wpath) { - var path = nativePathToCordova(wpath); - if (path.indexOf(fs.winpath) !== 0) { return null; } - return path.replace(fs.winpath, '/'); -} - -var WinError = { - invalidArgument: -2147024809, - fileNotFound: -2147024894, - accessDenied: -2147024891 -}; - -function openPath (path, ops) { - ops = ops || {}; - return new WinJS.Promise(function (complete, failed) { - getFileFromPathAsync(path).done( - function (file) { - complete({file: file}); - }, - function (err) { - if (err.number !== WinError.fileNotFound && err.number !== WinError.invalidArgument) { failed(FileError.NOT_READABLE_ERR); } - getFolderFromPathAsync(path) - .done( - function (dir) { - if (!ops.getContent) { complete({folder: dir}); } else { - WinJS.Promise.join({ - files: dir.getFilesAsync(), - folders: dir.getFoldersAsync() - }).done( - function (a) { - complete({ - folder: dir, - files: a.files, - folders: a.folders - }); - }, - function (err) { // eslint-disable-line handle-callback-err - failed(FileError.NOT_READABLE_ERR); - } - ); - } - }, - function (err) { - if (err.number === WinError.fileNotFound || err.number === WinError.invalidArgument) { complete({}); } else { failed(FileError.NOT_READABLE_ERR); } - } - ); - } - ); - }); -} - -function copyFolder (src, dst, name) { - name = name || src.name; - return new WinJS.Promise(function (complete, failed) { - WinJS.Promise.join({ - fld: dst.createFolderAsync(name, Windows.Storage.CreationCollisionOption.openIfExists), - files: src.getFilesAsync(), - folders: src.getFoldersAsync() - }).done( - function (the) { - if (!(the.files.length || the.folders.length)) { - complete(); - return; - } - var todo = the.files.length; - var copyfolders = function () { - if (!(todo--)) { - complete(); - return; - } - copyFolder(the.folders[todo], dst) - .done(function () { copyfolders(); }, failed); - }; - var copyfiles = function () { - if (!(todo--)) { - todo = the.folders.length; - copyfolders(); - return; - } - the.files[todo].copyAsync(the.fld) - .done(function () { copyfiles(); }, failed); - }; - copyfiles(); - }, - failed - ); - }); -} - -function moveFolder (src, dst, name) { - name = name || src.name; - return new WinJS.Promise(function (complete, failed) { - WinJS.Promise.join({ - fld: dst.createFolderAsync(name, Windows.Storage.CreationCollisionOption.openIfExists), - files: src.getFilesAsync(), - folders: src.getFoldersAsync() - }).done( - function (the) { - if (!(the.files.length || the.folders.length)) { - complete(); - return; - } - var todo = the.files.length; - var movefolders = function () { - if (!(todo--)) { - src.deleteAsync().done(complete, failed); - return; - } - moveFolder(the.folders[todo], the.fld) - .done(movefolders, failed); - }; - var movefiles = function () { - if (!(todo--)) { - todo = the.folders.length; - movefolders(); - return; - } - the.files[todo].moveAsync(the.fld) - .done(function () { movefiles(); }, failed); - }; - movefiles(); - }, - failed - ); - }); -} - -function transport (success, fail, args, ops) { // ["fullPath","parent", "newName"] - var src = args[0]; - var parent = args[1]; - var name = args[2]; - - var srcFS = getFilesystemFromURL(src); - var dstFS = getFilesystemFromURL(parent); - var srcPath = pathFromURL(src); - var dstPath = pathFromURL(parent); - if (!(srcFS && dstFS && validName(name))) { - fail(FileError.ENCODING_ERR); - return; - } - - var srcWinPath = cordovaPathToNative(sanitize(srcFS.winpath + srcPath)); - var dstWinPath = cordovaPathToNative(sanitize(dstFS.winpath + dstPath)); - var tgtFsPath = sanitize(dstPath + '/' + name); - var tgtWinPath = cordovaPathToNative(sanitize(dstFS.winpath + dstPath + '/' + name)); - if (srcWinPath === dstWinPath || srcWinPath === tgtWinPath) { - fail(FileError.INVALID_MODIFICATION_ERR); - return; - } - - WinJS.Promise.join({ - src: openPath(srcWinPath), - dst: openPath(dstWinPath), - tgt: openPath(tgtWinPath, {getContent: true}) - }) - .done( - function (the) { - if ((!the.dst.folder) || !(the.src.folder || the.src.file)) { - fail(FileError.NOT_FOUND_ERR); - return; - } - if ((the.src.folder && the.tgt.file) || - (the.src.file && the.tgt.folder) || - (the.tgt.folder && (the.tgt.files.length || the.tgt.folders.length))) { - fail(FileError.INVALID_MODIFICATION_ERR); - return; - } - if (the.src.file) { - ops.fileOp(the.src.file, the.dst.folder, name, Windows.Storage.NameCollisionOption.replaceExisting) - .done( - function (storageFile) { - success(new FileEntry( - name, - tgtFsPath, - dstFS.name, - dstFS.makeNativeURL(tgtFsPath) - )); - }, - function (err) { // eslint-disable-line handle-callback-err - fail(FileError.INVALID_MODIFICATION_ERR); - } - ); - } else { - ops.folderOp(the.src.folder, the.dst.folder, name).done( - function () { - success(new DirectoryEntry( - name, - tgtFsPath, - dstFS.name, - dstFS.makeNativeURL(tgtFsPath) - )); - }, - function () { - fail(FileError.INVALID_MODIFICATION_ERR); - } - ); - } - }, - function (err) { // eslint-disable-line handle-callback-err - fail(FileError.INVALID_MODIFICATION_ERR); - } - ); -} - -module.exports = { - requestAllFileSystems: function () { - return getAllFS(); - }, - requestAllPaths: function (success) { - success(windowsPaths); - }, - getFileMetadata: function (success, fail, args) { - module.exports.getMetadata(success, fail, args); - }, - - getMetadata: function (success, fail, args) { - var fs = getFilesystemFromURL(args[0]); - var path = pathFromURL(args[0]); - if (!fs || !validName(path)) { - fail(FileError.ENCODING_ERR); - return; - } - var fullPath = cordovaPathToNative(fs.winpath + path); - - var getMetadataForFile = function (storageFile) { - storageFile.getBasicPropertiesAsync().then( - function (basicProperties) { - success(new File(storageFile.name, storageFile.path, storageFile.fileType, basicProperties.dateModified, basicProperties.size)); - }, function () { - fail(FileError.NOT_READABLE_ERR); - } - ); - }; - - var getMetadataForFolder = function (storageFolder) { - storageFolder.getBasicPropertiesAsync().then( - function (basicProperties) { - var metadata = { - size: basicProperties.size, - lastModifiedDate: basicProperties.dateModified - }; - success(metadata); - }, - function () { - fail(FileError.NOT_READABLE_ERR); - } - ); - }; - - getFileFromPathAsync(fullPath).then(getMetadataForFile, - function () { - getFolderFromPathAsync(fullPath).then(getMetadataForFolder, - function () { - fail(FileError.NOT_FOUND_ERR); - } - ); - } - ); - }, - - getParent: function (win, fail, args) { // ["fullPath"] - var fs = getFilesystemFromURL(args[0]); - var path = pathFromURL(args[0]); - if (!fs || !validName(path)) { - fail(FileError.ENCODING_ERR); - return; - } - if (!path || (new RegExp('/[^/]*/?$')).test(path)) { - win(new DirectoryEntry(fs.root.name, fs.root.fullPath, fs.name, fs.makeNativeURL(fs.root.fullPath))); - return; - } - - var parpath = path.replace(new RegExp('/[^/]+/?$', 'g'), ''); - var parname = path.substr(parpath.length); - var fullPath = cordovaPathToNative(fs.winpath + parpath); - - var result = new DirectoryEntry(parname, parpath, fs.name, fs.makeNativeURL(parpath)); - getFolderFromPathAsync(fullPath).done( - function () { win(result); }, - function () { fail(FileError.INVALID_STATE_ERR); } - ); - }, - - readAsText: function (win, fail, args) { - - var url = args[0]; - var enc = args[1]; - var startPos = args[2]; - var endPos = args[3]; - - var fs = getFilesystemFromURL(url); - var path = pathFromURL(url); - if (!fs) { - fail(FileError.ENCODING_ERR); - return; - } - var wpath = cordovaPathToNative(sanitize(fs.winpath + path)); - - var encoding = Windows.Storage.Streams.UnicodeEncoding.utf8; - if (enc === 'Utf16LE' || enc === 'utf16LE') { - encoding = Windows.Storage.Streams.UnicodeEncoding.utf16LE; - } else if (enc === 'Utf16BE' || enc === 'utf16BE') { - encoding = Windows.Storage.Streams.UnicodeEncoding.utf16BE; - } - - getFileFromPathAsync(wpath).then(function (file) { - return file.openReadAsync(); - }).then(function (stream) { - startPos = (startPos < 0) ? Math.max(stream.size + startPos, 0) : Math.min(stream.size, startPos); - endPos = (endPos < 0) ? Math.max(endPos + stream.size, 0) : Math.min(stream.size, endPos); - stream.seek(startPos); - - var readSize = endPos - startPos; - var buffer = new Windows.Storage.Streams.Buffer(readSize); - - return stream.readAsync(buffer, readSize, Windows.Storage.Streams.InputStreamOptions.none); - }).done(function (buffer) { - try { - win(Windows.Security.Cryptography.CryptographicBuffer.convertBinaryToString(encoding, buffer)); - } catch (e) { - fail(FileError.ENCODING_ERR); - } - }, function () { - fail(FileError.NOT_FOUND_ERR); - }); - }, - - readAsBinaryString: function (win, fail, args) { - var url = args[0]; - var startPos = args[1]; - var endPos = args[2]; - - var fs = getFilesystemFromURL(url); - var path = pathFromURL(url); - if (!fs) { - fail(FileError.ENCODING_ERR); - return; - } - var wpath = cordovaPathToNative(sanitize(fs.winpath + path)); - - getFileFromPathAsync(wpath).then( - function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).done( - function (buffer) { - var dataReader = Windows.Storage.Streams.DataReader.fromBuffer(buffer); - // var fileContent = dataReader.readString(buffer.length); - var byteArray = new Uint8Array(buffer.length); - var byteString = ''; - dataReader.readBytes(byteArray); - dataReader.close(); - for (var i = 0; i < byteArray.length; i++) { - var charByte = byteArray[i]; - // var charRepresentation = charByte <= 127 ? String.fromCharCode(charByte) : charByte.toString(16); - var charRepresentation = String.fromCharCode(charByte); - byteString += charRepresentation; - } - win(byteString.slice(startPos, endPos)); - } - ); - }, function () { - fail(FileError.NOT_FOUND_ERR); - } - ); - }, - - readAsArrayBuffer: function (win, fail, args) { - var url = args[0]; - var fs = getFilesystemFromURL(url); - var path = pathFromURL(url); - if (!fs) { - fail(FileError.ENCODING_ERR); - return; - } - var wpath = cordovaPathToNative(sanitize(fs.winpath + path)); - - getFileFromPathAsync(wpath).then( - function (storageFile) { - var blob = MSApp.createFileFromStorageFile(storageFile); - var url = URL.createObjectURL(blob, { oneTimeOnly: true }); // eslint-disable-line no-undef - var xhr = new XMLHttpRequest(); // eslint-disable-line no-undef - xhr.open('GET', url, true); - xhr.responseType = 'arraybuffer'; - xhr.onload = function () { - var resultArrayBuffer = xhr.response; - // get start and end position of bytes in buffer to be returned - var startPos = args[1] || 0; - var endPos = args[2] || resultArrayBuffer.length; - // if any of them is specified, we'll slice output array - if (startPos !== 0 || endPos !== resultArrayBuffer.length) { - // slice method supported only on Windows 8.1, so we need to check if it's available - // see http://msdn.microsoft.com/en-us/library/ie/dn641192(v=vs.94).aspx - if (resultArrayBuffer.slice) { - resultArrayBuffer = resultArrayBuffer.slice(startPos, endPos); - } else { - // if slice isn't available, we'll use workaround method - var tempArray = new Uint8Array(resultArrayBuffer); - var resBuffer = new ArrayBuffer(endPos - startPos); - var resArray = new Uint8Array(resBuffer); - - for (var i = 0; i < resArray.length; i++) { - resArray[i] = tempArray[i + startPos]; - } - resultArrayBuffer = resBuffer; - } - } - win(resultArrayBuffer); - }; - xhr.send(); - }, function () { - fail(FileError.NOT_FOUND_ERR); - } - ); - }, - - readAsDataURL: function (win, fail, args) { - var url = args[0]; - var fs = getFilesystemFromURL(url); - var path = pathFromURL(url); - if (!fs) { - fail(FileError.ENCODING_ERR); - return; - } - var wpath = cordovaPathToNative(sanitize(fs.winpath + path)); - - getFileFromPathAsync(wpath).then( - function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).done( - function (buffer) { - var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); - // the method encodeToBase64String will add "77u/" as a prefix, so we should remove it - if (String(strBase64).substr(0, 4) === '77u/') { - strBase64 = strBase64.substr(4); - } - var mediaType = storageFile.contentType; - var result = 'data:' + mediaType + ';base64,' + strBase64; - win(result); - } - ); - }, function () { - fail(FileError.NOT_FOUND_ERR); - } - ); - }, - - getDirectory: function (win, fail, args) { - var dirurl = args[0]; - var path = args[1]; - var options = args[2]; - - var fs = getFilesystemFromURL(dirurl); - var dirpath = pathFromURL(dirurl); - if (!fs || !validName(path)) { - fail(FileError.ENCODING_ERR); - return; - } - var fspath = sanitize(dirpath + '/' + path); - var completePath = sanitize(fs.winpath + fspath); - - var name = completePath.substring(completePath.lastIndexOf('/') + 1); - - var wpath = cordovaPathToNative(completePath.substring(0, completePath.lastIndexOf('/'))); - - var flag = ''; - if (options) { - flag = new Flags(options.create, options.exclusive); - } else { - flag = new Flags(false, false); - } - - getFolderFromPathAsync(wpath).done( - function (storageFolder) { - if (flag.create === true && flag.exclusive === true) { - storageFolder.createFolderAsync(name, Windows.Storage.CreationCollisionOption.failIfExists).done( - function (storageFolder) { - win(new DirectoryEntry(storageFolder.name, fspath, fs.name, fs.makeNativeURL(fspath))); - }, function (err) { // eslint-disable-line handle-callback-err - fail(FileError.PATH_EXISTS_ERR); - } - ); - } else if (flag.create === true && flag.exclusive === false) { - storageFolder.createFolderAsync(name, Windows.Storage.CreationCollisionOption.openIfExists).done( - function (storageFolder) { - win(new DirectoryEntry(storageFolder.name, fspath, fs.name, fs.makeNativeURL(fspath))); - }, function () { - fail(FileError.INVALID_MODIFICATION_ERR); - } - ); - } else if (flag.create === false) { - storageFolder.getFolderAsync(name).done( - function (storageFolder) { - win(new DirectoryEntry(storageFolder.name, fspath, fs.name, fs.makeNativeURL(fspath))); - }, - function () { - // check if path actually points to a file - storageFolder.getFileAsync(name).done( - function () { - fail(FileError.TYPE_MISMATCH_ERR); - }, function () { - fail(FileError.NOT_FOUND_ERR); - } - ); - } - ); - } - }, function () { - fail(FileError.NOT_FOUND_ERR); - } - ); - }, - - remove: function (win, fail, args) { - var fs = getFilesystemFromURL(args[0]); - var path = pathFromURL(args[0]); - if (!fs || !validName(path)) { - fail(FileError.ENCODING_ERR); - return; - } - - // FileSystem root can't be removed! - if (!path || path === '/') { - fail(FileError.NO_MODIFICATION_ALLOWED_ERR); - return; - } - var fullPath = cordovaPathToNative(fs.winpath + path); - - getFileFromPathAsync(fullPath).then( - function (storageFile) { - storageFile.deleteAsync().done(win, function () { - fail(FileError.INVALID_MODIFICATION_ERR); - }); - }, - function () { - getFolderFromPathAsync(fullPath).done( - function (sFolder) { - sFolder.getFilesAsync() - // check for files - .then(function (fileList) { - if (fileList) { - if (fileList.length === 0) { - return sFolder.getFoldersAsync(); - } else { - fail(FileError.INVALID_MODIFICATION_ERR); - } - } - }) - // check for folders - .done(function (folderList) { - if (folderList) { - if (folderList.length === 0) { - sFolder.deleteAsync().done( - win, - function () { - fail(FileError.INVALID_MODIFICATION_ERR); - } - ); - } else { - fail(FileError.INVALID_MODIFICATION_ERR); - } - } - }); - }, - function () { - fail(FileError.NOT_FOUND_ERR); - } - ); - } - ); - }, - - removeRecursively: function (successCallback, fail, args) { - - var fs = getFilesystemFromURL(args[0]); - var path = pathFromURL(args[0]); - if (!fs || !validName(path)) { - fail(FileError.ENCODING_ERR); - return; - } - - // FileSystem root can't be removed! - if (!path || path === '/') { - fail(FileError.NO_MODIFICATION_ALLOWED_ERR); - return; - } - var fullPath = cordovaPathToNative(fs.winpath + path); - - getFolderFromPathAsync(fullPath).done(function (storageFolder) { - storageFolder.deleteAsync().done(function (res) { - successCallback(res); - }, function (err) { - fail(err); - }); - - }, function () { - fail(FileError.FILE_NOT_FOUND_ERR); - }); - }, - - getFile: function (win, fail, args) { - - var dirurl = args[0]; - var path = args[1]; - var options = args[2]; - - var fs = getFilesystemFromURL(dirurl); - var dirpath = pathFromURL(dirurl); - if (!fs || !validName(path)) { - fail(FileError.ENCODING_ERR); - return; - } - var fspath = sanitize(dirpath + '/' + path); - var completePath = sanitize(fs.winpath + fspath); - - var fileName = completePath.substring(completePath.lastIndexOf('/') + 1); - - var wpath = cordovaPathToNative(completePath.substring(0, completePath.lastIndexOf('/'))); - - var flag = ''; - if (options !== null) { - flag = new Flags(options.create, options.exclusive); - } else { - flag = new Flags(false, false); - } - - getFolderFromPathAsync(wpath).done( - function (storageFolder) { - if (flag.create === true && flag.exclusive === true) { - storageFolder.createFileAsync(fileName, Windows.Storage.CreationCollisionOption.failIfExists).done( - function (storageFile) { - win(new FileEntry(storageFile.name, fspath, fs.name, fs.makeNativeURL(fspath))); - }, function () { - fail(FileError.PATH_EXISTS_ERR); - } - ); - } else if (flag.create === true && flag.exclusive === false) { - storageFolder.createFileAsync(fileName, Windows.Storage.CreationCollisionOption.openIfExists).done( - function (storageFile) { - win(new FileEntry(storageFile.name, fspath, fs.name, fs.makeNativeURL(fspath))); - }, function () { - fail(FileError.INVALID_MODIFICATION_ERR); - } - ); - } else if (flag.create === false) { - storageFolder.getFileAsync(fileName).done( - function (storageFile) { - win(new FileEntry(storageFile.name, fspath, fs.name, fs.makeNativeURL(fspath))); - }, function () { - // check if path actually points to a folder - storageFolder.getFolderAsync(fileName).done( - function () { - fail(FileError.TYPE_MISMATCH_ERR); - }, function () { - fail(FileError.NOT_FOUND_ERR); - }); - } - ); - } - }, function (err) { - fail( - err.number === WinError.accessDenied ? - FileError.SECURITY_ERR : - FileError.NOT_FOUND_ERR - ); - } - ); - }, - - readEntries: function (win, fail, args) { // ["fullPath"] - var fs = getFilesystemFromURL(args[0]); - var path = pathFromURL(args[0]); - if (!fs || !validName(path)) { - fail(FileError.ENCODING_ERR); - return; - } - var fullPath = cordovaPathToNative(fs.winpath + path); - - var result = []; - - getFolderFromPathAsync(fullPath).done(function (storageFolder) { - var promiseArr = []; - var index = 0; - promiseArr[index++] = storageFolder.getFilesAsync().then(function (fileList) { - if (fileList !== null) { - for (var i = 0; i < fileList.length; i++) { - var fspath = getFsPathForWinPath(fs, fileList[i].path); - if (!fspath) { - fail(FileError.NOT_FOUND_ERR); - return; - } - result.push(new FileEntry(fileList[i].name, fspath, fs.name, fs.makeNativeURL(fspath))); - } - } - }); - promiseArr[index++] = storageFolder.getFoldersAsync().then(function (folderList) { - if (folderList !== null) { - for (var j = 0; j < folderList.length; j++) { - var fspath = getFsPathForWinPath(fs, folderList[j].path); - if (!fspath) { - fail(FileError.NOT_FOUND_ERR); - return; - } - result.push(new DirectoryEntry(folderList[j].name, fspath, fs.name, fs.makeNativeURL(fspath))); - } - } - }); - WinJS.Promise.join(promiseArr).then(function () { - win(result); - }); - - }, function () { fail(FileError.NOT_FOUND_ERR); }); - }, - - write: function (win, fail, args) { - - var url = args[0]; - var data = args[1]; - var position = args[2]; - var isBinary = args[3]; - - var fs = getFilesystemFromURL(url); - var path = pathFromURL(url); - if (!fs) { - fail(FileError.ENCODING_ERR); - return; - } - var completePath = sanitize(fs.winpath + path); - var fileName = completePath.substring(completePath.lastIndexOf('/') + 1); - var dirpath = completePath.substring(0, completePath.lastIndexOf('/')); - var wpath = cordovaPathToNative(dirpath); - - function getWriteMethodForData (data, isBinary) { - - if (data instanceof Blob) { // eslint-disable-line no-undef - return writeBlobAsync; - } - - if (data instanceof ArrayBuffer) { - return writeArrayBufferAsync; - } - - if (isBinary) { - return writeBytesAsync; - } - - if (typeof data === 'string') { - return writeTextAsync; - } - - throw new Error('Unsupported data type for write method'); - } - - var writePromise = getWriteMethodForData(data, isBinary); - - getFolderFromPathAsync(wpath).done( - function (storageFolder) { - storageFolder.createFileAsync(fileName, Windows.Storage.CreationCollisionOption.openIfExists).done( - function (storageFile) { - writePromise(storageFile, data, position).done( - function (bytesWritten) { - var written = bytesWritten || data.length; - win(written); - }, - function () { - fail(FileError.INVALID_MODIFICATION_ERR); - } - ); - }, - function () { - fail(FileError.INVALID_MODIFICATION_ERR); - } - ); - - }, - function () { - fail(FileError.NOT_FOUND_ERR); - } - ); - }, - - truncate: function (win, fail, args) { // ["fileName","size"] - var url = args[0]; - var size = args[1]; - - var fs = getFilesystemFromURL(url); - var path = pathFromURL(url); - if (!fs) { - fail(FileError.ENCODING_ERR); - return; - } - var completePath = sanitize(fs.winpath + path); - var wpath = cordovaPathToNative(completePath); - var dirwpath = cordovaPathToNative(completePath.substring(0, completePath.lastIndexOf('/'))); - - getFileFromPathAsync(wpath).done(function (storageFile) { - // the current length of the file. - var leng = 0; - - storageFile.getBasicPropertiesAsync().then(function (basicProperties) { - leng = basicProperties.size; - if (Number(size) >= leng) { - win(this.length); - return; - } - if (Number(size) >= 0) { - Windows.Storage.FileIO.readTextAsync(storageFile, Windows.Storage.Streams.UnicodeEncoding.utf8).then(function (fileContent) { - fileContent = fileContent.substr(0, size); - var name = storageFile.name; - storageFile.deleteAsync().then(function () { - return getFolderFromPathAsync(dirwpath); - }).done(function (storageFolder) { - storageFolder.createFileAsync(name).then(function (newStorageFile) { - Windows.Storage.FileIO.writeTextAsync(newStorageFile, fileContent).done(function () { - win(String(fileContent).length); - }, function () { - fail(FileError.NO_MODIFICATION_ALLOWED_ERR); - }); - }, function () { - fail(FileError.NO_MODIFICATION_ALLOWED_ERR); - }); - }); - }, function () { fail(FileError.NOT_FOUND_ERR); }); - } - }); - }, function () { fail(FileError.NOT_FOUND_ERR); }); - }, - - copyTo: function (success, fail, args) { // ["fullPath","parent", "newName"] - transport(success, fail, args, - { - fileOp: function (file, folder, name, coll) { - return file.copyAsync(folder, name, coll); - }, - folderOp: function (src, dst, name) { - return copyFolder(src, dst, name); - }} - ); - }, - - moveTo: function (success, fail, args) { - transport(success, fail, args, - { - fileOp: function (file, folder, name, coll) { - return file.moveAsync(folder, name, coll); - }, - folderOp: function (src, dst, name) { - return moveFolder(src, dst, name); - }} - ); - }, - tempFileSystem: null, - - persistentFileSystem: null, - - requestFileSystem: function (win, fail, args) { - - var type = args[0]; - var size = args[1]; - var MAX_SIZE = 10000000000; - if (size > MAX_SIZE) { - fail(FileError.QUOTA_EXCEEDED_ERR); - return; - } - - var fs; - switch (type) { - case LocalFileSystem.TEMPORARY: - fs = getFS('temporary'); - break; - case LocalFileSystem.PERSISTENT: - fs = getFS('persistent'); - break; - } - if (fs) { win(fs); } else { fail(FileError.NOT_FOUND_ERR); } - }, - - resolveLocalFileSystemURI: function (success, fail, args) { - - var uri = args[0]; - - var path = pathFromURL(uri); - var fs = getFilesystemFromURL(uri); - if (!fs || !validName(path)) { - fail(FileError.ENCODING_ERR); - return; - } - if (path.indexOf(fs.winpath) === 0) { path = path.substr(fs.winpath.length); } - var abspath = cordovaPathToNative(fs.winpath + path); - - getFileFromPathAsync(abspath).done( - function (storageFile) { - success(new FileEntry(storageFile.name, path, fs.name, fs.makeNativeURL(path))); - }, function () { - getFolderFromPathAsync(abspath).done( - function (storageFolder) { - success(new DirectoryEntry(storageFolder.name, path, fs.name, fs.makeNativeURL(path))); - }, function () { - fail(FileError.NOT_FOUND_ERR); - } - ); - } - ); - } - -}; - -require('cordova/exec/proxy').add('File', module.exports); diff --git a/plugins/cordova-plugin-file/tests/package.json b/plugins/cordova-plugin-file/tests/package.json deleted file mode 100644 index 33cd4cf93..000000000 --- a/plugins/cordova-plugin-file/tests/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "cordova-plugin-file-tests", - "version": "6.0.2", - "description": "", - "cordova": { - "id": "cordova-plugin-file-tests", - "platforms": [ - "android" - ] - }, - "keywords": [ - "ecosystem:cordova", - "cordova-android" - ], - "author": "", - "license": "Apache-2.0" -} diff --git a/plugins/cordova-plugin-file/tests/plugin.xml b/plugins/cordova-plugin-file/tests/plugin.xml deleted file mode 100644 index 38f3f2286..000000000 --- a/plugins/cordova-plugin-file/tests/plugin.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - Cordova File Plugin Tests - Apache 2.0 - - - - - - - - - - - - - diff --git a/plugins/cordova-plugin-file/tests/src/android/TestContentProvider.java b/plugins/cordova-plugin-file/tests/src/android/TestContentProvider.java deleted file mode 100644 index 9eba0d060..000000000 --- a/plugins/cordova-plugin-file/tests/src/android/TestContentProvider.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -package org.apache.cordova.file.test; - -import android.content.ContentProvider; -import android.net.Uri; -import android.content.res.AssetFileDescriptor; -import android.content.res.AssetManager; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import android.content.ContentValues; -import android.database.Cursor; -import android.os.ParcelFileDescriptor; - -import org.apache.cordova.CordovaResourceApi; - -import java.io.IOException; -import java.util.HashMap; - -public class TestContentProvider extends ContentProvider { - - @Override - public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { - String fileName = uri.getQueryParameter("realPath"); - if (fileName == null) { - fileName = uri.getPath(); - } - if (fileName == null || fileName.length() < 1) { - throw new FileNotFoundException(); - } - CordovaResourceApi resourceApi = new CordovaResourceApi(getContext(), null); - try { - File f = File.createTempFile("test-content-provider", ".tmp"); - resourceApi.copyResource(Uri.parse("file:///android_asset" + fileName), Uri.fromFile(f)); - return ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY); - } catch (FileNotFoundException e) { - throw e; - } catch (IOException e) { - e.printStackTrace(); - throw new FileNotFoundException("IO error: " + e.toString()); - } - } - - @Override - public boolean onCreate() { - return false; - } - - @Override - public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { - throw new UnsupportedOperationException(); - } - - @Override - public String getType(Uri uri) { - return "text/html"; - } - - @Override - public Uri insert(Uri uri, ContentValues values) { - throw new UnsupportedOperationException(); - } - - @Override - public int delete(Uri uri, String selection, String[] selectionArgs) { - throw new UnsupportedOperationException(); - } - - @Override - public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { - throw new UnsupportedOperationException(); - } - - -} diff --git a/plugins/cordova-plugin-file/tests/tests.js b/plugins/cordova-plugin-file/tests/tests.js deleted file mode 100644 index a9ae20aa7..000000000 --- a/plugins/cordova-plugin-file/tests/tests.js +++ /dev/null @@ -1,4163 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -/* eslint-env jasmine */ -/* global WebKitBlobBuilder */ - -exports.defineAutoTests = function () { - /* eslint-disable no-undef */ - var isBrowser = (cordova.platformId === 'browser'); - // Use feature detection to determine current browser instead of checking user-agent - var isChrome = isBrowser && window.webkitRequestFileSystem && window.webkitResolveLocalFileSystemURL; - var isIE = isBrowser && (window.msIndexedDB); - var isIndexedDBShim = isBrowser && !isChrome; // Firefox and IE for example - - var isWindows = (cordova.platformId === 'windows' || cordova.platformId === 'windows8'); - /* eslint-enable no-undef */ - var MEDIUM_TIMEOUT = 15000; - - describe('File API', function () { - // Adding a Jasmine helper matcher, to report errors when comparing to FileError better. - var fileErrorMap = { - 1: 'NOT_FOUND_ERR', - 2: 'SECURITY_ERR', - 3: 'ABORT_ERR', - 4: 'NOT_READABLE_ERR', - 5: 'ENCODING_ERR', - 6: 'NO_MODIFICATION_ALLOWED_ERR', - 7: 'INVALID_STATE_ERR', - 8: 'SYNTAX_ERR', - 9: 'INVALID_MODIFICATION_ERR', - 10: 'QUOTA_EXCEEDED_ERR', - 11: 'TYPE_MISMATCH_ERR', - 12: 'PATH_EXISTS_ERR' - }; - var root; - var temp_root; - var persistent_root; - beforeEach(function (done) { - // Custom Matchers - jasmine.Expectation.addMatchers({ - toBeFileError: function () { - return { - compare: function (error, code) { - var pass = error.code === code; - return { - pass: pass, - message: 'Expected FileError with code ' + fileErrorMap[error.code] + ' (' + error.code + ') to be ' + fileErrorMap[code] + '(' + code + ')' - }; - } - }; - }, - toCanonicallyMatch: function () { - return { - compare: function (currentPath, path) { - var a = path.split('/').join('').split('\\').join(''); - var b = currentPath.split('/').join('').split('\\').join(''); - var pass = a === b; - return { - pass: pass, - message: 'Expected paths to match : ' + path + ' should be ' + currentPath - }; - } - }; - }, - toFailWithMessage: function () { - return { - compare: function (error, message) { // eslint-disable-line handle-callback-err - var pass = false; - return { - pass: pass, - message: message - }; - } - }; - }, - toBeDataUrl: function () { - return { - compare: function (url) { - var pass = false; - // "data:application/octet-stream;base64," - var header = url.substr(0, url.indexOf(',')); - var headerParts = header.split(/[:;]/); - if (headerParts.length === 3 && - headerParts[0] === 'data' && - headerParts[2] === 'base64') { - pass = true; - } - var message = 'Expected ' + url + ' to be a valid data url. ' + header + ' is not valid header for data uris'; - return { - pass: pass, - message: message - }; - } - }; - } - }); - // Define global variables - var onError = function (e) { - console.log('[ERROR] Problem setting up root filesystem for test running! Error to follow.'); - console.log(JSON.stringify(e)); - }; - window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) { // eslint-disable-line no-undef - root = fileSystem.root; - // set in file.tests.js - persistent_root = root; - window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, function (fileSystem) { // eslint-disable-line no-undef - temp_root = fileSystem.root; - // set in file.tests.js - done(); - }, onError); - }, onError); - }); - // HELPER FUNCTIONS - // deletes specified file or directory - var deleteEntry = function (name, success, error) { - // deletes entry, if it exists - // entry.remove success callback is required: http://www.w3.org/TR/2011/WD-file-system-api-20110419/#the-entry-interface - success = success || function () {}; - error = error || failed.bind(null, success, 'deleteEntry failed.'); - - window.resolveLocalFileSystemURL(root.toURL() + '/' + name, function (entry) { - if (entry.isDirectory === true) { - entry.removeRecursively(success, error); - } else { - entry.remove(success, error); - } - }, success); - }; - // deletes file, if it exists, then invokes callback - var deleteFile = function (fileName, callback) { - // entry.remove success callback is required: http://www.w3.org/TR/2011/WD-file-system-api-20110419/#the-entry-interface - callback = callback || function () {}; - - root.getFile(fileName, null, // remove file system entry - function (entry) { - entry.remove(callback, function () { - console.log('[ERROR] deleteFile cleanup method invoked fail callback.'); - }); - }, // doesn't exist - callback); - }; - // deletes and re-creates the specified file - var createFile = function (fileName, success, error) { - deleteEntry(fileName, function () { - root.getFile(fileName, { - create: true - }, success, error); - }, error); - }; - // deletes and re-creates the specified directory - var createDirectory = function (dirName, success, error) { - deleteEntry(dirName, function () { - root.getDirectory(dirName, { - create: true - }, success, error); - }, error); - }; - function failed (done, msg, error) { - var info = typeof msg === 'undefined' ? 'Unexpected error callback' : msg; - var codeMsg = (error && error.code) ? (': ' + fileErrorMap[error.code]) : ''; - expect(true).toFailWithMessage(info + '\n' + JSON.stringify(error) + codeMsg); - done(); - } - var succeed = function (done, msg) { - var info = typeof msg === 'undefined' ? 'Unexpected success callback' : msg; - expect(true).toFailWithMessage(info); - done(); - }; - var joinURL = function (base, extension) { - if (base.charAt(base.length - 1) !== '/' && extension.charAt(0) !== '/') { - return base + '/' + extension; - } - if (base.charAt(base.length - 1) === '/' && extension.charAt(0) === '/') { - return base + extension.substring(1); - } - return base + extension; - }; - describe('FileError object', function () { - /* eslint-disable no-undef */ - it('file.spec.1 should define FileError constants', function () { - expect(FileError.NOT_FOUND_ERR).toBe(1); - expect(FileError.SECURITY_ERR).toBe(2); - expect(FileError.ABORT_ERR).toBe(3); - expect(FileError.NOT_READABLE_ERR).toBe(4); - expect(FileError.ENCODING_ERR).toBe(5); - expect(FileError.NO_MODIFICATION_ALLOWED_ERR).toBe(6); - expect(FileError.INVALID_STATE_ERR).toBe(7); - expect(FileError.SYNTAX_ERR).toBe(8); - expect(FileError.INVALID_MODIFICATION_ERR).toBe(9); - expect(FileError.QUOTA_EXCEEDED_ERR).toBe(10); - expect(FileError.TYPE_MISMATCH_ERR).toBe(11); - expect(FileError.PATH_EXISTS_ERR).toBe(12); - }); - }); - describe('LocalFileSystem', function () { - it('file.spec.2 should define LocalFileSystem constants', function () { - expect(LocalFileSystem.TEMPORARY).toBe(0); - expect(LocalFileSystem.PERSISTENT).toBe(1); - /* eslint-enable no-undef */ - }); - describe('window.requestFileSystem', function () { - it('file.spec.3 should be defined', function () { - expect(window.requestFileSystem).toBeDefined(); - }); - it('file.spec.4 should be able to retrieve a PERSISTENT file system', function (done) { - var win = function (fileSystem) { - expect(fileSystem).toBeDefined(); - expect(fileSystem.name).toBeDefined(); - if (isChrome) { - expect(fileSystem.name).toContain('Persistent'); - } else { - expect(fileSystem.name).toBe('persistent'); - } - expect(fileSystem.root).toBeDefined(); - expect(fileSystem.root.filesystem).toBeDefined(); - // Shouldn't use cdvfile by default. - expect(fileSystem.root.toURL()).not.toMatch(/^cdvfile:/); - // All DirectoryEntry URLs should always have a trailing slash. - expect(fileSystem.root.toURL()).toMatch(/\/$/); - done(); - }; - - // Request a little bit of space on the filesystem, unless we're running in a browser where that could cause a prompt. - var spaceRequired = isBrowser ? 0 : 1024; - - // retrieve PERSISTENT file system - window.requestFileSystem(LocalFileSystem.PERSISTENT, spaceRequired, win, failed.bind(null, done, 'window.requestFileSystem - Error retrieving PERSISTENT file system')); // eslint-disable-line no-undef - }); - it('file.spec.5 should be able to retrieve a TEMPORARY file system', function (done) { - var win = function (fileSystem) { - expect(fileSystem).toBeDefined(); - if (isChrome) { - expect(fileSystem.name).toContain('Temporary'); - } else { - expect(fileSystem.name).toBe('temporary'); - } - expect(fileSystem.root).toBeDefined(); - expect(fileSystem.root.filesystem).toBeDefined(); - expect(fileSystem.root.filesystem).toBe(fileSystem); - done(); - }; - // retrieve TEMPORARY file system - window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, win, failed.bind(null, done, 'window.requestFileSystem - Error retrieving TEMPORARY file system')); // eslint-disable-line no-undef - }); - it('file.spec.6 should error if you request a file system that is too large', function (done) { - if (isBrowser) { - /* window.requestFileSystem TEMPORARY and PERSISTENT filesystem quota is not limited in Chrome. - Firefox filesystem size is not limited but every 50MB request user permission. - IE10 allows up to 10mb of combined AppCache and IndexedDB used in implementation - of filesystem without prompting, once you hit that level you will be asked if you - want to allow it to be increased up to a max of 250mb per site. - So `size` parameter for `requestFileSystem` function does not affect on filesystem in Firefox and IE. */ - pending(); - } - - var fail = function (error) { - expect(error).toBeDefined(); - expect(error).toBeFileError(FileError.QUOTA_EXCEEDED_ERR); // eslint-disable-line no-undef - done(); - }; - // win = createWin('window.requestFileSystem'); - // Request the file system - window.requestFileSystem(LocalFileSystem.TEMPORARY, 1000000000000000, failed.bind(null, done, 'window.requestFileSystem - Error retrieving TEMPORARY file system'), fail); // eslint-disable-line no-undef - }); - it('file.spec.7 should error out if you request a file system that does not exist', function (done) { - - var fail = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - /* INVALID_MODIFICATION_ERR (code: 9) or ??? (code: 13) is thrown instead of SYNTAX_ERR(code: 8) - on requesting of a non-existant filesystem. */ - // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); - } else { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } - done(); - }; - // Request the file system - window.requestFileSystem(-1, 0, succeed.bind(null, done, 'window.requestFileSystem'), fail); - }); - }); - describe('window.resolveLocalFileSystemURL', function () { - it('file.spec.8 should be defined', function () { - expect(window.resolveLocalFileSystemURL).toBeDefined(); - }); - it('file.spec.9 should resolve a valid file name', function (done) { - var fileName = 'file.spec.9'; - var win = function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.isFile).toBe(true); - expect(fileEntry.isDirectory).toBe(false); - expect(fileEntry.name).toCanonicallyMatch(fileName); - expect(fileEntry.toURL()).not.toMatch(/^cdvfile:/, 'should not use cdvfile URL'); - expect(fileEntry.toURL()).not.toMatch(/\/$/, 'URL should not end with a slash'); - // Clean-up - deleteEntry(fileName, done); - }; - createFile(fileName, function (entry) { - window.resolveLocalFileSystemURL(entry.toURL(), win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toURL())); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName), failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.9.1 should resolve a file even with a terminating slash', function (done) { - var fileName = 'file.spec.9.1'; - var win = function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.isFile).toBe(true); - expect(fileEntry.isDirectory).toBe(false); - expect(fileEntry.name).toCanonicallyMatch(fileName); - expect(fileEntry.toURL()).not.toMatch(/^cdvfile:/, 'should not use cdvfile URL'); - expect(fileEntry.toURL()).not.toMatch(/\/$/, 'URL should not end with a slash'); - // Clean-up - deleteEntry(fileName, done); - }; - createFile(fileName, function (entry) { - var entryURL = entry.toURL() + '/'; - window.resolveLocalFileSystemURL(entryURL, win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URL: ' + entryURL)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName), failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.9.5 should resolve a directory', function (done) { - var fileName = 'file.spec.9.5'; - var win = function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.isFile).toBe(false); - expect(fileEntry.isDirectory).toBe(true); - expect(fileEntry.name).toCanonicallyMatch(fileName); - expect(fileEntry.toURL()).not.toMatch(/^cdvfile:/, 'should not use cdvfile URL'); - expect(fileEntry.toURL()).toMatch(/\/$/, 'URL end with a slash'); - // cleanup - deleteEntry(fileName, done); - }; - function gotDirectory (entry) { - // lookup file system entry - window.resolveLocalFileSystemURL(entry.toURL(), win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving directory URL: ' + entry.toURL())); - } - createDirectory(fileName, gotDirectory, failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName), failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName)); - }); - it('file.spec.9.6 should resolve a directory even without a terminating slash', function (done) { - var fileName = 'file.spec.9.6'; - var win = function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.isFile).toBe(false); - expect(fileEntry.isDirectory).toBe(true); - expect(fileEntry.name).toCanonicallyMatch(fileName); - expect(fileEntry.toURL()).not.toMatch(/^cdvfile:/, 'should not use cdvfile URL'); - expect(fileEntry.toURL()).toMatch(/\/$/, 'URL end with a slash'); - // cleanup - deleteEntry(fileName, done); - }; - function gotDirectory (entry) { - // lookup file system entry - var entryURL = entry.toURL(); - entryURL = entryURL.substring(0, entryURL.length - 1); - window.resolveLocalFileSystemURL(entryURL, win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving directory URL: ' + entryURL)); - } - createDirectory(fileName, gotDirectory, failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName), failed.bind(null, done, 'createDirectory - Error creating directory: ' + fileName)); - }); - - it('file.spec.9.7 should resolve a file with valid nativeURL', function (done) { - if (isBrowser) { - pending('browsers doesn\'t return nativeURL'); - } - var fileName = 'de.create.file'; - var win = function (entry) { - var path = entry.nativeURL.split('///')[1]; - expect(/\/{2,}/.test(path)).toBeFalsy(); - // cleanup - deleteEntry(entry.name, done); - }; - root.getFile(fileName, { - create: true - }, win, succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName)); - }); - - it('file.spec.10 resolve valid file name with parameters', function (done) { - var fileName = 'resolve.file.uri.params'; - var win = function (fileEntry) { - expect(fileEntry).toBeDefined(); - if (fileEntry.toURL().toLowerCase().substring(0, 10) === 'cdvfile://') { - expect(fileEntry.fullPath).toBe('/' + fileName + '?1234567890'); - } - expect(fileEntry.name).toBe(fileName); - // cleanup - deleteEntry(fileName, done); - }; - // create a new file entry - createFile(fileName, function (entry) { - window.resolveLocalFileSystemURL(entry.toURL() + '?1234567890', win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URI: ' + entry.toURL())); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.11 should error (NOT_FOUND_ERR) when resolving (non-existent) invalid file name', function (done) { - var fileName = cordova.platformId === 'windowsphone' ? root.toURL() + '/' + 'this.is.not.a.valid.file.txt' : joinURL(root.toURL(), 'this.is.not.a.valid.file.txt'); // eslint-disable-line no-undef - var fail = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - done(); - }; - // lookup file system entry - window.resolveLocalFileSystemURL(fileName, succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Error unexpected callback resolving file URI: ' + fileName), fail); - }); - it('file.spec.12 should error (ENCODING_ERR) when resolving invalid URI with leading /', function (done) { - var fileName = '/this.is.not.a.valid.url'; - var fail = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // O.o chrome returns error code 0 - } else { - expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef - } - done(); - }; - // lookup file system entry - window.resolveLocalFileSystemURL(fileName, succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Error unexpected callback resolving file URI: ' + fileName), fail); - }); - }); - }); - // LocalFileSystem - describe('Metadata interface', function () { - it('file.spec.13 should exist and have the right properties', function () { - var metadata = new Metadata(); // eslint-disable-line no-undef - expect(metadata).toBeDefined(); - expect(metadata.modificationTime).toBeDefined(); - }); - }); - describe('Flags interface', function () { - it('file.spec.14 should exist and have the right properties', function () { - var flags = new Flags(false, true); // eslint-disable-line no-undef - expect(flags).toBeDefined(); - expect(flags.create).toBeDefined(); - expect(flags.create).toBe(false); - expect(flags.exclusive).toBeDefined(); - expect(flags.exclusive).toBe(true); - }); - }); - describe('FileSystem interface', function () { - it('file.spec.15 should have a root that is a DirectoryEntry', function (done) { - var win = function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(false); - expect(entry.isDirectory).toBe(true); - expect(entry.name).toBeDefined(); - expect(entry.fullPath).toBeDefined(); - expect(entry.getMetadata).toBeDefined(); - expect(entry.moveTo).toBeDefined(); - expect(entry.copyTo).toBeDefined(); - expect(entry.toURL).toBeDefined(); - expect(entry.remove).toBeDefined(); - expect(entry.getParent).toBeDefined(); - expect(entry.createReader).toBeDefined(); - expect(entry.getFile).toBeDefined(); - expect(entry.getDirectory).toBeDefined(); - expect(entry.removeRecursively).toBeDefined(); - done(); - }; - window.resolveLocalFileSystemURL(root.toURL(), win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving file URI: ' + root.toURL())); - }); - }); - describe('DirectoryEntry', function () { - it('file.spec.16 getFile: get Entry for file that does not exist', function (done) { - var fileName = 'de.no.file'; - var fail = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - done(); - }; - // create:false, exclusive:false, file does not exist - root.getFile(fileName, { - create: false - }, succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName), fail); - }); - it('file.spec.17 getFile: create new file', function (done) { - var fileName = 'de.create.file'; - var filePath = joinURL(root.fullPath, fileName); - var win = function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(fileName); - expect(entry.fullPath).toCanonicallyMatch(filePath); - // cleanup - deleteEntry(entry.name, done); - }; - // create:true, exclusive:false, file does not exist - root.getFile(fileName, { - create: true - }, win, succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName)); - }); - it('file.spec.18 getFile: create new file (exclusive)', function (done) { - var fileName = 'de.create.exclusive.file'; - var filePath = joinURL(root.fullPath, fileName); - var win = function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toBe(fileName); - expect(entry.fullPath).toCanonicallyMatch(filePath); - // cleanup - deleteEntry(entry.name, done); - }; - // create:true, exclusive:true, file does not exist - root.getFile(fileName, { - create: true, - exclusive: true - }, win, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)); - }); - it('file.spec.19 getFile: create file that already exists', function (done) { - var fileName = 'de.create.existing.file'; - var filePath = joinURL(root.fullPath, fileName); - - function win (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(fileName); - expect(entry.fullPath).toCanonicallyMatch(filePath); - // cleanup - deleteEntry(entry.name, done); - } - - function getFile (file) { - // create:true, exclusive:false, file exists - root.getFile(fileName, { - create: true - }, win, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)); - } - - // create file to kick off it - root.getFile(fileName, { - create: true - }, getFile, failed.bind(null, done, 'root.getFile - Error on initial creating file: ' + fileName)); - }); - it('file.spec.20 getFile: create file that already exists (exclusive)', function (done) { - var fileName = 'de.create.exclusive.existing.file'; - var existingFile; - - function fail (error) { - expect(error).toBeDefined(); - if (isChrome) { - /* INVALID_MODIFICATION_ERR (code: 9) or ??? (code: 13) is thrown instead of PATH_EXISTS_ERR(code: 12) - on trying to exclusively create a file, which already exists in Chrome. */ - // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); - } else { - expect(error).toBeFileError(FileError.PATH_EXISTS_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(existingFile.name, done); - } - - function getFile (file) { - existingFile = file; - // create:true, exclusive:true, file exists - root.getFile(fileName, { - create: true, - exclusive: true - }, succeed.bind(null, done, 'root.getFile - getFile function - Error unexpected callback, file should exists: ' + fileName), fail); - } - - // create file to kick off it - root.getFile(fileName, { - create: true - }, getFile, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)); - }); - it('file.spec.21 DirectoryEntry.getFile: get Entry for existing file', function (done) { - var fileName = 'de.get.file'; - var filePath = joinURL(root.fullPath, fileName); - var win = function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(fileName); - expect(entry.fullPath).toCanonicallyMatch(filePath); - expect(entry.filesystem).toBeDefined(); - expect(entry.filesystem).toBe(root.filesystem); - // clean up - deleteEntry(entry.name, done); - }; - var getFile = function (file) { - // create:false, exclusive:false, file exists - root.getFile(fileName, { - create: false - }, win, failed.bind(null, done, 'root.getFile - Error getting file entry: ' + fileName)); - }; - // create file to kick off it - root.getFile(fileName, { - create: true - }, getFile, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)); - }); - it('file.spec.22 DirectoryEntry.getFile: get FileEntry for invalid path', function (done) { - if (isBrowser) { - /* The plugin does not follow to ["8.3 Naming restrictions"] - (http://www.w3.org/TR/2011/WD-file-system-api-20110419/#naming-restrictions). */ - pending(); - } - - var fileName = 'de:invalid:path'; - var fail = function (error) { - expect(error).toBeDefined(); - expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef - done(); - }; - // create:false, exclusive:false, invalid path - root.getFile(fileName, { - create: false - }, succeed.bind(null, done, 'root.getFile - Error unexpected callback, file should not exists: ' + fileName), fail); - }); - it('file.spec.23 DirectoryEntry.getDirectory: get Entry for directory that does not exist', function (done) { - var dirName = 'de.no.dir'; - var fail = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - done(); - }; - // create:false, exclusive:false, directory does not exist - root.getDirectory(dirName, { - create: false - }, succeed.bind(null, done, 'root.getDirectory - Error unexpected callback, directory should not exists: ' + dirName), fail); - }); - it('file.spec.24 DirectoryEntry.getDirectory: create new dir with space then resolveLocalFileSystemURL', function (done) { - var dirName = 'de create dir'; - - function win (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(dirName); - expect(directory.fullPath).toCanonicallyMatch(joinURL(root.fullPath, dirName)); - // cleanup - deleteEntry(directory.name, done); - } - - function getDir (dirEntry) { - expect(dirEntry.filesystem).toBeDefined(); - expect(dirEntry.filesystem).toBe(root.filesystem); - var dirURI = dirEntry.toURL(); - // now encode URI and try to resolve - window.resolveLocalFileSystemURL(dirURI, win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - getDir function - Error resolving directory: ' + dirURI)); - } - - // create:true, exclusive:false, directory does not exist - root.getDirectory(dirName, { - create: true - }, getDir, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - // This test is excluded, and should probably be removed. Filesystem - // should always be properly encoded URLs, and *not* raw paths, and it - // doesn't make sense to double-encode the URLs and expect that to be - // handled by the implementation. - // If a particular platform uses paths internally rather than URLs, // then that platform should careful to pass them correctly to its - // backend. - xit('file.spec.25 DirectoryEntry.getDirectory: create new dir with space resolveLocalFileSystemURL with encoded URI', function (done) { - var dirName = 'de create dir2'; - var dirPath = joinURL(root.fullPath, dirName); - - function win (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(dirName); - expect(directory.fullPath).toCanonicallyMatch(dirPath); - // cleanup - deleteEntry(directory.name, done); - } - - function getDir (dirEntry) { - var dirURI = dirEntry.toURL(); - // now encode URI and try to resolve - window.resolveLocalFileSystemURL(encodeURI(dirURI), win, failed.bind(null, done, 'window.resolveLocalFileSystemURL - getDir function - Error resolving directory: ' + dirURI)); - } - - // create:true, exclusive:false, directory does not exist - root.getDirectory(dirName, { - create: true - }, getDir, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.26 DirectoryEntry.getDirectory: create new directory', function (done) { - var dirName = 'de.create.dir'; - var dirPath = joinURL(root.fullPath, dirName); - var win = function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(dirName); - expect(directory.fullPath).toCanonicallyMatch(dirPath); - expect(directory.filesystem).toBeDefined(); - expect(directory.filesystem).toBe(root.filesystem); - // cleanup - deleteEntry(directory.name, done); - }; - // create:true, exclusive:false, directory does not exist - root.getDirectory(dirName, { - create: true - }, win, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.27 DirectoryEntry.getDirectory: create new directory (exclusive)', function (done) { - var dirName = 'de.create.exclusive.dir'; - var dirPath = joinURL(root.fullPath, dirName); - var win = function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(dirName); - expect(directory.fullPath).toCanonicallyMatch(dirPath); - expect(directory.filesystem).toBeDefined(); - expect(directory.filesystem).toBe(root.filesystem); - // cleanup - deleteEntry(directory.name, done); - }; - // create:true, exclusive:true, directory does not exist - root.getDirectory(dirName, { - create: true, - exclusive: true - }, win, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.28 DirectoryEntry.getDirectory: create directory that already exists', function (done) { - var dirName = 'de.create.existing.dir'; - var dirPath = joinURL(root.fullPath, dirName); - var win = function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(dirName); - expect(directory.fullPath).toCanonicallyMatch(dirPath); - // cleanup - deleteEntry(directory.name, done); - }; - // create directory to kick off it - root.getDirectory(dirName, { - create: true - }, function () { - root.getDirectory(dirName, { - create: true - }, win, failed.bind(null, done, 'root.getDirectory - Error creating existent second directory : ' + dirName)); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.29 DirectoryEntry.getDirectory: create directory that already exists (exclusive)', function (done) { - - var dirName = 'de.create.exclusive.existing.dir'; - var existingDir; - var fail = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - /* INVALID_MODIFICATION_ERR (code: 9) or ??? (code: 13) is thrown instead of PATH_EXISTS_ERR(code: 12) - on trying to exclusively create a file or directory, which already exists (Chrome). */ - // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); - } else { - expect(error).toBeFileError(FileError.PATH_EXISTS_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(existingDir.name, done); - }; - // create directory to kick off it - root.getDirectory(dirName, { - create: true - }, function (directory) { - existingDir = directory; - // create:true, exclusive:true, directory exists - root.getDirectory(dirName, { - create: true, - exclusive: true - }, failed.bind(null, done, 'root.getDirectory - Unexpected success callback, second directory should not be created : ' + dirName), fail); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.30 DirectoryEntry.getDirectory: get Entry for existing directory', function (done) { - var dirName = 'de.get.dir'; - var dirPath = joinURL(root.fullPath, dirName); - var win = function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(dirName); - expect(directory.fullPath).toCanonicallyMatch(dirPath); - // cleanup - deleteEntry(directory.name, done); - }; - // create directory to kick it off - root.getDirectory(dirName, { - create: true - }, function () { - root.getDirectory(dirName, { - create: false - }, win, failed.bind(null, done, 'root.getDirectory - Error getting directory entry : ' + dirName)); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.31 DirectoryEntry.getDirectory: get DirectoryEntry for invalid path', function (done) { - if (isBrowser) { - /* The plugin does not follow to ["8.3 Naming restrictions"] - (http://www.w3.org/TR/2011/WD-file-system-api-20110419/#naming-restrictions). */ - pending(); - } - - var dirName = 'de:invalid:path'; - var fail = function (error) { - expect(error).toBeDefined(); - expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef - done(); - }; - // create:false, exclusive:false, invalid path - root.getDirectory(dirName, { - create: false - }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, directory should not exists: ' + dirName), fail); - }); - it('file.spec.32 DirectoryEntry.getDirectory: get DirectoryEntry for existing file', function (done) { - var fileName = 'de.existing.file'; - var existingFile; - var fail = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns an unknown error with code 17 - } else { - expect(error).toBeFileError(FileError.TYPE_MISMATCH_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(existingFile.name, done); - }; - // create file to kick off it - root.getFile(fileName, { - create: true - }, function (file) { - existingFile = file; - root.getDirectory(fileName, { - create: false - }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, directory should not exists: ' + fileName), fail); - }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)); - }); - it('file.spec.33 DirectoryEntry.getFile: get FileEntry for existing directory', function (done) { - var dirName = 'de.existing.dir'; - var existingDir; - var fail = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns an unknown error with code 17 - } else { - expect(error).toBeFileError(FileError.TYPE_MISMATCH_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(existingDir.name, done); - }; - // create directory to kick off it - root.getDirectory(dirName, { - create: true - }, function (directory) { - existingDir = directory; - root.getFile(dirName, { - create: false - }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, file should not exists: ' + dirName), fail); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.34 DirectoryEntry.removeRecursively on directory', function (done) { - var dirName = 'de.removeRecursively'; - var subDirName = 'dir'; - var dirExists = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - done(); - }; - // create a new directory entry to kick off it - root.getDirectory(dirName, { - create: true - }, function (entry) { - entry.getDirectory(subDirName, { - create: true - }, function (dir) { - entry.removeRecursively(function () { - root.getDirectory(dirName, { - create: false - }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, directory should not exists: ' + dirName), dirExists); - }, failed.bind(null, done, 'entry.removeRecursively - Error removing directory recursively : ' + dirName)); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + subDirName)); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.35 createReader: create reader on existing directory', function () { - // create reader for root directory - var reader = root.createReader(); - expect(reader).toBeDefined(); - expect(typeof reader.readEntries).toBe('function'); - }); - it('file.spec.36 removeRecursively on root file system', function (done) { - - var remove = function (error) { - expect(error).toBeDefined(); - if (isChrome) { - /* INVALID_MODIFICATION_ERR (code: 9) or ??? (code: 13) is thrown instead of - NO_MODIFICATION_ALLOWED_ERR(code: 6) on trying to call removeRecursively - on the root file system (Chrome). */ - // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); - } else { - expect(error).toBeFileError(FileError.NO_MODIFICATION_ALLOWED_ERR); // eslint-disable-line no-undef - } - done(); - }; - // remove root file system - root.removeRecursively(succeed.bind(null, done, 'root.removeRecursively - Unexpected success callback, root cannot be removed'), remove); - }); - }); - describe('DirectoryReader interface', function () { - describe('readEntries', function () { - it('file.spec.37 should read contents of existing directory', function (done) { - var reader; - var win = function (entries) { - expect(entries).toBeDefined(); - expect(entries instanceof Array).toBe(true); - done(); - }; - // create reader for root directory - reader = root.createReader(); - // read entries - reader.readEntries(win, failed.bind(null, done, 'reader.readEntries - Error reading entries')); - }); - it('file.spec.37.1 should read contents of existing directory', function (done) { - var dirName = 'readEntries.dir'; - var fileName = 'readeEntries.file'; - root.getDirectory(dirName, { - create: true - }, function (directory) { - directory.getFile(fileName, { - create: true - }, function (fileEntry) { - var reader = directory.createReader(); - reader.readEntries(function (entries) { - expect(entries).toBeDefined(); - expect(entries instanceof Array).toBe(true); - expect(entries.length).toBe(1); - expect(entries[0].fullPath).toCanonicallyMatch(fileEntry.fullPath); - expect(entries[0].filesystem).not.toBe(null); - if (isChrome) { - // Slicing '[object {type}]' -> '{type}' - expect(entries[0].filesystem.toString().slice(8, -1)).toEqual('DOMFileSystem'); - } else { - expect(entries[0].filesystem instanceof FileSystem).toBe(true); // eslint-disable-line no-undef - } - - // cleanup - deleteEntry(directory.name, done); - }, failed.bind(null, done, 'reader.readEntries - Error reading entries from directory: ' + dirName)); - }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + fileName)); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.109 should return an empty entry list on the second call', function (done) { - var reader; - var fileName = 'test109.txt'; - // Add a file to ensure the root directory is non-empty and then read the contents of the directory. - root.getFile(fileName, { - create: true - }, function (entry) { - reader = root.createReader(); - // First read - reader.readEntries(function (entries) { - expect(entries).toBeDefined(); - expect(entries instanceof Array).toBe(true); - expect(entries.length).not.toBe(0); - // Second read - reader.readEntries(function (entries_) { - expect(entries_).toBeDefined(); - expect(entries_ instanceof Array).toBe(true); - expect(entries_.length).toBe(0); - // Clean up - deleteEntry(entry.name, done); - }, failed.bind(null, done, 'reader.readEntries - Error during SECOND reading of entries from [root] directory')); - }, failed.bind(null, done, 'reader.readEntries - Error during FIRST reading of entries from [root] directory')); - }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)); - }); - }); - it('file.spec.38 should read contents of directory that has been removed', function (done) { - var dirName = 'de.createReader.notfound'; - // create a new directory entry to kick off it - root.getDirectory(dirName, { - create: true - }, function (directory) { - directory.removeRecursively(function () { - var reader = directory.createReader(); - reader.readEntries(succeed.bind(null, done, 'reader.readEntries - Unexpected success callback, it should not read entries from deleted dir: ' + dirName), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - root.getDirectory(dirName, { - create: false - }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, it should not get deleted directory: ' + dirName), function (err) { - expect(err).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - done(); - }); - }); - }, failed.bind(null, done, 'directory.removeRecursively - Error removing directory recursively : ' + dirName)); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - }); - // DirectoryReader interface - describe('File', function () { - it('file.spec.39 constructor should be defined', function () { - expect(File).toBeDefined(); // eslint-disable-line no-undef - expect(typeof File).toBe('function'); - }); - it('file.spec.40 should be define File attributes', function () { - var file = new File(); // eslint-disable-line no-undef - expect(file.name).toBeDefined(); - expect(file.type).toBeDefined(); - expect(file.lastModifiedDate).toBeDefined(); - expect(file.size).toBeDefined(); - }); - }); - // File - describe('FileEntry', function () { - - it('file.spec.41 should be define FileEntry methods', function (done) { - var fileName = 'fe.methods'; - var testFileEntry = function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(typeof fileEntry.createWriter).toBe('function'); - expect(typeof fileEntry.file).toBe('function'); - // cleanup - deleteEntry(fileEntry.name, done); - }; - // create a new file entry to kick off it - root.getFile(fileName, { - create: true - }, testFileEntry, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)); - }); - it('file.spec.42 createWriter should return a FileWriter object', function (done) { - var fileName = 'fe.createWriter'; - var testFile; - var testWriter = function (writer) { - expect(writer).toBeDefined(); - if (isChrome) { - // Slicing '[object {type}]' -> '{type}' - expect(writer.toString().slice(8, -1)).toEqual('FileWriter'); - } else { - expect(writer instanceof FileWriter).toBe(true); // eslint-disable-line no-undef - } - - // cleanup - deleteEntry(testFile.name, done); - }; - // create a new file entry to kick off it - root.getFile(fileName, { - create: true - }, function (fileEntry) { - testFile = fileEntry; - fileEntry.createWriter(testWriter, failed.bind(null, done, 'fileEntry.createWriter - Error creating Writer from entry')); - }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)); - }); - it('file.spec.43 file should return a File object', function (done) { - var fileName = 'fe.file'; - var newFile; - var testFile = function (file) { - expect(file).toBeDefined(); - if (isChrome) { - // Slicing '[object {type}]' -> '{type}' - expect(file.toString().slice(8, -1)).toEqual('File'); - } else { - expect(file instanceof File).toBe(true); // eslint-disable-line no-undef - } - - // cleanup - deleteEntry(newFile.name, done); - }; - // create a new file entry to kick off it - root.getFile(fileName, { - create: true - }, function (fileEntry) { - newFile = fileEntry; - fileEntry.file(testFile, failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)); - }); - it('file.spec.44 file: on File that has been removed', function (done) { - var fileName = 'fe.no.file'; - // create a new file entry to kick off it - root.getFile(fileName, { - create: true - }, function (fileEntry) { - fileEntry.remove(function () { - fileEntry.file(succeed.bind(null, done, 'fileEntry.file - Unexpected success callback, file it should not be created from removed entry'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - done(); - }); - }, failed.bind(null, done, 'fileEntry.remove - Error removing entry : ' + fileName)); - }, failed.bind(null, done, 'root.getFile - Error creating file : ' + fileName)); - }); - }); - // FileEntry - describe('Entry', function () { - it('file.spec.45 Entry object', function (done) { - var fileName = 'entry'; - var fullPath = joinURL(root.fullPath, fileName); - var winEntry = function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(fileName); - expect(entry.fullPath).toCanonicallyMatch(fullPath); - expect(typeof entry.getMetadata).toBe('function'); - expect(typeof entry.setMetadata).toBe('function'); - expect(typeof entry.moveTo).toBe('function'); - expect(typeof entry.copyTo).toBe('function'); - expect(typeof entry.toURL).toBe('function'); - expect(typeof entry.remove).toBe('function'); - expect(typeof entry.getParent).toBe('function'); - expect(typeof entry.createWriter).toBe('function'); - expect(typeof entry.file).toBe('function'); - // Clean up - deleteEntry(fileName, done); - }; - // create a new file entry - createFile(fileName, winEntry, failed.bind(null, done, 'createFile - Error creating file : ' + fileName)); - }); - it('file.spec.46 Entry.getMetadata on file', function (done) { - var fileName = 'entry.metadata.file'; - // create a new file entry - createFile(fileName, function (entry) { - entry.getMetadata(function (metadata) { - expect(metadata).toBeDefined(); - expect(metadata.modificationTime instanceof Date).toBe(true); - expect(typeof metadata.size).toBe('number'); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'entry.getMetadata - Error getting metadata from entry : ' + fileName)); - }, failed.bind(null, done, 'createFile - Error creating file : ' + fileName)); - }); - it('file.spec.47 Entry.getMetadata on directory', function (done) { - if (isIndexedDBShim) { - /* Does not support metadata for directories (Firefox, IE) */ - pending(); - } - - var dirName = 'entry.metadata.dir'; - // create a new directory entry - createDirectory(dirName, function (entry) { - entry.getMetadata(function (metadata) { - expect(metadata).toBeDefined(); - expect(metadata.modificationTime instanceof Date).toBe(true); - expect(typeof metadata.size).toBe('number'); - expect(metadata.size).toBe(0); - // cleanup - deleteEntry(dirName, done); - }, failed.bind(null, done, 'entry.getMetadata - Error getting metadata from entry : ' + dirName)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.48 Entry.getParent on file in root file system', function (done) { - var fileName = 'entry.parent.file'; - var rootPath = root.fullPath; - // create a new file entry - createFile(fileName, function (entry) { - entry.getParent(function (parent) { - expect(parent).toBeDefined(); - expect(parent.fullPath).toCanonicallyMatch(rootPath); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'entry.getParent - Error getting parent directory of file : ' + fileName)); - }, failed.bind(null, done, 'createFile - Error creating file : ' + fileName)); - }); - it('file.spec.49 Entry.getParent on directory in root file system', function (done) { - var dirName = 'entry.parent.dir'; - var rootPath = root.fullPath; - // create a new directory entry - createDirectory(dirName, function (entry) { - entry.getParent(function (parent) { - expect(parent).toBeDefined(); - expect(parent.fullPath).toCanonicallyMatch(rootPath); - // cleanup - deleteEntry(dirName, done); - }, failed.bind(null, done, 'entry.getParent - Error getting parent directory of directory : ' + dirName)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.50 Entry.getParent on root file system', function (done) { - var rootPath = root.fullPath; - var winParent = function (parent) { - expect(parent).toBeDefined(); - expect(parent.fullPath).toCanonicallyMatch(rootPath); - done(); - }; - // create a new directory entry - root.getParent(winParent, failed.bind(null, done, 'root.getParent - Error getting parent directory of root')); - }); - it('file.spec.51 Entry.toURL on file', function (done) { - var fileName = 'entry.uri.file'; - var rootPath = root.fullPath; - var winURI = function (entry) { - var uri = entry.toURL(); - expect(uri).toBeDefined(); - expect(uri.indexOf(rootPath)).not.toBe(-1); - // cleanup - deleteEntry(fileName, done); - }; - // create a new file entry - createFile(fileName, winURI, failed.bind(null, done, 'createFile - Error creating file : ' + fileName)); - }); - it('file.spec.52 Entry.toURL on directory', function (done) { - var dirName_1 = 'num 1'; - var dirName_2 = 'num 2'; - var rootPath = root.fullPath; - createDirectory(dirName_1, function (entry) { - entry.getDirectory(dirName_2, { - create: true - }, function (entryFile) { - var uri = entryFile.toURL(); - expect(uri).toBeDefined(); - expect(uri).toContain('/num%201/num%202/'); - expect(uri.indexOf(rootPath)).not.toBe(-1); - // cleanup - deleteEntry(dirName_1, done); - }, failed.bind(null, done, 'entry.getDirectory - Error creating directory : ' + dirName_2)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName_1)); - }); - it('file.spec.53 Entry.remove on file', function (done) { - var fileName = 'entr .rm.file'; - // create a new file entry - createFile(fileName, function (entry) { - expect(entry).toBeDefined(); - entry.remove(function () { - root.getFile(fileName, null, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get deleted file : ' + fileName), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(fileName, done); - }); - }, failed.bind(null, done, 'entry.remove - Error removing entry : ' + fileName)); - }, failed.bind(null, done, 'createFile - Error creating file : ' + fileName)); - }); - it('file.spec.53.1 Entry.remove on filename with #s', function (done) { - if (isBrowser) { - pending('Browsers can\'t do that'); - } - var fileName = 'entry.#rm#.file'; - // create a new file entry - createFile(fileName, function (entry) { - expect(entry).toBeDefined(); - entry.remove(function () { - root.getFile(fileName, null, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get deleted file : ' + fileName), function (error) { - expect(error).toBeDefined(); - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - // cleanup - deleteEntry(fileName, done); - }); - }, failed.bind(null, done, 'entry.remove - Error removing entry : ' + fileName)); - }, failed.bind(null, done, 'createFile - Error creating file : ' + fileName)); - }); - it('file.spec.54 remove on empty directory', function (done) { - var dirName = 'entry.rm.dir'; - // create a new directory entry - createDirectory(dirName, function (entry) { - expect(entry).toBeDefined(); - entry.remove(function () { - root.getDirectory(dirName, null, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, it should not get deleted directory : ' + dirName), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(dirName, done); - }); - }, failed.bind(null, done, 'entry.remove - Error removing entry : ' + dirName)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.55 remove on non-empty directory', function (done) { - if (isIndexedDBShim) { - /* Both Entry.remove and directoryEntry.removeRecursively don't fail when removing - non-empty directories - directories being removed are cleaned - along with contents instead (Firefox, IE) */ - pending(); - } - - var dirName = 'ent y.rm.dir.not.empty'; - var fileName = 're ove.txt'; - var fullPath = joinURL(root.fullPath, dirName); - // create a new directory entry - createDirectory(dirName, function (entry) { - entry.getFile(fileName, { - create: true - }, function (fileEntry) { - entry.remove(succeed.bind(null, done, 'entry.remove - Unexpected success callback, it should not remove a directory that contains files : ' + dirName), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome is returning unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - root.getDirectory(dirName, null, function (entry) { - expect(entry).toBeDefined(); - expect(entry.fullPath).toCanonicallyMatch(fullPath); - // cleanup - deleteEntry(dirName, done); - }, failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + dirName)); - }); - }, failed.bind(null, done, 'entry.getFile - Error creating file : ' + fileName + ' inside of ' + dirName)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)); - }); - it('file.spec.56 remove on root file system', function (done) { - - // remove entry that doesn't exist - root.remove(succeed.bind(null, done, 'entry.remove - Unexpected success callback, it should not remove entry that it does not exists'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - /* INVALID_MODIFICATION_ERR (code: 9) or ??? (code: 13) is thrown instead of - NO_MODIFICATION_ALLOWED_ERR(code: 6) on trying to call removeRecursively - on the root file system. */ - // expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); - } else { - expect(error).toBeFileError(FileError.NO_MODIFICATION_ALLOWED_ERR); // eslint-disable-line no-undef - } - done(); - }); - }); - it('file.spec.57 copyTo: file', function (done) { - var file1 = 'entry copy.file1'; - var file2 = 'entry copy.file2'; - var fullPath = joinURL(root.fullPath, file2); - // create a new file entry to kick off it - deleteEntry(file2, function () { - createFile(file1, function (fileEntry) { - // copy file1 to file2 - fileEntry.copyTo(root, file2, function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.fullPath).toCanonicallyMatch(fullPath); - expect(entry.name).toCanonicallyMatch(file2); - root.getFile(file2, { - create: false - }, function (entry2) { - expect(entry2).toBeDefined(); - expect(entry2.isFile).toBe(true); - expect(entry2.isDirectory).toBe(false); - expect(entry2.fullPath).toCanonicallyMatch(fullPath); - expect(entry2.name).toCanonicallyMatch(file2); - // cleanup - deleteEntry(file1, function () { - deleteEntry(file2, done); - }); - }, failed.bind(null, done, 'root.getFile - Error getting copied file : ' + file2)); - }, failed.bind(null, done, 'fileEntry.copyTo - Error copying file : ' + file2)); - }, failed.bind(null, done, 'createFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'deleteEntry - Error removing file : ' + file2)); - }); - it('file.spec.58 copyTo: file onto itself', function (done) { - var file1 = 'entry.copy.fos.file1'; - // create a new file entry to kick off it - createFile(file1, function (entry) { - // copy file1 onto itself - entry.copyTo(root, null, succeed.bind(null, done, 'entry.copyTo - Unexpected success callback, it should not copy a null file'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(file1, done); - }); - }, failed.bind(null, done, 'createFile - Error creating file : ' + file1)); - }); - it('file.spec.59 copyTo: directory', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'file1'; - var srcDir = 'entry.copy.srcDir'; - var dstDir = 'entry.copy.dstDir'; - var dstPath = joinURL(root.fullPath, dstDir); - var filePath = joinURL(dstPath, file1); - // create a new directory entry to kick off it - deleteEntry(dstDir, function () { - createDirectory(srcDir, function (directory) { - // create a file within new directory - directory.getFile(file1, { - create: true - }, function () { - directory.copyTo(root, dstDir, function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.fullPath).toCanonicallyMatch(dstPath); - expect(directory.name).toCanonicallyMatch(dstDir); - root.getDirectory(dstDir, { - create: false - }, function (dirEntry) { - expect(dirEntry).toBeDefined(); - expect(dirEntry.isFile).toBe(false); - expect(dirEntry.isDirectory).toBe(true); - expect(dirEntry.fullPath).toCanonicallyMatch(dstPath); - expect(dirEntry.name).toCanonicallyMatch(dstDir); - dirEntry.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.isFile).toBe(true); - expect(fileEntry.isDirectory).toBe(false); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - expect(fileEntry.name).toCanonicallyMatch(file1); - // cleanup - deleteEntry(srcDir, function () { - deleteEntry(dstDir, done); - }); - }, failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1)); - }, failed.bind(null, done, 'root.getDirectory - Error getting copied directory : ' + dstDir)); - }, failed.bind(null, done, 'directory.copyTo - Error copying directory : ' + srcDir + ' to :' + dstDir)); - }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)); - }); - it('file.spec.60 copyTo: directory to backup at same root directory', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'file1'; - var srcDir = 'entry.copy srcDirSame'; - var dstDir = 'entry.copy srcDirSame-backup'; - var dstPath = joinURL(root.fullPath, dstDir); - var filePath = joinURL(dstPath, file1); - // create a new directory entry to kick off it - deleteEntry(dstDir, function () { - createDirectory(srcDir, function (directory) { - directory.getFile(file1, { - create: true - }, function () { - directory.copyTo(root, dstDir, function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.fullPath).toCanonicallyMatch(dstPath); - expect(directory.name).toCanonicallyMatch(dstDir); - root.getDirectory(dstDir, { - create: false - }, function (dirEntry) { - expect(dirEntry).toBeDefined(); - expect(dirEntry.isFile).toBe(false); - expect(dirEntry.isDirectory).toBe(true); - expect(dirEntry.fullPath).toCanonicallyMatch(dstPath); - expect(dirEntry.name).toCanonicallyMatch(dstDir); - dirEntry.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.isFile).toBe(true); - expect(fileEntry.isDirectory).toBe(false); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - expect(fileEntry.name).toCanonicallyMatch(file1); - // cleanup - deleteEntry(srcDir, function () { - deleteEntry(dstDir, done); - }); - }, failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1)); - }, failed.bind(null, done, 'root.getDirectory - Error getting copied directory : ' + dstDir)); - }, failed.bind(null, done, 'directory.copyTo - Error copying directory : ' + srcDir + ' to :' + dstDir)); - }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)); - }); - it('file.spec.61 copyTo: directory onto itself', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'file1'; - var srcDir = 'entry.copy.dos.srcDir'; - var srcPath = joinURL(root.fullPath, srcDir); - var filePath = joinURL(srcPath, file1); - // create a new directory entry to kick off it - createDirectory(srcDir, function (directory) { - // create a file within new directory - directory.getFile(file1, { - create: true - }, function (fileEntry) { - // copy srcDir onto itself - directory.copyTo(root, null, succeed.bind(null, done, 'directory.copyTo - Unexpected success callback, it should not copy file: ' + srcDir + ' to a null destination'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - root.getDirectory(srcDir, { - create: false - }, function (dirEntry) { - expect(dirEntry).toBeDefined(); - expect(dirEntry.fullPath).toCanonicallyMatch(srcPath); - dirEntry.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // cleanup - deleteEntry(srcDir, done); - }, failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1)); - }, failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + srcDir)); - }); - }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }); - it('file.spec.62 copyTo: directory into itself', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var srcDir = 'entry.copy.dis.srcDir'; - var dstDir = 'entry.copy.dis.dstDir'; - var srcPath = joinURL(root.fullPath, srcDir); - // create a new directory entry to kick off it - createDirectory(srcDir, function (directory) { - // copy source directory into itself - directory.copyTo(directory, dstDir, succeed.bind(null, done, 'directory.copyTo - Unexpected success callback, it should not copy a directory ' + srcDir + ' into itself'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - root.getDirectory(srcDir, { - create: false - }, function (dirEntry) { - // returning confirms existence so just check fullPath entry - expect(dirEntry).toBeDefined(); - expect(dirEntry.fullPath).toCanonicallyMatch(srcPath); - // cleanup - deleteEntry(srcDir, done); - }, failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + srcDir)); - }); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }); - it('file.spec.63 copyTo: directory that does not exist', function (done) { - var file1 = 'entry.copy.dnf.file1'; - var dirName = 'dir-foo'; - createFile(file1, function (fileEntry) { - createDirectory(dirName, function (dirEntry) { - dirEntry.remove(function () { - fileEntry.copyTo(dirEntry, null, succeed.bind(null, done, 'fileEntry.copyTo - Unexpected success callback, it should not copy a file ' + file1 + ' into a removed directory'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - done(); - }); - }, failed.bind(null, done, 'dirEntry.remove - Error removing directory : ' + dirName)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dirName)); - }, failed.bind(null, done, 'createFile - Error creating file : ' + file1)); - }); - it('file.spec.64 copyTo: invalid target name', function (done) { - if (isBrowser) { - /* The plugin does not follow ["8.3 Naming restrictions"] - (http://www.w3.org/TR/2011/WD-file-system-api-20110419/#naming-restrictions */ - pending(); - } - - var file1 = 'entry.copy.itn.file1'; - var file2 = 'bad:file:name'; - // create a new file entry - createFile(file1, function (entry) { - // copy file1 to file2 - entry.copyTo(root, file2, succeed.bind(null, done, 'entry.copyTo - Unexpected success callback, it should not copy a file ' + file1 + ' to an invalid file name: ' + file2), function (error) { - expect(error).toBeDefined(); - expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef - // cleanup - deleteEntry(file1, done); - }); - }, failed.bind(null, done, 'createFile - Error creating file : ' + file1)); - }); - it('file.spec.65 moveTo: file to same parent', function (done) { - var file1 = 'entry.move.fsp.file1'; - var file2 = 'entry.move.fsp.file2'; - var dstPath = joinURL(root.fullPath, file2); - // create a new file entry to kick off it - createFile(file1, function (entry) { - // move file1 to file2 - entry.moveTo(root, file2, function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.fullPath).toCanonicallyMatch(dstPath); - expect(entry.name).toCanonicallyMatch(file2); - root.getFile(file2, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(dstPath); - root.getFile(file1, { - create: false - }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) { - // expect(navigator.fileMgr.testFileExists(srcPath) === false, "original file should not exist."); - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(file1, function () { - deleteEntry(file2, done); - }); - }); - }, failed.bind(null, done, 'root.getFile - Error getting file : ' + file2)); - }, failed.bind(null, done, 'entry.moveTo - Error moving file : ' + file1 + ' to root as: ' + file2)); - }, failed.bind(null, done, 'createFile - Error creating file : ' + file1)); - }); - it('file.spec.66 moveTo: file to new parent', function (done) { - var file1 = 'entry.move.fnp.file1'; - var dir = 'entry.move.fnp.dir'; - var dstPath = joinURL(joinURL(root.fullPath, dir), file1); - // ensure destination directory is cleaned up first - deleteEntry(dir, function () { - // create a new file entry to kick off it - createFile(file1, function (entry) { - // create a parent directory to move file to - root.getDirectory(dir, { - create: true - }, function (directory) { - // move file1 to new directory - // move the file - entry.moveTo(directory, null, function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.fullPath).toCanonicallyMatch(dstPath); - expect(entry.name).toCanonicallyMatch(file1); - // test the moved file exists - directory.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(dstPath); - root.getFile(file1, { - create: false - }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(file1, function () { - deleteEntry(dir, done); - }); - }); - }, failed.bind(null, done, 'directory.getFile - Error getting file : ' + file1 + ' from: ' + dir)); - }, failed.bind(null, done, 'entry.moveTo - Error moving file : ' + file1 + ' to: ' + dir + ' with the same name')); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dir)); - }, failed.bind(null, done, 'createFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dir)); - }); - it('file.spec.67 moveTo: directory to same parent', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'file1'; - var srcDir = 'entry.move.dsp.srcDir'; - var dstDir = 'entry.move.dsp.dstDir'; - var dstPath = joinURL(root.fullPath, dstDir); - var filePath = joinURL(dstPath, file1); - // ensure destination directory is cleaned up before it - deleteEntry(dstDir, function () { - // create a new directory entry to kick off it - createDirectory(srcDir, function (directory) { - // create a file within directory - directory.getFile(file1, { - create: true - }, function () { - // move srcDir to dstDir - directory.moveTo(root, dstDir, function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.fullPath).toCanonicallyMatch(dstPath); - expect(directory.name).toCanonicallyMatch(dstDir); - // test that moved file exists in destination dir - directory.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // check that the moved file no longer exists in original dir - root.getFile(file1, { - create: false - }, succeed.bind(null, done, 'directory.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(srcDir, function () { - deleteEntry(dstDir, done); - }); - }); - }, failed.bind(null, done, 'directory.getFile - Error getting file : ' + file1 + ' from: ' + srcDir)); - }, failed.bind(null, done, 'entry.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir)); - }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)); - }); - it('file.spec.68 moveTo: directory to same parent with same name', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'file1'; - var srcDir = 'entry.move.dsp.srcDir'; - var dstDir = 'entry.move.dsp.srcDir-backup'; - var dstPath = joinURL(root.fullPath, dstDir); - var filePath = joinURL(dstPath, file1); - // ensure destination directory is cleaned up before it - deleteEntry(dstDir, function () { - // create a new directory entry to kick off it - createDirectory(srcDir, function (directory) { - // create a file within directory - directory.getFile(file1, { - create: true - }, function () { - // move srcDir to dstDir - directory.moveTo(root, dstDir, function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.fullPath).toCanonicallyMatch(dstPath); - expect(directory.name).toCanonicallyMatch(dstDir); - // check that moved file exists in destination dir - directory.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // check that the moved file no longer exists in original dir - root.getFile(file1, { - create: false - }, succeed.bind(null, done, 'directory.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(srcDir, function () { - deleteEntry(dstDir, done); - }); - }); - }, failed.bind(null, done, 'directory.getFile - Error getting file : ' + file1 + ' from: ' + srcDir)); - }, failed.bind(null, done, 'entry.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir)); - }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)); - }); - it('file.spec.69 moveTo: directory to new parent', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'file1'; - var srcDir = 'entry.move.dnp.srcDir'; - var dstDir = 'entry.move.dnp.dstDir'; - var dstPath = joinURL(root.fullPath, dstDir); - var filePath = joinURL(dstPath, file1); - // ensure destination directory is cleaned up before it - deleteEntry(dstDir, function () { - // create a new directory entry to kick off it - createDirectory(srcDir, function (directory) { - // create a file within directory - directory.getFile(file1, { - create: true - }, function () { - // move srcDir to dstDir - directory.moveTo(root, dstDir, function (dirEntry) { - expect(dirEntry).toBeDefined(); - expect(dirEntry.isFile).toBe(false); - expect(dirEntry.isDirectory).toBe(true); - expect(dirEntry.fullPath).toCanonicallyMatch(dstPath); - expect(dirEntry.name).toCanonicallyMatch(dstDir); - // test that moved file exists in destination dir - dirEntry.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // test that the moved file no longer exists in original dir - root.getFile(file1, { - create: false - }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not get invalid or moved file: ' + file1), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(srcDir, function () { - deleteEntry(dstDir, done); - }); - }); - }, failed.bind(null, done, 'directory.getFile - Error getting file : ' + file1 + ' from: ' + dstDir)); - }, failed.bind(null, done, 'directory.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir)); - }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)); - }); - - it('file.spec.131 moveTo: directories tree to new parent', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var srcDir = 'entry.move.dnp.srcDir'; - var srcDirNestedFirst = 'entry.move.dnp.srcDir.Nested1'; - var srcDirNestedSecond = 'entry.move.dnp.srcDir.Nested2'; - var dstDir = 'entry.move.dnp.dstDir'; - - createDirectory(dstDir, function (dstDirectory) { - createDirectory(srcDir, function (srcDirectory) { - srcDirectory.getDirectory(srcDirNestedFirst, { create: true }, function () { - srcDirectory.getDirectory(srcDirNestedSecond, { create: true }, function () { - srcDirectory.moveTo(dstDirectory, srcDir, function successMove (transferredDirectory) { - var directoryReader = transferredDirectory.createReader(); - directoryReader.readEntries(function successRead (entries) { - expect(entries.length).toBe(2); - if (!isChrome) { - expect(entries[0].name).toBe(srcDirNestedFirst); - expect(entries[1].name).toBe(srcDirNestedSecond); - } - deleteEntry(dstDir, done); - }, failed.bind(null, done, 'Error getting entries from: ' + transferredDirectory)); - }, failed.bind(null, done, 'directory.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir)); - }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + srcDirNestedSecond)); - }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + srcDirNestedFirst)); - }, failed.bind(null, done, 'createDirectory - Error creating source directory : ' + srcDir)); - }, failed.bind(null, done, 'createDirectory - Error creating dest directory : ' + dstDir)); - }); - - it('file.spec.70 moveTo: directory onto itself', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'file1'; - var srcDir = 'entry.move.dos.srcDir'; - var srcPath = joinURL(root.fullPath, srcDir); - var filePath = joinURL(srcPath, file1); - // create a new directory entry to kick off it - createDirectory(srcDir, function (directory) { - // create a file within new directory - directory.getFile(file1, { - create: true - }, function () { - // move srcDir onto itself - directory.moveTo(root, null, succeed.bind(null, done, 'directory.moveTo - Unexpected success callback, it should not move directory to invalid path'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - // test that original dir still exists - root.getDirectory(srcDir, { - create: false - }, function (dirEntry) { - // returning confirms existence so just check fullPath entry - expect(dirEntry).toBeDefined(); - expect(dirEntry.fullPath).toCanonicallyMatch(srcPath); - dirEntry.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // cleanup - deleteEntry(srcDir, done); - }, failed.bind(null, done, 'dirEntry.getFile - Error getting file : ' + file1 + ' from: ' + srcDir)); - }, failed.bind(null, done, 'root.getDirectory - Error getting directory : ' + srcDir)); - }); - }, failed.bind(null, done, 'directory.getFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }); - it('file.spec.71 moveTo: directory into itself', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var srcDir = 'entry.move.dis.srcDir'; - var dstDir = 'entry.move.dis.dstDir'; - var srcPath = joinURL(root.fullPath, srcDir); - // create a new directory entry to kick off it - createDirectory(srcDir, function (directory) { - // move source directory into itself - directory.moveTo(directory, dstDir, succeed.bind(null, done, 'directory.moveTo - Unexpected success callback, it should not move a directory into itself: ' + srcDir), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - // make sure original directory still exists - root.getDirectory(srcDir, { - create: false - }, function (entry) { - expect(entry).toBeDefined(); - expect(entry.fullPath).toCanonicallyMatch(srcPath); - // cleanup - deleteEntry(srcDir, done); - }, failed.bind(null, done, 'root.getDirectory - Error getting directory, making sure that original directory still exists: ' + srcDir)); - }); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }); - it('file.spec.130 moveTo: directory into similar directory', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var srcDir = 'entry.move.dis.srcDir'; - var dstDir = 'entry.move.dis.srcDir-backup'; - // create a new directory entry to kick off it - createDirectory(srcDir, function (srcDirEntry) { - deleteEntry(dstDir, function () { - createDirectory(dstDir, function (dstDirEntry) { - // move source directory into itself - srcDirEntry.moveTo(dstDirEntry, 'file', function (newDirEntry) { - expect(newDirEntry).toBeDefined(); - deleteEntry(dstDir, done); - }, failed.bind(null, done, 'directory.moveTo - Error moving a directory into a similarly-named directory: ' + srcDir)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + dstDir)); - }, failed.bind(null, done, 'deleteEntry - Error deleting directory : ' + dstDir)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }); - it('file.spec.72 moveTo: file onto itself', function (done) { - var file1 = 'entry.move.fos.file1'; - var filePath = joinURL(root.fullPath, file1); - // create a new file entry to kick off it - createFile(file1, function (entry) { - // move file1 onto itself - entry.moveTo(root, null, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, it should not move a file: ' + file1 + ' into the same parent'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - // test that original file still exists - root.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // cleanup - deleteEntry(file1, done); - }, failed.bind(null, done, 'root.getFile - Error getting file, making sure that original file still exists: ' + file1)); - }); - }, failed.bind(null, done, 'createFile - Error creating file : ' + file1)); - }); - it('file.spec.73 moveTo: file onto existing directory', function (done) { - var file1 = 'entry.move.fod.file1'; - var dstDir = 'entry.move.fod.dstDir'; - var subDir = 'subDir'; - var dirPath = joinURL(joinURL(root.fullPath, dstDir), subDir); - var filePath = joinURL(root.fullPath, file1); - // ensure destination directory is cleaned up before it - deleteEntry(dstDir, function () { - // create a new file entry to kick off it - createFile(file1, function (entry) { - // create top level directory - root.getDirectory(dstDir, { - create: true - }, function (directory) { - // create sub-directory - directory.getDirectory(subDir, { - create: true - }, function (subDirectory) { - // move file1 onto sub-directory - entry.moveTo(directory, subDir, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, it should not move a file: ' + file1 + ' into directory: ' + dstDir + '\n' + subDir + ' directory already exists'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - // check that original dir still exists - directory.getDirectory(subDir, { - create: false - }, function (dirEntry) { - expect(dirEntry).toBeDefined(); - expect(dirEntry.fullPath).toCanonicallyMatch(dirPath); - // check that original file still exists - root.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // cleanup - deleteEntry(file1, function () { - deleteEntry(dstDir, done); - }); - }, failed.bind(null, done, 'root.getFile - Error getting file, making sure that original file still exists: ' + file1)); - }, failed.bind(null, done, 'directory.getDirectory - Error getting directory, making sure that original directory still exists: ' + subDir)); - }); - }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + subDir)); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory : ' + dstDir)); - }, failed.bind(null, done, 'createFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)); - }); - it('file.spec.74 moveTo: directory onto existing file', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'entry.move.dof.file1'; - var srcDir = 'entry.move.dof.srcDir'; - var dirPath = joinURL(root.fullPath, srcDir); - var filePath = joinURL(root.fullPath, file1); - // create a new directory entry to kick off it - createDirectory(srcDir, function (entry) { - // create file - root.getFile(file1, { - create: true - }, function (fileEntry) { - // move directory onto file - entry.moveTo(root, file1, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, it should not move : \n' + srcDir + ' into root directory renamed as ' + file1 + '\n' + file1 + ' file already exists'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - // test that original directory exists - root.getDirectory(srcDir, { - create: false - }, function (dirEntry) { - // returning confirms existence so just check fullPath entry - expect(dirEntry).toBeDefined(); - expect(dirEntry.fullPath).toCanonicallyMatch(dirPath); - // test that original file exists - root.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // cleanup - deleteEntry(file1, function () { - deleteEntry(srcDir, done); - }); - }, failed.bind(null, done, 'root.getFile - Error getting file, making sure that original file still exists: ' + file1)); - }, failed.bind(null, done, 'directory.getDirectory - Error getting directory, making sure that original directory still exists: ' + srcDir)); - }); - }, failed.bind(null, done, 'root.getFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }); - it('file.spec.75 copyTo: directory onto existing file', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'entry.copy.dof.file1'; - var srcDir = 'entry.copy.dof.srcDir'; - var dirPath = joinURL(root.fullPath, srcDir); - var filePath = joinURL(root.fullPath, file1); - // create a new directory entry to kick off it - createDirectory(srcDir, function (entry) { - // create file - root.getFile(file1, { - create: true - }, function () { - // copy directory onto file - entry.copyTo(root, file1, succeed.bind(null, done, 'entry.copyTo - Unexpected success callback, it should not copy : \n' + srcDir + ' into root directory renamed as ' + file1 + '\n' + file1 + ' file already exists'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - // check that original dir still exists - root.getDirectory(srcDir, { - create: false - }, function (dirEntry) { - // returning confirms existence so just check fullPath entry - expect(dirEntry).toBeDefined(); - expect(dirEntry.fullPath).toCanonicallyMatch(dirPath); - // test that original file still exists - root.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // cleanup - deleteEntry(file1, function () { - deleteEntry(srcDir, done); - }); - }, failed.bind(null, done, 'root.getFile - Error getting file, making sure that original file still exists: ' + file1)); - }, failed.bind(null, done, 'root.getDirectory - Error getting directory, making sure that original directory still exists: ' + srcDir)); - }); - }, failed.bind(null, done, 'root.getFile - Error creating file : ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }); - it('file.spec.76 moveTo: directory onto directory that is not empty', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var srcDir = 'entry.move.dod.srcDir'; - var dstDir = 'entry.move.dod.dstDir'; - var subDir = 'subDir'; - var srcPath = joinURL(root.fullPath, srcDir); - var dstPath = joinURL(joinURL(root.fullPath, dstDir), subDir); - // ensure destination directory is cleaned up before it - deleteEntry(dstDir, function () { - // create a new file entry to kick off it - createDirectory(srcDir, function (entry) { - // create top level directory - root.getDirectory(dstDir, { - create: true - }, function (directory) { - // create sub-directory - directory.getDirectory(subDir, { - create: true - }, function () { - // move srcDir onto dstDir (not empty) - entry.moveTo(root, dstDir, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, it should not copy : \n' + srcDir + ' into root directory renamed as ' + dstDir + '\n' + dstDir + ' directory already exists'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - // chrome returns unknown error with code 13 - } else { - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } - // making sure destination directory still exists - directory.getDirectory(subDir, { - create: false - }, function (dirEntry) { - // returning confirms existence so just check fullPath entry - expect(dirEntry).toBeDefined(); - expect(dirEntry.fullPath).toCanonicallyMatch(dstPath); - // making sure source directory exists - root.getDirectory(srcDir, { - create: false - }, function (srcEntry) { - expect(srcEntry).toBeDefined(); - expect(srcEntry.fullPath).toCanonicallyMatch(srcPath); - // cleanup - deleteEntry(srcDir, function () { - deleteEntry(dstDir, done); - }); - }, failed.bind(null, done, 'root.getDirectory - Error getting directory, making sure that original directory still exists: ' + srcDir)); - }, failed.bind(null, done, 'directory.getDirectory - Error getting directory, making sure that original directory still exists: ' + subDir)); - }); - }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + subDir)); - }, failed.bind(null, done, 'directory.getDirectory - Error creating directory : ' + subDir)); - }, failed.bind(null, done, 'createDirectory - Error creating directory : ' + srcDir)); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)); - }); - it('file.spec.77 moveTo: file replace existing file', function (done) { - var file1 = 'entry.move.frf.file1'; - var file2 = 'entry.move.frf.file2'; - var file2Path = joinURL(root.fullPath, file2); - // create a new directory entry to kick off it - createFile(file1, function (entry) { - // create file - root.getFile(file2, { - create: true - }, function () { - // replace file2 with file1 - entry.moveTo(root, file2, function (entry2) { - expect(entry2).toBeDefined(); - expect(entry2.isFile).toBe(true); - expect(entry2.isDirectory).toBe(false); - expect(entry2.fullPath).toCanonicallyMatch(file2Path); - expect(entry2.name).toCanonicallyMatch(file2); - // old file should not exists - root.getFile(file1, { - create: false - }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, file: ' + file1 + ' should not exists'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // test that new file exists - root.getFile(file2, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(file2Path); - // cleanup - deleteEntry(file1, function () { - deleteEntry(file2, done); - }); - }, failed.bind(null, done, 'root.getFile - Error getting moved file: ' + file2)); - }); - }, failed.bind(null, done, 'entry.moveTo - Error moving file : ' + file1 + ' to root as: ' + file2)); - }, failed.bind(null, done, 'root.getFile - Error creating file: ' + file2)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + file1)); - }); - it('file.spec.78 moveTo: directory replace empty directory', function (done) { - if (isIndexedDBShim) { - /* `copyTo` and `moveTo` functions do not support directories (Firefox, IE) */ - pending(); - } - - var file1 = 'file1'; - var srcDir = 'entry.move.drd.srcDir'; - var dstDir = 'entry.move.drd.dstDir'; - var dstPath = joinURL(root.fullPath, dstDir); - var filePath = dstPath + '/' + file1; - // ensure destination directory is cleaned up before it - deleteEntry(dstDir, function () { - // create a new directory entry to kick off it - createDirectory(srcDir, function (directory) { - // create a file within source directory - directory.getFile(file1, { - create: true - }, function () { - // create destination directory - root.getDirectory(dstDir, { - create: true - }, function () { - // move srcDir to dstDir - directory.moveTo(root, dstDir, function (dirEntry) { - expect(dirEntry).toBeDefined(); - expect(dirEntry.isFile).toBe(false); - expect(dirEntry.isDirectory).toBe(true); - expect(dirEntry.fullPath).toCanonicallyMatch(dstPath); - expect(dirEntry.name).toCanonicallyMatch(dstDir); - // check that old directory contents have been moved - dirEntry.getFile(file1, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.fullPath).toCanonicallyMatch(filePath); - // check that old directory no longer exists - root.getDirectory(srcDir, { - create: false - }, succeed.bind(null, done, 'root.getDirectory - Unexpected success callback, directory: ' + srcDir + ' should not exists'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(srcDir, function () { - deleteEntry(dstDir, done); - }); - }); - }, failed.bind(null, done, 'dirEntry.getFile - Error getting moved file: ' + file1)); - }, failed.bind(null, done, 'entry.moveTo - Error moving directory : ' + srcDir + ' to root as: ' + dstDir)); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory: ' + dstDir)); - }, failed.bind(null, done, 'root.getFile - Error creating file: ' + file1)); - }, failed.bind(null, done, 'createDirectory - Error creating directory: ' + srcDir)); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)); - }); - it('file.spec.79 moveTo: directory that does not exist', function (done) { - if (isChrome) { - pending('chrome freak out about non-existend dir not being a DirectoryEntry'); - } - var file1 = 'entry.move.dnf.file1'; - var dstDir = 'entry.move.dnf.dstDir'; - var dstPath = joinURL(root.fullPath, dstDir); - // create a new file entry to kick off it - createFile(file1, function (entry) { - // move file to directory that does not exist - var directory = new DirectoryEntry(); // eslint-disable-line no-undef - directory.filesystem = root.filesystem; - directory.fullPath = dstPath; - entry.moveTo(directory, null, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, parent directory: ' + dstPath + ' should not exists'), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - /* INVALID_MODIFICATION_ERR (code: 9) is thrown instead of NOT_FOUND_ERR(code: 1) - on trying to moveTo directory that does not exist. */ - expect(error).toBeFileError(FileError.INVALID_MODIFICATION_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - // cleanup - deleteEntry(file1, done); - }); - }, failed.bind(null, done, 'createFile - Error creating file: ' + file1)); - }); - it('file.spec.80 moveTo: invalid target name', function (done) { - if (isBrowser) { - /* The plugin does not follow ["8.3 Naming restrictions"] - (http://www.w3.org/TR/2011/WD-file-system-api-20110419/#naming-restrictions */ - pending(); - } - - var file1 = 'entry.move.itn.file1'; - var file2 = 'bad:file:name'; - // create a new file entry to kick off it - createFile(file1, function (entry) { - // move file1 to file2 - entry.moveTo(root, file2, succeed.bind(null, done, 'entry.moveTo - Unexpected success callback, : ' + file1 + ' to root as: ' + file2), function (error) { - expect(error).toBeDefined(); - expect(error).toBeFileError(FileError.ENCODING_ERR); // eslint-disable-line no-undef - // cleanup - deleteEntry(file1, done); - }); - }, failed.bind(null, done, 'createFile - Error creating file: ' + file1)); - }); - }); - // Entry - describe('FileReader', function () { - it('file.spec.81 should have correct methods', function () { - var reader = new FileReader(); // eslint-disable-line no-undef - expect(reader).toBeDefined(); - expect(typeof reader.readAsBinaryString).toBe('function'); - expect(typeof reader.readAsDataURL).toBe('function'); - expect(typeof reader.readAsText).toBe('function'); - expect(typeof reader.readAsArrayBuffer).toBe('function'); - expect(typeof reader.abort).toBe('function'); - expect(reader.result).toBe(null); - }); - }); - // FileReader - describe('Read method', function () { - it('file.spec.82 should error out on non-existent file', function (done) { - var fileName = cordova.platformId === 'windowsphone' ? root.toURL() + '/' + 'somefile.txt' : 'somefile.txt'; // eslint-disable-line no-undef - var verifier = function (evt) { - expect(evt).toBeDefined(); - if (isChrome) { - expect(evt.target.error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(evt.target.error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - done(); - }; - root.getFile(fileName, { - create: true - }, function (entry) { - entry.file(function (file) { - deleteEntry(fileName, function () { - // Create FileReader - var reader = new FileReader(); // eslint-disable-line no-undef - reader.onerror = verifier; - reader.onload = succeed.bind(null, done, 'reader.onload - Unexpected success callback, file: ' + fileName + ' it should not exists'); - reader.readAsText(file); - }, failed.bind(null, done, 'deleteEntry - Error removing file: ' + fileName)); - }, failed.bind(null, done, 'entry.file - Error reading file: ' + fileName)); - }, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)); - }); - it('file.spec.83 should be able to read native blob objects', function (done) { - // Skip test if blobs are not supported (e.g.: Android 2.3). - if (typeof window.Blob === 'undefined' || typeof window.Uint8Array === 'undefined') { - expect(true).toFailWithMessage('Platform does not supported this feature'); - done(); - } - var contents = 'asdf'; - var uint8Array = new Uint8Array(contents.length); - for (var i = 0; i < contents.length; ++i) { - uint8Array[i] = contents.charCodeAt(i); - } - var Builder = window.BlobBuilder || window.WebKitBlobBuilder; - var blob; - if (Builder) { - var builder = new Builder(); - builder.append(uint8Array.buffer); - builder.append(contents); - blob = builder.getBlob('text/plain'); - } else { - try { - // iOS 6 does not support Views, so pass in the buffer. - blob = new Blob([uint8Array.buffer, contents]); // eslint-disable-line no-undef - } catch (e) { - // Skip the test if we can't create a blob (e.g.: iOS 5). - if (e instanceof TypeError) { - expect(true).toFailWithMessage('Platform does not supported this feature'); - done(); - } - throw e; - } - } - var verifier = function (evt) { - expect(evt).toBeDefined(); - expect(evt.target.result).toBe('asdfasdf'); - done(); - }; - var reader = new FileReader(); // eslint-disable-line no-undef - reader.onloadend = verifier; - reader.readAsText(blob); - }); - function writeDummyFile (writeBinary, callback, done, fileContents) { - var fileName = 'dummy.txt'; - var fileEntry = null; - // use default string if file data is not provided - var fileData = fileContents !== undefined ? fileContents : - '\u20AC\xEB - There is an exception to every rule. Except this one.'; - var fileDataAsBinaryString = fileContents !== undefined ? fileContents : - '\xe2\x82\xac\xc3\xab - There is an exception to every rule. Except this one.'; - - function createWriter (fe) { - fileEntry = fe; - fileEntry.createWriter(writeFile, failed.bind(null, done, 'fileEntry.createWriter - Error reading file: ' + fileName)); - } - - // writes file and reads it back in - function writeFile (writer) { - writer.onwriteend = function () { - fileEntry.file(function (f) { - callback(fileEntry, f, fileData, fileDataAsBinaryString); - }, failed.bind(null, done, 'writer.onwriteend - Error writing data on file: ' + fileName)); - }; - writer.write(fileData); - } - - fileData += writeBinary ? 'bin:\x01\x00' : ''; - fileDataAsBinaryString += writeBinary ? 'bin:\x01\x00' : ''; - // create a file, write to it, and read it in again - createFile(fileName, createWriter, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - } - function runReaderTest (funcName, writeBinary, done, progressFunc, verifierFunc, sliceStart, sliceEnd, fileContents) { - writeDummyFile(writeBinary, function (fileEntry, file, fileData, fileDataAsBinaryString) { - var verifier = function (evt) { - expect(evt).toBeDefined(); - verifierFunc(evt, fileData, fileDataAsBinaryString); - }; - var reader = new FileReader(); // eslint-disable-line no-undef - reader.onprogress = progressFunc; - reader.onload = verifier; - reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + file + ' using function: ' + funcName); - if (sliceEnd !== undefined) { - // 'type' is specified so that is will be preserved in the resulting file: - // http://www.w3.org/TR/FileAPI/#slice-method-algo -> "6.4.1. The slice method" -> 4. A), 6. c) - file = file.slice(sliceStart, sliceEnd, file.type); - } else if (sliceStart !== undefined) { - file = file.slice(sliceStart, file.size, file.type); - } - reader[funcName](file); - }, done, fileContents); - } - function arrayBufferEqualsString (ab, str) { - var buf = new Uint8Array(ab); - var match = buf.length === str.length; - for (var i = 0; match && i < buf.length; i++) { - match = buf[i] === str.charCodeAt(i); - } - return match; - } - it('file.spec.84 should read file properly, readAsText', function (done) { - runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(evt.target.result).toBe(fileData); - done(); - }); - }); - it('file.spec.84.1 should read JSON file properly, readAsText', function (done) { - var testObject = {key1: 'value1', key2: 2}; - runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(evt.target.result).toEqual(JSON.stringify(testObject)); - done(); - }, undefined, undefined, JSON.stringify(testObject)); - }); - it('file.spec.85 should read file properly, Data URI', function (done) { - runReaderTest('readAsDataURL', true, done, null, function (evt, fileData, fileDataAsBinaryString) { - /* `readAsDataURL` function is supported, but the mediatype in Chrome depends on entry name extension, - mediatype in IE is always empty (which is the same as `text-plain` according the specification), - the mediatype in Firefox is always `application/octet-stream`. - For example, if the content is `abcdefg` then Firefox returns `data:application/octet-stream;base64,YWJjZGVmZw==`, - IE returns `data:;base64,YWJjZGVmZw==`, Chrome returns `data:;base64,YWJjZGVmZw==`. */ - expect(evt.target.result).toBeDataUrl(); - - // The atob function it is completely ignored during mobilespec execution, besides the returned object: evt - // it is encoded and the atob function is aimed to decode a string. Even with btoa (encode) the function it gets stucked - // because of the Unicode characters that contains the fileData object. - // Issue reported at JIRA with all the details: CB-7095 - - // expect(evt.target.result.slice(23)).toBe(atob(fileData)); - - done(); - }); - }); - it('file.spec.86 should read file properly, readAsBinaryString', function (done) { - if (isIE) { - /* `readAsBinaryString` function is not supported by IE and has not the stub. */ - pending(); - } - - runReaderTest('readAsBinaryString', true, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(evt.target.result).toBe(fileDataAsBinaryString); - done(); - }); - }); - it('file.spec.87 should read file properly, readAsArrayBuffer', function (done) { - // Skip test if ArrayBuffers are not supported (e.g.: Android 2.3). - if (typeof window.ArrayBuffer === 'undefined') { - expect(true).toFailWithMessage('Platform does not supported this feature'); - done(); - } - runReaderTest('readAsArrayBuffer', true, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(arrayBufferEqualsString(evt.target.result, fileDataAsBinaryString)).toBe(true); - done(); - }); - }); - it('file.spec.88 should read sliced file: readAsText', function (done) { - runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(evt.target.result).toBe(fileDataAsBinaryString.slice(10, 40)); - done(); - }, 10, 40); - }); - it('file.spec.89 should read sliced file: slice past eof', function (done) { - runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(evt.target.result).toBe(fileData.slice(-5, 9999)); - done(); - }, -5, 9999); - }); - it('file.spec.90 should read sliced file: slice to eof', function (done) { - runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(evt.target.result).toBe(fileData.slice(-5)); - done(); - }, -5); - }); - it('file.spec.91 should read empty slice', function (done) { - runReaderTest('readAsText', false, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(evt.target.result).toBe(''); - done(); - }, 0, 0); - }); - it('file.spec.92 should read sliced file properly, readAsDataURL', function (done) { - runReaderTest('readAsDataURL', true, done, null, function (evt, fileData, fileDataAsBinaryString) { - /* `readAsDataURL` function is supported, but the mediatype in Chrome depends on entry name extension, - mediatype in IE is always empty (which is the same as `text-plain` according the specification), - the mediatype in Firefox is always `application/octet-stream`. - For example, if the content is `abcdefg` then Firefox returns `data:application/octet-stream;base64,YWJjZGVmZw==`, - IE returns `data:;base64,YWJjZGVmZw==`, Chrome returns `data:;base64,YWJjZGVmZw==`. */ - expect(evt.target.result).toBeDataUrl(); - - // The atob function it is completely ignored during mobilespec execution, besides the returned object: evt - // it is encoded and the atob function is aimed to decode a string. Even with btoa (encode) the function it gets stucked - // because of the Unicode characters that contains the fileData object. - // Issue reported at JIRA with all the details: CB-7095 - - // expect(evt.target.result.slice(23)).toBe(atob(fileDataAsBinaryString.slice(10, -3))); - - done(); - }, 10, -3); - }); - it('file.spec.93 should read sliced file properly, readAsBinaryString', function (done) { - if (isIE) { - /* `readAsBinaryString` function is not supported by IE and has not the stub. */ - pending(); - } - - runReaderTest('readAsBinaryString', true, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(evt.target.result).toBe(fileDataAsBinaryString.slice(-10, -5)); - done(); - }, -10, -5); - }); - it('file.spec.94 should read sliced file properly, readAsArrayBuffer', function (done) { - // Skip test if ArrayBuffers are not supported (e.g.: Android 2.3). - if (typeof window.ArrayBuffer === 'undefined') { - expect(true).toFailWithMessage('Platform does not supported this feature'); - done(); - } - runReaderTest('readAsArrayBuffer', true, done, null, function (evt, fileData, fileDataAsBinaryString) { - expect(arrayBufferEqualsString(evt.target.result, fileDataAsBinaryString.slice(0, -1))).toBe(true); - done(); - }, 0, -1); - }); - it('file.spec.94.5 should read large file in multiple chunks, readAsArrayBuffer', function (done) { - // Skip test if ArrayBuffers are not supported (e.g.: Android 2.3). - if (typeof window.ArrayBuffer === 'undefined') { - expect(true).toFailWithMessage('Platform does not supported this feature'); - done(); - } - - var largeText = ''; - for (var i = 0; i < 1000; i++) { - largeText += 'Test ' + i + '\n'; - } - - // Set the chunk size so that the read will take 5 chunks - FileReader.READ_CHUNK_SIZE = Math.floor(largeText.length / 4) + 1; // eslint-disable-line no-undef - - var chunkCount = 0; - var lastProgressValue = -1; - var progressFunc = function (evt) { - expect(evt.loaded).toBeDefined(); - expect(evt.total).toBeDefined(); - - expect(evt.total >= largeText.length).toBe(true); - expect(evt.total <= largeText.length + 5).toBe(true); - expect(evt.loaded > lastProgressValue).toBe(true); - expect(evt.loaded <= evt.total).toBe(true); - - lastProgressValue = evt.loaded; - chunkCount++; - }; - - runReaderTest( - 'readAsArrayBuffer', true, done, progressFunc, - function (evt, fileData, fileDataAsBinaryString) { - expect(arrayBufferEqualsString(evt.target.result, fileDataAsBinaryString.slice(0, -1))).toBe(true); - expect(lastProgressValue >= largeText.length).toBe(true); - expect(lastProgressValue <= largeText.length + 5).toBe(true); - if (!isChrome) { - // chrome downloads it in one chunk -.- - expect(chunkCount).toBe(5); - } - done(); - }, - 0, -1, largeText); - }); - it('file.spec.94.6 should read large file in multiple chunks, readAsDataURL', function (done) { - var largeText = ''; - for (var i = 0; i < 10; i++) { - largeText += 'Test ' + i + '\n'; - } - - // Set the chunk size so that the read will take 5 chunks - FileReader.READ_CHUNK_SIZE = Math.floor(largeText.length / 4) + 1; // eslint-disable-line no-undef - - var lastProgressValue = 0; - var progressFunc = function (evt) { - expect(evt.total).toBeDefined(); - expect(evt.total).toEqual(largeText.length); - - expect(evt.loaded).toBeDefined(); - expect(evt.loaded).toBeGreaterThan(lastProgressValue); - expect(evt.loaded).toBeLessThan(evt.total + 1); - - lastProgressValue = evt.loaded; - }; - - runReaderTest('readAsDataURL', false, done, progressFunc, - function (evt, fileData, fileDataAsBinaryString) { - expect(function () { - // Cut off data uri prefix - var base64Data = evt.target.result.substring(evt.target.result.indexOf(',') + 1); - expect(window.atob(base64Data)).toEqual(fileData); - }).not.toThrow(); - - expect(lastProgressValue).toEqual(largeText.length); - done(); - }, - undefined, undefined, largeText); - }); - }); - // Read method - describe('FileWriter', function () { - it('file.spec.95 should have correct methods', function (done) { - // retrieve a FileWriter object - var fileName = 'writer.methods'; - // FileWriter - root.getFile(fileName, { - create: true - }, function (fileEntry) { - fileEntry.createWriter(function (writer) { - expect(writer).toBeDefined(); - expect(typeof writer.write).toBe('function'); - expect(typeof writer.seek).toBe('function'); - expect(typeof writer.truncate).toBe('function'); - expect(typeof writer.abort).toBe('function'); - // cleanup - deleteFile(fileName, done); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)); - }); - it('file.spec.96 should be able to write and append to file, createWriter', function (done) { - var fileName = 'writer.append.createWriter'; // file content - var content = 'There is an exception to every rule.'; // for checkin file length - var exception = ' Except this one.'; - var length = content.length; - // create file, then write and append to it - createFile(fileName, function (fileEntry) { - // writes initial file content - fileEntry.createWriter(function (writer) { - // Verifiers declaration - function verifier (evt) { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - // Append some more data - writer.onwriteend = secondVerifier; - length += exception.length; - writer.seek(writer.length); - writer.write(exception); - } - function secondVerifier (evt) { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - var reader = new FileReader(); // eslint-disable-line no-undef - reader.onloadend = thirdVerifier; - reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName); - fileEntry.file(function (f) { reader.readAsText(f); }); - } - function thirdVerifier (evt) { - expect(evt.target.result).toBe(content + exception); - // cleanup - deleteFile(fileName, done); - } - - // Write process - writer.onwriteend = verifier; - writer.write(content); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.97 should be able to write and append to file, File object', function (done) { - var fileName = 'writer.append.File'; // file content - var content = 'There is an exception to every rule.'; // for checkin file length - var exception = ' Except this one.'; - var length = content.length; - root.getFile(fileName, { - create: true - }, function (fileEntry) { - fileEntry.createWriter(function (writer) { - // Verifiers declaration - function verifier () { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - // Append some more data - writer.onwriteend = secondVerifier; - length += exception.length; - writer.seek(writer.length); - writer.write(exception); - } - function secondVerifier () { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - var reader = new FileReader(); // eslint-disable-line no-undef - reader.onloadend = thirdVerifier; - reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName); - fileEntry.file(function (f) { reader.readAsText(f); }); - } - function thirdVerifier (evt) { - expect(evt.target.result).toBe(content + exception); - // cleanup - deleteFile(fileName, done); - } - - // Write process - writer.onwriteend = verifier; - writer.write(content); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'root.getFile - Error creating file: ' + fileName)); - }); - it('file.spec.98 should be able to seek to the middle of the file and write more data than file.length', function (done) { - var fileName = 'writer.seek.write'; // file content - var content = 'This is our sentence.'; // for checking file length - var exception = 'newer sentence.'; - var length = content.length; - // create file, then write and append to it - createFile(fileName, function (fileEntry) { - fileEntry.createWriter(function (writer) { - // Verifiers declaration - function verifier (evt) { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - // Append some more data - writer.onwriteend = secondVerifier; - length = 12 + exception.length; - writer.seek(12); - writer.write(exception); - } - function secondVerifier (evt) { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - var reader = new FileReader(); // eslint-disable-line no-undef - reader.onloadend = thirdVerifier; - reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName); - fileEntry.file(function (f) { reader.readAsText(f); }); - } - function thirdVerifier (evt) { - expect(evt.target.result).toBe(content.substr(0, 12) + exception); - // cleanup - deleteFile(fileName, done); - } - - // Write process - writer.onwriteend = verifier; - writer.write(content); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.99 should be able to seek to the middle of the file and write less data than file.length', function (done) { - if (isBrowser) { - /* Browser (re)writes as follows: "This is our sentence." -> "This is new.sentence.", - i.e. the length is not being changed from content.length and writer length will be equal 21 */ - pending(); - } - - var fileName = 'writer.seek.write2'; // file content - var content = 'This is our sentence.'; // for checking file length - var exception = 'new.'; - var length = content.length; - // create file, then write and append to it - createFile(fileName, function (fileEntry) { - fileEntry.createWriter(function (writer) { - // Verifiers declaration - function verifier (evt) { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - // Append some more data - writer.onwriteend = secondVerifier; - length = 8 + exception.length; - writer.seek(8); - writer.write(exception); - } - function secondVerifier (evt) { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - var reader = new FileReader(); // eslint-disable-line no-undef - reader.onloadend = thirdVerifier; - reader.onerror = failed.bind(null, done, 'reader.onerror - Error reading file: ' + fileName); - fileEntry.file(function (f) { reader.readAsText(f); }); - } - function thirdVerifier (evt) { - expect(evt.target.result).toBe(content.substr(0, 8) + exception); - // cleanup - deleteFile(fileName, done); - } - - // Write process - writer.onwriteend = verifier; - writer.write(content); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.100 should be able to write XML data', function (done) { - var fileName = 'writer.xml'; // file content - var content = '\n\nData\n\n'; // for testing file length - var length = content.length; - // creates file, then write XML data - createFile(fileName, function (fileEntry) { - fileEntry.createWriter(function (writer) { - // Verifier content - var verifier = function (evt) { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - // cleanup - deleteFile(fileName, done); - }; - // Write process - writer.onwriteend = verifier; - writer.write(content); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.101 should be able to write JSON data', function (done) { - var fileName = 'writer.json'; // file content - var content = '{ "name": "Guy Incognito", "email": "here@there.com" }'; // for testing file length - var length = content.length; - // creates file, then write JSON content - createFile(fileName, function (fileEntry) { - fileEntry.createWriter(function (writer) { - // Verifier declaration - var verifier = function (evt) { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - // cleanup - deleteFile(fileName, done); - }; - // Write process - writer.onwriteend = verifier; - writer.write(content); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.102 should be able to seek', function (done) { - var fileName = 'writer.seek'; // file content - var content = 'There is an exception to every rule. Except this one.'; // for testing file length - var length = content.length; - // creates file, then write JSON content - createFile(fileName, function (fileEntry) { - // writes file content and tests writer.seek - fileEntry.createWriter(function (writer) { - // Verifier declaration - var verifier = function () { - expect(writer.position).toBe(length); - writer.seek(-5); - expect(writer.position).toBe(length - 5); - writer.seek(length + 100); - expect(writer.position).toBe(length); - writer.seek(10); - expect(writer.position).toBe(10); - // cleanup - deleteFile(fileName, done); - }; - // Write process - writer.onwriteend = verifier; - writer.seek(-100); - expect(writer.position).toBe(0); - writer.write(content); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.103 should be able to truncate', function (done) { - if (isIndexedDBShim) { - /* `abort` and `truncate` functions are not supported (Firefox, IE) */ - pending(); - } - - var fileName = 'writer.truncate'; - var content = 'There is an exception to every rule. Except this one.'; - // creates file, writes to it, then truncates it - createFile(fileName, function (fileEntry) { - fileEntry.createWriter(function (writer) { - // Verifier declaration - var verifier = function () { - expect(writer.length).toBe(36); - expect(writer.position).toBe(36); - // cleanup - deleteFile(fileName, done); - }; - // Write process - writer.onwriteend = function () { - // Truncate process after write - writer.onwriteend = verifier; - writer.truncate(36); - }; - writer.write(content); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.104 should be able to write binary data from an ArrayBuffer', function (done) { - // Skip test if ArrayBuffers are not supported (e.g.: Android 2.3). - if (typeof window.ArrayBuffer === 'undefined') { - expect(true).toFailWithMessage('Platform does not supported this feature'); - done(); - return; - } - var fileName = 'bufferwriter.bin'; // file content - var data = new ArrayBuffer(32); - var dataView = new Int8Array(data); // for verifying file length - var length = 32; - for (var i = 0; i < dataView.length; i++) { - dataView[i] = i; - } - // creates file, then write content - createFile(fileName, function (fileEntry) { - // writes file content - fileEntry.createWriter(function (writer) { - // Verifier declaration - var verifier = function () { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - // cleanup - deleteFile(fileName, done); - }; - // Write process - writer.onwriteend = verifier; - writer.write(data); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.105 should be able to write binary data from a Blob', function (done) { - // Skip test if Blobs are not supported (e.g.: Android 2.3). - if ((typeof window.Blob === 'undefined' && typeof window.WebKitBlobBuilder === 'undefined') || typeof window.ArrayBuffer === 'undefined') { - expect(true).toFailWithMessage('Platform does not supported this feature'); - done(); - return; - } - var fileName = 'blobwriter.bin'; // file content - var data = new ArrayBuffer(32); - var dataView = new Int8Array(data); - var blob; // for verifying file length - var length = 32; - for (var i = 0; i < dataView.length; i++) { - dataView[i] = i; - } - try { - // Mobile Safari: Use Blob constructor - blob = new Blob([data], { // eslint-disable-line no-undef - 'type': 'application/octet-stream' - }); - } catch (e) { - if (window.WebKitBlobBuilder) { - // Android Browser: Use deprecated BlobBuilder - var builder = new WebKitBlobBuilder(); - builder.append(data); - blob = builder.getBlob('application/octet-stream'); - } else { - // We have no way defined to create a Blob, so fail - fail(); - } - } - if (typeof blob !== 'undefined') { - // creates file, then write content - createFile(fileName, function (fileEntry) { - fileEntry.createWriter(function (writer) { - // Verifier declaration - var verifier = function () { - expect(writer.length).toBe(length); - expect(writer.position).toBe(length); - // cleanup - deleteFile(fileName, done); - }; - // Write process - writer.onwriteend = verifier; - writer.write(blob); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - } - }); - it('file.spec.106 should be able to write a File to a FileWriter', function (done) { - var dummyFileName = 'dummy.txt'; - var outputFileName = 'verify.txt'; - var dummyFileText = 'This text should be written to two files'; - var verifier = function (outputFileWriter) { - expect(outputFileWriter.length).toBe(dummyFileText.length); - expect(outputFileWriter.position).toBe(dummyFileText.length); - deleteFile(outputFileName, done); - }; - var writeFile = function (fileName, fileData, win) { - var theWriter; - var write_file = function (fileEntry) { - // writes file content to new file - fileEntry.createWriter(function (writer) { - theWriter = writer; - writer.onwriteend = function (ev) { - if (typeof fileData.length !== 'undefined') { - expect(theWriter.length).toBe(fileData.length); - expect(theWriter.position).toBe(fileData.length); - } - win(theWriter); - }; - writer.onerror = failed.bind(null, done, 'writer.onerror - Error writing content on file: ' + fileName); - writer.write(fileData); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }; - createFile(fileName, write_file, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }; - var openFile = function (fileName, callback) { - root.getFile(fileName, { - create: false - }, function (fileEntry) { - fileEntry.file(callback, failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'root.getFile - Error getting file: ' + fileName)); - }; - writeFile(dummyFileName, dummyFileText, function (dummyFileWriter) { - openFile(dummyFileName, function (file) { - writeFile(outputFileName, file, verifier); - }); - }); - }); - it('file.spec.107 should be able to write a sliced File to a FileWriter', function (done) { - var dummyFileName = 'dummy2.txt'; - var outputFileName = 'verify2.txt'; - var dummyFileText = 'This text should be written to two files'; - var verifier = function (outputFileWriter) { - expect(outputFileWriter.length).toBe(10); - expect(outputFileWriter.position).toBe(10); - deleteFile(outputFileName, done); - }; - var writeFile = function (fileName, fileData, win) { - var theWriter; - var write_file = function (fileEntry) { - // writes file content to new file - fileEntry.createWriter(function (writer) { - theWriter = writer; - writer.onwriteend = function (ev) { - if (typeof fileData.length !== 'undefined') { - expect(theWriter.length).toBe(fileData.length); - expect(theWriter.position).toBe(fileData.length); - } - win(theWriter); - }; - writer.onerror = failed.bind(null, done, 'writer.onerror - Error writing content on file: ' + fileName); - writer.write(fileData); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }; - createFile(fileName, write_file, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }; - var openFile = function (fileName, callback) { - root.getFile(fileName, { - create: false - }, function (fileEntry) { - fileEntry.file(callback, failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'root.getFile - Error getting file: ' + fileName)); - }; - writeFile(dummyFileName, dummyFileText, function (dummyFileWriter) { - openFile(dummyFileName, function (file) { - writeFile(outputFileName, file.slice(10, 20), verifier); - }); - }); - }); - it('file.spec.108 should be able to write binary data from a File', function (done) { - // Skip test if Blobs are not supported (e.g.: Android 2.3). - if (typeof window.Blob === 'undefined' && typeof window.WebKitBlobBuilder === 'undefined') { - expect(true).toFailWithMessage('Platform does not supported this feature'); - done(); - } - var dummyFileName = 'blobwriter.bin'; - var outputFileName = 'verify.bin'; // file content - var data = new ArrayBuffer(32); - var dataView = new Int8Array(data); - var blob; // for verifying file length - var length = 32; - var verifier = function (outputFileWriter) { - expect(outputFileWriter.length).toBe(length); - expect(outputFileWriter.position).toBe(length); - // cleanup - deleteFile(outputFileName); - done(); - }; - var writeFile = function (fileName, fileData, win) { - var theWriter; - var write_file = function (fileEntry) { - // writes file content to new file - fileEntry.createWriter(function (writer) { - theWriter = writer; - writer.onwriteend = function (ev) { - if (typeof fileData.length !== 'undefined') { - expect(theWriter.length).toBe(fileData.length); - expect(theWriter.position).toBe(fileData.length); - } - win(theWriter); - }; - writer.onerror = failed.bind(null, done, 'writer.onerror - Error writing content on file: ' + fileName); - writer.write(fileData); - }, failed.bind(null, done, 'fileEntry.createWriter - Error creating writer using fileEntry: ' + fileEntry.name)); - }; - createFile(fileName, write_file, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }; - var openFile = function (fileName, callback) { - root.getFile(fileName, { - create: false - }, function (fileEntry) { - fileEntry.file(callback, failed.bind(null, done, 'fileEntry.file - Error reading file using fileEntry: ' + fileEntry.name)); - }, failed.bind(null, done, 'root.getFile - Error getting file: ' + fileName)); - }; - for (var i = 0; i < dataView.length; i++) { - dataView[i] = i; - } - try { - // Mobile Safari: Use Blob constructor - blob = new Blob([data], { // eslint-disable-line no-undef - 'type': 'application/octet-stream' - }); - } catch (e) { - if (window.WebKitBlobBuilder) { - // Android Browser: Use deprecated BlobBuilder - var builder = new WebKitBlobBuilder(); - builder.append(data); - blob = builder.getBlob('application/octet-stream'); - } else { - // We have no way defined to create a Blob, so fail - fail(); - } - } - if (typeof blob !== 'undefined') { - // creates file, then write content - writeFile(dummyFileName, blob, function (dummyFileWriter) { - openFile(dummyFileName, function (file) { - writeFile(outputFileName, file, verifier); - }); - }); - } - }); - }); - // FileWritter - describe('Backwards compatibility', function () { - /* These specs exist to test that the File plugin can still recognize file:/// - * URLs, and can resolve them to FileEntry and DirectoryEntry objects. - * They rely on an undocumented interface to File which provides absolute file - * paths, which are not used internally anymore. - * If that interface is not present, then these tests will silently succeed. - */ - it('file.spec.109 should be able to resolve a file:/// URL', function (done) { - var localFilename = 'file.txt'; - var originalEntry; - root.getFile(localFilename, { - create: true - }, function (entry) { - originalEntry = entry; - /* This is an undocumented interface to File which exists only for testing - * backwards compatibilty. By obtaining the raw filesystem path of the download - * location, we can pass that to ft.download() to make sure that previously-stored - * paths are still valid. - */ - cordova.exec(function (localPath) { // eslint-disable-line no-undef - window.resolveLocalFileSystemURL('file://' + encodeURI(localPath), function (fileEntry) { - expect(fileEntry.toURL()).toEqual(originalEntry.toURL()); - // cleanup - deleteFile(localFilename); - done(); - }, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving URI: file://' + encodeURI(localPath))); - }, done, 'File', '_getLocalFilesystemPath', [entry.toURL()]); - }, failed.bind(null, done, 'root.getFile - Error creating file: ' + localFilename)); - }); - }); - // Backwards Compatibility - describe('Parent References', function () { - /* These specs verify that paths with parent references i("..") in them - * work correctly, and do not cause the application to crash. - */ - it('file.spec.110 should not throw exception resolving parent refefences', function (done) { - /* This is a direct copy of file.spec.9, with the filename changed, * as reported in CB-5721. - */ - var fileName = 'resolve.file.uri'; - var dirName = 'resolve.dir.uri'; - // create a new file entry - createDirectory(dirName, function () { - createFile(dirName + '/../' + fileName, function (entry) { - // lookup file system entry - window.resolveLocalFileSystemURL(entry.toURL(), function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.name).toCanonicallyMatch(fileName); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'window.resolveLocalFileSystemURL - Error resolving URI: ' + entry.toURL())); - }, failed.bind(null, done, 'createFile - Error creating file: ../' + fileName)); - }, failed.bind(null, done, 'createDirectory - Error creating directory: ' + dirName)); - }); - it('file.spec.111 should not traverse above above the root directory', function (done) { - var fileName = 'traverse.file.uri'; - // create a new file entry - createFile(fileName, function (entry) { - // lookup file system entry - root.getFile('../' + fileName, { - create: false - }, function (fileEntry) { - // Note: we expect this to still resolve, as the correct behaviour is to ignore the ../, not to fail out. - expect(fileEntry).toBeDefined(); - expect(fileEntry.name).toBe(fileName); - expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'root.getFile - Error getting file: ../' + fileName)); - }, failed.bind(null, done, 'createFile - Error creating file: ../' + fileName)); - }); - it('file.spec.112 should traverse above above the current directory', function (done) { - var fileName = 'traverse2.file.uri'; - var dirName = 'traverse2.subdir'; - // create a new directory and a file entry - createFile(fileName, function () { - createDirectory(dirName, function (entry) { - // lookup file system entry - entry.getFile('../' + fileName, { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.name).toBe(fileName); - expect(fileEntry.fullPath).toCanonicallyMatch('/' + fileName); - // cleanup - deleteEntry(fileName, function () { - deleteEntry(dirName, done); - }); - }, failed.bind(null, done, 'entry.getFile - Error getting file: ' + fileName + ' recently created above: ' + dirName)); - }, failed.bind(null, done, 'createDirectory - Error creating directory: ' + dirName)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.113 getFile: get Entry should error for missing file above root directory', function (done) { - var fileName = '../missing.file'; - // create:false, exclusive:false, file does not exist - root.getFile(fileName, { - create: false - }, succeed.bind(null, done, 'root.getFile - Unexpected success callback, it should not locate nonexistent file: ' + fileName), function (error) { - expect(error).toBeDefined(); - if (isChrome) { - expect(error).toBeFileError(FileError.SYNTAX_ERR); // eslint-disable-line no-undef - } else { - expect(error).toBeFileError(FileError.NOT_FOUND_ERR); // eslint-disable-line no-undef - } - done(); - }); - }); - }); - // Parent References - describe('toNativeURL interface', function () { - /* These specs verify that FileEntries have a toNativeURL method - * which appears to be sane. - */ - var pathExpect = cordova.platformId === 'windowsphone' ? '//nativ' : 'file://'; // eslint-disable-line no-undef - if (isChrome) { - pathExpect = 'filesystem:http://'; - } - it('file.spec.114 fileEntry should have a toNativeURL method', function (done) { - var fileName = 'native.file.uri'; - if (isWindows) { - var rootPath = root.fullPath; - pathExpect = rootPath.substr(0, rootPath.indexOf(':')); - } - // create a new file entry - createFile(fileName, function (entry) { - expect(entry.toNativeURL).toBeDefined(); - expect(entry.name).toCanonicallyMatch(fileName); - expect(typeof entry.toNativeURL).toBe('function'); - var nativeURL = entry.toNativeURL(); - expect(typeof nativeURL).toBe('string'); - expect(nativeURL.substring(0, pathExpect.length)).toEqual(pathExpect); - expect(nativeURL.substring(nativeURL.length - fileName.length)).toEqual(fileName); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.115 DirectoryReader should return entries with toNativeURL method', function (done) { - var dirName = 'nativeEntries.dir'; - var fileName = 'nativeEntries.file'; - var directory; - var checkEntries = function (entries) { - expect(entries).toBeDefined(); - expect(entries instanceof Array).toBe(true); - expect(entries.length).toBe(1); - expect(entries[0].toNativeURL).toBeDefined(); - expect(typeof entries[0].toNativeURL).toBe('function'); - var nativeURL = entries[0].toNativeURL(); - expect(typeof nativeURL).toBe('string'); - expect(nativeURL.substring(0, pathExpect.length)).toEqual(pathExpect); - expect(nativeURL.substring(nativeURL.length - fileName.length)).toEqual(fileName); - // cleanup - directory.removeRecursively(function () {}, null); - done(); - }; - // create a new file entry - root.getDirectory(dirName, { - create: true - }, function (dir) { - directory = dir; - directory.getFile(fileName, { - create: true - }, function (fileEntry) { - var reader = directory.createReader(); - reader.readEntries(checkEntries, failed.bind(null, done, 'reader.readEntries - Error reading entries from directory: ' + dirName)); - }, failed.bind(null, done, 'directory.getFile - Error creating file: ' + fileName)); - }, failed.bind(null, done, 'root.getDirectory - Error creating directory: ' + dirName)); - }); - it('file.spec.116 resolveLocalFileSystemURL should return entries with toNativeURL method', function (done) { - var fileName = 'native.resolve.uri'; - // create a new file entry - createFile(fileName, function (entry) { - resolveLocalFileSystemURL(entry.toURL(), function (entry) { // eslint-disable-line no-undef - expect(entry.toNativeURL).toBeDefined(); - expect(entry.name).toCanonicallyMatch(fileName); - expect(typeof entry.toNativeURL).toBe('function'); - var nativeURL = entry.toNativeURL(); - expect(typeof nativeURL).toBe('string'); - expect(nativeURL.substring(0, pathExpect.length)).toEqual(pathExpect); - expect(nativeURL.substring(nativeURL.length - fileName.length)).toEqual(fileName); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toURL())); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - }); - // toNativeURL interface - describe('resolveLocalFileSystemURL on file://', function () { - /* These specs verify that window.resolveLocalFileSystemURL works correctly on file:// URLs - */ - it('file.spec.117 should not resolve native URLs outside of FS roots', function (done) { - // lookup file system entry - window.resolveLocalFileSystemURL('file:///this.is.an.invalid.url', succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file:///this.is.an.invalid.url'), function (error) { - expect(error).toBeDefined(); - done(); - }); - }); - it('file.spec.118 should not resolve native URLs outside of FS roots', function (done) { - // lookup file system entry - window.resolveLocalFileSystemURL('file://localhost/this.is.an.invalid.url', succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file://localhost/this.is.an.invalid.url'), function (error) { - expect(error).toBeDefined(); - done(); - }); - }); - it('file.spec.119 should not resolve invalid native URLs', function (done) { - // lookup file system entry - window.resolveLocalFileSystemURL('file://localhost', succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file://localhost'), function (error) { - expect(error).toBeDefined(); - done(); - }); - }); - it('file.spec.120 should not resolve invalid native URLs with query strings', function (done) { - // lookup file system entry - window.resolveLocalFileSystemURL('file://localhost?test/test', succeed.bind(null, done, 'window.resolveLocalFileSystemURL - Unexpected success callback, it should not resolve invalid URL: file://localhost?test/test'), function (error) { - expect(error).toBeDefined(); - done(); - }); - }); - it('file.spec.121 should resolve native URLs returned by API', function (done) { - var fileName = 'native.resolve.uri1'; - // create a new file entry - createFile(fileName, function (entry) { - /* eslint-disable no-undef */ - resolveLocalFileSystemURL(entry.toNativeURL(), function (fileEntry) { - expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + entry.toNativeURL())); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.122 should resolve native URLs returned by API with localhost', function (done) { - var fileName = 'native.resolve.uri2'; - // create a new file entry - createFile(fileName, function (entry) { - var url = entry.toNativeURL(); - url = url.replace('///', '//localhost/'); - resolveLocalFileSystemURL(url, function (fileEntry) { - expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + url)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.123 should resolve native URLs returned by API with query string', function (done) { - var fileName = 'native.resolve.uri3'; - // create a new file entry - createFile(fileName, function (entry) { - var url = entry.toNativeURL(); - url = url + '?test/test'; - resolveLocalFileSystemURL(url, function (fileEntry) { - expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + url)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - it('file.spec.124 should resolve native URLs returned by API with localhost and query string', function (done) { - var fileName = 'native.resolve.uri4'; - // create a new file entry - createFile(fileName, function (entry) { - var url = entry.toNativeURL(); - url = url.replace('///', '//localhost/') + '?test/test'; - resolveLocalFileSystemURL(url, function (fileEntry) { - /* eslint-enable no-undef */ - expect(fileEntry.fullPath).toCanonicallyMatch(root.fullPath + '/' + fileName); - // cleanup - deleteEntry(fileName, done); - }, failed.bind(null, done, 'resolveLocalFileSystemURL - Error resolving file URL: ' + url)); - }, failed.bind(null, done, 'createFile - Error creating file: ' + fileName)); - }); - }); - // resolveLocalFileSystemURL on file:// - describe('cross-file-system copy and move', function () { - /* These specs verify that Entry.copyTo and Entry.moveTo work correctly - * when crossing filesystem boundaries. - */ - it('file.spec.125 copyTo: temporary -> persistent', function (done) { - var file1 = 'entry.copy.file1a'; - var file2 = 'entry.copy.file2a'; - var sourceEntry; - var fullPath = joinURL(root.fullPath, file2); - var validateFile = function (entry) { - // a bit redundant since copy returned this entry already - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(file2); - expect(entry.fullPath).toCanonicallyMatch(fullPath); - expect(entry.filesystem).toBeDefined(); - if (isChrome) { - expect(entry.filesystem.name).toContain('Persistent'); - } else { - expect(entry.filesystem.name).toEqual('persistent'); - } - // cleanup - deleteEntry(entry.name); - deleteEntry(sourceEntry.name, done); - }; - var createSourceAndTransfer = function () { - temp_root.getFile(file1, { - create: true - }, function (entry) { - expect(entry.filesystem).toBeDefined(); - if (isChrome) { - expect(entry.filesystem.name).toContain('Temporary'); - } else { - expect(entry.filesystem.name).toEqual('temporary'); - } - sourceEntry = entry; - // Save for later cleanup - entry.copyTo(persistent_root, file2, validateFile, failed.bind(null, done, 'entry.copyTo - Error copying file: ' + file1 + ' to PERSISTENT root as: ' + file2)); - }, failed.bind(null, done, 'temp_root.getFile - Error creating file: ' + file1 + 'at TEMPORAL root')); - }; - // Delete any existing file to start things off - persistent_root.getFile(file2, {}, function (entry) { - entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2)); - }, createSourceAndTransfer); - }); - it('file.spec.126 copyTo: persistent -> temporary', function (done) { - var file1 = 'entry.copy.file1b'; - var file2 = 'entry.copy.file2b'; - var sourceEntry; - var fullPath = joinURL(temp_root.fullPath, file2); - var validateFile = function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(file2); - expect(entry.fullPath).toCanonicallyMatch(fullPath); - if (isChrome) { - expect(entry.filesystem.name).toContain('Temporary'); - } else { - expect(entry.filesystem.name).toEqual('temporary'); - } - // cleanup - deleteEntry(entry.name); - deleteEntry(sourceEntry.name, done); - }; - var createSourceAndTransfer = function () { - persistent_root.getFile(file1, { - create: true - }, function (entry) { - expect(entry).toBeDefined(); - expect(entry.filesystem).toBeDefined(); - if (isChrome) { - expect(entry.filesystem.name).toContain('Persistent'); - } else { - expect(entry.filesystem.name).toEqual('persistent'); - } - sourceEntry = entry; - // Save for later cleanup - entry.copyTo(temp_root, file2, validateFile, failed.bind(null, done, 'entry.copyTo - Error copying file: ' + file1 + ' to TEMPORAL root as: ' + file2)); - }, failed.bind(null, done, 'persistent_root.getFile - Error creating file: ' + file1 + 'at PERSISTENT root')); - }; - // Delete any existing file to start things off - temp_root.getFile(file2, {}, function (entry) { - entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2)); - }, createSourceAndTransfer); - }); - it('file.spec.127 moveTo: temporary -> persistent', function (done) { - var file1 = 'entry.copy.file1a'; - var file2 = 'entry.copy.file2a'; - var sourceEntry; - var fullPath = joinURL(root.fullPath, file2); - var validateFile = function (entry) { - // a bit redundant since copy returned this entry already - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(file2); - expect(entry.fullPath).toCanonicallyMatch(fullPath); - expect(entry.filesystem).toBeDefined(); - if (isChrome) { - expect(entry.filesystem.name).toContain('Persistent'); - } else { - expect(entry.filesystem.name).toEqual('persistent'); - } - // cleanup - deleteEntry(entry.name); - deleteEntry(sourceEntry.name, done); - }; - var createSourceAndTransfer = function () { - temp_root.getFile(file1, { - create: true - }, function (entry) { - expect(entry.filesystem).toBeDefined(); - if (isChrome) { - expect(entry.filesystem.name).toContain('Temporary'); - } else { - expect(entry.filesystem.name).toEqual('temporary'); - } - sourceEntry = entry; - // Save for later cleanup - entry.moveTo(persistent_root, file2, validateFile, failed.bind(null, done, 'entry.moveTo - Error moving file: ' + file1 + ' to PERSISTENT root as: ' + file2)); - }, failed.bind(null, done, 'temp_root.getFile - Error creating file: ' + file1 + 'at TEMPORAL root')); - }; - // Delete any existing file to start things off - persistent_root.getFile(file2, {}, function (entry) { - entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2)); - }, createSourceAndTransfer); - }); - it('file.spec.128 moveTo: persistent -> temporary', function (done) { - var file1 = 'entry.copy.file1b'; - var file2 = 'entry.copy.file2b'; - var sourceEntry; - var fullPath = joinURL(temp_root.fullPath, file2); - var validateFile = function (entry) { - expect(entry).toBeDefined(); - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(file2); - expect(entry.fullPath).toCanonicallyMatch(fullPath); - if (isChrome) { - expect(entry.filesystem.name).toContain('Temporary'); - } else { - expect(entry.filesystem.name).toEqual('temporary'); - } - // cleanup - deleteEntry(entry.name); - deleteEntry(sourceEntry.name, done); - }; - var createSourceAndTransfer = function () { - persistent_root.getFile(file1, { - create: true - }, function (entry) { - expect(entry).toBeDefined(); - expect(entry.filesystem).toBeDefined(); - if (isChrome) { - expect(entry.filesystem.name).toContain('Persistent'); - } else { - expect(entry.filesystem.name).toEqual('persistent'); - } - sourceEntry = entry; - // Save for later cleanup - entry.moveTo(temp_root, file2, validateFile, failed.bind(null, done, 'entry.moveTo - Error moving file: ' + file1 + ' to TEMPORAL root as: ' + file2)); - }, failed.bind(null, done, 'persistent_root.getFile - Error creating file: ' + file1 + 'at PERSISTENT root')); - }; - // Delete any existing file to start things off - temp_root.getFile(file2, {}, function (entry) { - entry.remove(createSourceAndTransfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2)); - }, createSourceAndTransfer); - }); - it('file.spec.129 cordova.file.*Directory are set', function () { - var expectedPaths = ['applicationDirectory', 'applicationStorageDirectory', 'dataDirectory', 'cacheDirectory']; - /* eslint-disable no-undef */ - if (cordova.platformId === 'android' || cordova.platformId === 'amazon-fireos') { - if (cordova.file.externalApplicationStorageDirectory !== null) { - // https://issues.apache.org/jira/browse/CB-10411 - // If external storage can't be mounted, the cordova.file.external* properties are null. - expectedPaths.push('externalApplicationStorageDirectory', 'externalRootDirectory', 'externalCacheDirectory', 'externalDataDirectory'); - } - } else if (cordova.platformId === 'blackberry10') { - expectedPaths.push('externalRootDirectory', 'sharedDirectory'); - } else if (cordova.platformId === 'ios') { - expectedPaths.push('syncedDataDirectory', 'documentsDirectory', 'tempDirectory'); - } else if (cordova.platformId === 'osx') { - expectedPaths.push('documentsDirectory', 'tempDirectory', 'rootDirectory'); - } else { - console.log('Skipping test due on unsupported platform.'); - return; - } - for (var i = 0; i < expectedPaths.length; ++i) { - expect(typeof cordova.file[expectedPaths[i]]).toBe('string'); - expect(cordova.file[expectedPaths[i]]).toMatch(/\/$/, 'Path should end with a slash'); - } - }); - }); - describe('resolveLocalFileSystemURL on cdvfile://', function () { - it('file.spec.147 should be able to resolve cdvfile applicationDirectory fs root', function (done) { - var cdvfileApplicationDirectoryFsRootName; - if (cordova.platformId === 'android') { - cdvfileApplicationDirectoryFsRootName = 'assets'; - } else if (cordova.platformId === 'ios') { - cdvfileApplicationDirectoryFsRootName = 'bundle'; - } else { - pending(); - } - - resolveLocalFileSystemURL('cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/', function (applicationDirectoryRoot) { - expect(applicationDirectoryRoot.isFile).toBe(false); - expect(applicationDirectoryRoot.isDirectory).toBe(true); - expect(applicationDirectoryRoot.name).toCanonicallyMatch(''); - expect(applicationDirectoryRoot.fullPath).toCanonicallyMatch('/'); - expect(applicationDirectoryRoot.filesystem.name).toEqual(cdvfileApplicationDirectoryFsRootName); - - // Requires HelloCordova www assets, in config.xml or - // cdvfile: in CSP and in config.xml - resolveLocalFileSystemURL('cdvfile://localhost/' + cdvfileApplicationDirectoryFsRootName + '/www/img/logo.png', function (entry) { - /* eslint-enable no-undef */ - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch('logo.png'); - expect(entry.fullPath).toCanonicallyMatch('/www/img/logo.png'); - expect(entry.filesystem.name).toEqual(cdvfileApplicationDirectoryFsRootName); - - var img = new Image(); // eslint-disable-line no-undef - img.onerror = function (err) { - expect(err).not.toBeDefined(); - done(); - }; - img.onload = function () { - done(); - }; - img.src = entry.toInternalURL(); - }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for cdvfile applicationDirectory')); - }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for cdvfile applicationDirectory')); - }); - }); - // cross-file-system copy and move - describe('IndexedDB-based impl', function () { - it('file.spec.131 Nested file or nested directory should be removed when removing a parent directory', function (done) { - var parentDirName = 'deletedDir131'; - var nestedDirName = 'nestedDir131'; - var nestedFileName = 'nestedFile131.txt'; - - createDirectory(parentDirName, function (parent) { - parent.getDirectory(nestedDirName, { create: true }, function () { - parent.getFile(nestedFileName, { create: true }, function () { - parent.removeRecursively(function () { - root.getDirectory(parentDirName, { create: false }, failed.bind(this, done, 'root.getDirectory - unexpected success callback : ' + parentDirName), function () { - parent.getFile(nestedFileName, { create: false }, failed.bind(this, done, 'getFile - unexpected success callback : ' + nestedFileName), function () { - parent.getDirectory(nestedDirName, { create: false }, failed.bind(this, done, 'getDirectory - unexpected success callback : ' + nestedDirName), done); - }); - }); - }, failed.bind(this, done, 'removeRecursively - Error removing directory : ' + parentDirName)); - }, failed.bind(this, done, 'getFile - Error creating file : ' + nestedFileName)); - }, failed.bind(this, done, 'getDirectory - Error creating directory : ' + nestedDirName)); - }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + parentDirName)); - }); - it('file.spec.132 Entry should be created succesfully when using relative paths if its parent directory exists', function (done) { - /* Directory entries have to be created successively. - For example, the call `fs.root.getDirectory('dir1/dir2', {create:true}, successCallback, errorCallback)` - will fail if dir1 did not exist. */ - var parentName = 'parentName132'; - var nestedName = 'nestedName132'; - var path = parentName + '/' + nestedName; - - var win = function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(nestedName); - expect(directory.fullPath).toCanonicallyMatch('/' + path + '/'); - deleteEntry(directory.name); - deleteEntry(parentName, done); - }; - - createDirectory(parentName, function () { - root.getDirectory(parentName + '/' + nestedName, {create: true}, win, - failed.bind(this, done, 'root.getDirectory - Error getting directory : ' + path)); - }, failed.bind(this, done, 'root.getDirectory - Error getting directory : ' + parentName)); - }); - it('file.spec.133 A file being removed should not affect another file with name being a prefix of the removed file name.', function (done) { - - // Names include special symbols so that we check the IndexedDB range used - var deletedFileName = 'deletedFile.0'; - var secondFileName = 'deletedFile.0.1'; - - var win = function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.isFile).toBe(true); - expect(fileEntry.isDirectory).toBe(false); - expect(fileEntry.name).toCanonicallyMatch(secondFileName); - deleteEntry(fileEntry.name, done); - }; - - createFile(deletedFileName, function (deletedFile) { - createFile(secondFileName, function () { - deletedFile.remove(function () { - root.getFile(deletedFileName, {create: false}, failed.bind(this, done, 'getFile - unexpected success callback getting deleted file : ' + deletedFileName), function () { - root.getFile(secondFileName, {create: false}, win, failed.bind(this, done, 'getFile - Error getting file after deleting deletedFile : ' + secondFileName)); - }); - }, failed.bind(this, done, 'remove - Error removing file : ' + deletedFileName)); - }, failed.bind(this, done, 'getFile - Error creating file : ' + secondFileName)); - }, failed.bind(this, done, 'getFile - Error creating file : ' + deletedFileName)); - }); - it('file.spec.134 A directory being removed should not affect another directory with name being a prefix of the removed directory name.', function (done) { - - // Names include special symbols so that we check the IndexedDB range used - var deletedDirName = 'deletedDir.0'; - var secondDirName = 'deletedDir.0.1'; - - var win = function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(secondDirName); - deleteEntry(directory.name, done); - }; - - createDirectory(deletedDirName, function (deletedDir) { - createDirectory(secondDirName, function () { - deletedDir.remove(function () { - root.getDirectory(deletedDirName, {create: false}, failed.bind(this, done, 'getDirectory - unexpected success callback getting deleted directory : ' + deletedDirName), function () { - root.getDirectory(secondDirName, {create: false}, win, failed.bind(this, done, 'getDirectory - Error getting directory after deleting deletedDirectory : ' + secondDirName)); - }); - }, failed.bind(this, done, 'remove - Error removing directory : ' + deletedDirName)); - }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + secondDirName)); - }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + deletedDirName)); - }); - it('file.spec.135 Deletion of a child directory should not affect the parent directory.', function (done) { - - var parentName = 'parentName135'; - var childName = 'childName135'; - - var win = function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(parentName); - deleteEntry(directory.name, done); - }; - - createDirectory(parentName, function (parent) { - parent.getDirectory(childName, {create: true}, function (child) { - child.removeRecursively(function () { - root.getDirectory(parentName, {create: false}, win, failed.bind(this, done, 'root.getDirectory - Error getting parent directory : ' + parentName)); - }, - failed.bind(this, done, 'getDirectory - Error removing directory : ' + childName)); - }, failed.bind(this, done, 'getDirectory - Error creating directory : ' + childName)); - }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + parentName)); - }); - it('file.spec.136 Paths should support Unicode symbols.', function (done) { - - var dirName = '文件插件'; - - var win = function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.name).toCanonicallyMatch(dirName); - deleteEntry(directory.name, done); - }; - - createDirectory(dirName, function () { - root.getDirectory(dirName, {create: false}, win, - failed.bind(this, done, 'root.getDirectory - Error getting directory : ' + dirName)); - }, failed.bind(this, done, 'root.getDirectory - Error creating directory : ' + dirName)); - }); - }); - // Content and Asset URLs - if (cordova.platformId === 'android') { // eslint-disable-line no-undef - describe('content: URLs', function () { - // Warning: Default HelloWorld www directory structure is required for these tests (www/index.html at least) - function testContentCopy (src, done) { - var file2 = 'entry.copy.file2b'; - var fullPath = joinURL(temp_root.fullPath, file2); - var validateFile = function (entry) { - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(file2); - expect(entry.fullPath).toCanonicallyMatch(fullPath); - expect(entry.filesystem.name).toEqual('temporary'); - // cleanup - deleteEntry(entry.name, done); - }; - var transfer = function () { - resolveLocalFileSystemURL(src, function (entry) { // eslint-disable-line no-undef - expect(entry).toBeDefined(); - expect(entry.filesystem.name).toEqual('content'); - entry.copyTo(temp_root, file2, validateFile, failed.bind(null, done, 'entry.copyTo - Error copying file: ' + entry.toURL() + ' to TEMPORAL root as: ' + file2)); - }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for content provider')); - }; - // Delete any existing file to start things off - temp_root.getFile(file2, {}, function (entry) { - entry.remove(transfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2)); - }, transfer); - } - it('file.spec.138 copyTo: content', function (done) { - testContentCopy('content://org.apache.cordova.file.testprovider/www/index.html', done); - }); - it('file.spec.139 copyTo: content /w space and query', function (done) { - testContentCopy('content://org.apache.cordova.file.testprovider/?name=foo%20bar&realPath=%2Fwww%2Findex.html', done); - }); - it('file.spec.140 delete: content should fail', function (done) { - resolveLocalFileSystemURL('content://org.apache.cordova.file.testprovider/www/index.html', function (entry) { // eslint-disable-line no-undef - entry.remove(failed.bind(null, done, 'expected delete to fail'), done); - }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for content provider')); - }); - }); - - // these tests ensure that you can read and copy from android_asset folder - // for details see https://issues.apache.org/jira/browse/CB-6428 - // and https://mail-archives.apache.org/mod_mbox/cordova-dev/201508.mbox/%3C782154441.8406572.1440182722528.JavaMail.yahoo%40mail.yahoo.com%3E - describe('asset: URLs', function () { - it('file.spec.141 filePaths.applicationStorage', function () { - expect(cordova.file.applicationDirectory).toEqual('file:///android_asset/'); // eslint-disable-line no-undef - }, MEDIUM_TIMEOUT); - it('file.spec.142 assets should be enumerable', function (done) { - resolveLocalFileSystemURL('file:///android_asset/www/fixtures/asset-test', function (entry) { // eslint-disable-line no-undef - var reader = entry.createReader(); - reader.readEntries(function (entries) { - expect(entries.length).not.toBe(0); - done(); - }, failed.bind(null, done, 'reader.readEntries - Error during reading of entries from assets directory')); - }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets')); - }, MEDIUM_TIMEOUT); - it('file.spec.145 asset subdirectories should be obtainable', function (done) { - resolveLocalFileSystemURL('file:///android_asset/www/fixtures', function (entry) { // eslint-disable-line no-undef - entry.getDirectory('asset-test', { create: false }, function (subDir) { - expect(subDir).toBeDefined(); - expect(subDir.isFile).toBe(false); - expect(subDir.isDirectory).toBe(true); - expect(subDir.name).toCanonicallyMatch('asset-test'); - done(); - }, failed.bind(null, done, 'entry.getDirectory - Error getting asset subdirectory')); - }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets')); - }, MEDIUM_TIMEOUT); - it('file.spec.146 asset files should be readable', function (done) { - resolveLocalFileSystemURL('file:///android_asset/www/fixtures/asset-test/asset-test.txt', function (entry) { // eslint-disable-line no-undef - expect(entry.isFile).toBe(true); - entry.file(function (file) { - expect(file).toBeDefined(); - var reader = new FileReader(); // eslint-disable-line no-undef - reader.onerror = failed.bind(null, done, 'reader.readAsText - Error reading asset text file'); - reader.onloadend = function () { - expect(this.result).toBeDefined(); - expect(this.result.length).not.toBe(0); - done(); - }; - reader.readAsText(file); - }, failed.bind(null, done, 'entry.file - Error reading asset file')); - }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets')); - }, MEDIUM_TIMEOUT); - it('file.spec.143 copyTo: asset -> temporary', function (done) { - var file2 = 'entry.copy.file2b'; - var fullPath = joinURL(temp_root.fullPath, file2); - var validateFile = function (entry) { - expect(entry.isFile).toBe(true); - expect(entry.isDirectory).toBe(false); - expect(entry.name).toCanonicallyMatch(file2); - expect(entry.fullPath).toCanonicallyMatch(fullPath); - expect(entry.filesystem.name).toEqual('temporary'); - // cleanup - deleteEntry(entry.name, done); - }; - var transfer = function () { - resolveLocalFileSystemURL('file:///android_asset/www/index.html', function (entry) { // eslint-disable-line no-undef - expect(entry.filesystem.name).toEqual('assets'); - entry.copyTo(temp_root, file2, validateFile, failed.bind(null, done, 'entry.copyTo - Error copying file: ' + entry.toURL() + ' to TEMPORAL root as: ' + file2)); - }, failed.bind(null, done, 'resolveLocalFileSystemURL failed for assets')); - }; - // Delete any existing file to start things off - temp_root.getFile(file2, {}, function (entry) { - entry.remove(transfer, failed.bind(null, done, 'entry.remove - Error removing file: ' + file2)); - }, transfer); - }, MEDIUM_TIMEOUT); - }); - it('file.spec.144 copyTo: asset directory', function (done) { - var srcUrl = 'file:///android_asset/www/fixtures/asset-test'; - var dstDir = 'entry.copy.dstDir'; - var dstPath = joinURL(root.fullPath, dstDir); - // create a new directory entry to kick off it - deleteEntry(dstDir, function () { - resolveLocalFileSystemURL(srcUrl, function (directory) { // eslint-disable-line no-undef - directory.copyTo(root, dstDir, function (directory) { - expect(directory).toBeDefined(); - expect(directory.isFile).toBe(false); - expect(directory.isDirectory).toBe(true); - expect(directory.fullPath).toCanonicallyMatch(dstPath); - expect(directory.name).toCanonicallyMatch(dstDir); - root.getDirectory(dstDir, { - create: false - }, function (dirEntry) { - expect(dirEntry).toBeDefined(); - expect(dirEntry.isFile).toBe(false); - expect(dirEntry.isDirectory).toBe(true); - expect(dirEntry.fullPath).toCanonicallyMatch(dstPath); - expect(dirEntry.name).toCanonicallyMatch(dstDir); - dirEntry.getFile('asset-test.txt', { - create: false - }, function (fileEntry) { - expect(fileEntry).toBeDefined(); - expect(fileEntry.isFile).toBe(true); - // cleanup - deleteEntry(dstDir, done); - }, failed.bind(null, done, 'dirEntry.getFile - Error getting subfile')); - }, failed.bind(null, done, 'root.getDirectory - Error getting copied directory')); - }, failed.bind(null, done, 'directory.copyTo - Error copying directory')); - }, failed.bind(null, done, 'resolving src dir')); - }, failed.bind(null, done, 'deleteEntry - Error removing directory : ' + dstDir)); - }, MEDIUM_TIMEOUT); - } - }); - -}; -//* ***************************************************************************************** -//* **************************************Manual Tests*************************************** -//* ***************************************************************************************** - -exports.defineManualTests = function (contentEl, createActionButton) { - - function resolveFs (fsname) { - var fsURL = 'cdvfile://localhost/' + fsname + '/'; - logMessage('Resolving URL: ' + fsURL); - /* eslint-disable no-undef */ - resolveLocalFileSystemURL(fsURL, function (entry) { - logMessage('Success', 'green'); - logMessage(entry.toURL(), 'blue'); - logMessage(entry.toInternalURL(), 'blue'); - logMessage('Resolving URL: ' + entry.toURL()); - resolveLocalFileSystemURL(entry.toURL(), function (entry2) { - logMessage('Success', 'green'); - logMessage(entry2.toURL(), 'blue'); - logMessage(entry2.toInternalURL(), 'blue'); - }, logError('resolveLocalFileSystemURL')); - }, logError('resolveLocalFileSystemURL')); - } - - function testPrivateURL () { - requestFileSystem(LocalFileSystem.TEMPORARY, 0, function (fileSystem) { - logMessage('Temporary root is at ' + fileSystem.root.toNativeURL()); - fileSystem.root.getFile('testfile', { - create: true - }, function (entry) { - logMessage('Temporary file is at ' + entry.toNativeURL()); - if (entry.toNativeURL().substring(0, 12) === 'file:///var/') { - logMessage('File starts with /var/, trying /private/var'); - var newURL = 'file://localhost/private/var/' + entry.toNativeURL().substring(12) + '?and=another_thing'; - // var newURL = entry.toNativeURL(); - logMessage(newURL, 'blue'); - resolveLocalFileSystemURL(newURL, function (newEntry) { - logMessage('Successfully resolved.', 'green'); - logMessage(newEntry.toURL(), 'blue'); - logMessage(newEntry.toNativeURL(), 'blue'); - }, logError('resolveLocalFileSystemURL')); - } - }, logError('getFile')); - }, logError('requestFileSystem')); - } - - function resolveFsContactImage () { - navigator.contacts.pickContact(function (contact) { - var logBox = document.getElementById('logContactBox'); - logBox.innerHTML = ''; - var resolveResult = document.createElement('p'); - if (contact.photos) { - var photoURL = contact.photos[0].value; - resolveLocalFileSystemURL(photoURL, function (entry) { - /* eslint-enable no-undef */ - var contactImage = document.createElement('img'); - var contactLabelImage = document.createElement('p'); - contactLabelImage.innerHTML = 'Result contact image'; - contactImage.setAttribute('src', entry.toURL()); - resolveResult.innerHTML = 'Success resolve\n' + entry.toURL(); - logBox.appendChild(contactLabelImage); - logBox.appendChild(contactImage); - logBox.appendChild(resolveResult); - }, - function (err) { - console.log('resolve error' + err); - }); - } else { - resolveResult.innerHTML = 'Contact has no photos'; - logBox.appendChild(resolveResult); - } - }, - function (err) { - console.log('contact pick error' + err); - }); - } - - function clearLog () { - var log = document.getElementById('info'); - log.innerHTML = ''; - } - - function logMessage (message, color) { - var log = document.getElementById('info'); - var logLine = document.createElement('div'); - if (color) { - logLine.style.color = color; - } - logLine.innerHTML = message; - log.appendChild(logLine); - } - - function logError (serviceName) { - return function (err) { - logMessage('ERROR: ' + serviceName + ' ' + JSON.stringify(err), 'red'); - }; - } - - var fsRoots = { - 'ios': 'library,library-nosync,documents,documents-nosync,cache,bundle,root,private', - 'osx': 'library,library-nosync,documents,documents-nosync,cache,bundle,root,private', - 'android': 'files,files-external,documents,sdcard,cache,cache-external,assets,root', - 'amazon-fireos': 'files,files-external,documents,sdcard,cache,cache-external,root', - 'windows': 'temporary,persistent' - }; - - // Add title and align to content - var div = document.createElement('h2'); - div.appendChild(document.createTextNode('File Systems')); - div.setAttribute('align', 'center'); - contentEl.appendChild(div); - - div = document.createElement('h3'); - div.appendChild(document.createTextNode('Results are displayed in yellow status box below with expected results noted under that')); - div.setAttribute('align', 'center'); - contentEl.appendChild(div); - - div = document.createElement('div'); - div.setAttribute('id', 'button'); - div.setAttribute('align', 'center'); - contentEl.appendChild(div); - /* eslint-disable no-undef */ - if (fsRoots.hasOwnProperty(cordova.platformId)) { - (fsRoots[cordova.platformId].split(',')).forEach(function (fs) { - if (cordova.platformId === 'ios' && fs === 'private') { - /* eslint-enable no-undef */ - createActionButton('Test private URL (iOS)', function () { - clearLog(); - testPrivateURL(); - }, 'button'); - } else { - createActionButton(fs, function () { - clearLog(); - resolveFs(fs); - }, 'button'); - } - }); - } - - div = document.createElement('div'); - div.setAttribute('id', 'info'); - div.setAttribute('align', 'center'); - contentEl.appendChild(div); - - div = document.createElement('h3'); - div.appendChild(document.createTextNode('For each test above, file or directory should be successfully found. ' + - 'Status box should say Resolving URL was Success. The first URL resolved is the internal URL. ' + - 'The second URL resolved is the absolute URL. Blue URLs must match.')); - contentEl.appendChild(div); - - div = document.createElement('h3'); - div.appendChild(document.createTextNode('For Test private URL (iOS), the private URL (first blue URL in status box) ' + - 'should be successfully resolved. Status box should say Successfully resolved. Both blue URLs below ' + - 'that should match.')); - contentEl.appendChild(div); - - div = document.createElement('h2'); - div.appendChild(document.createTextNode('Resolving content urls')); - div.setAttribute('align', 'center'); - contentEl.appendChild(div); - - div = document.createElement('div'); - div.setAttribute('id', 'contactButton'); - div.setAttribute('align', 'center'); - contentEl.appendChild(div); - - div = document.createElement('div'); - div.setAttribute('id', 'logContactBox'); - div.setAttribute('align', 'center'); - contentEl.appendChild(div); - - createActionButton('show-contact-image', function () { - resolveFsContactImage(); - }, 'contactButton'); -}; diff --git a/plugins/cordova-plugin-file/tests/www/fixtures/asset-test/asset-test.txt b/plugins/cordova-plugin-file/tests/www/fixtures/asset-test/asset-test.txt deleted file mode 100644 index 2ee2df0ef..000000000 --- a/plugins/cordova-plugin-file/tests/www/fixtures/asset-test/asset-test.txt +++ /dev/null @@ -1 +0,0 @@ -This file is here for testing purposes \ No newline at end of file diff --git a/plugins/cordova-plugin-file/types/index.d.ts b/plugins/cordova-plugin-file/types/index.d.ts deleted file mode 100644 index 469d8621b..000000000 --- a/plugins/cordova-plugin-file/types/index.d.ts +++ /dev/null @@ -1,378 +0,0 @@ -// Type definitions for Apache Cordova File System plugin -// Project: https://github.com/apache/cordova-plugin-file -// Definitions by: Microsoft Open Technologies Inc -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// -// Copyright (c) Microsoft Open Technologies, Inc. -// Licensed under the MIT license. - -interface Window { - /** - * Requests a filesystem in which to store application data. - * @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or PERSISTENT. - * @param size This is an indicator of how much storage space, in bytes, the application expects to need. - * @param successCallback The callback that is called when the user agent provides a filesystem. - * @param errorCallback A callback that is called when errors happen, or when the request to obtain the filesystem is denied. - */ - requestFileSystem( - type: LocalFileSystem, - size: number, - successCallback: (fileSystem: FileSystem) => void, - errorCallback?: (fileError: FileError) => void): void; - /** - * Look up file system Entry referred to by local URL. - * @param string url URL referring to a local file or directory - * @param successCallback invoked with Entry object corresponding to URL - * @param errorCallback invoked if error occurs retrieving file system entry - */ - resolveLocalFileSystemURL(url: string, - successCallback: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Look up file system Entry referred to by local URI. - * @param string uri URI referring to a local file or directory - * @param successCallback invoked with Entry object corresponding to URI - * @param errorCallback invoked if error occurs retrieving file system entry - */ - resolveLocalFileSystemURI(uri: string, - successCallback: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; - TEMPORARY: number; - PERSISTENT: number; -} - -/** This interface represents a file system. */ -interface FileSystem { - /* The name of the file system, unique across the list of exposed file systems. */ - name: string; - /** The root directory of the file system. */ - root: DirectoryEntry; -} - -/** - * An abstract interface representing entries in a file system, - * each of which may be a File or DirectoryEntry. - */ -interface Entry { - /** Entry is a file. */ - isFile: boolean; - /** Entry is a directory. */ - isDirectory: boolean; - /** The name of the entry, excluding the path leading to it. */ - name: string; - /** The full absolute path from the root to the entry. */ - fullPath: string; - /** The file system on which the entry resides. */ - filesystem: FileSystem; - nativeURL: string; - /** - * Look up metadata about this entry. - * @param successCallback A callback that is called with the time of the last modification. - * @param errorCallback A callback that is called when errors happen. - */ - getMetadata( - successCallback: (metadata: Metadata) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Move an entry to a different location on the file system. It is an error to try to: - * move a directory inside itself or to any child at any depth;move an entry into its parent if a name different from its current one isn't provided; - * move a file to a path occupied by a directory; - * move a directory to a path occupied by a file; - * move any element to a path occupied by a directory which is not empty. - * A move of a file on top of an existing file must attempt to delete and replace that file. - * A move of a directory on top of an existing empty directory must attempt to delete and replace that directory. - * @param parent The directory to which to move the entry. - * @param newName The new name of the entry. Defaults to the Entry's current name if unspecified. - * @param successCallback A callback that is called with the Entry for the new location. - * @param errorCallback A callback that is called when errors happen. - */ - moveTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Copy an entry to a different location on the file system. It is an error to try to: - * copy a directory inside itself or to any child at any depth; - * copy an entry into its parent if a name different from its current one isn't provided; - * copy a file to a path occupied by a directory; - * copy a directory to a path occupied by a file; - * copy any element to a path occupied by a directory which is not empty. - * A copy of a file on top of an existing file must attempt to delete and replace that file. - * A copy of a directory on top of an existing empty directory must attempt to delete and replace that directory. - * Directory copies are always recursive--that is, they copy all contents of the directory. - * @param parent The directory to which to move the entry. - * @param newName The new name of the entry. Defaults to the Entry's current name if unspecified. - * @param successCallback A callback that is called with the Entry for the new object. - * @param errorCallback A callback that is called when errors happen. - */ - copyTo(parent: DirectoryEntry, - newName?: string, - successCallback?: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Returns a URL that can be used as the src attribute of a or tag. - * If that is not possible, construct a cdvfile:// URL. - * @return string URL - */ - toURL(): string; - /** - * Return a URL that can be passed across the bridge to identify this entry. - * @return string URL that can be passed across the bridge to identify this entry - */ - toInternalURL(): string; - /** - * Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to attempt to delete the root directory of a filesystem. - * @param successCallback A callback that is called on success. - * @param errorCallback A callback that is called when errors happen. - */ - remove(successCallback: () => void, - errorCallback?: (error: FileError) => void): void; - /** - * Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent is itself. - * @param successCallback A callback that is called with the time of the last modification. - * @param errorCallback A callback that is called when errors happen. - */ - getParent(successCallback: (entry: Entry) => void, - errorCallback?: (error: FileError) => void): void; -} - -/** This interface supplies information about the state of a file or directory. */ -interface Metadata { - /** This is the time at which the file or directory was last modified. */ - modificationTime: Date; - /** The size of the file, in bytes. This must return 0 for directories. */ - size: number; -} - -/** This interface represents a directory on a file system. */ -interface DirectoryEntry extends Entry { - /** - * Creates a new DirectoryReader to read Entries from this Directory. - */ - createReader(): DirectoryReader; - /** - * Creates or looks up a file. - * @param path Either an absolute path or a relative path from this DirectoryEntry - * to the file to be looked up or created. - * It is an error to attempt to create a file whose immediate parent does not yet exist. - * @param options If create and exclusive are both true, and the path already exists, getFile must fail. - * If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a zero-length file and return a corresponding FileEntry. - * If create is not true and the path doesn't exist, getFile must fail. - * If create is not true and the path exists, but is a directory, getFile must fail. - * Otherwise, if no other error occurs, getFile must return a FileEntry corresponding to path. - * @param successCallback A callback that is called to return the File selected or created. - * @param errorCallback A callback that is called when errors happen. - */ - getFile(path: string, options?: Flags, - successCallback?: (entry: FileEntry) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Creates or looks up a directory. - * @param path Either an absolute path or a relative path from this DirectoryEntry - * to the directory to be looked up or created. - * It is an error to attempt to create a directory whose immediate parent does not yet exist. - * @param options If create and exclusive are both true and the path already exists, getDirectory must fail. - * If create is true, the path doesn't exist, and no other error occurs, getDirectory must create and return a corresponding DirectoryEntry. - * If create is not true and the path doesn't exist, getDirectory must fail. - * If create is not true and the path exists, but is a file, getDirectory must fail. - * Otherwise, if no other error occurs, getDirectory must return a DirectoryEntry corresponding to path. - * @param successCallback A callback that is called to return the Directory selected or created. - * @param errorCallback A callback that is called when errors happen. - */ - getDirectory(path: string, options?: Flags, - successCallback?: (entry: DirectoryEntry) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Deletes a directory and all of its contents, if any. In the event of an error (e.g. trying - * to delete a directory that contains a file that cannot be removed), some of the contents - * of the directory may be deleted. It is an error to attempt to delete the root directory of a filesystem. - * @param successCallback A callback that is called on success. - * @param errorCallback A callback that is called when errors happen. - */ - removeRecursively(successCallback: () => void, - errorCallback?: (error: FileError) => void): void; -} - -/** - * This dictionary is used to supply arguments to methods - * that look up or create files or directories. - */ -interface Flags { - /** Used to indicate that the user wants to create a file or directory if it was not previously there. */ - create?: boolean; - /** By itself, exclusive must have no effect. Used with create, it must cause getFile and getDirectory to fail if the target path already exists. */ - exclusive?: boolean; -} - -/** - * This interface lets a user list files and directories in a directory. If there are - * no additions to or deletions from a directory between the first and last call to - * readEntries, and no errors occur, then: - * A series of calls to readEntries must return each entry in the directory exactly once. - * Once all entries have been returned, the next call to readEntries must produce an empty array. - * If not all entries have been returned, the array produced by readEntries must not be empty. - * The entries produced by readEntries must not include the directory itself ["."] or its parent [".."]. - */ -interface DirectoryReader { - /** - * Read the next block of entries from this directory. - * @param successCallback Called once per successful call to readEntries to deliver the next - * previously-unreported set of Entries in the associated Directory. - * If all Entries have already been returned from previous invocations - * of readEntries, successCallback must be called with a zero-length array as an argument. - * @param errorCallback A callback indicating that there was an error reading from the Directory. - */ - readEntries( - successCallback: (entries: Entry[]) => void, - errorCallback?: (error: FileError) => void): void; -} - -/** This interface represents a file on a file system. */ -interface FileEntry extends Entry { - /** - * Creates a new FileWriter associated with the file that this FileEntry represents. - * @param successCallback A callback that is called with the new FileWriter. - * @param errorCallback A callback that is called when errors happen. - */ - createWriter(successCallback: ( - writer: FileWriter) => void, - errorCallback?: (error: FileError) => void): void; - /** - * Returns a File that represents the current state of the file that this FileEntry represents. - * @param successCallback A callback that is called with the File. - * @param errorCallback A callback that is called when errors happen. - */ - file(successCallback: (file: File) => void, - errorCallback?: (error: FileError) => void): void; -} - -/** - * This interface provides methods to monitor the asynchronous writing of blobs - * to disk using progress events and event handler attributes. - */ -interface FileSaver extends EventTarget { - /** Terminate file operation */ - abort(): void; - /** - * The FileSaver object can be in one of 3 states. The readyState attribute, on getting, - * must return the current state, which must be one of the following values: - * INIT - * WRITING - * DONE - */ - readyState: number; - /** Handler for writestart events. */ - onwritestart: (event: ProgressEvent) => void; - /** Handler for progress events. */ - onprogress: (event: ProgressEvent) => void; - /** Handler for write events. */ - onwrite: (event: ProgressEvent) => void; - /** Handler for abort events. */ - onabort: (event: ProgressEvent) => void; - /** Handler for error events. */ - onerror: (event: ProgressEvent) => void; - /** Handler for writeend events. */ - onwriteend: (event: ProgressEvent) => void; - /** The last error that occurred on the FileSaver. */ - error: Error; -} - -/** - * This interface expands on the FileSaver interface to allow for multiple write - * actions, rather than just saving a single Blob. - */ -interface FileWriter extends FileSaver { - /** - * The byte offset at which the next write to the file will occur. This always less or equal than length. - * A newly-created FileWriter will have position set to 0. - */ - position: number; - /** - * The length of the file. If the user does not have read access to the file, - * this will be the highest byte offset at which the user has written. - */ - length: number; - /** - * Write the supplied data to the file at position. - * @param {Blob|string} data The blob to write. - */ - write(data: Blob|string): void; - /** - * The file position at which the next write will occur. - * @param offset If nonnegative, an absolute byte offset into the file. - * If negative, an offset back from the end of the file. - */ - seek(offset: number): void; - /** - * Changes the length of the file to that specified. If shortening the file, data beyond the new length - * will be discarded. If extending the file, the existing data will be zero-padded up to the new length. - * @param size The size to which the length of the file is to be adjusted, measured in bytes. - */ - truncate(size: number): void; -} - -/* FileWriter states */ -declare var FileWriter: { - INIT: number; - WRITING: number; - DONE: number -}; - -interface FileError { - /** Error code */ - code: number; -} - -declare var FileError: { - new (code: number): FileError; - NOT_FOUND_ERR: number; - SECURITY_ERR: number; - ABORT_ERR: number; - NOT_READABLE_ERR: number; - ENCODING_ERR: number; - NO_MODIFICATION_ALLOWED_ERR: number; - INVALID_STATE_ERR: number; - SYNTAX_ERR: number; - INVALID_MODIFICATION_ERR: number; - QUOTA_EXCEEDED_ERR: number; - TYPE_MISMATCH_ERR: number; - PATH_EXISTS_ERR: number; -}; - -/* - * Constants defined in fileSystemPaths - */ -interface Cordova { - file: { - /* Read-only directory where the application is installed. */ - applicationDirectory: string; - /* Root of app's private writable storage */ - applicationStorageDirectory: string; - /* Where to put app-specific data files. */ - dataDirectory: string; - /* Cached files that should survive app restarts. Apps should not rely on the OS to delete files in here. */ - cacheDirectory: string; - /* Android: the application space on external storage. */ - externalApplicationStorageDirectory: string; - /* Android: Where to put app-specific data files on external storage. */ - externalDataDirectory: string; - /* Android: the application cache on external storage. */ - externalCacheDirectory: string; - /* Android: the external storage (SD card) root. */ - externalRootDirectory: string; - /* iOS: Temp directory that the OS can clear at will. */ - tempDirectory: string; - /* iOS: Holds app-specific files that should be synced (e.g. to iCloud). */ - syncedDataDirectory: string; - /* iOS: Files private to the app, but that are meaningful to other applciations (e.g. Office files) */ - documentsDirectory: string; - /* BlackBerry10: Files globally available to all apps */ - sharedDirectory: string - } -} - - -declare enum LocalFileSystem { - PERSISTENT=1, - TEMPORARY=0 -} \ No newline at end of file diff --git a/plugins/cordova-plugin-file/www/DirectoryEntry.js b/plugins/cordova-plugin-file/www/DirectoryEntry.js deleted file mode 100644 index d943f6d14..000000000 --- a/plugins/cordova-plugin-file/www/DirectoryEntry.js +++ /dev/null @@ -1,117 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var argscheck = require('cordova/argscheck'); -var utils = require('cordova/utils'); -var exec = require('cordova/exec'); -var Entry = require('./Entry'); -var FileError = require('./FileError'); -var DirectoryReader = require('./DirectoryReader'); - -/** - * An interface representing a directory on the file system. - * - * {boolean} isFile always false (readonly) - * {boolean} isDirectory always true (readonly) - * {DOMString} name of the directory, excluding the path leading to it (readonly) - * {DOMString} fullPath the absolute full path to the directory (readonly) - * {FileSystem} filesystem on which the directory resides (readonly) - */ -var DirectoryEntry = function (name, fullPath, fileSystem, nativeURL) { - - // add trailing slash if it is missing - if ((fullPath) && !/\/$/.test(fullPath)) { - fullPath += '/'; - } - // add trailing slash if it is missing - if (nativeURL && !/\/$/.test(nativeURL)) { - nativeURL += '/'; - } - DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath, fileSystem, nativeURL); -}; - -utils.extend(DirectoryEntry, Entry); - -/** - * Creates a new DirectoryReader to read entries from this directory - */ -DirectoryEntry.prototype.createReader = function () { - return new DirectoryReader(this.toInternalURL()); -}; - -/** - * Creates or looks up a directory - * - * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory - * @param {Flags} options to create or exclusively create the directory - * @param {Function} successCallback is called with the new entry - * @param {Function} errorCallback is called with a FileError - */ -DirectoryEntry.prototype.getDirectory = function (path, options, successCallback, errorCallback) { - argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments); - var fs = this.filesystem; - var win = successCallback && function (result) { - var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL); - successCallback(entry); - }; - var fail = errorCallback && function (code) { - errorCallback(new FileError(code)); - }; - exec(win, fail, 'File', 'getDirectory', [this.toInternalURL(), path, options]); -}; - -/** - * Deletes a directory and all of it's contents - * - * @param {Function} successCallback is called with no parameters - * @param {Function} errorCallback is called with a FileError - */ -DirectoryEntry.prototype.removeRecursively = function (successCallback, errorCallback) { - argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments); - var fail = errorCallback && function (code) { - errorCallback(new FileError(code)); - }; - exec(successCallback, fail, 'File', 'removeRecursively', [this.toInternalURL()]); -}; - -/** - * Creates or looks up a file - * - * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file - * @param {Flags} options to create or exclusively create the file - * @param {Function} successCallback is called with the new entry - * @param {Function} errorCallback is called with a FileError - */ -DirectoryEntry.prototype.getFile = function (path, options, successCallback, errorCallback) { - argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments); - var fs = this.filesystem; - var win = successCallback && function (result) { - var FileEntry = require('./FileEntry'); - var entry = new FileEntry(result.name, result.fullPath, fs, result.nativeURL); - successCallback(entry); - }; - var fail = errorCallback && function (code) { - errorCallback(new FileError(code)); - }; - exec(win, fail, 'File', 'getFile', [this.toInternalURL(), path, options]); -}; - -module.exports = DirectoryEntry; diff --git a/plugins/cordova-plugin-file/www/DirectoryReader.js b/plugins/cordova-plugin-file/www/DirectoryReader.js deleted file mode 100644 index 73669533c..000000000 --- a/plugins/cordova-plugin-file/www/DirectoryReader.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var exec = require('cordova/exec'); -var FileError = require('./FileError'); - -/** - * An interface that lists the files and directories in a directory. - */ -function DirectoryReader (localURL) { - this.localURL = localURL || null; - this.hasReadEntries = false; -} - -/** - * Returns a list of entries from a directory. - * - * @param {Function} successCallback is called with a list of entries - * @param {Function} errorCallback is called with a FileError - */ -DirectoryReader.prototype.readEntries = function (successCallback, errorCallback) { - // If we've already read and passed on this directory's entries, return an empty list. - if (this.hasReadEntries) { - successCallback([]); - return; - } - var reader = this; - var win = typeof successCallback !== 'function' ? null : function (result) { - var retVal = []; - for (var i = 0; i < result.length; i++) { - var entry = null; - if (result[i].isDirectory) { - entry = new (require('./DirectoryEntry'))(); - } else if (result[i].isFile) { - entry = new (require('./FileEntry'))(); - } - entry.isDirectory = result[i].isDirectory; - entry.isFile = result[i].isFile; - entry.name = result[i].name; - entry.fullPath = result[i].fullPath; - entry.filesystem = new (require('./FileSystem'))(result[i].filesystemName); - entry.nativeURL = result[i].nativeURL; - retVal.push(entry); - } - reader.hasReadEntries = true; - successCallback(retVal); - }; - var fail = typeof errorCallback !== 'function' ? null : function (code) { - errorCallback(new FileError(code)); - }; - exec(win, fail, 'File', 'readEntries', [this.localURL]); -}; - -module.exports = DirectoryReader; diff --git a/plugins/cordova-plugin-file/www/Entry.js b/plugins/cordova-plugin-file/www/Entry.js deleted file mode 100644 index 8f7a92771..000000000 --- a/plugins/cordova-plugin-file/www/Entry.js +++ /dev/null @@ -1,260 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var argscheck = require('cordova/argscheck'); -var exec = require('cordova/exec'); -var FileError = require('./FileError'); -var Metadata = require('./Metadata'); - -/** - * Represents a file or directory on the local file system. - * - * @param isFile - * {boolean} true if Entry is a file (readonly) - * @param isDirectory - * {boolean} true if Entry is a directory (readonly) - * @param name - * {DOMString} name of the file or directory, excluding the path - * leading to it (readonly) - * @param fullPath - * {DOMString} the absolute full path to the file or directory - * (readonly) - * @param fileSystem - * {FileSystem} the filesystem on which this entry resides - * (readonly) - * @param nativeURL - * {DOMString} an alternate URL which can be used by native - * webview controls, for example media players. - * (optional, readonly) - */ -function Entry (isFile, isDirectory, name, fullPath, fileSystem, nativeURL) { - this.isFile = !!isFile; - this.isDirectory = !!isDirectory; - this.name = name || ''; - this.fullPath = fullPath || ''; - this.filesystem = fileSystem || null; - this.nativeURL = nativeURL || null; -} - -/** - * Look up the metadata of the entry. - * - * @param successCallback - * {Function} is called with a Metadata object - * @param errorCallback - * {Function} is called with a FileError - */ -Entry.prototype.getMetadata = function (successCallback, errorCallback) { - argscheck.checkArgs('FF', 'Entry.getMetadata', arguments); - var success = successCallback && function (entryMetadata) { - var metadata = new Metadata({ - size: entryMetadata.size, - modificationTime: entryMetadata.lastModifiedDate - }); - successCallback(metadata); - }; - var fail = errorCallback && function (code) { - errorCallback(new FileError(code)); - }; - exec(success, fail, 'File', 'getFileMetadata', [this.toInternalURL()]); -}; - -/** - * Set the metadata of the entry. - * - * @param successCallback - * {Function} is called with a Metadata object - * @param errorCallback - * {Function} is called with a FileError - * @param metadataObject - * {Object} keys and values to set - */ -Entry.prototype.setMetadata = function (successCallback, errorCallback, metadataObject) { - argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments); - exec(successCallback, errorCallback, 'File', 'setMetadata', [this.toInternalURL(), metadataObject]); -}; - -/** - * Move a file or directory to a new location. - * - * @param parent - * {DirectoryEntry} the directory to which to move this entry - * @param newName - * {DOMString} new name of the entry, defaults to the current name - * @param successCallback - * {Function} called with the new DirectoryEntry object - * @param errorCallback - * {Function} called with a FileError - */ -Entry.prototype.moveTo = function (parent, newName, successCallback, errorCallback) { - argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments); - var fail = errorCallback && function (code) { - errorCallback(new FileError(code)); - }; - var srcURL = this.toInternalURL(); - // entry name - var name = newName || this.name; - var success = function (entry) { - if (entry) { - if (successCallback) { - // create appropriate Entry object - var newFSName = entry.filesystemName || (entry.filesystem && entry.filesystem.name); - var fs = newFSName ? new FileSystem(newFSName, { name: '', fullPath: '/' }) : new FileSystem(parent.filesystem.name, { name: '', fullPath: '/' }); // eslint-disable-line no-undef - var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL) : new (require('cordova-plugin-file.FileEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL); - successCallback(result); - } - } else { - // no Entry object returned - if (fail) { - fail(FileError.NOT_FOUND_ERR); - } - } - }; - - // copy - exec(success, fail, 'File', 'moveTo', [srcURL, parent.toInternalURL(), name]); -}; - -/** - * Copy a directory to a different location. - * - * @param parent - * {DirectoryEntry} the directory to which to copy the entry - * @param newName - * {DOMString} new name of the entry, defaults to the current name - * @param successCallback - * {Function} called with the new Entry object - * @param errorCallback - * {Function} called with a FileError - */ -Entry.prototype.copyTo = function (parent, newName, successCallback, errorCallback) { - argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments); - var fail = errorCallback && function (code) { - errorCallback(new FileError(code)); - }; - var srcURL = this.toInternalURL(); - // entry name - var name = newName || this.name; - // success callback - var success = function (entry) { - if (entry) { - if (successCallback) { - // create appropriate Entry object - var newFSName = entry.filesystemName || (entry.filesystem && entry.filesystem.name); - var fs = newFSName ? new FileSystem(newFSName, { name: '', fullPath: '/' }) : new FileSystem(parent.filesystem.name, { name: '', fullPath: '/' }); // eslint-disable-line no-undef - var result = (entry.isDirectory) ? new (require('./DirectoryEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL) : new (require('cordova-plugin-file.FileEntry'))(entry.name, entry.fullPath, fs, entry.nativeURL); - successCallback(result); - } - } else { - // no Entry object returned - if (fail) { - fail(FileError.NOT_FOUND_ERR); - } - } - }; - - // copy - exec(success, fail, 'File', 'copyTo', [srcURL, parent.toInternalURL(), name]); -}; - -/** - * Return a URL that can be passed across the bridge to identify this entry. - */ -Entry.prototype.toInternalURL = function () { - if (this.filesystem && this.filesystem.__format__) { - return this.filesystem.__format__(this.fullPath, this.nativeURL); - } -}; - -/** - * Return a URL that can be used to identify this entry. - * Use a URL that can be used to as the src attribute of a or - * tag. If that is not possible, construct a cdvfile:// URL. - */ -Entry.prototype.toURL = function () { - if (this.nativeURL) { - return this.nativeURL; - } - // fullPath attribute may contain the full URL in the case that - // toInternalURL fails. - return this.toInternalURL() || 'file://localhost' + this.fullPath; -}; - -/** - * Backwards-compatibility: In v1.0.0 - 1.0.2, .toURL would only return a - * cdvfile:// URL, and this method was necessary to obtain URLs usable by the - * webview. - * See CB-6051, CB-6106, CB-6117, CB-6152, CB-6199, CB-6201, CB-6243, CB-6249, - * and CB-6300. - */ -Entry.prototype.toNativeURL = function () { - console.log("DEPRECATED: Update your code to use 'toURL'"); - return this.toURL(); -}; - -/** - * Returns a URI that can be used to identify this entry. - * - * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI. - * @return uri - */ -Entry.prototype.toURI = function (mimeType) { - console.log("DEPRECATED: Update your code to use 'toURL'"); - return this.toURL(); -}; - -/** - * Remove a file or directory. It is an error to attempt to delete a - * directory that is not empty. It is an error to attempt to delete a - * root directory of a file system. - * - * @param successCallback {Function} called with no parameters - * @param errorCallback {Function} called with a FileError - */ -Entry.prototype.remove = function (successCallback, errorCallback) { - argscheck.checkArgs('FF', 'Entry.remove', arguments); - var fail = errorCallback && function (code) { - errorCallback(new FileError(code)); - }; - exec(successCallback, fail, 'File', 'remove', [this.toInternalURL()]); -}; - -/** - * Look up the parent DirectoryEntry of this entry. - * - * @param successCallback {Function} called with the parent DirectoryEntry object - * @param errorCallback {Function} called with a FileError - */ -Entry.prototype.getParent = function (successCallback, errorCallback) { - argscheck.checkArgs('FF', 'Entry.getParent', arguments); - var fs = this.filesystem; - var win = successCallback && function (result) { - var DirectoryEntry = require('./DirectoryEntry'); - var entry = new DirectoryEntry(result.name, result.fullPath, fs, result.nativeURL); - successCallback(entry); - }; - var fail = errorCallback && function (code) { - errorCallback(new FileError(code)); - }; - exec(win, fail, 'File', 'getParent', [this.toInternalURL()]); -}; - -module.exports = Entry; diff --git a/plugins/cordova-plugin-file/www/File.js b/plugins/cordova-plugin-file/www/File.js deleted file mode 100644 index 30c620254..000000000 --- a/plugins/cordova-plugin-file/www/File.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/** - * Constructor. - * name {DOMString} name of the file, without path information - * fullPath {DOMString} the full path of the file, including the name - * type {DOMString} mime type - * lastModifiedDate {Date} last modified date - * size {Number} size of the file in bytes - */ - -var File = function (name, localURL, type, lastModifiedDate, size) { - this.name = name || ''; - this.localURL = localURL || null; - this.type = type || null; - this.lastModified = lastModifiedDate || null; - // For backwards compatibility, store the timestamp in lastModifiedDate as well - this.lastModifiedDate = lastModifiedDate || null; - this.size = size || 0; - - // These store the absolute start and end for slicing the file. - this.start = 0; - this.end = this.size; -}; - -/** - * Returns a "slice" of the file. Since Cordova Files don't contain the actual - * content, this really returns a File with adjusted start and end. - * Slices of slices are supported. - * start {Number} The index at which to start the slice (inclusive). - * end {Number} The index at which to end the slice (exclusive). - */ -File.prototype.slice = function (start, end) { - var size = this.end - this.start; - var newStart = 0; - var newEnd = size; - if (arguments.length) { - if (start < 0) { - newStart = Math.max(size + start, 0); - } else { - newStart = Math.min(size, start); - } - } - - if (arguments.length >= 2) { - if (end < 0) { - newEnd = Math.max(size + end, 0); - } else { - newEnd = Math.min(end, size); - } - } - - var newFile = new File(this.name, this.localURL, this.type, this.lastModified, this.size); - newFile.start = this.start + newStart; - newFile.end = this.start + newEnd; - return newFile; -}; - -module.exports = File; diff --git a/plugins/cordova-plugin-file/www/FileEntry.js b/plugins/cordova-plugin-file/www/FileEntry.js deleted file mode 100644 index 8ed230c7a..000000000 --- a/plugins/cordova-plugin-file/www/FileEntry.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var utils = require('cordova/utils'); -var exec = require('cordova/exec'); -var Entry = require('./Entry'); -var FileWriter = require('./FileWriter'); -var File = require('./File'); -var FileError = require('./FileError'); - -/** - * An interface representing a file on the file system. - * - * {boolean} isFile always true (readonly) - * {boolean} isDirectory always false (readonly) - * {DOMString} name of the file, excluding the path leading to it (readonly) - * {DOMString} fullPath the absolute full path to the file (readonly) - * {FileSystem} filesystem on which the file resides (readonly) - */ -var FileEntry = function (name, fullPath, fileSystem, nativeURL) { - // remove trailing slash if it is present - if (fullPath && /\/$/.test(fullPath)) { - fullPath = fullPath.substring(0, fullPath.length - 1); - } - if (nativeURL && /\/$/.test(nativeURL)) { - nativeURL = nativeURL.substring(0, nativeURL.length - 1); - } - - FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath, fileSystem, nativeURL]); -}; - -utils.extend(FileEntry, Entry); - -/** - * Creates a new FileWriter associated with the file that this FileEntry represents. - * - * @param {Function} successCallback is called with the new FileWriter - * @param {Function} errorCallback is called with a FileError - */ -FileEntry.prototype.createWriter = function (successCallback, errorCallback) { - this.file(function (filePointer) { - var writer = new FileWriter(filePointer); - - if (writer.localURL === null || writer.localURL === '') { - if (errorCallback) { - errorCallback(new FileError(FileError.INVALID_STATE_ERR)); - } - } else { - if (successCallback) { - successCallback(writer); - } - } - }, errorCallback); -}; - -/** - * Returns a File that represents the current state of the file that this FileEntry represents. - * - * @param {Function} successCallback is called with the new File object - * @param {Function} errorCallback is called with a FileError - */ -FileEntry.prototype.file = function (successCallback, errorCallback) { - var localURL = this.toInternalURL(); - var win = successCallback && function (f) { - var file = new File(f.name, localURL, f.type, f.lastModifiedDate, f.size); - successCallback(file); - }; - var fail = errorCallback && function (code) { - errorCallback(new FileError(code)); - }; - exec(win, fail, 'File', 'getFileMetadata', [localURL]); -}; - -module.exports = FileEntry; diff --git a/plugins/cordova-plugin-file/www/FileError.js b/plugins/cordova-plugin-file/www/FileError.js deleted file mode 100644 index 16bdf31e6..000000000 --- a/plugins/cordova-plugin-file/www/FileError.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/** - * FileError - */ -function FileError (error) { - this.code = error || null; -} - -// File error codes -// Found in DOMException -FileError.NOT_FOUND_ERR = 1; -FileError.SECURITY_ERR = 2; -FileError.ABORT_ERR = 3; - -// Added by File API specification -FileError.NOT_READABLE_ERR = 4; -FileError.ENCODING_ERR = 5; -FileError.NO_MODIFICATION_ALLOWED_ERR = 6; -FileError.INVALID_STATE_ERR = 7; -FileError.SYNTAX_ERR = 8; -FileError.INVALID_MODIFICATION_ERR = 9; -FileError.QUOTA_EXCEEDED_ERR = 10; -FileError.TYPE_MISMATCH_ERR = 11; -FileError.PATH_EXISTS_ERR = 12; - -module.exports = FileError; diff --git a/plugins/cordova-plugin-file/www/FileReader.js b/plugins/cordova-plugin-file/www/FileReader.js deleted file mode 100644 index 9115f5f51..000000000 --- a/plugins/cordova-plugin-file/www/FileReader.js +++ /dev/null @@ -1,298 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var exec = require('cordova/exec'); -var modulemapper = require('cordova/modulemapper'); -var utils = require('cordova/utils'); -var FileError = require('./FileError'); -var ProgressEvent = require('./ProgressEvent'); -var origFileReader = modulemapper.getOriginalSymbol(window, 'FileReader'); - -/** - * This class reads the mobile device file system. - * - * For Android: - * The root directory is the root of the file system. - * To read from the SD card, the file name is "sdcard/my_file.txt" - * @constructor - */ -var FileReader = function () { - this._readyState = 0; - this._error = null; - this._result = null; - this._progress = null; - this._localURL = ''; - this._realReader = origFileReader ? new origFileReader() : {}; // eslint-disable-line new-cap -}; - -/** - * Defines the maximum size to read at a time via the native API. The default value is a compromise between - * minimizing the overhead of many exec() calls while still reporting progress frequently enough for large files. - * (Note attempts to allocate more than a few MB of contiguous memory on the native side are likely to cause - * OOM exceptions, while the JS engine seems to have fewer problems managing large strings or ArrayBuffers.) - */ -FileReader.READ_CHUNK_SIZE = 256 * 1024; - -// States -FileReader.EMPTY = 0; -FileReader.LOADING = 1; -FileReader.DONE = 2; - -utils.defineGetter(FileReader.prototype, 'readyState', function () { - return this._localURL ? this._readyState : this._realReader.readyState; -}); - -utils.defineGetter(FileReader.prototype, 'error', function () { - return this._localURL ? this._error : this._realReader.error; -}); - -utils.defineGetter(FileReader.prototype, 'result', function () { - return this._localURL ? this._result : this._realReader.result; -}); - -function defineEvent (eventName) { - utils.defineGetterSetter(FileReader.prototype, eventName, function () { - return this._realReader[eventName] || null; - }, function (value) { - this._realReader[eventName] = value; - }); -} -defineEvent('onloadstart'); // When the read starts. -defineEvent('onprogress'); // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total) -defineEvent('onload'); // When the read has successfully completed. -defineEvent('onerror'); // When the read has failed (see errors). -defineEvent('onloadend'); // When the request has completed (either in success or failure). -defineEvent('onabort'); // When the read has been aborted. For instance, by invoking the abort() method. - -function initRead (reader, file) { - // Already loading something - if (reader.readyState === FileReader.LOADING) { - throw new FileError(FileError.INVALID_STATE_ERR); - } - - reader._result = null; - reader._error = null; - reader._progress = 0; - reader._readyState = FileReader.LOADING; - - if (typeof file.localURL === 'string') { - reader._localURL = file.localURL; - } else { - reader._localURL = ''; - return true; - } - - if (reader.onloadstart) { - reader.onloadstart(new ProgressEvent('loadstart', {target: reader})); - } -} - -/** - * Callback used by the following read* functions to handle incremental or final success. - * Must be bound to the FileReader's this along with all but the last parameter, - * e.g. readSuccessCallback.bind(this, "readAsText", "UTF-8", offset, totalSize, accumulate) - * @param readType The name of the read function to call. - * @param encoding Text encoding, or null if this is not a text type read. - * @param offset Starting offset of the read. - * @param totalSize Total number of bytes or chars to read. - * @param accumulate A function that takes the callback result and accumulates it in this._result. - * @param r Callback result returned by the last read exec() call, or null to begin reading. - */ -function readSuccessCallback (readType, encoding, offset, totalSize, accumulate, r) { - if (this._readyState === FileReader.DONE) { - return; - } - - var CHUNK_SIZE = FileReader.READ_CHUNK_SIZE; - if (readType === 'readAsDataURL') { - // Windows proxy does not support reading file slices as Data URLs - // so read the whole file at once. - CHUNK_SIZE = cordova.platformId === 'windows' ? totalSize : // eslint-disable-line no-undef - // Calculate new chunk size for data URLs to be multiply of 3 - // Otherwise concatenated base64 chunks won't be valid base64 data - FileReader.READ_CHUNK_SIZE - (FileReader.READ_CHUNK_SIZE % 3) + 3; - } - - if (typeof r !== 'undefined') { - accumulate(r); - this._progress = Math.min(this._progress + CHUNK_SIZE, totalSize); - - if (typeof this.onprogress === 'function') { - this.onprogress(new ProgressEvent('progress', {loaded: this._progress, total: totalSize})); - } - } - - if (typeof r === 'undefined' || this._progress < totalSize) { - var execArgs = [ - this._localURL, - offset + this._progress, - offset + this._progress + Math.min(totalSize - this._progress, CHUNK_SIZE)]; - if (encoding) { - execArgs.splice(1, 0, encoding); - } - exec( - readSuccessCallback.bind(this, readType, encoding, offset, totalSize, accumulate), - readFailureCallback.bind(this), - 'File', readType, execArgs); - } else { - this._readyState = FileReader.DONE; - - if (typeof this.onload === 'function') { - this.onload(new ProgressEvent('load', {target: this})); - } - - if (typeof this.onloadend === 'function') { - this.onloadend(new ProgressEvent('loadend', {target: this})); - } - } -} - -/** - * Callback used by the following read* functions to handle errors. - * Must be bound to the FileReader's this, e.g. readFailureCallback.bind(this) - */ -function readFailureCallback (e) { - if (this._readyState === FileReader.DONE) { - return; - } - - this._readyState = FileReader.DONE; - this._result = null; - this._error = new FileError(e); - - if (typeof this.onerror === 'function') { - this.onerror(new ProgressEvent('error', {target: this})); - } - - if (typeof this.onloadend === 'function') { - this.onloadend(new ProgressEvent('loadend', {target: this})); - } -} - -/** - * Abort reading file. - */ -FileReader.prototype.abort = function () { - if (origFileReader && !this._localURL) { - return this._realReader.abort(); - } - this._result = null; - - if (this._readyState === FileReader.DONE || this._readyState === FileReader.EMPTY) { - return; - } - - this._readyState = FileReader.DONE; - - // If abort callback - if (typeof this.onabort === 'function') { - this.onabort(new ProgressEvent('abort', {target: this})); - } - // If load end callback - if (typeof this.onloadend === 'function') { - this.onloadend(new ProgressEvent('loadend', {target: this})); - } -}; - -/** - * Read text file. - * - * @param file {File} File object containing file properties - * @param encoding [Optional] (see http://www.iana.org/assignments/character-sets) - */ -FileReader.prototype.readAsText = function (file, encoding) { - if (initRead(this, file)) { - return this._realReader.readAsText(file, encoding); - } - - // Default encoding is UTF-8 - var enc = encoding || 'UTF-8'; - - var totalSize = file.end - file.start; - readSuccessCallback.bind(this)('readAsText', enc, file.start, totalSize, function (r) { - if (this._progress === 0) { - this._result = ''; - } - this._result += r; - }.bind(this)); -}; - -/** - * Read file and return data as a base64 encoded data url. - * A data url is of the form: - * data:[][;base64], - * - * @param file {File} File object containing file properties - */ -FileReader.prototype.readAsDataURL = function (file) { - if (initRead(this, file)) { - return this._realReader.readAsDataURL(file); - } - - var totalSize = file.end - file.start; - readSuccessCallback.bind(this)('readAsDataURL', null, file.start, totalSize, function (r) { - var commaIndex = r.indexOf(','); - if (this._progress === 0) { - this._result = r; - } else { - this._result += r.substring(commaIndex + 1); - } - }.bind(this)); -}; - -/** - * Read file and return data as a binary data. - * - * @param file {File} File object containing file properties - */ -FileReader.prototype.readAsBinaryString = function (file) { - if (initRead(this, file)) { - return this._realReader.readAsBinaryString(file); - } - - var totalSize = file.end - file.start; - readSuccessCallback.bind(this)('readAsBinaryString', null, file.start, totalSize, function (r) { - if (this._progress === 0) { - this._result = ''; - } - this._result += r; - }.bind(this)); -}; - -/** - * Read file and return data as a binary data. - * - * @param file {File} File object containing file properties - */ -FileReader.prototype.readAsArrayBuffer = function (file) { - if (initRead(this, file)) { - return this._realReader.readAsArrayBuffer(file); - } - - var totalSize = file.end - file.start; - readSuccessCallback.bind(this)('readAsArrayBuffer', null, file.start, totalSize, function (r) { - var resultArray = (this._progress === 0 ? new Uint8Array(totalSize) : new Uint8Array(this._result)); - resultArray.set(new Uint8Array(r), this._progress); - this._result = resultArray.buffer; - }.bind(this)); -}; - -module.exports = FileReader; diff --git a/plugins/cordova-plugin-file/www/FileSystem.js b/plugins/cordova-plugin-file/www/FileSystem.js deleted file mode 100644 index f90c4583f..000000000 --- a/plugins/cordova-plugin-file/www/FileSystem.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var DirectoryEntry = require('./DirectoryEntry'); - -/** - * An interface representing a file system - * - * @constructor - * {DOMString} name the unique name of the file system (readonly) - * {DirectoryEntry} root directory of the file system (readonly) - */ -var FileSystem = function (name, root) { - this.name = name; - if (root) { - this.root = new DirectoryEntry(root.name, root.fullPath, this, root.nativeURL); - } else { - this.root = new DirectoryEntry(this.name, '/', this); - } -}; - -FileSystem.prototype.__format__ = function (fullPath, nativeUrl) { - return fullPath; -}; - -FileSystem.prototype.toJSON = function () { - return ''; -}; - -// Use instead of encodeURI() when encoding just the path part of a URI rather than an entire URI. -FileSystem.encodeURIPath = function (path) { - // Because # is a valid filename character, it must be encoded to prevent part of the - // path from being parsed as a URI fragment. - return encodeURI(path).replace(/#/g, '%23'); -}; - -module.exports = FileSystem; diff --git a/plugins/cordova-plugin-file/www/FileUploadOptions.js b/plugins/cordova-plugin-file/www/FileUploadOptions.js deleted file mode 100644 index b4aa7c708..000000000 --- a/plugins/cordova-plugin-file/www/FileUploadOptions.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/** - * Options to customize the HTTP request used to upload files. - * @constructor - * @param fileKey {String} Name of file request parameter. - * @param fileName {String} Filename to be used by the server. Defaults to image.jpg. - * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg. - * @param params {Object} Object with key: value params to send to the server. - * @param headers {Object} Keys are header names, values are header values. Multiple - * headers of the same name are not supported. - */ -var FileUploadOptions = function (fileKey, fileName, mimeType, params, headers, httpMethod) { - this.fileKey = fileKey || null; - this.fileName = fileName || null; - this.mimeType = mimeType || null; - this.params = params || null; - this.headers = headers || null; - this.httpMethod = httpMethod || null; -}; - -module.exports = FileUploadOptions; diff --git a/plugins/cordova-plugin-file/www/FileUploadResult.js b/plugins/cordova-plugin-file/www/FileUploadResult.js deleted file mode 100644 index 6c7105ce6..000000000 --- a/plugins/cordova-plugin-file/www/FileUploadResult.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/** - * FileUploadResult - * @constructor - */ -module.exports = function FileUploadResult (size, code, content) { - this.bytesSent = size; - this.responseCode = code; - this.response = content; -}; diff --git a/plugins/cordova-plugin-file/www/FileWriter.js b/plugins/cordova-plugin-file/www/FileWriter.js deleted file mode 100644 index 75ec9dcee..000000000 --- a/plugins/cordova-plugin-file/www/FileWriter.js +++ /dev/null @@ -1,325 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var exec = require('cordova/exec'); -var FileError = require('./FileError'); -var FileReader = require('./FileReader'); -var ProgressEvent = require('./ProgressEvent'); - -/** - * This class writes to the mobile device file system. - * - * For Android: - * The root directory is the root of the file system. - * To write to the SD card, the file name is "sdcard/my_file.txt" - * - * @constructor - * @param file {File} File object containing file properties - * @param append if true write to the end of the file, otherwise overwrite the file - */ -var FileWriter = function (file) { - this.fileName = ''; - this.length = 0; - if (file) { - this.localURL = file.localURL || file; - this.length = file.size || 0; - } - // default is to write at the beginning of the file - this.position = 0; - - this.readyState = 0; // EMPTY - - this.result = null; - - // Error - this.error = null; - - // Event handlers - this.onwritestart = null; // When writing starts - this.onprogress = null; // While writing the file, and reporting partial file data - this.onwrite = null; // When the write has successfully completed. - this.onwriteend = null; // When the request has completed (either in success or failure). - this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method. - this.onerror = null; // When the write has failed (see errors). -}; - -// States -FileWriter.INIT = 0; -FileWriter.WRITING = 1; -FileWriter.DONE = 2; - -/** - * Abort writing file. - */ -FileWriter.prototype.abort = function () { - // check for invalid state - if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) { - throw new FileError(FileError.INVALID_STATE_ERR); - } - - // set error - this.error = new FileError(FileError.ABORT_ERR); - - this.readyState = FileWriter.DONE; - - // If abort callback - if (typeof this.onabort === 'function') { - this.onabort(new ProgressEvent('abort', {'target': this})); - } - - // If write end callback - if (typeof this.onwriteend === 'function') { - this.onwriteend(new ProgressEvent('writeend', {'target': this})); - } -}; - -/** - * Writes data to the file - * - * @param data text or blob to be written - * @param isPendingBlobReadResult {Boolean} true if the data is the pending blob read operation result - */ -FileWriter.prototype.write = function (data, isPendingBlobReadResult) { - - var that = this; - var supportsBinary = (typeof window.Blob !== 'undefined' && typeof window.ArrayBuffer !== 'undefined'); - /* eslint-disable no-undef */ - var isProxySupportBlobNatively = (cordova.platformId === 'windows8' || cordova.platformId === 'windows'); - var isBinary; - - // Check to see if the incoming data is a blob - if (data instanceof File || (!isProxySupportBlobNatively && supportsBinary && data instanceof Blob)) { - var fileReader = new FileReader(); - /* eslint-enable no-undef */ - fileReader.onload = function () { - // Call this method again, with the arraybuffer as argument - FileWriter.prototype.write.call(that, this.result, true /* isPendingBlobReadResult */); - }; - fileReader.onerror = function () { - // DONE state - that.readyState = FileWriter.DONE; - - // Save error - that.error = this.error; - - // If onerror callback - if (typeof that.onerror === 'function') { - that.onerror(new ProgressEvent('error', {'target': that})); - } - - // If onwriteend callback - if (typeof that.onwriteend === 'function') { - that.onwriteend(new ProgressEvent('writeend', {'target': that})); - } - }; - - // WRITING state - this.readyState = FileWriter.WRITING; - - if (supportsBinary) { - fileReader.readAsArrayBuffer(data); - } else { - fileReader.readAsText(data); - } - return; - } - - // Mark data type for safer transport over the binary bridge - isBinary = supportsBinary && (data instanceof ArrayBuffer); - if (isBinary && cordova.platformId === 'windowsphone') { // eslint-disable-line no-undef - // create a plain array, using the keys from the Uint8Array view so that we can serialize it - data = Array.apply(null, new Uint8Array(data)); - } - - // Throw an exception if we are already writing a file - if (this.readyState === FileWriter.WRITING && !isPendingBlobReadResult) { - throw new FileError(FileError.INVALID_STATE_ERR); - } - - // WRITING state - this.readyState = FileWriter.WRITING; - - var me = this; - - // If onwritestart callback - if (typeof me.onwritestart === 'function') { - me.onwritestart(new ProgressEvent('writestart', {'target': me})); - } - - // Write file - exec( - // Success callback - function (r) { - // If DONE (cancelled), then don't do anything - if (me.readyState === FileWriter.DONE) { - return; - } - - // position always increases by bytes written because file would be extended - me.position += r; - // The length of the file is now where we are done writing. - - me.length = me.position; - - // DONE state - me.readyState = FileWriter.DONE; - - // If onwrite callback - if (typeof me.onwrite === 'function') { - me.onwrite(new ProgressEvent('write', {'target': me})); - } - - // If onwriteend callback - if (typeof me.onwriteend === 'function') { - me.onwriteend(new ProgressEvent('writeend', {'target': me})); - } - }, - // Error callback - function (e) { - // If DONE (cancelled), then don't do anything - if (me.readyState === FileWriter.DONE) { - return; - } - - // DONE state - me.readyState = FileWriter.DONE; - - // Save error - me.error = new FileError(e); - - // If onerror callback - if (typeof me.onerror === 'function') { - me.onerror(new ProgressEvent('error', {'target': me})); - } - - // If onwriteend callback - if (typeof me.onwriteend === 'function') { - me.onwriteend(new ProgressEvent('writeend', {'target': me})); - } - }, 'File', 'write', [this.localURL, data, this.position, isBinary]); -}; - -/** - * Moves the file pointer to the location specified. - * - * If the offset is a negative number the position of the file - * pointer is rewound. If the offset is greater than the file - * size the position is set to the end of the file. - * - * @param offset is the location to move the file pointer to. - */ -FileWriter.prototype.seek = function (offset) { - // Throw an exception if we are already writing a file - if (this.readyState === FileWriter.WRITING) { - throw new FileError(FileError.INVALID_STATE_ERR); - } - - if (!offset && offset !== 0) { - return; - } - - // See back from end of file. - if (offset < 0) { - this.position = Math.max(offset + this.length, 0); - // Offset is bigger than file size so set position - // to the end of the file. - } else if (offset > this.length) { - this.position = this.length; - // Offset is between 0 and file size so set the position - // to start writing. - } else { - this.position = offset; - } -}; - -/** - * Truncates the file to the size specified. - * - * @param size to chop the file at. - */ -FileWriter.prototype.truncate = function (size) { - // Throw an exception if we are already writing a file - if (this.readyState === FileWriter.WRITING) { - throw new FileError(FileError.INVALID_STATE_ERR); - } - - // WRITING state - this.readyState = FileWriter.WRITING; - - var me = this; - - // If onwritestart callback - if (typeof me.onwritestart === 'function') { - me.onwritestart(new ProgressEvent('writestart', {'target': this})); - } - - // Write file - exec( - // Success callback - function (r) { - // If DONE (cancelled), then don't do anything - if (me.readyState === FileWriter.DONE) { - return; - } - - // DONE state - me.readyState = FileWriter.DONE; - - // Update the length of the file - me.length = r; - me.position = Math.min(me.position, r); - - // If onwrite callback - if (typeof me.onwrite === 'function') { - me.onwrite(new ProgressEvent('write', {'target': me})); - } - - // If onwriteend callback - if (typeof me.onwriteend === 'function') { - me.onwriteend(new ProgressEvent('writeend', {'target': me})); - } - }, - // Error callback - function (e) { - // If DONE (cancelled), then don't do anything - if (me.readyState === FileWriter.DONE) { - return; - } - - // DONE state - me.readyState = FileWriter.DONE; - - // Save error - me.error = new FileError(e); - - // If onerror callback - if (typeof me.onerror === 'function') { - me.onerror(new ProgressEvent('error', {'target': me})); - } - - // If onwriteend callback - if (typeof me.onwriteend === 'function') { - me.onwriteend(new ProgressEvent('writeend', {'target': me})); - } - }, 'File', 'truncate', [this.localURL, size]); -}; - -module.exports = FileWriter; diff --git a/plugins/cordova-plugin-file/www/Flags.js b/plugins/cordova-plugin-file/www/Flags.js deleted file mode 100644 index 2f15c88ad..000000000 --- a/plugins/cordova-plugin-file/www/Flags.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/** - * Supplies arguments to methods that lookup or create files and directories. - * - * @param create - * {boolean} file or directory if it doesn't exist - * @param exclusive - * {boolean} used with create; if true the command will fail if - * target path exists - */ -function Flags (create, exclusive) { - this.create = create || false; - this.exclusive = exclusive || false; -} - -module.exports = Flags; diff --git a/plugins/cordova-plugin-file/www/LocalFileSystem.js b/plugins/cordova-plugin-file/www/LocalFileSystem.js deleted file mode 100644 index 1e8f2eebf..000000000 --- a/plugins/cordova-plugin-file/www/LocalFileSystem.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -exports.TEMPORARY = 0; -exports.PERSISTENT = 1; diff --git a/plugins/cordova-plugin-file/www/Metadata.js b/plugins/cordova-plugin-file/www/Metadata.js deleted file mode 100644 index 713d7cb1b..000000000 --- a/plugins/cordova-plugin-file/www/Metadata.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/** - * Information about the state of the file or directory - * - * {Date} modificationTime (readonly) - */ -var Metadata = function (metadata) { - if (typeof metadata === 'object') { - this.modificationTime = new Date(metadata.modificationTime); - this.size = metadata.size || 0; - } else if (typeof metadata === 'undefined') { - this.modificationTime = null; - this.size = 0; - } else { - /* Backwards compatiblity with platforms that only return a timestamp */ - this.modificationTime = new Date(metadata); - } -}; - -module.exports = Metadata; diff --git a/plugins/cordova-plugin-file/www/ProgressEvent.js b/plugins/cordova-plugin-file/www/ProgressEvent.js deleted file mode 100644 index 336a226d2..000000000 --- a/plugins/cordova-plugin-file/www/ProgressEvent.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -// If ProgressEvent exists in global context, use it already, otherwise use our own polyfill -// Feature test: See if we can instantiate a native ProgressEvent; -// if so, use that approach, -// otherwise fill-in with our own implementation. -// -// NOTE: right now we always fill in with our own. Down the road would be nice if we can use whatever is native in the webview. -var ProgressEvent = (function () { - /* - var createEvent = function(data) { - var event = document.createEvent('Events'); - event.initEvent('ProgressEvent', false, false); - if (data) { - for (var i in data) { - if (data.hasOwnProperty(i)) { - event[i] = data[i]; - } - } - if (data.target) { - // TODO: cannot call .dispatchEvent - // need to first figure out how to implement EventTarget - } - } - return event; - }; - try { - var ev = createEvent({type:"abort",target:document}); - return function ProgressEvent(type, data) { - data.type = type; - return createEvent(data); - }; - } catch(e){ - */ - return function ProgressEvent (type, dict) { - this.type = type; - this.bubbles = false; - this.cancelBubble = false; - this.cancelable = false; - this.lengthComputable = false; - this.loaded = dict && dict.loaded ? dict.loaded : 0; - this.total = dict && dict.total ? dict.total : 0; - this.target = dict && dict.target ? dict.target : null; - }; - // } -})(); - -module.exports = ProgressEvent; diff --git a/plugins/cordova-plugin-file/www/android/FileSystem.js b/plugins/cordova-plugin-file/www/android/FileSystem.js deleted file mode 100644 index 438da00e9..000000000 --- a/plugins/cordova-plugin-file/www/android/FileSystem.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -FILESYSTEM_PROTOCOL = 'cdvfile'; // eslint-disable-line no-undef - -module.exports = { - __format__: function (fullPath, nativeUrl) { - var path; - var contentUrlMatch = /^content:\/\//.exec(nativeUrl); - if (contentUrlMatch) { - // When available, use the path from a native content URL, which was already encoded by Android. - // This is necessary because JavaScript's encodeURI() does not encode as many characters as - // Android, which can result in permission exceptions when the encoding of a content URI - // doesn't match the string for which permission was originally granted. - path = nativeUrl.substring(contentUrlMatch[0].length - 1); - } else { - path = FileSystem.encodeURIPath(fullPath); // eslint-disable-line no-undef - if (!/^\//.test(path)) { - path = '/' + path; - } - - var m = /\?.*/.exec(nativeUrl); - if (m) { - path += m[0]; - } - } - - return FILESYSTEM_PROTOCOL + '://localhost/' + this.name + path; // eslint-disable-line no-undef - } -}; diff --git a/plugins/cordova-plugin-file/www/browser/FileSystem.js b/plugins/cordova-plugin-file/www/browser/FileSystem.js deleted file mode 100644 index a7c1d6ca7..000000000 --- a/plugins/cordova-plugin-file/www/browser/FileSystem.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/* global FILESYSTEM_PREFIX: true, module */ - -FILESYSTEM_PREFIX = 'file:///'; - -module.exports = { - __format__: function (fullPath) { - return (FILESYSTEM_PREFIX + this.name + (fullPath[0] === '/' ? '' : '/') + FileSystem.encodeURIPath(fullPath)); // eslint-disable-line no-undef - } -}; diff --git a/plugins/cordova-plugin-file/www/browser/Preparing.js b/plugins/cordova-plugin-file/www/browser/Preparing.js deleted file mode 100644 index b826a6520..000000000 --- a/plugins/cordova-plugin-file/www/browser/Preparing.js +++ /dev/null @@ -1,192 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -(function () { - /* global require */ - - // Only Chrome uses this file. - if (!require('./isChrome')()) { - return; - } - - var channel = require('cordova/channel'); - var FileError = require('./FileError'); - var PERSISTENT_FS_QUOTA = 5 * 1024 * 1024; - var filePluginIsReadyEvent = new Event('filePluginIsReady'); // eslint-disable-line no-undef - - var entryFunctionsCreated = false; - var quotaWasRequested = false; - var eventWasThrown = false; - - if (!window.requestFileSystem) { - window.requestFileSystem = function (type, size, win, fail) { - if (fail) { - fail('Not supported'); - } - }; - } else { - window.requestFileSystem(window.TEMPORARY, 1, createFileEntryFunctions, function () {}); - } - - if (!window.resolveLocalFileSystemURL) { - window.resolveLocalFileSystemURL = function (url, win, fail) { - if (fail) { - fail('Not supported'); - } - }; - } - - // Resolves a filesystem entry by its path - which is passed either in standard (filesystem:file://) or - // Cordova-specific (cdvfile://) universal way. - // Aligns with specification: http://www.w3.org/TR/2011/WD-file-system-api-20110419/#widl-LocalFileSystem-resolveLocalFileSystemURL - var nativeResolveLocalFileSystemURL = window.resolveLocalFileSystemURL || window.webkitResolveLocalFileSystemURL; - window.resolveLocalFileSystemURL = function (url, win, fail) { - /* If url starts with `cdvfile` then we need convert it to Chrome real url first: - cdvfile://localhost/persistent/path/to/file -> filesystem:file://persistent/path/to/file */ - if (url.trim().substr(0, 7) === 'cdvfile') { - /* Quirk: - Plugin supports cdvfile://localhost (local resources) only. - I.e. external resources are not supported via cdvfile. */ - if (url.indexOf('cdvfile://localhost') !== -1) { - // Browser supports temporary and persistent only - var indexPersistent = url.indexOf('persistent'); - var indexTemporary = url.indexOf('temporary'); - - /* Chrome urls start with 'filesystem:' prefix. See quirk: - toURL function in Chrome returns filesystem:-prefixed path depending on application host. - For example, filesystem:file:///persistent/somefile.txt, - filesystem:http://localhost:8080/persistent/somefile.txt. */ - var prefix = 'filesystem:file:///'; - if (location.protocol !== 'file:') { // eslint-disable-line no-undef - prefix = 'filesystem:' + location.origin + '/'; // eslint-disable-line no-undef - } - - var result; - if (indexPersistent !== -1) { - // cdvfile://localhost/persistent/path/to/file -> filesystem:file://persistent/path/to/file - // or filesystem:http://localhost:8080/persistent/path/to/file - result = prefix + 'persistent' + url.substr(indexPersistent + 10); - nativeResolveLocalFileSystemURL(result, win, fail); - return; - } - - if (indexTemporary !== -1) { - // cdvfile://localhost/temporary/path/to/file -> filesystem:file://temporary/path/to/file - // or filesystem:http://localhost:8080/temporary/path/to/file - result = prefix + 'temporary' + url.substr(indexTemporary + 9); - nativeResolveLocalFileSystemURL(result, win, fail); - return; - } - } - - // cdvfile other than local file resource is not supported - if (fail) { - fail(new FileError(FileError.ENCODING_ERR)); - } - } else { - nativeResolveLocalFileSystemURL(url, win, fail); - } - }; - - function createFileEntryFunctions (fs) { - fs.root.getFile('todelete_658674_833_4_cdv', {create: true}, function (fileEntry) { - var fileEntryType = Object.getPrototypeOf(fileEntry); - var entryType = Object.getPrototypeOf(fileEntryType); - - // Save the original method - var origToURL = entryType.toURL; - entryType.toURL = function () { - var origURL = origToURL.call(this); - if (this.isDirectory && origURL.substr(-1) !== '/') { - return origURL + '/'; - } - return origURL; - }; - - entryType.toNativeURL = function () { - console.warn("DEPRECATED: Update your code to use 'toURL'"); - return this.toURL(); - }; - - entryType.toInternalURL = function () { - if (this.toURL().indexOf('persistent') > -1) { - return 'cdvfile://localhost/persistent' + this.fullPath; - } - - if (this.toURL().indexOf('temporary') > -1) { - return 'cdvfile://localhost/temporary' + this.fullPath; - } - }; - - entryType.setMetadata = function (win, fail /*, metadata */) { - if (fail) { - fail('Not supported'); - } - }; - - fileEntry.createWriter(function (writer) { - var originalWrite = writer.write; - var writerProto = Object.getPrototypeOf(writer); - writerProto.write = function (blob) { - if (blob instanceof Blob) { // eslint-disable-line no-undef - originalWrite.apply(this, [blob]); - } else { - var realBlob = new Blob([blob]); // eslint-disable-line no-undef - originalWrite.apply(this, [realBlob]); - } - }; - - fileEntry.remove(function () { entryFunctionsCreated = true; }, function () { /* empty callback */ }); - }); - }); - } - - window.initPersistentFileSystem = function (size, win, fail) { - if (navigator.webkitPersistentStorage) { - navigator.webkitPersistentStorage.requestQuota(size, win, fail); - return; - } - - fail('This browser does not support this function'); - }; - - window.isFilePluginReadyRaised = function () { return eventWasThrown; }; - - window.initPersistentFileSystem(PERSISTENT_FS_QUOTA, function () { - console.log('Persistent fs quota granted'); - quotaWasRequested = true; - }, function (e) { - console.log('Error occured while trying to request Persistent fs quota: ' + JSON.stringify(e)); - }); - - channel.onCordovaReady.subscribe(function () { - function dispatchEventIfReady () { - if (entryFunctionsCreated && quotaWasRequested) { - window.dispatchEvent(filePluginIsReadyEvent); - eventWasThrown = true; - } else { - setTimeout(dispatchEventIfReady, 100); - } - } - - dispatchEventIfReady(); - }, false); -})(); diff --git a/plugins/cordova-plugin-file/www/browser/isChrome.js b/plugins/cordova-plugin-file/www/browser/isChrome.js deleted file mode 100644 index 853277d76..000000000 --- a/plugins/cordova-plugin-file/www/browser/isChrome.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -module.exports = function () { - // window.webkitRequestFileSystem and window.webkitResolveLocalFileSystemURL are available only in Chrome and - // possibly a good flag to indicate that we're running in Chrome - return window.webkitRequestFileSystem && window.webkitResolveLocalFileSystemURL; -}; diff --git a/plugins/cordova-plugin-file/www/fileSystemPaths.js b/plugins/cordova-plugin-file/www/fileSystemPaths.js deleted file mode 100644 index f79794bb0..000000000 --- a/plugins/cordova-plugin-file/www/fileSystemPaths.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var exec = require('cordova/exec'); -var channel = require('cordova/channel'); - -exports.file = { - // Read-only directory where the application is installed. - applicationDirectory: null, - // Root of app's private writable storage - applicationStorageDirectory: null, - // Where to put app-specific data files. - dataDirectory: null, - // Cached files that should survive app restarts. - // Apps should not rely on the OS to delete files in here. - cacheDirectory: null, - // Android: the application space on external storage. - externalApplicationStorageDirectory: null, - // Android: Where to put app-specific data files on external storage. - externalDataDirectory: null, - // Android: the application cache on external storage. - externalCacheDirectory: null, - // Android: the external storage (SD card) root. - externalRootDirectory: null, - // iOS: Temp directory that the OS can clear at will. - tempDirectory: null, - // iOS: Holds app-specific files that should be synced (e.g. to iCloud). - syncedDataDirectory: null, - // iOS: Files private to the app, but that are meaningful to other applications (e.g. Office files) - documentsDirectory: null, - // BlackBerry10: Files globally available to all apps - sharedDirectory: null -}; - -channel.waitForInitialization('onFileSystemPathsReady'); -channel.onCordovaReady.subscribe(function () { - function after (paths) { - for (var k in paths) { - exports.file[k] = paths[k]; - } - channel.initializationComplete('onFileSystemPathsReady'); - } - exec(after, null, 'File', 'requestAllPaths', []); -}); diff --git a/plugins/cordova-plugin-file/www/fileSystems-roots.js b/plugins/cordova-plugin-file/www/fileSystems-roots.js deleted file mode 100644 index b15adbd75..000000000 --- a/plugins/cordova-plugin-file/www/fileSystems-roots.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -// Map of fsName -> FileSystem. -var fsMap = null; -var FileSystem = require('./FileSystem'); -var exec = require('cordova/exec'); - -// Overridden by Android, BlackBerry 10 and iOS to populate fsMap. -require('./fileSystems').getFs = function (name, callback) { - function success (response) { - fsMap = {}; - for (var i = 0; i < response.length; ++i) { - var fsRoot = response[i]; - if (fsRoot) { - var fs = new FileSystem(fsRoot.filesystemName, fsRoot); - fsMap[fs.name] = fs; - } - } - callback(fsMap[name]); - } - - if (fsMap) { - callback(fsMap[name]); - } else { - exec(success, null, 'File', 'requestAllFileSystems', []); - } -}; diff --git a/plugins/cordova-plugin-file/www/fileSystems.js b/plugins/cordova-plugin-file/www/fileSystems.js deleted file mode 100644 index 40e557481..000000000 --- a/plugins/cordova-plugin-file/www/fileSystems.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -// Overridden by Android, BlackBerry 10 and iOS to populate fsMap. -module.exports.getFs = function (name, callback) { - callback(null); -}; diff --git a/plugins/cordova-plugin-file/www/ios/FileSystem.js b/plugins/cordova-plugin-file/www/ios/FileSystem.js deleted file mode 100644 index cb14c783f..000000000 --- a/plugins/cordova-plugin-file/www/ios/FileSystem.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ -/* eslint no-undef : 0 */ -FILESYSTEM_PROTOCOL = 'cdvfile'; - -module.exports = { - __format__: function (fullPath) { - var path = ('/' + this.name + (fullPath[0] === '/' ? '' : '/') + FileSystem.encodeURIPath(fullPath)).replace('//', '/'); - return FILESYSTEM_PROTOCOL + '://localhost' + path; - } -}; diff --git a/plugins/cordova-plugin-file/www/osx/FileSystem.js b/plugins/cordova-plugin-file/www/osx/FileSystem.js deleted file mode 100644 index cb14c783f..000000000 --- a/plugins/cordova-plugin-file/www/osx/FileSystem.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ -/* eslint no-undef : 0 */ -FILESYSTEM_PROTOCOL = 'cdvfile'; - -module.exports = { - __format__: function (fullPath) { - var path = ('/' + this.name + (fullPath[0] === '/' ? '' : '/') + FileSystem.encodeURIPath(fullPath)).replace('//', '/'); - return FILESYSTEM_PROTOCOL + '://localhost' + path; - } -}; diff --git a/plugins/cordova-plugin-file/www/requestFileSystem.js b/plugins/cordova-plugin-file/www/requestFileSystem.js deleted file mode 100644 index d9110cd21..000000000 --- a/plugins/cordova-plugin-file/www/requestFileSystem.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -(function () { - // For browser platform: not all browsers use this file. - function checkBrowser () { - if (cordova.platformId === 'browser' && require('./isChrome')()) { // eslint-disable-line no-undef - module.exports = window.requestFileSystem || window.webkitRequestFileSystem; - return true; - } - return false; - } - if (checkBrowser()) { - return; - } - - var argscheck = require('cordova/argscheck'); - var FileError = require('./FileError'); - var FileSystem = require('./FileSystem'); - var exec = require('cordova/exec'); - var fileSystems = require('./fileSystems'); - - /** - * Request a file system in which to store application data. - * @param type local file system type - * @param size indicates how much storage space, in bytes, the application expects to need - * @param successCallback invoked with a FileSystem object - * @param errorCallback invoked if error occurs retrieving file system - */ - var requestFileSystem = function (type, size, successCallback, errorCallback) { - argscheck.checkArgs('nnFF', 'requestFileSystem', arguments); - var fail = function (code) { - if (errorCallback) { - errorCallback(new FileError(code)); - } - }; - - if (type < 0) { - fail(FileError.SYNTAX_ERR); - } else { - // if successful, return a FileSystem object - var success = function (file_system) { - if (file_system) { - if (successCallback) { - fileSystems.getFs(file_system.name, function (fs) { - // This should happen only on platforms that haven't implemented requestAllFileSystems (windows) - if (!fs) { - fs = new FileSystem(file_system.name, file_system.root); - } - successCallback(fs); - }); - } - } else { - // no FileSystem object returned - fail(FileError.NOT_FOUND_ERR); - } - }; - exec(success, fail, 'File', 'requestFileSystem', [type, size]); - } - }; - - module.exports = requestFileSystem; -})(); diff --git a/plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js b/plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js deleted file mode 100644 index 764662c04..000000000 --- a/plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js +++ /dev/null @@ -1,91 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ -(function () { - // For browser platform: not all browsers use overrided `resolveLocalFileSystemURL`. - function checkBrowser () { - if (cordova.platformId === 'browser' && require('./isChrome')()) { // eslint-disable-line no-undef - module.exports.resolveLocalFileSystemURL = window.resolveLocalFileSystemURL || window.webkitResolveLocalFileSystemURL; - return true; - } - return false; - } - if (checkBrowser()) { - return; - } - - var argscheck = require('cordova/argscheck'); - var DirectoryEntry = require('./DirectoryEntry'); - var FileEntry = require('./FileEntry'); - var FileError = require('./FileError'); - var exec = require('cordova/exec'); - var fileSystems = require('./fileSystems'); - - /** - * Look up file system Entry referred to by local URI. - * @param {DOMString} uri URI referring to a local file or directory - * @param successCallback invoked with Entry object corresponding to URI - * @param errorCallback invoked if error occurs retrieving file system entry - */ - module.exports.resolveLocalFileSystemURL = module.exports.resolveLocalFileSystemURL || function (uri, successCallback, errorCallback) { - argscheck.checkArgs('sFF', 'resolveLocalFileSystemURI', arguments); - // error callback - var fail = function (error) { - if (errorCallback) { - errorCallback(new FileError(error)); - } - }; - // sanity check for 'not:valid:filename' or '/not:valid:filename' - // file.spec.12 window.resolveLocalFileSystemURI should error (ENCODING_ERR) when resolving invalid URI with leading /. - if (!uri || uri.split(':').length > 2) { - setTimeout(function () { - fail(FileError.ENCODING_ERR); - }, 0); - return; - } - // if successful, return either a file or directory entry - var success = function (entry) { - if (entry) { - if (successCallback) { - // create appropriate Entry object - var fsName = entry.filesystemName || (entry.filesystem && entry.filesystem.name) || (entry.filesystem === window.PERSISTENT ? 'persistent' : 'temporary'); // eslint-disable-line no-undef - fileSystems.getFs(fsName, function (fs) { - // This should happen only on platforms that haven't implemented requestAllFileSystems (windows) - if (!fs) { - fs = new FileSystem(fsName, {name: '', fullPath: '/'}); // eslint-disable-line no-undef - } - var result = (entry.isDirectory) ? new DirectoryEntry(entry.name, entry.fullPath, fs, entry.nativeURL) : new FileEntry(entry.name, entry.fullPath, fs, entry.nativeURL); - successCallback(result); - }); - } - } else { - // no Entry object returned - fail(FileError.NOT_FOUND_ERR); - } - }; - - exec(success, fail, 'File', 'resolveLocalFileSystemURI', [uri]); - }; - - module.exports.resolveLocalFileSystemURI = function () { - console.log('resolveLocalFileSystemURI is deprecated. Please call resolveLocalFileSystemURL instead.'); - module.exports.resolveLocalFileSystemURL.apply(this, arguments); - }; -})(); diff --git a/plugins/cordova-plugin-ftp/LICENSE.md b/plugins/cordova-plugin-ftp/LICENSE.md deleted file mode 100644 index 7e63c3c5e..000000000 --- a/plugins/cordova-plugin-ftp/LICENSE.md +++ /dev/null @@ -1,3 +0,0 @@ -- GoldRaccoon is under [original author's license](https://github.com/albertodebortoli/GoldRaccoon/blob/master/LICENSE.markdown) -- ftp4j is under [LGPL](http://opensource.org/licenses/LGPL-2.1) -- All other codes (writen by me) are under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/plugins/cordova-plugin-ftp/README.md b/plugins/cordova-plugin-ftp/README.md deleted file mode 100644 index b21516dc2..000000000 --- a/plugins/cordova-plugin-ftp/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# cordova-plugin-ftp - -## Description - -This cordova plugin is created to use ftp (client) in web/js. - -Support both **iOS** and **Android** platform now. - -You can do the following things: - -- List a directory -- Create a directory -- Delete a directory (must be empty) -- Delete a file -- Download a file (with percent info) -- Upload a file (with percent info) -- Cancel upload/download - -## Installation - -```sh -$ cordova plugin add cordova-plugin-ftp -$ cordova prepare -``` - -Dependency: - -- For iOS, the plugin depends on *CFNetwork.framework*, which has been added to plugin.xml (and `cordova prepare` will add it to platform project), so you don't need to do anything. -- But for Android, it depends on *com.android.support:support-v4:23.2.0*, which should be added to your platform project by hand. - -## Usage - -You can access this plugin by js object `window.cordova.plugin.ftp`. - -Example: - -```js -document.addEventListener("deviceready", onDeviceReady, false); - -function onDeviceReady() { - // First of all, connect to ftp server address without protocol prefix. e.g. "192.168.1.1:21", "ftp.xfally.github.io" - // Notice: address port is only supported for Android, if not given, default port 21 will be used. - window.cordova.plugin.ftp.connect('ftp.xfally.github.io', 'username', 'password', function(ok) { - console.info("ftp: connect ok=" + ok); - - // You can do any ftp actions from now on... - window.cordova.plugin.ftp.upload('/localPath/localFile', '/remotePath/remoteFile', function(percent) { - if (percent == 1) { - console.info("ftp: upload finish"); - } else { - console.debug("ftp: upload percent=" + percent * 100 + "%"); - } - }, function(error) { - console.error("ftp: upload error=" + error); - }); - - }, function(error) { - console.error("ftp: connect error=" + error); - }); -} -``` - -Please refer to [ftp.js](./www/ftp.js) for all available APIs and usages. - -## Notice - -1. For iOS, `ftp.connect` will always succeed (even if `username` and `password` are incorrect), but it does NOT mean the later actions, e.g. `ls`... `download` will succeed too! So always check their `errorCallback`. -2. Want to upload/download multiple files? The plugin (Android part) inits just one connection and transmits all files via it. If you use asychronous syntax (e.g. `foreach`) to start multiple upload/download in a short time, it may mess the transfer. Instead, you can try [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) or [async](https://github.com/caolan/async) to transmit one after one. - -## Thanks - -- The iOS native implementing is based on [GoldRaccoon](https://github.com/albertodebortoli/GoldRaccoon). -- The Android native implementing is based on [ftp4j](http://www.sauronsoftware.it/projects/ftp4j/) jar (LGPL). - -## License - -Apache License 2.0. Refer to [LICENSE.md](./LICENSE.md) for more info. - diff --git a/plugins/cordova-plugin-ftp/index.d.ts b/plugins/cordova-plugin-ftp/index.d.ts deleted file mode 100644 index 1434208cf..000000000 --- a/plugins/cordova-plugin-ftp/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -interface Ftp{ - connect( - hostname: String, - username: String, - password: String, - type: String, - mode: 'ftp' | 'ftps', - successCallback: ()=>void, - errorCallback: ()=>void - ): void; -} - -declare var ftp: Ftp; \ No newline at end of file diff --git a/plugins/cordova-plugin-ftp/package.json b/plugins/cordova-plugin-ftp/package.json deleted file mode 100644 index e5dfcedba..000000000 --- a/plugins/cordova-plugin-ftp/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "cordova-plugin-ftp", - "version": "1.1.1", - "description": "This cordova plugin is created to use ftp (client) in web/js.", - "cordova": { - "id": "cordova-plugin-ftp", - "platforms": [ - "android", - "ios" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/xfally/cordova-plugin-ftp" - }, - "keywords": [ - "cordova", - "ftp", - "cordova-android", - "cordova-ios" - ], - "author": "pax", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/xfally/cordova-plugin-ftp/issues" - }, - "homepage": "https://github.com/xfally/cordova-plugin-ftp", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - } -} diff --git a/plugins/cordova-plugin-ftp/plugin.xml b/plugins/cordova-plugin-ftp/plugin.xml deleted file mode 100644 index a604bad83..000000000 --- a/plugins/cordova-plugin-ftp/plugin.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - Ftp - Cordova Ftp Plugin - Apache 2.0 - cordova,ftp - https://github.com/xfally/cordova-plugin-ftp.git - - - - - - - - - - - - - - - - - - - diff --git a/plugins/cordova-plugin-ftp/src/android/CDVFtp.java b/plugins/cordova-plugin-ftp/src/android/CDVFtp.java deleted file mode 100644 index fefb2a1e3..000000000 --- a/plugins/cordova-plugin-ftp/src/android/CDVFtp.java +++ /dev/null @@ -1,767 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -package io.github.xfally.cordova.plugin.ftp; - -import android.util.Log; -import it.sauronsoftware.ftp4j.FTPClient; -import it.sauronsoftware.ftp4j.FTPConnector; -import it.sauronsoftware.ftp4j.FTPDataTransferListener; -import it.sauronsoftware.ftp4j.FTPFile; -import it.sauronsoftware.ftp4j.FTPReply; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.text.SimpleDateFormat; -import java.util.Date; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.PluginResult; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public class CDVFtp extends CordovaPlugin { - - public static final String TAG = CDVFtp.class.getSimpleName(); - private String rootPath = "/"; - private FTPClient client = null; - private String homeDirectoryPath = null; - - @Override - public boolean execute( - String action, - final JSONArray args, - final CallbackContext callbackContext - ) - throws JSONException { - if (action.equals("connect")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - connect( - args.getString(0), - args.getString(1), - args.getString(2), - args.getString(3), - args.getString(4), - callbackContext - ); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("list")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - list(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("createDirectory")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - createDirectory(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("deleteDirectory")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - deleteDirectory(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("deleteFile")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - deleteFile(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("uploadFile")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - uploadFile( - args.getString(0), - args.getString(1), - callbackContext - ); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("downloadFile")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - downloadFile( - args.getString(0), - args.getString(1), - callbackContext - ); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("cancelAllRequests")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - cancelAllRequests(callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("disconnect")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - disconnect(callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("rename")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - rename(args.getString(0), args.getString(1), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("currentDirectory")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - currentDirectory(callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("homeDirectory")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - homeDirectory(callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("exists")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - exists(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else { - return false; - } - // This action/cmd is found/supported - return true; - } - - private void connect( - String hostname, - String username, - String password, - String mode, - String type, - CallbackContext callbackContext - ) { - if (hostname == null || hostname.length() <= 0) { - callbackContext.error("Expected hostname."); - } else { - if (username == null && password == null) { - username = "anonymous"; - password = "anonymous@"; - } - - try { - String[] address = hostname.split(":"); - int port = 21; - String host = null; - - if (address.length == 2) { - port = Integer.parseInt(address[1]); - host = address[0]; - } else { - host = hostname; - } - - if (client != null && client.isConnected()) { - String cUsername = client.getUsername(); - String cHost = client.getHost(); - String cPass = client.getPassword(); - int cPort = client.getPort(); - - Boolean isAlreadyConnected = - host.equals(cHost) && - username.equals(cUsername) && - password.equals(cPass) && - port == cPort; - - if (isAlreadyConnected) { - callbackContext.success("OK"); - return; - } else { - client.disconnect(true); - client.setAutoNoopTimeout(0); - } - } - - client = new FTPClient(); - client.setAutoNoopTimeout(30000); - - if (type.equals("ftps")) client.setSecurity( - FTPClient.SECURITY_FTPS - ); else if (type.equals("ftpes")) client.setSecurity( - FTPClient.SECURITY_FTPES - ); - - if (mode.equals("active")) client.setPassive(false); else if ( - mode.equals("passive") - ) client.setPassive(true); - - client.connect(host, port); - client.login(username, password); - - this.homeDirectoryPath = client.currentDirectory(); - callbackContext.success(homeDirectoryPath); - } catch (Exception e) { - client = null; - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void list(String path, CallbackContext callbackContext) { - try { - String currentDirectory = client.currentDirectory(); - - if (path.equals("") || path == null) path = currentDirectory; - - if (!currentDirectory.equals(path)) { - if (!path.endsWith("/")) path = path.concat("/"); - client.changeDirectory(path); - } - - FTPFile[] list = client.list(); - JSONArray fileList = new JSONArray(); - for (FTPFile file : list) { - String name = file.getName(); - Number type = file.getType(); - String link = file.getLink(); - Number size = file.getSize(); - Date modifiedDate = file.getModifiedDate(); - String modifiedDateString = - (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzz")).format( - modifiedDate - ); - - JSONObject fileData = new JSONObject(); - fileData.put("name", name); - fileData.put("type", type); - fileData.put("link", link); - fileData.put("size", size); - fileData.put("modifiedDate", modifiedDateString); - fileData.put( - "absolutePath", - path + (path.endsWith("/") ? "" : "/") + name - ); - fileList.put(fileData); - } - callbackContext.success(fileList); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - - private void createDirectory(String path, CallbackContext callbackContext) { - if (path == null) { - callbackContext.error("Expected path."); - } else { - if (!path.endsWith("/")) { - path = path.concat("/"); - } - - try { - client.changeDirectory(this.rootPath); - client.createDirectory(path); - callbackContext.success("Create directory OK"); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void deleteDirectory(String path, CallbackContext callbackContext) { - if (path == null) { - callbackContext.error("Expected path."); - } else { - if (!path.endsWith("/")) { - path = path.concat("/"); - } - - try { - client.changeDirectory(this.rootPath); - client.deleteDirectory(path); - callbackContext.success("Delete directory OK"); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void deleteFile(String file, CallbackContext callbackContext) { - if (file == null) { - callbackContext.error("Expected file."); - } else { - try { - client.changeDirectory(this.rootPath); - client.deleteFile(file); - callbackContext.success("Delete file OK"); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void uploadFile( - String localFile, - String remoteFile, - CallbackContext callbackContext - ) { - if (localFile == null || remoteFile == null) { - callbackContext.error("Expected localFile and remoteFile."); - } else { - try { - String remoteFilePath = remoteFile.substring( - 0, - remoteFile.lastIndexOf('/') + 1 - ); - String remoteFileName = remoteFile.substring( - remoteFile.lastIndexOf('/') + 1 - ); - String localFilePath = localFile.substring( - 0, - localFile.lastIndexOf('/') + 1 - ); - String localFileName = localFile.substring( - localFile.lastIndexOf('/') + 1 - ); - client.changeDirectory(remoteFilePath); - File file = new File(localFile); - InputStream in = new FileInputStream(file); - long size = file.length(); - client.upload( - remoteFileName, - in, - 0, - 0, - new CDVFtpTransferListener(size, callbackContext) - ); - // refer to CDVFtpTransferListener for transfer percent and completed - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void downloadFile( - String localFile, - String remoteFile, - CallbackContext callbackContext - ) { - if (localFile == null || remoteFile == null) { - callbackContext.error("Expected localFile and remoteFile."); - } else { - try { - String remoteFilePath = remoteFile.substring( - 0, - remoteFile.lastIndexOf('/') + 1 - ); - String remoteFileName = remoteFile.substring( - remoteFile.lastIndexOf('/') + 1 - ); - client.changeDirectory(remoteFilePath); - FTPFile[] list = client.list(); - JSONArray fileList = new JSONArray(); - for (FTPFile file : list) { - String name = file.getName(); - // Number type = file.getType(); - // String link = file.getLink(); - Number size = file.getSize(); - if (remoteFileName.equals(name)) { - client.download( - remoteFileName, - new File(localFile), - new CDVFtpTransferListener(size.longValue(), callbackContext) - ); - // refer to CDVFtpTransferListener for transfer percent and completed - return; - } - } - callbackContext.error("File not found"); - // should never reach here! - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void exists(String remoteFile, CallbackContext callbackContext) { - if (remoteFile == null) { - callbackContext.error("Expected remoteFile path."); - } else { - try { - String remoteFilePath = remoteFile.substring( - 0, - remoteFile.lastIndexOf('/') + 1 - ); - String remoteFileName = remoteFile.substring( - remoteFile.lastIndexOf('/') + 1 - ); - client.changeDirectory(remoteFilePath); - FTPFile[] list = client.list(); - JSONArray fileList = new JSONArray(); - for (FTPFile file : list) { - String name = file.getName(); - if (remoteFileName.equals(name)) { - callbackContext.success(1); - return; - } - } - callbackContext.success(0); - // should never reach here! - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void rename( - String path, - String newPath, - CallbackContext callbackContext - ) { - if (path == null || newPath == null) { - callbackContext.error("Expected localFile and remoteFile."); - } else { - try { - client.rename(path, newPath); - callbackContext.success("Rename OK"); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void currentDirectory(CallbackContext callbackContext) { - try { - String dir = client.currentDirectory(); - callbackContext.success(dir); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - - private void homeDirectory(CallbackContext callbackContext) { - try { - callbackContext.success(this.homeDirectoryPath); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - - private void cancelAllRequests(CallbackContext callbackContext) { - try { - // `true` to perform a legal abort procedure (an ABOR command is sent to the - // server), - // `false` to abruptly close the transfer without advice. - client.abortCurrentDataTransfer(true); - callbackContext.success("Cancel OK."); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - - private void disconnect(CallbackContext callbackContext) { - try { - // `true` to perform a legal disconnect procedure (an QUIT command is sent to - // the server), - // `false` to break the connection without advice. - client.disconnect(true); - client.setAutoNoopTimeout(0); - callbackContext.success("Disconnect OK."); - } catch (Exception e) { - client = null; - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } -} - -class CDVFtpTransferListener implements FTPDataTransferListener { - - public static final String TAG = CDVFtpTransferListener.class.getSimpleName(); - private long totalSize = 0; - private long curSize = 0; - private CallbackContext callbackContext = null; - private PluginResult pluginResult = null; - - public CDVFtpTransferListener(long size, CallbackContext callbackContext) { - this.totalSize = size; - this.callbackContext = callbackContext; - } - - public void started() { - // Transfer started - Log.i(TAG, "Transfer started"); - this.curSize = 0; - } - - public void transferred(int length) { - // Yet other length bytes has been transferred since the last time this - // method was called - this.curSize += length; - float percent = (float) this.curSize / (float) this.totalSize; - Log.d( - TAG, - "Transferred, totalSize=" + - this.totalSize + - ", curSize=" + - this.curSize + - ", percent=" + - percent - ); - // Tip: just return if percent < 1, to prevent js:successCallback() invoked - // twice, as completed() will also return 1. - if (percent >= 0 && percent < 1) { - this.pluginResult = new PluginResult(PluginResult.Status.OK, percent); - this.pluginResult.setKeepCallback(true); - this.callbackContext.sendPluginResult(this.pluginResult); - } - } - - public void completed() { - // Transfer completed - Log.i(TAG, "Transfer completed"); - this.pluginResult = new PluginResult(PluginResult.Status.OK, 1); - this.pluginResult.setKeepCallback(false); - this.callbackContext.sendPluginResult(this.pluginResult); - } - - public void aborted() { - // Transfer aborted - Log.w(TAG, "Transfer aborted"); - this.pluginResult = new PluginResult(PluginResult.Status.NO_RESULT); - this.pluginResult.setKeepCallback(false); - this.callbackContext.sendPluginResult(this.pluginResult); - } - - public void failed() { - // Transfer failed - Log.e(TAG, "Transfer failed"); - this.pluginResult = new PluginResult(PluginResult.Status.ERROR); - this.pluginResult.setKeepCallback(false); - this.callbackContext.sendPluginResult(this.pluginResult); - } -} diff --git a/plugins/cordova-plugin-ftp/src/android/libs/ftp4j-1.7.2.jar b/plugins/cordova-plugin-ftp/src/android/libs/ftp4j-1.7.2.jar deleted file mode 100644 index fca26eca2..000000000 Binary files a/plugins/cordova-plugin-ftp/src/android/libs/ftp4j-1.7.2.jar and /dev/null differ diff --git a/plugins/cordova-plugin-ftp/www/ftp.js b/plugins/cordova-plugin-ftp/www/ftp.js deleted file mode 100644 index 13772475b..000000000 --- a/plugins/cordova-plugin-ftp/www/ftp.js +++ /dev/null @@ -1,241 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -var exec = require('cordova/exec'); - -/** - * Util to remove path protocol prefix. - */ -function removePathProtocolPrefix(path) { - if (path.indexOf("file://") === 0) { - return path.substring(7); - } else if (path.indexOf("file:") === 0) { - return path.substring(5); - } else { - return path; - } -} - -/** - * Ftp class - * @constructor - */ -function Ftp() {} - -/** - * Connect to one ftp server. - * - * Just need to init the connection once. If success, you can do any ftp actions later. - * - * @param {string} hostname The ftp server address. The address without protocol prefix, e.g. "192.168.1.1:21", "ftp.xfally.github.io" - * Notice: address port is only supported for Android, if not given, default port 21 will be used. - * @param {string} username The ftp login username. If both `username` and `password` are empty, the default username "anonymous" will be used. - * @param {string} password The ftp login password. If both `username` and `password` are empty, the default password "anonymous@" will be used. - * @param {"ftps"|"ftpes"} type FTP security type - * @param {"active"|"passive"} mode FTP connect mode - * @param {function} successCallback The success callback. - * Notice: For iOS, if triggered, means `init` success. But NOT means the later action, e.g. `ls`... `download` will success! - * @param {function} errorCallback The error callback. If triggered, means init fail. - */ -Ftp.prototype.connect = function (hostname, username, password, type, mode, successCallback, errorCallback) { - if (typeof mode === "function") successCallback = mode; - if (typeof type === "function") errorCallback = type; - exec(successCallback, - errorCallback, - "Ftp", - "connect", [hostname, username, password, mode, type]); -}; - -/** - * List files (with info of `name`, `type`, `link`, `size`, `modifiedDate`) under one directory on the ftp server. - * - * You can get one file's name using `fileList[x].name` (`x` is the location in the array). - * - * Explain file property: - * - name: The file name (utf-8). - * - type: The file type. number `0` means regular file, `1` means directory, `2` means symbolic link, `-1` means unknown type (maybe block dev, char dev...). - * - link: If the file is a symbolic link, then this field stores symbolic link information (utf-8), else it's an empty string. - * - size: The file size in bytes. - * - modifiedDate: The modified date of this file. Format is `yyyy-MM-dd HH:mm:ss zzz`, e.g "2015-12-01 20:45:00 GMT+8". - * - * @param {string} path The path on the ftp server. e.g. "/remotePath/". - * @param {function} successCallback The success callback, invoked with arg `{array} fileList`. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ -Ftp.prototype.ls = function (path, successCallback, errorCallback) { - exec(function (fileList) { - if (fileList instanceof Array) { - successCallback(fileList); - } - }, - errorCallback, - "Ftp", - "list", [removePathProtocolPrefix(path)]); -}; - -/** - * Create one directory on the ftp server. - * - * @param {string} path The directory you want to create. e.g. "/remotePath/newDir/". - * @param {function} successCallback The success callback. If triggered, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ -Ftp.prototype.mkdir = function (path, successCallback, errorCallback) { - exec(successCallback, - errorCallback, - "Ftp", - "createDirectory", [removePathProtocolPrefix(path)]); -}; - -/** - * Delete one directory on the ftp server. - * - * Notice: As many ftp server could not rm dir when it's not empty, so always recommended to `rm` all files under the dir at first before `rmdir`. - * - * @param {string} path The directory you want to delete. e.g. "/remotePath/newDir/". - * @param {function} successCallback The success callback. If triggered, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ -Ftp.prototype.rmdir = function (path, successCallback, errorCallback) { - exec(successCallback, - errorCallback, - "Ftp", - "deleteDirectory", [removePathProtocolPrefix(path)]); -}; - -/** - * Delete one file on the ftp server. - * - * @param {string} file The file (with full path) you want to delete. e.g. "/remotePath/remoteFile". - * @param {function} successCallback The success callback. If triggered, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ -Ftp.prototype.rm = function (file, successCallback, errorCallback) { - exec(successCallback, - errorCallback, - "Ftp", - "deleteFile", [removePathProtocolPrefix(file)]); -}; - -/** - * Upload one local file to the ftp server. - * - * @param {string} localFile The file (with full path) you want to upload. e.g. "/localPath/localFile". - * @param {string} remoteFile The file (with full path) you want to located on the ftp server. e.g. "/remotePath/remoteFile". - * You can see, "localFile" is also renamed to "remoteFile". - * @param {function} successCallback The success callback. It will be triggered many times according the file's size. - * The arg `0`, `0.11..`, `0.23..` ... `1` means the upload percent. When it reach `1`, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ -Ftp.prototype.upload = function (localFile, remoteFile, successCallback, errorCallback) { - exec(successCallback, - errorCallback, - "Ftp", - "uploadFile", [removePathProtocolPrefix(localFile), removePathProtocolPrefix(remoteFile)]); -}; - -/** - * Download one remote file on the ftp server to local path. - * - * @param {string} localFile The file (with full path) you want to located on the local device. e.g. "/localPath/localFile". - * @param {string} remoteFile The file (with full path) you want to download on the ftp server. e.g. "/remotePath/remoteFile". - * You can see, "remoteFile" is also renamed to "localFile". - * @param {function} successCallback The success callback. It will be triggered many times according the file's size. - * The arg `0`, `0.11..`, `0.23..` ... `1` means the download percent. When it reach `1`, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ -Ftp.prototype.download = function (localFile, remoteFile, successCallback, errorCallback) { - exec(successCallback, - errorCallback, - "Ftp", - "downloadFile", [removePathProtocolPrefix(localFile), removePathProtocolPrefix(remoteFile)]); -}; - -/** - * Rename or move old-path to new-path - * @param {string} path Old path - * @param {string} newPath New path - * @param {function} success New path - * @param {function} error New path - */ -Ftp.prototype.rename = function (path, newPath, success, error) { - exec(success, error, "Ftp", "rename", [removePathProtocolPrefix(path), removePathProtocolPrefix(newPath)]); -}; - -/** - * This method asks and returns the current working directory. - * @param {function} success New path - * @param {function} error New path - */ -Ftp.prototype.currentDirectory = function (success, error) { - exec(success, error, "Ftp", "currentDirectory", []); -}; - -/** - * This method asks and returns the current working directory. - * @param {function} success New path - * @param {function} error New path - */ -Ftp.prototype.homeDirectory = function (success, error) { - exec(success, error, "Ftp", "homeDirectory", []); -}; - -/** - * Cancel all requests. Always success. - * - * @param {function} successCallback The success callback. If triggered, means `cancel` success. - * @param {function} errorCallback The error callback. If triggered, means cancel fail. - */ -Ftp.prototype.cancel = function (successCallback, errorCallback) { - exec(successCallback, - errorCallback, - "Ftp", - "cancelAllRequests", []); -}; - -/** - * Disconnect from ftp server. - * - * @param {function} successCallback The success callback. If triggered, means `disconnect` success. - * @param {function} errorCallback The error callback. If triggered, means disconnect fail. - */ -Ftp.prototype.disconnect = function (successCallback, errorCallback) { - exec(successCallback, - errorCallback, - "Ftp", - "disconnect", []); -}; - -/** - * Check if file exists - * - * @param {string} path file or directory path. - * @param {function} successCallback The success callback. If triggered, means `disconnect` success. - * @param {function} errorCallback The error callback. If triggered, means disconnect fail. - */ -Ftp.prototype.exists = function (path, successCallback, errorCallback) { - exec(successCallback, - errorCallback, - "Ftp", - "exists", [path]); -}; - -module.exports = new Ftp(); \ No newline at end of file diff --git a/plugins/cordova-plugin-iap/index.d.ts b/plugins/cordova-plugin-iap/index.d.ts deleted file mode 100644 index b7cca4800..000000000 --- a/plugins/cordova-plugin-iap/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -interface Iap{ - getProducts(skuList: Array, onSuccess: (skuList: Array)=>void, onError:(err: String)=>error): void; - setPurchaseUpdatedListener(onSuccess: (purchase: Object)=>void, onError:(err: string)=>void): void; - startConnection(onSuccess: (responseCode: number)=>void, onError: (err: string)=>void): void; - consume(purchaseToken: string, onSuccess: (responseCode: number)=>void, onError: (err: string)=>void): void; - purchase(skuId: string, onSuccess: (responseCode: number)=>void, onError: (err: string)=>void): void; - BILLING_UNAVAILABLE: 3; - DEVELOPER_ERROR: 5; - ERROR: 6; - FEATURE_NOT_SUPPORTED: -2; - ITEM_ALREADY_OWNED: 7; - ITEM_NOT_OWNED: 8; - ITEM_UNAVAILABLE: 4; - OK: 0; - SERVICE_DISCONNECTED: -1; - SERVICE_TIMEOUT: -3; - SERVICE_TIMEOUT: 2; - USER_CANCELED: 1; -} - -declare var iap: Iap; \ No newline at end of file diff --git a/plugins/cordova-plugin-iap/package.json b/plugins/cordova-plugin-iap/package.json deleted file mode 100644 index 2c2e2a2d6..000000000 --- a/plugins/cordova-plugin-iap/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "cordova-plugin-iap", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC" -} \ No newline at end of file diff --git a/plugins/cordova-plugin-iap/plugin.xml b/plugins/cordova-plugin-iap/plugin.xml deleted file mode 100644 index efc89ab88..000000000 --- a/plugins/cordova-plugin-iap/plugin.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - cordova-plugin-iap - In app purchase for Android. - Apache 2.0 - cordova,plugin,in app purchase - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/cordova-plugin-iap/src/com/foxdebug/iap/Iap.java b/plugins/cordova-plugin-iap/src/com/foxdebug/iap/Iap.java deleted file mode 100644 index 4d1035238..000000000 --- a/plugins/cordova-plugin-iap/src/com/foxdebug/iap/Iap.java +++ /dev/null @@ -1,360 +0,0 @@ -package com.foxdebug.iap; - -import android.app.Activity; -import android.content.Context; -import android.util.Log; -import com.android.billingclient.api.BillingClient; -import com.android.billingclient.api.BillingClient.BillingResponseCode; -import com.android.billingclient.api.BillingClient.SkuType; -import com.android.billingclient.api.BillingClientStateListener; -import com.android.billingclient.api.BillingFlowParams; -import com.android.billingclient.api.BillingResult; -import com.android.billingclient.api.ConsumeParams; -import com.android.billingclient.api.ConsumeResponseListener; -import com.android.billingclient.api.Purchase; -import com.android.billingclient.api.PurchaseHistoryRecord; -import com.android.billingclient.api.PurchaseHistoryResponseListener; -import com.android.billingclient.api.PurchasesResponseListener; -import com.android.billingclient.api.PurchasesUpdatedListener; -import com.android.billingclient.api.SkuDetails; -import com.android.billingclient.api.SkuDetailsParams; -import com.android.billingclient.api.SkuDetailsResponseListener; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.PluginResult; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public class Iap extends CordovaPlugin { - - private BillingClient billingClient; - private Context context; - private Activity activity; - private CallbackContext purchaseUpdated; - - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - context = cordova.getContext(); - activity = cordova.getActivity(); - billingClient = getBillingClient(); - } - - @Override - public boolean execute( - String action, - JSONArray args, - CallbackContext callbackContext - ) - throws JSONException { - String arg1 = getString(args, 0); - switch (action) { - case "startConnection": - case "getProducts": - case "setPurchaseUpdatedListener": - case "purchase": - case "consume": - case "getPurchases": - break; - default: - return false; - } - - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - switch (action) { - case "startConnection": - startConnection(callbackContext); - break; - case "getProducts": - getProducts(getStringList(args, 0), callbackContext); - break; - case "setPurchaseUpdatedListener": - setPurchaseUpdatedListener(callbackContext); - break; - case "purchase": - purchase(arg1, callbackContext); - break; - case "consume": - consume(arg1, callbackContext); - break; - case "getPurchases": - getPurchases(callbackContext); - break; - } - } - } - ); - - return true; - } - - private BillingClient getBillingClient() { - return BillingClient - .newBuilder(this.context) - .enablePendingPurchases() - .setListener( - new PurchasesUpdatedListener() { - public void onPurchasesUpdated( - BillingResult billingResult, - List purchases - ) { - try { - int responseCode = billingResult.getResponseCode(); - if (responseCode == BillingResponseCode.OK) { - JSONArray result = new JSONArray(); - for (Purchase purchase : purchases) { - JSONObject item = new JSONObject(); - List skuList = purchase.getSkus(); - JSONArray skuArray = new JSONArray(); - for (String sku : skuList) { - skuArray.put(sku); - } - item.put("productIds", skuArray); - item.put("purchaseToken", purchase.getPurchaseToken()); - item.put("signature", purchase.getSignature()); - item.put("orderId", purchase.getOrderId()); - item.put("purchaseTime", purchase.getPurchaseTime()); - item.put("purchaseState", purchase.getPurchaseState()); - item.put("developerPayload", purchase.getDeveloperPayload()); - item.put("isAcknowledged", purchase.isAcknowledged()); - result.put(item); - } - sendPurchasePluginResult( - new PluginResult(PluginResult.Status.OK, result) - ); - } else { - sendPurchasePluginResult( - new PluginResult(PluginResult.Status.ERROR, responseCode) - ); - } - } catch (JSONException e) { - sendPurchasePluginResult( - new PluginResult(PluginResult.Status.ERROR, e.getMessage()) - ); - } - } - } - ) - .build(); - } - - private void setPurchaseUpdatedListener(CallbackContext callbackContext) { - purchaseUpdated = callbackContext; - } - - private void consume(String token, CallbackContext callbackContext) { - ConsumeParams consumeParams = ConsumeParams - .newBuilder() - .setPurchaseToken(token) - .build(); - billingClient.consumeAsync( - consumeParams, - new ConsumeResponseListener() { - public void onConsumeResponse( - BillingResult billingResult, - String purchaseToken - ) { - int responseCode = billingResult.getResponseCode(); - if (responseCode == BillingResponseCode.OK) { - callbackContext.success(responseCode); - } else { - callbackContext.error(responseCode); - } - } - } - ); - } - - private void startConnection(CallbackContext callbackContext) { - if (billingClient == null) { - billingClient = getBillingClient(); - } - billingClient.startConnection( - new BillingClientStateListener() { - public void onBillingSetupFinished(BillingResult billingResult) { - int responseCode = billingResult.getResponseCode(); - if (responseCode == BillingResponseCode.OK) { - callbackContext.success(responseCode); - } else { - callbackContext.error(responseCode); - } - } - - public void onBillingServiceDisconnected() { - callbackContext.error("Billing service disconnected"); - } - } - ); - } - - private void getProducts( - List idList, - CallbackContext callbackContext - ) { - if (billingClient == null) { - billingClient = getBillingClient(); - callbackContext.error("Billing client is not connected"); - return; - } - SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder(); - params.setSkusList(idList).setType(SkuType.INAPP); - - billingClient.querySkuDetailsAsync( - params.build(), - new SkuDetailsResponseListener() { - public void onSkuDetailsResponse( - BillingResult billingResult, - List skuDetailsList - ) { - try { - int responseCode = billingResult.getResponseCode(); - if (responseCode == BillingResponseCode.OK) { - JSONArray products = new JSONArray(); - Log.d("IAP", "Got " + skuDetailsList.size() + " products"); - for (SkuDetails skuDetails : skuDetailsList) { - JSONObject product = new JSONObject(); - product.put("json", skuDetails.getOriginalJson()); - product.put("productId", skuDetails.getSku()); - product.put("title", skuDetails.getTitle()); - product.put("description", skuDetails.getDescription()); - product.put("price", skuDetails.getPrice()); - product.put( - "priceAmountMicros", - skuDetails.getPriceAmountMicros() - ); - product.put( - "priceCurrencyCode", - skuDetails.getPriceCurrencyCode() - ); - product.put("type", skuDetails.getType()); - products.put(product); - } - callbackContext.success(products); - } else { - callbackContext.error(responseCode); - } - } catch (JSONException e) { - callbackContext.error(e.getMessage()); - } - } - } - ); - } - - private void purchase(String json, CallbackContext callbackContext) { - try { - SkuDetails skuDetails = new SkuDetails(json); - BillingResult result = billingClient.launchBillingFlow( - activity, - BillingFlowParams.newBuilder().setSkuDetails(skuDetails).build() - ); - int responseCode = result.getResponseCode(); - if (responseCode == BillingResponseCode.OK) { - callbackContext.success(); - } else { - callbackContext.error(responseCode); - } - } catch (JSONException e) { - callbackContext.error(e.getMessage()); - } - } - - private void getPurchases(CallbackContext callbackContext) { - if (billingClient == null) { - billingClient = getBillingClient(); - callbackContext.error("Billing client is not connected"); - return; - } - - billingClient.queryPurchaseHistoryAsync( - SkuType.INAPP, - new PurchaseHistoryResponseListener() { - public void onPurchaseHistoryResponse( - BillingResult billingResult, - List purchases - ) { - try { - int responseCode = billingResult.getResponseCode(); - if (responseCode == BillingResponseCode.OK) { - JSONArray result = new JSONArray(); - for (PurchaseHistoryRecord purchase : purchases) { - JSONObject item = new JSONObject(); - List skuList = purchase.getSkus(); - JSONArray skuArray = new JSONArray(); - for (String sku : skuList) { - skuArray.put(sku); - } - item.put("productIds", skuArray); - item.put("purchaseToken", purchase.getPurchaseToken()); - item.put("purchaseTime", purchase.getPurchaseTime()); - item.put("signature", purchase.getSignature()); - item.put("developerPayload", purchase.getDeveloperPayload()); - item.put("quantity", purchase.getQuantity()); - item.put("json", purchase.getOriginalJson()); - result.put(item); - } - callbackContext.success(result); - } else { - callbackContext.error(responseCode); - } - } catch (JSONException e) { - callbackContext.error(e.getMessage()); - } - } - } - ); - } - - private void sendPurchasePluginResult(PluginResult result) { - if (purchaseUpdated != null) { - result.setKeepCallback(true); - purchaseUpdated.sendPluginResult(result); - } - } - - private String getString(JSONArray args, int index) { - try { - return args.getString(index); - } catch (JSONException e) { - return null; - } - } - - private int getInt(JSONArray args, int index) { - try { - return args.getInt(index); - } catch (JSONException e) { - return 0; - } - } - - private boolean getBoolean(JSONArray args, int index) { - try { - return args.getBoolean(index); - } catch (JSONException e) { - return false; - } - } - - private List getStringList(JSONArray args, int index) { - try { - JSONArray array = args.getJSONArray(index); - List list = new ArrayList(); - for (int i = 0; i < array.length(); i++) { - list.add(array.getString(i)); - } - return list; - } catch (JSONException e) { - return null; - } - } -} diff --git a/plugins/cordova-plugin-iap/www/plugin.js b/plugins/cordova-plugin-iap/www/plugin.js deleted file mode 100644 index 27bb3c9d8..000000000 --- a/plugins/cordova-plugin-iap/www/plugin.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = { - getProducts: function (productIds, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Iap', 'getProducts', [productIds]); - }, - setPurchaseUpdatedListener: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Iap', 'setPurchaseUpdatedListener', []); - }, - startConnection: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Iap', 'startConnection', []); - }, - consume: function (productId, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Iap', 'consume', [productId]); - }, - purchase: function (productId, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Iap', 'purchase', [productId]); - }, - getPurchases: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Iap', 'getPurchases', []); - }, - BILLING_UNAVAILABLE: 3, - DEVELOPER_ERROR: 5, - ERROR: 6, - FEATURE_NOT_SUPPORTED: -2, - ITEM_ALREADY_OWNED: 7, - ITEM_NOT_OWNED: 8, - ITEM_UNAVAILABLE: 4, - OK: 0, - SERVICE_DISCONNECTED: -1, - SERVICE_TIMEOUT: -3, - SERVICE_TIMEOUT: 2, - USER_CANCELED: 1 -}; \ No newline at end of file diff --git a/plugins/cordova-plugin-sdcard/index.d.ts b/plugins/cordova-plugin-sdcard/index.d.ts deleted file mode 100644 index 89bf0e3b9..000000000 --- a/plugins/cordova-plugin-sdcard/index.d.ts +++ /dev/null @@ -1,249 +0,0 @@ -interface Storage { - /** - * Name of the storage - */ - name: String; - /** - * UUID of the storage - */ - uuid: String; -} - -interface DirListItem { - name: String; - mime: String; - isDirectory: Boolean; - isFile: Boolean; - uri: String; -} - -interface Stats { - canRead: boolean; - canWrite: boolean; - exists: boolean; //indicates if file can be found on device storage - isDirectory: boolean; - isFile: boolean; - isVirtual: boolean; - lastModified: number; - length: number; - name: string; - type: string; - uri: string; -} - -interface DocumentFile { - canWrite: boolean; - filename: string; - length: number; - type: string; - uri: string; -} - -interface SDcard { - /** - * Copy file/directory to given destination - * @param src Source url - * @param dest Destination url - * @param onSuccess Callback function on success returns url of copied file/dir - * @param onFail Callback function on error returns error object - */ - copy( - src: String, - dest: String, - onSuccess: (url: String) => void, - onFail: (err: any) => void, - ): void; - /** - * Creates new directory at given source url. - * @param src Source url - * @param dirName New directory name - * @param onSuccess Callback function on success returns url of new directory - * @param onFail callback function on error returns error object - */ - createDir( - src: String, - dirName: String, - onSuccess: (url: String) => void, - onFail: (err: any) => void, - ): void; - /** - * Creates new file at given source url. - * @param src Source url - * @param fileName New file name - * @param onSuccess Callback function on success returns url of new directory - * @param onFail Callback function on error returns error object - */ - createFile( - src: String, - fileName: String, - onSuccess: (url: String) => void, - onFail: (err: any) => void, - ): void; - /** - * Deletes file/directory - * @param src Source url of file/directory - * @param onSuccess Callback function on success returns source url - * @param onFail Callback function on error returns error object - */ - delete( - src: String, - onSuccess: (url: String) => void, - onFail: (err: any) => void, - ): void; - /** - * Checks if given file/directory - * @param src File/Directory url - * @param onSuccess Callback function on success returns string "TRUE" or "FALSE" - * @param onFail Callback function on error returns error object - */ - exists( - src: String, - onSuccess: (exists: 'TRUE' | 'FALSE') => void, - onFail: (err: any) => void, - ): void; - /** - * Converts virtual URL to actual url - * @param src Virtual address returned by other methods - * @param onSuccess Callback function on success returns actual url - * @param onFail Callback function on error returns error object - */ - formatUri( - src: String, - onSuccess: (url: String) => void, - onFail: (err: any) => void, - ): void; - /** - * Gets actual url for relative path to src - * e.g. getPath(src, "../path/to/file.txt") => actual url - * @param src Directory url - * @param path Relative file/direcotry path - * @param onSuccess Callback function on success returns actual url - * @param onFail Callback function on error returns error object - */ - getPath( - src: String, - path: String, - onSuccess: (url: String) => void, - onFail: (err: any) => void, - ): void; - /** - * Requests user for storage permission - * @param uuid UUID returned from listStorages method - * @param onSuccess Callback function on success returns url for the storage root - * @param onFail Callback function on error returns error object - */ - getStorageAccessPermission( - uuid: String, - onSuccess: (url: String) => void, - onFail: (err: any) => void, - ): void; - /** - * Lists all the storages - * @param onSuccess Callback function on success returns list of storages - * @param onFail Callback function on error returns error object - */ - listStorages( - onSuccess: (storages: Array) => void, - onFail: (err: any) => void, - ): void; - /** - * Gets list of files/directory in the given directory - * @param src Directory url - * @param onSuccess Callback function on success returns list of files/directory - * @param onFail Callback function on error returns error object - */ - listDir( - src: String, - onSuccess: (list: Array) => void, - onFail: (err: any) => void, - ): void; - /** - * Move file/directory to given destination - * @param src Source url - * @param dest Destination url - * @param onSuccess Callback function on success returns url of moved file/dir - * @param onFail Callback function on error returns error object - */ - move( - src: String, - dest: String, - onSuccess: (url: String) => void, - onFail: (err: any) => void, - ): void; - /** - * Opens file provider to select file - * @param onSuccess Callback function on success returns url of selected file - * @param onFail Callback function on error returns error object - * @param mimeType MimeType of file to be selected - */ - openDocumentFile( - onSuccess: (url: DocumentFile) => void, - onFail: (err: any) => void, - mimeType: String, - ): void; - /** - * Opens gallary to select image - * @param onSuccess Callback function on success returns url of selected file - * @param onFail Callback function on error returns error object - * @param mimeType MimeType of file to be selected - */ - getImage( - onSuccess: (url: DocumentFile) => void, - onFail: (err: any) => void, - mimeType: String, - ): void; - /** - * Renames the given file/directory to given new name - * @param src Url of file/directory - * @param newname New name - * @param onSuccess Callback function on success returns url of renamed file - * @param onFail Callback function on error returns error object - */ - rename( - src: String, - newname: String, - onSuccess: (url: String) => void, - onFail: (err: any) => void, - ): void; - /** - * Writes new content to the given file. - * @param src file url - * @param content new file content - * @param onSuccess Callback function on success returns "OK" - * @param onFail Callback function on error returns error object - */ - write( - src: String, - content: String, - onSuccess: (res: 'OK') => void, - onFail: (err: any) => void, - ): void; - /** - * Writes new content to the given file. - * @param src file url - * @param content new file content - * @param isBinary is data binary - * @param onSuccess Callback function on success returns "OK" - * @param onFail Callback function on error returns error object - */ - write( - src: String, - content: String, - isBinary: Boolean, - onSuccess: (res: 'OK') => void, - onFail: (err: any) => void, - ): void; - /** - * Gets stats of given file - * @param src file/directory url - * @param onSuccess Callback function on success returns file/directory stats - * @param onFail Callback function on error returns error object - */ - stats( - src: String, - onSuccess: (stats: Stats) => void, - onFail: (err: any) => void, - ): void; -} - -declare var sdcard: SDcard; diff --git a/plugins/cordova-plugin-sdcard/package.json b/plugins/cordova-plugin-sdcard/package.json deleted file mode 100644 index 2b7629963..000000000 --- a/plugins/cordova-plugin-sdcard/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "_from": "cordova-plugin-sdcard", - "_id": "cordova-plugin-sdcard@1.1.0", - "_inBundle": false, - "_integrity": "sha512-JEnVkoGTwvIs5gc1+aiBpByGfwTwl+o4QviQHlbAxtra46nEpMIz+fk8CljTA6ES/MFh4kJkNBFlxlg819+x6w==", - "_location": "/cordova-plugin-sdcard", - "_phantomChildren": {}, - "_requested": { - "type": "tag", - "registry": true, - "raw": "cordova-plugin-sdcard", - "name": "cordova-plugin-sdcard", - "escapedName": "cordova-plugin-sdcard", - "rawSpec": "", - "saveSpec": null, - "fetchSpec": "latest" - }, - "_requiredBy": [ - "#DEV:/", - "#USER" - ], - "_resolved": "https://registry.npmjs.org/cordova-plugin-sdcard/-/cordova-plugin-sdcard-1.1.0.tgz", - "_shasum": "f8d7792d5f4d6c215227d087d804c279242a1050", - "_spec": "cordova-plugin-sdcard", - "_where": "D:\\Github\\deadlyjack\\Acode", - "author": "", - "bundleDependencies": false, - "deprecated": false, - "description": "Using this plugin, cordova apps can check for external storages and write/modify files.", - "keywords": [ - "cordova", - "plugin", - "sdcard", - "external storage", - "access external storage", - "android" - ], - "license": "ISC", - "main": "index.js", - "name": "cordova-plugin-sdcard", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "1.1.0" -} diff --git a/plugins/cordova-plugin-sdcard/src/android/SDcard.java b/plugins/cordova-plugin-sdcard/src/android/SDcard.java deleted file mode 100644 index d4ba94b6f..000000000 --- a/plugins/cordova-plugin-sdcard/src/android/SDcard.java +++ /dev/null @@ -1,827 +0,0 @@ -package com.foxdebug.sdcard; - -import android.app.Activity; -import android.content.ContentResolver; -import android.content.Context; -import android.content.Intent; -import android.database.Cursor; -import android.net.Uri; -import android.os.Build; -import android.os.Environment; -import android.os.storage.StorageManager; -import android.os.storage.StorageVolume; -import android.provider.DocumentsContract; -import android.provider.DocumentsContract.Document; -import android.provider.MediaStore; -import android.text.TextUtils; -import android.util.Log; -import androidx.documentfile.provider.DocumentFile; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.net.URLConnection; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.io.FilenameUtils; -import org.apache.commons.io.IOUtils; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaWebView; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public class SDcard extends CordovaPlugin { - - private int mode; - private int SDK_INT = android.os.Build.VERSION.SDK_INT; - private int REQUEST_CODE; - private final int ACCESS_INTENT = 6000; - private final int DOCUMENT_TREE = 6001; - private final int OPEN_DOCUMENT = 6002; - private final int PICK_FROM_GALLARY = 6003; - private final String SAPERATOR = "::"; - private StorageManager storageManager; - private Context context; - private Activity activity; - private ContentResolver contentResolver; - private DocumentFile originalRootFile; - private CallbackContext activityResultCallback; - - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - this.REQUEST_CODE = this.ACCESS_INTENT; - this.context = cordova.getContext(); - this.activity = cordova.getActivity(); - this.storageManager = - (StorageManager) this.activity.getSystemService(Context.STORAGE_SERVICE); - } - - public boolean execute( - String action, - final JSONArray args, - final CallbackContext callbackContext - ) - throws JSONException { - String arg1 = null, arg2 = null, arg3 = null, arg4 = null; - int argLen = args.length(); - - if (argLen > 0) arg1 = args.getString(0); - - if (argLen > 1) arg2 = args.getString(1); - - if (argLen > 2) arg3 = args.getString(2); - - switch (action) { - case "create directory": - createDir(arg1, arg2, callbackContext); - break; - case "create file": - createFile(arg1, arg2, callbackContext); - break; - case "open document file": - openDocumentFile(arg1, callbackContext); - break; - case "get image": - getImage(arg1, callbackContext); - break; - case "list volumes": - getStorageVolumes(callbackContext); - break; - case "storage permission": - getStorageAccess(arg1, callbackContext); - break; - case "write": - writeFile(formatUri(arg1), arg2, args.getBoolean(2), callbackContext); - break; - case "rename": - rename(arg1, arg2, callbackContext); - break; - case "delete": - delete(formatUri(arg1), callbackContext); - break; - case "copy": - copy(arg1, arg2, callbackContext); - break; - case "move": - move(arg1, arg2, callbackContext); - break; - case "getpath": - getPath(formatUri(arg1), arg2, callbackContext); - break; - case "exists": - exists(formatUri(arg1), callbackContext); - break; - case "format uri": - callbackContext.success(formatUri(arg1)); - break; - case "list directory": - if (arg1.contains(SAPERATOR)) { - String splittedStr[] = arg1.split(SAPERATOR, 2); - arg1 = splittedStr[0]; - arg2 = splittedStr[1]; - } - - listDir(arg1, arg2, callbackContext); - - break; - case "stats": - getStats(arg1, callbackContext); - break; - default: - return false; - } - - return true; - } - - private String formatUri(String filename) { - if (filename.contains(SAPERATOR)) { - String splittedStr[] = filename.split(SAPERATOR, 2); - String rootUri = splittedStr[0]; - String docId = splittedStr[1]; - - Uri uri = getUri(rootUri, docId); - - return uri.toString(); - } else { - return filename; - } - } - - public void openDocumentFile( - String mimeType, - CallbackContext callbackContext - ) { - Intent intent = new Intent(); - if (mimeType == null) mimeType = "*/*"; - intent.setAction(Intent.ACTION_OPEN_DOCUMENT); - intent.addCategory(Intent.CATEGORY_OPENABLE); - intent.setType(mimeType); - activityResultCallback = callbackContext; - cordova.startActivityForResult(this, intent, this.OPEN_DOCUMENT); - } - - public void getImage(String mimeType, CallbackContext callback) { - Intent intent = new Intent(Intent.ACTION_GET_CONTENT); - if (mimeType == null) mimeType = "image/*"; - - intent.setType(mimeType); - activityResultCallback = callback; - cordova.startActivityForResult(this, intent, this.PICK_FROM_GALLARY); - } - - public void getStorageVolumes(CallbackContext callback) { - try { - JSONArray result = new JSONArray(); - - if (SDK_INT >= 24) { - for (StorageVolume volume : this.storageManager.getStorageVolumes()) { - String name = volume.getDescription(this.context); - String uuid = volume.getUuid(); - JSONObject volumeData = new JSONObject(); - if (name != null && uuid != null) { - volumeData.put("uuid", uuid); - volumeData.put("name", name); - - if (SDK_INT >= 30) { - File file = volume.getDirectory(); - String path = file.getAbsolutePath(); - volumeData.put("path", path); - } - - result.put(volumeData); - } - } - } else { - File file = Environment.getExternalStorageDirectory(); - if ( - Environment.getExternalStorageState(file) == Environment.MEDIA_MOUNTED - ) { - String name = file.getName(); - String path = file.getPath(); - String absolutePath = file.getAbsolutePath(); - JSONObject volumeData = new JSONObject(); - volumeData.put("name", name); - volumeData.put("path", path); - volumeData.put("absolutePath", absolutePath); - result.put(volumeData); - } - } - - callback.success(result); - } catch (JSONException e) { - callback.error(e.toString()); - } - } - - public void getStorageAccess(String SDCardUUID, CallbackContext callback) { - Intent intent = null; - activityResultCallback = callback; - - if (SDK_INT >= 24) { - StorageVolume sdCard = null; - - for (StorageVolume volume : this.storageManager.getStorageVolumes()) { - String uuid = volume.getUuid(); - if (uuid != null && uuid.equals(SDCardUUID)) { - sdCard = volume; - } - } - - if (sdCard != null) { - if (SDK_INT < 29) { - intent = sdCard.createAccessIntent(null); - } else if (SDK_INT >= 29) { - intent = sdCard.createOpenDocumentTreeIntent(); - } - } - } - - if (intent == null) { - REQUEST_CODE = DOCUMENT_TREE; - intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE); - } - - cordova.startActivityForResult(this, intent, REQUEST_CODE); - } - - public void onActivityResult(int requestCode, int resultCode, Intent data) { - super.onActivityResult(requestCode, resultCode, data); - - if (data == null) return; - - if (requestCode == PICK_FROM_GALLARY) { - if (resultCode == Activity.RESULT_OK) { - Uri uri = data.getData(); - activityResultCallback.success(uri.toString()); - } - return; - } - - if (requestCode == OPEN_DOCUMENT) { - if (resultCode == Activity.RESULT_OK) { - try { - Uri uri = data.getData(); - takePermission(uri); - DocumentFile file = DocumentFile.fromSingleUri(context, uri); - JSONObject res = new JSONObject(); - - res.put("length", file.length()); - res.put("type", file.getType()); - res.put("filename", file.getName()); - res.put("canWrite", file.canWrite()); - res.put("uri", uri.toString()); - activityResultCallback.success(res); - } catch (JSONException e) { - activityResultCallback.error(e.toString()); - } - } - - return; - } - - if (requestCode == DOCUMENT_TREE || requestCode == ACCESS_INTENT) { - if ( - requestCode == ACCESS_INTENT && resultCode == Activity.RESULT_CANCELED - ) { - activityResultCallback.error("Canceled"); - return; - } - - try { - Uri uri = data.getData(); - if (uri == null) { - activityResultCallback.error("Empty uri"); - } else { - takePermission(uri); - DocumentFile file = DocumentFile.fromTreeUri(context, uri); - if (file != null && file.canWrite()) { - activityResultCallback.success(uri.toString()); - } else { - activityResultCallback.error( - "No write permisson: " + uri.toString() - ); - } - } - } catch (Exception e) { - activityResultCallback.error(e.toString()); - } - - return; - } - } - - private void writeFile( - final String filename, - final String content, - final Boolean isBinary, - final CallbackContext callback - ) { - final Context context = this.context; - - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - DocumentFile file = getFile(filename); - - if (file.canWrite()) { - OutputStream op = context - .getContentResolver() - .openOutputStream(file.getUri(), "rwt"); - - byte[] contentAsBytes = content.getBytes(); - - if (isBinary) { - byte[] decodedContentAsBytes; - - try { - decodedContentAsBytes = Base64.decodeBase64(content); - } catch (NoSuchMethodError e4) { - try { - decodedContentAsBytes = - Base64.decodeBase64(contentAsBytes); - } catch (NoSuchMethodError e5) { - callback.error(e5.toString()); - return; - } - } - - Log.d("writeFile", "Content is base64"); - op.write(decodedContentAsBytes); - } else { - PrintWriter pw = new PrintWriter(op, true); - - Log.d("writeFile", "Content is not base64"); - pw.print(content); - pw.flush(); - pw.close(); - } - - op.close(); - callback.success("OK"); - } else { - callback.error("No write permission - " + filename); - } - } catch (IOException e) { - callback.error(e.toString() + ": " + filename); - } - } - } - ); - } - - private void createDir(String parent, String name, CallbackContext callback) { - create(parent, name, Document.MIME_TYPE_DIR, callback); - } - - private void createFile( - String parent, - String name, - CallbackContext callback - ) { - String mimeType = URLConnection.guessContentTypeFromName(name); - String ext = FilenameUtils.getExtension(name); - - if (mimeType == null && ext != null) mimeType = - "text/" + ext; else mimeType = "text/plain"; - - create(parent, name, mimeType, callback); - } - - private void create( - String parent, - String name, - String mimeType, - CallbackContext callback - ) { - try { - String srcUri = null, docId = null; - Uri parentUri = null; - - if (parent.contains(SAPERATOR)) { - String splittedStr[] = parent.split(SAPERATOR, 2); - srcUri = splittedStr[0]; - docId = splittedStr[1]; - parentUri = getUri(srcUri, docId); - } else { - srcUri = parent; - parentUri = Uri.parse(srcUri); - docId = DocumentsContract.getTreeDocumentId(parentUri); - parentUri = - DocumentsContract.buildDocumentUriUsingTree(parentUri, docId); - } - - ContentResolver contentResolver = context.getContentResolver(); - Uri newDocumentUri = DocumentsContract.createDocument( - contentResolver, - parentUri, - mimeType, - name - ); - DocumentFile file = DocumentFile.fromTreeUri(context, newDocumentUri); - Log.i("SDcard", "Uri: " + newDocumentUri.toString()); - if (!name.equals(file.getName()) && file.renameTo(name)) { - newDocumentUri = file.getUri(); - } - - docId = DocumentsContract.getDocumentId(newDocumentUri); - if (newDocumentUri != null) { - callback.success(srcUri + SAPERATOR + docId); - } else { - callback.error("Unable to create " + parent); - } - } catch (Exception e) { - Log.e("CREATE_FILE", "Unable to create file", e); - callback.error(e.toString()); - } - } - - private void rename( - String filename, - String newFile, - CallbackContext callback - ) { - String srcUri = null, docId = null; - Uri fileUri = null; - if (filename.contains(SAPERATOR)) { - String splittedStr[] = filename.split(SAPERATOR, 2); - srcUri = splittedStr[0]; - docId = splittedStr[1]; - fileUri = getUri(srcUri, docId); - } else { - srcUri = filename; - fileUri = Uri.parse(filename); - } - - try { - DocumentFile file = DocumentFile.fromTreeUri(context, fileUri); - - if (file.renameTo(newFile)) { - docId = DocumentsContract.getDocumentId(file.getUri()); - callback.success(srcUri + SAPERATOR + docId); - } else { - callback.error("Unable to rename: " + filename); - } - } catch (Exception e) { - Log.e("RENAME_DOCUMENT_FILE", "Unable to rename file", e); - callback.error(e.toString()); - } - } - - private void delete(String filename, CallbackContext callback) { - ContentResolver contentResolver = context.getContentResolver(); - Uri fileUri = Uri.parse(filename); - - try { - boolean fileDeleted = DocumentsContract.deleteDocument( - contentResolver, - fileUri - ); - - if (fileDeleted) { - callback.success(filename); - } else { - callback.error("Unable to delete file " + filename); - } - } catch (FileNotFoundException e) { - callback.error(e.toString()); - } - } - - private void move(String src, String dest, final CallbackContext callback) { - final ContentResolver contentResolver = this.context.getContentResolver(); - final String splittedStr[] = src.split(SAPERATOR, 2); - final String rootUri = splittedStr[0]; - final String srcId = splittedStr[1]; - final String destId = dest.split(SAPERATOR, 2)[1]; - - cordova - .getThreadPool() - .execute( - new Runnable() { - @Override - public void run() { - try { - Uri newUri = copy(rootUri, srcId, destId); - if (newUri == null) callback.error( - "Unable to copy " + src - ); else { - DocumentsContract.deleteDocument( - contentResolver, - getUri(rootUri, srcId) - ); - callback.success( - rootUri + SAPERATOR + DocumentsContract.getDocumentId(newUri) - ); - } - } catch (Exception e) { - callback.error(e.toString()); - } - } - } - ); - } - - private void copy(String src, String dest, final CallbackContext callback) { - final String splittedStr[] = src.split(SAPERATOR, 2); - final String srcUri = splittedStr[0]; - final String srcId = splittedStr[1]; - final String destId = dest.split(SAPERATOR, 2)[1]; - - cordova - .getThreadPool() - .execute( - new Runnable() { - @Override - public void run() { - try { - Uri newUri = copy(srcUri, srcId, destId); - if (newUri == null) { - callback.error("Unable to copy " + src); - } else { - callback.success( - srcUri + SAPERATOR + DocumentsContract.getDocumentId(newUri) - ); - } - } catch (Exception e) { - callback.error(e.toString()); - } - } - } - ); - } - - private Uri copy(String root, String srcId, String destId) - throws IOException, FileNotFoundException { - Uri srcUri = getUri(root, srcId); - Uri destUri = getUri(root, destId); - DocumentFile src = getFile(srcUri); - DocumentFile dest = getFile(destUri); - ContentResolver contentResolver = context.getContentResolver(); - - if (src.isFile()) { - Uri newUri = copyFile(src, dest); - if (newUri == null) return null; else return newUri; - } else { - destUri = - DocumentsContract.createDocument( - contentResolver, - destUri, - Document.MIME_TYPE_DIR, - src.getName() - ); - destId = DocumentsContract.getDocumentId(destUri); - - Uri childrenUri = DocumentsContract.buildChildDocumentsUriUsingTree( - Uri.parse(root), - srcId - ); - Cursor c = contentResolver.query( - childrenUri, - new String[] { Document.COLUMN_DOCUMENT_ID }, - null, - null, - null - ); - if (c != null) { - while (c.moveToNext()) { - String docId = c.getString(0); - copy(root, docId, destId); - } - c.close(); - return destUri; - } else { - DocumentsContract.deleteDocument(contentResolver, destUri); - return null; - } - } - } - - private Uri copyFile(DocumentFile src, DocumentFile dest) - throws IOException, FileNotFoundException { - ContentResolver contentResolver = this.context.getContentResolver(); - - Uri newFileUri = DocumentsContract.createDocument( - contentResolver, - dest.getUri(), - src.getType(), - src.getName() - ); - DocumentFile newFile = getFile(newFileUri); - InputStream is = contentResolver.openInputStream(src.getUri()); - OutputStream os = contentResolver.openOutputStream(newFile.getUri(), "rwt"); - - if (is == null || os == null) { - DocumentsContract.deleteDocument(contentResolver, newFileUri); - return null; - } - - IOUtils.copy(is, os); - - is.close(); - os.close(); - - if (src.length() == newFile.length()) return newFile.getUri(); else { - DocumentsContract.deleteDocument(contentResolver, newFileUri); - return null; - } - } - - private void listDir( - String src, - String parentDocId, - CallbackContext callback - ) { - Uri srcUri = Uri.parse(src); - ContentResolver contentResolver = context.getContentResolver(); - - if (parentDocId == null) { - parentDocId = DocumentsContract.getTreeDocumentId(srcUri); - } - - Uri childrenUri = DocumentsContract.buildChildDocumentsUriUsingTree( - srcUri, - parentDocId - ); - - JSONArray result = new JSONArray(); - Cursor c = contentResolver.query( - childrenUri, - new String[] { - Document.COLUMN_DOCUMENT_ID, - Document.COLUMN_DISPLAY_NAME, - Document.COLUMN_MIME_TYPE, - }, - null, - null, - null - ); - - try { - while (c.moveToNext()) { - JSONObject fileData = new JSONObject(); - String docId = c.getString(0); - String name = c.getString(1); - String mime = c.getString(2); - boolean isDirectory = isDirectory(mime); - - fileData.put("name", name); - fileData.put("mime", mime); - fileData.put("isDirectory", isDirectory); - fileData.put("isFile", !isDirectory); - fileData.put("uri", src + SAPERATOR + docId); - result.put(fileData); - } - - callback.success(result); - } catch (JSONException e) { - callback.error(e.toString()); - } finally { - if (c != null) { - try { - c.close(); - } catch (RuntimeException re) { - throw re; - } catch (Exception ignore) { - // ignore exception - } - } - } - } - - private boolean isDirectory(String mimeType) { - return DocumentsContract.Document.MIME_TYPE_DIR.equals(mimeType); - } - - private void getStats(String filename, CallbackContext callback) { - String fileUri = formatUri(filename); - - try { - DocumentFile file = getFile(fileUri); - - JSONObject result = new JSONObject(); - result.put("exists", file.exists()); - result.put("canRead", file.canRead()); - result.put("canWrite", file.canWrite()); - result.put("name", file.getName()); - result.put("length", file.length()); - result.put("type", file.getType()); - result.put("isFile", file.isFile()); - result.put("isDirectory", file.isDirectory()); - result.put("isVirtual", file.isVirtual()); - result.put("lastModified", file.lastModified()); - - callback.success(result); - } catch (Exception e) { - callback.error(e.getMessage()); - } - } - - private Uri getUri(String src, String docId) { - Uri srcUri = Uri.parse(src); - String srcId = DocumentsContract.getTreeDocumentId(srcUri); - srcUri = DocumentsContract.buildDocumentUriUsingTree(srcUri, srcId); - return DocumentsContract.buildDocumentUriUsingTree(srcUri, docId); - } - - private void exists(String path, CallbackContext callback) { - DocumentFile file = DocumentFile.fromSingleUri(context, Uri.parse(path)); - - if (file == null) { - callback.error("Unable to get file"); - } else { - if (file.exists()) { - callback.success("TRUE"); - } else { - callback.success("FALSE"); - } - } - } - - private void error(String err, CallbackContext callback) { - callback.error("ERROR: " + err); - } - - private void getPath(String uriString, String src, CallbackContext callback) { - try { - DocumentFile file = geRelativetDocumentFile(uriString, src); - - if (file == null) { - callback.error("Unable to get file"); - } else { - Uri uri = file.getUri(); - String path = uri.getPath(); - - if (path != null) { - callback.success(uri.toString()); - } else { - callback.error("Unable to get path"); - } - } - } catch (Exception e) { - callback.error(e.getMessage()); - } - } - - private DocumentFile geRelativetDocumentFile(String uri, String filename) { - List paths = new ArrayList(); - DocumentFile file = null; - - file = DocumentFile.fromTreeUri(context, Uri.parse(uri)); - if (!file.canWrite()) { - throw new RuntimeException("Cnnot write file"); - } - - paths.addAll(Arrays.asList(filename.split("/"))); - - while (paths.size() > 0) { - String path = paths.remove(0); - filename = TextUtils.join("/", paths); - - if (!path.equals("")) { - file = file.findFile(path); - - if (file == null) return null; - } - } - - return file; - } - - private DocumentFile getFile(Uri uri) { - return getFile(uri.toString()); - } - - private DocumentFile getFile(String filePath) { - Uri fileUri = Uri.parse(filePath); - DocumentFile documentFile = null; - - if (filePath.matches("file:///(.*)")) { - File file = new File(fileUri.getPath()); - documentFile = DocumentFile.fromFile(file); - } else { - documentFile = DocumentFile.fromSingleUri(context, Uri.parse(filePath)); - } - - return documentFile; - } - - private void takePermission(Uri uri) { - contentResolver = context.getContentResolver(); - contentResolver.takePersistableUriPermission( - uri, - Intent.FLAG_GRANT_WRITE_URI_PERMISSION | - Intent.FLAG_GRANT_READ_URI_PERMISSION - ); - } -} diff --git a/plugins/cordova-plugin-sdcard/www/plugin.js b/plugins/cordova-plugin-sdcard/www/plugin.js deleted file mode 100644 index 69e8a82f0..000000000 --- a/plugins/cordova-plugin-sdcard/www/plugin.js +++ /dev/null @@ -1,56 +0,0 @@ -module.exports = { - copy: function (srcPathname, destPathname, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'copy', [srcPathname, destPathname]); - }, - createDir: function (pathname, dir, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'create directory', [pathname, dir]); - }, - createFile: function (pathname, file, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'create file', [pathname, file]); - }, - delete: function (pathname, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'delete', [pathname]); - }, - exists: function (pathName, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'exists', [pathName]); - }, - formatUri: function (pathName, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'format uri', [pathName]); - }, - getPath: function (uri, filename, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'getpath', [uri, filename]); - }, - getStorageAccessPermission: function (uuid, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'storage permission', [uuid]); - }, - listStorages: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'list volumes', []); - }, - listDir: function (src, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'list directory', [src]); - }, - move: function (srcPathname, destPathname, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'move', [srcPathname, destPathname]); - }, - openDocumentFile: function (onSuccess, onFail, mimeType) { - cordova.exec(onSuccess, onFail, 'SDcard', 'open document file', mimeType ? [mimeType] : []); - }, - getImage: function (onSuccess, onFail, mimeType) { - cordova.exec(onSuccess, onFail, 'SDcard', 'get image', mimeType ? [mimeType] : []); - }, - rename: function (pathname, newFilename, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'rename', [pathname, newFilename]); - }, - write: function (filename, content, isBinary, onSuccess, onFail) { - if (typeof isBinary === 'function') { - onSuccess = isBinary; - onFail = onSuccess; - isBinary = false; - } - - cordova.exec(onSuccess, onFail, 'SDcard', 'write', [filename, content, isBinary]); - }, - stats: function (filename, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'SDcard', 'stats', [filename]); - } -}; \ No newline at end of file diff --git a/plugins/cordova-plugin-sftp/LICENSE.md b/plugins/cordova-plugin-sftp/LICENSE.md deleted file mode 100644 index 7e63c3c5e..000000000 --- a/plugins/cordova-plugin-sftp/LICENSE.md +++ /dev/null @@ -1,3 +0,0 @@ -- GoldRaccoon is under [original author's license](https://github.com/albertodebortoli/GoldRaccoon/blob/master/LICENSE.markdown) -- ftp4j is under [LGPL](http://opensource.org/licenses/LGPL-2.1) -- All other codes (writen by me) are under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/plugins/cordova-plugin-sftp/README.md b/plugins/cordova-plugin-sftp/README.md deleted file mode 100644 index 3e52d04a4..000000000 --- a/plugins/cordova-plugin-sftp/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# cordova-plugin-sftp - -## Description - -This cordova plugin is created to use sftp (client) in Cordova apps. - -Support **Android** platform for now. - -You can do the following things: - -- Execute a command -- Download a file (with percent info) -- Upload a file (with percent info) -- Connect using private key or password - -## Installation - -```sh -$ cordova plugin add cordova-plugin-sftp -$ cordova prepare -``` diff --git a/plugins/cordova-plugin-sftp/index.d.ts b/plugins/cordova-plugin-sftp/index.d.ts deleted file mode 100644 index 62d0afeed..000000000 --- a/plugins/cordova-plugin-sftp/index.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -interface Stats { - canRead: boolean; - canWrite: boolean; - exists: boolean; //indicates if file can be found on device storage - isDirectory: boolean; - isFile: boolean; - isVirtual: boolean; - lastModified: number; - length: number; - name: string; - type: string; - uri: string; -} - -interface ExecResult{ - code: Number; - result: String; -} - -interface Sftp { - /** - * Executes command on ssh-server - * @param command - * @param onSucess - * @param onFail - */ - exec(command: String, onSucess: (res: ExecResult)=>void, onFail: (err: any) => void): void; - /** - * Connects to SFTP server - * @param host Hostname of the server - * @param port port numer - * @param username Username - * @param password Password or private key file to authenticate the server - * @param onSuccess Callback function on success returns url of copied file/dir - * @param onFail Callback function on error returns error object - */ - connectUsingPassoword(host: String, port: Number, username: String, password: String, onSuccess: () => void, onFail: (err: any) => void): void; - - /** - * Connects to SFTP server - * @param host Hostname of the server - * @param port port numer - * @param username Username - * @param keyFile Password or private key file to authenticate the server - * @param passphrase Passphrase for keyfile - * @param onSuccess Callback function on success returns url of copied file/dir - * @param onFail Callback function on error returns error object - */ - connectUsingKeyFile(host: String, port: Number, username: String, keyFile: String, passphrase: String, onSuccess: () => void, onFail: (err: any) => void): void; - - /** - * Gets file from the server. - * @param filename - * @param localFilename copy/shadow of remote file. - * @param onSuccess - * @param onFail - */ - getFile(filename: String, localFilename: String, onSuccess: (url: String) => void, onFail: (err: any) => void): void; - - /** - * Uploaded the file to server - * @param filename - * @param localFilename copy/shadow of remote file. - * @param onSuccess - * @param onFail - */ - putFile(filename: String, localFilename: String, onSuccess: (url: String) => void, onFail: (err: any) => void): void; - - /** - * Closes the connection - * @param onSuccess - * @param onFail - */ - close(onSuccess: () => void, onFail: (err: any) => void): void; - - /** - * Gets wether server is connected or not. - * @param onSuccess - * @param onFail - */ - isConnected(onSuccess: (connectionId: String) => void, onFail: (err: any) => void): void; -} - -declare var sftp: Sftp; \ No newline at end of file diff --git a/plugins/cordova-plugin-sftp/package.json b/plugins/cordova-plugin-sftp/package.json deleted file mode 100644 index e42a440d2..000000000 --- a/plugins/cordova-plugin-sftp/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "cordova-plugin-sftp", - "version": "1.1.1", - "description": "This cordova plugin is created to use sftp (client) in web/js.", - "cordova": { - "id": "cordova-plugin-sftp", - "platforms": [ - "android" - ] - }, - "keywords": [ - "cordova", - "sftp", - "cordova-android" - ], - "author": "pax", - "license": "Apache-2.0", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - } -} \ No newline at end of file diff --git a/plugins/cordova-plugin-sftp/plugin.xml b/plugins/cordova-plugin-sftp/plugin.xml deleted file mode 100644 index 0dde7997d..000000000 --- a/plugins/cordova-plugin-sftp/plugin.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - Sftp - Cordova Sftp Plugin - MIT - cordova,ftp - https://github.com/foxdebug/cordova-plugin-sftp.git - - - - - - - - - - - - - - - - - - - diff --git a/plugins/cordova-plugin-sftp/src/com/foxdebug/sftp/Sftp.java b/plugins/cordova-plugin-sftp/src/com/foxdebug/sftp/Sftp.java deleted file mode 100644 index fdb96828b..000000000 --- a/plugins/cordova-plugin-sftp/src/com/foxdebug/sftp/Sftp.java +++ /dev/null @@ -1,296 +0,0 @@ -package com.foxdebug.sftp; - -import android.app.Activity; -import android.content.ContentResolver; -import android.content.Context; -import android.net.Uri; -import android.util.Log; -import androidx.documentfile.provider.DocumentFile; -import com.sshtools.client.SshClient; -import com.sshtools.common.publickey.InvalidPassphraseException; -import com.sshtools.common.publickey.SshKeyUtils; -import com.sshtools.common.ssh.SshException; -import com.sshtools.common.util.FileUtils; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.lang.SecurityException; -import java.net.URI; -import java.net.URISyntaxException; -import java.nio.channels.UnresolvedAddressException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.apache.commons.io.IOUtils; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaWebView; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public class Sftp extends CordovaPlugin { - - private SshClient ssh; - private Context context; - private Activity activity; - private String connectionID; - - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - context = cordova.getContext(); - activity = cordova.getActivity(); - } - - public boolean execute( - final String action, - final JSONArray args, - final CallbackContext callbackContext - ) - throws JSONException { - final String arg1 = getJSONValueString(args, 0); - final String arg2 = getJSONValueString(args, 1); - final String arg3 = getJSONValueString(args, 2); - final String arg4 = getJSONValueString(args, 3); - final String arg5 = getJSONValueString(args, 4); - - switch (action) { - case "connect-pass": - case "connect-key": - case "getfile": - case "putfile": - case "close": - case "exec": - case "isconnected": - break; - default: - return false; - } - - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - switch (action) { - case "connect-pass": - connectUsingPassword( - arg1, - getJSONValueInt(args, 1), - arg3, - arg4, - callbackContext - ); - break; - case "connect-key": - connectUsingKeyFile( - arg1, - getJSONValueInt(args, 1), - arg3, - arg4, - arg5, - callbackContext - ); - break; - case "getfile": - getFile(arg1, arg2, callbackContext); - break; - case "putfile": - putFile(arg1, arg2, callbackContext); - break; - case "exec": - exec(arg1, callbackContext); - break; - case "close": - close(callbackContext); - break; - case "isconnected": - isConnected(callbackContext); - break; - default: - break; - } - } - } - ); - - return true; - } - - private void connectUsingPassword( - String host, - int port, - String username, - String password, - CallbackContext callback - ) { - try { - ssh = new SshClient(host, port, username, password.toCharArray()); - if (ssh.isConnected()) { - connectionID = username + "@" + host; - callback.success(); - Log.d("connectUsingPassword", "Connected successfully"); - return; - } - - callback.error("Cannot connect"); - } catch (UnresolvedAddressException | SshException | IOException e) { - callback.error(errMessage(e)); - Log.e("connectUsingPassword", "Cannot connect", e); - } - } - - private void connectUsingKeyFile( - String host, - int port, - String username, - String keyFile, - String passphrase, - CallbackContext callback - ) { - try { - DocumentFile file = DocumentFile.fromSingleUri( - context, - Uri.parse(keyFile) - ); - Uri uri = file.getUri(); - ContentResolver contentResolver = context.getContentResolver(); - InputStream in = contentResolver.openInputStream(uri); - - ssh = - new SshClient( - host, - port, - username, - SshKeyUtils.getPrivateKey(in, passphrase) - ); - - if (ssh.isConnected()) { - connectionID = username + "@" + host; - callback.success(); - return; - } - - callback.error("Cannot connect"); - } catch ( - InvalidPassphraseException - | UnresolvedAddressException - | SshException - | IOException - | SecurityException e - ) { - callback.error(errMessage(e)); - Log.e("connectUsingKeyFile", "Cannot connect", e); - } - } - - private void exec(String command, CallbackContext callback) { - try { - if (ssh != null) { - JSONObject res = new JSONObject(); - StringBuffer buffer = new StringBuffer(); - int code = ssh.executeCommandWithResult(command, buffer); - String result = buffer.toString(); - res.put("code", code); - res.put("result", result); - callback.success(res); - return; - } - callback.error("Not connected"); - } catch (IOException | JSONException e) { - callback.error(errMessage(e)); - } - } - - private void getFile( - String filename, - String localFilename, - CallbackContext callback - ) { - try { - if (ssh != null) { - URI uri = new URI(localFilename); - File file = new File(uri); - file.createNewFile(); - ssh.getFile(filename, file); - callback.success(); - return; - } - Log.d("getFile", "ssh is null"); - callback.error("Not connected"); - } catch (IOException | URISyntaxException e) { - callback.error(errMessage(e)); - } - } - - private void putFile( - String filename, - String localFilename, - CallbackContext callback - ) { - try { - if (ssh != null) { - URI uri = new URI(localFilename); - File file = new File(uri); - ssh.putFile(file, filename); - callback.success(); - return; - } - callback.error("Not connected"); - } catch (IOException | URISyntaxException e) { - callback.error(errMessage(e)); - } - } - - private void close(CallbackContext callback) { - try { - if (ssh != null) { - ssh.close(); - callback.success(); - return; - } - callback.error("Not connected"); - } catch (IOException e) { - callback.error(errMessage(e)); - } - } - - private void isConnected(CallbackContext callback) { - if (ssh != null && ssh.isConnected()) { - callback.success(connectionID); - return; - } - - callback.success(0); - } - - private String getJSONValueString(JSONArray ar, int index) { - try { - return ar.getString(index); - } catch (JSONException e) { - return null; - } - } - - private int getJSONValueInt(JSONArray ar, int index) { - try { - return ar.getInt(index); - } catch (JSONException e) { - return 0; - } - } - - private String errMessage(Exception e) { - String res = e.getMessage(); - if (res == null || res.equals("")) { - return e.toString(); - } - - return res; - } -} diff --git a/plugins/cordova-plugin-sftp/www/sftp.js b/plugins/cordova-plugin-sftp/www/sftp.js deleted file mode 100644 index 7e71903ca..000000000 --- a/plugins/cordova-plugin-sftp/www/sftp.js +++ /dev/null @@ -1,65 +0,0 @@ -module.exports = { - exec: function (command, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Sftp', 'exec', [command]); - }, - connectUsingPassword: function ( - host, - port, - username, - password, - onSuccess, - onFail - ) { - if (typeof port != 'number') { - throw new Error('Port must be number'); - } - - port = Number.parseInt(port); - cordova.exec(onSuccess, onFail, 'Sftp', 'connect-pass', [ - host, - port, - username, - password, - ]); - }, - connectUsingKeyFile: function ( - host, - port, - username, - keyFile, - passphrase, - onSuccess, - onFail - ) { - if (typeof port != 'number') { - throw new Error('Port must be number'); - } - - port = Number.parseInt(port); - cordova.exec(onSuccess, onFail, 'Sftp', 'connect-key', [ - host, - port, - username, - keyFile, - passphrase, - ]); - }, - getFile: function (filename, localFilename, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Sftp', 'getfile', [ - filename, - localFilename, - ]); - }, - putFile: function (filename, localFilename, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Sftp', 'putfile', [ - filename, - localFilename, - ]); - }, - close: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Sftp', 'close', []); - }, - isConnected: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Sftp', 'isconnected', []); - }, -}; diff --git a/plugins/cordova-plugin-system/index.d.ts b/plugins/cordova-plugin-system/index.d.ts deleted file mode 100644 index 881ed0ed5..000000000 --- a/plugins/cordova-plugin-system/index.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -interface Info { - versionName: string; - packageName: string; - versionCode: number; -} - -interface AppInfo { - label: String; - packageName: String; - versionCode: Number; - versionName: String; - firstInstallTime: Number; - lastUpdateTime: Number; -} - -interface ShortCut { - id: String; - label: String; - description: String; - icon: String; - action: String; - data: String; -} - -interface System { - /** - * Get informartion about current webview - */ - getWebviewInfo( - onSuccess: (res: Info) => void, - onFail: (err: String) => void, - ): void; - /** - * Checks if power saving mode is on - * @param onSuccess - * @param onFail - */ - isPowerSaveMode( - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Shares file using Apps content provider - * @param fileUri File to share - * @param onSuccess - * @param onFail - */ - shareFile( - fileUri: String, - onSuccess: () => void, - onFail: (err: String) => void, - ): void; - /** - * Gets app infomartion - * @param onSuccess - * @param onFail - */ - getAppInfo( - onSuccess: (info: AppInfo) => void, - onFail: (err: String) => void, - ): void; - /** - * Add shortcut to app context menu - * @param shortCut - * @param onSuccess - * @param onFail - */ - addShortcut( - shortCut: ShortCut, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Removes shortcut - * @param id - * @param onSuccess - * @param onFail - */ - removeShortcut( - id: String, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Pins a shortcut - * @param id - * @param onSuccess - * @param onFail - */ - pinShortcut( - id: String, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Gets android version - * @param onSuccess - * @param onFail - */ - getAndroidVersion( - onSuccess: (res: Number) => void, - onFail: (err: String) => void, - ): void; - /** - * Open settings which lets user change app settings to manage all files - * @param onSuccess - * @param onFail - */ - manageAllFiles(onSuccess: () => void, onFail: (err: String) => void): void; - /** - * Opens settings to allow to grant the app permission manage all files on device - * @param onSuccess - * @param onFail - */ - isExternalStorageManager( - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Requests user to grant the provided permissions - * @param permissions constant value of the permision required @see https://developer.android.com/reference/android/Manifest.permission - * @param onSuccess - * @param onFail - */ - requestPermissions( - permissions: String[], - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Requests user to grant the provided permission - * @param permission constant value of the permision required @see https://developer.android.com/reference/android/Manifest.permission - * @param onSuccess - * @param onFail - */ - requestPermission( - permission: String, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Checks whether the app has provided permission - * @param permission constant value of the permision required @see https://developer.android.com/reference/android/Manifest.permission - * @param onSuccess - * @param onFail - */ - hasPermission( - permission: String, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Opens src in browser - * @param src - */ - openInBrowser(src: String): void; - /** - * Launches and app - * @param app - * @param action - * @param value - * @param onSuccess - * @param onfail - */ - launchApp( - app: String, - action: String, - value: String, - onSuccess: (arg: any) => void, - onfail: (arg: any) => void, - ): void; - - /** - * Opens a link within the app - * @param url Url to open - * @param title Title of the page - * @param showButtons Set to true to show buttons like console, open in browser, etc - */ - inAppBrowser(url: string, title: string, showButtons: boolean): void; - /** - * Sets the color of status bar and navigation bar - * @param theme Color of status bar and navigation bar - * @param type Type of theme foe e.g. light or dark - * @param onSuccess Callback on success - * @param onFail Callback on fail - */ - setUiTheme(theme: string, type: string, onSuccess:()=>void, onFail: (err: String)=>void): void; -} - -declare var system: System; diff --git a/plugins/cordova-plugin-system/package.json b/plugins/cordova-plugin-system/package.json deleted file mode 100644 index d10758925..000000000 --- a/plugins/cordova-plugin-system/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "cordova-plugin-system", - "version": "1.0.3", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC" -} diff --git a/plugins/cordova-plugin-system/plugin.xml b/plugins/cordova-plugin-system/plugin.xml deleted file mode 100644 index fb76ec332..000000000 --- a/plugins/cordova-plugin-system/plugin.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - cordova-plugin-system - Utility methods for Android. - Apache 2.0 - cordova,plugin,system - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/cordova-plugin-system/readme.md b/plugins/cordova-plugin-system/readme.md deleted file mode 100644 index f64b04704..000000000 --- a/plugins/cordova-plugin-system/readme.md +++ /dev/null @@ -1,11 +0,0 @@ -# Utitly plugin for cordova apps. - -Using this plugin, cordova apps can: - -- Enable/disable fullscreen -- Share file -- Get webview information -- Send email -- Clear cache - -## Installation diff --git a/plugins/cordova-plugin-system/src/android/com/foxdebug/system/Base64Icons.java b/plugins/cordova-plugin-system/src/android/com/foxdebug/system/Base64Icons.java deleted file mode 100644 index 94ee2a4ac..000000000 --- a/plugins/cordova-plugin-system/src/android/com/foxdebug/system/Base64Icons.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.foxdebug.system; - -public class Base64Icons { - - static final String BROWSER = - "iVBORw0KGgoAAAANSUhEUgAAABsAAAAbAQMAAAC3GmYWAAAABlBMVEX///////9VfPVsAAAAAnRSTlMT4y5/P2gAAABUSURBVAjXY2BAADkQUX+AgYHx/wcGBubfPxgY2A3nMDDwFZ5jYOApPM7AIP//P5SwePC4AUIYgFkJD6FchBIZkA6wXrApYPPAJjP8fwAk5JFsZgAA+wQmU/03zRYAAAAASUVORK5CYII="; - static final String BROWSER_DARK = - "iVBORw0KGgoAAAANSUhEUgAAABsAAAAbAQMAAAC3GmYWAAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlPdDqW9W20AAABSSURBVAjXY/j///8DBgjxEEQwyD9g+MfA/4DhBws7kDiX/IDhY1/hA4bHfRYPGB4wMECJ4/IyCSiEHJSFUALWAdYLNuUHCzPUZLAd/x/A7QUSADsQQTqX/buZAAAAAElFTkSuQmCC"; - static final String CONSOLE = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAVYDMRO4Nb7cy2o1YrudXAAAAfElEQVQY02NgQAZsjoJQIJLAkHUGDpYx1CA4xxl0EJxDaJwlLlDgBeQYwMxlBnHSyxMQHPYzZggOQ83hBAQHKgXhMNScQOJMPYXgcMZEIjhTj05g3727AMwBSXCdORMA5mR0TGDg7uhoYMZwDhKn5mgoFMQcR/U2SoAgAwCAL1lFSHzHNAAAAABJRU5ErkJggg=="; - static final String CONSOLE_DARK = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAATlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADEoqZZAAAAGXRSTlMAVYDM7kQyC9m7dWgPiEjFcKn05eC6uJ8Wj0P+nQAAAHtJREFUKM990t0OwiAMhuG6IXQtTuf/d/83KiHGJrbsPeQBTloaV9aDay1ElRHElRRhSlMM0x7w0cUdZnLNX3iLSImALsC5BGDigLSLh/7mGUK+4h5BTkj5H+xcTi35gd1ntG4GdVse/Z/X0toMXLugQHIBOhztcBmGfQA6KhNn3QJcawAAAABJRU5ErkJggg=="; - static final String DESKTOP = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMAd5argMxDJRVl4XjMnU8AAABbSURBVBjTY2BABuwTBaFAsoChejccbGeQXmwMBVYbGbwVYBqYtgw2zuyloVAQtZOhC+GFFQwMaWlpmbt3TwNSENUcu3c3wH1uvHu3cQGMA9IA43CAgqOBAQ0AAIO4Nctfo3mWAAAAAElFTkSuQmCC"; - static final String DESKTOP_DARK = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAP1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACzJYIvAAAAFHRSTlMAd5aAqsxEFW0lIPTq3dyyVTwvCWCOBRgAAABiSURBVCjP7cxZDoAgDEXRomgRlfHtf62CQ2Io7sDz1fQmj74tRgnGlv+KjnUhBacFB0UjBhIGjH+QwWCbhA2GeEfHzkQ5zqeAIlx3zK9droGpZbWvwWvbhPSspyawujVj0gEMrgn4/pb/5QAAAABJRU5ErkJggg=="; - static final String OPEN_IN_APP = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAM4HhDiVIV2+dCalj4jEMAAAAe0lEQVQY02NgQAGBglAgysDAeQYOJjDkIDjHGHQQnENonMPGUGAD5ByBGeuDjcMagMQJNkVwWG0OB8A5wWfOmMI4rDZnzgClIBwOpT2nlRrgBuQcQzKNCM7x8nKHnGMs5eU1h8CeC8g5xgr2HCeCMwEcIAscRbjAAYIMACsNY9BBwawqAAAAAElFTkSuQmCC"; - static final String OPEN_IN_APP_DARK = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAPFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQLyYwAAAAE3RSTlMAgDMO3kfnVSomiE0bnqlvXgmbO8RSQQAAAHlJREFUKM+10ksOgCAMRdEn9QMo/rr/vYqhkQQqceKdQHoGDCgaLaZqQSywUgBmVpvR6dA1oa8SIBTRV3BOBzeOtgCZM4tkkLlIBpknKWDzfmVevd/qxwfmIR7/wD7FKAHd9z3C81E2gX0+CkGDMy/DATKGcMgyvHcBbpYR4uDLR8oAAAAASUVORK5CYII="; -} diff --git a/plugins/cordova-plugin-system/src/android/com/foxdebug/system/BrowserDialog.java b/plugins/cordova-plugin-system/src/android/com/foxdebug/system/BrowserDialog.java deleted file mode 100644 index 194eb8a05..000000000 --- a/plugins/cordova-plugin-system/src/android/com/foxdebug/system/BrowserDialog.java +++ /dev/null @@ -1,603 +0,0 @@ -package com.foxdebug.system; - -import android.app.Activity; -import android.app.Dialog; -import android.content.Context; -import android.content.Intent; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.drawable.GradientDrawable; -import android.net.Uri; -import android.os.Build; -import android.text.TextUtils.TruncateAt; -import android.util.Base64; -import android.util.Log; -import android.util.TypedValue; -import android.view.Gravity; -import android.view.KeyEvent; -import android.view.View; -import android.view.ViewGroup; -import android.view.ViewGroup.LayoutParams; -import android.view.Window; -import android.view.WindowManager; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.InputMethodManager; -import android.webkit.ValueCallback; -import android.webkit.WebChromeClient; -import android.webkit.WebSettings; -import android.webkit.WebView; -import android.webkit.WebViewClient; -import android.widget.EditText; -import android.widget.FrameLayout; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.ProgressBar; -import android.widget.TextView; -import com.foxdebug.system.Base64Icons; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaPlugin; - -public class BrowserDialog extends Dialog { - - public int FILE_SELECT_CODE = 1; - public ValueCallback webViewFilePathCallback; - private CallbackContext callbackContext; - private CordovaPlugin plugin; - private Context context; - private WebView webView; - private TextView titleText; - private ImageButton icon; - private boolean desktopMode = false; - private boolean consoleEnabled = false; - private boolean showButtons = true; - private String url = ""; - private String title = "Browser"; - private String themeType = "light"; - private int backgroundColor = 0xFF000000; - private int textColor = 0xFFFFFFFF; - private Bitmap browserIcon; - private TextView urlText; - private int padding = 5; - private int titleHeight = 45; - private int titleTextHeight = 35; - private int fontSize = 5; - private int imageSize = 35; - - public BrowserDialog( - CordovaPlugin plugin, - int bgColor, - String type, - boolean showButtons, - CallbackContext callbackContext - ) { - super(plugin.cordova.getContext(), android.R.style.Theme_NoTitleBar); - this.callbackContext = callbackContext; - this.plugin = plugin; - this.context = plugin.cordova.getContext(); - this.showButtons = showButtons; - this.padding = this.dpToPixels(this.padding); - this.titleHeight = this.dpToPixels(this.titleHeight); - this.imageSize = this.dpToPixels(this.imageSize); - this.titleTextHeight = this.dpToPixels(this.titleTextHeight); - this.fontSize = this.dpToPixels(this.fontSize); - - Log.d("BrowserDialog", "fontSize: 5dp = " + this.fontSize + "px"); - - this.requestWindowFeature(Window.FEATURE_NO_TITLE); - this.setCancelable(true); - this.setTheme(bgColor, type); - this.init(); - } - - public void onBackPressed() { - if (consoleEnabled) { - consoleEnabled = false; - webView.loadUrl( - "javascript:document.dispatchEvent(new CustomEvent('hideconsole'))" - ); - return; - } - - if (webView.canGoBack()) { - icon.setImageBitmap(browserIcon); - webView.goBack(); - url = webView.getOriginalUrl(); - } else { - dismiss(); - } - } - - public void init() { - browserIcon = - convertBase64ToBitmap( - themeType.equals("light") - ? Base64Icons.BROWSER_DARK - : Base64Icons.BROWSER - ); - - //main - LinearLayout main = new LinearLayout(context); - main.setOrientation(LinearLayout.VERTICAL); - main.setFocusable(true); - main.setFocusableInTouchMode(true); - - //title - LinearLayout titleLayout = new LinearLayout(context); - titleLayout.setOrientation(LinearLayout.HORIZONTAL); - titleLayout.setBackgroundColor(backgroundColor); - titleLayout.setLayoutParams( - new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.titleHeight) - ); - titleLayout.setHorizontalGravity(Gravity.LEFT); - titleLayout.setVerticalGravity(Gravity.TOP); - - //stack progressbar on top of icon - //progress bar - ProgressBar progressBar = new ProgressBar( - context, - null, - android.R.attr.progressBarStyle - ); - progressBar.setLayoutParams( - new LinearLayout.LayoutParams(this.imageSize, this.imageSize, 0) - ); - - //icon - icon = createIcon(browserIcon, "Favicon"); - icon.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - //refresh webview - webView.reload(); - } - } - ); - - //stack progressbar on top of icon - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( - LayoutParams.WRAP_CONTENT, - LayoutParams.WRAP_CONTENT - ); - FrameLayout frame = new FrameLayout(context); - params.gravity = Gravity.CENTER_VERTICAL; - frame.setLayoutParams(params); - frame.addView(icon); - frame.addView(progressBar); - - //title text - if (showButtons) { - titleText = createEditText(title); - } else { - titleText = createTextView(title); - } - - //toggle console icon - ImageButton toggleConsoleButton = createIcon( - themeType.equals("light") - ? Base64Icons.CONSOLE_DARK - : Base64Icons.CONSOLE, - "toggle console" - ); - toggleConsoleButton.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - consoleEnabled = !consoleEnabled; - String event = consoleEnabled ? "show" : "hide"; - webView.loadUrl( - "javascript:document.dispatchEvent(new CustomEvent('" + - event + - "console'))" - ); - setActive(toggleConsoleButton, consoleEnabled); - } - } - ); - - //toggle desktopmode icon - ImageButton toggleDesktopModeButton = createIcon( - themeType.equals("light") - ? Base64Icons.DESKTOP_DARK - : Base64Icons.DESKTOP, - "toggle desktop mode" - ); - toggleDesktopModeButton.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - desktopMode = !desktopMode; - setDesktopMode(desktopMode); - setActive(toggleDesktopModeButton, desktopMode); - } - } - ); - - //open in browser icon - ImageButton openInBrowserButton = createIcon( - themeType.equals("light") - ? Base64Icons.OPEN_IN_APP_DARK - : Base64Icons.OPEN_IN_APP, - "open in browser" - ); - openInBrowserButton.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - dismiss(); - Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); - context.startActivity(browserIntent); - if (callbackContext != null) { - callbackContext.success("onOpenExternalBrowser: " + url); - } - } - } - ); - - titleLayout.addView(frame); - titleLayout.addView(titleText); - if (showButtons) { - titleLayout.addView(toggleDesktopModeButton); - titleLayout.addView(openInBrowserButton); - } - - //webview - webView = new WebView(context); - webView.setFocusable(true); - webView.setFocusableInTouchMode(true); - webView.setLayoutParams( - new LinearLayout.LayoutParams( - LayoutParams.MATCH_PARENT, - LayoutParams.MATCH_PARENT - ) - ); - - webView.setWebChromeClient( - new WebChromeClient() { - @Override - public void onReceivedTitle(WebView view, String title) { - super.onReceivedTitle(view, title); - setTitle(title); - } - - @Override - public void onReceivedIcon(WebView view, Bitmap favicon) { - super.onReceivedIcon(view, favicon); - icon.setImageBitmap(favicon); - } - - public boolean onShowFileChooser( - WebView webView, - ValueCallback filePathCallback, - WebChromeClient.FileChooserParams fileChooserParams - ) { - if (webViewFilePathCallback != null) { - webViewFilePathCallback.onReceiveValue(null); - } - - Intent selectDocument = new Intent(Intent.ACTION_GET_CONTENT); - Boolean isMultiple = - ( - fileChooserParams.getMode() == - WebChromeClient.FileChooserParams.MODE_OPEN_MULTIPLE - ); - - webViewFilePathCallback = filePathCallback; - selectDocument.addCategory(Intent.CATEGORY_OPENABLE); - selectDocument.setType("*/*"); - - if (isMultiple) { - selectDocument.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); - } - - plugin.cordova.startActivityForResult( - plugin, - Intent.createChooser(selectDocument, "Select File"), - FILE_SELECT_CODE - ); - - return true; - } - } - ); - - webView.setWebViewClient( - new WebViewClient() { - @Override - public boolean shouldOverrideUrlLoading(WebView view, String url) { - setUrl(url); - icon.setImageBitmap(browserIcon); - // show progress bar - progressBar.setVisibility(View.VISIBLE); - return false; - } - - @Override - public void onPageStarted(WebView view, String url, Bitmap favicon) { - super.onPageStarted(view, url, favicon); - // show progress bar - progressBar.setVisibility(View.VISIBLE); - } - - @Override - public void onPageFinished(WebView view, String url) { - super.onPageFinished(view, url); - // hide progress bar - progressBar.setVisibility(View.GONE); - } - - @Override - public void onLoadResource(WebView view, String url) { - if (!showButtons) return; - setDesktopMode(desktopMode); - webView.evaluateJavascript( - "sessionStorage.getItem('__console_available')", - new ValueCallback() { - @Override - public void onReceiveValue(String value) { - titleLayout.post( - new Runnable() { - @Override - public void run() { - if (!value.equals("null")) { - if ( - toggleConsoleButton.getParent() == null - ) titleLayout.addView(toggleConsoleButton); - return; - } - - titleLayout.removeView(toggleConsoleButton); - } - } - ); - } - } - ); - } - } - ); - - WebSettings settings = webView.getSettings(); - - settings.setJavaScriptEnabled(true); - settings.setDomStorageEnabled(true); - settings.setAllowContentAccess(true); - settings.setDisplayZoomControls(false); - - main.addView(titleLayout); - main.addView(webView); - setContentView(main); - } - - private TextView createTextView(String text) { - TextView textView = new TextView(context); - setTextViewProperties(textView, this.titleHeight); - textView.setText(text); - return textView; - } - - private EditText createEditText(String text) { - EditText editText = new EditText(context); - GradientDrawable background = new GradientDrawable(); - - int radius = this.titleTextHeight / 2; - background.setCornerRadius(radius); - background.setColor(themeType.equals("light") ? 0x11000000 : 0x11ffffff); - editText.setBackground(background); - - setTextViewProperties(editText, this.titleTextHeight); - editText.setText(text); - editText.setPadding(radius, 0, radius, 0); - editText.setTextSize(this.fontSize < 10 ? 10 : this.fontSize); - editText.setInputType(android.text.InputType.TYPE_TEXT_VARIATION_URI); - editText.setImeOptions(EditorInfo.IME_ACTION_GO); - - editText.setOnFocusChangeListener( - new View.OnFocusChangeListener() { - @Override - public void onFocusChange(View v, boolean hasFocus) { - if (hasFocus) { - titleText.setText(url); - } else { - titleText.setText(title); - } - } - } - ); - - editText.setOnEditorActionListener( - new EditText.OnEditorActionListener() { - @Override - public boolean onEditorAction( - TextView v, - int actionId, - android.view.KeyEvent event - ) { - if ( - actionId == EditorInfo.IME_ACTION_GO || - event.getKeyCode() == KeyEvent.KEYCODE_ENTER - ) { - String url = v.getText().toString(); - if (url.startsWith("http://") || url.startsWith("https://")) { - title = url; - setUrl(url); - editText.clearFocus(); - InputMethodManager imm = (InputMethodManager) getContext() - .getSystemService(Context.INPUT_METHOD_SERVICE); - imm.hideSoftInputFromWindow(editText.getWindowToken(), 0); - return true; - } - } - return false; - } - } - ); - - return editText; - } - - private TextView setTextViewProperties(TextView textView, int height) { - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( - LayoutParams.FILL_PARENT, - height, - 1 - ); - params.gravity = Gravity.CENTER_VERTICAL; - textView.setMaxLines(1); - textView.setEllipsize(TruncateAt.END); - textView.setSingleLine(true); - textView.setHorizontallyScrolling(true); - textView.setTextColor(textColor); - textView.setLayoutParams(params); - textView.setGravity(Gravity.CENTER_VERTICAL); - return textView; - } - - private void setTheme(int bgColor, String type) { - try { - if (type != null) themeType = type; - textColor = type.equals("light") ? 0xFF000000 : 0xFFFFFFFF; - backgroundColor = bgColor; - - if (Build.VERSION.SDK_INT >= 21) { - final Window window = getWindow(); - // Method and constants not available on all SDKs but we want to be able to compile this code with any SDK - window.clearFlags(0x04000000); // SDK 19: WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); - window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - try { - // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21 - - window - .getClass() - .getMethod("setNavigationBarColor", int.class) - .invoke(window, backgroundColor); - - window - .getClass() - .getMethod("setStatusBarColor", int.class) - .invoke(window, backgroundColor); - - setStatusBarStyle(window); - setNavigationBarStyle(window); - } catch (IllegalArgumentException ignore) {} catch (Exception ignore) {} - } - } catch (Exception e) {} - } - - private void setStatusBarStyle(final Window window) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - View decorView = window.getDecorView(); - int uiOptions = decorView.getSystemUiVisibility(); - - if (themeType.equals("light")) { - decorView.setSystemUiVisibility( - uiOptions | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR - ); - return; - } - } - } - - private void setNavigationBarStyle(final Window window) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - View decorView = window.getDecorView(); - int uiOptions = decorView.getSystemUiVisibility(); - - // 0x80000000 FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS - // 0x00000010 SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR - - if (themeType.equals("light")) { - decorView.setSystemUiVisibility(uiOptions | 0x80000000 | 0x00000010); - return; - } - } - } - - private void setDesktopMode(boolean enabled) { - final WebSettings webSettings = webView.getSettings(); - - webView.loadUrl( - "javascript:!function(e){var t,n,o;window.innerWidth>=window.innerHeight||(t=1024/innerWidth,(n=document.querySelector(\"meta[name=viewport]\"))||((n=document.createElement(\"meta\")).name=\"viewport\",document.head.appenChild(n)),e?(o=window.innerHeight*t,sessionStorage.setItem(\"__old_viewport_content\",n.content),n.content=\"width=1024, height=\"+o):(o=sessionStorage.__old_viewport_content)&&(n.content=o))}(" + - desktopMode + - ");" - ); - - webSettings.setUseWideViewPort(enabled); - webSettings.setLoadWithOverviewMode(enabled); - webSettings.setSupportZoom(enabled); - webSettings.setBuiltInZoomControls(enabled); - } - - public void setUrl(String url) { - this.url = url; - setTitle(url); - webView.loadUrl(url); - } - - public void setTitle(String title) { - this.title = title; - titleText.setText(title); - } - - @Override - public void dismiss() { - super.dismiss(); - if (webView != null) webView.destroy(); - } - - public void show(String url, String title) { - setUrl(url); - setTitle(title); - super.show(); - } - - private ImageButton createIcon(String icon, String contentDescription) { - return createIcon(convertBase64ToBitmap(icon), contentDescription); - } - - private ImageButton createIcon(Bitmap icon, String contentDescription) { - ImageButton button = new ImageButton(context); - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( - this.imageSize, - this.imageSize, - 0 - ); - params.gravity = Gravity.CENTER_VERTICAL; - params.setMargins(0, 0, this.dpToPixels(2), 0); - button.setBackgroundDrawable(null); - button.setImageBitmap(icon); - button.setContentDescription(contentDescription); - button.setLayoutParams(params); - button.setScaleType(ImageView.ScaleType.FIT_CENTER); - return button; - } - - private Bitmap convertBase64ToBitmap(String icon) { - byte[] decodedIcon = Base64.decode(icon, Base64.DEFAULT); - Bitmap bitmap = BitmapFactory.decodeByteArray( - decodedIcon, - 0, - decodedIcon.length - ); - return bitmap; - } - - private void setActive(View view, boolean active) { - GradientDrawable border = new GradientDrawable(); - border.setCornerRadius(8); - border.setColor(0x00FFFFFF); //white background - border.setStroke(4, 0xFF3399ff); //black border with full opacity - view.setBackground(active ? border : null); - } - - private int dpToPixels(int dipValue) { - int value = (int) TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - (float) dipValue, - this.context.getResources().getDisplayMetrics() - ); - - return value; - } -} diff --git a/plugins/cordova-plugin-system/src/android/com/foxdebug/system/System.java b/plugins/cordova-plugin-system/src/android/com/foxdebug/system/System.java deleted file mode 100644 index 111b7363f..000000000 --- a/plugins/cordova-plugin-system/src/android/com/foxdebug/system/System.java +++ /dev/null @@ -1,737 +0,0 @@ -package com.foxdebug.system; - -import android.app.Activity; -import android.app.PendingIntent; -import android.content.ClipData; -import android.content.Context; -import android.content.Intent; -import android.content.pm.ApplicationInfo; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.content.pm.ShortcutInfo; -import android.content.pm.ShortcutManager; -import android.graphics.Bitmap; -import android.graphics.Color; -import android.graphics.ImageDecoder; -import android.net.Uri; -import android.os.Build; -import android.os.Bundle; -import android.os.Environment; -import android.os.PowerManager; -import android.text.InputType; -import android.view.View; -import android.view.Window; -import android.webkit.WebView; -import androidx.core.content.FileProvider; -import androidx.core.content.pm.ShortcutInfoCompat; -import androidx.core.content.pm.ShortcutManagerCompat; -import androidx.core.graphics.drawable.IconCompat; -import com.foxdebug.system.BrowserDialog; -import java.io.File; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.PluginResult; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public class System extends CordovaPlugin { - - // private WebviewActivity webviewActivity; - private BrowserDialog browserDialog; - private CallbackContext requestPermissionCallback; - private Activity activity; - private Context context; - private int REQ_PERMISSIONS = 1; - private int REQ_PERMISSION = 2; - private int themeColor = 0xFF000000; - private String themeType = "dark"; - private CallbackContext intentHandler; - private CordovaWebView webView; - - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - this.context = cordova.getContext(); - this.activity = cordova.getActivity(); - this.webView = webView; - } - - public boolean execute( - String action, - final JSONArray args, - final CallbackContext callbackContext - ) - throws JSONException { - final String arg1 = getString(args, 0); - final String arg2 = getString(args, 1); - final String arg3 = getString(args, 2); - final String arg4 = getString(args, 3); - final String arg5 = getString(args, 4); - final String arg6 = getString(args, 5); - - switch (action) { - case "get-webkit-info": - case "share-file": - case "is-powersave-mode": - case "get-app-info": - case "add-shortcut": - case "remove-shortcut": - case "pin-shortcut": - case "get-android-version": - case "request-permissions": - case "request-permission": - case "has-permission": - case "open-in-browser": - case "launch-app": - break; - case "set-input-type": - setInputType(arg1); - callbackContext.success(); - return true; - case "set-intent-handler": - setIntentHandler(callbackContext); - return true; - case "set-ui-theme": - this.cordova.getActivity() - .runOnUiThread( - new Runnable() { - public void run() { - setUiTheme(arg1, arg2, callbackContext); - } - } - ); - return true; - case "in-app-browser": - this.cordova.getActivity() - .runOnUiThread( - new Runnable() { - public void run() { - inAppBrowser(arg1, arg2, getBoolean(args, 2), callbackContext); - } - } - ); - return true; - default: - return false; - } - - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - switch (action) { - case "get-webkit-info": - getWebkitInfo(callbackContext); - break; - case "share-file": - shareFile(arg1, arg2, callbackContext); - break; - case "is-powersave-mode": - isPowerSaveMode(callbackContext); - break; - case "get-app-info": - getAppInfo(callbackContext); - break; - case "add-shortcut": - addShortcut( - arg1, - arg2, - arg3, - arg4, - arg5, - arg6, - callbackContext - ); - break; - case "remove-shortcut": - removeShortcut(arg1, callbackContext); - break; - case "pin-shortcut": - pinShortcut(arg1, callbackContext); - break; - case "get-android-version": - getAndroidVersion(callbackContext); - break; - case "request-permissions": - requestPermissions(getJSONArray(args, 0), callbackContext); - break; - case "request-permission": - requestPermission(arg1, callbackContext); - break; - case "has-permission": - hasPermission(arg1, callbackContext); - break; - case "open-in-browser": - openInBrowser(arg1, callbackContext); - break; - case "launch-app": - launchApp(arg1, arg2, arg3, callbackContext); - break; - default: - break; - } - } - } - ); - - return true; - } - - private void requestPermissions(JSONArray arr, CallbackContext callback) { - try { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { - int[] res = new int[arr.length()]; - for (int i = 0; i < res.length; ++i) { - res[i] = 1; - } - callback.success(1); - return; - } - - String[] permissions = checkPermissions(arr); - - if (permissions.length > 0) { - requestPermissionCallback = callback; - cordova.requestPermissions(this, REQ_PERMISSIONS, permissions); - return; - } - callback.success(new JSONArray()); - } catch (Exception e) { - callback.error(e.toString()); - } - } - - private void requestPermission(String permission, CallbackContext callback) { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { - callback.success(1); - return; - } - - if (permission != null || !permission.equals("")) { - if (!cordova.hasPermission(permission)) { - requestPermissionCallback = callback; - cordova.requestPermission(this, REQ_PERMISSION, permission); - return; - } - - callback.success(1); - } - - callback.error("No permission passed to request."); - } - - private void hasPermission(String permission, CallbackContext callback) { - if (permission != null || !permission.equals("")) { - int res = 0; - if (cordova.hasPermission(permission)) { - res = 1; - } - - callback.success(res); - return; - } - callback.error("No permission passed to check."); - } - - public void onRequestPermissionResult( - int code, - String[] permissions, - int[] resCodes - ) { - if (requestPermissionCallback == null) return; - - if (code == REQ_PERMISSIONS) { - JSONArray resAr = new JSONArray(); - for (int res : resCodes) { - if (res == PackageManager.PERMISSION_DENIED) { - resAr.put(0); - } - resAr.put(1); - } - - requestPermissionCallback.success(resAr); - requestPermissionCallback = null; - return; - } - - if ( - resCodes.length >= 1 && resCodes[0] == PackageManager.PERMISSION_DENIED - ) { - requestPermissionCallback.success(0); - requestPermissionCallback = null; - return; - } - requestPermissionCallback.success(1); - requestPermissionCallback = null; - return; - } - - private String[] checkPermissions(JSONArray arr) throws Exception { - List list = new ArrayList(); - for (int i = 0; i < arr.length(); i++) { - try { - String permission = arr.getString(i); - if (permission != null || !permission.equals("")) { - throw new Exception("Permission cannot be null or empty"); - } - if (!cordova.hasPermission(permission)) { - list.add(permission); - } - } catch (JSONException e) {} - } - - String[] res = new String[list.size()]; - return list.toArray(res); - } - - private void getAndroidVersion(CallbackContext callback) { - callback.success(Build.VERSION.SDK_INT); - } - - private void getWebkitInfo(CallbackContext callback) { - PackageInfo info = null; - JSONObject res = new JSONObject(); - - try { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - info = WebView.getCurrentWebViewPackage(); - } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - Class webViewFactory = Class.forName("android.webkit.WebViewFactory"); - Method method = webViewFactory.getMethod("getLoadedPackageInfo"); - info = (PackageInfo) method.invoke(null); - } else { - PackageManager packageManager = activity.getPackageManager(); - - try { - info = packageManager.getPackageInfo("com.google.android.webview", 0); - } catch (PackageManager.NameNotFoundException e) { - callback.error("Package not found"); - } - - return; - } - - res.put("packageName", info.packageName); - res.put("versionName", info.versionName); - res.put("versionCode", info.versionCode); - - callback.success(res); - } catch ( - JSONException - | InvocationTargetException - | ClassNotFoundException - | NoSuchMethodException - | IllegalAccessException e - ) { - callback.error( - "Cannot determine current WebView engine. (" + e.getMessage() + ")" - ); - - return; - } - } - - private void isPowerSaveMode(CallbackContext callback) { - PowerManager powerManager = (PowerManager) context.getSystemService( - Context.POWER_SERVICE - ); - boolean powerSaveMode = powerManager.isPowerSaveMode(); - - callback.success(powerSaveMode ? 1 : 0); - } - - private void shareFile( - String fileURI, - String filename, - CallbackContext callback - ) { - Activity activity = this.activity; - Context context = this.context; - Uri uri = this.getContentProviderUri(fileURI); - try { - Intent intent = new Intent(Intent.ACTION_SEND); - intent.putExtra(Intent.EXTRA_STREAM, uri); - if (!filename.equals("")) intent.putExtra(Intent.EXTRA_TEXT, filename); - intent.setType("application/octet-stream"); - activity.startActivity(intent); - callback.success(uri.toString()); - } catch (Exception e) { - callback.error(e.getMessage()); - } - } - - private void getAppInfo(CallbackContext callback) { - JSONObject res = new JSONObject(); - try { - PackageManager pm = activity.getPackageManager(); - PackageInfo pInfo = pm.getPackageInfo(context.getPackageName(), 0); - ApplicationInfo appInfo = context.getApplicationInfo(); - - res.put("firstInstallTime", pInfo.firstInstallTime); - res.put("lastUpdateTime", pInfo.lastUpdateTime); - res.put("label", appInfo.loadLabel(pm).toString()); - res.put("packageName", pInfo.packageName); - res.put("versionName", pInfo.versionName); - res.put("versionCode", pInfo.getLongVersionCode()); - - callback.success(res); - } catch (JSONException e) { - callback.error(e.getMessage()); - } catch (Exception e) { - callback.error(e.getMessage()); - } - } - - private void openInBrowser(String src, CallbackContext callback) { - Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(src)); - activity.startActivity(browserIntent); - } - - private void launchApp( - String appId, - String action, - String value, - CallbackContext callback - ) { - Intent intent = context - .getPackageManager() - .getLaunchIntentForPackage(appId); - if (intent == null) { - callback.error("App not found"); - return; - } - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - context.startActivity(intent); - callback.success("Launched " + appId); - } - - private void inAppBrowser( - String url, - String title, - boolean showButtons, - CallbackContext callback - ) { - BrowserDialog browserDialog = new BrowserDialog( - this, - themeColor, - themeType, - showButtons, - callback - ); - browserDialog.show(url, title); - this.browserDialog = browserDialog; - } - - public void onActivityResult(int requestCode, int resultCode, Intent intent) { - if ( - requestCode != browserDialog.FILE_SELECT_CODE || - browserDialog.webViewFilePathCallback == null - ) { - super.onActivityResult(requestCode, resultCode, intent); - return; - } - ArrayList uris = new ArrayList(); - ClipData clipData = intent.getClipData(); - if (clipData != null) { - for (int i = 0; i < clipData.getItemCount(); i++) { - ClipData.Item item = clipData.getItemAt(i); - Uri uri = item.getUri(); - uris.add(uri); - } - } else { - Uri uri = intent.getData(); - uris.add(uri); - } - - browserDialog.webViewFilePathCallback.onReceiveValue( - uris.toArray(new Uri[uris.size()]) - ); - browserDialog.webViewFilePathCallback = null; - } - - private void addShortcut( - String id, - String label, - String description, - String iconSrc, - String action, - String data, - CallbackContext callback - ) { - try { - Intent intent; - ImageDecoder.Source imgSrc; - Bitmap bitmap; - IconCompat icon; - - imgSrc = - ImageDecoder.createSource( - context.getContentResolver(), - Uri.parse(iconSrc) - ); - bitmap = ImageDecoder.decodeBitmap(imgSrc); - icon = IconCompat.createWithBitmap(bitmap); - intent = - activity - .getPackageManager() - .getLaunchIntentForPackage(activity.getPackageName()); - intent.putExtra("action", action); - intent.putExtra("data", data); - - ShortcutInfoCompat shortcut = new ShortcutInfoCompat.Builder(context, id) - .setShortLabel(label) - .setLongLabel(description) - .setIcon(icon) - .setIntent(intent) - .build(); - - ShortcutManagerCompat.pushDynamicShortcut(context, shortcut); - callback.success(); - } catch (Exception e) { - callback.error(e.toString()); - } - } - - private void pinShortcut(String id, CallbackContext callback) { - ShortcutManager shortcutManager = context.getSystemService( - ShortcutManager.class - ); - - if (shortcutManager.isRequestPinShortcutSupported()) { - ShortcutInfo pinShortcutInfo = new ShortcutInfo.Builder(context, id) - .build(); - - Intent pinnedShortcutCallbackIntent = shortcutManager.createShortcutResultIntent( - pinShortcutInfo - ); - - PendingIntent successCallback = PendingIntent.getBroadcast( - context, - 0, - pinnedShortcutCallbackIntent, - 0 - ); - - shortcutManager.requestPinShortcut( - pinShortcutInfo, - successCallback.getIntentSender() - ); - - callback.success(); - } - - callback.error("Not suppported"); - } - - private void removeShortcut(String id, CallbackContext callback) { - try { - List list = new ArrayList(); - list.add(id); - ShortcutManagerCompat.removeDynamicShortcuts(context, list); - callback.success(); - } catch (Exception e) { - callback.error(e.toString()); - } - } - - private void setUiTheme( - final String color, - final String type, - final CallbackContext callback - ) { - if (Build.VERSION.SDK_INT >= 21) { - final int bgColor = Color.parseColor(color); - final Window window = activity.getWindow(); - themeColor = bgColor; - themeType = type.toLowerCase(); - // Method and constants not available on all SDKs but we want to be able to compile this code with any SDK - window.clearFlags(0x04000000); // SDK 19: WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); - window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - try { - // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21 - - window - .getClass() - .getMethod("setNavigationBarColor", int.class) - .invoke(window, themeColor); - - window - .getClass() - .getMethod("setStatusBarColor", int.class) - .invoke(window, themeColor); - - setStatusBarStyle(window); - setNavigationBarStyle(window); - } catch (IllegalArgumentException ignore) {} catch (Exception ignore) {} - } - } - - private void setStatusBarStyle(final Window window) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - View decorView = window.getDecorView(); - int uiOptions = decorView.getSystemUiVisibility(); - - if (themeType.equals("light")) { - decorView.setSystemUiVisibility( - uiOptions | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR - ); - return; - } - decorView.setSystemUiVisibility( - uiOptions & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR - ); - } - } - - private void setNavigationBarStyle(final Window window) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - View decorView = window.getDecorView(); - int uiOptions = decorView.getSystemUiVisibility(); - - // 0x80000000 FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS - // 0x00000010 SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR - - if (themeType.equals("light")) { - decorView.setSystemUiVisibility(uiOptions | 0x80000000 | 0x00000010); - return; - } - decorView.setSystemUiVisibility(uiOptions | 0x80000000 & ~0x00000010); - } - } - - private void setIntentHandler(CallbackContext callbackContext) { - intentHandler = callbackContext; - } - - @Override - public void onNewIntent(Intent intent) { - if (intentHandler != null) { - PluginResult result = new PluginResult( - PluginResult.Status.OK, - getIntentJson(intent) - ); - result.setKeepCallback(true); - intentHandler.sendPluginResult(result); - } - } - - private JSONObject getIntentJson(Intent intent) { - JSONObject json = new JSONObject(); - try { - json.put("action", intent.getAction()); - json.put("data", intent.getDataString()); - json.put("type", intent.getType()); - json.put("package", intent.getPackage()); - json.put("extras", getExtrasJson(intent.getExtras())); - } catch (JSONException e) { - e.printStackTrace(); - } - return json; - } - - private JSONObject getExtrasJson(Bundle extras) { - JSONObject json = new JSONObject(); - if (extras != null) { - for (String key : extras.keySet()) { - try { - Object value = extras.get(key); - if (value instanceof String) { - json.put(key, (String) value); - } else if (value instanceof Integer) { - json.put(key, (Integer) value); - } else if (value instanceof Long) { - json.put(key, (Long) value); - } else if (value instanceof Double) { - json.put(key, (Double) value); - } else if (value instanceof Float) { - json.put(key, (Float) value); - } else if (value instanceof Boolean) { - json.put(key, (Boolean) value); - } else if (value instanceof Bundle) { - json.put(key, getExtrasJson((Bundle) value)); - } else { - json.put(key, value.toString()); - } - } catch (JSONException e) { - e.printStackTrace(); - } - } - } - return json; - } - - private Uri getContentProviderUri(String fileUri) { - Uri uri = Uri.parse(fileUri); - String Id = context.getPackageName(); - if (fileUri.matches("file:///(.*)")) { - File file = new File(uri.getPath()); - uri = FileProvider.getUriForFile(context, Id + ".provider", file); - } - return uri; - } - - private boolean isPackageInstalled( - String packageName, - PackageManager packageManager, - CallbackContext callback - ) { - try { - packageManager.getPackageInfo(packageName, 0); - return true; - } catch (PackageManager.NameNotFoundException e) { - return false; - } - } - - private void setInputType(String type) { - if (type.equals("CODE")) { - webView.setInputType( - InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | - InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD - ); - } else { - webView.setInputType( - InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL - ); - } - } - - private String getString(JSONArray ar, int index) { - try { - return ar.getString(index); - } catch (JSONException e) { - return null; - } - } - - private boolean getBoolean(JSONArray ar, int index) { - try { - return ar.getBoolean(index); - } catch (JSONException e) { - return false; - } - } - - private int getInt(JSONArray ar, int index) { - try { - return ar.getInt(index); - } catch (JSONException e) { - return 0; - } - } - - private JSONArray getJSONArray(JSONArray ar, int index) { - try { - return ar.getJSONArray(index); - } catch (JSONException e) { - return null; - } - } -} diff --git a/plugins/cordova-plugin-system/utils/changeProvider.js b/plugins/cordova-plugin-system/utils/changeProvider.js deleted file mode 100644 index f5bc4a367..000000000 --- a/plugins/cordova-plugin-system/utils/changeProvider.js +++ /dev/null @@ -1,36 +0,0 @@ -module.exports = { - changeProvider(reset) { - const fs = require('fs'); - const path = require('path'); - - - const androidManifest = path.resolve(__dirname, "../../../platforms/android/app/src/main/AndroidManifest.xml"); - const repeatChar = (char, times) => { - let res = ""; - while (--times >= 0) res += char; - return res; - }; - - try { - const fileData = fs.readFileSync(androidManifest, "utf-8"); - const ID = reset ? "com.foxdebug" : /package="([0-9a-zA-Z\.\-_]*)"/.exec(fileData)[1]; - const newFileData = fileData.replace( - /(android:authorities=")([0-9a-zA-Z\.\-_]*)(")/, - `$1${reset?"com.foxdebug":ID}.provider$3` - ); - fs.writeFileSync(androidManifest, newFileData); - - const msg = "==== Changed provider to " + ID + ".provider ===="; - - console.log(""); - console.log(repeatChar("=", msg.length)); - console.log(msg); - console.log(repeatChar("=", msg.length)); - console.log(""); - - } catch (error) { - console.error(error); - process.exit(1); - } - } -}; \ No newline at end of file diff --git a/plugins/cordova-plugin-system/utils/fixProvider.js b/plugins/cordova-plugin-system/utils/fixProvider.js deleted file mode 100644 index 6a1111fda..000000000 --- a/plugins/cordova-plugin-system/utils/fixProvider.js +++ /dev/null @@ -1,5 +0,0 @@ -const { - changeProvider -} = require("./changeProvider"); - -changeProvider(); \ No newline at end of file diff --git a/plugins/cordova-plugin-system/utils/resetProvider.js b/plugins/cordova-plugin-system/utils/resetProvider.js deleted file mode 100644 index afbf149dc..000000000 --- a/plugins/cordova-plugin-system/utils/resetProvider.js +++ /dev/null @@ -1,5 +0,0 @@ -const { - changeProvider -} = require("./changeProvider"); - -changeProvider(true); \ No newline at end of file diff --git a/plugins/cordova-plugin-system/www/plugin.js b/plugins/cordova-plugin-system/www/plugin.js deleted file mode 100644 index 773678e15..000000000 --- a/plugins/cordova-plugin-system/www/plugin.js +++ /dev/null @@ -1,91 +0,0 @@ -module.exports = { - getWebviewInfo: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'get-webkit-info', []); - }, - isPowerSaveMode: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'is-powersave-mode', []); - }, - shareFile: function (fileUri, filename, onSuccess, onFail) { - if (typeof filename === 'function') { - onSuccess = filename; - onFail = onSuccess; - filename = ''; - } - - if (!filename) filename = ''; - cordova.exec(onSuccess, onFail, 'System', 'share-file', [fileUri, filename]); - }, - getAppInfo: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'get-app-info', []); - }, - addShortcut: function (shortcut, onSuccess, onFail) { - var id, label, description, icon, data; - id = shortcut.id; - label = shortcut.label; - description = shortcut.description; - icon = shortcut.icon; - data = shortcut.data; - action = shortcut.action; - cordova.exec(onSuccess, onFail, 'System', 'add-shortcut', [id, label, description, icon, action, data]); - }, - removeShortcut: function (id, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'remove-shortcut', [id]); - }, - pinShortcut: function (id, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'pin-shortcut', [id]); - }, - manageAllFiles: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'manage-all-files', []); - }, - getAndroidVersion: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'get-android-version', []); - }, - isExternalStorageManager: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'is-external-storage-manager', []); - }, - requestPermission: function (permission, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'request-permission', [permission]); - }, - requestPermissions: function (permissions, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'request-permissions', [permissions]); - }, - hasPermission: function (permission, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'has-permission', [permission]); - }, - openInBrowser: function (src) { - cordova.exec(null, null, 'System', 'open-in-browser', [src]); - }, - launchApp: function (app, action, value, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'launch-app', [app, action, value]); - }, - inAppBrowser: function (url, title, showButtons) { - var myInAppBrowser = { - onOpenExternalBrowser: null, - onError: null, - }; - - cordova.exec(function (data) { - try { - var dataTag = data.split(':')[0]; - var dataUrl = data.split(':')[1]; - if (dataTag === 'onOpenExternalBrowser') { - myInAppBrowser.onOpenExternalBrowser(dataUrl); - } - } catch (error) { } - }, function (err) { - try { - onError(err); - } catch (error) { } - }, 'System', 'in-app-browser', [url, title, !!showButtons]); - return myInAppBrowser; - }, - setUiTheme: function (theme, type, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'set-ui-theme', [theme, type]); - }, - setIntentHandler: function (handler, onerror) { - cordova.exec(handler, onerror, 'System', 'set-intent-handler', []); - }, - setInputType: function (type, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'set-input-type', [type]); - } -}; \ No newline at end of file diff --git a/plugins/cordova-plugin-vibration/.appveyor.yml b/plugins/cordova-plugin-vibration/.appveyor.yml deleted file mode 100644 index 037f53ed2..000000000 --- a/plugins/cordova-plugin-vibration/.appveyor.yml +++ /dev/null @@ -1,28 +0,0 @@ -# appveyor file -# http://www.appveyor.com/docs/appveyor-yml - -max_jobs: 1 - -shallow_clone: true - -init: - - git config --global core.autocrlf true - -image: - - Visual Studio 2017 - -environment: - nodejs_version: "4" - matrix: - - PLATFORM: windows-10-store - JUST_BUILD: --justBuild -install: - - npm cache clean -f - - node --version - - npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git - - npm install -g cordova - -build: off - -test_script: - - cordova-paramedic --config pr\%PLATFORM% --plugin . %JUST_BUILD% diff --git a/plugins/cordova-plugin-vibration/.eslintrc.yml b/plugins/cordova-plugin-vibration/.eslintrc.yml deleted file mode 100644 index 3f627c09c..000000000 --- a/plugins/cordova-plugin-vibration/.eslintrc.yml +++ /dev/null @@ -1,10 +0,0 @@ -root: true -extends: semistandard -rules: - indent: - - error - - 4 - camelcase: off - padded-blocks: off - operator-linebreak: off - no-throw-literal: off \ No newline at end of file diff --git a/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE.md b/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 3220c258b..000000000 --- a/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,42 +0,0 @@ - - -### Issue Type - - -- [ ] Bug Report -- [ ] Feature Request -- [ ] Support Question - -## Description - -## Information - - -### Command or Code - - -### Environment, Platform, Device - - - - -### Version information - - - - -## Checklist - - -- [ ] I searched for already existing GitHub issues about this -- [ ] I updated all Cordova tooling to their most recent version -- [ ] I included all the necessary information above diff --git a/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE/BUG_REPORT.md deleted file mode 100644 index bd8a3acb3..000000000 --- a/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -name: 🐛 Bug Report -about: If something isn't working as expected. - ---- - -# Bug Report - -## Problem - -### What is expected to happen? - - - -### What does actually happen? - - - -## Information - - - - -### Command or Code - - - - -### Environment, Platform, Device - - - - -### Version information - - - - -## Checklist - - -- [ ] I searched for existing GitHub issues -- [ ] I updated all Cordova tooling to most recent version -- [ ] I included all the necessary information above diff --git a/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md deleted file mode 100644 index 381fc8a3b..000000000 --- a/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: 🚀 Feature Request -about: A suggestion for a new functionality - ---- - -# Feature Request - -## Motivation Behind Feature - - - - -## Feature Description - - - - -## Alternatives or Workarounds - - - diff --git a/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md b/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md deleted file mode 100644 index 516c6e6b9..000000000 --- a/plugins/cordova-plugin-vibration/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: 💬 Support Question -about: If you have a question, please check out our Slack or StackOverflow! - ---- - - - -Apache Cordova uses GitHub Issues as a feature request and bug tracker _only_. -For usage and support questions, please check out the resources below. Thanks! - ---- - -You can get answers to your usage and support questions about **Apache Cordova** on: - -* Slack Community Chat: https://cordova.slack.com (you can sign-up at http://slack.cordova.io/) -* StackOverflow: https://stackoverflow.com/questions/tagged/cordova using the tag `cordova` - ---- - -If you are using a tool that uses Cordova internally, like e.g. Ionic, check their support channels: - -* **Ionic Framework** - * [Ionic Community Forum](https://forum.ionicframework.com/) - * [Ionic Worldwide Slack](https://ionicworldwide.herokuapp.com/) -* **PhoneGap** - * [PhoneGap Developer Community](https://forums.adobe.com/community/phonegap) diff --git a/plugins/cordova-plugin-vibration/.github/PULL_REQUEST_TEMPLATE.md b/plugins/cordova-plugin-vibration/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 712b2ff04..000000000 --- a/plugins/cordova-plugin-vibration/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,35 +0,0 @@ - - -### Platforms affected - - - -### Motivation and Context - - - - - -### Description - - - - -### Testing - - - - -### Checklist - -- [ ] I've run the tests to see all new and existing tests pass -- [ ] I added automated test coverage as appropriate for this change -- [ ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`) -- [ ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/)) -- [ ] I've updated the documentation if necessary diff --git a/plugins/cordova-plugin-vibration/.ratignore b/plugins/cordova-plugin-vibration/.ratignore deleted file mode 100644 index 6576da94f..000000000 --- a/plugins/cordova-plugin-vibration/.ratignore +++ /dev/null @@ -1,2 +0,0 @@ -tokenizer.cpp -tokenizer.h diff --git a/plugins/cordova-plugin-vibration/.travis.yml b/plugins/cordova-plugin-vibration/.travis.yml deleted file mode 100644 index 9a4a336ad..000000000 --- a/plugins/cordova-plugin-vibration/.travis.yml +++ /dev/null @@ -1,115 +0,0 @@ -sudo: false - -addons: - jwt: - # sauce labs key - secure: jVSvu9mlFqqifMcAQpEg+rWYDG43wzTovyptz097PQk/JXGX7TKd90aBWyE3ef/Qbjq+OV7PDxSRTUQwuMXhE9+FUYQs6PiW62CmDMwumForaV2NVbmoTREl1gQIgenx++bdWSN+V5ebh6iLj58ZUxZeSAZBsfM6a+G++w5QptU= - -env: - global: - - SAUCE_USERNAME=snay - - TRAVIS_NODE_VERSION=6 - - ANDROID_API_LEVEL=28 - - ANDROID_BUILD_TOOLS_VERSION=28.0.3 - -language: node_js -node_js: 6 - -# yaml anchor/alias: https://medium.com/@tommyvn/travis-yml-dry-with-anchors-8b6a3ac1b027 - -_ios: &_ios - os: osx - osx_image: xcode10.2 - -_android: &_android - language: android - os: linux - jdk: oraclejdk8 - android: - components: - - tools - - build-tools-$ANDROID_BUILD_TOOLS_VERSION - - android-$ANDROID_API_LEVEL - licenses: - - 'android-sdk-preview-license-.+' - - 'android-sdk-license-.+' - - 'google-gdk-license-.+' - -matrix: - include: - # local tests, without saucelabs - - env: PLATFORM=local/browser - <<: *_ios - - env: PLATFORM=local/ios-10.0 - <<: *_ios - - # many tests with saucelabs - - env: PLATFORM=browser-chrome - - env: PLATFORM=browser-firefox - - env: PLATFORM=browser-safari - - env: PLATFORM=browser-edge - - - env: PLATFORM=ios-11.3 - <<: *_ios - - env: PLATFORM=ios-12.0 - <<: *_ios - - env: PLATFORM=ios-12.2 - <<: *_ios - - - env: PLATFORM=android-4.4 - <<: *_android - - env: PLATFORM=android-5.1 - <<: *_android - - env: PLATFORM=android-6.0 - <<: *_android - - env: PLATFORM=android-7.0 - <<: *_android - - env: PLATFORM=android-7.1 - <<: *_android - - env: PLATFORM=android-8.0 - <<: *_android - - env: PLATFORM=android-8.1 - <<: *_android - -before_install: - # manually install Node for `language: android` - - if [[ "$PLATFORM" =~ android ]]; then nvm install $TRAVIS_NODE_VERSION; fi - - node --version - - if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi - - if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi - - npm install -g cordova - # install paramedic if not running on paramedic repo - - if ! [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then npm install -g github:apache/cordova-paramedic; fi - -install: - - npm install - -before_script: - - | - if [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then - # when used in the cordova-paramedic repo - TEST_COMMAND="npm run eslint" - PARAMEDIC_PLUGIN_TO_TEST="./spec/testable-plugin/" - PARAMEDIC_COMMAND="node main.js" - else - # when used in any other (plugin) repo - TEST_COMMAND="npm test" - PARAMEDIC_PLUGIN_TO_TEST=$(pwd) - PARAMEDIC_COMMAND="cordova-paramedic" - fi - - PARAMEDIC_BUILDNAME=travis-$TRAVIS_REPO_SLUG-$TRAVIS_JOB_NUMBER - - | - echo "Variables now are set to:" - echo "TEST_COMMAND=$TEST_COMMAND" - echo "ADDITIONAL_TESTS=$ADDITIONAL_TESTS" - echo "PARAMEDIC_COMMAND=$PARAMEDIC_COMMAND" - echo "PLATFORM=$PLATFORM" - echo "PARAMEDIC_PLUGIN_TO_TEST=$PARAMEDIC_PLUGIN_TO_TEST" - echo "PARAMEDIC_BUILDNAME=$PARAMEDIC_BUILDNAME" -script: - - $TEST_COMMAND - - if [[ "$ADDITIONAL_TESTS_DIR" != "" ]]; then - cd $ADDITIONAL_TESTS_DIR && npm install && npm test; - else - $PARAMEDIC_COMMAND --config ./pr/$PLATFORM --plugin $PARAMEDIC_PLUGIN_TO_TEST --buildName $PARAMEDIC_BUILDNAME; - fi diff --git a/plugins/cordova-plugin-vibration/CONTRIBUTING.md b/plugins/cordova-plugin-vibration/CONTRIBUTING.md deleted file mode 100644 index 7e35dd3c7..000000000 --- a/plugins/cordova-plugin-vibration/CONTRIBUTING.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# Contributing to Apache Cordova - -Anyone can contribute to Cordova. And we need your contributions. - -There are multiple ways to contribute: report bugs, improve the docs, and -contribute code. - -For instructions on this, start with the -[contribution overview](http://cordova.apache.org/contribute/). - -The details are explained there, but the important items are: - - Sign and submit an Apache ICLA (Contributor License Agreement). - - Have a Jira issue open that corresponds to your contribution. - - Run the tests so your patch doesn't break existing functionality. - -We look forward to your contributions! diff --git a/plugins/cordova-plugin-vibration/LICENSE b/plugins/cordova-plugin-vibration/LICENSE deleted file mode 100644 index 9b5e4019d..000000000 --- a/plugins/cordova-plugin-vibration/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-vibration/NOTICE b/plugins/cordova-plugin-vibration/NOTICE deleted file mode 100644 index 39ab49c5b..000000000 --- a/plugins/cordova-plugin-vibration/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -Apache Cordova -Copyright 2012 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -This product includes software developed by Joerg Wiedenmann under the zlib license (http://www.gzip.org/zlib/zlib_license.html) diff --git a/plugins/cordova-plugin-vibration/README.md b/plugins/cordova-plugin-vibration/README.md deleted file mode 100644 index ac79b5a7c..000000000 --- a/plugins/cordova-plugin-vibration/README.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: Vibration -description: Vibrate the device. ---- - - -|AppVeyor|Travis CI| -|:-:|:-:| -|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-vibration?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-vibration)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-vibration.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-vibration)| - -# cordova-plugin-vibration - -This plugin aligns with the W3C vibration specification http://www.w3.org/TR/vibration/ - -This plugin provides a way to vibrate the device. - -This plugin defines global objects including `navigator.vibrate`. - -Although in the global scope, they are not available until after the `deviceready` event. -```javascript -document.addEventListener("deviceready", onDeviceReady, false); -function onDeviceReady() { - console.log(navigator.vibrate); -} -``` -## Installation -```console -cordova plugin add cordova-plugin-vibration -``` - -## Supported Platforms - -navigator.vibrate - -- Android -- iOS -- Windows - - -The Android webview (API level 19 and up) supports the [W3C Vibration API](https://www.w3.org/TR/vibration/) natively and therefore, the Android specific implementation of this plugin has been dropped. - -## vibrate - -This function has three different functionalities based on parameters passed to it. - -### Standard vibrate - -Vibrates the device for a given amount of time. - -```javascript -navigator.vibrate(time) -``` -or -```javascript -navigator.vibrate([time]) -``` - --__time__: Milliseconds to vibrate the device. _(Number)_ - -#### Example -```javascript -// Vibrate for 3 seconds -navigator.vibrate(3000); - -// Vibrate for 3 seconds -navigator.vibrate([3000]); -``` -### Android Quirks - -Calls to `navigator.vibrate` will immediately return `false` if user hasn't tapped on the frame or any embedded frame yet. Please checkout https://issues.apache.org/jira/browse/CB-14022 for more information. - - -#### iOS Quirks - -- __time__: Ignores the specified time and vibrates for a pre-set amount of time. -```javascript -navigator.vibrate(3000); // 3000 is ignored -``` -#### Windows Quirks - -- __time__: Max time is 5000ms (5s) and min time is 1ms - -```javascript -navigator.vibrate(8000); // will be truncated to 5000 -``` - -### Vibrate with a pattern (Android and Windows only) -Vibrates the device with a given pattern -```javascript -navigator.vibrate(pattern); -``` -- __pattern__: Sequence of durations (in milliseconds) for which to turn on or off the vibrator. _(Array of Numbers)_ - -#### Example - -```javascript -// Vibrate for 1 second -// Wait for 1 second -// Vibrate for 3 seconds -// Wait for 1 second -// Vibrate for 5 seconds -navigator.vibrate([1000, 1000, 3000, 1000, 5000]); -``` - -### Cancel vibration (not supported in iOS) - -Immediately cancels any currently running vibration. -```javascript -navigator.vibrate(0) -``` -or -```javascript -navigator.vibrate([]) -``` -or -```javascript -navigator.vibrate([0]) -``` -Passing in a parameter of 0, an empty array, or an array with one element of value 0 will cancel any vibrations. diff --git a/plugins/cordova-plugin-vibration/RELEASENOTES.md b/plugins/cordova-plugin-vibration/RELEASENOTES.md deleted file mode 100644 index 55c449363..000000000 --- a/plugins/cordova-plugin-vibration/RELEASENOTES.md +++ /dev/null @@ -1,198 +0,0 @@ - -# Release Notes - -### 3.1.1 (May 16, 2019) -* Update CI configuration and README ([#80](https://github.com/apache/cordova-plugin-vibration/pull/80), [#77](https://github.com/apache/cordova-plugin-vibration/pull/77), [#69](https://github.com/apache/cordova-plugin-vibration/pull/69), [#68](https://github.com/apache/cordova-plugin-vibration/pull/68)) -* fix(typescript): update types ([#75](https://github.com/apache/cordova-plugin-vibration/pull/75), [#78](https://github.com/apache/cordova-plugin-vibration/pull/78)) -* Add or update GitHub pull request and issue template - -### 3.1.0 (Apr 12, 2018) -* [CB-14022](https://issues.apache.org/jira/browse/CB-14022) documented **Android** quirk with vibration -* [CB-13892](https://issues.apache.org/jira/browse/CB-13892) (all) Remove `navigator.notification` - -### 3.0.1 (Dec 27, 2017) -* [CB-13711](https://issues.apache.org/jira/browse/CB-13711) Fix to allow 3.0.0 version install (#63) - -### 3.0.0 (Dec 15, 2017) -* [CB-13666](https://issues.apache.org/jira/browse/CB-13666) : Removed deprecated platforms -* Removed deprecated components and bumped version -* [CB-13045](https://issues.apache.org/jira/browse/CB-13045) Removed **Android** implementation and Updated `README` - -### 2.1.6 (Nov 06, 2017) -* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) added `eslint` and removed `jshint` -* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. - -### 2.1.5 (Apr 27, 2017) -* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` -* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder - -### 2.1.4 (Feb 28, 2017) -* fix `vibrateWithPattern`, function doesn't update the pattern variable reference -* [CB-12369](https://issues.apache.org/jira/browse/CB-12369) Add plugin typings from `DefinitelyTyped` -* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** -* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges - -### 2.1.3 (Dec 07, 2016) -* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 2.1.3 -* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" -* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. - -### 2.1.2 (Sep 08, 2016) -* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies -* add JIRA issue tracker link -* Add badges for paramedic builds on Jenkins -* Add pull request template. -* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md - -### 2.1.1 (Apr 15, 2016) -* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins - -### 2.1.0 (Jan 15, 2016) -* [CB-9365](https://issues.apache.org/jira/browse/CB-9365) Add support for 'vibrateWithPattern' to **Windows Phone 8.1 / Windows 10** - -### 2.0.0 (Nov 18, 2015) -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest -* Fixing contribute link. -* Fixed **browser** platform to pass tests and combined tests -* Removed call to add `proxy` and renamed **browser** file -* [CB-7966](https://issues.apache.org/jira/browse/CB-7966) Add cordova-plugin-vibration support for **browser** platform -* [CB-9166](https://issues.apache.org/jira/browse/CB-9166): Changed `plugin.xml` framework reference condition to be valid XML. - -### 1.2.0 (Jun 17, 2015) -* Adding .ratignore file. -* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-vibration documentation translation: cordova-plugin-vibration -* fix npm md issue -* used min/max statics in vibrate with pattern. Use callbackId in callbacks, catch json format exceptions -* static-ized MIN_DURATION and MAX_DURATION -* [CB-7216](https://issues.apache.org/jira/browse/CB-7216) changed cancelWasCalled boolean -* [CB-7218](https://issues.apache.org/jira/browse/CB-7218) truncate vibration to 5 secs for WP8 -* [CB-6916](https://issues.apache.org/jira/browse/CB-6916) added vibrateWithPattern for wp8 -* [CB-6914](https://issues.apache.org/jira/browse/CB-6914) added cancelVibration for wp8 -* android: respect silent audio setting - -### 1.1.0 (May 06, 2015) -* [CB-8930](https://issues.apache.org/jira/browse/CB-8930): Vibration on **Windows** fails without a helpful error message when vibration functionality is missing from the platform. This detects such a case and instead fails gracefully that the feature isn't available. Also supports the **Windows 10** vibration mechanism. - -### 1.0.0 (Apr 15, 2015) -* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump -* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id -* [CB-7970](https://issues.apache.org/jira/browse/CB-7970) Reference proxy project instead of compiled winmd -* [CB-7970](https://issues.apache.org/jira/browse/CB-7970) Add cordova-plugin-vibration support for Windows Phone 8.1 -* Use TRAVIS_BUILD_DIR, install paramedic by npm -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme -* [CB-8576](https://issues.apache.org/jira/browse/CB-8576) Integrate TravisCI -* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-vibration documentation translation: cordova-plugin-vibration -* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file - -### 0.3.13 (Feb 04, 2015) -* [CB-8243](https://issues.apache.org/jira/browse/CB-8243) cordova-plugin-vibration documentation translation: cordova-plugin-vibration - -### 0.3.12 (Dec 02, 2014) -* [CB-8018](https://issues.apache.org/jira/browse/CB-8018) Add `vibrate(pattern)` fallback on vibrate for **Windows Phone 8** -* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs -* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-vibration documentation translation: cordova-plugin-vibration -* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin - -### 0.3.11 (Sep 17, 2014) -* [CB-7249](https://issues.apache.org/jira/browse/CB-7249) cordova-plugin-vibration documentation translation -* [CB-6724](https://issues.apache.org/jira/browse/CB-6724) documented Windows support for vibrate with pattern and cancel vibrate in manual test doc and moved tests to tests dir -* add longer pattern sequence for testing, change expected result for old vibrate with pattern test -* added more test cases, changed vibrate with pattern durations, changed where vibrateOn is set to true -* clear settimeout when user cancels vibration -* add setTimeout function to update vibrateOn var if user doesn't cancel vibrate, add note about iOS -* on/off button for cancel tests, add results box and msgs -* added tests for old vibrateWithPattern and cancelVibration calls -* added 'Android only' to buttons for specific tests, changed where console.log is executed for user to see earlier -* added tests to ensure compliance with w3c spec -* [CB-6963](https://issues.apache.org/jira/browse/CB-6963) ported vibration automated & manual tests -* [CB-6966](https://issues.apache.org/jira/browse/CB-6966) renamed folder to tests + added nested plugin.xml -* [CB-6966](https://issues.apache.org/jira/browse/CB-6966) Ported Vibration automated & manual tests -* removed duplicate messaging -* [CB-5459](https://issues.apache.org/jira/browse/CB-5459) slight change to the vibration documentation for pattern due to merge issue -* changes to how 0 is getting added to array in order to align with w3c spec -* changes to vibration.java to align with w3c, changes to vibration.js for backwards compatibility -* changes made to align with w3c spec -* Updated doc with Windows support for vibrate with pattern -* Added note to doc about w3c alignment and min time for Windows -* update doc with another way to cancel vibration -* update doc to show vibrate([num]) is a standard vibrate -* vibrate([num]) is treated as a vibrate not vibrate with pattern -* added new example to documentation -* updated doc for w3c alignment -* changes to how 0 is getting added to array in order to align with w3c spec -* changes to vibration.java to align with w3c, changes to vibration.js for backwards compatibility -* changes made to align with w3c spec - -### 0.3.10 (Aug 06, 2014) -* ubuntu: Implemented vibrateWithPattern/cancelVibration -* **FFOS** update VibrationProxy.js -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs - -### 0.3.9 (Jun 05, 2014) -* updated notice file -* Github close #11 -* Extended vibrateWithPattern to allow for pattern repetition, implemented a complementary cancelVibration function and adapted documentation. -* Implemented vibrateWithPattern (for android) and adapted documentation. -* [CB-6811](https://issues.apache.org/jira/browse/CB-6811) Add license to CONTRIBUTING.md -* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md - -### 0.3.8 (Apr 17, 2014) -* [CB-6465](https://issues.apache.org/jira/browse/CB-6465): Add license headers to Tizen code -* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers -* Add NOTICE file - -### 0.3.7 (Feb 05, 2014) -* Add support for Tizen. -* [CB-3206](https://issues.apache.org/jira/browse/CB-3206) - Supported platforms updated - -### 0.3.6 (Jan 02, 2014) -* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc/index.md for Vibration plugin - -### 0.3.5 (Dec 4, 2013) -* add ubuntu platform -* Added amazon-fireos platform. Change to include amazon-fireos as a platform if the user agent string contains 'cordova-amazon-fireos' -* [CB-4747](https://issues.apache.org/jira/browse/CB-4747) Fixed Blackberry background vibrate - -### 0.3.4 (Oct 28, 2013) -* add repo + issue tag to plugin.xml for vibration plugin -* corrected plugin.xml to write properly to config.xml for ffos -* [CB-5010](https://issues.apache.org/jira/browse/CB-5010) Incremented plugin version on dev branch. - -### 0.3.3 (Oct 9, 2013) -* add missing android namespace -* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. - -### 0.3.2 (Sept 25, 2013) -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.vibration to org.apache.cordova.vibration -* Rename CHANGELOG.md -> RELEASENOTES.md -* updated to work with ffos commandProxy -* fixed plugin.xml for vibration -* [CB-4593](https://issues.apache.org/jira/browse/CB-4593) [Blackberry10] Added vibration support for bb10 -* updated plugin to work with ffos -* [CB-4752](https://issues.apache.org/jira/browse/CB-4752) Incremented plugin version on dev branch. - -### 0.3.0 (Sept 5, 2013) -* Initial FirefoxOS support -* [CB-4661](https://issues.apache.org/jira/browse/CB-4661) VIBRATE permission for Android diff --git a/plugins/cordova-plugin-vibration/package.json b/plugins/cordova-plugin-vibration/package.json deleted file mode 100644 index 5b3952c41..000000000 --- a/plugins/cordova-plugin-vibration/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "cordova-plugin-vibration", - "version": "3.1.1", - "description": "Cordova Vibration Plugin", - "types": "./types/index.d.ts", - "cordova": { - "id": "cordova-plugin-vibration", - "platforms": [ - "android", - "ios", - "windows" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/apache/cordova-plugin-vibration" - }, - "bugs": { - "url": "https://issues.apache.org/jira/browse/CB" - }, - "keywords": [ - "cordova", - "vibration", - "ecosystem:cordova", - "cordova-android", - "cordova-ios", - "cordova-windows" - ], - "scripts": { - "test": "npm run eslint", - "eslint": "eslint www && eslint src && eslint tests" - }, - "author": "Apache Software Foundation", - "license": "Apache-2.0", - "engines": { - "cordovaDependencies": { - "4.0.0": { - "cordova": ">100" - } - } - }, - "devDependencies": { - "eslint": "^4.0.0", - "eslint-config-semistandard": "^11.0.0", - "eslint-config-standard": "^10.2.1", - "eslint-plugin-import": "^2.3.0", - "eslint-plugin-node": "^5.0.0", - "eslint-plugin-promise": "^3.5.0", - "eslint-plugin-standard": "^3.0.1" - } -} diff --git a/plugins/cordova-plugin-vibration/plugin.xml b/plugins/cordova-plugin-vibration/plugin.xml deleted file mode 100644 index 09fcee47d..000000000 --- a/plugins/cordova-plugin-vibration/plugin.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - Vibration - Cordova Vibration Plugin - Apache 2.0 - cordova,vibration - https://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration.git - https://issues.apache.org/jira/browse/CB/component/12320639 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/cordova-plugin-vibration/src/browser/Vibration.js b/plugins/cordova-plugin-vibration/src/browser/Vibration.js deleted file mode 100644 index 934ae324b..000000000 --- a/plugins/cordova-plugin-vibration/src/browser/Vibration.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -module.exports = { - vibrate: function (success, fail, milliseconds) { - console.log('Vibration is not supported'); - return false; - } -}; diff --git a/plugins/cordova-plugin-vibration/src/ios/CDVVibration.h b/plugins/cordova-plugin-vibration/src/ios/CDVVibration.h deleted file mode 100644 index 003b2feff..000000000 --- a/plugins/cordova-plugin-vibration/src/ios/CDVVibration.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import -#import -#import - -@interface CDVVibration : CDVPlugin {} - -- (void)vibrate:(CDVInvokedUrlCommand*)command; - -@end diff --git a/plugins/cordova-plugin-vibration/src/ios/CDVVibration.m b/plugins/cordova-plugin-vibration/src/ios/CDVVibration.m deleted file mode 100644 index ac2ad4201..000000000 --- a/plugins/cordova-plugin-vibration/src/ios/CDVVibration.m +++ /dev/null @@ -1,29 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVVibration.h" - -@implementation CDVVibration - -- (void)vibrate:(CDVInvokedUrlCommand*)command -{ - AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); -} - -@end diff --git a/plugins/cordova-plugin-vibration/src/windows/Vibration/Properties/AssemblyInfo.cs b/plugins/cordova-plugin-vibration/src/windows/Vibration/Properties/AssemblyInfo.cs deleted file mode 100644 index 5e020d2ef..000000000 --- a/plugins/cordova-plugin-vibration/src/windows/Vibration/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -using System.Resources; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Vibration")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Vibration")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: NeutralResourcesLanguage("en")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/plugins/cordova-plugin-vibration/src/windows/Vibration/Vibration.cs b/plugins/cordova-plugin-vibration/src/windows/Vibration/Vibration.cs deleted file mode 100644 index 9f6f5e3f8..000000000 --- a/plugins/cordova-plugin-vibration/src/windows/Vibration/Vibration.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using System.Text; -using Windows.Phone.Devices.Notification; - -namespace Vibration -{ - public sealed class Vibration - { - private static VibrationDevice _vibrationDevice = VibrationDevice.GetDefault(); - - public static void vibrate([ReadOnlyArray()] object[] args) - { - // set default - int duration = 200; - - try - { - duration = Convert.ToInt32(args[0]); - } - catch - { - - } - - _vibrationDevice.Vibrate(TimeSpan.FromMilliseconds(duration)); - } - - public static void cancelVibration() - { - _vibrationDevice.Cancel(); - } - } -} diff --git a/plugins/cordova-plugin-vibration/src/windows/Vibration/Vibration.csproj b/plugins/cordova-plugin-vibration/src/windows/Vibration/Vibration.csproj deleted file mode 100644 index 8fa45f3e1..000000000 --- a/plugins/cordova-plugin-vibration/src/windows/Vibration/Vibration.csproj +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - 12.0 - Debug - AnyCPU - {D4F9F695-ECD5-49FC-B58A-B1E0E754E159} - Vibration - winmdobj - Properties - Vibration - Vibration - en-US - 512 - {76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsPhoneApp - 8.1 - - - true - full - false - bin\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE;NETFX_CORE;WINDOWS_PHONE_APP - prompt - 4 - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/cordova-plugin-vibration/src/windows/VibrationProxy.js b/plugins/cordova-plugin-vibration/src/windows/VibrationProxy.js deleted file mode 100644 index fcf0d5b23..000000000 --- a/plugins/cordova-plugin-vibration/src/windows/VibrationProxy.js +++ /dev/null @@ -1,253 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -/* global Windows, WinJS, Vibration */ - -function checkReqs (actionName, fail) { - if (!(Windows.Phone && Windows.Phone.Devices && Windows.Phone.Devices.Notification && Windows.Phone.Devices.Notification.VibrationDevice) && WinJS.Utilities.isPhone !== true) { - fail(actionName + ' is unsupported by this platform.'); - return false; - } - - return true; -} - -function tryDoAction (actionName, success, fail, args, action) { - try { - if (checkReqs(actionName, fail) !== true) { - return; - } - - action(args); - success(); - } catch (e) { - fail('Error occured while trying to ' + actionName + ': ' + e); - } -} - -/** - * @typedef patternParsingResult - * @type {Object} - * @property {Array} result.parsed - Array with parsed integers - * @property {Boolean} result.passed - false in case of parsing error - * @property {*} result.failedItem - The item, which could not be parsed - */ - -/** - * Tries to convert pattern values to int - * @param {Array} pattern Array of delays - * @returns {patternParsingResult} result - */ -function tryParsePatternValues (pattern) { - var passed = true; - var failedItem; - - pattern = pattern.map(function (item) { - var num = parseInt(item, 10); - if (isNaN(num)) { - failedItem = item; - passed = false; - } - - return num; - }); - - return { - parsed: pattern, - passed: passed, - failedItem: failedItem - }; -} - -/** - * @typedef checkPatternReqsResult - * @type {Object} - * @property {Array} result.patternParsingResult - Array with parsed integers - * @property {Boolean} result.passed - true if all params are OK - */ - -/** - * Checks params for vibrateWithPattern function - * @return {checkPatternReqsResult} - */ -function checkPatternReqs (args, fail) { - var patternParsingResult = tryParsePatternValues(args[0]); - var repeat = args[1]; - var passed = true; - var errMsg = ''; - - if (!patternParsingResult.passed) { - errMsg += 'Could not parse ' + patternParsingResult.failedItem + ' in the vibration pattern'; - passed = false; - } - - if (repeat !== -1 && (repeat < 0 || repeat > args[0].length - 1)) { - errMsg += '\nrepeat parameter is out of range: ' + repeat; - passed = false; - } - - if (!passed) { - console.error(errMsg); - if (fail) { - fail(errMsg); - } - } - - return { - passed: passed, - patternParsingResult: patternParsingResult - }; -} - -/** - * vibrateWithPattern with `repeat` support - * @param {Array} patternArr Full pattern array - * @param {Boolean} shouldRepeat Indication on whether the vibration should be cycled - * @param {Function} fail Fail callback - * @param {Array} patternCycle Cycled part of the pattern array - * @return {Promise} Promise chaining single vibrate/pause actions - */ -function vibratePattern (patternArr, shouldRepeat, fail, patternCycle) { - return patternArr.reduce(function (previousValue, currentValue, index) { - if (index % 2 === 0) { - return previousValue.then(function () { - module.exports.vibrate(function () { }, function (err) { - console.error(err); - if (fail) { - fail(err); - } - }, [currentValue]); - - if (index === patternArr.length - 1 && shouldRepeat) { - return WinJS.Promise.timeout(currentValue).then(function () { - return vibratePattern(patternCycle, true, fail, patternCycle); - }); - } else { - return WinJS.Promise.timeout(currentValue); - } - }); - } else { - return previousValue.then(function () { - if (index === patternArr.length - 1 && shouldRepeat) { - return WinJS.Promise.timeout(currentValue).then(function () { - return vibratePattern(patternCycle, true, fail, patternCycle); - }); - } else { - return WinJS.Promise.timeout(currentValue); - } - }); - } - }, WinJS.Promise.as()); -} - -var DEFAULT_DURATION = 200; -var patternChainPromise; - -var VibrationDevice = (Windows.Phone && Windows.Phone.Devices && Windows.Phone.Devices.Notification && Windows.Phone.Devices.Notification.VibrationDevice && Windows.Phone.Devices.Notification.VibrationDevice); -if (VibrationDevice) { - // Windows Phone 10 code paths - module.exports = { - vibrate: function (success, fail, args) { - try { - var duration = parseInt(args[0]); - if (isNaN(duration)) { - duration = DEFAULT_DURATION; - } - VibrationDevice.getDefault().vibrate(duration); - success(); - } catch (e) { - fail(e); - } - }, - vibrateWithPattern: function (success, fail, args) { - // Cancel current vibrations first - module.exports.cancelVibration(function () { - var checkReqsResult = checkPatternReqs(args, fail); - if (!checkReqsResult.passed) { - return; - } - - var pattern = checkReqsResult.patternParsingResult.parsed; - var repeatFromIndex = args[1]; - var shouldRepeat = (repeatFromIndex !== -1); - var patternCycle; - - if (shouldRepeat) { - patternCycle = pattern.slice(repeatFromIndex); - } - - patternChainPromise = vibratePattern(pattern, shouldRepeat, fail, patternCycle); - }, fail); - }, - cancelVibration: function (success, fail, args) { - try { - if (patternChainPromise) { - patternChainPromise.cancel(); - } - VibrationDevice.getDefault().cancel(); - if (success) { - success(); - } - } catch (e) { - if (fail) { - fail(e); - } - } - } - }; -} else if (typeof Vibration !== 'undefined' && Vibration.Vibration) { - // Windows Phone 8.1 code paths - module.exports = { - vibrate: function (success, fail, args) { - tryDoAction('vibrate', success, fail, args, Vibration.Vibration.vibrate); - }, - - vibrateWithPattern: function (success, fail, args) { - tryDoAction('vibrate', success, fail, [DEFAULT_DURATION], Vibration.Vibration.vibrate); - }, - - cancelVibration: function (success, fail, args) { - tryDoAction('cancelVibration', success, fail, args, Vibration.Vibration.cancelVibration); - } - }; -} else { - // code paths where no vibration mechanism is present - module.exports = { - vibrate: function (success, fail) { - if (fail) { - fail('"vibrate" is unsupported by this device.'); - } - }, - vibrateWithPattern: function (success, fail, args) { - if (fail) { - fail('"vibrateWithPattern" is unsupported by this device.'); - } - }, - - cancelVibration: function (success, fail, args) { - if (success) { - success(); - } - } - }; -} - -require('cordova/exec/proxy').add('Vibration', module.exports); diff --git a/plugins/cordova-plugin-vibration/tests/package.json b/plugins/cordova-plugin-vibration/tests/package.json deleted file mode 100644 index fee878d58..000000000 --- a/plugins/cordova-plugin-vibration/tests/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "cordova-plugin-vibration-tests", - "version": "3.1.1", - "description": "", - "cordova": { - "id": "cordova-plugin-vibration-tests", - "platforms": [] - }, - "keywords": [ - "ecosystem:cordova" - ], - "author": "", - "license": "Apache 2.0" -} diff --git a/plugins/cordova-plugin-vibration/tests/plugin.xml b/plugins/cordova-plugin-vibration/tests/plugin.xml deleted file mode 100644 index 466e98b2e..000000000 --- a/plugins/cordova-plugin-vibration/tests/plugin.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - Cordova Vibration Plugin Tests - Apache 2.0 - - - - diff --git a/plugins/cordova-plugin-vibration/tests/tests.js b/plugins/cordova-plugin-vibration/tests/tests.js deleted file mode 100644 index b31ee22bb..000000000 --- a/plugins/cordova-plugin-vibration/tests/tests.js +++ /dev/null @@ -1,213 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -/* eslint-env jasmine */ - -exports.defineManualTests = function (contentEl, createActionButton) { - var logMessage = function (message, color) { - var log = document.getElementById('info'); - var logLine = document.createElement('div'); - if (color) { - logLine.style.color = color; - } - logLine.innerHTML = message; - log.appendChild(logLine); - }; - - var clearLog = function () { - var log = document.getElementById('info'); - log.innerHTML = ''; - }; - - // ------------------------------------------------------------------------- - // Vibrations - // ------------------------------------------------------------------------- - - // new standard vibrate call that aligns to w3c spec with param long - var vibrateWithInt = function () { - clearLog(); - navigator.vibrate(3000); - logMessage('navigator.vibrate(3000)', 'green'); - }; - - // new standard vibrate call that aligns to w3c spec with param array - var vibrateWithArray = function () { - clearLog(); - navigator.vibrate([3000]); - logMessage('navigator.vibrate([3000])', 'green'); - }; - - // vibrate with a pattern using w3c spec - var vibrateWithPattern = function () { - clearLog(); - navigator.vibrate([1000, 2000, 3000, 2000, 5000]); - logMessage('navigator.vibrate([1000, 2000, 3000, 2000, 5000])', 'green'); - }; - - // cancel existing vibration using w3c spec navigator.vibrate(0) - var cancelWithZero = function () { - clearLog(); - navigator.vibrate(0); - logMessage('navigator.vibrate(0)', 'green'); - }; - - // cancel existing vibration using w3c spec navigator.vibrate([]) - var cancelWithEmpty = function () { - clearLog(); - navigator.vibrate([]); - logMessage('navigator.vibrate([])', 'green'); - }; - - // reference to the timeout variable - var timeout; - - // check whether there is an ongoing vibration - var vibrateOn = false; - - // special long vibrate used to test cancel - var longVibrate = function () { - clearLog(); - navigator.vibrate(60000); - vibrateOn = true; - logMessage('navigator.vibrate(60000)', 'green'); - timeout = setTimeout(resetVibrateOn, 60000); // if user doesn't cancel vibrate, reset vibrateOn var after 60 seconds - }; - - // special long vibrate with pattern used to test cancel - var longVibrateWithPattern = function () { - clearLog(); - navigator.vibrate([1000, 2000, 3000, 2000, 5000, 2000, 30000]); - vibrateOn = true; - logMessage('navigator.vibrate([1000, 2000, 3000, 2000, 5000, 2000, 30000])', 'green'); - timeout = setTimeout(resetVibrateOn, 45000); // if user doesn't cancel vibrate, reset vibrateOn var after 45 seconds - }; - - // initiate two vibrations to test cancel - var multipleVibrations = function () { - clearLog(); - navigator.vibrate(20000); - navigator.vibrate(45000); - vibrateOn = true; - logMessage('navigator.vibrate(15000)\nnavigator.vibrate(45000)', 'green'); - timeout = setTimeout(resetVibrateOn, 45000); // if user doesn't cancel vibrate, reset vibrateOn var after 45 seconds - }; - - function resetVibrateOn () { - vibrateOn = false; - } - - var vibrate_tests = '

Vibrate Tests

' + - '

Starred tests only work for Android and Windows.

' + - '

iOS ignores the time given for a vibrate

' + - '

' + - 'Expected result: Vibrate once for 3 seconds.' + - '

' + - 'Expected result: Vibrate once for 3 seconds.' + - '

' + - 'Expected result: Vibrate for 1s, pause for 2s, vibrate for 3s, pause for 2s, vibrate for 5s.' + - '

' + - 'Expected result: Press once to initiate vibrate for 60 seconds. Press again to cancel vibrate immediately.' + - '

' + - 'Expected result: Press once to initiate vibrate for 60 seconds. Press again to cancel vibrate immediately.' + - '

' + - 'Expected result: Press once to initiate vibrate with pattern for 45s. Press again to cancel vibrate immediately.' + - '

' + - 'Expected result: Press once to initiate vibrate with pattern for 45s. Press again to cancel vibrate immediately.' + - '

' + - 'Expected result: Press once to initiate two vibrations simultaneously (one for 20s the other for 45s so total of 45s). Press again to cancel both vibrations immediately.'; - - contentEl.innerHTML = '
' + vibrate_tests; - - // standard vibrate with new call param int - createActionButton('Vibrate with int', function () { - vibrateWithInt(); - }, 'vibrate_int'); - - // standard vibrate with new call param array - createActionButton('Vibrate with array', function () { - vibrateWithArray(); - }, 'vibrate_array'); - - // vibrate with a pattern - createActionButton('* Vibrate with a pattern', function () { - vibrateWithPattern(); - }, 'vibrate_with_pattern'); - - // cancel any existing vibrations with param 0 - createActionButton('* Cancel vibration with 0', function () { - - if (!vibrateOn) { - longVibrate(); - } else { - cancelWithZero(); - resetVibrateOn(); - clearTimeout(timeout); // clear the timeout since user has canceled the vibrate - } - }, 'cancel_zero'); - - // cancel any existing vibrations with param [] - createActionButton('* Cancel vibration with []', function () { - - if (!vibrateOn) { - longVibrate(); - } else { - cancelWithEmpty(); - resetVibrateOn(); - clearTimeout(timeout); // clear the timeout since user has canceled the vibrate - } - }, 'cancel_array'); - - // cancel vibration with pattern with param 0 - createActionButton('* Cancel vibration with pattern with 0', function () { - - if (!vibrateOn) { - longVibrateWithPattern(); - } else { - cancelWithZero(); - resetVibrateOn(); - clearTimeout(timeout); // clear the timeout since user has canceled the vibrate - } - }, 'cancelWithPattern_zero'); - - // cancel vibration with pattern with param [] - createActionButton('* Cancel vibration with pattern with []', function () { - - if (!vibrateOn) { - longVibrateWithPattern(); - } else { - cancelWithEmpty(); - resetVibrateOn(); - clearTimeout(timeout); // clear the timeout since user has canceled the vibrate - } - }, 'cancelWithPattern_array'); - - // cancel multiple vibrations - createActionButton('* Cancel multiple vibrations', function () { - - if (!vibrateOn) { - multipleVibrations(); - } else { - cancelWithZero(); - resetVibrateOn(); - clearTimeout(timeout); // clear the timeout since user has canceled the vibrate - } - }, 'cancelMultipleVibrations'); -}; diff --git a/plugins/cordova-plugin-vibration/types/index.d.ts b/plugins/cordova-plugin-vibration/types/index.d.ts deleted file mode 100644 index eadb6fc50..000000000 --- a/plugins/cordova-plugin-vibration/types/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -// Type definitions for cordova-plugin-vibration 3.1 -// Project: https://github.com/apache/cordova-plugin-vibration -// Definitions by: Microsoft Open Technologies Inc -// Louis Lagrange -// Tim Brust -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface Navigator { - /** - * Vibrates the device for the specified amount of time. - * - * @param time - Milliseconds to vibrate the device. 0 cancels the vibration. Ignored on iOS. - */ - vibrate(time: number): void; - - /** - * Vibrates the device with a given pattern. - * - * @param time - Sequence of durations (in milliseconds) for which to turn on or off the vibrator. Ignored on iOS. - */ - vibrate(time: number[]): void; -} diff --git a/plugins/cordova-plugin-vibration/www/vibration.js b/plugins/cordova-plugin-vibration/www/vibration.js deleted file mode 100644 index af7ed74ee..000000000 --- a/plugins/cordova-plugin-vibration/www/vibration.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var exec = require('cordova/exec'); - -/** - * Provides access to the vibration mechanism on the device. - */ - -module.exports = { - - /** - * Vibrates the device for a given amount of time or for a given pattern or immediately cancels any ongoing vibrations (depending on the parameter). - * - * @param {Integer} param The number of milliseconds to vibrate (if 0, cancels vibration) - * - * - * @param {Array of Integer} param Pattern with which to vibrate the device. - * Pass in an array of integers that - * are the durations for which to - * turn on or off the vibrator in - * milliseconds. The FIRST value - * indicates the - * number of milliseconds for which - * to keep the vibrator ON before - * turning it off. The NEXT value indicates the - * number of milliseconds for which - * to keep the vibrator OFF before - * turning it on. Subsequent values - * alternate between durations in - * milliseconds to turn the vibrator - * off or to turn the vibrator on. - * (if empty, cancels vibration) - */ - vibrate: function (param) { - /* Aligning with w3c spec */ - - // vibrate - if ((typeof param === 'number') && param !== 0) { - exec(null, null, 'Vibration', 'vibrate', [param]); - - // vibrate with array ( i.e. vibrate([3000]) ) - } else if ((typeof param === 'object') && param.length === 1) { - // cancel if vibrate([0]) - if (param[0] === 0) { - exec(null, null, 'Vibration', 'cancelVibration', []); - - // else vibrate - } else { - exec(null, null, 'Vibration', 'vibrate', [param[0]]); - } - - // vibrate with a pattern - } else if ((typeof param === 'object') && param.length > 1) { - var repeat = -1; // no repeat - exec(null, null, 'Vibration', 'vibrateWithPattern', [param, repeat]); - - // cancel vibration (param = 0 or []) - } else { exec(null, null, 'Vibration', 'cancelVibration', []); } - - return true; - } -}; diff --git a/plugins/cordova-plugin-webserver/package.json b/plugins/cordova-plugin-webserver/package.json deleted file mode 100644 index ffd2ece18..000000000 --- a/plugins/cordova-plugin-webserver/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "cordova-plugin-webserver", - "version": "1.0.0", - "main": "index.js", - "license": "MIT" -} diff --git a/plugins/cordova-plugin-webserver/plugin.xml b/plugins/cordova-plugin-webserver/plugin.xml deleted file mode 100644 index 3ace78ab5..000000000 --- a/plugins/cordova-plugin-webserver/plugin.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - Webserver for Cordova Apps - webserver,cordova,http, request, response,server - - - - - - - - - - - - - - - - - diff --git a/plugins/cordova-plugin-webserver/src/android/NanoHTTPDWebserver.java b/plugins/cordova-plugin-webserver/src/android/NanoHTTPDWebserver.java deleted file mode 100644 index e1415f2b2..000000000 --- a/plugins/cordova-plugin-webserver/src/android/NanoHTTPDWebserver.java +++ /dev/null @@ -1,330 +0,0 @@ -package org.apache.cordova.plugin; - -import android.content.ContentResolver; -import android.content.Context; -import android.net.Uri; -import androidx.documentfile.provider.DocumentFile; -import fi.iki.elonen.NanoHTTPD; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.lang.reflect.Method; -import java.net.URLConnection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.UUID; -import org.apache.cordova.PluginResult; -import org.json.JSONException; -import org.json.JSONObject; - -public class NanoHTTPDWebserver extends NanoHTTPD { - - Webserver webserver; - Context context; - - public NanoHTTPDWebserver(int port, Webserver webserver, Context context) { - super(port); - this.webserver = webserver; - this.context = context; - } - - private String getBodyText(IHTTPSession session) { - Map files = new HashMap(); - Method method = session.getMethod(); - if (Method.PUT.equals(method) || Method.POST.equals(method)) { - try { - session.parseBody(files); - } catch (IOException ioe) { - return "{}"; - } catch (ResponseException re) { - return "{}"; - } - } - // get the POST body - return files.get("postData"); - } - - /** - * Create a request object - *

- * [ "requestId": requestUUID, " body": request.jsonObject ?? "", " headers": - * request.headers, " method": request.method, " path": request.url.path, " - * query": request.url.query ?? "" ] - * - * @param session - * @return - */ - private JSONObject createJSONRequest(String requestId, IHTTPSession session) - throws JSONException { - JSONObject jsonRequest = new JSONObject(); - jsonRequest.put("requestId", requestId); - jsonRequest.put("body", this.getBodyText(session)); - jsonRequest.put("headers", session.getHeaders()); - jsonRequest.put("method", session.getMethod()); - jsonRequest.put("path", session.getUri()); - jsonRequest.put("query", session.getQueryParameterString()); - return jsonRequest; - } - - private String getContentType(JSONObject responseObject) - throws JSONException { - if ( - responseObject.has("headers") && - responseObject.getJSONObject("headers").has("Content-Type") - ) { - return responseObject.getJSONObject("headers").getString("Content-Type"); - } else { - return "text/plain"; - } - } - - private Response newFixedFileResponse(DocumentFile file, String mime) - throws FileNotFoundException, IOException { - Response res; - res = - newFixedLengthResponse( - Response.Status.OK, - mime, - getInputStream(file), - (int) file.length() - ); - res.addHeader("Accept-Ranges", "bytes"); - return res; - } - - Response serveFile( - Map header, - DocumentFile file, - String mime - ) { - Response res; - try { - // Calculate etag - long fileLen = file.length(); - String path = file.getUri().toString(); - String etag = Integer.toHexString( - (path + file.lastModified() + "" + fileLen).hashCode() - ); - - // Support (simple) skipping: - long startFrom = 0; - long endAt = -1; - String range = header.get("range"); - if (range != null) { - if (range.startsWith("bytes=")) { - range = range.substring("bytes=".length()); - int minus = range.indexOf('-'); - try { - if (minus > 0) { - startFrom = Long.parseLong(range.substring(0, minus)); - endAt = Long.parseLong(range.substring(minus + 1)); - } - } catch (NumberFormatException ignored) {} - } - } - - // get if-range header. If present, it must match etag or else we - // should ignore the range request - String ifRange = header.get("if-range"); - boolean headerIfRangeMissingOrMatching = - (ifRange == null || etag.equals(ifRange)); - - String ifNoneMatch = header.get("if-none-match"); - boolean headerIfNoneMatchPresentAndMatching = - ifNoneMatch != null && - ("*".equals(ifNoneMatch) || ifNoneMatch.equals(etag)); - - if ( - headerIfRangeMissingOrMatching && - range != null && - startFrom >= 0 && - startFrom < fileLen - ) { - // range request that matches current etag - // and the startFrom of the range is satisfiable - if (headerIfNoneMatchPresentAndMatching) { - // range request that matches current etag - // and the startFrom of the range is satisfiable - // would return range from file - // respond with not-modified - res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, ""); - res.addHeader("ETag", etag); - } else { - if (endAt < 0) { - endAt = fileLen - 1; - } - long newLen = endAt - startFrom + 1; - if (newLen < 0) { - newLen = 0; - } - - InputStream is = getInputStream(file); - is.skip(startFrom); - - res = - newFixedLengthResponse( - Response.Status.PARTIAL_CONTENT, - mime, - is, - newLen - ); - res.addHeader("Accept-Ranges", "bytes"); - res.addHeader("Content-Length", "" + newLen); - res.addHeader( - "Content-Range", - "bytes " + startFrom + "-" + endAt + "/" + fileLen - ); - res.addHeader("ETag", etag); - } - } else { - if ( - headerIfRangeMissingOrMatching && - range != null && - startFrom >= fileLen - ) { - // return the size of the file - // 4xx responses are not trumped by if-none-match - res = - newFixedLengthResponse( - Response.Status.RANGE_NOT_SATISFIABLE, - NanoHTTPD.MIME_PLAINTEXT, - "" - ); - res.addHeader("Content-Range", "bytes */" + fileLen); - res.addHeader("ETag", etag); - } else if (range == null && headerIfNoneMatchPresentAndMatching) { - // full-file-fetch request - // would return entire file - // respond with not-modified - res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, ""); - res.addHeader("ETag", etag); - } else if ( - !headerIfRangeMissingOrMatching && headerIfNoneMatchPresentAndMatching - ) { - // range request that doesn't match current etag - // would return entire (different) file - // respond with not-modified - - res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, ""); - res.addHeader("ETag", etag); - } else { - // supply the file - res = newFixedFileResponse(file, mime); - res.addHeader("Content-Length", "" + fileLen); - res.addHeader("ETag", etag); - } - } - } catch (Exception e) { - String type = e.getClass().getName(); - if (type.equals("FileNotFoundException")) res = - newFixedLengthResponse( - Response.Status.NOT_FOUND, - NanoHTTPD.MIME_PLAINTEXT, - e.getMessage() - ); else res = - newFixedLengthResponse( - Response.Status.FORBIDDEN, - NanoHTTPD.MIME_PLAINTEXT, - e.getMessage() - ); - } - - return res; - } - - @Override - public Response serve(IHTTPSession session) { - String requestUUID = UUID.randomUUID().toString(); - - PluginResult pluginResult = null; - try { - pluginResult = - new PluginResult( - PluginResult.Status.OK, - this.createJSONRequest(requestUUID, session) - ); - } catch (JSONException e) { - e.printStackTrace(); - } - pluginResult.setKeepCallback(true); - this.webserver.onRequestCallbackContext.sendPluginResult(pluginResult); - - while (!this.webserver.responses.containsKey(requestUUID)) { - try { - Thread.sleep(1); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - JSONObject responseObject = (JSONObject) this.webserver.responses.get( - requestUUID - ); - Response response = null; - - if (responseObject.has("path")) { - try { - String path = responseObject.getString("path"); - DocumentFile file = getFile(path); - String mimeType = URLConnection.guessContentTypeFromName(path); - Response res = serveFile(session.getHeaders(), file, mimeType); - Iterator keys = responseObject.getJSONObject("headers").keys(); - while (keys.hasNext()) { - String key = (String) keys.next(); - res.addHeader( - key, - responseObject.getJSONObject("headers").getString(key) - ); - } - return res; - } catch (JSONException e) { - e.printStackTrace(); - } - return response; - } else { - try { - response = - newFixedLengthResponse( - Response.Status.lookup(responseObject.getInt("status")), - getContentType(responseObject), - responseObject.getString("body") - ); - - Iterator keys = responseObject.getJSONObject("headers").keys(); - while (keys.hasNext()) { - String key = (String) keys.next(); - response.addHeader( - key, - responseObject.getJSONObject("headers").getString(key) - ); - } - } catch (JSONException e) { - e.printStackTrace(); - } - return response; - } - } - - private DocumentFile getFile(String filePath) { - Uri fileUri = Uri.parse(filePath); - DocumentFile documentFile = null; - if (filePath.matches("file:///(.*)")) { - File file = new File(fileUri.getPath()); - documentFile = DocumentFile.fromFile(file); - } else { - documentFile = - DocumentFile.fromSingleUri(this.context, Uri.parse(filePath)); - } - - return documentFile; - } - - private InputStream getInputStream(DocumentFile file) - throws FileNotFoundException, IOException { - Uri uri = file.getUri(); - ContentResolver contentResolver = context.getContentResolver(); - return contentResolver.openInputStream(uri); - } -} diff --git a/plugins/cordova-plugin-webserver/src/android/Webserver.java b/plugins/cordova-plugin-webserver/src/android/Webserver.java deleted file mode 100644 index d738d6e64..000000000 --- a/plugins/cordova-plugin-webserver/src/android/Webserver.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.apache.cordova.plugin; - -import java.io.IOException; -import java.util.HashMap; -import org.apache.cordova.*; -import org.json.JSONArray; -import org.json.JSONException; - -public class Webserver extends CordovaPlugin { - - public HashMap responses; - public CallbackContext onRequestCallbackContext; - public NanoHTTPDWebserver nanoHTTPDWebserver; - - @Override - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - this.responses = new HashMap(); - } - - @Override - public boolean execute( - String action, - JSONArray args, - CallbackContext callbackContext - ) - throws JSONException { - if ("start".equals(action)) { - try { - this.start(args, callbackContext); - } catch (IOException e) { - e.printStackTrace(); - } - return true; - } - if ("stop".equals(action)) { - this.stop(args, callbackContext); - return true; - } - if ("onRequest".equals(action)) { - this.onRequest(args, callbackContext); - return true; - } - if ("sendResponse".equals(action)) { - this.sendResponse(args, callbackContext); - return true; - } - return false; // Returning false results in a "MethodNotFound" error. - } - - /** - * Starts the server - * - * @param args - * @param callbackContext - */ - private void start(JSONArray args, CallbackContext callbackContext) - throws JSONException, IOException { - int port = 8080; - - if (args.length() == 1) { - port = args.getInt(0); - } - - if (this.nanoHTTPDWebserver != null) { - callbackContext.sendPluginResult( - new PluginResult(PluginResult.Status.ERROR, "Server already running") - ); - return; - } - - try { - this.nanoHTTPDWebserver = - new NanoHTTPDWebserver(port, this, cordova.getContext()); - this.nanoHTTPDWebserver.start(); - } catch (Exception e) { - callbackContext.sendPluginResult( - new PluginResult(PluginResult.Status.ERROR, e.getMessage()) - ); - return; - } - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK)); - } - - /** - * Stops the server - * - * @param args - * @param callbackContext - */ - private void stop(JSONArray args, CallbackContext callbackContext) - throws JSONException { - if (this.nanoHTTPDWebserver != null) { - this.nanoHTTPDWebserver.stop(); - this.nanoHTTPDWebserver = null; - } - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK)); - } - - /** - * Will be called if the js context sends an response to the webserver - * - * @param args {UUID: {...}} - * @param callbackContext - * @throws JSONException - */ - private void sendResponse(JSONArray args, CallbackContext callbackContext) - throws JSONException { - this.responses.put(args.getString(0), args.get(1)); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK)); - } - - /** - * Just register the onRequest and send no result. This is needed to save the - * callbackContext to invoke it later - * - * @param args - * @param callbackContext - */ - private void onRequest(JSONArray args, CallbackContext callbackContext) { - this.onRequestCallbackContext = callbackContext; - PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT); - pluginResult.setKeepCallback(true); - this.onRequestCallbackContext.sendPluginResult(pluginResult); - } -} diff --git a/plugins/cordova-plugin-webserver/www/webserver.js b/plugins/cordova-plugin-webserver/www/webserver.js deleted file mode 100644 index 18de9373a..000000000 --- a/plugins/cordova-plugin-webserver/www/webserver.js +++ /dev/null @@ -1,49 +0,0 @@ -var WEBSERVER_CLASS = 'Webserver'; -var START_FUNCTION = 'start'; -var ONREQUEST_FUNCTION = 'onRequest'; -var SENDRESPONSE_FUNCION = 'sendResponse'; -var STOP_FUNCTION = 'stop'; - - -module.exports = { - start: function(success_callback, error_callback, port) { - var params = []; - if (port) { - params.push(port); - } - cordova.exec( - success_callback, - error_callback, - WEBSERVER_CLASS, - START_FUNCTION, - params - ); - }, - onRequest: function(success_callback) { - cordova.exec( - success_callback, - function(error) {console.error(error)}, - WEBSERVER_CLASS, - ONREQUEST_FUNCTION, - [] - ); - }, - sendResponse: function(requestId, params, success_callback, error_callback) { - cordova.exec( - success_callback, - error_callback, - WEBSERVER_CLASS, - SENDRESPONSE_FUNCION, - [requestId, params] - ); - }, - stop: function(success_callback, error_callback) { - cordova.exec( - success_callback, - error_callback, - WEBSERVER_CLASS, - STOP_FUNCTION, - [] - ); - } -} \ No newline at end of file diff --git a/plugins/cordova-plugin-whitelist/CONTRIBUTING.md b/plugins/cordova-plugin-whitelist/CONTRIBUTING.md deleted file mode 100644 index 21a93d72a..000000000 --- a/plugins/cordova-plugin-whitelist/CONTRIBUTING.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# Contributing to Apache Cordova - -Anyone can contribute to Cordova. And we need your contributions. - -There are multiple ways to contribute: report bugs, improve the docs, and -contribute code. - -For instructions on this, start with the -[contribution overview](http://cordova.apache.org/contribute/). - -The details are explained there, but the important items are: - - Check for Github issues that corresponds to your contribution and link or create them if necessary. - - Run the tests so your patch doesn't break existing functionality. - -We look forward to your contributions! - diff --git a/plugins/cordova-plugin-whitelist/LICENSE b/plugins/cordova-plugin-whitelist/LICENSE deleted file mode 100644 index 7a4a3ea24..000000000 --- a/plugins/cordova-plugin-whitelist/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/plugins/cordova-plugin-whitelist/NOTICE b/plugins/cordova-plugin-whitelist/NOTICE deleted file mode 100644 index 8ec56a524..000000000 --- a/plugins/cordova-plugin-whitelist/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -Apache Cordova -Copyright 2012 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). diff --git a/plugins/cordova-plugin-whitelist/README.md b/plugins/cordova-plugin-whitelist/README.md deleted file mode 100644 index bcee926c9..000000000 --- a/plugins/cordova-plugin-whitelist/README.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -title: Whitelist -description: Whitelist external content accessible by your app. ---- - - -# cordova-plugin-whitelist - -This plugin implements a whitelist policy for navigating the application webview on Cordova 4.0 - -### Deprecation Notice - -With the Allow List functionality now integrated into the core of Cordova Android (10.x and greater), this plugin is no longer required. - -Existing projects using Cordova Android 10 or greater should remove this plugin with the following command: - -```bash -cordova plugin rm cordova-plugin-whitelist -``` - -## Installation - -You can install whitelist plugin with Cordova CLI, from npm: - -``` -$ cordova plugin add cordova-plugin-whitelist -$ cordova prepare -``` - -## Supported Cordova Platforms - -* Android 4.0.0 or above - -## Navigation Whitelist - -Controls which URLs the WebView itself can be navigated to. Applies to -top-level navigations only. - -By default navigations are only allowed to `file://` URLs. To allow others URLs, you must add `` tags to your `config.xml`: - -```xml - - - - - - - - - - - - - -``` - -Quirks: on Android it also applies to iframes for non-http(s) schemes. - -## Intent Whitelist - -Controls which URLs the app is allowed to ask the system to open. - -In `config.xml`, add `` tags, like this: - -```xml - - - - - - - - - - - - - - - - - - - - - -``` - -Without any `` tags, no requests to external URLs are allowed. However, the default Cordova application includes a quite liberal set of `allow-intent` entries by default. It is advised to narrow this down based on each app's needs. - -On Android, this equates to sending an intent of type BROWSEABLE. - -This whitelist does not apply to plugins, only hyperlinks and calls to `window.open()`. - -Note: `allow-navigation` takes precedence over `allow-intent`. Allowing navigation to all URLs with `` for example has the side effect of "capturing" all intents, so the webview navigates to them instead of triggering e.g. external apps. - -## Network Request Whitelist - -Controls which network requests (images, XHRs, etc) are allowed to be made (via cordova native hooks). - -Note: We suggest you use a Content Security Policy (see below), which is more secure. This whitelist is mostly historical for webviews which do not support CSP. - -In `config.xml`, add `` tags, like this: - -```xml - - - - - - - - - - - - - - - -``` - -Without any `` tags, only requests to `file://` URLs are allowed. However, the default Cordova application includes `` by default. - -Note: Whitelist cannot block network redirects from a whitelisted remote website (i.e. http or https) to a non-whitelisted website. Use CSP rules to mitigate redirects to non-whitelisted websites for webviews that support CSP. - -Quirk: Android also allows requests to https://ssl.gstatic.com/accessibility/javascript/android/ by default, since this is required for TalkBack to function properly. - -### Content Security Policy - -Controls which network requests (images, XHRs, etc) are allowed to be made (via webview directly). - -On Android and iOS, the network request whitelist (see above) is not able to filter all types of requests (e.g. `` & WebSockets are not blocked). So, in addition to the whitelist, you should use a [Content Security Policy](http://content-security-policy.com/) `` tag on all of your pages. - -On Android, support for CSP within the system webview starts with KitKat (but is available on all versions using Crosswalk WebView). - -Here are some example CSP declarations for your `.html` pages: - -```html - - - - - - - - - - - - - - -``` diff --git a/plugins/cordova-plugin-whitelist/RELEASENOTES.md b/plugins/cordova-plugin-whitelist/RELEASENOTES.md deleted file mode 100644 index b6e000c48..000000000 --- a/plugins/cordova-plugin-whitelist/RELEASENOTES.md +++ /dev/null @@ -1,101 +0,0 @@ - -# Release Notes - -### 1.3.5 (Jun 26, 2021) -- fix: lock next patch release to `cordova-android` <10 (#62) -- breaking: deprecate plugin (#59) -- ci: add node-14.x to workflow (#58) -- chore: clean up `package.json` (#56) -- ci(travis): update osx xcode image (#55) -- ci(travis): updates **Android*- API level (#54) -- chore(asf): update git notification settings -- Update CONTRIBUTING.md -- ci: updates Node.js version (#52) -- chore(npm): improve ignore list (#51) -- docs: apply syntax highlighting to code samples (#48) -- ci: upgrade to node 8 - -### 1.3.4 (Jun 19, 2019) - -- chore: manually fix lines breaks to LF ([`d804ef2`](https://github.com/apache/cordova-plugin-whitelist/commit/d804ef2)) -- build: add `.gitattributes` to force LF (instead of possible CRLF on Windows) ([`ed0206b`](https://github.com/apache/cordova-plugin-whitelist/commit/ed0206b)) -- build: add `.npmignore` to remove unneeded files from npm package ([`bf8fea5`](https://github.com/apache/cordova-plugin-whitelist/commit/bf8fea5)) -- test,ci(travis): Tests (extracted from cordova-mobile-spec) ([#38](https://github.com/apache/cordova-plugin-whitelist/issues/38)) ([`e4f17b0`](https://github.com/apache/cordova-plugin-whitelist/commit/e4f17b0)) -- docs: Added information on allow-navigation preceding allow-intent ([#41](https://github.com/apache/cordova-plugin-whitelist/issues/41)) ([`7725fed`](https://github.com/apache/cordova-plugin-whitelist/commit/7725fed)) -- chore(github): Add or update GitHub pull request and issue template ([`86b3ee1`](https://github.com/apache/cordova-plugin-whitelist/commit/86b3ee1)) -- fix: Remove information about cordova-android ([#27](https://github.com/apache/cordova-plugin-whitelist/issues/27)) ([`34ed9d0`](https://github.com/apache/cordova-plugin-whitelist/commit/34ed9d0)) -- docs: remove JIRA link ([`fa78675`](https://github.com/apache/cordova-plugin-whitelist/commit/fa78675)) -- docs: Clarify unconfigured Intent Whitelist behaviour ([#26](https://github.com/apache/cordova-plugin-whitelist/issues/26)) ([`8d3f86b`](https://github.com/apache/cordova-plugin-whitelist/commit/8d3f86b)) - -### 1.3.3 (Nov 06, 2017) -* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. - -### 1.3.2 (Feb 28, 2017) -* [CB-12236](https://issues.apache.org/jira/browse/CB-12236) Fixed `RELEASENOTES` for `cordova-plugin-whitelist` - -### 1.3.1 (Dec 07, 2016) -* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.3.1 -* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" -* Edit package.json license to match SPDX id -* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version. - -### 1.3.0 (Sep 08, 2016) -* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies -* Updated installation section -* Plugin uses `Android Log class` and not `Cordova LOG class` -* Add pull request template. -* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine info to `package.json` -* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md - -### 1.2.2 (Apr 15, 2016) -* add note about redirects -* [CB-10624](https://issues.apache.org/jira/browse/CB-10624) remove error message from `whitelist.js`, which leaves it empty - -### 1.2.1 (Jan 15, 2016) -* [CB-10194](https://issues.apache.org/jira/browse/CB-10194) info tag prints for ios when not applicable - -### 1.2.0 (Nov 18, 2015) -* removed **iOS** engine check from `plugin.xml` -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest -* [CB-9972](https://issues.apache.org/jira/browse/CB-9972) - Remove **iOS** whitelist -* Updated the text, it should read 4.0.x and greater, since this plugin will be required for `cordova-android 5.0` -* Fixing contribute link. -* Updated `plugin.xml ` tag to remove warning about not needing this plugin if you are using the **iOS 9 SDK** -* [CB-9738](https://issues.apache.org/jira/browse/CB-9738) - Disable whitelist use when runtime environment is **iOS 9** -* [CB-9740](https://issues.apache.org/jira/browse/CB-9740) - Add `` tag describing whitelist plugin not needed on `cordova-ios` and cordova-android 3.x` -* [CB-9568](https://issues.apache.org/jira/browse/CB-9568) - Update whitelist plugin to allow all network access by default -* [CB-9337](https://issues.apache.org/jira/browse/CB-9337) - enable use of `` tags for native code network requests - -### 1.1.0 (Jun 17, 2015) -* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-whitelist documentation translation: cordova-plugin-whitelist -* fix npm md issue -* Usage of CDVURLRequestFilter protocol. -* [CB-9089](https://issues.apache.org/jira/browse/CB-9089) - iOS whitelist plugin does not compile -* [CB-9090](https://issues.apache.org/jira/browse/CB-9090) - Enable whitelist plugin for cordova-ios 4.0.0 -* Fixed error in Content-Security-Policy example - -### 1.0.0 (Mar 25, 2015) -* [CB-8739](https://issues.apache.org/jira/browse/CB-8739) added missing license headers -* Add @Override to CustomConfigXmlParser methods -* Change ID to cordova-plugin-whitelist rather than reverse-DNS-style -* Tweak CSP examples in README -* [CB-8660](https://issues.apache.org/jira/browse/CB-8660) remove extra commas from package.json diff --git a/plugins/cordova-plugin-whitelist/package.json b/plugins/cordova-plugin-whitelist/package.json deleted file mode 100644 index 4f4555365..000000000 --- a/plugins/cordova-plugin-whitelist/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "cordova-plugin-whitelist@1.3.5", - "_id": "cordova-plugin-whitelist@1.3.5", - "_inBundle": false, - "_integrity": "sha512-+v/VzCYBdGsIxJTP2m+RWaq7l/NLu7b976w6XGJUFiN2TVOeaGrytaR4jRy0w9akRai8uKFeBmuGHmlS/sOeCA==", - "_location": "/cordova-plugin-whitelist", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "cordova-plugin-whitelist@1.3.5", - "name": "cordova-plugin-whitelist", - "escapedName": "cordova-plugin-whitelist", - "rawSpec": "1.3.5", - "saveSpec": null, - "fetchSpec": "1.3.5" - }, - "_requiredBy": [ - "#DEV:/", - "#USER" - ], - "_resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.5.tgz", - "_shasum": "13e1a6036f1c972135ad48cedeedd897baadf797", - "_spec": "cordova-plugin-whitelist@1.3.5", - "_where": "/mnt/sdb1/cordova/acode", - "author": { - "name": "Apache Software Foundation" - }, - "bugs": { - "url": "https://github.com/apache/cordova-plugin-whitelist/issues" - }, - "bundleDependencies": false, - "cordova": { - "platforms": [ - "android" - ] - }, - "deprecated": false, - "description": "Cordova Whitelist Plugin", - "engines": { - "cordovaDependencies": { - "0.0.0": { - "cordova-android": ">=4.0.0" - }, - "1.3.5": { - "cordova-android": ">=4.0.0 <10.0.0" - } - } - }, - "homepage": "https://github.com/apache/cordova-plugin-whitelist#readme", - "keywords": [ - "cordova", - "whitelist", - "ecosystem:cordova", - "cordova-android" - ], - "license": "Apache-2.0", - "name": "cordova-plugin-whitelist", - "repository": { - "type": "git", - "url": "git+https://github.com/apache/cordova-plugin-whitelist.git" - }, - "scripts": { - "test": "echo \"no tests implemented for this plugin\"" - }, - "version": "1.3.5" -} diff --git a/plugins/cordova-plugin-whitelist/plugin.xml b/plugins/cordova-plugin-whitelist/plugin.xml deleted file mode 100644 index 74d82014e..000000000 --- a/plugins/cordova-plugin-whitelist/plugin.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - Whitelist - Cordova Network Whitelist Plugin - Apache 2.0 - cordova,whitelist,policy - - - - - - - - - - - - - - - - - diff --git a/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java b/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java deleted file mode 100644 index 365678864..000000000 --- a/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. -*/ - -package org.apache.cordova.whitelist; - -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.ConfigXmlParser; -import org.apache.cordova.LOG; -import org.apache.cordova.Whitelist; -import org.xmlpull.v1.XmlPullParser; - -import android.content.Context; - -public class WhitelistPlugin extends CordovaPlugin { - private static final String LOG_TAG = "WhitelistPlugin"; - private Whitelist allowedNavigations; - private Whitelist allowedIntents; - private Whitelist allowedRequests; - - // Used when instantiated via reflection by PluginManager - public WhitelistPlugin() { - } - // These can be used by embedders to allow Java-configuration of whitelists. - public WhitelistPlugin(Context context) { - this(new Whitelist(), new Whitelist(), null); - new CustomConfigXmlParser().parse(context); - } - public WhitelistPlugin(XmlPullParser xmlParser) { - this(new Whitelist(), new Whitelist(), null); - new CustomConfigXmlParser().parse(xmlParser); - } - public WhitelistPlugin(Whitelist allowedNavigations, Whitelist allowedIntents, Whitelist allowedRequests) { - if (allowedRequests == null) { - allowedRequests = new Whitelist(); - allowedRequests.addWhiteListEntry("file:///*", false); - allowedRequests.addWhiteListEntry("data:*", false); - } - this.allowedNavigations = allowedNavigations; - this.allowedIntents = allowedIntents; - this.allowedRequests = allowedRequests; - } - @Override - public void pluginInitialize() { - if (allowedNavigations == null) { - allowedNavigations = new Whitelist(); - allowedIntents = new Whitelist(); - allowedRequests = new Whitelist(); - new CustomConfigXmlParser().parse(webView.getContext()); - } - } - - private class CustomConfigXmlParser extends ConfigXmlParser { - @Override - public void handleStartTag(XmlPullParser xml) { - String strNode = xml.getName(); - if (strNode.equals("content")) { - String startPage = xml.getAttributeValue(null, "src"); - allowedNavigations.addWhiteListEntry(startPage, false); - } else if (strNode.equals("allow-navigation")) { - String origin = xml.getAttributeValue(null, "href"); - if ("*".equals(origin)) { - allowedNavigations.addWhiteListEntry("http://*/*", false); - allowedNavigations.addWhiteListEntry("https://*/*", false); - allowedNavigations.addWhiteListEntry("data:*", false); - } else { - allowedNavigations.addWhiteListEntry(origin, false); - } - } else if (strNode.equals("allow-intent")) { - String origin = xml.getAttributeValue(null, "href"); - allowedIntents.addWhiteListEntry(origin, false); - } else if (strNode.equals("access")) { - String origin = xml.getAttributeValue(null, "origin"); - String subdomains = xml.getAttributeValue(null, "subdomains"); - boolean external = (xml.getAttributeValue(null, "launch-external") != null); - if (origin != null) { - if (external) { - LOG.w(LOG_TAG, "Found within config.xml. Please use instead."); - allowedIntents.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0)); - } else { - if ("*".equals(origin)) { - allowedRequests.addWhiteListEntry("http://*/*", false); - allowedRequests.addWhiteListEntry("https://*/*", false); - } else { - allowedRequests.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0)); - } - } - } - } - } - @Override - public void handleEndTag(XmlPullParser xml) { - } - } - - @Override - public Boolean shouldAllowNavigation(String url) { - if (allowedNavigations.isUrlWhiteListed(url)) { - return true; - } - return null; // Default policy - } - - @Override - public Boolean shouldAllowRequest(String url) { - if (Boolean.TRUE == shouldAllowNavigation(url)) { - return true; - } - if (allowedRequests.isUrlWhiteListed(url)) { - return true; - } - return null; // Default policy - } - - @Override - public Boolean shouldOpenExternalUrl(String url) { - if (allowedIntents.isUrlWhiteListed(url)) { - return true; - } - return null; // Default policy - } - - public Whitelist getAllowedNavigations() { - return allowedNavigations; - } - - public void setAllowedNavigations(Whitelist allowedNavigations) { - this.allowedNavigations = allowedNavigations; - } - - public Whitelist getAllowedIntents() { - return allowedIntents; - } - - public void setAllowedIntents(Whitelist allowedIntents) { - this.allowedIntents = allowedIntents; - } - - public Whitelist getAllowedRequests() { - return allowedRequests; - } - - public void setAllowedRequests(Whitelist allowedRequests) { - this.allowedRequests = allowedRequests; - } -} diff --git a/plugins/fetch.json b/plugins/fetch.json deleted file mode 100644 index 62bd98960..000000000 --- a/plugins/fetch.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cordova-clipboard": { - "source": { - "type": "registry", - "id": "cordova-clipboard" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-vibration": { - "source": { - "type": "registry", - "id": "cordova-plugin-vibration" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-file": { - "source": { - "type": "registry", - "id": "cordova-plugin-file@6.0.2" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-buildinfo": { - "source": { - "type": "registry", - "id": "cordova-plugin-buildinfo@4.0.0" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-device": { - "source": { - "type": "registry", - "id": "cordova-plugin-device" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-whitelist": { - "source": { - "type": "registry", - "id": "cordova-plugin-whitelist@1.3.5" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-ftp": { - "source": { - "type": "local", - "path": "D:\\Github\\deadlyjack\\Acode\\node_modules\\cordova-plugin-ftp" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-webserver": { - "source": { - "type": "local", - "path": "D:\\Github\\deadlyjack\\Acode\\node_modules\\cordova-plugin-webserver" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-sftp": { - "source": { - "type": "local", - "path": "D:\\Github\\deadlyjack\\Acode\\node_modules\\cordova-plugin-sftp" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-iap": { - "source": { - "type": "local", - "path": "D:\\Github\\deadlyjack\\Acode\\node_modules\\cordova-plugin-iap" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-sdcard": { - "source": { - "type": "registry", - "id": "cordova-plugin-sdcard" - }, - "is_top_level": true, - "variables": {} - }, - "cordova-plugin-system": { - "source": { - "type": "local", - "path": "D:\\Github\\deadlyjack\\Acode\\node_modules\\cordova-plugin-system" - }, - "is_top_level": true, - "variables": {} - } -} \ No newline at end of file diff --git a/readme.md b/readme.md index ce3df22e7..a9028f036 100644 --- a/readme.md +++ b/readme.md @@ -1,55 +1,117 @@ -# Acode editor (Code editor for android) +# Acode - Code Editor for Android -![logo](./res/icon/android/ic_launcher-web.png) +

+ +

-This is a hybrid app using Apache Cordova. This app is published on play store. Check it out from [here](https://acode.foxdebug.com). +[![](https://img.shields.io/endpoint?logo=telegram&label=Acode&style=flat&url=https%3A%2F%2Facode.app%2Fapi%2Ftelegram-members-count)](https://t.me/foxdebug_acode) [![](https://dcbadge.vercel.app/api/server/vVxVWYUAWD?style=flat)](https://discord.gg/vVxVWYUAWD) -Note: This project is not organised and it is very hard understand the project structure. I'll try to make it clear as possible. +## • Overview -[Get it on F-Droid](https://f-droid.org/packages/com.foxdebug.acode/) -[Get it on Google Play](https://play.google.com/store/apps/details?id=com.foxdebug.acodefree) +Welcome to Acode Editor - a powerful and versatile code editing tool designed specifically for Android devices. Whether you're working on HTML, CSS, JavaScript, or other programming languages, Acode empowers you to code on-the-go with confidence. -## Project structure +## • Features -- `src` (directory) contains all raw codes -- `www` (directory) contains public documents, built javascript and css files, language files and HTML files -- `utils` (directory) contains the cli tool to manipulate or add string to all languages easily +- Edit and create websites, and instantly preview them in a browser. +- Seamlessly modify source files for various languages like Python, Java, JavaScript, and more. +- Built-in javascript console +- Enjoy multi-language editing support with easy management tools. +- Enjoy a large collections of community plugins to enhance your coding experience. -## Multi language support +## • Installation -To add new language, create a new file with language code for android (eg. en-us for english) in [`www/lang/`](https://github.com/deadlyjack/code-editor/tree/master/www/lang) directory. After adding new laguage also add it to [`src/constants.js -> langList`](https://github.com/deadlyjack/code-editor/blob/master/src/lib/constants.js#L89). +You can get Acode Editor from popular platforms: -Here are few utility tools to add, remove or search a string in all added languages. +[Get it on Google Play](https://play.google.com/store/apps/details?id=com.foxdebug.acodefree) [Get it on F-Droid](https://www.f-droid.org/packages/com.foxdebug.acode/) -```bash +## • Project Structure + +
+Acode/
+|
+|- src/   - Core code and language files
+|
+|- www/   - Public documents, compiled files, and HTML templates
+|
+|- utils/ - CLI tools for building, string manipulation, and more
+
+ +## • Multi-language Support + +Enhance Acode's capabilities by adding new languages easily. Just create a file with the language code (e.g., en-us for English) in [`src/lang/`](https://github.com/Acode-Foundation/Acode/tree/main/src/lang) and include it in [`src/lib/lang.js`](https://github.com/Acode-Foundation/Acode/blob/main/src/lib/lang.js). Manage strings across languages effortlessly using utility commands: + +```shell yarn lang add yarn lang remove yarn lang search yarn lang update ``` -## How to build +## • Building the Application + +To build the APK, ensure you have Node.js, NPM, and Apache Cordova installed on your device. Use Cordova CLI to build the application. + +1. Initial setup (required only once): + +```shell +yarn setup +``` + +2. Build the project: + +```shell +yarn build [fdroid] +``` + +**Note**: Add the fdroid flag only if you want to build the F-Droid-compatible version of Acode. +Omit this flag to build the regular APK (Play Store or normal version). + +## • Contributing + +Acode Editor is an open-source project, and we welcome contributions from the community. To contribute, follow these steps: + +1. Fork the repository. +2. Make your changes and commit them.(make branch for each feature or bug fix) +3. Push your changes to your fork. +4. Create a pull request from your branch to main branch of this repository with proper description and Wait for review. + +> [!Note] +> Ensure your pull request includes: +> - A clear description of the changes made or problem or feature. +> - A reference to the issue being addressed (if applicable). +> - A clear explanation of the solution or implementation. +> - Screenshots or GIFs (if applicable). + +Please ensure that your code is clean, well-formatted, and follows the project's coding standards. Acode uses [Biomejs](https://biomejs.dev/) for formatting and linting and [typos](https://github.com/crate-ci/typos) for low false positives source code spell checking. You can use following commands to lints/format your code locally: +```shell +yarn lint # for linting +yarn format # for formatting +yarn check # it runs both lint and format +``` +Also, ensure that your code is well-documented and includes comments where necessary. + +> [!Note] +> You can use any package manager like npm or yarn or pnpm or bun. +> You can use your editor specific Biomejs plugin for auto-formatting and linting based on Acode's configs. + +## • Contributors + + + + -In order to build the app you must have Nodejs, NPM and Apache Cordova installed on your device. Use Cordova CLI to build application. +## • Developing a Plugin for Acode -First run `npm install` to install all dependencies, then run `webpack` to build src and then run `cordova build android`. +For comprehensive documentation on creating plugins for Acode Editor, visit the [repository](https://github.com/Acode-Foundation/acode-plugin). -If you have installed yarn you can simply run `yarn build-run` to build the apk and run on connect android device or emulator. +For plugin development information, refer to: [Acode Plugin Documentation](https://docs.acode.app/) -## Special thanks to +## Star History -- [Ace editor](https://ace.c9.io/) -- [Autosize](http://www.jacklmoore.com/autosize/) -- [Apache cordova](https://cordova.apache.org/) -- [babeljs.io](https://babeljs.io/) -- [Cordova plugin intent](https://github.com/napolitano/cordova-plugin-intent) -- [Esprima](https://esprima.org/) -- [Mustache](https://github.com/janl/mustache.js) -- [Marked](https://marked.js.org/) -- [Mime types](https://www.npmjs.com/package/mime-types) -- [Webpack](https://webpack.js.org/) -- [Vanilla picker](https://vanilla-picker.js.org/) + + + + + Star History Chart + + diff --git a/res/android/drawable/ic_launcher_background.xml b/res/android/drawable/ic_launcher_background.xml new file mode 100644 index 000000000..07d5da9cb --- /dev/null +++ b/res/android/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/android/drawable/ic_launcher_foreground.xml b/res/android/drawable/ic_launcher_foreground.xml new file mode 100644 index 000000000..1668f1856 --- /dev/null +++ b/res/android/drawable/ic_launcher_foreground.xml @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/res/android/mipmap-anydpi-v26/ic_launcher.xml b/res/android/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 000000000..ef49c9917 --- /dev/null +++ b/res/android/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/res/android/mipmap-anydpi-v26/ic_launcher_round.xml b/res/android/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 000000000..ef49c9917 --- /dev/null +++ b/res/android/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/res/android/mipmap-hdpi/ic_launcher.webp b/res/android/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 000000000..3e84cbac5 Binary files /dev/null and b/res/android/mipmap-hdpi/ic_launcher.webp differ diff --git a/res/android/mipmap-hdpi/ic_launcher_round.webp b/res/android/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 000000000..3e84cbac5 Binary files /dev/null and b/res/android/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/res/android/mipmap-mdpi/ic_launcher.webp b/res/android/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 000000000..13dd422cb Binary files /dev/null and b/res/android/mipmap-mdpi/ic_launcher.webp differ diff --git a/res/android/mipmap-mdpi/ic_launcher_round.webp b/res/android/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 000000000..13dd422cb Binary files /dev/null and b/res/android/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/res/android/mipmap-xhdpi/ic_launcher.webp b/res/android/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 000000000..fb625ad09 Binary files /dev/null and b/res/android/mipmap-xhdpi/ic_launcher.webp differ diff --git a/res/android/mipmap-xhdpi/ic_launcher_round.webp b/res/android/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 000000000..fb625ad09 Binary files /dev/null and b/res/android/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/res/android/mipmap-xxhdpi/ic_launcher.webp b/res/android/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 000000000..355b2cf13 Binary files /dev/null and b/res/android/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/res/android/mipmap-xxhdpi/ic_launcher_round.webp b/res/android/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 000000000..355b2cf13 Binary files /dev/null and b/res/android/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/res/android/mipmap-xxxhdpi/ic_launcher.webp b/res/android/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 000000000..3f7e272c1 Binary files /dev/null and b/res/android/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/res/android/mipmap-xxxhdpi/ic_launcher_round.webp b/res/android/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 000000000..3f7e272c1 Binary files /dev/null and b/res/android/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/res/android/values/colors.xml b/res/android/values/colors.xml new file mode 100644 index 000000000..6b5433be0 --- /dev/null +++ b/res/android/values/colors.xml @@ -0,0 +1,4 @@ + + + #3a3e54 + \ No newline at end of file diff --git a/res/android/values/ic_launcher_background.xml b/res/android/values/ic_launcher_background.xml new file mode 100644 index 000000000..228fb4634 --- /dev/null +++ b/res/android/values/ic_launcher_background.xml @@ -0,0 +1,5 @@ + + + #3a3e54 + #3a3e54 + \ No newline at end of file diff --git a/res/android/values/themes.xml b/res/android/values/themes.xml new file mode 100644 index 000000000..feed35132 --- /dev/null +++ b/res/android/values/themes.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/res/android/xml/network_security_config.xml b/res/android/xml/network_security_config.xml new file mode 100644 index 000000000..855a5e4c7 --- /dev/null +++ b/res/android/xml/network_security_config.xml @@ -0,0 +1,15 @@ + + + + + + + + + + * + localhost + + + + diff --git a/res/icon/android/ic_launcher-web.png b/res/icon/android/ic_launcher-web.png deleted file mode 100644 index 842fb5edb..000000000 Binary files a/res/icon/android/ic_launcher-web.png and /dev/null differ diff --git a/res/icon/android/ic_launcher_background.xml b/res/icon/android/ic_launcher_background.xml deleted file mode 100644 index 0d025f9bf..000000000 --- a/res/icon/android/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/res/icon/android/ic_launcher_foreground.xml b/res/icon/android/ic_launcher_foreground.xml deleted file mode 100644 index 1f6bb2906..000000000 --- a/res/icon/android/ic_launcher_foreground.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - diff --git a/res/icon/android/mipmap-anydpi-v26/ic_launcher.xml b/res/icon/android/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 036d09bc5..000000000 --- a/res/icon/android/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/res/icon/android/mipmap-anydpi-v26/ic_launcher_round.xml b/res/icon/android/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index 036d09bc5..000000000 --- a/res/icon/android/mipmap-anydpi-v26/ic_launcher_round.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/res/icon/android/mipmap-hdpi/ic_launcher.png b/res/icon/android/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 90c867342..000000000 Binary files a/res/icon/android/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/res/icon/android/mipmap-hdpi/ic_launcher_foreground.png b/res/icon/android/mipmap-hdpi/ic_launcher_foreground.png deleted file mode 100644 index 16e002e0c..000000000 Binary files a/res/icon/android/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/res/icon/android/mipmap-hdpi/ic_launcher_round.png b/res/icon/android/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 477b42ba5..000000000 Binary files a/res/icon/android/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/res/icon/android/mipmap-mdpi/ic_launcher.png b/res/icon/android/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index a9bfa541f..000000000 Binary files a/res/icon/android/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/res/icon/android/mipmap-mdpi/ic_launcher_foreground.png b/res/icon/android/mipmap-mdpi/ic_launcher_foreground.png deleted file mode 100644 index 836c6dd55..000000000 Binary files a/res/icon/android/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/res/icon/android/mipmap-mdpi/ic_launcher_round.png b/res/icon/android/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 5f3ecb559..000000000 Binary files a/res/icon/android/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/res/icon/android/mipmap-xhdpi/ic_launcher.png b/res/icon/android/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 8fc0210d6..000000000 Binary files a/res/icon/android/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/res/icon/android/mipmap-xhdpi/ic_launcher_foreground.png b/res/icon/android/mipmap-xhdpi/ic_launcher_foreground.png deleted file mode 100644 index 927695afd..000000000 Binary files a/res/icon/android/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/res/icon/android/mipmap-xhdpi/ic_launcher_round.png b/res/icon/android/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 4aadc55e2..000000000 Binary files a/res/icon/android/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/res/icon/android/mipmap-xxhdpi/ic_launcher.png b/res/icon/android/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 6994d57da..000000000 Binary files a/res/icon/android/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/res/icon/android/mipmap-xxhdpi/ic_launcher_foreground.png b/res/icon/android/mipmap-xxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 75dcd23d6..000000000 Binary files a/res/icon/android/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/res/icon/android/mipmap-xxhdpi/ic_launcher_round.png b/res/icon/android/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 6dee5e3ab..000000000 Binary files a/res/icon/android/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/res/icon/android/mipmap-xxxhdpi/ic_launcher_foreground.png b/res/icon/android/mipmap-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index da4856d39..000000000 Binary files a/res/icon/android/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/res/icon/android/mipmap-xxxhdpi/ic_launcher_round.png b/res/icon/android/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 44ef718a0..000000000 Binary files a/res/icon/android/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/res/icon/android/values/colors.xml b/res/icon/android/values/colors.xml deleted file mode 100644 index 69b22338c..000000000 --- a/res/icon/android/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #008577 - #00574B - #D81B60 - diff --git a/res/icon/android/values/ic_launcher_background.xml b/res/icon/android/values/ic_launcher_background.xml deleted file mode 100644 index 93ac3e369..000000000 --- a/res/icon/android/values/ic_launcher_background.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #3a3e54 - \ No newline at end of file diff --git a/res/network_security_config.xml b/res/network_security_config.xml deleted file mode 100644 index bac920830..000000000 --- a/res/network_security_config.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/res/screenshots/console-phone.png b/res/screenshots/console-phone.png deleted file mode 100644 index de5cda3bb..000000000 Binary files a/res/screenshots/console-phone.png and /dev/null differ diff --git a/res/screenshots/console.png b/res/screenshots/console.png deleted file mode 100644 index 492bc62c4..000000000 Binary files a/res/screenshots/console.png and /dev/null differ diff --git a/res/screenshots/free/ftp-accounts.png b/res/screenshots/free/ftp-accounts.png deleted file mode 100644 index 722af5b8e..000000000 Binary files a/res/screenshots/free/ftp-accounts.png and /dev/null differ diff --git a/res/screenshots/free/ftp-add-account.png b/res/screenshots/free/ftp-add-account.png deleted file mode 100644 index 0530e620f..000000000 Binary files a/res/screenshots/free/ftp-add-account.png and /dev/null differ diff --git a/res/screenshots/free/github.png b/res/screenshots/free/github.png deleted file mode 100644 index 6b0433940..000000000 Binary files a/res/screenshots/free/github.png and /dev/null differ diff --git a/res/screenshots/free/home.png b/res/screenshots/free/home.png deleted file mode 100644 index 8e521761b..000000000 Binary files a/res/screenshots/free/home.png and /dev/null differ diff --git a/res/screenshots/free/menu.png b/res/screenshots/free/menu.png deleted file mode 100644 index 5c2d7b03c..000000000 Binary files a/res/screenshots/free/menu.png and /dev/null differ diff --git a/res/screenshots/free/new-project.png b/res/screenshots/free/new-project.png deleted file mode 100644 index 7d92bca2b..000000000 Binary files a/res/screenshots/free/new-project.png and /dev/null differ diff --git a/res/screenshots/free/phone/add-ftp-account.png b/res/screenshots/free/phone/add-ftp-account.png deleted file mode 100644 index fb4156812..000000000 Binary files a/res/screenshots/free/phone/add-ftp-account.png and /dev/null differ diff --git a/res/screenshots/free/phone/ftp-accounts.png b/res/screenshots/free/phone/ftp-accounts.png deleted file mode 100644 index 007da7986..000000000 Binary files a/res/screenshots/free/phone/ftp-accounts.png and /dev/null differ diff --git a/res/screenshots/free/phone/github.png b/res/screenshots/free/phone/github.png deleted file mode 100644 index 5445508d5..000000000 Binary files a/res/screenshots/free/phone/github.png and /dev/null differ diff --git a/res/screenshots/free/phone/home.png b/res/screenshots/free/phone/home.png deleted file mode 100644 index d9fef7aa7..000000000 Binary files a/res/screenshots/free/phone/home.png and /dev/null differ diff --git a/res/screenshots/free/phone/new-project.png b/res/screenshots/free/phone/new-project.png deleted file mode 100644 index 1b2ab9b6d..000000000 Binary files a/res/screenshots/free/phone/new-project.png and /dev/null differ diff --git a/res/screenshots/free/phone/repositories.png b/res/screenshots/free/phone/repositories.png deleted file mode 100644 index 433f67aff..000000000 Binary files a/res/screenshots/free/phone/repositories.png and /dev/null differ diff --git a/res/screenshots/free/phone/select-color.png b/res/screenshots/free/phone/select-color.png deleted file mode 100644 index 2dc843cc9..000000000 Binary files a/res/screenshots/free/phone/select-color.png and /dev/null differ diff --git a/res/screenshots/free/preview.png b/res/screenshots/free/preview.png deleted file mode 100644 index 22577f789..000000000 Binary files a/res/screenshots/free/preview.png and /dev/null differ diff --git a/res/screenshots/free/repositories.png b/res/screenshots/free/repositories.png deleted file mode 100644 index 244e28dc1..000000000 Binary files a/res/screenshots/free/repositories.png and /dev/null differ diff --git a/res/screenshots/free/select-color.png b/res/screenshots/free/select-color.png deleted file mode 100644 index e65a81a5e..000000000 Binary files a/res/screenshots/free/select-color.png and /dev/null differ diff --git a/res/screenshots/paid/color-selector.png b/res/screenshots/paid/color-selector.png deleted file mode 100644 index 805829cb5..000000000 Binary files a/res/screenshots/paid/color-selector.png and /dev/null differ diff --git a/res/screenshots/paid/ftp-accounts.png b/res/screenshots/paid/ftp-accounts.png deleted file mode 100644 index f8825cfe2..000000000 Binary files a/res/screenshots/paid/ftp-accounts.png and /dev/null differ diff --git a/res/screenshots/paid/ftp-add-account.png b/res/screenshots/paid/ftp-add-account.png deleted file mode 100644 index 555c71143..000000000 Binary files a/res/screenshots/paid/ftp-add-account.png and /dev/null differ diff --git a/res/screenshots/paid/github.png b/res/screenshots/paid/github.png deleted file mode 100644 index 414bb74da..000000000 Binary files a/res/screenshots/paid/github.png and /dev/null differ diff --git a/res/screenshots/paid/home.png b/res/screenshots/paid/home.png deleted file mode 100644 index 475edb86d..000000000 Binary files a/res/screenshots/paid/home.png and /dev/null differ diff --git a/res/screenshots/paid/new-projects.png b/res/screenshots/paid/new-projects.png deleted file mode 100644 index d9dc7ee22..000000000 Binary files a/res/screenshots/paid/new-projects.png and /dev/null differ diff --git a/res/screenshots/paid/phone/add-ftp-account.png b/res/screenshots/paid/phone/add-ftp-account.png deleted file mode 100644 index 99a861e45..000000000 Binary files a/res/screenshots/paid/phone/add-ftp-account.png and /dev/null differ diff --git a/res/screenshots/paid/phone/ftp-accounts.png b/res/screenshots/paid/phone/ftp-accounts.png deleted file mode 100644 index 9f9afc9d7..000000000 Binary files a/res/screenshots/paid/phone/ftp-accounts.png and /dev/null differ diff --git a/res/screenshots/paid/phone/github.png b/res/screenshots/paid/phone/github.png deleted file mode 100644 index e6294c4c0..000000000 Binary files a/res/screenshots/paid/phone/github.png and /dev/null differ diff --git a/res/screenshots/paid/phone/home.png b/res/screenshots/paid/phone/home.png deleted file mode 100644 index 79479be74..000000000 Binary files a/res/screenshots/paid/phone/home.png and /dev/null differ diff --git a/res/screenshots/paid/phone/menu.png b/res/screenshots/paid/phone/menu.png deleted file mode 100644 index 3b7c1061e..000000000 Binary files a/res/screenshots/paid/phone/menu.png and /dev/null differ diff --git a/res/screenshots/paid/phone/new-project.png b/res/screenshots/paid/phone/new-project.png deleted file mode 100644 index 23a65de8c..000000000 Binary files a/res/screenshots/paid/phone/new-project.png and /dev/null differ diff --git a/res/screenshots/paid/phone/repositories.png b/res/screenshots/paid/phone/repositories.png deleted file mode 100644 index d9cdf731e..000000000 Binary files a/res/screenshots/paid/phone/repositories.png and /dev/null differ diff --git a/res/screenshots/paid/phone/select-color-phone.png b/res/screenshots/paid/phone/select-color-phone.png deleted file mode 100644 index 981dca699..000000000 Binary files a/res/screenshots/paid/phone/select-color-phone.png and /dev/null differ diff --git a/res/screenshots/paid/preview.png b/res/screenshots/paid/preview.png deleted file mode 100644 index fe7c77ca2..000000000 Binary files a/res/screenshots/paid/preview.png and /dev/null differ diff --git a/res/screenshots/paid/repositories.png b/res/screenshots/paid/repositories.png deleted file mode 100644 index 25497ae89..000000000 Binary files a/res/screenshots/paid/repositories.png and /dev/null differ diff --git a/src/ace/ace.js b/src/ace/ace.js deleted file mode 100644 index a2e2fbd8e..000000000 --- a/src/ace/ace.js +++ /dev/null @@ -1,24197 +0,0 @@ -/* ***** 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 ***** */ -//jshint ignore: start -/** - * 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/fixoldbrowsers', ['require', 'exports', 'module'], function ( - require, - exports, - module, -) { - 'use strict'; - if (typeof Element != 'undefined' && !Element.prototype.remove) { - Object.defineProperty(Element.prototype, 'remove', { - enumerable: false, - writable: true, - configurable: true, - value: function () { - this.parentNode && this.parentNode.removeChild(this); - }, - }); - } -}); - -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.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; - } - }; - - 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 (document) { - 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 = document.documentElement; - 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/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/keys', [ - 'require', - 'exports', - 'module', - 'ace/lib/oop', -], function (require, exports, module) { - 'use strict'; - - var oop = require('./oop'); - var Keys = (function () { - var ret = { - 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', - 96: 'Numpad0', - 97: 'Numpad1', - 98: 'Numpad2', - 99: 'Numpad3', - 100: 'Numpad4', - 101: 'Numpad5', - 102: 'Numpad6', - 103: 'Numpad7', - 104: 'Numpad8', - 105: 'Numpad9', - '-13': 'NumpadEnter', - 112: 'F1', - 113: 'F2', - 114: 'F3', - 115: 'F4', - 116: 'F5', - 117: 'F6', - 118: 'F7', - 119: 'F8', - 120: 'F9', - 121: 'F10', - 122: 'F11', - 123: 'F12', - 144: 'Numlock', - 145: 'Scrolllock', - }, - - PRINTABLE_KEYS: { - 32: ' ', - 48: '0', - 49: '1', - 50: '2', - 51: '3', - 52: '4', - 53: '5', - 54: '6', - 55: '7', - 56: '8', - 57: '9', - 59: ';', - 61: '=', - 65: 'a', - 66: 'b', - 67: 'c', - 68: 'd', - 69: 'e', - 70: 'f', - 71: 'g', - 72: 'h', - 73: 'i', - 74: 'j', - 75: 'k', - 76: 'l', - 77: 'm', - 78: 'n', - 79: 'o', - 80: 'p', - 81: 'q', - 82: 'r', - 83: 's', - 84: 't', - 85: 'u', - 86: 'v', - 87: 'w', - 88: 'x', - 89: 'y', - 90: 'z', - 107: '+', - 109: '-', - 110: '.', - 186: ';', - 187: '=', - 188: ',', - 189: '-', - 190: '.', - 191: '/', - 192: '`', - 219: '[', - 220: '\\', - 221: ']', - 222: "'", - 111: '/', - 106: '*', - }, - }; - var name, i; - for (i in ret.FUNCTION_KEYS) { - name = ret.FUNCTION_KEYS[i].toLowerCase(); - ret[name] = parseInt(i, 10); - } - for (i in ret.PRINTABLE_KEYS) { - name = ret.PRINTABLE_KEYS[i].toLowerCase(); - ret[name] = parseInt(i, 10); - } - oop.mixin(ret, ret.MODIFIER_KEYS); - oop.mixin(ret, ret.PRINTABLE_KEYS); - oop.mixin(ret, ret.FUNCTION_KEYS); - ret.enter = ret['return']; - ret.escape = ret.esc; - ret.del = ret['delete']; - ret[173] = '-'; - - (function () { - var mods = ['cmd', 'ctrl', 'alt', 'shift']; - for (var i = Math.pow(2, mods.length); i--; ) { - ret.KEY_MODS[i] = - mods - .filter(function (x) { - return i & ret.KEY_MODS[x]; - }) - .join('-') + '-'; - } - })(); - - ret.KEY_MODS[0] = ''; - ret.KEY_MODS[-1] = 'input-'; - - return ret; - })(); - oop.mixin(exports, Keys); - - 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, - }; - }, - }); - } 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, - 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) { - if ('onmousewheel' in el) { - addListener( - el, - 'mousewheel', - function (e) { - var factor = 8; - if (e.wheelDeltaX !== undefined) { - e.wheelX = -e.wheelDeltaX / factor; - e.wheelY = -e.wheelDeltaY / factor; - } else { - e.wheelX = 0; - e.wheelY = -e.wheelDelta / factor; - } - callback(e); - }, - destroyer, - ); - } else if ('onwheel' in el) { - addListener( - el, - 'wheel', - function (e) { - var factor = 0.35; - switch (e.deltaMode) { - case e.DOM_DELTA_PIXEL: - e.wheelX = e.deltaX * factor || 0; - e.wheelY = e.deltaY * factor || 0; - break; - case e.DOM_DELTA_LINE: - case e.DOM_DELTA_PAGE: - e.wheelX = (e.deltaX || 0) * 5; - e.wheelY = (e.deltaY || 0) * 5; - break; - } - - callback(e); - }, - destroyer, - ); - } else { - addListener( - el, - 'DOMMouseScroll', - function (e) { - if (e.axis && e.axis == e.HORIZONTAL_AXIS) { - e.wheelX = (e.detail || 0) * 5; - e.wheelY = 0; - } else { - e.wheelX = 0; - e.wheelY = (e.detail || 0) * 5; - } - 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); - }); - }; - - var getModifierHash = function (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 (!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 = 'location' in e ? e.location : e.keyLocation; - 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) { - var location = 'location' in e ? e.location : e.keyLocation; - if (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) { - if ( - useragent.isOldGecko || - (useragent.isOpera && !('KeyboardEvent' in window)) - ) { - var lastKeyDownKeyCode = null; - addListener( - el, - 'keydown', - function (e) { - lastKeyDownKeyCode = e.keyCode; - }, - destroyer, - ); - addListener( - el, - 'keypress', - function (e) { - return normalizeCommandKeys(callback, e, lastKeyDownKeyCode); - }, - destroyer, - ); - } else { - 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/range', ['require', 'exports', 'module'], function ( - require, - exports, - module, -) { - 'use strict'; - var comparePoints = function (p1, p2) { - return p1.row - p2.row || p1.column - p2.column; - }; - var Range = function (startRow, startColumn, endRow, endColumn) { - this.start = { - row: startRow, - column: startColumn, - }; - - this.end = { - row: endRow, - column: endColumn, - }; - }; - - (function () { - this.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 - ); - }; - this.toString = function () { - return ( - 'Range: [' + - this.start.row + - '/' + - this.start.column + - '] -> [' + - this.end.row + - '/' + - this.end.column + - ']' - ); - }; - - this.contains = function (row, column) { - return this.compare(row, column) == 0; - }; - this.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; - } - } - }; - this.comparePoint = function (p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function (range) { - return ( - this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0 - ); - }; - this.intersects = function (range) { - var cmp = this.compareRange(range); - return cmp == -1 || cmp == 0 || cmp == 1; - }; - this.isEnd = function (row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function (row, column) { - return this.start.row == row && this.start.column == column; - }; - this.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; - } - }; - this.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; - } - }; - this.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; - }; - this.insideStart = function (row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function (row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.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; - }; - this.compareStart = function (row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function (row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.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); - } - }; - this.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); - }; - this.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); - }; - - this.isEmpty = function () { - return ( - this.start.row === this.end.row && this.start.column === this.end.column - ); - }; - this.isMultiLine = function () { - return this.start.row !== this.end.row; - }; - this.clone = function () { - return Range.fromPoints(this.start, this.end); - }; - this.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); - }; - this.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, - ); - }; - this.moveBy = function (row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - }.call(Range.prototype)); - Range.fromPoints = function (start, end) { - return new Range(start.row, start.column, end.row, end.column); - }; - Range.comparePoints = comparePoints; - - Range.comparePoints = function (p1, p2) { - return p1.row - p2.row || p1.column - p2.column; - }; - - exports.Range = Range; -}); - -define('ace/lib/lang', ['require', 'exports', 'module'], 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 = 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; - }; - - 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(/ Date.now() - 50) return true; - return ($cancelT = false); - }, - cancel: function () { - $cancelT = Date.now(); - }, - }; -}); - -define('ace/keyboard/textinput', [ - 'require', - 'exports', - 'module', - 'ace/lib/event', - '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 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 = 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; - try { - var isFocused = document.activeElement === text; - } catch (e) {} - - 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 () { - 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 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; - selectionStart = range.start.column; - selectionEnd = range.end.column; - line = host.session.getLine(row); - - if (range.start.row != row) { - var prevLine = host.session.getLine(row - 1); - selectionStart = range.start.row < row - 1 ? 0 : selectionStart; - selectionEnd += prevLine.length + 1; - line = prevLine + '\n' + line; - } else if (range.end.row != row) { - var nextLine = host.session.getLine(row + 1); - selectionEnd = - range.end.row > row + 1 ? nextLine.length : selectionEnd; - 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, host.onCommandKey.bind(host), 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) { - //DONOTREMOVE - //To prevent app from closing. - if (e.keyCode == 27) e.preventDefault(); - 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) {}; - - //DO NOT CHANGE - //TO prevent native context menu - this.onContextMenu = function (e) { - e.preventDefault(); - - afterContextMenu = true; - resetSelection(); - - 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); - }); - } - }; - - 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 - - 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', - ); - } - - (function () { - this.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(); - }; - - this.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(); - if (editor.renderer.scroller.setCapture) { - editor.renderer.scroller.setCapture(); - } - editor.setStyle('ace_selecting'); - this.setState('select'); - }; - - this.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(); - }; - - this.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(); - }; - - this.selectEnd = - this.selectAllEnd = - this.selectByWordsEnd = - this.selectByLinesEnd = - function () { - this.$clickSelection = null; - this.editor.unsetStyle('ace_selecting'); - if (this.editor.renderer.scroller.releaseCapture) { - this.editor.renderer.scroller.releaseCapture(); - } - }; - - this.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()); - }; - - this.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(); - }; - - this.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(); - }; - - this.onQuadClick = function (ev) { - var editor = this.editor; - - editor.selectAll(); - this.$clickSelection = editor.getSelectionRange(); - this.setState('selectAll'); - }; - - this.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(); - } - }; - }.call(DefaultHandlers.prototype)); - - 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/tooltip', [ - 'require', - 'exports', - 'module', - 'ace/lib/oop', - 'ace/lib/dom', -], function (require, exports, module) { - 'use strict'; - - var oop = require('./lib/oop'); - var dom = require('./lib/dom'); - function Tooltip(parentNode) { - this.isOpen = false; - this.$element = null; - this.$parentNode = parentNode; - } - - (function () { - this.$init = function () { - this.$element = dom.createElement('div'); - this.$element.className = 'ace_tooltip'; - this.$element.style.display = 'none'; - this.$parentNode.appendChild(this.$element); - return this.$element; - }; - this.getElement = function () { - return this.$element || this.$init(); - }; - this.setText = function (text) { - this.getElement().textContent = text; - }; - this.setHtml = function (html) { - this.getElement().innerHTML = html; - }; - this.setPosition = function (x, y) { - this.getElement().style.left = x + 'px'; - this.getElement().style.top = y + 'px'; - }; - this.setClassName = function (className) { - dom.addCssClass(this.getElement(), className); - }; - this.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; - } - }; - - this.hide = function () { - if (this.isOpen) { - this.getElement().style.display = 'none'; - this.isOpen = false; - } - }; - this.getHeight = function () { - return this.getElement().offsetHeight; - }; - this.getWidth = function () { - return this.getElement().offsetWidth; - }; - - this.destroy = function () { - this.isOpen = false; - if (this.$element && this.$element.parentNode) { - this.$element.parentNode.removeChild(this.$element); - } - }; - }.call(Tooltip.prototype)); - - exports.Tooltip = Tooltip; -}); - -define('ace/mouse/default_gutter_handler', [ - 'require', - 'exports', - 'module', - 'ace/lib/dom', - 'ace/lib/oop', - 'ace/lib/event', - 'ace/tooltip', -], function (require, exports, module) { - 'use strict'; - var dom = require('../lib/dom'); - var oop = require('../lib/oop'); - var event = require('../lib/event'); - var Tooltip = require('../tooltip').Tooltip; - - function GutterHandler(mouseHandler) { - var editor = mouseHandler.editor; - var gutter = editor.renderer.$gutterLayer; - var tooltip = new GutterTooltip(editor.container); - - 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, tooltipAnnotation; - - function showTooltip() { - var row = mouseEvent.getDocumentPosition().row; - var annotation = gutter.$annotations[row]; - if (!annotation) return hideTooltip(); - - 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(); - } - - if (tooltipAnnotation == annotation) return; - tooltipAnnotation = annotation.text.join('
'); - - tooltip.setHtml(tooltipAnnotation); - tooltip.show(); - editor._signal('showGutterTooltip', tooltip); - editor.on('mousewheel', hideTooltip); - - if (mouseHandler.$tooltipFollowsMouse) { - moveTooltip(mouseEvent); - } else { - var gutterElement = mouseEvent.domEvent.target; - var rect = gutterElement.getBoundingClientRect(); - var style = tooltip.getElement().style; - style.left = rect.right + 'px'; - style.top = rect.bottom + 'px'; - } - } - - function hideTooltip() { - if (tooltipTimeout) tooltipTimeout = clearTimeout(tooltipTimeout); - if (tooltipAnnotation) { - tooltip.hide(); - tooltipAnnotation = null; - editor._signal('hideGutterTooltip', tooltip); - 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 (tooltipAnnotation && 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 (!tooltipAnnotation || tooltipTimeout) return; - - tooltipTimeout = setTimeout(function () { - tooltipTimeout = null; - hideTooltip(); - }, 50); - }, - editor, - ); - - editor.on('changeSession', hideTooltip); - } - - function GutterTooltip(parentNode) { - Tooltip.call(this, parentNode); - } - - oop.inherits(GutterTooltip, Tooltip); - - (function () { - this.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); - }; - }.call(GutterTooltip.prototype)); - - exports.GutterHandler = GutterHandler; -}); - -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 = (exports.MouseEvent = function (domEvent, editor) { - 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; - }); - - (function () { - this.stopPropagation = function () { - event.stopPropagation(this.domEvent); - this.propagationStopped = true; - }; - - this.preventDefault = function () { - event.preventDefault(this.domEvent); - this.defaultPrevented = true; - }; - - this.stop = function () { - this.stopPropagation(); - this.preventDefault(); - }; - this.getDocumentPosition = function () { - if (this.$pos) return this.$pos; - - this.$pos = this.editor.renderer.screenToTextCoordinates( - this.clientX, - this.clientY, - ); - return this.$pos; - }; - this.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; - }; - this.getButton = function () { - return event.getButton(this.domEvent); - }; - this.getShiftKey = function () { - return this.domEvent.shiftKey; - }; - - this.getAccelKey = useragent.isMac - ? function () { - return this.domEvent.metaKey; - } - : function () { - return this.domEvent.ctrlKey; - }; - }.call(MouseEvent.prototype)); -}); - -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 longTouchTimer; - var pos; - var mvY, - mvX, - animation, - ge, - arX = [], - arY = [], - scrollSpeed = 1; - var config = { - passive: false, - }; - - el.addEventListener('touchstart', touchStart, config); - el.addEventListener('touchmove', touchMove, config); - el.addEventListener('touchend', touchCancel, config); - el.addEventListener('touchcancel', touchCancel, config); - - function touchStart(e) { - if (e.target.parentElement.className === 'clipboard-contextmneu') return; - if (e.target.classList.contains('cursor-control')) return; - cancelAnimationFrame(animation); - var touches = e.touches; - if (longTouchTimer || touches.length > 1) { - clearTimeout(longTouchTimer); - longTouchTimer = null; - touchStartT = -1; - mode = 'zoom'; - return; - } - var h = editor.renderer.layerConfig.lineHeight; - var w = editor.renderer.layerConfig.lineHeight; - var t = e.timeStamp; - 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; - var ev = new MouseEvent(e, editor); - pos = ev.getDocumentPosition(); - if (t - touchStartT < 500 && touches.length == 1) { - e.preventDefault(); - e.button = 0; - } else { - 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 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, - e.clientY - rect.top - cursorPos.top, - ); - var diff2 = weightedDistance( - e.clientX - rect.left - anchorPos.left, - e.clientY - rect.top - anchorPos.top, - ); - 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; - } - - function touchMove(e) { - if (e.target.parentElement.className === 'clipboard-contextmneu') return; - if (e.target.classList.contains('cursor-control')) return; - if (longTouchTimer) { - clearTimeout(longTouchTimer); - longTouchTimer = null; - } - var touches = e.touches; - if (touches.length > 1 || mode == 'zoom') return; - var touchObj = touches[0]; - mvX = startX - touchObj.clientX; - mvY = startY - touchObj.clientY; - if (mode == 'wait') { - if (mvX * mvX + mvY * mvY > 4) mode = 'cursor'; - else return e.preventDefault(); - } - startX = touchObj.clientX; - startY = touchObj.clientY; - e.clientX = touchObj.clientX; - e.clientY = touchObj.clientY; - if (mode == 'scroll') { - ge = e; - scroll(e, mvX, mvY); - } else { - e.preventDefault(); - } - } - - function touchCancel(e) { - if (mode == 'zoom') { - mode = ''; - } else if (longTouchTimer) { - editor.selection.moveToPosition(pos); - } else if (mode == 'scroll') { - var sum = 0; - var tx = parseInt(Math.abs(mvX)); - var ty = parseInt(Math.abs(mvY)); - scrollSpeed += 0.2; - tx = tx * Math.sqrt(tx) * scrollSpeed; - ty = ty * Math.sqrt(ty) * scrollSpeed; - arX = []; - arY = []; - for (var i = 1; sum < tx; ++i) { - sum += i; - arX.push(i); - } - sum = 0; - for (var _i = 1; sum < ty; ++_i) { - sum += _i; - arY.push(_i); - } - requestAnimationFrame(animate); - e.preventDefault(); - } - clearTimeout(longTouchTimer); - longTouchTimer = null; - } - - function animate() { - var xlen = arX.length; - var ylen = arY.length; - if (xlen === 0 && ylen === 0) { - mvX = 0; - mvY = 0; - scrollSpeed = 1; - return; - } - var xsign = mvX < 0 ? -1 : 1; - var ysign = mvY < 0 ? -1 : 1; - var x = xlen ? xsign * arX.pop() : 0; - var y = ylen ? ysign * arY.pop() : 0; - scroll(ge, x, y); - animation = requestAnimationFrame(animate); - } - - function scroll(e, x, y) { - var mouseEvent = new MouseEvent(e, editor); - mouseEvent.speed = scrollSpeed; - mouseEvent.wheelX = x; - mouseEvent.wheelY = y; - editor._emit('mousewheel', mouseEvent); - e.preventDefault(); - } - - function handleLongTap() { - clearTimeout(longTouchTimer); - longTouchTimer = null; - mode = 'wait'; - } - }; -}); - -define('ace/lib/net', [ - 'require', - 'exports', - 'module', - 'ace/lib/dom', -], function (require, exports, module) { - '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/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/app_config', [ - 'require', - 'exports', - 'module', - 'ace/lib/oop', - 'ace/lib/event_emitter', -], function (require, exports, module) { - 'no use strict'; - - var oop = require('./oop'); - var EventEmitter = require('./event_emitter').EventEmitter; - - 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); - } - - 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; - }); - } - - var AppConfig = function () { - this.$defaultOptions = {}; - }; - - (function () { - oop.implement(this, EventEmitter); - this.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; - }; - - this.resetOptions = function (obj) { - Object.keys(obj.$options).forEach(function (key) { - var opt = obj.$options[key]; - if ('value' in opt) obj.setOption(key, opt.value); - }); - }; - - this.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; - } - }; - - this.setDefaultValues = function (path, optionHash) { - Object.keys(optionHash).forEach(function (key) { - this.setDefaultValue(path, key, optionHash[key]); - }, this); - }; - - this.warn = warn; - this.reportError = reportError; - }.call(AppConfig.prototype)); - - exports.AppConfig = AppConfig; -}); - -define('ace/config', [ - 'require', - 'exports', - 'module', - 'ace/lib/lang', - 'ace/lib/oop', - 'ace/lib/net', - 'ace/lib/dom', - 'ace/lib/app_config', -], function (require, exports, module) { - 'no use strict'; - - var lang = require('./lib/lang'); - var oop = require('./lib/oop'); - var net = require('./lib/net'); - var dom = require('./lib/dom'); - var AppConfig = require('./lib/app_config').AppConfig; - - module.exports = exports = new AppConfig(); - - var global = (function () { - return this || (typeof window != 'undefined' && window); - })(); - - 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); - }; - - exports.$loading = {}; - exports.loadModule = function (moduleName, onLoad) { - var module, moduleType; - if (Array.isArray(moduleName)) { - moduleType = moduleName[0]; - moduleName = moduleName[1]; - } - - try { - module = require(moduleName); - } catch (e) {} - 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 () { - require([moduleName], function (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(); - }; - - 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 () {}; - } - }; - init(true); - function init(packaged) { - if (!global || !global.document) return; - - options.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; - - var scripts = currentDocument.getElementsByTagName('script'); - for (var i = 0; i < scripts.length; i++) { - var script = scripts[i]; - - var src = script.src || script.getAttribute('src'); - if (!src) continue; - - var attributes = script.attributes; - for (var j = 0, l = attributes.length; j < l; j++) { - var attr = attributes[j]; - if (attr.name.indexOf('data-ace-') === 0) { - scriptOptions[deHyphenate(attr.name.replace(/^data-ace-/, ''))] = - attr.value; - } - } - - var m = src.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/); - if (m) scriptUrl = m[1]; - } - - if (scriptUrl) { - scriptOptions.base = scriptOptions.base || scriptUrl; - scriptOptions.packaged = true; - } - - scriptOptions.basePath = scriptOptions.base; - scriptOptions.workerPath = scriptOptions.workerPath || scriptOptions.base; - scriptOptions.modePath = scriptOptions.modePath || scriptOptions.base; - scriptOptions.themePath = scriptOptions.themePath || scriptOptions.base; - delete scriptOptions.base; - - for (var key in scriptOptions) - if (typeof scriptOptions[key] !== 'undefined') - exports.set(key, scriptOptions[key]); - } - - exports.init = init; - - function deHyphenate(str) { - return str.replace(/-(.)/g, function (m, m1) { - return m1.toUpperCase(); - }); - } - - exports.version = '1.4.13'; -}); - -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 = function (editor) { - 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(); - }; - - 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(''); - } - }, - editor, - ); - }; - - (function () { - this.onMouseEvent = function (name, e) { - if (!this.editor.session) return; - this.editor._emit(name, new MouseEvent(e, this.editor)); - }; - - this.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)); - }; - - this.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); - }; - - this.setState = function (state) { - this.state = state; - }; - - this.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); - }; - this.releaseMouse = null; - this.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); - }; - this.destroy = function () { - if (this.releaseMouse) this.releaseMouse(); - }; - }.call(MouseHandler.prototype)); - - 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'); - - 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(); - } - }); - } - - 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 = function (editor) { - this.$editor = editor; - this.$data = { - editor: editor, - }; - this.$handlers = []; - this.setDefaultHandler(editor.commands); - }; - - (function () { - this.setDefaultHandler = function (kb) { - this.removeKeyboardHandler(this.$defaultHandler); - this.$defaultHandler = kb; - this.addKeyboardHandler(kb, 0); - }; - - this.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); - }; - - this.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); - }; - - this.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; - }; - - this.getKeyboardHandler = function () { - return this.$handlers[this.$handlers.length - 1]; - }; - - this.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(' '); - }; - - this.$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; - }; - - this.onCommandKey = function (e, hashId, keyCode) { - var keyString = keyUtil.keyCodeToString(keyCode); - return this.$callKeyboardHandlers(hashId, keyString, keyCode, e); - }; - - this.onTextInput = function (text) { - return this.$callKeyboardHandlers(-1, text); - }; - }.call(KeyBinding.prototype)); - - 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 = function (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()); - }; - - (function () { - this.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; - }; - - this.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; - } - }; - - this.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; - }; - - this.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; - }; - - this.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; - } - }; - - this.updateBidiMap = function () { - var textCharTypes = []; - if ( - bidiUtil.hasBidiCharacters(this.line, textCharTypes) || - this.isRtlDir - ) { - this.bidiMap = bidiUtil.doBidiReorder( - this.line, - textCharTypes, - this.isRtlDir, - ); - } else { - this.bidiMap = {}; - } - }; - this.markAsDirty = function () { - this.currentRow = null; - }; - this.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; - }; - - this.setShowInvisibles = function (showInvisibles) { - this.showInvisibles = showInvisibles; - this.currentRow = null; - }; - - this.setEolChar = function (eolChar) { - this.EOL = eolChar; - }; - - this.setContentWidth = function (width) { - this.contentWidth = width; - }; - - this.isRtlLine = function (row) { - if (this.$isRtl) return true; - if (row != undefined) - return this.session.getLine(row).charAt(0) == this.RLE; - else return this.isRtlDir; - }; - - this.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, - ); - } - }; - this.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; - }; - this.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; - }; - this.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; - }; - }.call(BidiHandler.prototype)); - - 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 = function (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'); - }); - }; - - (function () { - oop.implement(this, EventEmitter); - this.isEmpty = function () { - return ( - this.$isEmpty || - (this.anchor.row == this.lead.row && - this.anchor.column == this.lead.column) - ); - }; - this.isMultiLine = function () { - return !this.$isEmpty && this.anchor.row != this.cursor.row; - }; - this.getCursor = function () { - return this.lead.getPosition(); - }; - this.setSelectionAnchor = function (row, column) { - this.$isEmpty = false; - this.anchor.setPosition(row, column); - }; - this.getAnchor = this.getSelectionAnchor = function () { - if (this.$isEmpty) return this.getSelectionLead(); - - return this.anchor.getPosition(); - }; - this.getSelectionLead = function () { - return this.lead.getPosition(); - }; - this.isBackwards = function () { - var anchor = this.anchor; - var lead = this.lead; - return ( - anchor.row > lead.row || - (anchor.row == lead.row && anchor.column > lead.column) - ); - }; - this.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); - }; - this.clearSelection = function () { - if (!this.$isEmpty) { - this.$isEmpty = true; - this._emit('changeSelection'); - } - }; - this.selectAll = function () { - this.$setSelection(0, 0, Number.MAX_VALUE, Number.MAX_VALUE); - }; - this.setRange = this.setSelectionRange = 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); - }; - - this.$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'); - }; - - this.$moveSelection = function (mover) { - var lead = this.lead; - if (this.$isEmpty) this.setSelectionAnchor(lead.row, lead.column); - - mover.call(this); - }; - this.selectTo = function (row, column) { - this.$moveSelection(function () { - this.moveCursorTo(row, column); - }); - }; - this.selectToPosition = function (pos) { - this.$moveSelection(function () { - this.moveCursorToPosition(pos); - }); - }; - this.moveTo = function (row, column) { - this.clearSelection(); - this.moveCursorTo(row, column); - }; - this.moveToPosition = function (pos) { - this.clearSelection(); - this.moveCursorToPosition(pos); - }; - this.selectUp = function () { - this.$moveSelection(this.moveCursorUp); - }; - this.selectDown = function () { - this.$moveSelection(this.moveCursorDown); - }; - this.selectRight = function () { - this.$moveSelection(this.moveCursorRight); - }; - this.selectLeft = function () { - this.$moveSelection(this.moveCursorLeft); - }; - this.selectLineStart = function () { - this.$moveSelection(this.moveCursorLineStart); - }; - this.selectLineEnd = function () { - this.$moveSelection(this.moveCursorLineEnd); - }; - this.selectFileEnd = function () { - this.$moveSelection(this.moveCursorFileEnd); - }; - this.selectFileStart = function () { - this.$moveSelection(this.moveCursorFileStart); - }; - this.selectWordRight = function () { - this.$moveSelection(this.moveCursorWordRight); - }; - this.selectWordLeft = function () { - this.$moveSelection(this.moveCursorWordLeft); - }; - this.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); - }; - this.selectWord = function () { - this.setSelectionRange(this.getWordRange()); - }; - this.selectAWord = function () { - var cursor = this.getCursor(); - var range = this.session.getAWordRange(cursor.row, cursor.column); - this.setSelectionRange(range); - }; - - this.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); - }; - this.selectLine = function () { - this.setSelectionRange(this.getLineRange()); - }; - this.moveCursorUp = function () { - this.moveCursorBy(-1, 0); - }; - this.moveCursorDown = function () { - this.moveCursorBy(1, 0); - }; - this.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 - ); - }; - this.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); - } - } - }; - this.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); - } - } - }; - this.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); - }; - this.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); - }; - this.moveCursorFileEnd = function () { - var row = this.doc.getLength() - 1; - var column = this.doc.getLine(row).length; - this.moveCursorTo(row, column); - }; - this.moveCursorFileStart = function () { - this.moveCursorTo(0, 0); - }; - this.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); - }; - this.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); - }; - - this.$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; - }; - - this.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); - }; - - this.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); - }; - - this.moveCursorWordRight = function () { - if (this.session.$selectLongWords) this.moveCursorLongWordRight(); - else this.moveCursorShortWordRight(); - }; - - this.moveCursorWordLeft = function () { - if (this.session.$selectLongWords) this.moveCursorLongWordLeft(); - else this.moveCursorShortWordLeft(); - }; - this.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); - }; - this.moveCursorToPosition = function (position) { - this.moveCursorTo(position.row, position.column); - }; - this.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; - }; - this.moveCursorToScreen = function (row, column, keepDesiredColumn) { - var pos = this.session.screenToDocumentPosition(row, column); - this.moveCursorTo(pos.row, pos.column, keepDesiredColumn); - }; - this.detach = function () { - this.lead.detach(); - this.anchor.detach(); - this.session = this.doc = null; - }; - - this.fromOrientedRange = function (range) { - this.setSelectionRange(range, range.cursor == range.start); - this.$desiredColumn = range.desiredColumn || this.$desiredColumn; - }; - - this.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; - }; - this.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); - } - }; - - this.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; - }; - - this.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); - }; - - this.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; - }; - }.call(Selection.prototype)); - - exports.Selection = Selection; -}); - -define('ace/tokenizer', [ - 'require', - 'exports', - 'module', - 'ace/config', -], function (require, exports, module) { - 'use strict'; - - var config = require('./config'); - var MAX_TOKEN_COUNT = 2000; - var Tokenizer = function (rules) { - 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 = 'gi'; - 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, - ); - } - }; - - (function () { - this.$setMaxTokenCount = function (m) { - MAX_TOKEN_COUNT = m | 0; - }; - - this.$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; - }; - - this.$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; - }; - - this.removeCapturingGroups = function (src) { - var r = src.replace( - /\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g, - function (x, y) { - return y ? '(?:' : x; - }, - ); - return r; - }; - - this.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', '')); - }; - this.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 = 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, - }; - }; - - this.reportError = config.reportError; - }.call(Tokenizer.prototype)); - - exports.Tokenizer = Tokenizer; -}); - -define('ace/mode/text_highlight_rules', [ - 'require', - 'exports', - 'module', - 'ace/lib/lang', -], function (require, exports, module) { - 'use strict'; - - var lang = require('../lib/lang'); - - var 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]], lang.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 (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 = 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 = function (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; - }; - - (function () { - this.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]; - }; - this.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]; - }; - this.getCurrentToken = function () { - return this.$rowTokens[this.$tokenIndex]; - }; - this.getCurrentTokenRow = function () { - return this.$row; - }; - this.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; - }; - this.getCurrentTokenPosition = function () { - return { - row: this.$row, - column: this.getCurrentTokenColumn(), - }; - }; - this.getCurrentTokenRange = function () { - var token = this.$rowTokens[this.$tokenIndex]; - var column = this.getCurrentTokenColumn(); - return new Range( - this.$row, - column, - this.$row, - column + token.value.length, - ); - }; - }.call(TokenIterator.prototype)); - - 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 = function (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); - if ( - selected !== '' && - selected !== '{' && - editor.getWrapBehavioursEnabled() - ) { - return getWrapped(selection, selected, '{', '}'); - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if ( - /[\]\}\)]/.test(line[cursor.column]) || - editor.inMultiSelectMode || - (options && 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(leftChar); - if (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; - } - } - }, - ); - }; - - 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 = 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', - ]; - - for (var i = 0; i < delegations.length; i++) { - (function (scope) { - var functionName = delegations[i]; - var defaultHandler = scope[functionName]; - scope[delegations[i]] = function () { - return this.$delegator(functionName, arguments, defaultHandler); - }; - })(this); - } - }; - - 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 = (exports.Anchor = function (doc, row, column) { - this.$onChange = this.onChange.bind(this); - this.attach(doc); - - if (typeof column == 'undefined') this.setPosition(row.row, row.column); - else this.setPosition(row, column); - }); - - (function () { - oop.implement(this, EventEmitter); - this.getPosition = function () { - return this.$clipPositionToDocument(this.row, this.column); - }; - this.getDocument = function () { - return this.document; - }; - this.$insertRight = false; - this.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); - }; - - 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, - }; - } - this.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, - }); - }; - this.detach = function () { - this.document.off('change', this.$onChange); - }; - this.attach = function (doc) { - this.document = doc || this.document; - this.document.on('change', this.$onChange); - }; - this.$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; - }; - }.call(Anchor.prototype)); -}); - -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 = function (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, - ); - } - }; - - (function () { - oop.implement(this, EventEmitter); - this.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, - ); - }; - this.getValue = function () { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function (row, column) { - return new Anchor(this, row, column); - }; - if ('aaa'.split(/a/).length === 0) { - this.$split = function (text) { - return text.replace(/\r\n|\r/g, '\n').split('\n'); - }; - } else { - this.$split = function (text) { - return text.split(/\r\n|\r|\n/); - }; - } - - this.$detectNewLine = function (text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : '\n'; - this._signal('changeNewLineMode'); - }; - this.getNewLineCharacter = function () { - switch (this.$newLineMode) { - case 'windows': - return '\r\n'; - case 'unix': - return '\n'; - default: - return this.$autoNewLine || '\n'; - } - }; - - this.$autoNewLine = ''; - this.$newLineMode = 'auto'; - this.setNewLineMode = function (newLineMode) { - if (this.$newLineMode === newLineMode) return; - - this.$newLineMode = newLineMode; - this._signal('changeNewLineMode'); - }; - this.getNewLineMode = function () { - return this.$newLineMode; - }; - this.isNewLine = function (text) { - return text == '\r\n' || text == '\r' || text == '\n'; - }; - this.getLine = function (row) { - return this.$lines[row] || ''; - }; - this.getLines = function (firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function () { - return this.getLines(0, this.getLength()); - }; - this.getLength = function () { - return this.$lines.length; - }; - this.getTextRange = function (range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.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; - }; - this.insertLines = function (row, lines) { - console.warn( - 'Use of document.insertLines is deprecated. Use the insertFullLines method instead.', - ); - return this.insertFullLines(row, lines); - }; - this.removeLines = function (firstRow, lastRow) { - console.warn( - 'Use of document.removeLines is deprecated. Use the removeFullLines method instead.', - ); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function (position) { - console.warn( - "Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.", - ); - return this.insertMergedLines(position, ['', '']); - }; - this.insert = function (position, text) { - if (this.getLength() <= 1) this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.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); - }; - - this.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, - }; - }; - - this.clonePos = function (pos) { - return { - row: pos.row, - column: pos.column, - }; - }; - - this.pos = function (row, column) { - return { - row: row, - column: column, - }; - }; - - this.$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; - }; - this.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, - ); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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; - }; - this.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: ['', ''], - }); - } - }; - this.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; - }; - this.applyDeltas = function (deltas) { - for (var i = 0; i < deltas.length; i++) { - this.applyDelta(deltas[i]); - } - }; - this.revertDeltas = function (deltas) { - for (var i = deltas.length - 1; i >= 0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.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); - } - }; - - this.$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); - } - }; - - this.$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); - }; - this.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(), - }); - }; - this.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, - }; - }; - this.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; - }; - }.call(Document.prototype)); - - 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 = function (tokenizer, editor) { - 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); - }; - }; - - (function () { - oop.implement(this, EventEmitter); - this.setTokenizer = function (tokenizer) { - this.tokenizer = tokenizer; - this.lines = []; - this.states = []; - - this.start(0); - }; - this.setDocument = function (doc) { - this.doc = doc; - this.lines = []; - this.states = []; - - this.stop(); - }; - this.fireUpdateEvent = function (firstRow, lastRow) { - var data = { - first: firstRow, - last: lastRow, - }; - this._signal('update', { - data: data, - }); - }; - this.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); - }; - - this.scheduleStart = function () { - if (!this.running) this.running = setTimeout(this.$worker, 700); - }; - - this.$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(); - }; - this.stop = function () { - if (this.running) clearTimeout(this.running); - this.running = false; - }; - this.getTokens = function (row) { - return this.lines[row] || this.$tokenizeRow(row); - }; - this.getState = function (row) { - if (this.currentLine == row) this.$tokenizeRow(row); - return this.states[row] || 'start'; - }; - - this.$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); - }; - }.call(BackgroundTokenizer.prototype)); - - exports.BackgroundTokenizer = BackgroundTokenizer; -}); - -define('ace/search_highlight', [ - '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 SearchHighlight = function (regExp, clazz, type) { - this.setRegexp(regExp); - this.clazz = clazz; - this.type = type || 'text'; - }; - - (function () { - this.MAX_RANGES = 500; - - this.setRegexp = function (regExp) { - if (this.regExp + '' == regExp + '') return; - this.regExp = regExp; - this.cache = []; - }; - - this.update = function (html, markerLayer, session, config) { - if (!this.regExp) return; - var start = config.firstRow, - end = config.lastRow; - - 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--; ) { - markerLayer.drawSingleLineMarker( - html, - ranges[j].toScreenRange(session), - this.clazz, - config, - ); - } - } - }; - }.call(SearchHighlight.prototype)); - - exports.SearchHighlight = SearchHighlight; -}); - -define('ace/edit_session/fold_line', [ - 'require', - 'exports', - 'module', - 'ace/range', -], function (require, exports, module) { - 'use strict'; - - var Range = require('../range').Range; - 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); - } - - (function () { - this.shiftRow = function (shift) { - this.start.row += shift; - this.end.row += shift; - this.folds.forEach(function (fold) { - fold.start.row += shift; - fold.end.row += shift; - }); - }; - - this.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; - }; - - this.containsRow = function (row) { - return row >= this.start.row && row <= this.end.row; - }; - - this.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); - }; - - this.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; - }; - - this.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; - } - } - }; - - this.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; - }; - - this.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); - }; - - this.toString = function () { - var ret = [this.range.toString() + ': [']; - - this.folds.forEach(function (fold) { - ret.push(' ' + fold.toString()); - }); - ret.push(']'); - return ret.join('\n'); - }; - - this.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, - }; - }; - }.call(FoldLine.prototype)); - - 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 = function () { - this.ranges = []; - this.$bias = 1; - }; - - (function () { - this.comparePoints = comparePoints; - - this.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; - }; - - this.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); - }; - - this.addList = function (list) { - var removed = []; - for (var i = list.length; i--; ) { - removed.push.apply(removed, this.add(list[i])); - } - return removed; - }; - - this.substractPoint = function (pos) { - var i = this.pointIndex(pos); - - if (i >= 0) return this.ranges.splice(i, 1); - }; - this.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; - }; - - this.contains = function (row, column) { - return this.pointIndex({ row: row, column: column }) >= 0; - }; - - this.containsPoint = function (pos) { - return this.pointIndex(pos) >= 0; - }; - - this.rangeAtPoint = function (pos) { - var i = this.pointIndex(pos); - if (i >= 0) return this.ranges[i]; - }; - - this.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; - }; - - this.removeAll = function () { - return this.ranges.splice(0, this.ranges.length); - }; - - this.attach = function (session) { - if (this.session) this.detach(); - - this.session = session; - this.onChange = this.$onChange.bind(this); - - this.session.on('change', this.onChange); - }; - - this.detach = function () { - if (!this.session) return; - this.session.removeListener('change', this.onChange); - this.session = null; - }; - - this.$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; - } - } - }; - }.call(RangeList.prototype)); - - exports.RangeList = RangeList; -}); - -define('ace/edit_session/fold', [ - 'require', - 'exports', - 'module', - 'ace/range_list', - 'ace/lib/oop', -], function (require, exports, module) { - 'use strict'; - - var RangeList = require('../range_list').RangeList; - var oop = require('../lib/oop'); - var Fold = (exports.Fold = function (range, placeholder) { - 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 = []; - }); - - oop.inherits(Fold, RangeList); - - (function () { - this.toString = function () { - return '"' + this.placeholder + '" ' + this.range.toString(); - }; - - this.setFoldLine = function (foldLine) { - this.foldLine = foldLine; - this.subFolds.forEach(function (fold) { - fold.setFoldLine(foldLine); - }); - }; - - this.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; - }; - - this.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; - }; - - this.restoreRange = function (range) { - return restoreRange(range, this.start); - }; - }.call(Fold.prototype)); - - 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); - } -}); - -define('ace/edit_session/folding', [ - 'require', - 'exports', - 'module', - 'ace/range', - 'ace/edit_session/fold_line', - 'ace/edit_session/fold', - 'ace/token_iterator', -], function (require, exports, module) { - 'use strict'; - - var Range = require('../range').Range; - var FoldLine = require('./fold_line').FoldLine; - var Fold = require('./fold').Fold; - var TokenIterator = require('../token_iterator').TokenIterator; - - 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'; - var re = new RegExp(type); - var range = new Range(); - if (dir != 1) { - do { - token = iterator.stepBackward(); - } while (token && re.test(token.type)); - iterator.stepForward(); - } - - range.start.row = iterator.getCurrentTokenRow(); - range.start.column = iterator.getCurrentTokenColumn() + 2; - - iterator = new TokenIterator(this, row, column); - - if (dir != -1) { - var lastRow = -1; - do { - token = iterator.stepForward(); - if (lastRow == -1) { - var state = this.getState(iterator.$row); - if (!re.test(state)) 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() + token.value.length - 2; - 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) { - 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) { - var line = this.getLine(pos.row); - - 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(/([\(\[\{])|([\)\]\}])/); - } - - 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)') + - ')+', - ); - } - 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)') + - ')+', - ); - } - 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; - }; - } - 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/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 EditSession = function (text, mode) { - this.$breakpoints = []; - this.$decorations = []; - this.$frontMarkers = {}; - this.$backMarkers = {}; - this.$markerId = 1; - this.$undoSelect = true; - - this.$foldData = []; - this.id = 'session' + ++EditSession.$uid; - this.$foldData.toString = function () { - return this.join('\n'); - }; - this.on('changeFold', this.onChangeFold.bind(this)); - this.$onChange = this.onChange.bind(this); - - if (typeof text != 'object' || !text.getLine) text = new Document(text); - - this.setDocument(text); - this.selection = new Selection(this); - this.$bidiHandler = new BidiHandler(this); - - config.resetOptions(this); - this.setMode(mode); - config._signal('session', this); - }; - - EditSession.$uid = 0; - - (function () { - oop.implement(this, EventEmitter); - this.setDocument = function (doc) { - if (this.doc) this.doc.off('change', this.$onChange); - - this.doc = doc; - doc.on('change', this.$onChange); - - if (this.bgTokenizer) this.bgTokenizer.setDocument(this.getDocument()); - - this.resetCaches(); - }; - this.getDocument = function () { - return this.doc; - }; - this.$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); - } - }; - - this.$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; - }; - - this.resetCaches = function () { - this.$modified = true; - this.$wrapData = []; - this.$rowLengthCache = []; - this.$resetRowCache(0); - if (this.bgTokenizer) this.bgTokenizer.start(0); - }; - - this.onChangeFold = function (e) { - var fold = e.data; - this.$resetRowCache(fold.start.row); - }; - - this.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 && this.bgTokenizer.$updateOnChange(delta); - this._signal('change', delta); - }; - this.setValue = function (text) { - this.doc.setValue(text); - this.selection.moveTo(0, 0); - - this.$resetRowCache(0); - this.setUndoManager(this.$undoManager); - this.getUndoManager().reset(); - }; - this.getValue = this.toString = function () { - return this.doc.getValue(); - }; - this.getSelection = function () { - return this.selection; - }; - this.getState = function (row) { - return this.bgTokenizer.getState(row); - }; - this.getTokens = function (row) { - return this.bgTokenizer.getTokens(row); - }; - this.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; - }; - this.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 () {}; - } - }; - this.markUndoGroup = function () { - if (this.$syncInformUndoManager) this.$syncInformUndoManager(); - }; - - this.$defaultUndoManager = { - undo: function () {}, - redo: function () {}, - hasUndo: function () {}, - hasRedo: function () {}, - reset: function () {}, - add: function () {}, - addSelection: function () {}, - startNewGroup: function () {}, - addSession: function () {}, - }; - this.getUndoManager = function () { - return this.$undoManager || this.$defaultUndoManager; - }; - this.getTabString = function () { - if (this.getUseSoftTabs()) { - return lang.stringRepeat(' ', this.getTabSize()); - } else { - return '\t'; - } - }; - this.setUseSoftTabs = function (val) { - this.setOption('useSoftTabs', val); - }; - this.getUseSoftTabs = function () { - return this.$useSoftTabs && !this.$mode.$indentWithTabs; - }; - this.setTabSize = function (tabSize) { - this.setOption('tabSize', tabSize); - }; - this.getTabSize = function () { - return this.$tabSize; - }; - this.isTabStop = function (position) { - return this.$useSoftTabs && position.column % this.$tabSize === 0; - }; - this.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) { - this.setOption('navigateWithinSoftTabs', navigateWithinSoftTabs); - }; - this.getNavigateWithinSoftTabs = function () { - return this.$navigateWithinSoftTabs; - }; - - this.$overwrite = false; - this.setOverwrite = function (overwrite) { - this.setOption('overwrite', overwrite); - }; - this.getOverwrite = function () { - return this.$overwrite; - }; - this.toggleOverwrite = function () { - this.setOverwrite(!this.$overwrite); - }; - this.addGutterDecoration = function (row, className) { - if (!this.$decorations[row]) this.$decorations[row] = ''; - this.$decorations[row] += ' ' + className; - this._signal('changeBreakpoint', {}); - }; - this.removeGutterDecoration = function (row, className) { - this.$decorations[row] = (this.$decorations[row] || '').replace( - ' ' + className, - '', - ); - this._signal('changeBreakpoint', {}); - }; - this.getBreakpoints = function () { - return this.$breakpoints; - }; - this.setBreakpoints = function (rows) { - this.$breakpoints = []; - for (var i = 0; i < rows.length; i++) { - this.$breakpoints[rows[i]] = 'ace_breakpoint'; - } - this._signal('changeBreakpoint', {}); - }; - this.clearBreakpoints = function () { - this.$breakpoints = []; - this._signal('changeBreakpoint', {}); - }; - this.setBreakpoint = function (row, className) { - if (className === undefined) className = 'ace_breakpoint'; - if (className) this.$breakpoints[row] = className; - else delete this.$breakpoints[row]; - this._signal('changeBreakpoint', {}); - }; - this.clearBreakpoint = function (row) { - delete this.$breakpoints[row]; - this._signal('changeBreakpoint', {}); - }; - this.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; - }; - this.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; - }; - this.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'); - }; - this.getMarkers = function (inFront) { - return inFront ? this.$frontMarkers : this.$backMarkers; - }; - - this.highlight = function (re) { - if (!this.$searchHighlight) { - var highlight = new SearchHighlight(null, 'ace_selected-word', 'text'); - this.$searchHighlight = this.addDynamicMarker(highlight); - } - this.$searchHighlight.setRegexp(re); - }; - this.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; - }; - this.setAnnotations = function (annotations) { - this.$annotations = annotations; - this._signal('changeAnnotation', {}); - }; - this.getAnnotations = function () { - return this.$annotations || []; - }; - this.clearAnnotations = function () { - this.setAnnotations([]); - }; - this.$detectNewLine = function (text) { - var match = text.match(/^.*?(\r?\n)/m); - if (match) { - this.$autoNewLine = match[1]; - } else { - this.$autoNewLine = '\n'; - } - }; - this.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); - }; - this.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; - }; - this.setNewLineMode = function (newLineMode) { - this.doc.setNewLineMode(newLineMode); - }; - this.getNewLineMode = function () { - return this.doc.getNewLineMode(); - }; - this.setUseWorker = function (useWorker) { - this.setOption('useWorker', useWorker); - }; - this.getUseWorker = function () { - return this.$useWorker; - }; - this.onReloadTokenizer = function (e) { - var rows = e.data; - this.bgTokenizer.start(rows.first); - this._signal('tokenizerUpdate', e); - }; - - this.$modes = config.$modes; - this.$mode = null; - this.$modeId = null; - this.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 = 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); - }; - - this.$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); - } - - if (!this.bgTokenizer) { - this.bgTokenizer = new BackgroundTokenizer(tokenizer); - var _self = this; - this.bgTokenizer.on('update', function (e) { - _self._signal('tokenizerUpdate', e); - }); - } else { - 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, - }); - } - }; - - this.$stopWorker = function () { - if (this.$worker) { - this.$worker.terminate(); - this.$worker = null; - } - }; - - this.$startWorker = function () { - try { - this.$worker = this.$mode.createWorker(this); - } catch (e) { - config.warn('Could not load worker', e); - this.$worker = null; - } - }; - this.getMode = function () { - return this.$mode; - }; - - this.$scrollTop = 0; - this.setScrollTop = function (scrollTop) { - if (this.$scrollTop === scrollTop || isNaN(scrollTop)) return; - - this.$scrollTop = scrollTop; - this._signal('changeScrollTop', scrollTop); - }; - this.getScrollTop = function () { - return this.$scrollTop; - }; - - this.$scrollLeft = 0; - this.setScrollLeft = function (scrollLeft) { - if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) return; - - this.$scrollLeft = scrollLeft; - this._signal('changeScrollLeft', scrollLeft); - }; - this.getScrollLeft = function () { - return this.$scrollLeft; - }; - this.getScreenWidth = function () { - this.$computeWidth(); - if (this.lineWidgets) - return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth); - return this.screenWidth; - }; - - this.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); - }; - - this.$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; - } - }; - this.getLine = function (row) { - return this.doc.getLine(row); - }; - this.getLines = function (firstRow, lastRow) { - return this.doc.getLines(firstRow, lastRow); - }; - this.getLength = function () { - return this.doc.getLength(); - }; - this.getTextRange = function (range) { - return this.doc.getTextRange(range || this.selection.getRange()); - }; - this.insert = function (position, text) { - return this.doc.insert(position, text); - }; - this.remove = function (range) { - return this.doc.remove(range); - }; - this.removeFullLines = function (firstRow, lastRow) { - return this.doc.removeFullLines(firstRow, lastRow); - }; - this.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; - }; - this.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; - }; - this.setUndoSelect = function (enable) { - this.$undoSelect = enable; - }; - - this.$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; - }; - this.replace = function (range, text) { - return this.doc.replace(range, text); - }; - this.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; - }; - this.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, - ); - }; - this.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); - } - }; - - this.$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; - }; - this.moveLinesUp = function (firstRow, lastRow) { - return this.$moveLines(firstRow, lastRow, -1); - }; - this.moveLinesDown = function (firstRow, lastRow) { - return this.$moveLines(firstRow, lastRow, 1); - }; - this.duplicateLines = function (firstRow, lastRow) { - return this.$moveLines(firstRow, lastRow, 0); - }; - - this.$clipRowToDocument = function (row) { - return Math.max(0, Math.min(row, this.doc.getLength() - 1)); - }; - - this.$clipColumnToRow = function (row, column) { - if (column < 0) return 0; - return Math.min(this.doc.getLine(row).length, column); - }; - - this.$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, - }; - }; - - this.$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; - }; - this.$wrapLimit = 80; - this.$useWrapMode = false; - this.$wrapLimitRange = { - min: null, - max: null, - }; - this.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'); - } - }; - this.getUseWrapMode = function () { - return this.$useWrapMode; - }; - this.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'); - } - }; - this.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; - }; - - this.$constrainWrapLimit = function (wrapLimit, min, max) { - if (min) wrapLimit = Math.max(min, wrapLimit); - - if (max) wrapLimit = Math.min(max, wrapLimit); - - return wrapLimit; - }; - this.getWrapLimit = function () { - return this.$wrapLimit; - }; - this.setWrapLimit = function (limit) { - this.setWrapLimitRange(limit, limit); - }; - this.getWrapLimitRange = function () { - return { - min: this.$wrapLimitRange.min, - max: this.$wrapLimitRange.max, - }; - }; - - this.$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; - }; - - this.$updateRowLengthCache = function (firstRow, lastRow, b) { - this.$rowLengthCache[firstRow] = null; - this.$rowLengthCache[lastRow] = null; - }; - - this.$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; - } - } - }; - var CHAR = 1, - CHAR_EXT = 2, - PLACEHOLDER_START = 3, - PLACEHOLDER_BODY = 4, - PUNCTUATION = 9, - SPACE = 10, - TAB = 11, - TAB_SPACE = 12; - - this.$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; - }; - this.$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; - }; - this.$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]; - }; - - this.lineWidgets = null; - this.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; - }; - this.getRowLineCount = function (row) { - if (!this.$useWrapMode || !this.$wrapData[row]) { - return 1; - } else { - return this.$wrapData[row].length + 1; - } - }; - - this.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; - } - }; - this.getScreenLastRowColumn = function (screenRow) { - var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); - return this.documentToScreenColumn(pos.row, pos.column); - }; - this.getDocumentLastRowColumn = function (docRow, docColumn) { - var screenRow = this.documentToScreenRow(docRow, docColumn); - return this.getScreenLastRowColumn(screenRow); - }; - this.getDocumentLastRowColumnPosition = function (docRow, docColumn) { - var screenRow = this.documentToScreenRow(docRow, docColumn); - return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); - }; - this.getRowSplitData = function (row) { - if (!this.$useWrapMode) { - return undefined; - } else { - return this.$wrapData[row]; - } - }; - this.getScreenTabSize = function (screenColumn) { - return this.$tabSize - (screenColumn % this.$tabSize | 0); - }; - - this.screenToDocumentRow = function (screenRow, screenColumn) { - return this.screenToDocumentPosition(screenRow, screenColumn).row; - }; - - this.screenToDocumentColumn = function (screenRow, screenColumn) { - return this.screenToDocumentPosition(screenRow, screenColumn).column; - }; - this.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, - }; - }; - this.documentToScreenPosition = function (docRow, docColumn) { - if (typeof docColumn === 'undefined') - var pos = this.$clipPositionToDocument(docRow.row, docRow.column); - else pos = this.$clipPositionToDocument(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], - }; - }; - this.documentToScreenColumn = function (row, docColumn) { - return this.documentToScreenPosition(row, docColumn).column; - }; - this.documentToScreenRow = function (docRow, docColumn) { - return this.documentToScreenPosition(docRow, docColumn).row; - }; - this.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; - }; - this.$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]; - }; - }; - - this.destroy = function () { - if (this.bgTokenizer) { - this.bgTokenizer.setDocument(null); - this.bgTokenizer = null; - } - this.$stopWorker(); - this.removeAllListeners(); - if (this.doc) { - this.doc.off('change', this.$onChange); - } - this.selection.detach(); - }; - - this.isFullWidth = isFullWidth; - 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) - ); - } - }.call(EditSession.prototype)); - - 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 = function () { - this.$options = {}; - }; - - (function () { - this.set = function (options) { - oop.mixin(this.$options, options); - return this; - }; - this.getOptions = function () { - return lang.copyObject(this.$options); - }; - this.setOptions = function (options) { - this.$options = options; - }; - this.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 && - options.start.start && - options.skipCurrent != false && - firstRange.isEqual(options.start) - ) { - firstRange = null; - return false; - } - - return true; - }); - - return firstRange; - }; - this.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.start.column; - var i = 0, - j = ranges.length - 1; - while ( - i < j && - ranges[i].start.column < startColumn && - ranges[i].start.row == range.start.row - ) - i++; - - while ( - i < j && - ranges[j].end.column > endColumn && - ranges[j].end.row == range.end.row - ) - 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; - }; - this.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; - - 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; - }; - - this.$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); - - if (options.wholeWord) needle = addWordBoundary(needle, options); - - var modifier = options.caseSensitive ? 'gm' : 'gmi'; - - 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); - }; - - this.$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; - }; - - this.$matchIterator = function (session, options) { - var re = this.$assembleRegExp(options); - if (!re) return false; - var backwards = options.backwards == true; - var skipCurrent = options.skipCurrent != false; - - 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 += 1; - } - 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 += 1; - if (last >= line.length) return false; - } - } - }; - } - return { - forEach: forEach, - }; - }; - }.call(Search.prototype)); - - function addWordBoundary(needle, options) { - function wordBoundary(c) { - if (/\w/.test(c) || options.regExp) return '\\b'; - return ''; - } - return ( - wordBoundary(needle[0]) + needle + wordBoundary(needle[needle.length - 1]) - ); - } - - exports.Search = Search; -}); - -define('ace/keyboard/hash_handler', [ - 'require', - 'exports', - 'module', - 'ace/lib/keys', - 'ace/lib/useragent', -], function (require, exports, module) { - 'use strict'; - - var keyUtil = require('../lib/keys'); - var useragent = require('../lib/useragent'); - var KEY_MODS = keyUtil.KEY_MODS; - - function HashHandler(config, platform) { - this.platform = platform || (useragent.isMac ? 'mac' : 'win'); - this.commands = {}; - this.commandKeyBinding = {}; - this.addCommands(config); - this.$singleCommand = true; - } - - function MultiHashHandler(config, platform) { - HashHandler.call(this, config, platform); - this.$singleCommand = false; - } - - MultiHashHandler.prototype = HashHandler.prototype; - - (function () { - this.addCommand = function (command) { - if (this.commands[command.name]) this.removeCommand(command); - - this.commands[command.name] = command; - - if (command.bindKey) this._buildKeyHash(command); - }; - - this.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]; - } - } - } - }; - - this.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 || 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); - }; - - function getPosition(command) { - return ( - (typeof command == 'object' && - command.bindKey && - command.bindKey.position) || - (command.isDefault ? -100 : 0) - ); - } - this._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); - } - }; - - this.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); - }; - - this.removeCommands = function (commands) { - Object.keys(commands).forEach(function (name) { - this.removeCommand(commands[name]); - }, this); - }; - - this.bindKeys = function (keyList) { - Object.keys(keyList).forEach(function (key) { - this.bindKey(key, keyList[key]); - }, this); - }; - - this._buildKeyHash = function (command) { - this.bindKey(command.bindKey, command); - }; - this.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, - }; - }; - - this.findKeyCommand = function findKeyCommand(hashId, keyString) { - var key = KEY_MODS[hashId] + keyString; - return this.commandKeyBinding[key]; - }; - - this.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, - }; - }; - - this.getStatusText = function (editor, data) { - return data.$keyChain || ''; - }; - }.call(HashHandler.prototype)); - - 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 oop = require('../lib/oop'); - var MultiHashHandler = require('../keyboard/hash_handler').MultiHashHandler; - var EventEmitter = require('../lib/event_emitter').EventEmitter; - - var CommandManager = function (platform, commands) { - MultiHashHandler.call(this, commands, platform); - this.byName = this.commands; - this.setDefaultHandler('exec', function (e) { - return e.command.exec(e.editor, e.args || {}); - }); - }; - - oop.inherits(CommandManager, MultiHashHandler); - - (function () { - oop.implement(this, EventEmitter); - - this.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 (!command) return false; - - if (editor && editor.$readOnly && !command.readOnly) return false; - - if ( - this.$checkCommandState != false && - command.isAvailable && - !command.isAvailable(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; - }; - - this.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); - }; - - this.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; - } - }; - - this.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; - }); - }; - }.call(CommandManager.prototype)); - - 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) { - return { - win: keyBindings(win), - }; - } - exports.commands = [ - { - name: 'closeCurrentTab', - description: 'Close current tab', - bindKey: bindKey('closeCurrentTab'), - exec: function () { - Acode.exec('close-current-tab'); - }, - }, - { - name: 'closeAllTabs', - description: 'Close all tabs', - bindKey: bindKey('closeAllTabs'), - exec: function () { - Acode.exec('close-all-tabs'); - }, - }, - { - name: 'newFile', - description: 'Create new file', - bindKey: bindKey('newFile'), - exec: function () { - if (Acode) { - Acode.exec('new-file'); - } - }, - readOnly: true, - }, - { - name: 'openFile', - description: 'Open a file', - bindKey: bindKey('openFile'), - exec: function () { - if (Acode) { - Acode.exec('open-file'); - } - }, - readOnly: true, - }, - { - name: 'openFolder', - description: 'Open a folder', - bindKey: bindKey('openFolder'), - exec: function () { - if (Acode) { - Acode.exec('open-folder'); - } - }, - readOnly: true, - }, - { - name: 'saveFile', - description: 'Save current file', - bindKey: bindKey('saveFile'), - exec: function () { - if (Acode) { - Acode.exec('save'); - } - }, - readOnly: true, - }, - { - name: 'saveFileAs', - description: 'Save as current file', - bindKey: bindKey('saveFileAs'), - exec: function () { - if (Acode) { - Acode.exec('save-as'); - } - }, - readOnly: true, - }, - { - name: 'nextFile', - description: 'Open next file tab', - bindKey: bindKey('nextFile'), - exec: function () { - if (Acode) { - Acode.exec('next-file'); - } - }, - }, - { - name: 'prevFile', - description: 'Open previous file tab', - bindKey: bindKey('prevFile'), - exec: function () { - if (Acode) { - Acode.exec('prev-file'); - } - }, - }, - { - name: 'showSettingsMenu', - description: 'Show settings menu', - bindKey: bindKey('showSettingsMenu'), - exec: function () { - if (Acode) { - Acode.exec('open', 'settings'); - } - }, - readOnly: true, - }, - { - name: 'renameFile', - description: 'Rename active file', - bindKey: bindKey('renameFile'), - exec: function () { - if (Acode) { - Acode.exec('rename'); - } - }, - readOnly: true, - }, - { - name: 'run', - description: 'Preview HTML and MarkDown', - bindKey: bindKey('run'), - exec: function () { - if (Acode) { - Acode.exec('run'); - } - }, - readOnly: true, - }, - { - name: 'selectWord', - description: 'Select word', - bindKey: bindKey('selectWord'), - exec: function () { - if (Acode) { - Acode.exec('select-word'); - } - }, - readOnly: true, - }, - { - name: 'toggleFullscreen', - description: 'Toggle full screen mode', - bindKey: bindKey('toggleFullscreen'), - exec: function () { - if (Acode) { - Acode.exec('toggle-fullscreen'); - } - }, - }, - { - name: 'toggleSidebar', - description: 'Toggle sidebar', - bindKey: bindKey('toggleSidebar'), - exec: function () { - if (Acode) { - Acode.exec('toggle-sidebar'); - } - }, - }, - { - name: 'toggleMenu', - description: 'Toggle main menu', - bindKey: bindKey('toggleMenu'), - exec: function () { - if (Acode) { - Acode.exec('toggle-menu'); - } - }, - }, - { - name: 'toggleEditMenu', - description: 'Toggle edit menu', - bindKey: bindKey('toggleEditMenu'), - exec: function () { - if (Acode) { - Acode.exec('toggle-editmenu'); - } - }, - }, - { - name: 'goToNextError', - description: 'Go to next error', - bindKey: bindKey('goToNextError'), - exec: function (editor) { - config.loadModule('./ext/error_marker', function (module) { - module.showErrorMarker(editor, 1); - }); - }, - scrollIntoView: 'animate', - readOnly: true, - }, - { - name: 'goToPreviousError', - description: 'Go to previous error', - bindKey: bindKey('goToPreviousError'), - exec: function (editor) { - config.loadModule('./ext/error_marker', function (module) { - module.showErrorMarker(editor, -1); - }); - }, - scrollIntoView: 'animate', - readOnly: true, - }, - { - name: 'selectall', - description: 'Select all', - bindKey: bindKey('selectall'), - exec: function (editor) { - editor.selectAll(); - }, - readOnly: true, - }, - { - name: 'centerselection', - description: 'Center selection', - bindKey: bindKey('centerselection'), - exec: function (editor) { - editor.centerSelection(); - }, - readOnly: true, - }, - { - name: 'gotoline', - description: 'Go to line...', - bindKey: bindKey('gotoline'), - exec: function () { - if (Acode) { - Acode.exec('goto'); - } - }, - readOnly: true, - }, - { - name: 'fold', - bindKey: bindKey('fold'), - exec: function (editor) { - editor.session.toggleFold(false); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'center', - readOnly: true, - }, - { - name: 'unfold', - bindKey: bindKey('unfold'), - exec: function (editor) { - editor.session.toggleFold(true); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'center', - readOnly: true, - }, - { - name: 'toggleFoldWidget', - description: 'Toggle fold widget', - bindKey: bindKey('toggleFoldWidget'), - exec: function (editor) { - editor.session.toggleFoldWidget(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'center', - readOnly: true, - }, - { - name: 'toggleParentFoldWidget', - description: 'Toggle parent fold widget', - bindKey: bindKey('toggleParentFoldWidget'), - exec: function (editor) { - editor.session.toggleFoldWidget(true); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'center', - readOnly: true, - }, - { - name: 'foldall', - description: 'Fold all', - bindKey: bindKey('foldall'), - exec: function (editor) { - editor.session.foldAll(); - }, - scrollIntoView: 'center', - readOnly: true, - }, - { - name: 'foldOther', - description: 'Fold other', - bindKey: bindKey('foldOther'), - exec: function (editor) { - editor.session.foldAll(); - editor.session.unfold(editor.selection.getAllRanges()); - }, - scrollIntoView: 'center', - readOnly: true, - }, - { - name: 'unfoldall', - description: 'Unfold all', - bindKey: bindKey('unfoldall'), - exec: function (editor) { - editor.session.unfold(); - }, - scrollIntoView: 'center', - readOnly: true, - }, - { - name: 'findnext', - description: 'Find next', - bindKey: bindKey('findnext'), - exec: function (editor) { - editor.findNext(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'center', - readOnly: true, - }, - { - name: 'findprevious', - description: 'Find previous', - bindKey: bindKey('findprevious'), - exec: function (editor) { - editor.findPrevious(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'center', - readOnly: true, - }, - { - name: 'selectOrFindNext', - description: 'Select or find next', - bindKey: bindKey('selectOrFindNext'), - exec: function (editor) { - if (editor.selection.isEmpty()) editor.selection.selectWord(); - else editor.findNext(); - }, - readOnly: true, - }, - { - name: 'selectOrFindPrevious', - description: 'Select or find previous', - bindKey: bindKey('selectOrFindPrevious'), - exec: function (editor) { - if (editor.selection.isEmpty()) editor.selection.selectWord(); - else editor.findPrevious(); - }, - readOnly: true, - }, - { - name: 'find', - description: 'Find', - bindKey: bindKey('find'), - exec: function () { - if (Acode) { - Acode.exec('find'); - } - }, - readOnly: true, - }, - { - name: 'overwrite', - description: 'Overwrite', - bindKey: bindKey('overwrite'), - exec: function (editor) { - editor.toggleOverwrite(); - }, - readOnly: true, - }, - { - name: 'selecttostart', - description: 'Select to start', - bindKey: bindKey('selecttostart'), - exec: function (editor) { - editor.getSelection().selectFileStart(); - }, - multiSelectAction: 'forEach', - readOnly: true, - scrollIntoView: 'animate', - aceCommandGroup: 'fileJump', - }, - { - name: 'gotostart', - description: 'Go to start', - bindKey: bindKey('gotostart'), - exec: function (editor) { - editor.navigateFileStart(); - }, - multiSelectAction: 'forEach', - readOnly: true, - scrollIntoView: 'animate', - aceCommandGroup: 'fileJump', - }, - { - name: 'selectup', - description: 'Select up', - bindKey: bindKey('selectup'), - exec: function (editor) { - editor.getSelection().selectUp(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'golineup', - description: 'Go line up', - bindKey: bindKey('golineup'), - exec: function (editor, args) { - editor.navigateUp(args.times); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'selecttoend', - description: 'Select to end', - bindKey: bindKey('selecttoend'), - exec: function (editor) { - editor.getSelection().selectFileEnd(); - }, - multiSelectAction: 'forEach', - readOnly: true, - scrollIntoView: 'animate', - aceCommandGroup: 'fileJump', - }, - { - name: 'gotoend', - description: 'Go to end', - bindKey: bindKey('gotoend'), - exec: function (editor) { - editor.navigateFileEnd(); - }, - multiSelectAction: 'forEach', - readOnly: true, - scrollIntoView: 'animate', - aceCommandGroup: 'fileJump', - }, - { - name: 'selectdown', - description: 'Select down', - bindKey: bindKey('selectdown'), - exec: function (editor) { - editor.getSelection().selectDown(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'golinedown', - description: 'Go line down', - bindKey: bindKey('golinedown'), - exec: function (editor, args) { - editor.navigateDown(args.times); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'selectwordleft', - description: 'Select word left', - bindKey: bindKey('selectwordleft'), - exec: function (editor) { - editor.getSelection().selectWordLeft(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'gotowordleft', - description: 'Go to word left', - bindKey: bindKey('gotowordleft'), - exec: function (editor) { - editor.navigateWordLeft(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'selecttolinestart', - description: 'Select to line start', - bindKey: bindKey('selecttolinestart'), - exec: function (editor) { - editor.getSelection().selectLineStart(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'gotolinestart', - description: 'Go to line start', - bindKey: bindKey('gotolinestart'), - exec: function (editor) { - editor.navigateLineStart(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'selectleft', - description: 'Select left', - bindKey: bindKey('selectleft'), - exec: function (editor) { - editor.getSelection().selectLeft(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'gotoleft', - description: 'Go to left', - bindKey: bindKey('gotoleft'), - exec: function (editor, args) { - editor.navigateLeft(args.times); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'selectwordright', - description: 'Select word right', - bindKey: bindKey('selectwordright'), - exec: function (editor) { - editor.getSelection().selectWordRight(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'gotowordright', - description: 'Go to word right', - bindKey: bindKey('gotowordright'), - exec: function (editor) { - editor.navigateWordRight(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'selecttolineend', - description: 'Select to line end', - bindKey: bindKey('selecttolineend'), - exec: function (editor) { - editor.getSelection().selectLineEnd(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'gotolineend', - description: 'Go to line end', - bindKey: bindKey('gotolineend'), - exec: function (editor) { - editor.navigateLineEnd(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'selectright', - description: 'Select right', - bindKey: bindKey('selectright'), - exec: function (editor) { - editor.getSelection().selectRight(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'gotoright', - description: 'Go to right', - bindKey: bindKey('gotoright'), - exec: function (editor, args) { - editor.navigateRight(args.times); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'selectpagedown', - description: 'Select page down', - bindKey: bindKey('selectpagedown'), - exec: function (editor) { - editor.selectPageDown(); - }, - readOnly: true, - }, - { - name: 'pagedown', - description: 'Page down', - bindKey: bindKey('pagedown'), - exec: function (editor) { - editor.scrollPageDown(); - }, - readOnly: true, - }, - { - name: 'gotopagedown', - description: 'Go to page down', - bindKey: bindKey('gotopagedown'), - exec: function (editor) { - editor.gotoPageDown(); - }, - readOnly: true, - }, - { - name: 'selectpageup', - description: 'Select page up', - bindKey: bindKey('selectpageup'), - exec: function (editor) { - editor.selectPageUp(); - }, - readOnly: true, - }, - { - name: 'pageup', - description: 'Page up', - bindKey: bindKey('pageup'), - exec: function (editor) { - editor.scrollPageUp(); - }, - readOnly: true, - }, - { - name: 'gotopageup', - description: 'Go to page up', - bindKey: bindKey('gotopageup'), - exec: function (editor) { - editor.gotoPageUp(); - }, - readOnly: true, - }, - { - name: 'scrollup', - description: 'Scroll up', - bindKey: bindKey('scrollup'), - exec: function (e) { - e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); - }, - readOnly: true, - }, - { - name: 'scrolldown', - description: 'Scroll down', - bindKey: bindKey('scrolldown'), - exec: function (e) { - e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); - }, - readOnly: true, - }, - { - name: 'selectlinestart', - description: 'Select line start', - bindKey: bindKey('selectlinestart'), - exec: function (editor) { - editor.getSelection().selectLineStart(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'selectlineend', - description: 'Select line end', - bindKey: bindKey('selectlineend'), - exec: function (editor) { - editor.getSelection().selectLineEnd(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - readOnly: true, - }, - { - name: 'togglerecording', - description: 'Toggle recording', - bindKey: bindKey('togglerecording'), - exec: function (editor) { - editor.commands.toggleRecording(editor); - }, - readOnly: true, - }, - { - name: 'replaymacro', - description: 'Replay macro', - bindKey: bindKey('replaymacro'), - exec: function (editor) { - editor.commands.replay(editor); - }, - readOnly: true, - }, - { - name: 'jumptomatching', - description: 'Jump to matching', - bindKey: bindKey('jumptomatching'), - exec: function (editor) { - editor.jumpToMatching(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'animate', - readOnly: true, - }, - { - name: 'selecttomatching', - description: 'Select to matching', - bindKey: bindKey('selecttomatching'), - exec: function (editor) { - editor.jumpToMatching(true); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'animate', - readOnly: true, - }, - { - name: 'expandToMatching', - description: 'Expand to matching', - bindKey: bindKey('expandToMatching'), - exec: function (editor) { - editor.jumpToMatching(true, true); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'animate', - 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('removeline'), - exec: function (editor) { - editor.removeLines(); - }, - scrollIntoView: 'cursor', - multiSelectAction: 'forEachLine', - }, - { - name: 'duplicateSelection', - description: 'Duplicate selection', - bindKey: bindKey('duplicateSelection'), - exec: function (editor) { - editor.duplicateSelection(); - }, - scrollIntoView: 'cursor', - multiSelectAction: 'forEach', - }, - { - name: 'sortlines', - description: 'Sort lines', - bindKey: bindKey('sortlines'), - exec: function (editor) { - editor.sortLines(); - }, - scrollIntoView: 'selection', - multiSelectAction: 'forEachLine', - }, - { - name: 'togglecomment', - description: 'Toggle comment', - bindKey: bindKey('togglecomment'), - exec: function (editor) { - editor.toggleCommentLines(); - }, - multiSelectAction: 'forEachLine', - scrollIntoView: 'selectionPart', - }, - { - name: 'toggleBlockComment', - description: 'Toggle block comment', - bindKey: bindKey('toggleBlockComment'), - exec: function (editor) { - editor.toggleBlockComment(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'selectionPart', - }, - { - name: 'modifyNumberUp', - description: 'Modify number up', - bindKey: bindKey('modifyNumberUp'), - exec: function (editor) { - editor.modifyNumber(1); - }, - scrollIntoView: 'cursor', - multiSelectAction: 'forEach', - }, - { - name: 'modifyNumberDown', - description: 'Modify number down', - bindKey: bindKey('modifyNumberDown'), - exec: function (editor) { - editor.modifyNumber(-1); - }, - scrollIntoView: 'cursor', - multiSelectAction: 'forEach', - }, - { - name: 'replace', - description: 'Replace', - bindKey: bindKey('replace'), - exec: function (editor) { - if (Acode) { - Acode.exec('replace'); - } - }, - }, - { - name: 'undo', - description: 'Undo', - bindKey: bindKey('undo'), - exec: function (editor) { - editor.undo(); - }, - }, - { - name: 'redo', - description: 'Redo', - bindKey: bindKey('redo'), - exec: function (editor) { - editor.redo(); - }, - }, - { - name: 'copylinesup', - description: 'Copy lines up', - bindKey: bindKey('copylinesup'), - exec: function (editor) { - editor.copyLinesUp(); - }, - scrollIntoView: 'cursor', - }, - { - name: 'movelinesup', - description: 'Move lines up', - bindKey: bindKey('movelinesup'), - exec: function (editor) { - editor.moveLinesUp(); - }, - scrollIntoView: 'cursor', - }, - { - name: 'copylinesdown', - description: 'Copy lines down', - bindKey: bindKey('copylinesdown'), - exec: function (editor) { - editor.copyLinesDown(); - }, - scrollIntoView: 'cursor', - }, - { - name: 'movelinesdown', - description: 'Move lines down', - bindKey: bindKey('movelinesdown'), - exec: function (editor) { - editor.moveLinesDown(); - }, - scrollIntoView: 'cursor', - }, - { - name: 'del', - description: 'Delete', - bindKey: bindKey('del'), - exec: function (editor) { - editor.remove('right'); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - }, - { - name: 'backspace', - description: 'Backspace', - bindKey: bindKey('backspace'), - exec: function (editor) { - editor.remove('left'); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - }, - { - name: 'cut_or_delete', - description: 'Cut or delete', - bindKey: bindKey('cut_or_delete'), - 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('removetolinestart'), - exec: function (editor) { - editor.removeToLineStart(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - }, - { - name: 'removetolineend', - description: 'Remove to line end', - bindKey: bindKey('removetolineend'), - exec: function (editor) { - editor.removeToLineEnd(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - }, - { - name: 'removetolinestarthard', - description: 'Remove to line start hard', - bindKey: bindKey('removetolinestarthard'), - 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('removetolineendhard'), - 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('removewordleft'), - exec: function (editor) { - editor.removeWordLeft(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - }, - { - name: 'removewordright', - description: 'Remove word right', - bindKey: bindKey('removewordright'), - exec: function (editor) { - editor.removeWordRight(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - }, - { - name: 'outdent', - description: 'Outdent', - bindKey: bindKey('outdent'), - exec: function (editor) { - editor.blockOutdent(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'selectionPart', - }, - { - name: 'indent', - description: 'Indent', - bindKey: bindKey('indent'), - exec: function (editor) { - editor.indent(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'selectionPart', - }, - { - name: 'blockoutdent', - description: 'Block outdent', - bindKey: bindKey('blockoutdent'), - exec: function (editor) { - editor.blockOutdent(); - }, - multiSelectAction: 'forEachLine', - scrollIntoView: 'selectionPart', - }, - { - name: 'blockindent', - description: 'Block indent', - bindKey: bindKey('blockindent'), - 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('splitline'), - exec: function (editor) { - editor.splitLine(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - }, - { - name: 'transposeletters', - description: 'Transpose letters', - bindKey: bindKey('transposeletters'), - exec: function (editor) { - editor.transposeLetters(); - }, - multiSelectAction: function (editor) { - editor.transposeSelections(1); - }, - scrollIntoView: 'cursor', - }, - { - name: 'touppercase', - description: 'To uppercase', - bindKey: bindKey('touppercase'), - exec: function (editor) { - editor.toUpperCase(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - }, - { - name: 'tolowercase', - description: 'To lowercase', - bindKey: bindKey('tolowercase'), - exec: function (editor) { - editor.toLowerCase(); - }, - multiSelectAction: 'forEach', - scrollIntoView: 'cursor', - }, - { - name: 'autoindent', - description: 'Auto Indent', - bindKey: bindKey('autoindent'), - exec: function (editor) { - editor.autoIndent(); - }, - multiSelectAction: 'forEachLine', - scrollIntoView: 'animate', - }, - { - name: 'expandtoline', - description: 'Expand to line', - bindKey: bindKey('expandtoline'), - 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: 'joinlines', - description: 'Join lines', - bindKey: bindKey('joinlines'), - 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('invertSelection'), - 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', - description: 'Open command pallete', - bindKey: bindKey('openCommandPallete'), - exec: function (editor) { - editor.prompt({ - $type: 'commands', - }); - }, - readOnly: true, - }, - { - name: 'modeSelect', - description: 'Change language mode...', - bindKey: bindKey('modeSelect'), - exec: function () { - Acode.exec('syntax'); - }, - 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/editor', [ - 'require', - 'exports', - 'module', - 'ace/lib/fixoldbrowsers', - '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/clipboard', -], function (require, exports, module) { - 'use strict'; - - require('./lib/fixoldbrowsers'); - - 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 clipboard = require('./clipboard'); - var Editor = function (renderer, session, options) { - 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.bgTokenizer) - 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.$uid = 0; - - (function () { - oop.implement(this, EventEmitter); - - this.$initOperationListeners = function () { - this.commands.on('exec', this.startOperation.bind(this), true); - this.commands.on('afterExec', this.endOperation.bind(this), true); - - this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this, true)); - this.on( - 'change', - function () { - if (!this.curOp) { - this.startOperation(); - this.curOp.selectionBefore = this.$lastSel; - } - this.curOp.docChanged = true; - }.bind(this), - true, - ); - - this.on( - 'changeSelection', - function () { - if (!this.curOp) { - this.startOperation(); - this.curOp.selectionBefore = this.$lastSel; - } - this.curOp.selectionChanged = true; - }.bind(this), - true, - ); - }; - - this.curOp = null; - this.prevOp = {}; - this.startOperation = function (commandEvent) { - if (this.curOp) { - if (!commandEvent || this.curOp.command) return; - this.prevOp = this.curOp; - } - if (!commandEvent) { - this.previousCommand = null; - commandEvent = {}; - } - - this.$opResetTimer.schedule(); - this.curOp = this.session.curOp = { - command: commandEvent.command || {}, - args: commandEvent.args, - scrollTop: this.renderer.scrollTop, - }; - this.curOp.selectionBefore = this.selection.toJSON(); - }; - - this.endOperation = function (e) { - if (this.curOp && this.session) { - if ((e && e.returnValue === false) || !this.session) - return (this.curOp = null); - if ( - e == true && - this.curOp.command && - this.curOp.command.name == 'mouse' - ) - 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); - } - var sel = this.selection.toJSON(); - this.curOp.selectionAfter = sel; - this.$lastSel = this.selection.toJSON(); - this.session.getUndoManager().addSelection(sel); - this.prevOp = this.curOp; - this.curOp = null; - } - }; - this.$mergeableCommands = ['backspace', 'del', 'insertstring']; - this.$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(); - }; - this.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(); - } - }; - this.getKeyboardHandler = function () { - return this.keyBinding.getKeyboardHandler(); - }; - this.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); - - 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.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.bgTokenizer) session.bgTokenizer.scheduleStart(); - }; - this.getSession = function () { - return this.session; - }; - this.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; - }; - this.getValue = function () { - return this.session.getValue(); - }; - this.getSelection = function () { - return this.selection; - }; - this.resize = function (force) { - this.renderer.onResize(force); - }; - this.setTheme = function (theme, cb) { - this.renderer.setTheme(theme, cb); - }; - this.getTheme = function () { - return this.renderer.getTheme(); - }; - this.setStyle = function (style) { - this.renderer.setStyle(style); - }; - this.unsetStyle = function (style) { - this.renderer.unsetStyle(style); - }; - this.getFontSize = function () { - return ( - this.getOption('fontSize') || dom.computedStyle(this.container).fontSize - ); - }; - this.setFontSize = function (size) { - this.setOption('fontSize', size); - }; - - this.$highlightBrackets = function () { - if (this.$highlightPending) { - return; - } - var self = this; - this.$highlightPending = true; - setTimeout(function () { - self.$highlightPending = false; - var session = self.session; - if (!session || !session.bgTokenizer) return; - if (session.$bracketHighlight) { - session.$bracketHighlight.markerIds.forEach(function (id) { - session.removeMarker(id); - }); - session.$bracketHighlight = null; - } - var ranges = session.getMatchingBracketRanges(self.getCursorPosition()); - if (!ranges && session.$mode.getMatching) - ranges = session.$mode.getMatching(self.session); - if (!ranges) 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'); - }), - }; - }, 50); - }; - this.$highlightTags = function () { - if (this.$highlightTagPending) return; - var self = this; - this.$highlightTagPending = true; - setTimeout(function () { - self.$highlightTagPending = false; - - var session = self.session; - if (!session || !session.bgTokenizer) return; - - var pos = self.getCursorPosition(); - var iterator = new TokenIterator(self.session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - - if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) { - session.removeMarker(session.$tagHighlight); - session.$tagHighlight = null; - return; - } - - if (token.type.indexOf('tag-open') !== -1) { - token = iterator.stepForward(); - if (!token) return; - } - - var tag = token.value; - var currentTag = token.value; - var depth = 0; - var prevToken = iterator.stepBackward(); - - if (prevToken.value === '<') { - do { - prevToken = token; - token = iterator.stepForward(); - - if (token) { - if (token.type.indexOf('tag-name') !== -1) { - currentTag = token.value; - if (tag === currentTag) { - if (prevToken.value === '<') { - depth++; - } else if (prevToken.value === '') { - // self closing tag - depth--; - } - } - } while (token && depth >= 0); - } else { - do { - token = prevToken; - prevToken = iterator.stepBackward(); - - if (token) { - if (token.type.indexOf('tag-name') !== -1) { - if (tag === token.value) { - if (prevToken.value === '<') { - depth++; - } 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); - iterator.stepForward(); - } - - if (!token) { - session.removeMarker(session.$tagHighlight); - session.$tagHighlight = null; - return; - } - - var row = iterator.getCurrentTokenRow(); - var column = iterator.getCurrentTokenColumn(); - var range = new Range(row, column, row, column + token.value.length); - var sbm = session.$backMarkers[session.$tagHighlight]; - if ( - session.$tagHighlight && - sbm != undefined && - range.compareRange(sbm.range) !== 0 - ) { - session.removeMarker(session.$tagHighlight); - session.$tagHighlight = null; - } - - if (!session.$tagHighlight) - session.$tagHighlight = session.addMarker( - range, - 'ace_bracket', - 'text', - ); - }, 50); - }; - this.focus = function () { - var _self = this; - setTimeout(function () { - if (!_self.isFocused()) _self.textInput.focus(); - }); - this.textInput.focus(); - }; - this.isFocused = function () { - return this.textInput.isFocused(); - }; - this.blur = function () { - this.textInput.blur(); - }; - this.onFocus = function (e) { - if (this.$isFocused) return; - this.$isFocused = true; - this.renderer.showCursor(); - this.renderer.visualizeFocus(); - this._emit('focus', e); - }; - this.onBlur = function (e) { - if (!this.$isFocused) return; - this.$isFocused = false; - this.renderer.hideCursor(); - this.renderer.visualizeBlur(); - this._emit('blur', e); - }; - - this.$cursorChange = function () { - this.renderer.updateCursor(); - this.$highlightBrackets(); - this.$highlightTags(); - this.$updateHighlightActiveLine(); - }; - this.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(); - }; - - this.onTokenizerUpdate = function (e) { - var rows = e.data; - this.renderer.updateLines(rows.first, rows.last); - }; - - this.onScrollTopChange = function () { - this.renderer.scrollToY(this.session.getScrollTop()); - }; - - this.onScrollLeftChange = function () { - this.renderer.scrollToX(this.session.getScrollLeft()); - }; - this.onCursorChange = function () { - this.$cursorChange(); - this._signal('changeSelection'); - }; - - this.$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'); - } - }; - - this.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'); - }; - - this.$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; - }; - - this.onChangeFrontMarker = function () { - this.renderer.updateFrontMarkers(); - }; - - this.onChangeBackMarker = function () { - this.renderer.updateBackMarkers(); - }; - - this.onChangeBreakpoint = function () { - this.renderer.updateBreakpoints(); - }; - - this.onChangeAnnotation = function () { - this.renderer.setAnnotations(this.session.getAnnotations()); - }; - - this.onChangeMode = function (e) { - this.renderer.updateText(); - this._emit('changeMode', e); - }; - - this.onChangeWrapLimit = function () { - this.renderer.updateFull(); - }; - - this.onChangeWrapMode = function () { - this.renderer.onResize(true); - }; - - this.onChangeFold = function () { - this.$updateHighlightActiveLine(); - this.renderer.updateFull(); - }; - this.getSelectedText = function () { - return this.session.getTextRange(this.getSelectionRange()); - }; - this.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 : ''; - return e.text; - }; - this.onCopy = function () { - this.commands.exec('copy', this); - }; - this.onCut = function () { - this.commands.exec('cut', this); - }; - this.onPaste = function (text, event) { - var e = { - text: text, - event: event, - }; - this.commands.exec('paste', this, e); - }; - - this.$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]); - } - } - }; - - this.execCommand = function (command, args) { - return this.commands.exec(command, this, args); - }; - this.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 = new 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); - } - }; - - this.autoIndent = function () { - var session = this.session; - var mode = session.getMode(); - - var startRow, endRow; - if (this.selection.isEmpty()) { - startRow = 0; - endRow = session.doc.getLength() - 1; - } else { - var selectedRange = this.getSelectionRange(); - - startRow = selectedRange.start.row; - endRow = selectedRange.end.row; - } - - var prevLineState = ''; - var prevLine = ''; - var lineIndent = ''; - var line, currIndent, range; - var tab = session.getTabString(); - - 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); - } - - line = session.getLine(row); - currIndent = mode.$getIndent(line); - if (lineIndent !== currIndent) { - if (currIndent.length > 0) { - 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); - } - }; - - this.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(); - }; - - this.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); - } - }; - - this.onCommandKey = function (e, hashId, keyCode) { - return this.keyBinding.onCommandKey(e, hashId, keyCode); - }; - this.setOverwrite = function (overwrite) { - this.session.setOverwrite(overwrite); - }; - this.getOverwrite = function () { - return this.session.getOverwrite(); - }; - this.toggleOverwrite = function () { - this.session.toggleOverwrite(); - }; - this.setScrollSpeed = function (speed) { - this.setOption('scrollSpeed', speed); - }; - this.getScrollSpeed = function () { - return this.getOption('scrollSpeed'); - }; - this.setDragDelay = function (dragDelay) { - this.setOption('dragDelay', dragDelay); - }; - this.getDragDelay = function () { - return this.getOption('dragDelay'); - }; - this.setSelectionStyle = function (val) { - this.setOption('selectionStyle', val); - }; - this.getSelectionStyle = function () { - return this.getOption('selectionStyle'); - }; - this.setHighlightActiveLine = function (shouldHighlight) { - this.setOption('highlightActiveLine', shouldHighlight); - }; - this.getHighlightActiveLine = function () { - return this.getOption('highlightActiveLine'); - }; - this.setHighlightGutterLine = function (shouldHighlight) { - this.setOption('highlightGutterLine', shouldHighlight); - }; - - this.getHighlightGutterLine = function () { - return this.getOption('highlightGutterLine'); - }; - this.setHighlightSelectedWord = function (shouldHighlight) { - this.setOption('highlightSelectedWord', shouldHighlight); - }; - this.getHighlightSelectedWord = function () { - return this.$highlightSelectedWord; - }; - - this.setAnimatedScroll = function (shouldAnimate) { - this.renderer.setAnimatedScroll(shouldAnimate); - }; - - this.getAnimatedScroll = function () { - return this.renderer.getAnimatedScroll(); - }; - this.setShowInvisibles = function (showInvisibles) { - this.renderer.setShowInvisibles(showInvisibles); - }; - this.getShowInvisibles = function () { - return this.renderer.getShowInvisibles(); - }; - - this.setDisplayIndentGuides = function (display) { - this.renderer.setDisplayIndentGuides(display); - }; - - this.getDisplayIndentGuides = function () { - return this.renderer.getDisplayIndentGuides(); - }; - this.setShowPrintMargin = function (showPrintMargin) { - this.renderer.setShowPrintMargin(showPrintMargin); - }; - this.getShowPrintMargin = function () { - return this.renderer.getShowPrintMargin(); - }; - this.setPrintMarginColumn = function (showPrintMargin) { - this.renderer.setPrintMarginColumn(showPrintMargin); - }; - this.getPrintMarginColumn = function () { - return this.renderer.getPrintMarginColumn(); - }; - this.setReadOnly = function (readOnly) { - this.setOption('readOnly', readOnly); - }; - this.getReadOnly = function () { - return this.getOption('readOnly'); - }; - this.setBehavioursEnabled = function (enabled) { - this.setOption('behavioursEnabled', enabled); - }; - this.getBehavioursEnabled = function () { - return this.getOption('behavioursEnabled'); - }; - this.setWrapBehavioursEnabled = function (enabled) { - this.setOption('wrapBehavioursEnabled', enabled); - }; - this.getWrapBehavioursEnabled = function () { - return this.getOption('wrapBehavioursEnabled'); - }; - this.setShowFoldWidgets = function (show) { - this.setOption('showFoldWidgets', show); - }; - this.getShowFoldWidgets = function () { - return this.getOption('showFoldWidgets'); - }; - - this.setFadeFoldWidgets = function (fade) { - this.setOption('fadeFoldWidgets', fade); - }; - - this.getFadeFoldWidgets = function () { - return this.getOption('fadeFoldWidgets'); - }; - this.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(); - }; - this.removeWordRight = function () { - if (this.selection.isEmpty()) this.selection.selectWordRight(); - - this.session.remove(this.getSelectionRange()); - this.clearSelection(); - }; - this.removeWordLeft = function () { - if (this.selection.isEmpty()) this.selection.selectWordLeft(); - - this.session.remove(this.getSelectionRange()); - this.clearSelection(); - }; - this.removeToLineStart = function () { - if (this.selection.isEmpty()) this.selection.selectLineStart(); - if (this.selection.isEmpty()) this.selection.selectLeft(); - this.session.remove(this.getSelectionRange()); - this.clearSelection(); - }; - this.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(); - }; - this.splitLine = function () { - if (!this.selection.isEmpty()) { - this.session.remove(this.getSelectionRange()); - this.clearSelection(); - } - - var cursor = this.getCursorPosition(); - this.insert('\n'); - this.moveCursorToPosition(cursor); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.blockIndent = function () { - var rows = this.$getSelectedRows(); - this.session.indentRows(rows.first, rows.last, '\t'); - }; - this.blockOutdent = function () { - var selection = this.session.getSelection(); - this.session.outdentRows(selection.getRange()); - }; - this.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]); - } - }; - this.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); - }; - - this.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); - }; - this.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; - }; - this.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(); - } - }; - - this.$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'], - ['&&', '||'], - ['==', '!='], - ]; - - this.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 = ''; - } - } - } - } - }; - this.removeLines = function () { - var rows = this.$getSelectedRows(); - this.session.removeFullLines(rows.first, rows.last); - this.clearSelection(); - }; - - this.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), false); - range.start = point; - range.end = endPoint; - - sel.setSelectionRange(range, reverse); - } - }; - this.moveLinesDown = function () { - this.$moveLines(1, false); - }; - this.moveLinesUp = function () { - this.$moveLines(-1, false); - }; - this.moveText = function (range, toPosition, copy) { - return this.session.moveText(range, toPosition, copy); - }; - this.copyLinesUp = function () { - this.$moveLines(-1, true); - }; - this.copyLinesDown = function () { - this.$moveLines(1, true); - }; - this.$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; - } - }; - this.$getSelectedRows = function (range) { - range = (range || this.getSelectionRange()).collapseRows(); - - return { - first: this.session.getRowFoldStart(range.start.row), - last: this.session.getRowFoldEnd(range.end.row), - }; - }; - - this.onCompositionStart = function (compositionState) { - this.renderer.showComposition(compositionState); - }; - - this.onCompositionUpdate = function (text) { - this.renderer.setCompositionText(text); - }; - - this.onCompositionEnd = function () { - this.renderer.hideComposition(); - }; - this.getFirstVisibleRow = function () { - return this.renderer.getFirstVisibleRow(); - }; - this.getLastVisibleRow = function () { - return this.renderer.getLastVisibleRow(); - }; - this.isRowVisible = function (row) { - return ( - row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow() - ); - }; - this.isRowFullyVisible = function (row) { - return ( - row >= this.renderer.getFirstFullyVisibleRow() && - row <= this.renderer.getLastFullyVisibleRow() - ); - }; - this.$getVisibleRowCount = function () { - return ( - this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1 - ); - }; - - this.$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); - }; - this.selectPageDown = function () { - this.$moveByPage(1, true); - }; - this.selectPageUp = function () { - this.$moveByPage(-1, true); - }; - this.gotoPageDown = function () { - this.$moveByPage(1, false); - }; - this.gotoPageUp = function () { - this.$moveByPage(-1, false); - }; - this.scrollPageDown = function () { - this.$moveByPage(1); - }; - this.scrollPageUp = function () { - this.$moveByPage(-1); - }; - this.scrollToRow = function (row) { - this.renderer.scrollToRow(row); - }; - this.scrollToLine = function (line, center, animate, callback) { - this.renderer.scrollToLine(line, center, animate, callback); - }; - this.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); - }; - this.getCursorPosition = function () { - return this.selection.getCursor(); - }; - this.getCursorPositionScreen = function () { - return this.session.documentToScreenPosition(this.getCursorPosition()); - }; - this.getSelectionRange = function () { - return this.selection.getRange(); - }; - this.selectAll = function () { - this.selection.selectAll(); - }; - this.clearSelection = function () { - this.selection.clearSelection(); - }; - this.moveCursorTo = function (row, column) { - this.selection.moveCursorTo(row, column); - }; - this.moveCursorToPosition = function (pos) { - this.selection.moveCursorToPosition(pos); - }; - this.jumpToMatching = function (select, expand) { - var cursor = this.getCursorPosition(); - var iterator = new TokenIterator(this.session, cursor.row, cursor.column); - var prevToken = iterator.getCurrentToken(); - 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 === '<') { - depth[token.value]++; - } else if (prevToken.value === '= 0; --i) { - if (this.$tryReplace(ranges[i], replacement)) { - replaced++; - } - } - - this.selection.setSelectionRange(selection); - - return replaced; - }; - - this.$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; - } - }; - this.getLastSearchOptions = function () { - return this.$search.getOptions(); - }; - this.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); - }; - this.findNext = function (options, animate) { - this.find( - { - skipCurrent: true, - backwards: false, - }, - options, - animate, - ); - }; - this.findPrevious = function (options, animate) { - this.find( - options, - { - skipCurrent: true, - backwards: true, - }, - animate, - ); - }; - - this.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); - }; - this.undo = function () { - this.session.getUndoManager().undo(this.session); - this.renderer.scrollCursorIntoView(null, 0.5); - }; - this.redo = function () { - this.session.getUndoManager().redo(this.session); - this.renderer.scrollCursorIntoView(null, 0.5); - }; - this.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(); - }; - this.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); - }; - }; - - this.$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), - ); - }; - this.prompt = function (message, options, callback) { - var editor = this; - config.loadModule('./ext/prompt', function (module) { - module.prompt(editor, message, options, callback); - }); - }; - }.call(Editor.prototype)); - - 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 value = - this.session && (this.renderer.$composition || this.getValue()); - if (value && 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 (!value && !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 (!value && this.renderer.placeholderNode) { - this.renderer.placeholderNode.textContent = - this.$placeholder || ''; - } - }.bind(this); - this.on('input', this.$updatePlaceholder); - } - this.$updatePlaceholder(); - }, - }, - - hScrollBarAlwaysVisible: 'renderer', - vScrollBarAlwaysVisible: 'renderer', - highlightGutterLine: 'renderer', - animatedScroll: 'renderer', - showInvisibles: 'renderer', - showPrintMargin: 'renderer', - printMarginColumn: 'renderer', - printMargin: 'renderer', - fadeFoldWidgets: 'renderer', - showFoldWidgets: 'renderer', - displayIndentGuides: 'renderer', - showGutter: 'renderer', - fontSize: 'renderer', - fontFamily: 'renderer', - maxLines: 'renderer', - minLines: 'renderer', - scrollPastEnd: 'renderer', - fixedWidthGutter: 'renderer', - theme: 'renderer', - hasCssTransforms: 'renderer', - maxPixelHeight: 'renderer', - useTextareaForIME: '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 (session, row) { - return ( - (Math.abs(session.selection.lead.row - row) || - row + 1 + (row < 9 ? '\xb7' : '')) + '' - ); - }, - getWidth: function (session, lastLineNumber, config) { - return ( - Math.max( - lastLineNumber.toString().length, - (config.lastRow + 1).toString().length, - 2, - ) * config.characterWidth - ); - }, - update: function (e, editor) { - editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER); - }, - attach: function (editor) { - editor.renderer.$gutterLayer.$renderer = this; - editor.on('changeSelection', this.update); - this.update(null, editor); - }, - detach: function (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/undomanager', [ - 'require', - 'exports', - 'module', - 'ace/range', -], function (require, exports, module) { - 'use strict'; - var UndoManager = function () { - this.$maxRev = 0; - this.$fromUndo = false; - this.reset(); - }; - - (function () { - this.addSession = function (session) { - this.$session = session; - }; - this.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 = []; - 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); - }; - - this.addSelection = function (selection, rev) { - this.selections.push({ - value: selection, - rev: rev || this.$rev, - }); - }; - - this.startNewGroup = function () { - this.lastDeltas = null; - return this.$rev; - }; - - this.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; - }; - - this.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; - } - } - }; - - this.getRevision = function () { - return this.$rev; - }; - - this.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); - }; - - this.getChangedRanges = function (from, to) { - if (to == null) to = this.$rev + 1; - }; - - this.getChangedLines = function (from, to) { - if (to == null) to = this.$rev + 1; - }; - this.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; - }; - this.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; - }; - - this.$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; - }; - this.reset = function () { - this.lastDeltas = null; - this.$lastDelta = null; - this.$undoStack = []; - this.$redoStack = []; - this.$rev = 0; - this.mark = 0; - this.$redoStackBaseRev = this.$rev; - this.selections = []; - }; - this.canUndo = function () { - return this.$undoStack.length > 0; - }; - this.canRedo = function () { - return this.$redoStack.length > 0; - }; - this.bookmark = function (rev) { - if (rev == undefined) rev = this.$rev; - this.mark = rev; - }; - this.isAtBookmark = function () { - return this.$rev === this.mark; - }; - - this.toJSON = function () {}; - - this.fromJSON = function () {}; - - this.hasUndo = this.canUndo; - this.hasRedo = this.canRedo; - this.isClean = this.isAtBookmark; - this.markClean = this.bookmark; - - this.$prettyPrint = function (delta) { - if (delta) return stringifyDelta(delta); - return ( - stringifyDelta(this.$undoStack) + - '\n---\n' + - stringifyDelta(this.$redoStack) - ); - }; - }.call(UndoManager.prototype)); - - 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/layer/lines', [ - 'require', - 'exports', - 'module', - 'ace/lib/dom', -], function (require, exports, module) { - 'use strict'; - - var dom = require('../lib/dom'); - - var Lines = function (element, canvasHeight) { - this.element = element; - this.canvasHeight = canvasHeight || 500000; - this.element.style.height = this.canvasHeight * 2 + 'px'; - - this.cells = []; - this.cellCache = []; - this.$offsetCoefficient = 0; - }; - - (function () { - this.moveContainer = function (config) { - dom.translate( - this.element, - 0, - -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - - config.offset * this.$offsetCoefficient, - ); - }; - - this.pageChanged = function (oldConfig, newConfig) { - return ( - Math.floor( - (oldConfig.firstRowScreen * oldConfig.lineHeight) / this.canvasHeight, - ) !== - Math.floor( - (newConfig.firstRowScreen * newConfig.lineHeight) / this.canvasHeight, - ) - ); - }; - - this.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; - }; - - this.computeLineHeight = function (row, config, session) { - return config.lineHeight * session.getRowLineCount(row); - }; - - this.getLength = function () { - return this.cells.length; - }; - - this.get = function (index) { - return this.cells[index]; - }; - - this.shift = function () { - this.$cacheCell(this.cells.shift()); - }; - - this.pop = function () { - this.$cacheCell(this.cells.pop()); - }; - - this.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); - } - }; - - this.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); - } - }; - - this.last = function () { - if (this.cells.length) return this.cells[this.cells.length - 1]; - else return null; - }; - - this.$cacheCell = function (cell) { - if (!cell) return; - - cell.element.remove(); - this.cellCache.push(cell); - }; - - this.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; - }; - }.call(Lines.prototype)); - - 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', -], 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 Gutter = function (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; - }; - - (function () { - oop.implement(this, EventEmitter); - - this.setSession = function (session) { - if (this.session) this.session.off('change', this.$updateAnnotations); - this.session = session; - if (session) session.on('change', this.$updateAnnotations); - }; - - this.addGutterDecoration = function (row, className) { - if (window.console) - console.warn && - console.warn('deprecated use session.addGutterDecoration'); - this.session.addGutterDecoration(row, className); - }; - - this.removeGutterDecoration = function (row, className) { - if (window.console) - console.warn && - console.warn('deprecated use session.removeGutterDecoration'); - this.session.removeGutterDecoration(row, className); - }; - - this.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: [], - }; - - var annoText = annotation.text; - annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || ''; - - if (rowInfo.text.indexOf(annoText) === -1) rowInfo.text.push(annoText); - - var type = annotation.type; - if (type == 'error') rowInfo.className = ' ace_error'; - else if (type == 'warning' && rowInfo.className != ' ace_error') - rowInfo.className = ' ace_warning'; - else if (type == 'info' && !rowInfo.className) - rowInfo.className = ' ace_info'; - } - }; - - this.$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); - } - }; - - this.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); - }; - - this.$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); - } - }; - - this.$updateCursorRow = function () { - if (!this.$highlightGutterLine) return; - - var position = this.session.selection.getCursor(); - if (this.$cursorRow === position.row) return; - - this.$cursorRow = position.row; - }; - - this.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; - } - } - }; - - this.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); - }; - - this.$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; - }; - - this.$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 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 className = 'ace_gutter-cell '; - 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]) className += this.$annotations[row].className; - if (element.className != className) element.className = className; - - if (foldWidgets) { - var c = foldWidgets[row]; - if (c == null) c = foldWidgets[row] = session.getFoldWidget(row); - } - - if (c) { - var className = 'ace_fold-widget ace_' + c; - if (c == 'start' && row == foldStart && row < fold.end.row) - className += ' ace_closed'; - else className += ' ace_open'; - if (foldWidget.className != className) foldWidget.className = className; - - var foldHeight = config.lineHeight + 'px'; - dom.setStyle(foldWidget.style, 'height', foldHeight); - dom.setStyle(foldWidget.style, 'display', 'inline-block'); - } else { - if (foldWidget) { - dom.setStyle(foldWidget.style, 'display', 'none'); - } - } - - var text = ( - gutterRenderer - ? gutterRenderer.getText(session, row) - : row + firstLineNumber - ).toString(); - - if (text !== textNode.data) { - textNode.data = text; - } - - 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 = text; - return cell; - }; - - this.$fixedWidth = false; - - this.$highlightGutterLine = true; - this.$renderer = ''; - this.setHighlightGutterLine = function (highlightGutterLine) { - this.$highlightGutterLine = highlightGutterLine; - }; - - this.$showLineNumbers = true; - this.$renderer = ''; - this.setShowLineNumbers = function (show) { - this.$renderer = !show && { - getWidth: function () { - return 0; - }, - getText: function () { - return ''; - }, - }; - }; - - this.getShowLineNumbers = function () { - return this.$showLineNumbers; - }; - - this.$showFoldWidgets = true; - this.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; - }; - - this.getShowFoldWidgets = function () { - return this.$showFoldWidgets; - }; - - this.$computePadding = function () { - if (!this.element.firstChild) - return { - left: 0, - right: 0, - }; - var style = dom.computedStyle(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; - }; - - this.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'; - }; - }.call(Gutter.prototype)); - - function onCreateCell(element) { - var textNode = document.createTextNode(''); - element.appendChild(textNode); - - var foldWidget = dom.createElement('span'); - element.appendChild(foldWidget); - - 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 = function (parentEl) { - this.element = dom.createElement('div'); - this.element.className = 'ace_layer ace_marker-layer'; - parentEl.appendChild(this.element); - }; - - (function () { - this.$padding = 0; - - this.setPadding = function (padding) { - this.$padding = padding; - }; - this.setSession = function (session) { - this.session = session; - }; - - this.setMarkers = function (markers) { - this.markers = markers; - }; - - this.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; - }; - - this.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); - } - }; - - this.$getTop = function (row, layerConfig) { - return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight; - }; - - function getBorderClass(tl, tr, br, bl) { - return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0); - } - this.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, - ); - } - }; - this.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:0;' + - '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:0;' + - 'top:' + - top + - 'px;' + - 'left:' + - padding + - 'px;' + - (extraStyle || ''), - ); - }; - this.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 || ''), - ); - }; - this.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); - }; - - this.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 || ''), - ); - }; - - this.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 || ''), - ); - }; - }.call(Marker.prototype)); - - exports.Marker = Marker; -}); - -define('ace/layer/text', [ - 'require', - 'exports', - 'module', - 'ace/lib/oop', - 'ace/lib/dom', - 'ace/lib/lang', - 'ace/layer/lines', - 'ace/lib/event_emitter', -], 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 Text = function (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); - }; - - (function () { - oop.implement(this, EventEmitter); - - this.EOF_CHAR = '\xB6'; - this.EOL_CHAR_LF = '\xAC'; - this.EOL_CHAR_CRLF = '\xa4'; - this.EOL_CHAR = this.EOL_CHAR_LF; - this.TAB_CHAR = '\u2014'; //"\u21E5"; - this.SPACE_CHAR = '\xB7'; - this.$padding = 0; - this.MAX_LINE_LENGTH = 10000; - - this.$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; - } - }; - - this.setPadding = function (padding) { - this.$padding = padding; - this.element.style.margin = '0 ' + padding + 'px'; - }; - - this.getLineHeight = function () { - return this.$fontMetrics.$characterSize.height || 0; - }; - - this.getCharacterWidth = function () { - return this.$fontMetrics.$characterSize.width || 0; - }; - - this.$setFontMetrics = function (measure) { - this.$fontMetrics = measure; - this.$fontMetrics.on( - 'changeCharacterSize', - function (e) { - this._signal('changeCharacterSize', e); - }.bind(this), - ); - this.$pollSizeChanges(); - }; - - this.checkForSizeChanges = function () { - this.$fontMetrics.checkForSizeChanges(); - }; - this.$pollSizeChanges = function () { - return (this.$pollSizeChangesTimer = - this.$fontMetrics.$pollSizeChanges()); - }; - this.setSession = function (session) { - this.session = session; - if (session) this.$computeTabString(); - }; - - this.showInvisibles = false; - this.showSpaces = false; - this.showTabs = false; - this.showEOL = false; - this.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; - }; - - this.displayIndentGuides = true; - this.setDisplayIndentGuides = function (display) { - if (this.displayIndentGuides == display) return false; - - this.displayIndentGuides = display; - this.$computeTabString(); - return true; - }; - - this.$tabStrings = []; - this.onChangeTabSize = this.$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; - } - }; - - this.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'; - } - } - }; - - this.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.$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; - }; - - this.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)); - }; - - this.$textToken = { - text: true, - rparen: true, - lparen: true, - }; - - this.$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]+)|(\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.com.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 (!this.$textToken[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.className = classes; - span.appendChild(valueFragment); - - parent.appendChild(span); - } else { - parent.appendChild(valueFragment); - } - - return screenColumn + value.length; - }; - - this.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)); - } - return value.substr(cols); - } else if (value[0] == '\t') { - for (var i = 0; i < cols; i++) { - parent.appendChild(this.$tabStrings['\t'].cloneNode(true)); - } - return value.substr(cols); - } - return value; - }; - - this.$createLineElement = function (parent) { - var lineEl = this.dom.createElement('div'); - lineEl.className = 'ace_line'; - lineEl.style.height = this.config.lineHeight + 'px'; - - return lineEl; - }; - - this.$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); - }; - - this.$renderSimpleLine = function (parent, tokens) { - var screenColumn = 0; - var token = tokens[0]; - var value = token.value; - if (this.displayIndentGuides) - value = this.renderIndentGuide(parent, value); - if (value) - screenColumn = this.$renderToken(parent, screenColumn, token, value); - for (var i = 1; i < tokens.length; i++) { - token = tokens[i]; - value = token.value; - if (screenColumn + value.length > this.MAX_LINE_LENGTH) - return this.$renderOverflowMessage( - parent, - screenColumn, - token, - value, - ); - screenColumn = this.$renderToken(parent, screenColumn, token, value); - } - }; - - this.$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); - }; - this.$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); - } - }; - - this.$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; - }; - - this.$useLineGroups = function () { - return this.session.getUseWrapMode(); - }; - - this.destroy = function () {}; - }.call(Text.prototype)); - - 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 = function (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); - }; - - (function () { - this.$updateOpacity = function (val) { - var cursors = this.cursors; - for (var i = cursors.length; i--; ) - dom.setStyle(cursors[i].style, 'opacity', val ? '' : '0'); - }; - - this.$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), - ); - }; - - this.$stopCssAnimation = function () { - this.$isAnimating = false; - dom.removeCssClass(this.element, 'ace_animate-blinking'); - }; - - this.$padding = 0; - this.setPadding = function (padding) { - this.$padding = padding; - }; - - this.setSession = function (session) { - this.session = session; - }; - - this.setBlinking = function (blinking) { - if (blinking != this.isBlinking) { - this.isBlinking = blinking; - this.restartTimer(); - } - }; - - this.setBlinkInterval = function (blinkInterval) { - if (blinkInterval != this.blinkInterval) { - this.blinkInterval = blinkInterval; - this.restartTimer(); - } - }; - - this.setSmoothBlinking = function (smoothBlinking) { - if (smoothBlinking != this.smoothBlinking) { - this.smoothBlinking = smoothBlinking; - dom.setCssClass(this.element, 'ace_smooth-blinking', smoothBlinking); - this.$updateCursors(true); - this.restartTimer(); - } - }; - - this.addCursor = function () { - var el = dom.createElement('div'); - el.className = 'ace_cursor'; - this.element.appendChild(el); - this.cursors.push(el); - return el; - }; - - this.removeCursor = function () { - if (this.cursors.length > 1) { - var el = this.cursors.pop(); - el.parentNode.removeChild(el); - return el; - } - }; - - this.hideCursor = function () { - this.isVisible = false; - dom.addCssClass(this.element, 'ace_hidden-cursors'); - this.restartTimer(); - }; - - this.showCursor = function () { - this.isVisible = true; - dom.removeCssClass(this.element, 'ace_hidden-cursors'); - this.restartTimer(); - }; - - this.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 = function () { - this.timeoutId = setTimeout(function () { - update(false); - }, 0.6 * this.blinkInterval); - }.bind(this); - - this.intervalId = setInterval(function () { - update(true); - blink(); - }, this.blinkInterval); - blink(); - } - }; - - this.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, - }; - }; - - this.isCursorInView = function (pixelPos, config) { - return pixelPos.top >= 0 && pixelPos.top < config.maxHeight; - }; - - this.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(); - }; - - this.drawCursor = null; - - this.$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'); - } - }; - - this.destroy = function () { - clearInterval(this.intervalId); - clearTimeout(this.timeoutId); - }; - }.call(Cursor.prototype)); - - 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 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 = function (parent) { - this.element = dom.createElement('div'); - this.element.className = 'ace_scrollbar ace_scrollbar' + this.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); - }; - - (function () { - oop.implement(this, EventEmitter); - - this.setVisible = function (isVisible) { - this.element.style.display = isVisible ? '' : 'none'; - this.isVisible = isVisible; - this.coeff = 1; - }; - }.call(ScrollBar.prototype)); - var VScrollBar = function (parent, renderer) { - ScrollBar.call(this, parent); - 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; - }; - - oop.inherits(VScrollBar, ScrollBar); - - (function () { - this.classSuffix = '-v'; - this.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; - }; - this.getWidth = function () { - return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0); - }; - this.setHeight = function (height) { - this.element.style.height = height + 'px'; - }; - this.setInnerHeight = this.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'; - }; - this.setScrollTop = function (scrollTop) { - if (this.scrollTop != scrollTop) { - this.skipEvent = true; - this.scrollTop = scrollTop; - this.element.scrollTop = scrollTop * this.coeff; - } - }; - }.call(VScrollBar.prototype)); - var HScrollBar = function (parent, renderer) { - ScrollBar.call(this, parent); - this.scrollLeft = 0; - this.height = renderer.$scrollbarWidth; - this.inner.style.height = this.element.style.height = - (this.height || 15) + 5 + 'px'; - }; - - oop.inherits(HScrollBar, ScrollBar); - - (function () { - this.classSuffix = '-h'; - this.onScroll = function () { - if (!this.skipEvent) { - this.scrollLeft = this.element.scrollLeft; - this._emit('scroll', { - data: this.scrollLeft, - }); - } - this.skipEvent = false; - }; - this.getHeight = function () { - return this.isVisible ? this.height : 0; - }; - this.setWidth = function (width) { - this.element.style.width = width + 'px'; - }; - this.setInnerWidth = function (width) { - this.inner.style.width = width + 'px'; - }; - this.setScrollWidth = function (width) { - this.inner.style.width = width + 'px'; - }; - this.setScrollLeft = function (scrollLeft) { - if (this.scrollLeft != scrollLeft) { - this.skipEvent = true; - this.scrollLeft = this.element.scrollLeft = scrollLeft; - } - }; - }.call(HScrollBar.prototype)); - - 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 = function (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; - } - }; - }; - - (function () { - this.schedule = function (change) { - this.changes = this.changes | change; - if (this.changes && !this.pending) { - event.nextFrame(this._flush); - this.pending = true; - } - }; - - this.clear = function (change) { - var changes = this.changes; - this.changes = 0; - return changes; - }; - }.call(RenderLoop.prototype)); - - 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 = 256; - var USE_OBSERVER = typeof ResizeObserver == 'function'; - var L = 200; - - var FontMetrics = (exports.FontMetrics = function (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(); - }); - - (function () { - oop.implement(this, EventEmitter); - - this.$characterSize = { - width: 0, - height: 0, - }; - - this.$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'; - }; - - this.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, - }); - } - }; - - this.$addObserver = function () { - var self = this; - this.$observer = new window.ResizeObserver(function (e) { - self.checkForSizeChanges(); - }); - this.$observer.observe(this.$measureNode); - }; - - this.$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)); - }; - - this.setPolling = function (val) { - if (val) { - this.$pollSizeChanges(); - } else if (this.$pollSizeChangesTimer) { - clearInterval(this.$pollSizeChangesTimer); - this.$pollSizeChangesTimer = 0; - } - }; - - this.$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; - }; - - this.$measureCharWidth = function (ch) { - this.$main.textContent = lang.stringRepeat(ch, CHAR_COUNT); - var rect = this.$main.getBoundingClientRect(); - return rect.width / CHAR_COUNT; - }; - - this.getCharacterWidth = function (ch) { - var w = this.charSizes[ch]; - if (w === undefined) { - w = this.charSizes[ch] = - this.$measureCharWidth(ch) / this.$characterSize.width; - } - return w; - }; - - this.destroy = function () { - clearInterval(this.$pollSizeChangesTimer); - if (this.$observer) this.$observer.disconnect(); - if (this.el && this.el.parentNode) - this.el.parentNode.removeChild(this.el); - }; - - this.$getZoom = function getZoom(element) { - if (!element || !element.parentElement) return 1; - return ( - (window.getComputedStyle(element).zoom || 1) * - getZoom(element.parentElement) - ); - }; - this.$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); - }; - this.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); - }; - }.call(FontMetrics.prototype)); -}); - -define('ace/virtual_renderer', [ - 'require', - 'exports', - 'module', - 'ace/lib/oop', - 'ace/lib/dom', - 'ace/config', - 'ace/layer/gutter', - 'ace/layer/marker', - 'ace/layer/text', - 'ace/layer/cursor', - 'ace/scrollbar', - 'ace/scrollbar', - 'ace/renderloop', - 'ace/layer/font_metrics', - 'ace/lib/event_emitter', - 'ace/lib/useragent', -], function (require, exports, module) { - 'use strict'; - - var oop = require('./lib/oop'); - var dom = require('./lib/dom'); - 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 RenderLoop = require('./renderloop').RenderLoop; - var FontMetrics = require('./layer/font_metrics').FontMetrics; - var EventEmitter = require('./lib/event_emitter').EventEmitter; - var editorCss = - '\ -.ace_br1 {border-top-left-radius : 3px;}\ -.ace_br2 {border-top-right-radius : 3px;}\ -.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\ -.ace_br4 {border-bottom-right-radius: 3px;}\ -.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\ -.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\ -.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\ -.ace_br8 {border-bottom-left-radius : 3px;}\ -.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\ -.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\ -.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_editor {\ -position: relative;\ -overflow: hidden;\ -padding: 0;\ -font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;\ -direction: ltr;\ -text-align: left;\ --webkit-tap-highlight-color: rgba(0, 0, 0, 0);\ -}\ -.ace_scroller {\ -position: absolute;\ -overflow: hidden;\ -top: 0;\ -bottom: 0;\ -background-color: inherit;\ --ms-user-select: none;\ --moz-user-select: none;\ --webkit-user-select: none;\ -user-select: none;\ -cursor: text;\ -}\ -.ace_content {\ -position: absolute;\ -box-sizing: border-box;\ -min-width: 100%;\ -contain: style size layout;\ -font-variant-ligatures: no-common-ligatures;\ -}\ -.ace_dragging .ace_scroller:before{\ -position: absolute;\ -top: 0;\ -left: 0;\ -right: 0;\ -bottom: 0;\ -content: \'\';\ -background: rgba(250, 250, 250, 0.01);\ -z-index: 1000;\ -}\ -.ace_dragging.ace_dark .ace_scroller:before{\ -background: rgba(0, 0, 0, 0.01);\ -}\ -.ace_selecting, .ace_selecting * {\ -cursor: text !important;\ -}\ -.ace_gutter {\ -position: absolute;\ -overflow : hidden;\ -width: auto;\ -top: 0;\ -bottom: 0;\ -left: 0;\ -cursor: default;\ -z-index: 4;\ --ms-user-select: none;\ --moz-user-select: none;\ --webkit-user-select: none;\ -user-select: none;\ -contain: style size layout;\ -}\ -.ace_gutter-active-line {\ -position: absolute;\ -left: 0;\ -right: 0;\ -}\ -.ace_scroller.ace_scroll-left {\ -box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\ -}\ -.ace_gutter-cell {\ -position: absolute;\ -top: 0;\ -left: 0;\ -right: 0;\ -padding-left: 19px;\ -padding-right: 6px;\ -background-repeat: no-repeat;\ -}\ -.ace_gutter-cell.ace_error {\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\ -background-repeat: no-repeat;\ -background-position: 2px center;\ -}\ -.ace_gutter-cell.ace_warning {\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\ -background-position: 2px center;\ -}\ -.ace_gutter-cell.ace_info {\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\ -background-position: 2px center;\ -}\ -.ace_dark .ace_gutter-cell.ace_info {\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\ -}\ -.ace_scrollbar {\ -contain: strict;\ -position: absolute;\ -right: 0;\ -bottom: 0;\ -z-index: 6;\ -}\ -.ace_scrollbar-inner {\ -position: absolute;\ -cursor: text;\ -left: 0;\ -top: 0;\ -}\ -.ace_scrollbar-v{\ -overflow-x: hidden;\ -overflow-y: scroll;\ -top: 0;\ -}\ -.ace_scrollbar-h {\ -overflow-x: scroll;\ -overflow-y: hidden;\ -left: 0;\ -}\ -.ace_print-margin {\ -position: absolute;\ -height: 100%;\ -}\ -.ace_text-input {\ -position: absolute;\ -z-index: 0;\ -width: 0.5em;\ -height: 1em;\ -opacity: 0;\ -background: transparent;\ --moz-appearance: none;\ -appearance: none;\ -border: none;\ -resize: none;\ -outline: none;\ -overflow: hidden;\ -font: inherit;\ -padding: 0 1px;\ -margin: 0 -1px;\ -contain: strict;\ --ms-user-select: text;\ --moz-user-select: text;\ --webkit-user-select: text;\ -user-select: text;\ -white-space: pre!important;\ -}\ -.ace_text-input.ace_composition {\ -background: transparent;\ -color: inherit;\ -z-index: 1000;\ -opacity: 1;\ -}\ -.ace_composition_placeholder { color: transparent }\ -.ace_composition_marker { \ -border-bottom: 1px solid;\ -position: absolute;\ -border-radius: 0;\ -margin-top: 1px;\ -}\ -[ace_nocontext=true] {\ -transform: none!important;\ -filter: none!important;\ -clip-path: none!important;\ -mask : none!important;\ -contain: none!important;\ -perspective: none!important;\ -mix-blend-mode: initial!important;\ -z-index: auto;\ -}\ -.ace_layer {\ -z-index: 1;\ -position: absolute;\ -overflow: hidden;\ -word-wrap: normal;\ -white-space: pre;\ -height: 100%;\ -width: 100%;\ -box-sizing: border-box;\ -pointer-events: none;\ -}\ -.ace_gutter-layer {\ -position: relative;\ -width: auto;\ -text-align: right;\ -pointer-events: auto;\ -height: 1000000px;\ -contain: style size layout;\ -}\ -.ace_text-layer {\ -font: inherit !important;\ -position: absolute;\ -height: 1000000px;\ -width: 1000000px;\ -contain: style size layout;\ -}\ -.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\ -contain: style size layout;\ -position: absolute;\ -top: 0;\ -left: 0;\ -right: 0;\ -}\ -.ace_hidpi .ace_text-layer,\ -.ace_hidpi .ace_gutter-layer,\ -.ace_hidpi .ace_content,\ -.ace_hidpi .ace_gutter {\ -contain: strict;\ -will-change: transform;\ -}\ -.ace_hidpi .ace_text-layer > .ace_line, \ -.ace_hidpi .ace_text-layer > .ace_line_group {\ -contain: strict;\ -}\ -.ace_cjk {\ -display: inline-block;\ -text-align: center;\ -}\ -.ace_cursor-layer {\ -z-index: 4;\ -}\ -.ace_cursor {\ -z-index: 4;\ -position: absolute;\ -box-sizing: border-box;\ -border-left: 2px solid;\ -transform: translatez(0);\ -}\ -.ace_multiselect .ace_cursor {\ -border-left-width: 1px;\ -}\ -.ace_slim-cursors .ace_cursor {\ -border-left-width: 1px;\ -}\ -.ace_overwrite-cursors .ace_cursor {\ -border-left-width: 0;\ -border-bottom: 1px solid;\ -}\ -.ace_hidden-cursors .ace_cursor {\ -opacity: 0.2;\ -}\ -.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\ -opacity: 0;\ -}\ -.ace_smooth-blinking .ace_cursor {\ -transition: opacity 0.18s;\ -}\ -.ace_animate-blinking .ace_cursor {\ -animation-duration: 1000ms;\ -animation-timing-function: step-end;\ -animation-name: blink-ace-animate;\ -animation-iteration-count: infinite;\ -}\ -.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\ -animation-duration: 1000ms;\ -animation-timing-function: ease-in-out;\ -animation-name: blink-ace-animate-smooth;\ -}\ -@keyframes blink-ace-animate {\ -from, to { opacity: 1; }\ -60% { opacity: 0; }\ -}\ -@keyframes blink-ace-animate-smooth {\ -from, to { opacity: 1; }\ -45% { opacity: 1; }\ -60% { opacity: 0; }\ -85% { opacity: 0; }\ -}\ -.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\ -position: absolute;\ -z-index: 3;\ -}\ -.ace_marker-layer .ace_selection {\ -position: absolute;\ -z-index: 5;\ -}\ -.ace_marker-layer .ace_bracket {\ -position: absolute;\ -z-index: 6;\ -}\ -.ace_marker-layer .ace_error_bracket {\ -position: absolute;\ -border-bottom: 1px solid #DE5555;\ -border-radius: 0;\ -}\ -.ace_marker-layer .ace_active-line {\ -position: absolute;\ -z-index: 2;\ -}\ -.ace_marker-layer .ace_selected-word {\ -position: absolute;\ -z-index: 4;\ -box-sizing: border-box;\ -}\ -.ace_line .ace_fold {\ -box-sizing: border-box;\ -display: inline-block;\ -height: 11px;\ -margin-top: -2px;\ -vertical-align: middle;\ -background-image:\ -url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\ -url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\ -background-repeat: no-repeat, repeat-x;\ -background-position: center center, top left;\ -color: transparent;\ -border: 1px solid black;\ -border-radius: 2px;\ -cursor: pointer;\ -pointer-events: auto;\ -}\ -.ace_dark .ace_fold {\ -}\ -.ace_fold:hover{\ -background-image:\ -url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\ -url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\ -}\ -.ace_tooltip {\ -background-color: #FFF;\ -background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\ -border: 1px solid gray;\ -border-radius: 1px;\ -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\ -color: black;\ -max-width: 100%;\ -padding: 3px 4px;\ -position: fixed;\ -z-index: 999999;\ -box-sizing: border-box;\ -cursor: default;\ -white-space: pre;\ -word-wrap: break-word;\ -line-height: normal;\ -font-style: normal;\ -font-weight: normal;\ -letter-spacing: normal;\ -pointer-events: none;\ -}\ -.ace_folding-enabled > .ace_gutter-cell {\ -padding-right: 13px;\ -}\ -.ace_fold-widget {\ -box-sizing: border-box;\ -margin: 0 -12px 0 1px;\ -display: none;\ -width: 11px;\ -vertical-align: top;\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\ -background-repeat: no-repeat;\ -background-position: center;\ -border-radius: 3px;\ -border: 1px solid transparent;\ -cursor: pointer;\ -}\ -.ace_folding-enabled .ace_fold-widget {\ -display: inline-block; \ -}\ -.ace_fold-widget.ace_end {\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\ -}\ -.ace_fold-widget.ace_closed {\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\ -}\ -.ace_fold-widget:hover {\ -border: 1px solid rgba(0, 0, 0, 0.3);\ -background-color: rgba(255, 255, 255, 0.2);\ -box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\ -}\ -.ace_fold-widget:active {\ -border: 1px solid rgba(0, 0, 0, 0.4);\ -background-color: rgba(0, 0, 0, 0.05);\ -box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\ -}\ -.ace_dark .ace_fold-widget {\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\ -}\ -.ace_dark .ace_fold-widget.ace_end {\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\ -}\ -.ace_dark .ace_fold-widget.ace_closed {\ -background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\ -}\ -.ace_dark .ace_fold-widget:hover {\ -box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ -background-color: rgba(255, 255, 255, 0.1);\ -}\ -.ace_dark .ace_fold-widget:active {\ -box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ -}\ -.ace_inline_button {\ -border: 1px solid lightgray;\ -display: inline-block;\ -margin: -1px 8px;\ -padding: 0 5px;\ -pointer-events: auto;\ -cursor: pointer;\ -}\ -.ace_inline_button:hover {\ -border-color: gray;\ -background: rgba(200,200,200,0.2);\ -display: inline-block;\ -pointer-events: auto;\ -}\ -.ace_fold-widget.ace_invalid {\ -background-color: #FFB4B4;\ -border-color: #DE5555;\ -}\ -.ace_fade-fold-widgets .ace_fold-widget {\ -transition: opacity 0.4s ease 0.05s;\ -opacity: 0;\ -}\ -.ace_fade-fold-widgets:hover .ace_fold-widget {\ -transition: opacity 0.05s ease 0.05s;\ -opacity:1;\ -}\ -.ace_underline {\ -text-decoration: underline;\ -}\ -.ace_bold {\ -font-weight: bold;\ -}\ -.ace_nobold .ace_bold {\ -font-weight: normal;\ -}\ -.ace_italic {\ -font-style: italic;\ -}\ -.ace_error-marker {\ -background-color: rgba(255, 0, 0,0.2);\ -position: absolute;\ -z-index: 9;\ -}\ -.ace_highlight-marker {\ -background-color: rgba(255, 255, 0,0.2);\ -position: absolute;\ -z-index: 8;\ -}\ -.ace_mobile-menu {\ -position: absolute;\ -line-height: 1.5;\ -border-radius: 4px;\ --ms-user-select: none;\ --moz-user-select: none;\ --webkit-user-select: none;\ -user-select: none;\ -background: white;\ -box-shadow: 1px 3px 2px grey;\ -border: 1px solid #dcdcdc;\ -color: black;\ -}\ -.ace_dark > .ace_mobile-menu {\ -background: #333;\ -color: #ccc;\ -box-shadow: 1px 3px 2px grey;\ -border: 1px solid #444;\ -}\ -.ace_mobile-button {\ -padding: 2px;\ -cursor: pointer;\ -overflow: hidden;\ -}\ -.ace_mobile-button:hover {\ -background-color: #eee;\ -opacity:1;\ -}\ -.ace_mobile-button:active {\ -background-color: #ddd;\ -}\ -.ace_placeholder {\ -font-family: arial;\ -transform: scale(0.9);\ -transform-origin: left;\ -white-space: pre;\ -opacity: 0.7;\ -margin: 0 10px;\ -}'; - - var useragent = require('./lib/useragent'); - var HIDE_TEXTAREA = useragent.isIE; - - dom.importCssString(editorCss, 'ace_editor.css', false); - - var VirtualRenderer = function (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); - config.resetOptions(this); - config._signal('renderer', this); - }; - - (function () { - this.CHANGE_CURSOR = 1; - this.CHANGE_MARKER = 2; - this.CHANGE_GUTTER = 4; - this.CHANGE_SCROLL = 8; - this.CHANGE_LINES = 16; - this.CHANGE_TEXT = 32; - this.CHANGE_SIZE = 64; - this.CHANGE_MARKER_BACK = 128; - this.CHANGE_MARKER_FRONT = 256; - this.CHANGE_FULL = 512; - this.CHANGE_H_SCROLL = 1024; - - oop.implement(this, EventEmitter); - - this.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'); - }; - this.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); - }; - this.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); - }; - - this.onChangeNewLineMode = function () { - this.$loop.schedule(this.CHANGE_TEXT); - this.$textLayer.$updateEolChar(); - this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR); - }; - - this.onChangeTabSize = function () { - this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER); - this.$textLayer.onChangeTabSize(); - }; - this.updateText = function () { - this.$loop.schedule(this.CHANGE_TEXT); - }; - this.updateFull = function (force) { - if (force) this.$renderChanges(this.CHANGE_FULL, true); - else this.$loop.schedule(this.CHANGE_FULL); - }; - this.updateFontSize = function () { - this.$textLayer.checkForSizeChanges(); - }; - - this.$changes = 0; - this.$updateSizeAsync = function () { - if (this.$loop.pending) this.$size.$dirty = true; - else this.onResize(); - }; - this.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 (!width) width = el.clientWidth || el.scrollWidth; - var changes = this.$updateCachedSize(force, gutterWidth, width, height); - - 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; - }; - - this.$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.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(), - ); - - 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; - }; - - this.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(); - } - }; - this.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, - ); - }; - this.setAnimatedScroll = function (shouldAnimate) { - this.setOption('animatedScroll', shouldAnimate); - }; - this.getAnimatedScroll = function () { - return this.$animatedScroll; - }; - this.setShowInvisibles = function (showInvisibles) { - this.setOption('showInvisibles', showInvisibles); - this.session.$bidiHandler.setShowInvisibles(showInvisibles); - }; - this.getShowInvisibles = function () { - return this.getOption('showInvisibles'); - }; - this.getDisplayIndentGuides = function () { - return this.getOption('displayIndentGuides'); - }; - - this.setDisplayIndentGuides = function (display) { - this.setOption('displayIndentGuides', display); - }; - this.setShowPrintMargin = function (showPrintMargin) { - this.setOption('showPrintMargin', showPrintMargin); - }; - this.getShowPrintMargin = function () { - return this.getOption('showPrintMargin'); - }; - this.setPrintMarginColumn = function (showPrintMargin) { - this.setOption('printMarginColumn', showPrintMargin); - }; - this.getPrintMarginColumn = function () { - return this.getOption('printMarginColumn'); - }; - this.getShowGutter = function () { - return this.getOption('showGutter'); - }; - this.setShowGutter = function (show) { - return this.setOption('showGutter', show); - }; - - this.getFadeFoldWidgets = function () { - return this.getOption('fadeFoldWidgets'); - }; - - this.setFadeFoldWidgets = function (show) { - this.setOption('fadeFoldWidgets', show); - }; - - this.setHighlightGutterLine = function (shouldHighlight) { - this.setOption('highlightGutterLine', shouldHighlight); - }; - - this.getHighlightGutterLine = function () { - return this.getOption('highlightGutterLine'); - }; - - this.$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(); - }; - this.getContainerElement = function () { - return this.container; - }; - this.getMouseEventTarget = function () { - return this.scroller; - }; - this.getTextAreaContainer = function () { - return this.container; - }; - this.$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 - ? this.lineHeight - : HIDE_TEXTAREA - ? 0 - : 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), - ); - }; - this.getFirstVisibleRow = function () { - return this.layerConfig.firstRow; - }; - this.getFirstFullyVisibleRow = function () { - return ( - this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1) - ); - }; - this.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; - }; - this.getLastVisibleRow = function () { - return this.layerConfig.lastRow; - }; - - this.$padding = null; - this.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(); - }; - - this.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(); - }; - - this.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(); - }; - this.getHScrollBarAlwaysVisible = function () { - return this.$hScrollBarAlwaysVisible; - }; - this.setHScrollBarAlwaysVisible = function (alwaysVisible) { - this.setOption('hScrollBarAlwaysVisible', alwaysVisible); - }; - this.getVScrollBarAlwaysVisible = function () { - return this.$vScrollBarAlwaysVisible; - }; - this.setVScrollBarAlwaysVisible = function (alwaysVisible) { - this.setOption('vScrollBarAlwaysVisible', alwaysVisible); - }; - - this.$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); - }; - this.$updateScrollBarH = function () { - this.scrollBarH.setScrollWidth( - this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h, - ); - this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left); - }; - - this.$frozen = false; - this.freeze = function () { - this.$frozen = true; - }; - - this.unfreeze = function () { - this.$frozen = false; - }; - - this.$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 - this.layerConfig.firstRow) * 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 (changes & this.CHANGE_FULL) { - this.$changedLines = null; - this.$textLayer.update(config); - if (this.$showGutter) this.$gutterLayer.update(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); - } - 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); - } else if (changes & this.CHANGE_LINES) { - if ( - this.$updateLines() || - (changes & this.CHANGE_GUTTER && this.$showGutter) - ) - this.$gutterLayer.update(config); - } else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) { - if (this.$showGutter) this.$gutterLayer.update(config); - } else if (changes & this.CHANGE_CURSOR) { - if (this.$highlightGutterLine) - this.$gutterLayer.updateLineHighlight(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); - }; - - this.$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'); - } - }; - - this.$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; - }; - - this.$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; - }; - - this.$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), - ); - }; - this.updateFrontMarkers = function () { - this.$markerFront.setMarkers(this.session.getMarkers(true)); - this.$loop.schedule(this.CHANGE_MARKER_FRONT); - }; - this.updateBackMarkers = function () { - this.$markerBack.setMarkers(this.session.getMarkers()); - this.$loop.schedule(this.CHANGE_MARKER_BACK); - }; - this.addGutterDecoration = function (row, className) { - this.$gutterLayer.addGutterDecoration(row, className); - }; - this.removeGutterDecoration = function (row, className) { - this.$gutterLayer.removeGutterDecoration(row, className); - }; - this.updateBreakpoints = function (rows) { - this.$loop.schedule(this.CHANGE_GUTTER); - }; - this.setAnnotations = function (annotations) { - this.$gutterLayer.setAnnotations(annotations); - this.$loop.schedule(this.CHANGE_GUTTER); - }; - this.updateCursor = function () { - this.$loop.schedule(this.CHANGE_CURSOR); - }; - this.hideCursor = function () { - this.$cursorLayer.hideCursor(); - }; - this.showCursor = function () { - this.$cursorLayer.showCursor(); - }; - - this.scrollSelectionIntoView = function (anchor, lead, offset) { - this.scrollCursorIntoView(anchor, offset); - this.scrollCursorIntoView(lead, offset); - }; - this.scrollCursorIntoView = function (cursor, offset, $viewMargin) { - if (this.$size.scrollerHeight === 0) return; - - var pos = this.$cursorLayer.getPixelPosition(cursor); - - var left = pos.left; - var top = pos.top; - - var topMargin = ($viewMargin && $viewMargin.top) || 0; - var bottomMargin = ($viewMargin && $viewMargin.bottom) || 0; - - var scrollTop = this.$scrollAnimation - ? this.session.getScrollTop() - : this.scrollTop; - - if (scrollTop + topMargin > top) { - if (offset && scrollTop + topMargin > top + this.lineHeight) - top -= offset * this.$size.scrollerHeight; - if (top === 0) top = -this.scrollMargin.top; - this.session.setScrollTop(top); - } else if ( - scrollTop + this.$size.scrollerHeight - bottomMargin < - top + this.lineHeight - ) { - if ( - offset && - scrollTop + this.$size.scrollerHeight - bottomMargin < - top - this.lineHeight - ) - top += offset * this.$size.scrollerHeight; - this.session.setScrollTop( - top + this.lineHeight + bottomMargin - this.$size.scrollerHeight, - ); - } - - var scrollLeft = this.scrollLeft; - - if (scrollLeft > left) { - if (left < this.$padding + 2 * this.layerConfig.characterWidth) - left = -this.scrollMargin.left; - this.session.setScrollLeft(left); - } else if ( - scrollLeft + this.$size.scrollerWidth < - left + this.characterWidth - ) { - this.session.setScrollLeft( - Math.round(left + this.characterWidth - this.$size.scrollerWidth), - ); - } else if ( - scrollLeft <= this.$padding && - left - scrollLeft < this.characterWidth - ) { - this.session.setScrollLeft(0); - } - }; - this.getScrollTop = function () { - return this.session.getScrollTop(); - }; - this.getScrollLeft = function () { - return this.session.getScrollLeft(); - }; - this.getScrollTopRow = function () { - return this.scrollTop / this.lineHeight; - }; - this.getScrollBottomRow = function () { - return Math.max( - 0, - Math.floor( - (this.scrollTop + this.$size.scrollerHeight) / this.lineHeight, - ) - 1, - ); - }; - this.scrollToRow = function (row) { - this.session.setScrollTop(row * this.lineHeight); - }; - - this.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; - }; - - this.STEPS = 8; - this.$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; - }; - this.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); - }; - - this.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; - this.$timer = setInterval(function () { - 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 { - _self.$timer = clearInterval(_self.$timer); - _self.$scrollAnimation = null; - callback && callback(); - } - }, 10); - }; - this.scrollToY = function (scrollTop) { - if (this.scrollTop !== scrollTop) { - this.$loop.schedule(this.CHANGE_SCROLL); - this.scrollTop = scrollTop; - } - }; - this.scrollToX = function (scrollLeft) { - if (this.scrollLeft !== scrollLeft) this.scrollLeft = scrollLeft; - this.$loop.schedule(this.CHANGE_H_SCROLL); - }; - this.scrollTo = function (x, y) { - this.session.setScrollTop(y); - this.session.setScrollLeft(x); - }; - this.scrollBy = function (deltaX, deltaY) { - deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY); - deltaX && - this.session.setScrollLeft(this.session.getScrollLeft() + deltaX); - }; - this.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; - }; - - this.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, - }; - }; - - this.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, - ); - }; - this.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, - }; - }; - this.visualizeFocus = function () { - dom.addCssClass(this.container, 'ace_focus'); - }; - this.visualizeBlur = function () { - dom.removeCssClass(this.container, 'ace_focus'); - }; - this.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', - ); - } - }; - this.setCompositionText = function (text) { - var cursor = this.session.selection.cursor; - this.addToken(text, 'composition_placeholder', cursor.row, cursor.column); - this.$moveTextAreaToCursor(); - }; - this.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 = ''; - }; - - this.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.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); - }; - - this.removeExtraToken = function (row, column) { - this.updateLines(row, row); - }; - this.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(); - } - }; - this.getTheme = function () { - return this.$themeId; - }; - this.setStyle = function (style, include) { - dom.setCssClass(this.container, style, include !== false); - }; - this.unsetStyle = function (style) { - dom.removeCssClass(this.container, style); - }; - - this.setCursorStyle = function (style) { - dom.setStyle(this.scroller.style, 'cursor', style); - }; - this.setMouseCursor = function (cursorStyle) { - dom.setStyle(this.scroller.style, 'cursor', cursorStyle); - }; - - this.attachToShadowRoot = function () { - dom.importCssString(editorCss, 'ace_editor.css', this.container); - }; - this.destroy = function () { - this.freeze(); - this.$fontMetrics.destroy(); - this.$cursorLayer.destroy(); - this.removeAllListeners(); - this.container.textContent = ''; - }; - }.call(VirtualRenderer.prototype)); - - config.defineOptions(VirtualRenderer.prototype, 'renderer', { - 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, - }, - 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, - }, - 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); - }, - }, - 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 = 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.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); - }; - - 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 = function ( - 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); - 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); - }; - - (function () { - oop.implement(this, EventEmitter); - this.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); - }; - this.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, - ); - }); - }; - this.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); - } - }; - this.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(); - }; - - this.updateAnchors = function (delta) { - this.pos.onChange(delta); - for (var i = this.others.length; i--; ) this.others[i].onChange(delta); - this.updateMarkers(); - }; - - this.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); - }; - - this.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); - } - }; - this.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; - }; - this.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); - }; - }.call(PlaceHolder.prototype)); - - 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) { - 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 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) { - 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 = session.getWordRange(range.start.row, range.start.column); - range.start.row = tmp.start.row; - range.start.column = tmp.start.column; - range.end.row = tmp.end.row; - range.end.column = tmp.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('changeSession', this.$multiselectOnSessionChange); - this.on('mousedown', onMouseDown); - } else { - this.off('changeSession', this.$multiselectOnSessionChange); - 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/theme/textmate', [ - 'require', - 'exports', - 'module', - 'ace/lib/dom', -], function (require, exports, module) { - 'use strict'; - - exports.isDark = false; - exports.cssClass = 'ace-tm'; - exports.cssText = - '.ace-tm .ace_gutter {\ -background: #f0f0f0;\ -color: #333;\ -}\ -.ace-tm .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-tm .ace_fold {\ -background-color: #6B72E6;\ -}\ -.ace-tm {\ -background-color: #FFFFFF;\ -color: black;\ -}\ -.ace-tm .ace_cursor {\ -color: black;\ -}\ -.ace-tm .ace_invisible {\ -color: rgb(191, 191, 191);\ -}\ -.ace-tm .ace_storage,\ -.ace-tm .ace_keyword {\ -color: blue;\ -}\ -.ace-tm .ace_constant {\ -color: rgb(197, 6, 11);\ -}\ -.ace-tm .ace_constant.ace_buildin {\ -color: rgb(88, 72, 246);\ -}\ -.ace-tm .ace_constant.ace_language {\ -color: rgb(88, 92, 246);\ -}\ -.ace-tm .ace_constant.ace_library {\ -color: rgb(6, 150, 14);\ -}\ -.ace-tm .ace_invalid {\ -background-color: rgba(255, 0, 0, 0.1);\ -color: red;\ -}\ -.ace-tm .ace_support.ace_function {\ -color: rgb(60, 76, 114);\ -}\ -.ace-tm .ace_support.ace_constant {\ -color: rgb(6, 150, 14);\ -}\ -.ace-tm .ace_support.ace_type,\ -.ace-tm .ace_support.ace_class {\ -color: rgb(109, 121, 222);\ -}\ -.ace-tm .ace_keyword.ace_operator {\ -color: rgb(104, 118, 135);\ -}\ -.ace-tm .ace_string {\ -color: rgb(3, 106, 7);\ -}\ -.ace-tm .ace_comment {\ -color: rgb(76, 136, 107);\ -}\ -.ace-tm .ace_comment.ace_doc {\ -color: rgb(0, 102, 255);\ -}\ -.ace-tm .ace_comment.ace_doc.ace_tag {\ -color: rgb(128, 159, 191);\ -}\ -.ace-tm .ace_constant.ace_numeric {\ -color: rgb(0, 0, 205);\ -}\ -.ace-tm .ace_variable {\ -color: rgb(49, 132, 149);\ -}\ -.ace-tm .ace_xml-pe {\ -color: rgb(104, 104, 91);\ -}\ -.ace-tm .ace_entity.ace_name.ace_function {\ -color: #0000A2;\ -}\ -.ace-tm .ace_heading {\ -color: rgb(12, 7, 255);\ -}\ -.ace-tm .ace_list {\ -color:rgb(185, 6, 144);\ -}\ -.ace-tm .ace_meta.ace_tag {\ -color:rgb(0, 22, 142);\ -}\ -.ace-tm .ace_string.ace_regex {\ -color: rgb(255, 0, 0)\ -}\ -.ace-tm .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-tm.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px white;\ -}\ -.ace-tm .ace_marker-layer .ace_step {\ -background: rgb(252, 255, 0);\ -}\ -.ace-tm .ace_marker-layer .ace_stack {\ -background: rgb(164, 229, 101);\ -}\ -.ace-tm .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-tm .ace_marker-layer .ace_active-line {\ -background: rgba(0, 0, 0, 0.07);\ -}\ -.ace-tm .ace_gutter-active-line {\ -background-color : #dcdcdc;\ -}\ -.ace-tm .ace_marker-layer .ace_selected-word {\ -background: rgb(250, 250, 255);\ -border: 1px solid rgb(200, 200, 250);\ -}\ -.ace-tm .ace_indent-guide {\ -background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\ -}\ -'; - exports.$id = 'ace/theme/textmate'; - - var dom = require('../lib/dom'); - dom.importCssString(exports.cssText, exports.cssClass, false); -}); - -define('ace/line_widgets', [ - 'require', - 'exports', - 'module', - 'ace/lib/dom', -], function (require, exports, module) { - 'use strict'; - - var dom = require('./lib/dom'); - - 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); - } - - (function () { - this.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; - } - }; - - this.$getWidgetScreenLength = function () { - var screenRows = 0; - this.lineWidgets.forEach(function (w) { - if (w && w.rowCount && !w.hidden) screenRows += w.rowCount; - }); - return screenRows; - }; - - this.$onChangeEditor = function (e) { - this.attach(e.editor); - }; - - this.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); - } - }; - this.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); - } - }); - }; - - this.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; - } - } - }; - - this.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(); - } - }; - - this.$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; - }; - - this.$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; - }; - - this.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.el) { - dom.addCssClass(w.el, 'ace_lineWidgetContainer'); - 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; - }; - - this.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(); - }; - - this.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; - }; - - this.onWidgetChanged = function (w) { - this.session._changedWidgets.push(w); - this.editor && this.editor.renderer.updateFull(); - }; - - this.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 = []; - }; - - this.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 = ''; - } - } - }; - }.call(LineWidgets.prototype)); - - exports.LineWidgets = LineWidgets; -}); - -define('ace/ext/error_marker', [ - 'require', - 'exports', - 'module', - 'ace/line_widgets', - 'ace/lib/dom', - 'ace/range', -], function (require, exports, module) { - 'use strict'; - var LineWidgets = require('../line_widgets').LineWidgets; - var dom = require('../lib/dom'); - var Range = require('../range').Range; - - 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 = { - text: ['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; - el.innerHTML = gutterAnno.text.join('
'); - - 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( - '\ - .error_widget_wrapper {\ - background: inherit;\ - color: inherit;\ - border:none\ - }\ - .error_widget {\ - border-top: solid 2px;\ - border-bottom: solid 2px;\ - margin: 5px 0;\ - padding: 10px 40px;\ - white-space: pre-wrap;\ - }\ - .error_widget.ace_error, .error_widget_arrow.ace_error{\ - border-color: #ff5a5a\ - }\ - .error_widget.ace_warning, .error_widget_arrow.ace_warning{\ - border-color: #F1D817\ - }\ - .error_widget.ace_info, .error_widget_arrow.ace_info{\ - border-color: #5a5a5a\ - }\ - .error_widget.ace_ok, .error_widget_arrow.ace_ok{\ - border-color: #5aaa5a\ - }\ - .error_widget_arrow {\ - position: absolute;\ - border: solid 5px;\ - border-top-color: transparent!important;\ - border-right-color: transparent!important;\ - border-left-color: transparent!important;\ - top: -5px;\ - }\ -', - 'error_marker.css', - false, - ); -}); - -define('ace/ace', [ - 'require', - 'exports', - 'module', - 'ace/lib/fixoldbrowsers', - 'ace/lib/dom', - 'ace/lib/event', - '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', -], function (require, exports, module) { - 'use strict'; - - require('./lib/fixoldbrowsers'); - - var dom = require('./lib/dom'); - var event = require('./lib/event'); - - 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.require = require; - - if (typeof define === 'function') exports.define = define; - 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; - event.addListener(window, 'resize', env.onResize); - editor.on('destroy', function () { - event.removeListener(window, 'resize', env.onResize); - 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; - } - if (!window.ace) window.ace = a; - for (var key in a) if (a.hasOwnProperty(key)) window.ace[key] = a[key]; - window.ace['default'] = window.ace; - if (typeof module == 'object' && typeof exports == 'object' && module) { - module.exports = window.ace; - } - }); -})(); diff --git a/src/ace/colorView.js b/src/ace/colorView.js new file mode 100644 index 000000000..1624544e3 --- /dev/null +++ b/src/ace/colorView.js @@ -0,0 +1,192 @@ +/** + * Some part of this code belongs to github.com/easylogic and is licensed under MIT + * @see https://github.com/easylogic/ace-colorpicker/blob/main/src/extension/ace/colorview.js + */ + +import Color from "utils/color"; +import { + HEX, + HSL, + HSLA, + isValidColor, + NAMED_COLORS, + RGB, + RGBA, +} from "utils/color/regex"; + +const COLORPICKER_TOKEN_CLASS = ".ace_color"; +const changedRules = []; + +let editor = null; + +/** + * Initialize color view + * @param {AceAjax.Editor} e Editor instance + * @param {boolean} [force=false] Force update color view + */ +export default function initColorView(e, force = false) { + editor = e; + const { renderer } = editor; + + editor.on("changeMode", onChangeMode); + renderer.on("afterRender", afterRender); + + if (force) { + const { files } = editorManager; + + if (Array.isArray(files)) { + files.forEach((file) => { + if (file.session) { + file.session._addedColorRule = false; + } + }); + } + + onChangeMode(); + } +} + +export function deactivateColorView() { + const { renderer } = editor; + + changedRules.forEach((rule) => rule.shift()); + changedRules.length = 0; + forceTokenizer(); + + editor.off("changeMode", onChangeMode); + renderer.off("afterRender", afterRender); +} + +/** + * Checks if the session supports color + * @param {AceAjax.IEditSession} session + * @returns + */ +function sessionSupportsColor(session) { + const mode = session.getMode().$id.split("/").pop(); + return /css|less|scss|sass|stylus|html|svg|dart/.test(mode) ? mode : false; +} + +function onChangeMode() { + const session = editor.session; + let forceUpdate = false; + + // if mode is not css, scss, sass, less, stylus, or html, return + const mode = sessionSupportsColor(session); + if (session._addedColorRule || !mode) { + return; + } + + let rules = session.$mode.$highlightRules.getRules(); + + if (mode === "css") { + rules = { ruleset: rules["ruleset"] }; + } else if (mode === "html") { + rules = { "css-ruleset": rules["css-ruleset"] }; + } else if (mode === "svg") { + const svgColorAttrs = [ + "fill", + "stroke", + "stop-color", + "flood-color", + "lighting-color", + ]; + Object.keys(rules).forEach((key) => { + const rule = rules[key]; + if (Array.isArray(rule)) { + rule.unshift({ + token: "color", + regex: `(?<=\\b(?:${svgColorAttrs.join("|")})\\s*=\\s*["'])(${HEX}|${RGB}|${RGBA}|${HSL}|${HSLA}|\\w+)(?=["'])`, + }); + rule.unshift({ + token: "color", + regex: `(?<=style\\s*=\\s*["'][^"']*(?:${svgColorAttrs.join("|")})\\s*:\\s*)(${HEX}|${RGB}|${RGBA}|${HSL}|${HSLA}|\\w+)(?=\\s*[;'"])`, + }); + changedRules.push(rule); + forceUpdate = true; + } + }); + } + + Object.keys(rules).forEach((key) => { + const rule = rules[key]; + if (Array.isArray(rule)) { + const ruleExists = rule.some((r) => r.token === "color"); + if (ruleExists) return; + forceUpdate = true; + rule.unshift({ + token: "color", + regex: `${HEX}|${RGB}|${RGBA}|${HSL}|${HSLA}`, + }); + changedRules.push(rule); + return; + } + }); + + if (!forceUpdate) return; + + forceTokenizer(); +} + +function afterRender() { + const { session, renderer } = editor; + const { content } = renderer; + let classes = COLORPICKER_TOKEN_CLASS; + + // if session is css, scss, less, sass, stylus, or html (with css mode), continue + + const mode = sessionSupportsColor(session); + if (!mode) { + return; + } + + if (mode === "scss") { + classes += ",.ace_function"; + } + + content + .getAll(COLORPICKER_TOKEN_CLASS) + .forEach((/**@type {HTMLElement} */ el, i, els) => { + let content = el.textContent; + const previousContent = els[i - 1]?.textContent; + const nextContent = els[i + 1]?.textContent; + const multiLinePrev = previousContent + content; + const multiLineNext = content + nextContent; + + if (el.dataset.modified === "true") return; + el.dataset.modified = "true"; + + if (mode === "svg" && content in NAMED_COLORS) { + content = NAMED_COLORS[content]; + } + + if (!isValidColor(content)) { + if (isValidColor(multiLinePrev)) { + content = multiLinePrev; + } else if (isValidColor(multiLineNext)) { + content = multiLineNext; + } else { + return; + } + } + + try { + const fontColorString = + Color(content).luminance > 0.5 ? "#000" : "#fff"; + el.classList.add("ace_color"); + el.style.cssText = `background-color: ${content}; color: ${fontColorString}; pointer-events: all;`; + } catch (error) { + window.log("error", `Invalid color: ${content}`); + window.log("error", error); + } + }); +} + +function forceTokenizer() { + const { session } = editor; + // force recreation of tokenizer + session.$mode.$tokenizer = null; + session.bgTokenizer.setTokenizer(session.$mode.getTokenizer()); + // force re-highlight whole document + session.bgTokenizer.start(0); +} diff --git a/src/ace/commands.js b/src/ace/commands.js new file mode 100644 index 000000000..e917fd847 --- /dev/null +++ b/src/ace/commands.js @@ -0,0 +1,418 @@ +import fsOperation from "fileSystem"; +import prompt from "dialogs/prompt"; +import actions from "handlers/quickTools"; +import keyBindings from "lib/keyBindings"; +import settings from "lib/settings"; +import Url from "utils/Url"; + +const commands = [ + { + name: "focusEditor", + description: "Focus editor", + exec() { + editorManager.editor.focus(); + }, + }, + { + name: "findFile", + description: "Find file in workspace", + exec() { + acode.exec("find-file"); + }, + }, + { + name: "closeCurrentTab", + description: "Close current tab", + exec() { + acode.exec("close-current-tab"); + }, + }, + { + name: "closeAllTabs", + description: "Close all tabs", + exec() { + acode.exec("close-all-tabs"); + }, + }, + { + name: "newFile", + description: "Create new file", + exec() { + acode.exec("new-file"); + }, + readOnly: true, + }, + { + name: "openFile", + description: "Open a file", + exec() { + acode.exec("open-file"); + }, + readOnly: true, + }, + { + name: "openFolder", + description: "Open a folder", + exec() { + acode.exec("open-folder"); + }, + readOnly: true, + }, + { + name: "saveFile", + description: "Save current file", + exec() { + acode.exec("save"); + }, + readOnly: true, + }, + { + name: "saveFileAs", + description: "Save as current file", + exec() { + acode.exec("save-as"); + }, + readOnly: true, + }, + { + name: "saveAllChanges", + description: "Save all changes", + exec() { + acode.exec("save-all-changes"); + }, + readOnly: true, + }, + { + name: "nextFile", + description: "Open next file tab", + exec() { + acode.exec("next-file"); + }, + }, + { + name: "prevFile", + description: "Open previous file tab", + exec() { + acode.exec("prev-file"); + }, + }, + { + name: "showSettingsMenu", + description: "Show settings menu", + exec() { + acode.exec("open", "settings"); + }, + readOnly: true, + }, + { + name: "renameFile", + description: "Rename active file", + exec() { + acode.exec("rename"); + }, + readOnly: true, + }, + { + name: "run", + description: "Preview HTML and MarkDown", + exec() { + acode.exec("run"); + }, + readOnly: true, + }, + { + name: "openInAppBrowser", + description: "Open In-App Browser", + async exec() { + const url = await prompt("Enter url", "", "url", { + placeholder: "http://", + match: /^https?:\/\/.+/, + }); + if (url) { + acode.exec("open-inapp-browser", url); + } + }, + }, + { + name: "toggleFullscreen", + description: "Toggle full screen mode", + exec() { + acode.exec("toggle-fullscreen"); + }, + }, + { + name: "toggleSidebar", + description: "Toggle sidebar", + exec() { + acode.exec("toggle-sidebar"); + }, + }, + { + name: "toggleMenu", + description: "Toggle main menu", + exec() { + acode.exec("toggle-menu"); + }, + }, + { + name: "toggleEditMenu", + description: "Toggle edit menu", + exec() { + acode.exec("toggle-editmenu"); + }, + }, + { + name: "selectall", + description: "Select all", + exec(editor) { + editor.selectAll(); + }, + readOnly: true, + }, + { + name: "gotoline", + description: "Go to line...", + exec() { + acode.exec("goto"); + }, + readOnly: true, + }, + { + name: "find", + description: "Find", + exec() { + acode.exec("find"); + }, + readOnly: true, + }, + { + name: "copy", + description: "Copy", + exec(editor) { + const { clipboard } = cordova.plugins; + const copyText = editor.getCopyText(); + clipboard.copy(copyText); + toast(strings["copied to clipboard"]); + }, + readOnly: true, + }, + { + name: "cut", + description: "Cut", + exec(editor) { + let cutLine = + editor.$copyWithEmptySelection && editor.selection.isEmpty(); + let range = cutLine + ? editor.selection.getLineRange() + : editor.selection.getRange(); + editor._emit("cut", range); + if (!range.isEmpty()) { + const { clipboard } = cordova.plugins; + const copyText = editor.session.getTextRange(range); + clipboard.copy(copyText); + toast(strings["copied to clipboard"]); + editor.session.remove(range); + } + editor.clearSelection(); + }, + scrollIntoView: "cursor", + multiSelectAction: "forEach", + }, + { + name: "paste", + description: "Paste", + exec() { + const { clipboard } = cordova.plugins; + clipboard.paste((text) => { + editorManager.editor.$handlePaste(text); + }); + }, + scrollIntoView: "cursor", + }, + { + name: "problems", + description: "Show errors and warnings", + exec() { + acode.exec("open", "problems"); + }, + }, + { + name: "replace", + description: "Replace", + exec() { + acode.exec("replace"); + }, + }, + { + name: "openCommandPalette", + description: "Open command palette", + exec() { + acode.exec("command-palette"); + }, + readOnly: true, + }, + { + name: "modeSelect", + description: "Change language mode...", + exec() { + acode.exec("syntax"); + }, + readOnly: true, + }, + { + name: "toggleQuickTools", + description: "Toggle quick tools", + exec() { + actions("toggle"); + }, + }, + { + name: "selectWord", + description: "Select current word", + exec(editor) { + editor.selection.selectAWord(); + editor._emit("select-word"); + }, + }, + { + name: "openLogFile", + description: "Open Log File", + exec() { + acode.exec("open-log-file"); + }, + }, + { + name: "increaseFontSize", + description: "Increase font size", + exec(editor) { + let size = Number.parseInt(editor.getFontSize(), 10) || 12; + editor.setFontSize(size + 1); + settings.value.fontSize = size + 1 + "px"; + settings.update(false); + }, + }, + { + name: "decreaseFontSize", + description: "Decrease font size", + exec(editor) { + let size = Number.parseInt(editor.getFontSize(), 10) || 12; + editor.setFontSize(Math.max(size - 1 || 1)); + settings.value.fontSize = Math.max(size - 1 || 1) + "px"; + settings.update(false); + }, + }, + { + name: "openPluginsPage", + description: "Open Plugins Page", + exec() { + acode.exec("open", "plugins"); + }, + readOnly: true, + }, + { + name: "openFileExplorer", + description: "File Explorer", + exec() { + acode.exec("open", "file_browser"); + }, + readOnly: true, + }, + { + name: "copyDeviceInfo", + description: "Copy Device info", + exec() { + acode.exec("copy-device-info"); + }, + readOnly: true, + }, + { + name: "changeAppTheme", + description: "Change App Theme", + exec() { + acode.exec("change-app-theme"); + }, + readOnly: true, + }, + { + name: "changeEditorTheme", + description: "Change Editor Theme", + exec() { + acode.exec("change-editor-theme"); + }, + readOnly: true, + }, + { + name: "openTerminal", + description: "Open Terminal", + exec() { + acode.exec("new-terminal"); + }, + readOnly: true, + }, + { + name: "acode:showWelcome", + description: "Show Welcome", + exec() { + acode.exec("welcome"); + }, + readOnly: true, + }, +]; + +export function setCommands(editor) { + commands.forEach((command) => { + editor.commands.addCommand(command); + }); +} + +/** + * Sets key bindings for the editor + * @param {AceAjax.Editor} editor Ace editor + */ +export async function setKeyBindings({ commands }) { + let keyboardShortcuts = keyBindings; + try { + const bindingsFile = fsOperation(KEYBINDING_FILE); + if (await bindingsFile.exists()) { + const bindings = await bindingsFile.readFile("json"); + // keyboardShortcuts = compareAndFixKeyBindings(keyboardShortcuts, bindings); + keyboardShortcuts = bindings; + } else { + throw new Error("Key binding file not found"); + } + } catch (error) { + await resetKeyBindings(); + } + + Object.keys(commands.byName).forEach((name) => { + const shortcut = keyboardShortcuts[name]; + const command = commands.byName[name]; + + if (shortcut?.description) { + command.description = shortcut.description; + } + + // not chekiang if shortcut is empty because it can be used to remove shortcut + command.bindKey = { win: shortcut?.key ?? null }; + commands.addCommand(command); + }); +} + +/** + * Resets key binding + */ +export async function resetKeyBindings() { + try { + const fs = fsOperation(KEYBINDING_FILE); + const fileName = Url.basename(KEYBINDING_FILE); + const content = JSON.stringify(keyBindings, undefined, 2); + if (!(await fs.exists())) { + await fsOperation(DATA_STORAGE).createFile(fileName, content); + return; + } + await fs.writeFile(content); + } catch (error) { + window.log("error", "Reset Keybinding failed!"); + window.log("error", error); + } +} diff --git a/src/ace/ext-beautify.js b/src/ace/ext-beautify.js deleted file mode 100644 index 12442c0fa..000000000 --- a/src/ace/ext-beautify.js +++ /dev/null @@ -1,331 +0,0 @@ -define("ace/ext/beautify",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"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.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 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() { - code = code.replace(/ +$/, ""); - }; - - 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) { - 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 === "" && singletonTags.indexOf(tagName) === -1){ - depth--; - } - - 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/src/ace/ext-code_lens.js b/src/ace/ext-code_lens.js deleted file mode 100644 index ee4653d85..000000000 --- a/src/ace/ext-code_lens.js +++ /dev/null @@ -1,238 +0,0 @@ -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; - left -= renderer.scrollLeft; - 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}}}); -}; - -function attachToEditor(editor) { - editor.codeLensProviders = []; - editor.renderer.on("afterRender", renderWidgets); - if (!editor.$codeLensClickHandler) { - editor.$codeLensClickHandler = function(e) { - var command = e.target.lensCommand; - if (command) - editor.execCommand(command.id, command.arguments); - }; - 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); - 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; - 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("\ -.ace_codeLens {\ - position: absolute;\ - color: #aaa;\ - font-size: 88%;\ - background: inherit;\ - width: 100%;\ - display: flex;\ - align-items: flex-end;\ - pointer-events: none;\ -}\ -.ace_codeLens > a {\ - cursor: pointer;\ - pointer-events: auto;\ -}\ -.ace_codeLens > a:hover {\ - color: #0000ff;\ - text-decoration: underline;\ -}\ -.ace_dark > .ace_codeLens > a:hover {\ - color: #4e94ce;\ -}\ -", "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/src/ace/ext-elastic_tabstops_lite.js b/src/ace/ext-elastic_tabstops_lite.js deleted file mode 100644 index 855666ac9..000000000 --- a/src/ace/ext-elastic_tabstops_lite.js +++ /dev/null @@ -1,277 +0,0 @@ -define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { -"use strict"; - -var ElasticTabstopsLite = function(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); - } - }; -}; - -(function() { - this.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; - }; - - this.$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 }; - }; - - this.$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; - }; - - this.$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; - }; - - this.$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; - }; - - this.$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; - }; - - this.$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; - }; - - this.$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; - } - } - }; - this.$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; - }; - this.$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; - }; - -}).call(ElasticTabstopsLite.prototype); - -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/src/ace/ext-emmet.js b/src/ace/ext-emmet.js deleted file mode 100644 index 68fc0ff13..000000000 --- a/src/ace/ext-emmet.js +++ /dev/null @@ -1,1331 +0,0 @@ -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 = function() { - this.snippetMap = {}; - this.snippetNameMap = {}; -}; - -(function() { - oop.implement(this, EventEmitter); - - this.getTokenizer = function() { - return SnippetManager.$tokenizer || this.createTokenizer(); - }; - - this.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; - }; - - this.tokenizeTmSnippet = function(str, startState) { - return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) { - return x.value || x; - }); - }; - - this.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; - }; - - this.variables = VARIABLES; - this.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; - }; - - this.tmFormatFunction = function(str, ch, editor) { - if (ch.formatFunction == "upcase") - return str.toUpperCase(); - if (ch.formatFunction == "downcase") - return str.toLowerCase(); - return str; - }; - - this.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; - }; - - this.insertSnippetForSelection = function(editor, snippetText) { - 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") - 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}; - } - }); - var range = editor.getSelectionRange(); - var end = editor.session.replace(range, text); - - var tabstopManager = new TabstopManager(editor); - var selectionId = editor.inVirtualSelectionMode && editor.selection.index; - tabstopManager.addTabstops(tabstops, range.start, end, selectionId); - }; - - this.insertSnippet = function(editor, snippetText) { - var self = this; - if (editor.inVirtualSelectionMode) - return self.insertSnippetForSelection(editor, snippetText); - - editor.forEachSelection(function() { - self.insertSnippetForSelection(editor, snippetText); - }, null, {keepOrder: true}); - - if (editor.tabstopManager) - editor.tabstopManager.tabNext(); - }; - - this.$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; - }; - - this.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; - }; - - this.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; - }; - - this.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; - }; - - this.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; - } - }; - - this.snippetMap = {}; - this.snippetNameMap = {}; - this.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}); - }; - this.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); - }; - this.parseSnippetFile = function(str) { - str = str.replace(/\r/g, ""); - var list = [], 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; - }; - this.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; - }; - -}).call(SnippetManager.prototype); - - -var TabstopManager = function(editor) { - 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); -}; -(function() { - this.attach = function(editor) { - this.index = 0; - this.ranges = []; - this.tabstops = []; - this.$openTabstops = null; - this.selectedTabstop = null; - - this.editor = editor; - 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); - }; - this.detach = function() { - this.tabstops.forEach(this.removeTabstopMarkers, this); - this.ranges = null; - this.tabstops = null; - this.selectedTabstop = null; - this.editor.removeListener("change", this.$onChange); - this.editor.removeListener("changeSelection", this.$onChangeSelection); - this.editor.removeListener("changeSession", this.$onChangeSession); - this.editor.commands.removeListener("afterExec", this.$onAfterExec); - this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); - this.editor.tabstopManager = null; - this.editor = null; - }; - - this.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.editor.session; - if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue()) - this.detach(); - }; - this.updateLinkedFields = function() { - var ts = this.selectedTabstop; - if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) - return; - this.$inChange = true; - var session = this.editor.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; - }; - this.onAfterExec = function(e) { - if (e.command && !e.command.readOnly) - this.updateLinkedFields(); - }; - this.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(); - }; - this.onChangeSession = function() { - this.detach(); - }; - this.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); - if (index === 0) - this.detach(); - }; - this.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}); - }; - this.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; - tabstops.forEach(function(ts, index) { - var dest = this.$openTabstops[index] || ts; - - 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); - } - }; - - this.addTabstopMarkers = function(ts) { - var session = this.editor.session; - ts.forEach(function(range) { - if (!range.markerId) - range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); - }); - }; - this.removeTabstopMarkers = function(ts) { - var session = this.editor.session; - ts.forEach(function(range) { - session.removeMarker(range.markerId); - range.markerId = null; - }); - }; - this.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.editor.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(); - } - }; - - this.keyboardHandler = new HashHandler(); - this.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(); - } - }); -}).call(TabstopManager.prototype); - - - -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("\ -.ace_snippet-marker {\ - -moz-box-sizing: border-box;\ - box-sizing: border-box;\ - background: rgba(194, 193, 208, 0.09);\ - border: 1px dotted rgba(211, 208, 235, 0.62);\ - position: absolute;\ -}", "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; -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(); - }, - getSelectionRange: function() { - var range = this.ace.getSelectionRange(); - var doc = this.ace.session.doc; - return { - start: doc.positionToIndex(range.start), - end: doc.positionToIndex(range.end) - }; - }, - createSelection: function(start, end) { - var doc = this.ace.session.doc; - this.ace.selection.setRange({ - start: doc.indexToPosition(start), - end: doc.indexToPosition(end) - }); - }, - 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 - }; - }, - getCaretPos: function(){ - var pos = this.ace.getCursorPosition(); - return this.ace.session.doc.positionToIndex(pos); - }, - setCaretPos: function(index){ - var pos = this.ace.session.doc.indexToPosition(index); - this.ace.selection.moveToPosition(pos); - }, - getCurrentLine: function() { - var row = this.ace.getCursorPosition().row; - return this.ace.session.getLine(row); - }, - 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); - }, - getContent: function(){ - return this.ace.getValue(); - }, - 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; - }, - 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"; - } - }, - prompt: function(title) { - return prompt(title); // eslint-disable-line no-alert - }, - getSelection: function() { - return this.ace.session.getTextRange(); - }, - getFilePath: function() { - return ""; - }, - $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; - } -}; - - -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/src/ace/ext-hardwrap.js b/src/ace/ext-hardwrap.js deleted file mode 100644 index 23be03091..000000000 --- a/src/ace/ext-hardwrap.js +++ /dev/null @@ -1,85 +0,0 @@ -define("ace/ext/hardwrap",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -function hardWrap(editor, options) { - var max = options.column || editor.getOption("printMarginColumn"); - - 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) { - session.replace(new Range(row,space.start,row,space.end), "\n"); - } - endRow++; - } else if (/\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--; - } - } - } - 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[3].length - }; - } - - } - -} - -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/src/ace/ext-keybinding_menu.js b/src/ace/ext-keybinding_menu.js deleted file mode 100644 index b9ad46ee7..000000000 --- a/src/ace/ext-keybinding_menu.js +++ /dev/null @@ -1,193 +0,0 @@ -define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -'use strict'; -var dom = require("../../lib/dom"); -var cssText = "#ace_settingsmenu, #kbshortcutmenu {\ -background-color: #F7F7F7;\ -color: black;\ -box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ -padding: 1em 0.5em 2em 1em;\ -overflow: auto;\ -position: absolute;\ -margin: 0;\ -bottom: 0;\ -right: 0;\ -top: 0;\ -z-index: 9991;\ -cursor: default;\ -}\ -.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ -box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ -background-color: rgba(255, 255, 255, 0.6);\ -color: black;\ -}\ -.ace_optionsMenuEntry:hover {\ -background-color: rgba(100, 100, 100, 0.1);\ -transition: all 0.3s\ -}\ -.ace_closeButton {\ -background: rgba(245, 146, 146, 0.5);\ -border: 1px solid #F48A8A;\ -border-radius: 50%;\ -padding: 7px;\ -position: absolute;\ -right: -8px;\ -top: -8px;\ -z-index: 100000;\ -}\ -.ace_closeButton{\ -background: rgba(245, 146, 146, 0.9);\ -}\ -.ace_optionsMenuKey {\ -color: darkslateblue;\ -font-weight: bold;\ -}\ -.ace_optionsMenuCommand {\ -color: darkcyan;\ -font-weight: normal;\ -}\ -.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\ -vertical-align: middle;\ -}\ -.ace_optionsMenuEntry button[ace_selected_button=true] {\ -background: #e7e7e7;\ -box-shadow: 1px 0px 2px 0px #adadad inset;\ -border-color: #adadad;\ -}\ -.ace_optionsMenuEntry button {\ -background: white;\ -border: 1px solid lightgray;\ -margin: 0px;\ -}\ -.ace_optionsMenuEntry button:hover{\ -background: #f0f0f0;\ -}"; -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) { -"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) { - "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/src/ace/ext-language_tools.js b/src/ace/ext-language_tools.js deleted file mode 100644 index c37f4927d..000000000 --- a/src/ace/ext-language_tools.js +++ /dev/null @@ -1,2304 +0,0 @@ -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 editorManager.activeFile.uri; - }, - 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 = function () { - this.snippetMap = {}; - this.snippetNameMap = {}; - }; - - (function () { - oop.implement(this, EventEmitter); - - this.getTokenizer = function () { - return SnippetManager.$tokenizer || this.createTokenizer(); - }; - - this.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; - }; - - this.tokenizeTmSnippet = function (str, startState) { - return this.getTokenizer() - .getLineTokens(str, startState) - .tokens.map(function (x) { - return x.value || x; - }); - }; - - this.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; - }; - - this.variables = VARIABLES; - this.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; - }; - - this.tmFormatFunction = function (str, ch, editor) { - if (ch.formatFunction == 'upcase') return str.toUpperCase(); - if (ch.formatFunction == 'downcase') return str.toLowerCase(); - return str; - }; - - this.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; - }; - - this.insertSnippetForSelection = function (editor, snippetText) { - 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') 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 }; - } - }); - var range = editor.getSelectionRange(); - var end = editor.session.replace(range, text); - - var tabstopManager = new TabstopManager(editor); - var selectionId = editor.inVirtualSelectionMode && editor.selection.index; - tabstopManager.addTabstops(tabstops, range.start, end, selectionId); - }; - - this.insertSnippet = function (editor, snippetText) { - var self = this; - if (editor.inVirtualSelectionMode) - return self.insertSnippetForSelection(editor, snippetText); - - editor.forEachSelection( - function () { - self.insertSnippetForSelection(editor, snippetText); - }, - null, - { keepOrder: true }, - ); - - if (editor.tabstopManager) editor.tabstopManager.tabNext(); - }; - - this.$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; - }; - - this.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; - }; - - this.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; - }; - - this.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; - }; - - this.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; - } - }; - - this.snippetMap = {}; - this.snippetNameMap = {}; - this.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 }); - }; - this.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); - }; - this.parseSnippetFile = function (str) { - str = str.replace(/\r/g, ''); - var list = [], - 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; - }; - this.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; - }; - }.call(SnippetManager.prototype)); - - var TabstopManager = function (editor) { - 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); - }; - (function () { - this.attach = function (editor) { - this.index = 0; - this.ranges = []; - this.tabstops = []; - this.$openTabstops = null; - this.selectedTabstop = null; - - this.editor = editor; - 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); - }; - this.detach = function () { - this.tabstops.forEach(this.removeTabstopMarkers, this); - this.ranges = null; - this.tabstops = null; - this.selectedTabstop = null; - this.editor.removeListener('change', this.$onChange); - this.editor.removeListener('changeSelection', this.$onChangeSelection); - this.editor.removeListener('changeSession', this.$onChangeSession); - this.editor.commands.removeListener('afterExec', this.$onAfterExec); - this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); - this.editor.tabstopManager = null; - this.editor = null; - }; - - this.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.editor.session; - if ( - !this.$inChange && - isRemove && - session.getLength() == 1 && - !session.getValue() - ) - this.detach(); - }; - this.updateLinkedFields = function () { - var ts = this.selectedTabstop; - if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) return; - this.$inChange = true; - var session = this.editor.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; - }; - this.onAfterExec = function (e) { - if (e.command && !e.command.readOnly) this.updateLinkedFields(); - }; - this.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(); - }; - this.onChangeSession = function () { - this.detach(); - }; - this.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); - if (index === 0) this.detach(); - }; - this.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, - }); - }; - this.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; - tabstops.forEach(function (ts, index) { - var dest = this.$openTabstops[index] || ts; - - 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); - } - }; - - this.addTabstopMarkers = function (ts) { - var session = this.editor.session; - ts.forEach(function (range) { - if (!range.markerId) - range.markerId = session.addMarker( - range, - 'ace_snippet-marker', - 'text', - ); - }); - }; - this.removeTabstopMarkers = function (ts) { - var session = this.editor.session; - ts.forEach(function (range) { - session.removeMarker(range.markerId); - range.markerId = null; - }); - }; - this.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.editor.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(); - } - }; - - this.keyboardHandler = new HashHandler(); - this.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(); - }, - }); - }.call(TabstopManager.prototype)); - - 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( - '\ -.ace_snippet-marker {\ - -moz-box-sizing: border-box;\ - box-sizing: border-box;\ - background: rgba(194, 193, 208, 0.09);\ - border: 1px dotted rgba(211, 208, 235, 0.62);\ - position: absolute;\ -}', - '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', -], 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 $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 = function (parentNode) { - var el = dom.createElement('div'); - var popup = new $singleLineEditor(el); - - if (parentNode) parentNode.appendChild(el); - el.style.display = 'none'; - popup.renderer.content.style.cursor = 'default'; - popup.renderer.setStyle('ace_autocomplete'); - - 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; - 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 = t.element.childNodes[row - t.config.firstRow]; - if (selected !== t.selectedNode && t.selectedNode) - dom.removeCssClass(t.selectedNode, 'ace_selected'); - t.selectedNode = selected; - if (selected) dom.addCssClass(selected, 'ace_selected'); - }); - 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', 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), ''); - - 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.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, 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'; - this._signal('hide'); - popup.isOpen = false; - }; - popup.show = function (pos, lineHeight, topdownOnly) { - var el = this.container; - var screenHeight = window.innerHeight; - var screenWidth = window.innerWidth; - var renderer = this.renderer; - var maxH = renderer.$maxLines * lineHeight * 1.4; - var top = pos.top + this.$borderSize; - var allowTopdown = top > screenHeight / 2 && !topdownOnly; - if (allowTopdown && top + lineHeight + maxH > screenHeight) { - renderer.$maxPixelHeight = top - 2 * this.$borderSize; - el.style.top = ''; - el.style.bottom = screenHeight - top + 'px'; - popup.isTopdown = false; - } else { - top += lineHeight; - renderer.$maxPixelHeight = screenHeight - top - 0.2 * lineHeight; - el.style.top = 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'; - - this._signal('show'); - lastMouseEvent = null; - popup.isOpen = 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; - }; - - dom.importCssString( - '\ -.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ - background-color: #CAD6FA;\ - z-index: 1;\ -}\ -.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ - background-color: #3a674e;\ -}\ -.ace_editor.ace_autocomplete .ace_line-hover {\ - border: 1px solid #abbffe;\ - margin-top: -1px;\ - background: rgba(233,233,253,0.4);\ - position: absolute;\ - z-index: 2;\ -}\ -.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\ - border: 1px solid rgba(109, 150, 13, 0.8);\ - background: rgba(58, 103, 78, 0.62);\ -}\ -.ace_completion-meta {\ - opacity: 0.5;\ - margin: 0.9em;\ -}\ -.ace_completion-message {\ - color: blue;\ -}\ -.ace_editor.ace_autocomplete .ace_completion-highlight{\ - color: #2d69c7;\ -}\ -.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\ - color: #93ca12;\ -}\ -.ace_editor.ace_autocomplete {\ - width: 300px;\ - z-index: 200000;\ - border: 1px lightgray solid;\ - position: fixed;\ - box-shadow: 2px 3px 5px rgba(0,0,0,.2);\ - line-height: 1.4;\ - background: #fefefe;\ - color: #111;\ -}\ -.ace_dark.ace_editor.ace_autocomplete {\ - border: 1px #484747 solid;\ - box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\ - line-height: 1.4;\ - background: #25282c;\ - color: #c1c1c1;\ -}', - 'autocompletion.css', - false, - ); - - exports.AcePopup = AcePopup; - exports.$singleLineEditor = $singleLineEditor; -}); - -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); - }; -}); - -define('ace/autocomplete', [ - 'require', - 'exports', - 'module', - 'ace/keyboard/hash_handler', - 'ace/autocomplete/popup', - 'ace/autocomplete/util', - 'ace/lib/lang', - 'ace/lib/dom', - 'ace/snippets', - 'ace/config', -], function (require, exports, module) { - 'use strict'; - - var HashHandler = require('./keyboard/hash_handler').HashHandler; - var AcePopup = require('./autocomplete/popup').AcePopup; - 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 Autocomplete = function () { - this.autoInsert = false; - this.autoSelect = true; - this.exactMatch = false; - this.gatherCompletionsId = 0; - this.keyboardHandler = new HashHandler(); - this.keyboardHandler.bindKeys(this.commands); - - 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.changeTimer = lang.delayedCall( - function () { - this.updateCompletions(true); - }.bind(this), - ); - - // this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50); - }; - - (function () { - this.$init = function () { - this.popup = new AcePopup(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.tooltipTimer.bind(null, null)); - // this.popup.on('select', this.tooltipTimer.bind(null, null)); - // this.popup.on('changeHoverMarker', this.tooltipTimer.bind(null, null)); - return this.popup; - }; - - this.getPopup = function () { - return this.popup || this.$init(); - }; - - this.openPopup = function (editor, prefix, keepPopupPosition) { - if (!this.popup) this.$init(); - - this.popup.autoSelect = this.autoSelect; - - this.popup.setData( - this.completions.filtered, - this.completions.filterText, - ); - - editor.keyBinding.addKeyboardHandler(this.keyboardHandler); - - var renderer = editor.renderer; - this.popup.setRow(this.autoSelect ? 0 : -1); - if (!keepPopupPosition) { - this.popup.setTheme(editor.getTheme()); - this.popup.setFontSize(editor.getFontSize()); - - 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; - - this.popup.show(pos, lineHeight); - } else if (keepPopupPosition && !prefix) { - this.detach(); - } - this.changeTimer.cancel(); - }; - - this.detach = function () { - 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.changeTimer.cancel(); - // this.hideDocTooltip(); - - this.gatherCompletionsId += 1; - if (this.popup && this.popup.isOpen) this.popup.hide(); - - if (this.base) this.base.detach(); - this.activated = false; - this.completions = this.base = null; - }; - - this.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(); - }; - - this.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(); - } - }; - - this.mousedownListener = function (e) { - this.detach(); - }; - - this.mousewheelListener = function (e) { - this.detach(); - }; - - this.goTo = function (where) { - this.popup.goTo(where); - }; - - this.insertMatch = function (data, options) { - if (!data) data = this.popup.getData(this.popup.getRow()); - if (!data) return false; - - var completions = this.completions; - this.editor.startOperation({ command: { name: 'insertMatch' } }); - if (data.completer && data.completer.insertMatch) { - data.completer.insertMatch(this.editor, data); - } else { - if (completions.filterText) { - var ranges = this.editor.selection.getAllRanges(); - for (var i = 0, range; (range = ranges[i]); i++) { - range.start.column -= completions.filterText.length; - this.editor.session.remove(range); - } - } - if (data.snippet) - snippetManager.insertSnippet(this.editor, data.snippet); - else this.editor.execCommand('insertstring', data.value || data); - } - if (this.completions == completions) this.detach(); - this.editor.endOperation(); - }; - - this.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; - }, - - PageUp: function (editor) { - editor.completer.popup.gotoPageUp(); - }, - PageDown: function (editor) { - editor.completer.popup.gotoPageDown(); - }, - }; - - this.gatherCompletions = function (editor, callback) { - var session = editor.getSession(); - var pos = editor.getCursorPosition(); - - var prefix = util.getCompletionPrefix(editor); - - this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); - this.base.$insertRight = true; - - var matches = []; - var total = editor.completers.length; - editor.completers.forEach(function (completer, i) { - completer.getCompletions( - editor, - session, - pos, - prefix, - function (err, results) { - if (!err && results) matches = matches.concat(results); - callback(null, { - prefix: util.getCompletionPrefix(editor), - matches: matches, - finished: --total === 0, - }); - }, - ); - }); - return true; - }; - - this.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); - }; - - this.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); - return this.openPopup(this.editor, '', keepPopupPosition); - } - var _id = this.gatherCompletionsId; - var detachIfFinished = function (results) { - if (!results.finished) return; - return this.detach(); - }.bind(this); - - var processResults = function (results) { - var prefix = results.prefix; - var matches = results.matches; - - this.completions = new FilteredList(matches); - - if (this.exactMatch) this.completions.exactMatch = true; - - this.completions.setFilter(prefix); - var filtered = this.completions.filtered; - if (!filtered.length) return detachIfFinished(results); - if ( - filtered.length == 1 && - filtered[0].value == prefix && - !filtered[0].snippet - ) - return detachIfFinished(results); - if (this.autoInsert && filtered.length == 1 && results.finished) - return this.insertMatch(filtered[0]); - - this.openPopup(this.editor, prefix, keepPopupPosition); - }.bind(this); - - var isImmediate = true; - var immediateResults = null; - this.gatherCompletions( - this.editor, - function (err, results) { - var prefix = results.prefix; - var matches = results && results.matches; - - if (!matches || !matches.length) return detachIfFinished(results); - if ( - prefix.indexOf(results.prefix) !== 0 || - _id != this.gatherCompletionsId - ) - return; - if (isImmediate) { - immediateResults = results; - return; - } - - processResults(results); - }.bind(this), - ); - - isImmediate = false; - if (immediateResults) { - var results = immediateResults; - immediateResults = null; - processResults(results); - } - }; - - this.cancelContextMenu = function () { - this.editor.$mouseHandler.cancelContextMenu(); - }; - - // this.updateDocTooltip = function () { - // var popup = this.popup; - // var all = popup.data; - // var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]); - // var doc = null; - // if (!selected || !this.editor || !this.popup.isOpen) - // return this.hideDocTooltip(); - // this.editor.completers.some(function (completer) { - // if (completer.getDocTooltip) doc = completer.getDocTooltip(selected); - // return doc; - // }); - // 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); - // }; - - // this.showDocTooltip = function (item) { - // if (!this.tooltipNode) { - // this.tooltipNode = dom.createElement('div'); - // this.tooltipNode.className = 'ace_tooltip ace_doc-tooltip'; - // this.tooltipNode.style.margin = 0; - // this.tooltipNode.style.pointerEvents = 'auto'; - // this.tooltipNode.tabIndex = -1; - // this.tooltipNode.onblur = this.blurListener.bind(this); - // this.tooltipNode.onclick = this.onTooltipClick.bind(this); - // } - - // var tooltipNode = this.tooltipNode; - // if (item.docHTML) { - // tooltipNode.innerHTML = item.docHTML; - // } else if (item.docText) { - // tooltipNode.textContent = item.docText; - // } - - // if (!tooltipNode.parentNode) document.body.appendChild(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 = ''; - // } - // }; - - // this.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); - // }; - - // this.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; - // } - // }; - - this.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.completer == null; - this.popup = null; - }; - }.call(Autocomplete.prototype)); - - Autocomplete.for = function (editor) { - if (editor.completer) { - return editor.completer; - } - if (config.get('sharedPopups')) { - if (!Autocomplete.$shared) - Autocomplete.$sharedInstance = new Autocomplete(); - editor.completer = Autocomplete.$sharedInstance; - } else { - editor.completer = new Autocomplete(); - editor.once('destroy', function (e, editor) { - editor.completer.destroy(); - }); - } - return editor.completer; - }; - - Autocomplete.startCommand = { - name: 'startAutocomplete', - exec: function (editor, options) { - var completer = Autocomplete.for(editor); - completer.autoInsert = false; - completer.autoSelect = true; - completer.showPopup(editor, options); - completer.cancelContextMenu(); - }, - bindKey: 'Ctrl-Space|Ctrl-Shift-Space|Alt-Space', - }; - - var FilteredList = function (array, filterText) { - this.all = array; - this.filtered = array; - this.filterText = filterText || ''; - this.exactMatch = false; - }; - (function () { - this.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; - }; - this.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 = 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; - }; - }.call(FilteredList.prototype)); - - exports.Autocomplete = Autocomplete; - 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, - ); - callback(null, completions); - }, - }; - - 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', - type: 'snippet', - }); - } - }, this); - callback(null, completions); - }, - // getDocTooltip: function (item) { - // if (item.type == 'snippet' && !item.docHTML) { - // item.docHTML = [ - // '', - // lang.escapeHTML(item.caption), - // '', - // '
', - // lang.escapeHTML(item.snippet), - // ].join(''); - // } - // }, - }; - - 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') { - var prefix = util.getCompletionPrefix(editor); - if (prefix && !hasCompleter) { - var completer = Autocomplete.for(editor); - completer.autoInsert = false; - 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.removeListener('afterExec', doLiveAutocomplete); - } - }, - value: false, - }, - 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; - } - }); -})(); diff --git a/src/ace/ext-linking.js b/src/ace/ext-linking.js deleted file mode 100644 index 147efe942..000000000 --- a/src/ace/ext-linking.js +++ /dev/null @@ -1,64 +0,0 @@ -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/src/ace/ext-modelist.js b/src/ace/ext-modelist.js deleted file mode 100644 index 064e398db..000000000 --- a/src/ace/ext-modelist.js +++ /dev/null @@ -1,248 +0,0 @@ -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 = function(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); -}; -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_x86:["asm|a"], - AutoHotKey: ["ahk"], - BatchFile: ["bat|cmd"], - 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"], - Crystal: ["cr"], - CSharp: ["cs"], - Csound_Document: ["csd"], - Csound_Orchestra: ["orc"], - Csound_Score: ["sco"], - CSS: ["css"], - Curly: ["curly"], - D: ["d|di"], - Dart: ["dart"], - Diff: ["diff|patch"], - Dockerfile: ["^Dockerfile"], - Dot: ["dot"], - Drools: ["drl"], - Edifact: ["edi"], - Eiffel: ["e|ge"], - EJS: ["ejs"], - Elixir: ["ex|exs"], - Elm: ["elm"], - Erlang: ["erl|hrl"], - 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|vue|we|wpy"], - HTML_Elixir: ["eex|html.eex"], - HTML_Ruby: ["erb|rhtml|html.erb"], - INI: ["ini|conf|cfg|prefs"], - Io: ["io"], - Jack: ["jack"], - Jade: ["jade|pug"], - Java: ["java"], - JavaScript: ["js|jsm|jsx"], - 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"], - LogiQL: ["logic|lql"], - 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"], - Nginx: ["nginx|conf"], - Nim: ["nim"], - Nix: ["nix"], - NSIS: ["nsi|nsh"], - Nunjucks: ["nunjucks|nunjs|nj|njk"], - ObjectiveC: ["m|mm"], - OCaml: ["ml|mli"], - 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"], - Powershell: ["ps1"], - Praat: ["praat|praatscript|psc|proc"], - Prisma: ["prisma"], - Prolog: ["plg|prolog"], - Properties: ["properties"], - Protobuf: ["proto"], - 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"], - RST: ["rst"], - Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], - Rust: ["rs"], - 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"], - 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"], - Twig: ["twig|swig"], - Typescript: ["ts|typescript|str"], - Vala: ["vala"], - VBScript: ["vbs|vb"], - Velocity: ["vm"], - Verilog: ["v|vh|sv|svh"], - VHDL: ["vhd|vhdl"], - Visualforce: ["vfp|component|page"], - Wollok: ["wlk|wpgm|wtest"], - XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], - XQuery: ["xq"], - YAML: ["yaml|yml"], - Zeek: ["zeek|bro"], - Django: ["html"] -}; - -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/src/ace/ext-options.js b/src/ace/ext-options.js deleted file mode 100644 index 3f57c0922..000000000 --- a/src/ace/ext-options.js +++ /dev/null @@ -1,894 +0,0 @@ -define('ace/ext/menu_tools/overlay_page', [ - 'require', - 'exports', - 'module', - 'ace/lib/dom', -], function (require, exports, module) { - 'use strict'; - var dom = require('../../lib/dom'); - var cssText = - '#ace_settingsmenu, #kbshortcutmenu {\ -background-color: #F7F7F7;\ -color: black;\ -box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ -padding: 1em 0.5em 2em 1em;\ -overflow: auto;\ -position: absolute;\ -margin: 0;\ -bottom: 0;\ -right: 0;\ -top: 0;\ -z-index: 9991;\ -cursor: default;\ -}\ -.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ -box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ -background-color: rgba(255, 255, 255, 0.6);\ -color: black;\ -}\ -.ace_optionsMenuEntry:hover {\ -background-color: rgba(100, 100, 100, 0.1);\ -transition: all 0.3s\ -}\ -.ace_closeButton {\ -background: rgba(245, 146, 146, 0.5);\ -border: 1px solid #F48A8A;\ -border-radius: 50%;\ -padding: 7px;\ -position: absolute;\ -right: -8px;\ -top: -8px;\ -z-index: 100000;\ -}\ -.ace_closeButton{\ -background: rgba(245, 146, 146, 0.9);\ -}\ -.ace_optionsMenuKey {\ -color: darkslateblue;\ -font-weight: bold;\ -}\ -.ace_optionsMenuCommand {\ -color: darkcyan;\ -font-weight: normal;\ -}\ -.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\ -vertical-align: middle;\ -}\ -.ace_optionsMenuEntry button[ace_selected_button=true] {\ -background: #e7e7e7;\ -box-shadow: 1px 0px 2px 0px #adadad inset;\ -border-color: #adadad;\ -}\ -.ace_optionsMenuEntry button {\ -background: white;\ -border: 1px solid lightgray;\ -margin: 0px;\ -}\ -.ace_optionsMenuEntry button:hover{\ -background: #f0f0f0;\ -}'; - 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 = function (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); - }; - 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_x86: ['asm|a'], - AutoHotKey: ['ahk'], - BatchFile: ['bat|cmd'], - 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'], - Crystal: ['cr'], - CSharp: ['cs'], - Csound_Document: ['csd'], - Csound_Orchestra: ['orc'], - Csound_Score: ['sco'], - CSS: ['css'], - Curly: ['curly'], - D: ['d|di'], - Dart: ['dart'], - Diff: ['diff|patch'], - Dockerfile: ['^Dockerfile'], - Dot: ['dot'], - Drools: ['drl'], - Edifact: ['edi'], - Eiffel: ['e|ge'], - EJS: ['ejs'], - Elixir: ['ex|exs'], - Elm: ['elm'], - Erlang: ['erl|hrl'], - 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|vue|we|wpy'], - HTML_Elixir: ['eex|html.eex'], - HTML_Ruby: ['erb|rhtml|html.erb'], - INI: ['ini|conf|cfg|prefs'], - Io: ['io'], - Jack: ['jack'], - Jade: ['jade|pug'], - Java: ['java'], - JavaScript: ['js|jsm|jsx'], - 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'], - LogiQL: ['logic|lql'], - 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'], - Nginx: ['nginx|conf'], - Nim: ['nim'], - Nix: ['nix'], - NSIS: ['nsi|nsh'], - Nunjucks: ['nunjucks|nunjs|nj|njk'], - ObjectiveC: ['m|mm'], - OCaml: ['ml|mli'], - 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'], - Powershell: ['ps1'], - Praat: ['praat|praatscript|psc|proc'], - Prisma: ['prisma'], - Prolog: ['plg|prolog'], - Properties: ['properties'], - Protobuf: ['proto'], - 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'], - RST: ['rst'], - Ruby: ['rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile'], - Rust: ['rs'], - 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'], - 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'], - Twig: ['twig|swig'], - Typescript: ['ts|typescript|str'], - Vala: ['vala'], - VBScript: ['vbs|vb'], - Velocity: ['vm'], - Verilog: ['v|vh|sv|svh'], - VHDL: ['vhd|vhdl'], - Visualforce: ['vfp|component|page'], - Wollok: ['wlk|wpgm|wtest'], - XML: ['xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml'], - XQuery: ['xq'], - YAML: ['yaml|yml'], - Zeek: ['zeek|bro'], - Django: ['html'], - }; - - 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, -) { - 'use strict'; - - var themeData = [ - ['Chrome'], - ['Clouds'], - ['Crimson Editor'], - ['Dawn'], - ['Dreamweaver'], - ['Eclipse'], - ['GitHub'], - ['IPlastic'], - ['Solarized Light'], - ['TextMate'], - ['Tomorrow'], - ['Xcode'], - ['Kuroir'], - ['KatzenMilch'], - ['SQL Server', 'sqlserver', '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'], - ]; - - 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', - }, - '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', - }, - }, - }; - - var OptionPanel = function (editor, element) { - this.editor = editor; - this.container = element || document.createElement('div'); - this.groups = []; - this.options = {}; - }; - - (function () { - oop.implement(this, EventEmitter); - - this.add = function (config) { - if (config.Main) oop.mixin(optionGroups.Main, config.Main); - if (config.More) oop.mixin(optionGroups.More, config.More); - }; - - this.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, - ); - }; - - this.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); - }; - - this.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; - }; - - this.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], - ]; - }; - - this.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 }); - }; - - this.getOption = function (option) { - if (option.getValue) return option.getValue(); - return this.editor.getOption(option.path); - }; - }.call(OptionPanel.prototype)); - - exports.OptionPanel = OptionPanel; -}); -(function () { - window.require(['ace/ext/options'], function (m) { - if (typeof module == 'object' && typeof exports == 'object' && module) { - module.exports = m; - } - }); -})(); diff --git a/src/ace/ext-prompt.js b/src/ace/ext-prompt.js deleted file mode 100644 index 3b2255f85..000000000 --- a/src/ace/ext-prompt.js +++ /dev/null @@ -1,3142 +0,0 @@ -define('ace/ext/menu_tools/get_editor_keyboard_shortcuts', [ - 'require', - 'exports', - 'module', - 'ace/lib/keys', -], function (require, exports, module) { - '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/autocomplete/popup', [ - 'require', - 'exports', - 'module', - 'ace/virtual_renderer', - 'ace/editor', - 'ace/range', - 'ace/lib/event', - 'ace/lib/lang', - 'ace/lib/dom', -], 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 $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 = function (parentNode) { - var el = dom.createElement('div'); - var popup = new $singleLineEditor(el); - - if (parentNode) parentNode.appendChild(el); - el.style.display = 'none'; - popup.renderer.content.style.cursor = 'default'; - popup.renderer.setStyle('ace_autocomplete'); - - 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; - 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 = t.element.childNodes[row - t.config.firstRow]; - if (selected !== t.selectedNode && t.selectedNode) - dom.removeCssClass(t.selectedNode, 'ace_selected'); - t.selectedNode = selected; - if (selected) dom.addCssClass(selected, 'ace_selected'); - }); - 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', 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), ''); - - 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.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, 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'; - this._signal('hide'); - popup.isOpen = false; - }; - popup.show = function (pos, lineHeight, topdownOnly) { - var el = this.container; - var screenHeight = window.innerHeight; - var screenWidth = window.innerWidth; - var renderer = this.renderer; - var maxH = renderer.$maxLines * lineHeight * 1.4; - var top = pos.top + this.$borderSize; - var allowTopdown = top > screenHeight / 2 && !topdownOnly; - if (allowTopdown && top + lineHeight + maxH > screenHeight) { - renderer.$maxPixelHeight = top - 2 * this.$borderSize; - el.style.top = ''; - el.style.bottom = screenHeight - top + 'px'; - popup.isTopdown = false; - } else { - top += lineHeight; - renderer.$maxPixelHeight = screenHeight - top - 0.2 * lineHeight; - el.style.top = 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'; - - this._signal('show'); - lastMouseEvent = null; - popup.isOpen = 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; - }; - - dom.importCssString( - '\ -.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ - background-color: #CAD6FA;\ - z-index: 1;\ -}\ -.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ - background-color: #3a674e;\ -}\ -.ace_editor.ace_autocomplete .ace_line-hover {\ - border: 1px solid #abbffe;\ - margin-top: -1px;\ - background: rgba(233,233,253,0.4);\ - position: absolute;\ - z-index: 2;\ -}\ -.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\ - border: 1px solid rgba(109, 150, 13, 0.8);\ - background: rgba(58, 103, 78, 0.62);\ -}\ -.ace_completion-meta {\ - opacity: 0.5;\ - margin: 0.9em;\ -}\ -.ace_completion-message {\ - color: blue;\ -}\ -.ace_editor.ace_autocomplete .ace_completion-highlight{\ - color: #2d69c7;\ -}\ -.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\ - color: #93ca12;\ -}\ -.ace_editor.ace_autocomplete {\ - width: 300px;\ - z-index: 200000;\ - border: 1px lightgray solid;\ - position: fixed;\ - box-shadow: 2px 3px 5px rgba(0,0,0,.2);\ - line-height: 1.4;\ - background: #fefefe;\ - color: #111;\ -}\ -.ace_dark.ace_editor.ace_autocomplete {\ - border: 1px #484747 solid;\ - box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\ - line-height: 1.4;\ - background: #25282c;\ - color: #c1c1c1;\ -}', - 'autocompletion.css', - false, - ); - - exports.AcePopup = AcePopup; - exports.$singleLineEditor = $singleLineEditor; -}); - -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); - }; -}); - -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 editorManager.activeFile.uri; - }, - 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 = function () { - this.snippetMap = {}; - this.snippetNameMap = {}; - }; - - (function () { - oop.implement(this, EventEmitter); - - this.getTokenizer = function () { - return SnippetManager.$tokenizer || this.createTokenizer(); - }; - - this.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; - }; - - this.tokenizeTmSnippet = function (str, startState) { - return this.getTokenizer() - .getLineTokens(str, startState) - .tokens.map(function (x) { - return x.value || x; - }); - }; - - this.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; - }; - - this.variables = VARIABLES; - this.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; - }; - - this.tmFormatFunction = function (str, ch, editor) { - if (ch.formatFunction == 'upcase') return str.toUpperCase(); - if (ch.formatFunction == 'downcase') return str.toLowerCase(); - return str; - }; - - this.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; - }; - - this.insertSnippetForSelection = function (editor, snippetText) { - 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') 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, - }; - } - }); - var range = editor.getSelectionRange(); - var end = editor.session.replace(range, text); - - var tabstopManager = new TabstopManager(editor); - var selectionId = editor.inVirtualSelectionMode && editor.selection.index; - tabstopManager.addTabstops(tabstops, range.start, end, selectionId); - }; - - this.insertSnippet = function (editor, snippetText) { - var self = this; - if (editor.inVirtualSelectionMode) - return self.insertSnippetForSelection(editor, snippetText); - - editor.forEachSelection( - function () { - self.insertSnippetForSelection(editor, snippetText); - }, - null, - { - keepOrder: true, - }, - ); - - if (editor.tabstopManager) editor.tabstopManager.tabNext(); - }; - - this.$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; - }; - - this.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; - }; - - this.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; - }; - - this.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; - }; - - this.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; - } - }; - - this.snippetMap = {}; - this.snippetNameMap = {}; - this.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, - }); - }; - this.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); - }; - this.parseSnippetFile = function (str) { - str = str.replace(/\r/g, ''); - var list = [], - 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; - }; - this.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; - }; - }.call(SnippetManager.prototype)); - - var TabstopManager = function (editor) { - 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); - }; - (function () { - this.attach = function (editor) { - this.index = 0; - this.ranges = []; - this.tabstops = []; - this.$openTabstops = null; - this.selectedTabstop = null; - - this.editor = editor; - 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); - }; - this.detach = function () { - this.tabstops.forEach(this.removeTabstopMarkers, this); - this.ranges = null; - this.tabstops = null; - this.selectedTabstop = null; - this.editor.removeListener('change', this.$onChange); - this.editor.removeListener('changeSelection', this.$onChangeSelection); - this.editor.removeListener('changeSession', this.$onChangeSession); - this.editor.commands.removeListener('afterExec', this.$onAfterExec); - this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); - this.editor.tabstopManager = null; - this.editor = null; - }; - - this.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.editor.session; - if ( - !this.$inChange && - isRemove && - session.getLength() == 1 && - !session.getValue() - ) - this.detach(); - }; - this.updateLinkedFields = function () { - var ts = this.selectedTabstop; - if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) return; - this.$inChange = true; - var session = this.editor.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; - }; - this.onAfterExec = function (e) { - if (e.command && !e.command.readOnly) this.updateLinkedFields(); - }; - this.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(); - }; - this.onChangeSession = function () { - this.detach(); - }; - this.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); - if (index === 0) this.detach(); - }; - this.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, - }); - }; - this.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; - tabstops.forEach(function (ts, index) { - var dest = this.$openTabstops[index] || ts; - - 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); - } - }; - - this.addTabstopMarkers = function (ts) { - var session = this.editor.session; - ts.forEach(function (range) { - if (!range.markerId) - range.markerId = session.addMarker( - range, - 'ace_snippet-marker', - 'text', - ); - }); - }; - this.removeTabstopMarkers = function (ts) { - var session = this.editor.session; - ts.forEach(function (range) { - session.removeMarker(range.markerId); - range.markerId = null; - }); - }; - this.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.editor.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(); - } - }; - - this.keyboardHandler = new HashHandler(); - this.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(); - }, - }); - }.call(TabstopManager.prototype)); - - 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( - '\ -.ace_snippet-marker {\ - -moz-box-sizing: border-box;\ - box-sizing: border-box;\ - background: rgba(194, 193, 208, 0.09);\ - border: 1px dotted rgba(211, 208, 235, 0.62);\ - position: absolute;\ -}', - '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', [ - 'require', - 'exports', - 'module', - 'ace/keyboard/hash_handler', - 'ace/autocomplete/popup', - 'ace/autocomplete/util', - 'ace/lib/lang', - 'ace/lib/dom', - 'ace/snippets', - 'ace/config', -], function (require, exports, module) { - 'use strict'; - - var HashHandler = require('./keyboard/hash_handler').HashHandler; - var AcePopup = require('./autocomplete/popup').AcePopup; - 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 Autocomplete = function () { - this.autoInsert = false; - this.autoSelect = true; - this.exactMatch = false; - this.gatherCompletionsId = 0; - this.keyboardHandler = new HashHandler(); - this.keyboardHandler.bindKeys(this.commands); - - 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.changeTimer = lang.delayedCall( - function () { - this.updateCompletions(true); - }.bind(this), - ); - - this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50); - }; - - (function () { - this.$init = function () { - this.popup = new AcePopup(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.tooltipTimer.bind(null, null)); - this.popup.on('select', this.tooltipTimer.bind(null, null)); - this.popup.on('changeHoverMarker', this.tooltipTimer.bind(null, null)); - return this.popup; - }; - - this.getPopup = function () { - return this.popup || this.$init(); - }; - - this.openPopup = function (editor, prefix, keepPopupPosition) { - if (!this.popup) this.$init(); - - this.popup.autoSelect = this.autoSelect; - - this.popup.setData( - this.completions.filtered, - this.completions.filterText, - ); - - editor.keyBinding.addKeyboardHandler(this.keyboardHandler); - - var renderer = editor.renderer; - this.popup.setRow(this.autoSelect ? 0 : -1); - if (!keepPopupPosition) { - this.popup.setTheme(editor.getTheme()); - this.popup.setFontSize(editor.getFontSize()); - - 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; - - this.popup.show(pos, lineHeight); - } else if (keepPopupPosition && !prefix) { - this.detach(); - } - this.changeTimer.cancel(); - }; - - this.detach = function () { - 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.changeTimer.cancel(); - this.hideDocTooltip(); - - this.gatherCompletionsId += 1; - if (this.popup && this.popup.isOpen) this.popup.hide(); - - if (this.base) this.base.detach(); - this.activated = false; - this.completions = this.base = null; - }; - - this.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(); - }; - - this.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(); - } - }; - - this.mousedownListener = function (e) { - this.detach(); - }; - - this.mousewheelListener = function (e) { - this.detach(); - }; - - this.goTo = function (where) { - this.popup.goTo(where); - }; - - this.insertMatch = function (data, options) { - if (!data) data = this.popup.getData(this.popup.getRow()); - if (!data) return false; - - var completions = this.completions; - this.editor.startOperation({ - command: { - name: 'insertMatch', - }, - }); - if (data.completer && data.completer.insertMatch) { - data.completer.insertMatch(this.editor, data); - } else { - if (completions.filterText) { - var ranges = this.editor.selection.getAllRanges(); - for (var i = 0, range; (range = ranges[i]); i++) { - range.start.column -= completions.filterText.length; - this.editor.session.remove(range); - } - } - if (data.snippet) - snippetManager.insertSnippet(this.editor, data.snippet); - else this.editor.execCommand('insertstring', data.value || data); - } - if (this.completions == completions) this.detach(); - this.editor.endOperation(); - }; - - this.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; - }, - - PageUp: function (editor) { - editor.completer.popup.gotoPageUp(); - }, - PageDown: function (editor) { - editor.completer.popup.gotoPageDown(); - }, - }; - - this.gatherCompletions = function (editor, callback) { - var session = editor.getSession(); - var pos = editor.getCursorPosition(); - - var prefix = util.getCompletionPrefix(editor); - - this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); - this.base.$insertRight = true; - - var matches = []; - var total = editor.completers.length; - editor.completers.forEach(function (completer, i) { - completer.getCompletions( - editor, - session, - pos, - prefix, - function (err, results) { - if (!err && results) matches = matches.concat(results); - callback(null, { - prefix: util.getCompletionPrefix(editor), - matches: matches, - finished: --total === 0, - }); - }, - ); - }); - return true; - }; - - this.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); - }; - - this.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); - return this.openPopup(this.editor, '', keepPopupPosition); - } - var _id = this.gatherCompletionsId; - var detachIfFinished = function (results) { - if (!results.finished) return; - return this.detach(); - }.bind(this); - - var processResults = function (results) { - var prefix = results.prefix; - var matches = results.matches; - - this.completions = new FilteredList(matches); - - if (this.exactMatch) this.completions.exactMatch = true; - - this.completions.setFilter(prefix); - var filtered = this.completions.filtered; - if (!filtered.length) return detachIfFinished(results); - if ( - filtered.length == 1 && - filtered[0].value == prefix && - !filtered[0].snippet - ) - return detachIfFinished(results); - if (this.autoInsert && filtered.length == 1 && results.finished) - return this.insertMatch(filtered[0]); - - this.openPopup(this.editor, prefix, keepPopupPosition); - }.bind(this); - - var isImmediate = true; - var immediateResults = null; - this.gatherCompletions( - this.editor, - function (err, results) { - var prefix = results.prefix; - var matches = results && results.matches; - - if (!matches || !matches.length) return detachIfFinished(results); - if ( - prefix.indexOf(results.prefix) !== 0 || - _id != this.gatherCompletionsId - ) - return; - if (isImmediate) { - immediateResults = results; - return; - } - - processResults(results); - }.bind(this), - ); - - isImmediate = false; - if (immediateResults) { - var results = immediateResults; - immediateResults = null; - processResults(results); - } - }; - - this.cancelContextMenu = function () { - this.editor.$mouseHandler.cancelContextMenu(); - }; - - this.updateDocTooltip = function () { - var popup = this.popup; - var all = popup.data; - var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]); - var doc = null; - if (!selected || !this.editor || !this.popup.isOpen) - return this.hideDocTooltip(); - this.editor.completers.some(function (completer) { - if (completer.getDocTooltip) doc = completer.getDocTooltip(selected); - return doc; - }); - 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); - }; - - this.showDocTooltip = function (item) { - if (!this.tooltipNode) { - this.tooltipNode = dom.createElement('div'); - this.tooltipNode.className = 'ace_tooltip ace_doc-tooltip'; - this.tooltipNode.style.margin = 0; - this.tooltipNode.style.pointerEvents = 'auto'; - this.tooltipNode.tabIndex = -1; - this.tooltipNode.onblur = this.blurListener.bind(this); - this.tooltipNode.onclick = this.onTooltipClick.bind(this); - } - - var tooltipNode = this.tooltipNode; - if (item.docHTML) { - tooltipNode.innerHTML = item.docHTML; - } else if (item.docText) { - tooltipNode.textContent = item.docText; - } - - if (!tooltipNode.parentNode) document.body.appendChild(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 = ''; - } - }; - - this.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); - }; - - this.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; - } - }; - - this.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.completer == null; - this.popup = null; - }; - }.call(Autocomplete.prototype)); - - Autocomplete.for = function (editor) { - if (editor.completer) { - return editor.completer; - } - if (config.get('sharedPopups')) { - if (!Autocomplete.$shared) - Autocomplete.$sharedInstance = new Autocomplete(); - editor.completer = Autocomplete.$sharedInstance; - } else { - editor.completer = new Autocomplete(); - editor.once('destroy', function (e, editor) { - editor.completer.destroy(); - }); - } - return editor.completer; - }; - - Autocomplete.startCommand = { - name: 'startAutocomplete', - exec: function (editor, options) { - var completer = Autocomplete.for(editor); - completer.autoInsert = false; - completer.autoSelect = true; - completer.showPopup(editor, options); - completer.cancelContextMenu(); - }, - bindKey: 'Ctrl-Space|Ctrl-Shift-Space|Alt-Space', - }; - - var FilteredList = function (array, filterText) { - this.all = array; - this.filtered = array; - this.filterText = filterText || ''; - this.exactMatch = false; - }; - (function () { - this.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; - }; - this.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 = 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; - }; - }.call(FilteredList.prototype)); - - exports.Autocomplete = Autocomplete; - exports.FilteredList = FilteredList; -}); - -define('ace/ext/menu_tools/overlay_page', [ - 'require', - 'exports', - 'module', - 'ace/lib/dom', -], function (require, exports, module) { - 'use strict'; - var dom = require('../../lib/dom'); - var cssText = - '#ace_settingsmenu, #kbshortcutmenu {\ -background-color: #F7F7F7;\ -color: black;\ -box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ -padding: 1em 0.5em 2em 1em;\ -overflow: auto;\ -position: absolute;\ -margin: 0;\ -bottom: 0;\ -right: 0;\ -top: 0;\ -z-index: 9991;\ -cursor: default;\ -}\ -.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ -box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ -background-color: rgba(255, 255, 255, 0.6);\ -color: black;\ -}\ -.ace_optionsMenuEntry:hover {\ -background-color: rgba(100, 100, 100, 0.1);\ -transition: all 0.3s\ -}\ -.ace_closeButton {\ -background: rgba(245, 146, 146, 0.5);\ -border: 1px solid #F48A8A;\ -border-radius: 50%;\ -padding: 7px;\ -position: absolute;\ -right: -8px;\ -top: -8px;\ -z-index: 100000;\ -}\ -.ace_closeButton{\ -background: rgba(245, 146, 146, 0.9);\ -}\ -.ace_optionsMenuKey {\ -color: darkslateblue;\ -font-weight: bold;\ -}\ -.ace_optionsMenuCommand {\ -color: darkcyan;\ -font-weight: normal;\ -}\ -.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\ -vertical-align: middle;\ -}\ -.ace_optionsMenuEntry button[ace_selected_button=true] {\ -background: #e7e7e7;\ -box-shadow: 1px 0px 2px 0px #adadad inset;\ -border-color: #adadad;\ -}\ -.ace_optionsMenuEntry button {\ -background: white;\ -border: 1px solid lightgray;\ -margin: 0px;\ -}\ -.ace_optionsMenuEntry button:hover{\ -background: #f0f0f0;\ -}'; - dom.importCssString(cssText, 'settings_menu.css', false); - - module.exports.overlayPage = function overlayPage( - editor, - contentElement, - callback, - ) { - var closer = document.createElement('div'); - var mask = document.createElement('sapn'); - var ignoreFocusOut = false; - - function documentEscListener(e) { - if (e.keyCode === 27) { - close(); - } - } - - function mclose() { - if (!closer) return; - document.removeEventListener('keydown', documentEscListener); - closer.parentNode.removeChild(closer); - mask.parentNode.removeChild(mask); - if (editor) { - editor.focus(); - } - closer = null; - callback && callback(); - window.restoreTheme(); - } - - function close() { - actionStack.remove('pallete'); - mclose(); - } - - function setIgnoreFocusOut(ignore) { - ignoreFocusOut = ignore; - if (ignore) { - closer.style.pointerEvents = 'none'; - contentElement.style.pointerEvents = 'auto'; - } - } - - closer.className = 'ace_prompt_wrapper'; - mask.className = 'mask ace_prompt_mask'; - 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(); - } - }); - mask.addEventListener('click', close); - document.addEventListener('keydown', documentEscListener); - - contentElement.addEventListener('click', function (e) { - e.stopPropagation(); - }); - - closer.appendChild(contentElement); - document.body.appendChild(mask); - document.body.appendChild(closer); - window.restoreTheme(true); - - actionStack.push({ - id: 'pallete', - action: mclose, - }); - - 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 = function (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); - }; - 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_x86: ['asm|a'], - AutoHotKey: ['ahk'], - BatchFile: ['bat|cmd'], - 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'], - Crystal: ['cr'], - CSharp: ['cs'], - Csound_Document: ['csd'], - Csound_Orchestra: ['orc'], - Csound_Score: ['sco'], - CSS: ['css'], - Curly: ['curly'], - D: ['d|di'], - Dart: ['dart'], - Diff: ['diff|patch'], - Dockerfile: ['^Dockerfile'], - Dot: ['dot'], - Drools: ['drl'], - Edifact: ['edi'], - Eiffel: ['e|ge'], - EJS: ['ejs'], - Elixir: ['ex|exs'], - Elm: ['elm'], - Erlang: ['erl|hrl'], - 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|vue|we|wpy'], - HTML_Elixir: ['eex|html.eex'], - HTML_Ruby: ['erb|rhtml|html.erb'], - INI: ['ini|conf|cfg|prefs'], - Io: ['io'], - Jack: ['jack'], - Jade: ['jade|pug'], - Java: ['java'], - JavaScript: ['js|jsm|jsx'], - 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'], - LogiQL: ['logic|lql'], - 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'], - Nginx: ['nginx|conf'], - Nim: ['nim'], - Nix: ['nix'], - NSIS: ['nsi|nsh'], - Nunjucks: ['nunjucks|nunjs|nj|njk'], - ObjectiveC: ['m|mm'], - OCaml: ['ml|mli'], - 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'], - Powershell: ['ps1'], - Praat: ['praat|praatscript|psc|proc'], - Prisma: ['prisma'], - Prolog: ['plg|prolog'], - Properties: ['properties'], - Protobuf: ['proto'], - 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'], - RST: ['rst'], - Ruby: ['rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile'], - Rust: ['rs'], - 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'], - 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'], - Twig: ['twig|swig'], - Typescript: ['ts|typescript|str'], - Vala: ['vala'], - VBScript: ['vbs|vb'], - Velocity: ['vm'], - Verilog: ['v|vh|sv|svh'], - VHDL: ['vhd|vhdl'], - Visualforce: ['vfp|component|page'], - Wollok: ['wlk|wpgm|wtest'], - XML: ['xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml'], - XQuery: ['xq'], - YAML: ['yaml|yml'], - Zeek: ['zeek|bro'], - Django: ['html'], - }; - - 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/range', - 'ace/lib/dom', - 'ace/ext/menu_tools/get_editor_keyboard_shortcuts', - '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) { - 'use strict'; - - var Range = require('../range').Range; - var dom = require('../lib/dom'); - var shortcuts = require('../ext/menu_tools/get_editor_keyboard_shortcuts'); - 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 () { - var undoManager = editor.session.getUndoManager(); - 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'] = ' Recently used'; - otherCommands[0]['message'] = ' Other commands'; - } - - var completions = recentlyUsedCommands.concat(otherCommands); - return completions.length > 0 - ? completions - : [ - { - value: '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 {\ - max-width: 600px;\ - width: 100%;\ - margin: 20px auto;\ - padding: 3px;\ - background: white;\ - border-radius: 2px;\ - box-shadow: 0px 2px 3px 0px #555;\ -}', - '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; - } - }); -})(); diff --git a/src/ace/ext-rtl.js b/src/ace/ext-rtl.js deleted file mode 100644 index 39ebfd9d6..000000000 --- a/src/ace/ext-rtl.js +++ /dev/null @@ -1,122 +0,0 @@ -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/src/ace/ext-searchbox.js b/src/ace/ext-searchbox.js deleted file mode 100644 index 8be7e8c12..000000000 --- a/src/ace/ext-searchbox.js +++ /dev/null @@ -1,514 +0,0 @@ -define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) { -"use strict"; - -var dom = require("../lib/dom"); -var lang = require("../lib/lang"); -var event = require("../lib/event"); -var searchboxCss = "\ -.ace_search {\ -background-color: #ddd;\ -color: #666;\ -border: 1px solid #cbcbcb;\ -border-top: 0 none;\ -overflow: hidden;\ -margin: 0;\ -padding: 4px 6px 0 4px;\ -position: absolute;\ -top: 0;\ -z-index: 99;\ -white-space: normal;\ -}\ -.ace_search.left {\ -border-left: 0 none;\ -border-radius: 0px 0px 5px 0px;\ -left: 0;\ -}\ -.ace_search.right {\ -border-radius: 0px 0px 0px 5px;\ -border-right: 0 none;\ -right: 0;\ -}\ -.ace_search_form, .ace_replace_form {\ -margin: 0 20px 4px 0;\ -overflow: hidden;\ -line-height: 1.9;\ -}\ -.ace_replace_form {\ -margin-right: 0;\ -}\ -.ace_search_form.ace_nomatch {\ -outline: 1px solid red;\ -}\ -.ace_search_field {\ -border-radius: 3px 0 0 3px;\ -background-color: white;\ -color: black;\ -border: 1px solid #cbcbcb;\ -border-right: 0 none;\ -outline: 0;\ -padding: 0;\ -font-size: inherit;\ -margin: 0;\ -line-height: inherit;\ -padding: 0 6px;\ -min-width: 17em;\ -vertical-align: top;\ -min-height: 1.8em;\ -box-sizing: content-box;\ -}\ -.ace_searchbtn {\ -border: 1px solid #cbcbcb;\ -line-height: inherit;\ -display: inline-block;\ -padding: 0 6px;\ -background: #fff;\ -border-right: 0 none;\ -border-left: 1px solid #dcdcdc;\ -cursor: pointer;\ -margin: 0;\ -position: relative;\ -color: #666;\ -}\ -.ace_searchbtn:last-child {\ -border-radius: 0 3px 3px 0;\ -border-right: 1px solid #cbcbcb;\ -}\ -.ace_searchbtn:disabled {\ -background: none;\ -cursor: default;\ -}\ -.ace_searchbtn:hover {\ -background-color: #eef1f6;\ -}\ -.ace_searchbtn.prev, .ace_searchbtn.next {\ -padding: 0px 0.7em\ -}\ -.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\ -content: \"\";\ -border: solid 2px #888;\ -width: 0.5em;\ -height: 0.5em;\ -border-width: 2px 0 0 2px;\ -display:inline-block;\ -transform: rotate(-45deg);\ -}\ -.ace_searchbtn.next:after {\ -border-width: 0 2px 2px 0 ;\ -}\ -.ace_searchbtn_close {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\ -border-radius: 50%;\ -border: 0 none;\ -color: #656565;\ -cursor: pointer;\ -font: 16px/16px Arial;\ -padding: 0;\ -height: 14px;\ -width: 14px;\ -top: 9px;\ -right: 7px;\ -position: absolute;\ -}\ -.ace_searchbtn_close:hover {\ -background-color: #656565;\ -background-position: 50% 100%;\ -color: white;\ -}\ -.ace_button {\ -margin-left: 2px;\ -cursor: pointer;\ --webkit-user-select: none;\ --moz-user-select: none;\ --o-user-select: none;\ --ms-user-select: none;\ -user-select: none;\ -overflow: hidden;\ -opacity: 0.7;\ -border: 1px solid rgba(100,100,100,0.23);\ -padding: 1px;\ -box-sizing: border-box!important;\ -color: black;\ -}\ -.ace_button:hover {\ -background-color: #eee;\ -opacity:1;\ -}\ -.ace_button:active {\ -background-color: #ddd;\ -}\ -.ace_button.checked {\ -border-color: #3399ff;\ -opacity:1;\ -}\ -.ace_search_options{\ -margin-bottom: 3px;\ -text-align: right;\ --webkit-user-select: none;\ --moz-user-select: none;\ --o-user-select: none;\ --ms-user-select: none;\ -user-select: none;\ -clear: both;\ -}\ -.ace_search_counter {\ -float: left;\ -font-family: arial;\ -padding: 0 8px;\ -}"; -var HashHandler = require("../keyboard/hash_handler").HashHandler; -var keyUtil = require("../lib/keys"); - -var MAX_COUNT = 999; - -dom.importCssString(searchboxCss, "ace_searchbox", false); - -var SearchBox = function(editor, range, showReplaceForm) { - 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: "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"}, "All"] - ], - ["div", {class: "ace_replace_form"}, - ["input", {class: "ace_search_field", placeholder: "Replace with", spellcheck: "false"}], - ["span", {action: "replaceAndFindNext", class: "ace_searchbtn"}, "Replace"], - ["span", {action: "replaceAll", class: "ace_searchbtn"}, "All"] - ], - ["div", {class: "ace_search_options"}, - ["span", {action: "toggleReplace", class: "ace_button", 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: "RegExp Search"}, ".*"], - ["span", {action: "toggleCaseSensitive", class: "ace_button", title: "CaseSensitive Search"}, "Aa"], - ["span", {action: "toggleWholeWords", class: "ace_button", title: "Whole Word Search"}, "\\b"], - ["span", {action: "searchInSelection", class: "ace_button", 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); -}; - -(function() { - this.setEditor = function(editor) { - editor.searchBox = this; - editor.renderer.scroller.appendChild(this.element); - this.editor = editor; - }; - - this.setSession = function(e) { - this.searchRange = null; - this.$syncOptions(true); - }; - - this.$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"); - }; - - this.$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(); - }); - }; - this.$closeSearchBarKb = new HashHandler([{ - bindKey: "Esc", - name: "closeSearchBar", - exec: function(editor) { - editor.searchBox.hide(); - } - }]); - this.$searchBarKb = new HashHandler(); - this.$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(); - } - }); - - this.$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(); - } - }]); - - this.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; - } - }; - - this.$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); - }; - - this.highlight = function(re) { - this.editor.session.highlight(re || this.editor.$search.$options.re); - this.editor.renderer.updateBackMarkers(); - }; - this.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(); - }; - this.updateCounter = function() { - var editor = this.editor; - var regex = editor.$search.$options.re; - 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 += 1; - if (last >= value.length) - break; - } - } - } - this.searchCounter.textContent = before + " of " + (all > MAX_COUNT ? MAX_COUNT + "+" : all); - }; - this.findNext = function() { - this.find(true, false); - }; - this.findPrev = function() { - this.find(true, true); - }; - this.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(); - }; - this.replace = function() { - if (!this.editor.getReadOnly()) - this.editor.replace(this.replaceInput.value); - }; - this.replaceAndFindNext = function() { - if (!this.editor.getReadOnly()) { - this.editor.replace(this.replaceInput.value); - this.findNext(); - } - }; - this.replaceAll = function() { - if (!this.editor.getReadOnly()) - this.editor.replaceAll(this.replaceInput.value); - }; - - this.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(); - }; - this.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); - }; - - this.isFocused = function() { - var el = document.activeElement; - return el == this.searchInput || el == this.replaceInput; - }; -}).call(SearchBox.prototype); - -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/src/ace/ext-settings_menu.js b/src/ace/ext-settings_menu.js deleted file mode 100644 index 1d88965b6..000000000 --- a/src/ace/ext-settings_menu.js +++ /dev/null @@ -1,820 +0,0 @@ -define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -'use strict'; -var dom = require("../../lib/dom"); -var cssText = "#ace_settingsmenu, #kbshortcutmenu {\ -background-color: #F7F7F7;\ -color: black;\ -box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ -padding: 1em 0.5em 2em 1em;\ -overflow: auto;\ -position: absolute;\ -margin: 0;\ -bottom: 0;\ -right: 0;\ -top: 0;\ -z-index: 9991;\ -cursor: default;\ -}\ -.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ -box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ -background-color: rgba(255, 255, 255, 0.6);\ -color: black;\ -}\ -.ace_optionsMenuEntry:hover {\ -background-color: rgba(100, 100, 100, 0.1);\ -transition: all 0.3s\ -}\ -.ace_closeButton {\ -background: rgba(245, 146, 146, 0.5);\ -border: 1px solid #F48A8A;\ -border-radius: 50%;\ -padding: 7px;\ -position: absolute;\ -right: -8px;\ -top: -8px;\ -z-index: 100000;\ -}\ -.ace_closeButton{\ -background: rgba(245, 146, 146, 0.9);\ -}\ -.ace_optionsMenuKey {\ -color: darkslateblue;\ -font-weight: bold;\ -}\ -.ace_optionsMenuCommand {\ -color: darkcyan;\ -font-weight: normal;\ -}\ -.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\ -vertical-align: middle;\ -}\ -.ace_optionsMenuEntry button[ace_selected_button=true] {\ -background: #e7e7e7;\ -box-shadow: 1px 0px 2px 0px #adadad inset;\ -border-color: #adadad;\ -}\ -.ace_optionsMenuEntry button {\ -background: white;\ -border: 1px solid lightgray;\ -margin: 0px;\ -}\ -.ace_optionsMenuEntry button:hover{\ -background: #f0f0f0;\ -}"; -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 = function(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); -}; -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_x86:["asm|a"], - AutoHotKey: ["ahk"], - BatchFile: ["bat|cmd"], - 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"], - Crystal: ["cr"], - CSharp: ["cs"], - Csound_Document: ["csd"], - Csound_Orchestra: ["orc"], - Csound_Score: ["sco"], - CSS: ["css"], - Curly: ["curly"], - D: ["d|di"], - Dart: ["dart"], - Diff: ["diff|patch"], - Dockerfile: ["^Dockerfile"], - Dot: ["dot"], - Drools: ["drl"], - Edifact: ["edi"], - Eiffel: ["e|ge"], - EJS: ["ejs"], - Elixir: ["ex|exs"], - Elm: ["elm"], - Erlang: ["erl|hrl"], - 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|vue|we|wpy"], - HTML_Elixir: ["eex|html.eex"], - HTML_Ruby: ["erb|rhtml|html.erb"], - INI: ["ini|conf|cfg|prefs"], - Io: ["io"], - Jack: ["jack"], - Jade: ["jade|pug"], - Java: ["java"], - JavaScript: ["js|jsm|jsx"], - 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"], - LogiQL: ["logic|lql"], - 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"], - Nginx: ["nginx|conf"], - Nim: ["nim"], - Nix: ["nix"], - NSIS: ["nsi|nsh"], - Nunjucks: ["nunjucks|nunjs|nj|njk"], - ObjectiveC: ["m|mm"], - OCaml: ["ml|mli"], - 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"], - Powershell: ["ps1"], - Praat: ["praat|praatscript|psc|proc"], - Prisma: ["prisma"], - Prolog: ["plg|prolog"], - Properties: ["properties"], - Protobuf: ["proto"], - 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"], - RST: ["rst"], - Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], - Rust: ["rs"], - 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"], - 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"], - Twig: ["twig|swig"], - Typescript: ["ts|typescript|str"], - Vala: ["vala"], - VBScript: ["vbs|vb"], - Velocity: ["vm"], - Verilog: ["v|vh|sv|svh"], - VHDL: ["vhd|vhdl"], - Visualforce: ["vfp|component|page"], - Wollok: ["wlk|wpgm|wtest"], - XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], - XQuery: ["xq"], - YAML: ["yaml|yml"], - Zeek: ["zeek|bro"], - Django: ["html"] -}; - -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) { -"use strict"; - -var themeData = [ - ["Chrome" ], - ["Clouds" ], - ["Crimson Editor" ], - ["Dawn" ], - ["Dreamweaver" ], - ["Eclipse" ], - ["GitHub" ], - ["IPlastic" ], - ["Solarized Light"], - ["TextMate" ], - ["Tomorrow" ], - ["Xcode" ], - ["Kuroir"], - ["KatzenMilch"], - ["SQL Server" ,"sqlserver" , "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"] -]; - - -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" - }, - "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" - } - } -}; - - -var OptionPanel = function(editor, element) { - this.editor = editor; - this.container = element || document.createElement("div"); - this.groups = []; - this.options = {}; -}; - -(function() { - - oop.implement(this, EventEmitter); - - this.add = function(config) { - if (config.Main) - oop.mixin(optionGroups.Main, config.Main); - if (config.More) - oop.mixin(optionGroups.More, config.More); - }; - - this.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); - }; - - this.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); - }; - - this.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; - }; - - this.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]]; - }; - - this.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}); - }; - - this.getOption = function(option) { - if (option.getValue) - return option.getValue(); - return this.editor.getOption(option.path); - }; - -}).call(OptionPanel.prototype); - -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) { -"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/src/ace/ext-spellcheck.js b/src/ace/ext-spellcheck.js deleted file mode 100644 index 10d3901f4..000000000 --- a/src/ace/ext-spellcheck.js +++ /dev/null @@ -1,73 +0,0 @@ -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/src/ace/ext-split.js b/src/ace/ext-split.js deleted file mode 100644 index ca286bce8..000000000 --- a/src/ace/ext-split.js +++ /dev/null @@ -1,207 +0,0 @@ -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 = 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/src/ace/ext-static_highlight.js b/src/ace/ext-static_highlight.js deleted file mode 100644 index 93b0840b3..000000000 --- a/src/ace/ext-static_highlight.js +++ /dev/null @@ -1,229 +0,0 @@ -define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","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 = ".ace_static_highlight {\ -font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;\ -font-size: 12px;\ -white-space: pre-wrap\ -}\ -.ace_static_highlight .ace_gutter {\ -width: 2em;\ -text-align: right;\ -padding: 0 3px 0 0;\ -margin-right: 3px;\ -contain: none;\ -}\ -.ace_static_highlight.ace_show_gutter .ace_line {\ -padding-left: 2.6em;\ -}\ -.ace_static_highlight .ace_line { position: relative; }\ -.ace_static_highlight .ace_gutter-cell {\ --moz-user-select: -moz-none;\ --khtml-user-select: none;\ --webkit-user-select: none;\ -user-select: none;\ -top: 0;\ -bottom: 0;\ -left: 0;\ -position: absolute;\ -}\ -.ace_static_highlight .ace_gutter-cell:before {\ -content: counter(ace_line, decimal);\ -counter-increment: ace_line;\ -}\ -.ace_static_highlight {\ -counter-reset: ace_line;\ -}\ -"; -var config = require("../config"); -var dom = require("../lib/dom"); -var escapeHTML = require("../lib/lang").escapeHTML; - -function Element(type) { - 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(""); -}; - - -var simpleDom = { - createTextNode: function(textContent, element) { - return escapeHTML(textContent); - }, - createElement: function(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"); - 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[mode] || modeOptions) - modeCache[mode] = new m.Mode(modeOptions); - mode = modeCache[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/src/ace/ext-statusbar.js b/src/ace/ext-statusbar.js deleted file mode 100644 index 936cc4fd9..000000000 --- a/src/ace/ext-statusbar.js +++ /dev/null @@ -1,56 +0,0 @@ -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 = function(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); -}; - -(function(){ - this.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(""); - }; -}).call(StatusBar.prototype); - -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/src/ace/ext-textarea.js b/src/ace/ext-textarea.js deleted file mode 100644 index c4bc96bdd..000000000 --- a/src/ace/ext-textarea.js +++ /dev/null @@ -1,430 +0,0 @@ -define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace"], function(require, exports, module) { -"use strict"; - -var event = require("../lib/event"); -var UA = require("../lib/useragent"); -var net = require("../lib/net"); -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.setAttribute('style', 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 load(url, module, callback) { - net.loadScript(url, function() { - require([module], callback); - }); -} - -function setupApi(editor, editorDiv, settingDiv, ace, options) { - var session = editor.getSession(); - var renderer = editor.renderer; - - 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/src/ace/ext-themelist.js b/src/ace/ext-themelist.js deleted file mode 100644 index e8a8ea897..000000000 --- a/src/ace/ext-themelist.js +++ /dev/null @@ -1,67 +0,0 @@ -define("ace/ext/themelist",["require","exports","module"], function(require, exports, module) { -"use strict"; - -var themeData = [ - ["Chrome" ], - ["Clouds" ], - ["Crimson Editor" ], - ["Dawn" ], - ["Dreamweaver" ], - ["Eclipse" ], - ["GitHub" ], - ["IPlastic" ], - ["Solarized Light"], - ["TextMate" ], - ["Tomorrow" ], - ["Xcode" ], - ["Kuroir"], - ["KatzenMilch"], - ["SQL Server" ,"sqlserver" , "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"] -]; - - -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/src/ace/ext-whitespace.js b/src/ace/ext-whitespace.js deleted file mode 100644 index f6d459300..000000000 --- a/src/ace/ext-whitespace.js +++ /dev/null @@ -1,213 +0,0 @@ -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/src/ace/keybinding-emacs.js b/src/ace/keybinding-emacs.js deleted file mode 100644 index 07ffa85cd..000000000 --- a/src/ace/keybinding-emacs.js +++ /dev/null @@ -1,1169 +0,0 @@ -define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var Range = require("./range").Range; -var Search = require("./search").Search; -var EditSession = require("./edit_session").EditSession; -var SearchHighlight = require("./search_highlight").SearchHighlight; -function Occur() {} - -oop.inherits(Occur, Search); - -(function() { - this.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; - }; - this.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; - }; - - this.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 - }; - - this.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'); - }; - - this.displayOriginalContent = function(editor) { - editor.setSession(this.$originalSession); - this.$originalSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart; - }; - this.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; - }; - this.occurToOriginalPosition = function(session, pos) { - var lines = session.$occurMatchingLines; - if (!lines || !lines[pos.row]) - return pos; - return {row: lines[pos.row].row, column: pos.column}; - }; - - this.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)}); - }, []); - }; - -}).call(Occur.prototype); - -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/lib/oop","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 oop = require("./lib/oop"); -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 IncrementalSearch() { - this.$options = {wrap: false, skipCurrent: false}; - this.$keyboardHandler = new ISearchKbd(this); -} - -oop.inherits(IncrementalSearch, Search); - -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); -} - -(function() { - - this.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); - }; - - this.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(''); - }; - - this.selectionFix = function(editor) { - if (editor.selection.isEmpty() && !editor.session.$emacsMark) { - editor.clearSelection(); - } - }; - - this.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 - }; - - this.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); - }; - - this.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; - }; - - this.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); - }); - }; - - this.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); - }); - }; - - this.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; - }); - }; - - this.onMouseDown = function(evt) { - this.deactivate(); - return true; - }; - - this.onPaste = function(text) { - this.addString(text); - }; - - this.convertNeedleToRegExp = function() { - return this.highlightAndFindWithNeedle(false, function(needle) { - return isRegExp(needle) ? needle : stringToRegExp(needle, 'ig'); - }); - }; - - this.convertNeedleToString = function() { - return this.highlightAndFindWithNeedle(false, function(needle) { - return isRegExp(needle) ? regExpToObject(needle).expression : needle; - }); - }; - - this.statusMessage = function(found) { - var options = this.$options, msg = ''; - msg += options.backwards ? 'reverse-' : ''; - msg += 'isearch: ' + options.needle; - msg += found ? '' : ' (not found)'; - this.message(msg); - }; - - this.message = function(msg) { - if (this.$editor.showCommandLine) { - this.$editor.showCommandLine(msg); - this.$editor.focus(); - } - }; - -}).call(IncrementalSearch.prototype); - - -exports.IncrementalSearch = IncrementalSearch; - -var dom = require('./lib/dom'); -dom.importCssString("\ -.ace_marker-layer .ace_isearch-result {\ - position: absolute;\ - z-index: 6;\ - box-sizing: border-box;\ -}\ -div.ace_isearch-result {\ - border-radius: 4px;\ - background-color: rgba(255, 200, 0, 0.5);\ - box-shadow: 0 0 4px rgb(255, 200, 0);\ -}\ -.ace_dark div.ace_isearch-result {\ - background-color: rgb(100, 110, 160);\ - box-shadow: 0 0 4px rgb(80, 90, 140);\ -}", "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"; - -var initialized = false; -var $formerLongWords; -var $formerLineStart; - -exports.handler.attach = function(editor) { - if (!initialized) { - initialized = true; - dom.importCssString('\ - .emacs-mode .ace_cursor{\ - border: 1px rgba(50,250,50,0.8) solid!important;\ - box-sizing: border-box!important;\ - background-color: rgba(0,250,0,0.9);\ - opacity: 0.5;\ - }\ - .emacs-mode .ace_hidden-cursors .ace_cursor{\ - opacity: 1;\ - background-color: transparent;\ - }\ - .emacs-mode .ace_overwrite-cursors .ace_cursor {\ - opacity: 1;\ - background-color: transparent;\ - border-width: 0 0 2px 2px !important;\ - }\ - .emacs-mode .ace_text-layer {\ - z-index: 4\ - }\ - .emacs-mode .ace_cursor-layer {\ - z-index: 2\ - }', 'emacsMode' - ); - } - $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) - this.session.$emacsMarkRing.push(prevMark); - if (!p || activate) this.setEmacsMark(p); - else this.session.$emacsMarkRing.push(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); -}; - -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/src/ace/keybinding-sublime.js b/src/ace/keybinding-sublime.js deleted file mode 100644 index 21fcb3803..000000000 --- a/src/ace/keybinding-sublime.js +++ /dev/null @@ -1,422 +0,0 @@ -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/src/ace/keybinding-vim.js b/src/ace/keybinding-vim.js deleted file mode 100644 index 09cba0906..000000000 --- a/src/ace/keybinding-vim.js +++ /dev/null @@ -1,6198 +0,0 @@ -define("ace/ext/hardwrap",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -function hardWrap(editor, options) { - var max = options.column || editor.getOption("printMarginColumn"); - - 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) { - session.replace(new Range(row,space.start,row,space.end), "\n"); - } - endRow++; - } else if (/\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--; - } - } - } - 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[3].length - }; - } - - } - -} - -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) { - '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 dom = 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.$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"); } - }; - 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]; - 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) { - - }; - - 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) { - 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 = false; - 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 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 sel = this.ace.selection; - if (this.ace.inVirtualSelectionMode) { - this.ace.session.replace(sel.getRange(), p[0] || ""); - 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], p[i] || ""); - 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, 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; - } - 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.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); - } - 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 (name == "indentAuto") this.ace.execCommand("autoindent"); - else console.log(name + " is not implemented"); - }; - this.getLineNumber = function(handle) { - return handle.row; - } - this.getLineHandle = function(row) { - return {text: this.ace.session.getLine(row), row: row}; - } -}).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; -}; -dom.importCssString(".normal-mode .ace_cursor{\ - border: none;\ - background-color: rgba(255,0,0,0.5);\ -}\ -.normal-mode .ace_hidden-cursors .ace_cursor{\ - background-color: transparent;\ - border: 1px solid red;\ - opacity: 0.7\ -}\ -.ace_dialog {\ - position: absolute;\ - left: 0; right: 0;\ - background: inherit;\ - z-index: 15;\ - padding: .1em .8em;\ - overflow: hidden;\ - color: inherit;\ -}\ -.ace_dialog-top {\ - border-bottom: 1px solid #444;\ - top: 0;\ -}\ -.ace_dialog-bottom {\ - border-top: 1px solid #444;\ - bottom: 0;\ -}\ -.ace_dialog input {\ - border: none;\ - outline: none;\ - background: transparent;\ - width: 20em;\ - color: inherit;\ - font-family: monospace;\ -}", "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; - } - - me.state.dialog = null; - closed = true; - dialog.parentNode.removeChild(dialog); - me.focus(); - - 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)) { - inp.blur(); - 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.parentNode.removeChild(dialog); - } - - CodeMirror.on(dialog, 'click', function(e) { - CodeMirror.e_preventDefault(e); - close(); - }); - - if (duration) - doneTimer = setTimeout(close, duration); - - return close; - }); -})(); - - - var defaultKeymap = [ - { keys: '', type: 'keyToKey', toKeys: 'h' }, - { keys: '', type: 'keyToKey', toKeys: 'l' }, - { keys: '', type: 'keyToKey', toKeys: 'k' }, - { keys: '', type: 'keyToKey', toKeys: 'j' }, - { keys: '', type: 'keyToKey', toKeys: 'l' }, - { keys: '', type: 'keyToKey', toKeys: 'h', context: 'normal'}, - { keys: '', type: 'keyToKey', toKeys: 'x', context: 'normal'}, - { keys: '', type: 'keyToKey', toKeys: 'W' }, - { keys: '', type: 'keyToKey', toKeys: 'B', context: 'normal' }, - { keys: '', type: 'keyToKey', toKeys: 'w' }, - { keys: '', type: 'keyToKey', toKeys: 'b', context: 'normal' }, - { 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: '' }, // ace_patch 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: '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: '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: '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: '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: '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: 'z-', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }}, - { keys: 'zb', 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: 'unmap' }, - { 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: 'nohlsearch', shortName: 'noh' }, - { name: 'yank', shortName: 'y' }, - { name: 'delmarks', shortName: 'delm' }, - { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true }, - { name: 'vglobal', shortName: 'v' }, - { name: 'global', shortName: 'g' } - ]; - - var Pos = CodeMirror.Pos; - - var Vim = function() { return vimApi; } //{ - 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; - } - function detachVimMap(cm, next) { - if (this == CodeMirror.keyMap.vim) - CodeMirror.rmClass(cm.getWrapperElement(), "cm-fat-cursor"); - - if (!next || next.attach != attachVimMap) - leaveVimMode(cm); - } - function attachVimMap(cm, prev) { - if (this == CodeMirror.keyMap.vim) - CodeMirror.addClass(cm.getWrapperElement(), "cm-fat-cursor"); - - if (!prev || prev.attach != attachVimMap) - enterVimMode(cm); - } - CodeMirror.defineOption('vimMode', false, function(cm, val, prev) { - if (val && cm.getOption("keyMap") != "vim") - cm.setOption("keyMap", "vim"); - else if (!val && prev != CodeMirror.Init && /^vim/.test(cm.getOption("keyMap"))) - cm.setOption("keyMap", "default"); - }); - - function cmKey(key, cm) { - if (!cm) { return undefined; } - if (this[key]) { return this[key]; } - var vimKey = cmKeyToVimKey(key); - if (!vimKey) { - return false; - } - var cmd = CodeMirror.Vim.findKey(cm, vimKey); - if (typeof cmd == 'function') { - CodeMirror.signal(cm, 'vim-keypress', vimKey); - } - return cmd; - } - - var modifiers = {Shift:'S',Ctrl:'C',Alt:'A',Cmd:'D',Mod:'A',CapsLock:''}; - var specialKeys = {Enter:'CR',Backspace:'BS',Delete:'Del',Insert:'Ins'}; - function cmKeyToVimKey(key) { - if (key.charAt(0) == '\'') { - return key.charAt(1); - } - var pieces = key.split(/-(?!$)/); - var lastPiece = pieces[pieces.length - 1]; - if (pieces.length == 1 && pieces[0].length == 1) { - return false; - } else if (pieces.length == 2 && pieces[0] == 'Shift' && lastPiece.length == 1) { - return false; - } - var hasCharacter = false; - for (var i = 0; i < pieces.length; i++) { - var piece = pieces[i]; - if (piece in modifiers) { pieces[i] = modifiers[piece]; } - else { hasCharacter = true; } - if (piece in specialKeys) { pieces[i] = specialKeys[piece]; } - } - if (!hasCharacter) { - return false; - } - if (isUpperCase(lastPiece)) { - pieces[pieces.length - 1] = lastPiece.toLowerCase(); - } - return '<' + pieces.join('-') + '>'; - } - - 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); - }]; - function makeKeyRange(start, size) { - var keys = []; - for (var i = start; i < start + size; i++) { - keys.push(String.fromCharCode(i)); - } - return keys; - } - var upperCaseAlphabet = makeKeyRange(65, 26); - var lowerCaseAlphabet = makeKeyRange(97, 26); - var numbers = makeKeyRange(48, 10); - var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']); - var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"', '.', ':', '_', '/']); - 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); - } - }); - - 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) { - this.onRecordingDone = cm.openDialog( - document.createTextNode('(recording)['+registerName+']'), 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: {}, - fakeCursor: null, - insertMode: false, - insertModeRepeat: undefined, - visualMode: false, - visualLine: false, - visualBlock: false, - lastSelection: null, - lastPastedText: null, - sel: {}, - options: {} - }; - } - 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= { - 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) { - exCommandDispatcher.unmap(lhs, ctx); - }, - noremap: function(lhs, rhs, ctx) { - function toCtxArray(ctx) { - return ctx ? [ctx] : ['normal', 'insert', 'visual']; - } - var ctxsToMap = toCtxArray(ctx); - var actualLength = defaultKeymap.length, origLength = defaultKeymapLength; - for (var i = actualLength - origLength; - i < actualLength && ctxsToMap.length; - i++) { - var mapping = defaultKeymap[i]; - if (mapping.keys == rhs && - (!ctx || !mapping.context || mapping.context === ctx) && - mapping.type.substr(0, 2) !== 'ex' && - mapping.type.substr(0, 3) !== 'key') { - var newMapping = {}; - for (var key in mapping) { - newMapping[key] = mapping[key]; - } - newMapping.keys = lhs; - if (ctx && !newMapping.context) { - newMapping.context = ctx; - } - this._mapCommand(newMapping); - var mappedCtxs = toCtxArray(mapping.context); - ctxsToMap = ctxsToMap.filter(function(el) { return mappedCtxs.indexOf(el) === -1; }); - } - } - }, - 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); - } - } - } - } - } - } - }, - 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(); - } - }, - 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 == '') { - clearInputState(cm); - if (vim.visualMode) { - exitVisualMode(cm); - } else if (vim.insertMode) { - exitInsertMode(cm); - } - return true; - } - } - function doKeyToKey(keys) { - var match; - while (keys) { - match = (/<\w+-.+?>|<\w+>|./).exec(keys); - key = match[0]; - keys = keys.substring(match.index + key.length); - CodeMirror.Vim.handleKey(cm, key, 'mapping'); - } - } - - function handleKeyInsertMode() { - if (handleEsc()) { return true; } - var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key; - var keysAreChars = key.length == 1; - var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); - while (keys.length > 1 && match.type != 'full') { - var keys = vim.inputState.keyBuffer = keys.slice(1); - var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); - if (thisMatch.type != 'none') { match = thisMatch; } - } - if (match.type == 'none') { clearInputState(cm); return false; } - else if (match.type == 'partial') { - if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); } - lastInsertModeKeyTimer = window.setTimeout( - function() { if (vim.insertMode && vim.inputState.keyBuffer) { clearInputState(cm); } }, - getOption('insertModeEscKeysTimeout')); - return !keysAreChars; - } - - if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); } - if (keysAreChars) { - var selections = cm.listSelections(); - for (var i = 0; i < selections.length; i++) { - var here = selections[i].head; - cm.replaceRange('', offsetCursor(here, 0, -(keys.length - 1)), here, '+input'); - } - vimGlobalState.macroModeState.lastInsertModeChanges.changes.pop(); - } - clearInputState(cm); - return match.command; - } - - function handleKeyNonInsertMode() { - if (handleMacroRecording() || handleEsc()) { return true; } - - var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key; - 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') { return true; } - - vim.inputState.keyBuffer = ''; - var 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 undefined; //ace_patch - } 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(command.toKeys); - } else { - commandDispatcher.processCommand(cm, vim, command); - } - } catch (e) { - cm.state.vim = undefined; - maybeInitVimState(cm); - if (!CodeMirror.Vim.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 - }; - 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. - } - 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(); - CodeMirror.signal(cm, 'vim-command-done', reason); - } - 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(); - } - 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); - } - 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); - }, - 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'}; - } - - 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) == '') { - var character = lastChar(keys); - if (//.test(character) || !character) return {type: 'none'}; //ace_patch - 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 = CodeMirror.keyName(e), up, offset; - if (keyName == 'Up' || keyName == 'Down') { - up = keyName == 'Up' ? 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 != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') - 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 = CodeMirror.keyName(e); - if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' || - (keyName == 'Backspace' && 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 == 'Up' || keyName == 'Down') { - CodeMirror.e_stop(e); - } else if (keyName == 'Ctrl-U') { - 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, false /** inclusive */, - true /** forward */, false /** bigWord */, - true /** noSymbol */); - var isKeyword = true; - if (!word) { - word = expandWordUnderCursor(cm, false /** inclusive */, - true /** forward */, false /** bigWord */, - false /** noSymbol */); - isKeyword = false; - } - if (!word) { - 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); - } - function onPromptKeyDown(e, input, close) { - var keyName = CodeMirror.keyName(e), up, offset; - if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' || - (keyName == 'Backspace' && input == '')) { - vimGlobalState.exCommandHistoryController.pushInput(input); - vimGlobalState.exCommandHistoryController.reset(); - CodeMirror.e_stop(e); - clearInputState(cm); - close(); - cm.focus(); - } - if (keyName == 'Up' || keyName == 'Down') { - CodeMirror.e_stop(e); - up = keyName == 'Up' ? 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 == 'Ctrl-U') { - CodeMirror.e_stop(e); - close(''); - } else { - if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') - 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); - } - 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) { - newHead = clipCursorToContent(cm, newHead); - 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 = Pos(oldAnchor.line + lineOffset, oldAnchor.ch); - } else if (lastSel.visualBlock) { - newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset); - } else if (lastSel.head.line == lastSel.anchor.line) { - newHead = Pos(oldAnchor.line, oldAnchor.ch + chOffset); - } else { - newHead = 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'; - cmSel = makeCmSelection(cm, { - anchor: curStart, - head: curEnd - }, 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 = 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; - cmSel = makeCmSelection(cm, { - anchor: curStart, - head: curEnd - }, 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 Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); - }, - moveToMiddleLine: function(cm) { - var range = getUserVisibleLines(cm); - var line = Math.floor((range.top + range.bottom) * 0.5); - return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); - }, - moveToBottomLine: function(cm, _head, motionArgs) { - var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1; - return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); - }, - expandToLine: function(_cm, head, motionArgs) { - var cur = head; - return 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 = 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, Pos(sel.anchor.line, sel.head.ch)), - clipCursorToContent(cm, 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 = 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 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(Pos(line, endCh),'div').left; - return 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(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; - var 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); - 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; - }, - 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 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(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(Pos(line, ch+1), {bracketRegex: re}); - return matched.to; - } else { - return cursor; - } - }, - moveToStartOfLine: function(_cm, head) { - return 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 Pos(lineNum, - findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum))); - }, - 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; - if (mirroredPairs[character]) { - tmp = selectCompanionObject(cm, head, character, inclusive); - } else if (selfPaired[character]) { - tmp = findBeginningAndEnd(cm, head, character, inclusive); - } else if (character === 'W') { - tmp = expandWordUnderCursor(cm, inclusive, true /** forward */, - true /** bigWord */); - } else if (character === 'w') { - tmp = expandWordUnderCursor(cm, inclusive, true /** forward */, - false /** bigWord */); - } 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 { - return null; - } - - if (!cm.state.vim.visualMode) { - return [tmp.start, tmp.end]; - } else { - return expandSelection(cm, tmp.start, tmp.end); - } - }, - - 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); - } - } - var prevLineEnd = new Pos(anchor.line - 1, Number.MAX_VALUE); - var wasLastLine = cm.firstLine() == cm.lastLine(); - if (head.line > cm.lastLine() && args.linewise && !wasLastLine) { - cm.replaceRange('', prevLineEnd, head); - } else { - cm.replaceRange('', anchor, head); - } - if (args.linewise) { - if (!wasLastLine) { - cm.setCursor(prevLineEnd); - CodeMirror.commands.newlineAndIndent(cm); - } - anchor.ch = Number.MAX_VALUE; - } - 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 = 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 = 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; - 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) { - if (ranges.length > 1) { - cm.setSelection(ranges[0].anchor, ranges[ranges.length - 1].head); - } - cm.execCommand("indentAuto"); - return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor); - }, - 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(Pos(lineNum, 0), 'local'); - var height = cm.getScrollInfo().clientHeight; - var y = charCoords.top; - var lineHeight = charCoords.bottom - y; - switch (actionArgs.position) { - case 'center': y = y - (height / 2) + lineHeight; - break; - case 'bottom': 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 = Pos(head.line, lineLength(cm, head.line)); - } else if (insertAt == 'bol') { - head = Pos(head.line, 0); - } else if (insertAt == 'charAfter') { - head = offsetCursor(head, 0, 1); - } else if (insertAt == 'firstNonBlank') { - head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head); - } else if (insertAt == 'startOfSelectedArea') { - if (!vim.visualMode) - return; - if (!vim.visualBlock) { - if (sel.head.line < sel.anchor.line) { - head = sel.head; - } else { - head = Pos(sel.anchor.line, 0); - } - } else { - head = 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 = Pos(sel.anchor.line, 0); - } - } else { - head = Pos( - Math.min(sel.head.line, sel.anchor.line), - Math.max(sel.head.ch + 1, sel.anchor.ch)); - 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); - 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, Pos(anchor.line, anchor.ch + repeat - 1)); - vim.sel = { - anchor: anchor, - head: head - }; - 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, Pos(curStart.line + repeat - 1, - Infinity)); - } - var finalCh = 0; - for (var i = curStart.line; i < curEnd.line; i++) { - finalCh = lineLength(cm, curStart.line); - var tmp = Pos(curStart.line + 1, - lineLength(cm, curStart.line + 1)); - var text = cm.getRange(curStart, tmp); - text = actionArgs.keepSpaces - ? text.replace(/\n\r?/g, '') - : text.replace(/\n\s*/g, ' '); - cm.replaceRange(text, curStart, tmp); - } - var curFinalPos = 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', 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 cur = copyCursor(cm.getCursor()); - var register = vimGlobalState.registerController.getRegister( - actionArgs.registerName); - var text = register.toString(); - 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; - var idx; - 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 = 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', Pos(line, 0)); - } - var lastCh = lineLength(cm, line); - if (lastCh < cur.ch) { - extendLineToColumn(cm, line, cur.ch); - } - } - cm.setCursor(cur); - selectBlock(cm, Pos(cur.line + text.length-1, cur.ch)); - cm.replaceSelections(text); - curPosFinal = cur; - } else { - cm.replaceRange(text, cur); - if (linewise && actionArgs.after) { - curPosFinal = Pos( - cur.line + 1, - findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1))); - } else if (linewise && !actionArgs.after) { - curPosFinal = Pos( - cur.line, - findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line))); - } else if (!linewise && actionArgs.after) { - idx = cm.indexFromPos(cur); - curPosFinal = cm.posFromIndex(idx + text.length - 1); - } else { - idx = cm.indexFromPos(cur); - curPosFinal = cm.posFromIndex(idx + text.length); - } - } - } - 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(cm.getCursor('anchor')); - }); - }, - redo: function(cm, actionArgs) { - repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)(); - }, - setRegister: function(_cm, actionArgs, vim) { - vim.inputState.registerName = actionArgs.selectedCharacter; - }, - 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 = Pos(curStart.line, replaceTo); - } - 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(/[^\n]/g, replaceWith); - if (vim.visualBlock) { - var spaces = new Array(cm.getOption("tabSize")+1).join(' '); - replaceWithStr = cm.getSelection(); - 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 = Pos(cur.line, start); - var to = Pos(cur.line, end); - cm.replaceRange(numberStr, from, to); - } else { - return; - } - cm.setCursor(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) { - var vim = cm.state.vim; - var includeLineBreak = vim.insertMode || vim.visualMode; - var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() ); - var maxCh = lineLength(cm, line) - 1 + !!includeLineBreak; - var ch = Math.min(Math.max(0, cur.ch), maxCh); - return 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 Pos(cur.line + offsetLine, cur.ch + offsetCh); - } - function commandMatches(keys, keyMap, context, inputState) { - var match, partial = [], full = []; - for (var i = 0; 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) { - if (mapped.slice(-11) == '') { - var prefixLen = mapped.length - 11; - 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 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(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 = Pos(selectionStart.line + height, selectionStart.ch + width); - var selections = []; - for (var i = selectionStart.line; i < selectionEnd.line; i++) { - var anchor = Pos(i, selectionStart.ch); - var head = 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 = Pos(selectionStart.line, 0); - selectionEnd = 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) { - var sel = cm.state.vim.sel; - var head = sel.head; - var anchor = 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 = 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); - updateFakeCursor(cm); - } - 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), - left = Math.min(anchor.ch, head.ch), - bottom = Math.max(anchor.line, head.line), - right = Math.max(anchor.ch, head.ch) + 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: Pos(top + i, left), - head: Pos(top + i, right) - }); - } - 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"}); - clearFakeCursor(vim); - } - 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, inclusive, _forward, bigWord, noSymbol) { - var cur = getHead(cm); - var line = cm.getLine(cur.line); - var idx = cur.ch; - var test = noSymbol ? wordCharTest[0] : bigWordCharTest [0]; - while (!test(line.charAt(idx))) { - idx++; - if (idx >= line.length) { return null; } - } - - 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(end)) && end < line.length) { end++; } - while (test(line.charAt(start)) && start >= 0) { start--; } - start++; - - if (inclusive) { - var wordEnd = end; - while (/\s/.test(line.charAt(end)) && end < line.length) { end++; } - if (wordEnd == end) { - var wordStart = start; - while (/\s/.test(line.charAt(start - 1)) && start > 0) { start--; } - if (!start) { start = wordStart; } - } - } - return { start: Pos(cur.line, start), end: Pos(cur.line, 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 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 = 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 Pos(lastWord.line, lastWord.from); - } else if (forward && wordEnd) { - return Pos(lastWord.line, lastWord.to - 1); - } else if (!forward && wordEnd) { - if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) { - lastWord = words.pop(); - } - return Pos(lastWord.line, lastWord.to); - } else { - return Pos(lastWord.line, lastWord.from); - } - } - - function moveToEol(cm, head, motionArgs, vim, keepHPos) { - var cur = head; - var retval= 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) { - var cur = 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 Pos(cm.getCursor().line, idx); - } - - function moveToColumn(cm, repeat) { - var line = cm.getCursor().line; - return clipCursorToContent(cm, Pos(line, repeat - 1)); - } - - function updateMark(cm, vim, markName, pos) { - if (!inArray(markName, validMarks)) { - 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 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 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(Pos(cur.line, cur.ch + offset), -1, undefined, {'bracketRegex': bracketRegexp}); - end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, undefined, {'bracketRegex': bracketRegexp}); - - if (!start || !end) { - return { start: cur, end: cur }; - } - - 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) { - 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: Pos(cur.line, start), - end: 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 hdom(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 = hdom('span', {$color: 'red', $whiteSpace: 'pre'}, template); //ace_patch span instead of pre - if (cm.openNotification) { - cm.openNotification(pre, {bottom: true, duration: 5000}); - } else { - alert(pre.innerText); - } - } - - function makePrompt(prefix, desc) { - return hdom(document.createDocumentFragment(), - hdom('span', {$fontFamily: 'monospace', $whiteSpace: 'pre'}, - prefix, - hdom('input', {type: 'text', autocorrect: 'off', - autocapitalize: 'off', spellcheck: 'false'})), - desc && hdom('span', {$color: '#888'}, desc)); - } - - function showPrompt(cm, options) { - var shortText = (options.prefix || '') + ' ' + (options.desc || ''); - 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 { - 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 - }; - } - function highlightSearchMatches(cm, query) { - var searchState = getSearchState(cm); - 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); - } - } - 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) ? Pos(cm.lastLine()) : 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) ? Pos(cm.lastLine()) : Pos(cm.firstLine(), 0) ); - if (!cursor.find(prev)) { - return; - } - } - } - return [cursor.from(), cursor.to()]; - }); - } - function clearSearchHighlight(cm) { - var state = getSearchState(cm); - 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) || Pos(0, 0); - } else if (markName == '.') { - return getLastEditPos(cm); - } - - var mark = vim.marks[markName]; - return mark && mark.find(); - } - - function getLastEditPos(cm) { - var undoManager = cm.ace.session.$undoManager; - if (undoManager && undoManager.$lastDelta) - return toCmPos(undoManager.$lastDelta.end); - } - - 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(); - if (vim.visualMode) { - exitVisualMode(cm); - } - 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; - } - 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') { - for (var i = 0; i < command.toKeys.length; i++) { - CodeMirror.Vim.handleKey(cm, command.toKeys[i], 'mapping'); - } - 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); - } - } - 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) { - 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 { - if (rhs != ':' && rhs.charAt(0) == ':') { - var mapping = { - keys: lhs, - type: 'keyToEx', - exArgs: { input: rhs.substring(1) } - }; - if (ctx) { mapping.context = ctx; } - defaultKeymap.unshift(mapping); - } else { - var mapping = { - keys: lhs, - type: 'keyToKey', - toKeys: rhs - }; - 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; - } - } 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; - } - } - } - } - }; - - 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) { - 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); - }, - 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'); }, - unmap: function(cm, params, ctx) { - var mapArgs = params.args; - if (!mapArgs || mapArgs.length < 1) { - if (cm) { - showConfirm(cm, 'No such mapping: ' + params.input); - } - return; - } - exCommandDispatcher.unmap(mapArgs[0], ctx); - }, - 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; - - if (optionName.charAt(optionName.length - 1) == '?') { - if (value) { throw Error('Trailing characters: ' + params.argString); } - optionName = optionName.substring(0, optionName.length - 1); - forceGet = 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 && 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 = Pos(lineStart, 0); - var curEnd = 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); - }, - global: function(cm, params) { - var argString = params.argString; - if (!argString) { - showConfirm(cm, 'Regular Expression missing from global'); - return; - } - var inverted = params.commandName[0] === 'v'; - 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.getLineHandle(i); - var matched = query.test(line.text); - if (matched !== inverted) { - matchedLines.push(cmd ? line : line.text); - } - } - if (!cmd) { - showConfirm(cm, matchedLines.join('\n')); - return; - } - var index = 0; - var nextCommand = function() { - if (index < matchedLines.length) { - var line = matchedLines[index++]; - var lineNum = cm.getLineNumber(line); - if (lineNum == null) { - nextCommand(); - return; - } - var command = (lineNum + 1) + cmd; - exCommandDispatcher.processCommand(cm, command, { - callback: nextCommand - }); - } - }; - 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, Pos(lineStart, 0)); - var cursor = cm.getSearchCursor(query, startPos); - doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback); - }, - 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); - }, - 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 = CodeMirror.keyName(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 'Esc': - case 'Ctrl-C': - case 'Ctrl-[': - 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: hdom('span', 'replace with ', hdom('strong', replaceWith), ' (y/n/a/q/l)'), - onKeyDown: onPromptKeyDown - }); - } - - CodeMirror.keyMap.vim = { - attach: attachVimMap, - detach: detachVimMap, - call: cmKey - }; - - function exitInsertMode(cm) { - 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); - 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; - 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'); - - CodeMirror.keyMap['vim-insert'] = { - fallthrough: ['default'], - attach: attachVimMap, - detach: detachVimMap, - call: cmKey - }; - - CodeMirror.keyMap['vim-replace'] = { - 'Backspace': 'goCharLeft', - fallthrough: ['vim-insert'], - attach: attachVimMap, - detach: detachVimMap, - call: cmKey - }; - - 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); - CodeMirror.Vim.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) { - 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 { - 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; - } - } else if (!cm.curOp.isVimOp) { - handleExternalSelection(cm, vim); - } - if (vim.visualMode) { - updateFakeCursor(cm); - } - } - function updateFakeCursor(cm) { - } - function clearFakeCursor(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) { - this.keyName = keyName; - } - function onKeyEventTargetKeyDown(e) { - var macroModeState = vimGlobalState.macroModeState; - var lastChange = macroModeState.lastInsertModeChanges; - var keyName = CodeMirror.keyName(e); - if (!keyName) { return; } - function onKeyFound() { - if (lastChange.maybeReset) { - lastChange.changes = []; - lastChange.maybeReset = false; - } - lastChange.changes.push(new InsertModeKey(keyName)); - return true; - } - if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) { - CodeMirror.lookupKey(keyName, 'vim-insert', onKeyFound); - } - } - 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 repeatInsertModeChanges(cm, changes, repeat) { - function keyHandler(binding) { - if (typeof binding == 'string') { - CodeMirror.commands[binding](cm); - } else { - binding(cm); - } - return true; - } - 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) { - CodeMirror.lookupKey(change.keyName, 'vim-insert', keyHandler); - } else if (typeof change == "string") { - var cur = cm.getCursor(); - cm.replaceRange(change, cur, cur); - } else { - var start = cm.getCursor(); - var end = offsetCursor(start, 0, change[0].length); - cm.replaceRange(change[0], start, end); - } - } - } - if (visualBlock) { - cm.setCursor(offsetCursor(head, 0, 1)); - } - } - - resetVimGlobalState(); - CodeMirror.Vim = Vim(); - - Vim = CodeMirror.Vim; - - var specialKey = {'return':'CR',backspace:'BS','delete':'Del',esc:'Esc', - left:'Left',right:'Right',up:'Up',down:'Down',space: 'Space', - home:'Home',end:'End',pageup:'PageUp',pagedown:'PageDown', enter: 'CR' - }; - function lookupKey(hashId, key, e) { - 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 ((name || key.length > 1) && e.shiftKey) { name += 'S-'; } - - name += key; - if (name.length > 1) { name = '<' + name + '>'; } - return name; - } - var handleKey = Vim.handleKey.bind(Vim); - Vim.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) { - 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 = Vim.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 = Vim.handleKey(cm, key, origin); - } else { - var old = cloneVimState(vim); - cm.operation(function() { - cm.ace.forEachSelection(function() { - var sel = cm.ace.selection; - cm.state.vim.lastHPos = sel.$desiredColumn == null ? sel.lead.column : sel.$desiredColumn; - 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.virtualSelectionMode()) { - cm.state.vim = cloneVimState(old); - } - }); - if (cm.curOp.cursorActivity && !isHandled) - cm.curOp.cursorActivity = false; - }, true); - } - if (isHandled && !vim.visualMode && !vim.insert && vim.visualMode != cm.somethingSelected()) { - handleExternalSelection(cm, vim, true); - } - return isHandled; - } - exports.CodeMirror = CodeMirror; - var getVim = Vim.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; - } - dom.translate(element, left, top); - dom.setStyle(element.style, "width", w + "px"); - dom.setStyle(element.style, "height", h + "px"); - }, - 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 (key == "c" && hashId == 1) { // key == "ctrl-c" - if (!useragent.isMac && editor.getCopyText()) { - editor.once("copy", function() { - editor.selection.clearSelection(); - }); - 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 || {}); - 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; - CodeMirror.keyMap.vim.attach(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; - CodeMirror.keyMap.vim.detach(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; - } - }; - Vim.defineOption({ - name: "wrap", - set: function(value, cm) { - if (cm) {cm.ace.setOption("wrap", value)} - }, - type: "boolean" - }, false); - Vim.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' - }); - Vim.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)]); - }; - - exports.handler.defaultKeymap = defaultKeymap; - exports.handler.actions = actions; - exports.Vim = Vim; -}); (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/src/ace/keybinding-vscode.js b/src/ace/keybinding-vscode.js deleted file mode 100644 index 5ab34483c..000000000 --- a/src/ace/keybinding-vscode.js +++ /dev/null @@ -1,262 +0,0 @@ -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: "openCommandPallete" -}, { - bindKey: {mac: "Command-K|Command-S", win: "Ctrl-K|Ctrl-S"}, - name: "showKeyboardShortcuts" -}, { - 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/src/ace/mode-abap.js b/src/ace/mode-abap.js deleted file mode 100644 index 7f02be14b..000000000 --- a/src/ace/mode-abap.js +++ /dev/null @@ -1,221 +0,0 @@ -define("ace/mode/abap_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 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.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/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/src/ace/mode-abc.js b/src/ace/mode-abc.js deleted file mode 100644 index a1dd531b8..000000000 --- a/src/ace/mode-abc.js +++ /dev/null @@ -1,271 +0,0 @@ -define("ace/mode/abc_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 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) { - "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/src/ace/mode-actionscript.js b/src/ace/mode-actionscript.js deleted file mode 100644 index d9e6634b0..000000000 --- a/src/ace/mode-actionscript.js +++ /dev/null @@ -1,275 +0,0 @@ -define("ace/mode/actionscript_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 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) { -"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/src/ace/mode-ada.js b/src/ace/mode-ada.js deleted file mode 100644 index 25f9d7b17..000000000 --- a/src/ace/mode-ada.js +++ /dev/null @@ -1,137 +0,0 @@ -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/src/ace/mode-alda.js b/src/ace/mode-alda.js deleted file mode 100644 index 72470be79..000000000 --- a/src/ace/mode-alda.js +++ /dev/null @@ -1,311 +0,0 @@ -define("ace/mode/alda_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 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) { -"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/src/ace/mode-apache_conf.js b/src/ace/mode-apache_conf.js deleted file mode 100644 index 9a7b17732..000000000 --- a/src/ace/mode-apache_conf.js +++ /dev/null @@ -1,363 +0,0 @@ -define("ace/mode/apache_conf_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 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) { -"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/src/ace/mode-apex.js b/src/ace/mode-apex.js deleted file mode 100644 index 83b91a7ea..000000000 --- a/src/ace/mode-apex.js +++ /dev/null @@ -1,457 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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","ace/mode/behaviour/cstyle"], function(require, exports, module) { -"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; -var CstyleBehaviour = require("../mode/behaviour/cstyle").CstyleBehaviour; - -function ApexMode() { - TextMode.call(this); - - this.HighlightRules = ApexHighlightRules; - this.foldingRules = new FoldMode(); - this.$behaviour = new CstyleBehaviour(); -} - -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/src/ace/mode-applescript.js b/src/ace/mode-applescript.js deleted file mode 100644 index a030f4087..000000000 --- a/src/ace/mode-applescript.js +++ /dev/null @@ -1,278 +0,0 @@ -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/src/ace/mode-aql.js b/src/ace/mode-aql.js deleted file mode 100644 index 42d08fad0..000000000 --- a/src/ace/mode-aql.js +++ /dev/null @@ -1,102 +0,0 @@ -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|search|outbound|inbound|any|graph|prune|options|shortest_path|to|in|return|filter|sort|limit|let|collect|remove|update|replace|insers|upsert|with" - ); - - var builtinConstants = ( - "true|false" - ); - - var builtinFunctions = ( - "append|contains_array|count|count_distinct|count_unique|first|flatten|intersection|last|length|minus|nth|outersection|pop|position|push|remove_nth|remove_value|remove_values|reverse|shift|slice|sorted|sorted_unique|union|union_distinct|unique|unshift|" + - "date_now|date_iso8601|date_timestamp|is_datestring|date_dayofweek|date_year|date_month|date_day|date_hour|date_minute|date_second|date_millisecond|date_dayofyear|date_isoweek|date_leapyear|date_quarter|date_days_in_month|date_trunc|date_format|date_add|date_subtract|date_diff|date_compare|" + - "attributes|count|has|is_same_collection|keep|length|matches|merge|merge_recursive|parse_identifier|translate|unset|unset_recursive|values|zip|" + - "fulltext|" + - "distance|geo_contains|geo_distance|geo_equals|geo_intersects|is_in_polygon|" + - "not_null|first_list|first_document|check_document|collection_count|collections|count|current_user|document|length|hash|apply|assert|/ warn|call|fail|noopt|passthru|sleep|v8|version|" + - "abs|acos|asin|atan|atan2|average|avg|ceil|cos|degrees|exp|exp2|floor|log|log2|log10|max|median|min|percentile|pi|pow|radians|rand|range|round|sin|sqrt|stddev_population|stddev_sample|stddev|sum|tan|variance_population|variance_sample|variance|" + - "char_length|concat|concat_separator|contains|count|encode_uri_component|find_first|find_last|json_parse|json_stringify|left|length|levenshtein_distance|like|lower|ltrim|md5|random_token|regex_matches|regex_split|regex_test|regex_replace|reverse|right|rtrim|sha1|sha512|split|soundex|substitute|substring|tokens|to_base64|to_hex|trim|upper|uuid|" + - "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|is_key|typename|" - ); - - 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/src/ace/mode-asciidoc.js b/src/ace/mode-asciidoc.js deleted file mode 100644 index cdb49c258..000000000 --- a/src/ace/mode-asciidoc.js +++ /dev/null @@ -1,349 +0,0 @@ -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/src/ace/mode-asl.js b/src/ace/mode-asl.js deleted file mode 100644 index 955838a94..000000000 --- a/src/ace/mode-asl.js +++ /dev/null @@ -1,422 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/src/ace/mode-assembly_x86.js b/src/ace/mode-assembly_x86.js deleted file mode 100644 index 5564ce2bf..000000000 --- a/src/ace/mode-assembly_x86.js +++ /dev/null @@ -1,193 +0,0 @@ -define("ace/mode/assembly_x86_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 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.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/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) { -"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/src/ace/mode-autohotkey.js b/src/ace/mode-autohotkey.js deleted file mode 100644 index 9952b029f..000000000 --- a/src/ace/mode-autohotkey.js +++ /dev/null @@ -1,244 +0,0 @@ -define("ace/mode/autohotkey_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 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) { -"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/src/ace/mode-batchfile.js b/src/ace/mode-batchfile.js deleted file mode 100644 index be07412b9..000000000 --- a/src/ace/mode-batchfile.js +++ /dev/null @@ -1,230 +0,0 @@ -define("ace/mode/batchfile_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 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) { -"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/src/ace/mode-bro.js b/src/ace/mode-bro.js deleted file mode 100644 index 865217646..000000000 --- a/src/ace/mode-bro.js +++ /dev/null @@ -1,334 +0,0 @@ -define("ace/mode/bro_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 BroHighlightRules = function() { - - this.$rules = { - start: [{ - token: "punctuation.definition.comment.bro", - regex: /#/, - push: [{ - token: "comment.line.number-sign.bro", - regex: /$/, - next: "pop" - }, { - defaultToken: "comment.line.number-sign.bro" - }] - }, { - token: "keyword.control.bro", - regex: /\b(?:break|case|continue|else|for|if|return|switch|next|when|timeout|schedule)\b/ - }, { - token: [ - "meta.function.bro", - "meta.function.bro", - "storage.type.bro", - "meta.function.bro", - "entity.name.function.bro", - "meta.function.bro" - ], - regex: /^(\s*)(?:function|hook|event)(\s*)(.*)(\s*\()(.*)(\).*$)/ - }, { - token: "storage.type.bro", - regex: /\b(?:bool|enum|double|int|count|port|addr|subnet|any|file|interval|time|string|table|vector|set|record|pattern|hook)\b/ - }, { - token: "storage.modifier.bro", - regex: /\b(?:global|const|redef|local|&(?:optional|rotate_interval|rotate_size|add_func|del_func|expire_func|expire_create|expire_read|expire_write|persistent|synchronized|encrypt|mergeable|priority|group|type_column|log|error_handler))\b/ - }, { - token: "keyword.operator.bro", - regex: /\s*(?:\||&&|(?:>|<|!)=?|==)\s*|\b!?in\b/ - }, { - token: "constant.language.bro", - regex: /\b(?:T|F)\b/ - }, { - token: "constant.numeric.bro", - regex: /\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:\/(?:tcp|udp|icmp)|\s*(?:u?sec|min|hr|day)s?)?\b/ - }, { - token: "punctuation.definition.string.begin.bro", - regex: /"/, - push: [{ - token: "punctuation.definition.string.end.bro", - regex: /"/, - next: "pop" - }, { - include: "#string_escaped_char" - }, { - include: "#string_placeholder" - }, { - defaultToken: "string.quoted.double.bro" - }] - }, { - token: "punctuation.definition.string.begin.bro", - regex: /\//, - push: [{ - token: "punctuation.definition.string.end.bro", - regex: /\//, - next: "pop" - }, { - include: "#string_escaped_char" - }, { - include: "#string_placeholder" - }, { - defaultToken: "string.quoted.regex.bro" - }] - }, { - token: [ - "meta.preprocessor.bro.load", - "keyword.other.special-method.bro" - ], - regex: /^(\s*)(\@load(?:-sigs)?)\b/, - push: [{ - token: [], - regex: /(?=\#)|$/, - next: "pop" - }, { - defaultToken: "meta.preprocessor.bro.load" - }] - }, { - token: [ - "meta.preprocessor.bro.if", - "keyword.other.special-method.bro", - "meta.preprocessor.bro.if" - ], - regex: /^(\s*)(\@endif|\@if(?:n?def)?)(.*$)/, - push: [{ - token: [], - regex: /$/, - next: "pop" - }, { - defaultToken: "meta.preprocessor.bro.if" - }] - }], - "#disabled": [{ - token: "text", - regex: /^\s*\@if(?:n?def)?\b.*$/, - push: [{ - token: "text", - regex: /^\s*\@endif\b.*$/, - next: "pop" - }, { - include: "#disabled" - }, { - include: "#pragma-mark" - }], - comment: "eat nested preprocessor ifdefs" - }], - "#preprocessor-rule-other": [{ - token: [ - "text", - "meta.preprocessor.bro", - "meta.preprocessor.bro", - "text" - ], - regex: /^(\s*)(@if)((?:n?def)?)\b(.*?)(?:(?=)|$)/, - push: [{ - token: ["text", "meta.preprocessor.bro", "text"], - regex: /^(\s*)(@endif)\b(.*$)/, - next: "pop" - }, { - include: "$base" - }] - }], - "#string_escaped_char": [{ - token: "constant.character.escape.bro", - regex: /\\(?:\\|[abefnprtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2})/ - }, { - token: "invalid.illegal.unknown-escape.bro", - regex: /\\./ - }], - "#string_placeholder": [{ - token: "constant.other.placeholder.bro", - regex: /%(?:\d+\$)?[#0\- +']*[,;:_]?(?:-?\d+|\*(?:-?\d+\$)?)?(?:\.(?:-?\d+|\*(?:-?\d+\$)?)?)?(?:hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?[diouxXDOUeEfFgGaACcSspn%]/ - }, { - token: "invalid.illegal.placeholder.bro", - regex: /%/ - }] - }; - - this.normalizeRules(); -}; - -BroHighlightRules.metaData = { - fileTypes: ["bro"], - foldingStartMarker: "^(\\@if(n?def)?)", - foldingStopMarker: "^\\@endif", - keyEquivalent: "@B", - name: "Bro", - scopeName: "source.bro" -}; - - -oop.inherits(BroHighlightRules, TextHighlightRules); - -exports.BroHighlightRules = BroHighlightRules; -}); - -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/bro",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bro_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var BroHighlightRules = require("./bro_highlight_rules").BroHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = BroHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.$id = "ace/mode/bro"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); (function() { - window.require(["ace/mode/bro"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/mode-c9search.js b/src/ace/mode-c9search.js deleted file mode 100644 index c6c6a15f0..000000000 --- a/src/ace/mode-c9search.js +++ /dev/null @@ -1,293 +0,0 @@ -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/src/ace/mode-c_cpp.js b/src/ace/mode-c_cpp.js deleted file mode 100644 index da730717d..000000000 --- a/src/ace/mode-c_cpp.js +++ /dev/null @@ -1,503 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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 = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; - -var c_cppHighlightRules = function() { - - 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({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "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.C99.c", - regex : cFunctions - }, { - 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/range","ace/mode/behaviour/cstyle","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 Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - 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/src/ace/mode-cirru.js b/src/ace/mode-cirru.js deleted file mode 100644 index 36be8ad9b..000000000 --- a/src/ace/mode-cirru.js +++ /dev/null @@ -1,210 +0,0 @@ -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.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/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/src/ace/mode-clojure.js b/src/ace/mode-clojure.js deleted file mode 100644 index dd10ec76d..000000000 --- a/src/ace/mode-clojure.js +++ /dev/null @@ -1,315 +0,0 @@ -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 : "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]+/ - }, { - token : "string.regexp", //Regular Expressions - regex : '/#"(?:\\.|(?:\\")|[^""\n])*"/g' - } - - ], - "string" : [ - { - token : "constant.language.escape", - regex : "\\\\.|\\\\$" - }, { - token : "string", - regex : '[^"\\\\]+' - }, { - token : "string", - regex : '"', - next : "start" - } - ] - }; -}; - -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/src/ace/mode-cobol.js b/src/ace/mode-cobol.js deleted file mode 100644 index 20163c203..000000000 --- a/src/ace/mode-cobol.js +++ /dev/null @@ -1,101 +0,0 @@ -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/src/ace/mode-coffee.js b/src/ace/mode-coffee.js deleted file mode 100644 index 063883c9f..000000000 --- a/src/ace/mode-coffee.js +++ /dev/null @@ -1,400 +0,0 @@ -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.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/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/src/ace/mode-coldfusion.js b/src/ace/mode-coldfusion.js deleted file mode 100644 index fcb742db2..000000000 --- a/src/ace/mode-coldfusion.js +++ /dev/null @@ -1,2596 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/src/ace/mode-csound_orchestra.js b/src/ace/mode-csound_orchestra.js deleted file mode 100644 index 58f932ece..000000000 --- a/src/ace/mode-csound_orchestra.js +++ /dev/null @@ -1,3035 +0,0 @@ -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" - } - ] - }, - - { - 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) { -"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: "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": [{//TODO: nested {} - 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", - "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", - "envlpx", - "envlpxr", - "ephasor", - "eqfil", - "evalstr", - "event", - "event_i", - "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", - "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", - "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", - "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", - "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", - "scans", - "scantable", - "scanu", - "scanu2", - "schedkwhen", - "schedkwhennamed", - "schedule", - "schedulek", - "schedwhen", - "scoreline", - "scoreline_i", - "seed", - "sekere", - "select", - "semitone", - "sense", - "sensekey", - "seqtime", - "seqtime2", - "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", - "trigger", - "trighold", - "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", - "xscanmap", - "xscans", - "xscansmap", - "xscanu", - "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", - "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/src/ace/mode-csound_score.js b/src/ace/mode-csound_score.js deleted file mode 100644 index 3155ca1ab..000000000 --- a/src/ace/mode-csound_score.js +++ /dev/null @@ -1,462 +0,0 @@ -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/src/ace/mode-csp.js b/src/ace/mode-csp.js deleted file mode 100644 index 32872ad76..000000000 --- a/src/ace/mode-csp.js +++ /dev/null @@ -1,59 +0,0 @@ -define("ace/mode/csp_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 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) { - "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/src/ace/mode-css.js b/src/ace/mode-css.js deleted file mode 100644 index 04560163b..000000000 --- a/src/ace/mode-css.js +++ /dev/null @@ -1,720 +0,0 @@ -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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/src/ace/mode-curly.js b/src/ace/mode-curly.js deleted file mode 100644 index a3a7e7129..000000000 --- a/src/ace/mode-curly.js +++ /dev/null @@ -1,2564 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/src/ace/mode-d.js b/src/ace/mode-d.js deleted file mode 100644 index 15379fb99..000000000 --- a/src/ace/mode-d.js +++ /dev/null @@ -1,520 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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" : [ - { //-------------------------------------------------------- COMMENTS - 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" - }, { //-------------------------------------------------------- STRINGS - 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]?" - }, { //-------------------------------------------------------- RULES - token: ["keyword", "text", "paren.lparen"], - regex: /(asm)(\s*)({)/, - next: "d-asm" - }, { - token: ["keyword", "text", "paren.lparen", "constant.language"], - regex: "(__traits)(\\s*)(\\()("+identifierRe+")" - }, { // import|module abc - token: ["keyword", "text", "variable.module"], - regex: "(import|module)(\\s+)((?:"+identifierRe+"\\.?)*)" - }, { // storage Name - token: ["keyword.storage", "text", "entity.name.type"], - regex: "("+storages+")(\\s*)("+identifierRe+")" - }, { // alias|typedef foo bar; - token: ["keyword", "text", "variable.storage", "text"], - regex: "(alias|typedef)(\\s*)("+identifierRe+")(\\s*)" - }, { //-------------------------------------------------------- OTHERS - 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) { -"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/src/ace/mode-dart.js b/src/ace/mode-dart.js deleted file mode 100644 index 9abd9ecc0..000000000 --- a/src/ace/mode-dart.js +++ /dev/null @@ -1,715 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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 = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; - -var c_cppHighlightRules = function() { - - 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({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "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.C99.c", - regex : cFunctions - }, { - 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/range","ace/mode/behaviour/cstyle","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 Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - 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) { -"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) { -"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(); -}; -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/src/ace/mode-diff.js b/src/ace/mode-diff.js deleted file mode 100644 index 8a0ec7e72..000000000 --- a/src/ace/mode-diff.js +++ /dev/null @@ -1,147 +0,0 @@ -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" - }, { //diff.range.unified - regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$", - token: [ - "constant", - "constant.numeric", - "constant", - "comment.doc.tag" - ] - }, { //diff.range.normal - 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" - ] - }, { // added - regex: "^([!+>])(.*?)(\\s*)$", - token: [ - "support.constant", - "text", - "invalid" - ] - }, { // removed - 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/src/ace/mode-django.js b/src/ace/mode-django.js deleted file mode 100644 index 3a5d519bd..000000000 --- a/src/ace/mode-django.js +++ /dev/null @@ -1,2595 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/src/ace/mode-dockerfile.js b/src/ace/mode-dockerfile.js deleted file mode 100644 index 26d64de86..000000000 --- a/src/ace/mode-dockerfile.js +++ /dev/null @@ -1,500 +0,0 @@ -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","ace/mode/behaviour/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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; - -var Mode = function() { - this.HighlightRules = ShHighlightRules; - this.foldingRules = new CStyleFoldMode(); - this.$behaviour = new CstyleBehaviour(); -}; -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/src/ace/mode-dot.js b/src/ace/mode-dot.js deleted file mode 100644 index 4b6d7726b..000000000 --- a/src/ace/mode-dot.js +++ /dev/null @@ -1,417 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/src/ace/mode-drools.js b/src/ace/mode-drools.js deleted file mode 100644 index adcc08f45..000000000 --- a/src/ace/mode-drools.js +++ /dev/null @@ -1,498 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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 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" - ); - - 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, - "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" - }, { - 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" - }] - }, { - 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+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "\\*\\/", - next : "start" - }, { - defaultToken : "comment" - } - ] - }; - - - 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/src/ace/mode-edifact.js b/src/ace/mode-edifact.js deleted file mode 100644 index 3fc865aee..000000000 --- a/src/ace/mode-edifact.js +++ /dev/null @@ -1,166 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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; -}; -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/src/ace/mode-eiffel.js b/src/ace/mode-eiffel.js deleted file mode 100644 index aaf605eb5..000000000 --- a/src/ace/mode-eiffel.js +++ /dev/null @@ -1,135 +0,0 @@ -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/src/ace/mode-ejs.js b/src/ace/mode-ejs.js deleted file mode 100644 index 5825e8385..000000000 --- a/src/ace/mode-ejs.js +++ /dev/null @@ -1,3533 +0,0 @@ -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|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_\\-]*" - }, { - 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/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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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.constantNumericDecimal = { - 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": [ - {// character classes - 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{\^?)([^/]*)(})/ - }, {// escapes - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, {// flag - token: "string.regexp", - regex: /[/][imxouesn]*/, - next: "start" - }, {// invalid operators - token: "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, {// operators - 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var FoldMode = require("./folding/ruby").FoldMode; - -var Mode = function() { - this.HighlightRules = RubyHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-elixir.js b/src/ace/mode-elixir.js deleted file mode 100644 index ca27ffe2b..000000000 --- a/src/ace/mode-elixir.js +++ /dev/null @@ -1,501 +0,0 @@ -define("ace/mode/elixir_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 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.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/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"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/src/ace/mode-elm.js b/src/ace/mode-elm.js deleted file mode 100644 index 6b7d4c2fd..000000000 --- a/src/ace/mode-elm.js +++ /dev/null @@ -1,306 +0,0 @@ -define("ace/mode/elm_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 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) { -"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/src/ace/mode-erlang.js b/src/ace/mode-erlang.js deleted file mode 100644 index fd1143d9e..000000000 --- a/src/ace/mode-erlang.js +++ /dev/null @@ -1,1010 +0,0 @@ -define("ace/mode/erlang_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 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.placeholder.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'constant.other.placeholder.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'constant.other.placeholder.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'constant.other.placeholder.erlang', - 'constant.other.placeholder.erlang' ], - regex: '(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])' }, - { token: - [ 'punctuation.definition.placeholder.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'constant.other.placeholder.erlang', - 'constant.other.placeholder.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) { -"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/src/ace/mode-forth.js b/src/ace/mode-forth.js deleted file mode 100644 index 76fc99e78..000000000 --- a/src/ace/mode-forth.js +++ /dev/null @@ -1,297 +0,0 @@ -define("ace/mode/forth_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 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) { -"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/src/ace/mode-fortran.js b/src/ace/mode-fortran.js deleted file mode 100644 index 7cf389c13..000000000 --- a/src/ace/mode-fortran.js +++ /dev/null @@ -1,430 +0,0 @@ -define("ace/mode/fortran_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 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) { -"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/src/ace/mode-fsharp.js b/src/ace/mode-fsharp.js deleted file mode 100644 index 35f8437f2..000000000 --- a/src/ace/mode-fsharp.js +++ /dev/null @@ -1,316 +0,0 @@ -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/src/ace/mode-fsl.js b/src/ace/mode-fsl.js deleted file mode 100644 index 9bd21d96c..000000000 --- a/src/ace/mode-fsl.js +++ /dev/null @@ -1,259 +0,0 @@ -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) { -"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/src/ace/mode-ftl.js b/src/ace/mode-ftl.js deleted file mode 100644 index c6182a94b..000000000 --- a/src/ace/mode-ftl.js +++ /dev/null @@ -1,1193 +0,0 @@ -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|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_\\-]*" - }, { - 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/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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/src/ace/mode-gcode.js b/src/ace/mode-gcode.js deleted file mode 100644 index 6b4d64dfb..000000000 --- a/src/ace/mode-gcode.js +++ /dev/null @@ -1,93 +0,0 @@ -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/src/ace/mode-gherkin.js b/src/ace/mode-gherkin.js deleted file mode 100644 index 1e50e8cff..000000000 --- a/src/ace/mode-gherkin.js +++ /dev/null @@ -1,168 +0,0 @@ -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/src/ace/mode-gitignore.js b/src/ace/mode-gitignore.js deleted file mode 100644 index 23accea2f..000000000 --- a/src/ace/mode-gitignore.js +++ /dev/null @@ -1,59 +0,0 @@ -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/src/ace/mode-glsl.js b/src/ace/mode-glsl.js deleted file mode 100644 index f5d0c815c..000000000 --- a/src/ace/mode-glsl.js +++ /dev/null @@ -1,580 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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 = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; - -var c_cppHighlightRules = function() { - - 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({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "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.C99.c", - regex : cFunctions - }, { - 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/range","ace/mode/behaviour/cstyle","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 Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - 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/range","ace/mode/behaviour/cstyle","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 Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = glslHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-gobstones.js b/src/ace/mode-gobstones.js deleted file mode 100644 index cd2fc3aaf..000000000 --- a/src/ace/mode-gobstones.js +++ /dev/null @@ -1,1090 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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) { -"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) { -"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/src/ace/mode-golang.js b/src/ace/mode-golang.js deleted file mode 100644 index f60439bb9..000000000 --- a/src/ace/mode-golang.js +++ /dev/null @@ -1,413 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = GolangHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.foldingRules = new CStyleFoldMode(); - this.$behaviour = new CstyleBehaviour(); -}; -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/src/ace/mode-graphqlschema.js b/src/ace/mode-graphqlschema.js deleted file mode 100644 index cf0931e3c..000000000 --- a/src/ace/mode-graphqlschema.js +++ /dev/null @@ -1,214 +0,0 @@ -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/src/ace/mode-groovy.js b/src/ace/mode-groovy.js deleted file mode 100644 index 8395de920..000000000 --- a/src/ace/mode-groovy.js +++ /dev/null @@ -1,989 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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/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; -}; -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/src/ace/mode-haml.js b/src/ace/mode-haml.js deleted file mode 100644 index db8e69343..000000000 --- a/src/ace/mode-haml.js +++ /dev/null @@ -1,1873 +0,0 @@ -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|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_\\-]*" - }, { - 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/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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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.constantNumericDecimal = { - 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": [ - {// character classes - 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{\^?)([^/]*)(})/ - }, {// escapes - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, {// flag - token: "string.regexp", - regex: /[/][imxouesn]*/, - next: "start" - }, {// invalid operators - token: "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, {// operators - 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.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/haml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haml_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"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/src/ace/mode-handlebars.js b/src/ace/mode-handlebars.js deleted file mode 100644 index ba8f7e015..000000000 --- a/src/ace/mode-handlebars.js +++ /dev/null @@ -1,2622 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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) { -"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) { - "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/src/ace/mode-haskell.js b/src/ace/mode-haskell.js deleted file mode 100644 index bf5f1d6ed..000000000 --- a/src/ace/mode-haskell.js +++ /dev/null @@ -1,380 +0,0 @@ -define("ace/mode/haskell_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 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) { -"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/src/ace/mode-haskell_cabal.js b/src/ace/mode-haskell_cabal.js deleted file mode 100644 index 0d99ea380..000000000 --- a/src/ace/mode-haskell_cabal.js +++ /dev/null @@ -1,141 +0,0 @@ -define("ace/mode/haskell_cabal_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 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) { -"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) { -"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/src/ace/mode-haxe.js b/src/ace/mode-haxe.js deleted file mode 100644 index 0abf17e62..000000000 --- a/src/ace/mode-haxe.js +++ /dev/null @@ -1,386 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = HaxeHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-hjson.js b/src/ace/mode-hjson.js deleted file mode 100644 index 45d96c0ba..000000000 --- a/src/ace/mode-hjson.js +++ /dev/null @@ -1,353 +0,0 @@ -define("ace/mode/hjson_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 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/src/ace/mode-html.js b/src/ace/mode-html.js deleted file mode 100644 index f8466c2dd..000000000 --- a/src/ace/mode-html.js +++ /dev/null @@ -1,2509 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/src/ace/mode-html_elixir.js b/src/ace/mode-html_elixir.js deleted file mode 100644 index 53fa828bd..000000000 --- a/src/ace/mode-html_elixir.js +++ /dev/null @@ -1,3088 +0,0 @@ -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|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_\\-]*" - }, { - 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/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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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) { -"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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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.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/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"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/src/ace/mode-html_ruby.js b/src/ace/mode-html_ruby.js deleted file mode 100644 index e3eb0f776..000000000 --- a/src/ace/mode-html_ruby.js +++ /dev/null @@ -1,3550 +0,0 @@ -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|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_\\-]*" - }, { - 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/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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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.constantNumericDecimal = { - 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": [ - {// character classes - 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{\^?)([^/]*)(})/ - }, {// escapes - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, {// flag - token: "string.regexp", - regex: /[/][imxouesn]*/, - next: "start" - }, {// invalid operators - token: "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, {// operators - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var FoldMode = require("./folding/ruby").FoldMode; - -var Mode = function() { - this.HighlightRules = RubyHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-ini.js b/src/ace/mode-ini.js deleted file mode 100644 index e995e6bee..000000000 --- a/src/ace/mode-ini.js +++ /dev/null @@ -1,162 +0,0 @@ -define("ace/mode/ini_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 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/src/ace/mode-io.js b/src/ace/mode-io.js deleted file mode 100644 index 452a803f8..000000000 --- a/src/ace/mode-io.js +++ /dev/null @@ -1,248 +0,0 @@ -define("ace/mode/io_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 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) { -"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/src/ace/mode-jack.js b/src/ace/mode-jack.js deleted file mode 100644 index dd5f494ca..000000000 --- a/src/ace/mode-jack.js +++ /dev/null @@ -1,346 +0,0 @@ -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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = HighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-jade.js b/src/ace/mode-jade.js deleted file mode 100644 index 5c3488944..000000000 --- a/src/ace/mode-jade.js +++ /dev/null @@ -1,2025 +0,0 @@ -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|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_\\-]*" - }, { - 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/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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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" - }, { // h1 - token: "markup.heading.1", - regex: "^=+(?=\\s*$)" - }, { // h2 - token: "markup.heading.2", - regex: "^\\-+(?=\\s*$)" - }, { - token : function(value) { - return "markup.heading." + value.length; - }, - regex : /^#{1,6}(?=\s|$)/, - next : "header" - }, - codeBlockStartRule, - { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { // HR * - _ - token : "constant", - regex : "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$", - next: "allowBlock" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic" - }); - - this.addRules({ - "basic" : [{ - token : "constant.language.escape", - regex : /\\[\\`*_{}\[\]()#+\-.!]/ - }, { // code span ` - token : "support.function", - regex : "(`+)(.*?[^`])(\\1)" - }, { // reference - token : ["text", "constant", "text", "url", "string", "text"], - regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" - }, { // link by reference - token : ["text", "string", "text", "constant", "text"], - regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])" - }, { // link by url - token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\!?\\[)(" + // [ - escaped("]") + // link text or alt text - ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image - '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" - "(\\))" // ) - }, { // strong ** __ - token : "string.strong", - regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // emphasis * _ - 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" : [ { // Lists only escape on completely blank lines. - token : "empty_line", - regex : "^$", - next : "start" - }, { // list - 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" : [ { // Blockquotes only escape on blank lines. - token : "empty_line", - regex : "^\\s*$", - next : "start" - }, { // block quote - 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) { -"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.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/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/src/ace/mode-java.js b/src/ace/mode-java.js deleted file mode 100644 index b61e2a90a..000000000 --- a/src/ace/mode-java.js +++ /dev/null @@ -1,1038 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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/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 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" - ); - - 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, - "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" - }, { - 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" - }] - }, { - 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+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "\\*\\/", - next : "start" - }, { - defaultToken : "comment" - } - ] - }; - - - 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/src/ace/mode-javascript.js b/src/ace/mode-javascript.js deleted file mode 100644 index a24240a58..000000000 --- a/src/ace/mode-javascript.js +++ /dev/null @@ -1,992 +0,0 @@ -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\\d_]+', // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken: 'comment.doc', - 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/javascript_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 identifierRe = '[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*'; - - var JavaScriptHighlightRules = function (options) { - 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|' + - 'console|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', - 'storage.type': 'const|let|var|function', - 'constant.language': 'null|Infinity|NaN|undefined', - 'support.function': 'alert', - 'constant.language.boolean': 'true|false', - }, - '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 - '.)'; - - this.$rules = { - no_regex: [ - DocCommentHighlightRules.getStartRule('doc-start'), - comments('no_regex'), - { - 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: [ - 'storage.type', - 'punctuation.operator', - 'support.function', - 'punctuation.operator', - 'entity.name.function', - 'text', - 'keyword.operator', - ], - regex: - '(' + - identifierRe + - ')(\\.)(prototype)(\\.)(' + - identifierRe + - ')(\\s*)(=)', - next: 'function_arguments', - }, - { - token: [ - 'storage.type', - 'punctuation.operator', - 'entity.name.function', - 'text', - 'keyword.operator', - 'text', - 'storage.type', - 'text', - 'paren.lparen', - ], - regex: - '(' + - identifierRe + - ')(\\.)(' + - identifierRe + - ')(\\s*)(=)(\\s*)(function)(\\s*)(\\()', - next: 'function_arguments', - }, - { - token: [ - 'entity.name.function', - 'text', - 'keyword.operator', - 'text', - 'storage.type', - 'text', - 'paren.lparen', - ], - regex: '(' + identifierRe + ')(\\s*)(=)(\\s*)(function)(\\s*)(\\()', - next: 'function_arguments', - }, - { - token: [ - 'storage.type', - 'punctuation.operator', - 'entity.name.function', - 'text', - 'keyword.operator', - 'text', - 'storage.type', - 'text', - 'entity.name.function', - 'text', - 'paren.lparen', - ], - regex: - '(' + - identifierRe + - ')(\\.)(' + - identifierRe + - ')(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()', - next: 'function_arguments', - }, - { - token: [ - 'storage.type', - 'text', - 'entity.name.function', - 'text', - 'paren.lparen', - ], - regex: '(function)(\\s+)(' + identifierRe + ')(\\s*)(\\()', - next: 'function_arguments', - }, - { - token: [ - 'entity.name.function', - 'text', - 'punctuation.operator', - 'text', - 'storage.type', - 'text', - 'paren.lparen', - ], - regex: '(' + identifierRe + ')(\\s*)(:)(\\s*)(function)(\\s*)(\\()', - next: 'function_arguments', - }, - { - token: ['text', 'text', 'storage.type', 'text', 'paren.lparen'], - regex: '(:)(\\s*)(function)(\\s*)(\\()', - next: 'function_arguments', - }, - { - token: 'keyword', - regex: 'from(?=\\s*(\'|"))', - }, - { - token: 'keyword', - regex: '(?:' + kwBeforeRe + ')\\b', - next: 'start', - }, - { - token: ['support.constant'], - regex: /that\b/, - }, - { - token: [ - 'variable.language', - 'punctuation.operator', - 'support.function.firebug', - ], - regex: - /(console)(\.)(assert|clear|count|countReset|debug|dir|dirxml|error|group|groupCollapsed|groupEnd|info|log|table|time|timeEnd|timeLog|trace|warn)\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: [ - 'storage.type', - 'punctuation.operator', - 'entity.name.function', - 'text', - 'keyword.operator', - 'text', - 'storage.type', - 'text', - 'entity.name.function', - 'text', - 'paren.lparen', - ], - regex: - '(' + - identifierRe + - ')(\\.)(' + - identifierRe + - ')(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()', - next: 'function_arguments', - }, - { - token: 'punctuation.operator', - regex: /[.](?![.])/, - }, - { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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', - }, - ], - function_arguments: [ - { - token: 'variable.parameter', - regex: identifierRe, - }, - { - token: 'punctuation.operator', - regex: '[, ]+', - }, - { - 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', - }, - ], - }, - ); - - 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: '', - 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/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/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/cstyle', - 'ace/mode/folding/cstyle', -], 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 CstyleBehaviour = require('./behaviour/cstyle').CstyleBehaviour; - var CStyleFoldMode = require('./folding/cstyle').FoldMode; - - var Mode = function () { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); - }; - oop.inherits(Mode, TextMode); - - (function () { - this.lineCommentStart = '//'; - this.blockComment = { start: '/*', end: '*/' }; - this.$quotes = { '"': '"', "'": "'", '`': '`' }; - - 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.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; - } - }); -})(); diff --git a/src/ace/mode-json.js b/src/ace/mode-json.js deleted file mode 100644 index 2446e39c6..000000000 --- a/src/ace/mode-json.js +++ /dev/null @@ -1,329 +0,0 @@ -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 : "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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -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 = new CstyleBehaviour(); - 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/src/ace/mode-json5.js b/src/ace/mode-json5.js deleted file mode 100644 index 539fd2f21..000000000 --- a/src/ace/mode-json5.js +++ /dev/null @@ -1,360 +0,0 @@ -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 : "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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = HighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-jsoniq.js b/src/ace/mode-jsoniq.js deleted file mode 100644 index 323317aa4..000000000 --- a/src/ace/mode-jsoniq.js +++ /dev/null @@ -1,2632 +0,0 @@ -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","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"); - -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.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 (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]) { - 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/src/ace/mode-jsp.js b/src/ace/mode-jsp.js deleted file mode 100644 index b6c423344..000000000 --- a/src/ace/mode-jsp.js +++ /dev/null @@ -1,1433 +0,0 @@ -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|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_\\-]*" - }, { - 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/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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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 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" - ); - - 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, - "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" - }, { - 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" - }] - }, { - 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+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "\\*\\/", - next : "start" - }, { - defaultToken : "comment" - } - ] - }; - - - 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JspHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-jssm.js b/src/ace/mode-jssm.js deleted file mode 100644 index 1cc42174e..000000000 --- a/src/ace/mode-jssm.js +++ /dev/null @@ -1,325 +0,0 @@ -define("ace/mode/jssm_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 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) { -"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/src/ace/mode-jsx.js b/src/ace/mode-jsx.js deleted file mode 100644 index c3178a834..000000000 --- a/src/ace/mode-jsx.js +++ /dev/null @@ -1,411 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/jsx_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 JsxHighlightRules = function() { - var keywords = lang.arrayToMap( - ("break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|" + - "if|throw|" + - "delete|in|try|" + - "class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|" + - "number|int|string|boolean|variant|" + - "log|assert").split("|") - ); - - var buildinConstants = lang.arrayToMap( - ("null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined").split("|") - ); - - var reserved = lang.arrayToMap( - ("debugger|with|" + - "const|export|" + - "let|private|public|yield|protected|" + - "extern|native|as|operator|__fake__|__readonly__").split("|") - ); - - var identifierRe = "[a-zA-Z_][a-zA-Z0-9_]*\\b"; - - 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 : [ - "storage.type", - "text", - "entity.name.function" - ], - regex : "(function)(\\s+)(" + identifierRe + ")" - }, { - token : function(value) { - if (value == "this") - return "variable.language"; - else if (value == "function") - return "storage.type"; - else if (keywords.hasOwnProperty(value) || reserved.hasOwnProperty(value)) - return "keyword"; - else if (buildinConstants.hasOwnProperty(value)) - return "constant.language"; - else if (/^_?[A-Z][a-zA-Z0-9_]*$/.test(value)) - return "language.support.class"; - else - return "identifier"; - }, - regex : identifierRe - }, { - 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(JsxHighlightRules, TextHighlightRules); - -exports.JsxHighlightRules = JsxHighlightRules; -}); - -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/jsx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsx_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JsxHighlightRules = require("./jsx_highlight_rules").JsxHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -function Mode() { - this.HighlightRules = JsxHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/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/src/ace/mode-julia.js b/src/ace/mode-julia.js deleted file mode 100644 index 9cb6fb00b..000000000 --- a/src/ace/mode-julia.js +++ /dev/null @@ -1,303 +0,0 @@ -define("ace/mode/julia_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 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) { -"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/src/ace/mode-kotlin.js b/src/ace/mode-kotlin.js deleted file mode 100644 index 394271de3..000000000 --- a/src/ace/mode-kotlin.js +++ /dev/null @@ -1,797 +0,0 @@ -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() { - - this.$rules = { - start: [{ - include: "#comments" - }, { - token: [ - "text", - "keyword.other.kotlin", - "text", - "entity.name.package.kotlin", - "text" - ], - regex: /^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*))?/ - }, { - include: "#imports" - }, { - include: "#statements" - }], - "#classes": [{ - token: "text", - regex: /(?=\s*(?:companion|class|object|interface))/, - push: [{ - token: "text", - regex: /}|(?=$)/, - next: "pop" - }, { - token: ["keyword.other.kotlin", "text"], - regex: /\b((?:companion\s*)?)(class|object|interface)\b/, - push: [{ - token: "text", - regex: /(?=<|{|\(|:)/, - next: "pop" - }, { - token: "keyword.other.kotlin", - regex: /\bobject\b/ - }, { - token: "entity.name.type.class.kotlin", - regex: /\w+/ - }] - }, { - token: "text", - regex: //, - next: "pop" - }, { - include: "#generics" - }] - }, { - token: "text", - regex: /\(/, - push: [{ - token: "text", - regex: /\)/, - next: "pop" - }, { - include: "#parameters" - }] - }, { - token: "keyword.operator.declaration.kotlin", - regex: /:/, - push: [{ - token: "text", - regex: /(?={|$)/, - next: "pop" - }, { - token: "entity.other.inherited-class.kotlin", - regex: /\w+/ - }, { - token: "text", - regex: /\(/, - push: [{ - token: "text", - regex: /\)/, - next: "pop" - }, { - include: "#expressions" - }] - }] - }, { - token: "text", - regex: /\{/, - push: [{ - token: "text", - regex: /\}/, - next: "pop" - }, { - include: "#statements" - }] - }] - }], - "#comments": [{ - token: "punctuation.definition.comment.kotlin", - regex: /\/\*/, - push: [{ - token: "punctuation.definition.comment.kotlin", - regex: /\*\//, - next: "pop" - }, { - defaultToken: "comment.block.kotlin" - }] - }, { - token: [ - "text", - "punctuation.definition.comment.kotlin", - "comment.line.double-slash.kotlin" - ], - regex: /(\s*)(\/\/)(.*$)/ - }], - "#constants": [{ - token: "constant.language.kotlin", - regex: /\b(?:true|false|null|this|super)\b/ - }, { - 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": [{ - token: "text", - regex: /\(/, - push: [{ - token: "text", - regex: /\)/, - next: "pop" - }, { - include: "#expressions" - }] - }, { - include: "#types" - }, { - include: "#strings" - }, { - include: "#constants" - }, { - include: "#comments" - }, { - include: "#keywords" - }], - "#functions": [{ - token: "text", - regex: /(?=\s*fun)/, - push: [{ - token: "text", - regex: /}|(?=$)/, - next: "pop" - }, { - token: "keyword.other.kotlin", - regex: /\bfun\b/, - push: [{ - token: "text", - regex: /(?=\()/, - next: "pop" - }, { - token: "text", - regex: //, - next: "pop" - }, { - include: "#generics" - }] - }, { - token: ["text", "entity.name.function.kotlin"], - regex: /((?:[\.<\?>\w]+\.)?)(\w+)/ - }] - }, { - token: "text", - regex: /\(/, - push: [{ - token: "text", - regex: /\)/, - next: "pop" - }, { - include: "#parameters" - }] - }, { - token: "keyword.operator.declaration.kotlin", - regex: /:/, - push: [{ - token: "text", - regex: /(?={|=|$)/, - next: "pop" - }, { - include: "#types" - }] - }, { - token: "text", - regex: /\{/, - push: [{ - token: "text", - regex: /(?=\})/, - next: "pop" - }, { - include: "#statements" - }] - }, { - token: "keyword.operator.assignment.kotlin", - regex: /=/, - push: [{ - token: "text", - regex: /(?=$)/, - next: "pop" - }, { - include: "#expressions" - }] - }] - }], - "#generics": [{ - token: "keyword.operator.declaration.kotlin", - regex: /:/, - push: [{ - token: "text", - regex: /(?=,|>)/, - next: "pop" - }, { - include: "#types" - }] - }, { - include: "#keywords" - }, { - token: "storage.type.generic.kotlin", - regex: /\w+/ - }], - "#getters-and-setters": [{ - token: ["entity.name.function.kotlin", "text"], - regex: /\b(get)\b(\s*\(\s*\))/, - push: [{ - token: "text", - regex: /\}|(?=\bset\b)|$/, - next: "pop" - }, { - token: "keyword.operator.assignment.kotlin", - regex: /=/, - push: [{ - token: "text", - regex: /(?=$|\bset\b)/, - next: "pop" - }, { - include: "#expressions" - }] - }, { - token: "text", - regex: /\{/, - push: [{ - token: "text", - regex: /\}/, - next: "pop" - }, { - include: "#expressions" - }] - }] - }, { - token: ["entity.name.function.kotlin", "text"], - regex: /\b(set)\b(\s*)(?=\()/, - push: [{ - token: "text", - regex: /\}|(?=\bget\b)|$/, - next: "pop" - }, { - token: "text", - regex: /\(/, - push: [{ - token: "text", - regex: /\)/, - next: "pop" - }, { - include: "#parameters" - }] - }, { - token: "keyword.operator.assignment.kotlin", - regex: /=/, - push: [{ - token: "text", - regex: /(?=$|\bset\b)/, - next: "pop" - }, { - include: "#expressions" - }] - }, { - token: "text", - regex: /\{/, - push: [{ - token: "text", - regex: /\}/, - next: "pop" - }, { - include: "#expressions" - }] - }] - }], - "#imports": [{ - token: [ - "text", - "keyword.other.kotlin", - "text", - "keyword.other.kotlin" - ], - regex: /^(\s*)(import)(\s+[^ $]+\s+)((?:as)?)/ - }], - "#keywords": [{ - token: "storage.modifier.kotlin", - regex: /\b(?: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)\b/ - }, { - token: "keyword.control.catch-exception.kotlin", - regex: /\b(?:try|catch|finally|throw)\b/ - }, { - token: "keyword.control.kotlin", - regex: /\b(?:if|else|while|for|do|return|when|where|break|continue)\b/ - }, { - token: "keyword.operator.kotlin", - regex: /\b(?:in|is|as|assert)\b/ - }, { - token: "keyword.operator.comparison.kotlin", - regex: /==|!=|===|!==|<=|>=|<|>/ - }, { - token: "keyword.operator.assignment.kotlin", - regex: /=/ - }, { - token: "keyword.operator.declaration.kotlin", - regex: /:/ - }, { - 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.terminator.kotlin", - regex: /;/ - }], - "#namespaces": [{ - token: "keyword.other.kotlin", - regex: /\bnamespace\b/ - }, { - token: "text", - regex: /\{/, - push: [{ - token: "text", - regex: /\}/, - next: "pop" - }, { - include: "#statements" - }] - }], - "#parameters": [{ - token: "keyword.operator.declaration.kotlin", - regex: /:/, - push: [{ - token: "text", - regex: /(?=,|\)|=)/, - next: "pop" - }, { - include: "#types" - }] - }, { - token: "keyword.operator.declaration.kotlin", - regex: /=/, - push: [{ - token: "text", - regex: /(?=,|\))/, - next: "pop" - }, { - include: "#expressions" - }] - }, { - include: "#keywords" - }, { - token: "variable.parameter.function.kotlin", - regex: /\w+/ - }], - "#statements": [{ - include: "#namespaces" - }, { - include: "#typedefs" - }, { - include: "#classes" - }, { - include: "#functions" - }, { - include: "#variables" - }, { - include: "#getters-and-setters" - }, { - include: "#expressions" - }], - "#strings": [{ - token: "punctuation.definition.string.begin.kotlin", - regex: /"""/, - push: [{ - token: "punctuation.definition.string.end.kotlin", - regex: /"""/, - next: "pop" - }, { - token: "variable.parameter.template.kotlin", - regex: /\$\w+|\$\{[^\}]+\}/ - }, { - token: "constant.character.escape.kotlin", - regex: /\\./ - }, { - defaultToken: "string.quoted.third.kotlin" - }] - }, { - token: "punctuation.definition.string.begin.kotlin", - regex: /"/, - push: [{ - token: "punctuation.definition.string.end.kotlin", - regex: /"/, - next: "pop" - }, { - token: "variable.parameter.template.kotlin", - regex: /\$\w+|\$\{[^\}]+\}/ - }, { - token: "constant.character.escape.kotlin", - regex: /\\./ - }, { - defaultToken: "string.quoted.double.kotlin" - }] - }, { - token: "punctuation.definition.string.begin.kotlin", - regex: /'/, - push: [{ - token: "punctuation.definition.string.end.kotlin", - regex: /'/, - next: "pop" - }, { - token: "constant.character.escape.kotlin", - regex: /\\./ - }, { - defaultToken: "string.quoted.single.kotlin" - }] - }, { - token: "punctuation.definition.string.begin.kotlin", - regex: /`/, - push: [{ - token: "punctuation.definition.string.end.kotlin", - regex: /`/, - next: "pop" - }, { - defaultToken: "string.quoted.single.kotlin" - }] - }], - "#typedefs": [{ - token: "text", - regex: /(?=\s*type)/, - push: [{ - token: "text", - regex: /(?=$)/, - next: "pop" - }, { - token: "keyword.other.kotlin", - regex: /\btype\b/ - }, { - token: "text", - regex: //, - next: "pop" - }, { - include: "#generics" - }] - }, { - include: "#expressions" - }] - }], - "#types": [{ - token: "storage.type.buildin.kotlin", - regex: /\b(?:Any|Unit|String|Int|Boolean|Char|Long|Double|Float|Short|Byte|dynamic)\b/ - }, { - token: "storage.type.buildin.array.kotlin", - regex: /\b(?:IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray)\b/ - }, { - token: [ - "storage.type.buildin.collection.kotlin", - "text" - ], - regex: /\b(Array|List|Map)(<\b)/, - push: [{ - token: "text", - regex: />/, - next: "pop" - }, { - include: "#types" - }, { - include: "#keywords" - }] - }, { - token: "text", - regex: /\w+/, - next: "pop" - }, { - include: "#types" - }, { - include: "#keywords" - }] - }, { - token: ["keyword.operator.tuple.kotlin", "text"], - regex: /(#)(\()/, - push: [{ - token: "text", - regex: /\)/, - next: "pop" - }, { - include: "#expressions" - }] - }, { - token: "text", - regex: /\{/, - push: [{ - token: "text", - regex: /\}/, - next: "pop" - }, { - include: "#statements" - }] - }, { - token: "text", - regex: /\(/, - push: [{ - token: "text", - regex: /\)/, - next: "pop" - }, { - include: "#types" - }] - }, { - token: "keyword.operator.declaration.kotlin", - regex: /->/ - }], - "#variables": [{ - token: "text", - regex: /(?=\s*(?:var|val))/, - push: [{ - token: "text", - regex: /(?=:|=|$)/, - next: "pop" - }, { - token: "keyword.other.kotlin", - regex: /\b(?:var|val)\b/, - push: [{ - token: "text", - regex: /(?=:|=|$)/, - next: "pop" - }, { - token: "text", - regex: //, - next: "pop" - }, { - include: "#generics" - }] - }, { - token: ["text", "entity.name.variable.kotlin"], - regex: /((?:[\.<\?>\w]+\.)?)(\w+)/ - }] - }, { - token: "keyword.operator.declaration.kotlin", - regex: /:/, - push: [{ - token: "text", - regex: /(?==|$)/, - next: "pop" - }, { - include: "#types" - }, { - include: "#getters-and-setters" - }] - }, { - token: "keyword.operator.assignment.kotlin", - regex: /=/, - push: [{ - token: "text", - regex: /(?=$)/, - next: "pop" - }, { - include: "#expressions" - }, { - include: "#getters-and-setters" - }] - }] - }] - }; - - 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/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var KotlinHighlightRules = require("./kotlin_highlight_rules").KotlinHighlightRules; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = KotlinHighlightRules; - this.foldingRules = new FoldMode(); - this.$behaviour = new CstyleBehaviour(); -}; -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/src/ace/mode-latex.js b/src/ace/mode-latex.js deleted file mode 100644 index edc3dc86a..000000000 --- a/src/ace/mode-latex.js +++ /dev/null @@ -1,296 +0,0 @@ -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.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/src/ace/mode-latte.js b/src/ace/mode-latte.js deleted file mode 100644 index 0377c8438..000000000 --- a/src/ace/mode-latte.js +++ /dev/null @@ -1,2708 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/src/ace/mode-less.js b/src/ace/mode-less.js deleted file mode 100644 index acda129b1..000000000 --- a/src/ace/mode-less.js +++ /dev/null @@ -1,839 +0,0 @@ -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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/src/ace/mode-liquid.js b/src/ace/mode-liquid.js deleted file mode 100644 index f22cfa98a..000000000 --- a/src/ace/mode-liquid.js +++ /dev/null @@ -1,2742 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/behaviour/liquid",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/xml","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { - "use strict"; - - var oop = require("../../lib/oop"); - var Behaviour = require("../behaviour").Behaviour; - var XmlBehaviour = require("./xml").XmlBehaviour; - var TokenIterator = require("../../token_iterator").TokenIterator; - var lang = require("../../lib/lang"); - - function is(token, type) { - return token && token.type.lastIndexOf(type + ".xml") > -1; - } - - var LiquidBehaviour = function () { - XmlBehaviour.call(this); - this.add("autoBraceTagClosing","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 || !( token.value.trim() === '%' || 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))) return; - if (/^\s*}/.test(session.getLine(position.row).slice(position.column))) - return; - while (!token.type != 'keyword.block') { - token = iterator.stepBackward(); - if (token.value == '{%') { - while(true) { - token = iterator.stepForward(); - - if (token.type === 'keyword.block') { - break; - } else if (token.value.trim() == '%') { - token = null; - break; - } - } - break; - } - } - if (!token ) return ; - 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.hasOwnProperty(element.toLowerCase())) - return; - return { - text: "}" + "{% end" + element + " %}", - selection: [1, 1] - }; - } - }); - - }; - - oop.inherits(LiquidBehaviour, Behaviour); - - exports.LiquidBehaviour = LiquidBehaviour; - }); - -define("ace/mode/liquid_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 LiquidHighlightRules = function() { - HtmlHighlightRules.call(this); - var functions = ( - "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" + - "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" + - "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split" - ); - - var keywords = ( - "capture|endcapture|case|endcase|when|comment|endcomment|" + - "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" + - "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow" - ); - var blocks = 'for|if|case|capture|unless|tablerow|marker|comment'; - - var builtinVariables = 'forloop|tablerowloop'; - - var definitions = ("assign"); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": builtinVariables, - "keyword": keywords, - "keyword.block": blocks, - "support.function": functions, - "keyword.definition": definitions - }, "identifier"); - for (var rule in this.$rules) { - this.$rules[rule].unshift({ - token : "variable", - regex : "{%", - push : "liquid-start" - }, { - token : "variable", - regex : "{{", - push : "liquid-start" - }); - } - - this.addRules({ - "liquid-start" : [{ - token: "variable", - regex: "}}", - next: "pop" - }, { - token: "variable", - regex: "%}", - next: "pop" - }, { - 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 : "/|\\*|\\-|\\+|=|!=|\\?\\:" - }, { - 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/html_completions","ace/mode/behaviour/liquid","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var HtmlMode = require("./html").Mode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var LiquidBehaviour = require("./behaviour/liquid").LiquidBehaviour; -var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - -var Mode = function() { - this.HighlightRules = LiquidHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new LiquidBehaviour(); - this.$completer = new HtmlCompletions(); -}; -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/src/ace/mode-lisp.js b/src/ace/mode-lisp.js deleted file mode 100644 index f8d91aefd..000000000 --- a/src/ace/mode-lisp.js +++ /dev/null @@ -1,112 +0,0 @@ -define("ace/mode/lisp_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 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) { -"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/src/ace/mode-livescript.js b/src/ace/mode-livescript.js deleted file mode 100644 index 0db73b29b..000000000 --- a/src/ace/mode-livescript.js +++ /dev/null @@ -1,279 +0,0 @@ -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/src/ace/mode-logiql.js b/src/ace/mode-logiql.js deleted file mode 100644 index 68364c797..000000000 --- a/src/ace/mode-logiql.js +++ /dev/null @@ -1,317 +0,0 @@ -define("ace/mode/logiql_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 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.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/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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - -var Mode = function() { - this.HighlightRules = LogiQLHighlightRules; - this.foldingRules = new FoldMode(); - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); -}; -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/src/ace/mode-logtalk.js b/src/ace/mode-logtalk.js deleted file mode 100644 index b647e1ee6..000000000 --- a/src/ace/mode-logtalk.js +++ /dev/null @@ -1,352 +0,0 @@ -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((?: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(_(call|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: '\\\\.' }, - { 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/src/ace/mode-lsl.js b/src/ace/mode-lsl.js deleted file mode 100644 index a08ff25f3..000000000 --- a/src/ace/mode-lsl.js +++ /dev/null @@ -1,343 +0,0 @@ -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/range","ace/mode/text","ace/mode/behaviour/cstyle","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 Range = require("../range").Range; -var TextMode = require("./text").Mode; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var oop = require("../lib/oop"); - -var Mode = function() { - this.HighlightRules = Rules; - this.$outdent = new Outdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-lua.js b/src/ace/mode-lua.js deleted file mode 100644 index a87f127a8..000000000 --- a/src/ace/mode-lua.js +++ /dev/null @@ -1,452 +0,0 @@ -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" - } - ] - }, - - { - 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/src/ace/mode-luapage.js b/src/ace/mode-luapage.js deleted file mode 100644 index 49bbde3f1..000000000 --- a/src/ace/mode-luapage.js +++ /dev/null @@ -1,3028 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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" - } - ] - }, - - { - 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) { -"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/src/ace/mode-lucene.js b/src/ace/mode-lucene.js deleted file mode 100644 index 9aba1c650..000000000 --- a/src/ace/mode-lucene.js +++ /dev/null @@ -1,154 +0,0 @@ -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: "no_regex" - }, { - 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: "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" - } - ] - }; -}; - -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/src/ace/mode-makefile.js b/src/ace/mode-makefile.js deleted file mode 100644 index f8d853bd5..000000000 --- a/src/ace/mode-makefile.js +++ /dev/null @@ -1,412 +0,0 @@ -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)" - }, - {// ^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.* - 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.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/makefile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/makefile_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"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/src/ace/mode-markdown.js b/src/ace/mode-markdown.js deleted file mode 100644 index 42fa514fd..000000000 --- a/src/ace/mode-markdown.js +++ /dev/null @@ -1,3194 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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/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","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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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_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/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" - }, { // h1 - token: "markup.heading.1", - regex: "^=+(?=\\s*$)" - }, { // h2 - token: "markup.heading.2", - regex: "^\\-+(?=\\s*$)" - }, { - token : function(value) { - return "markup.heading." + value.length; - }, - regex : /^#{1,6}(?=\s|$)/, - next : "header" - }, - codeBlockStartRule, - { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { // HR * - _ - token : "constant", - regex : "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$", - next: "allowBlock" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic" - }); - - this.addRules({ - "basic" : [{ - token : "constant.language.escape", - regex : /\\[\\`*_{}\[\]()#+\-.!]/ - }, { // code span ` - token : "support.function", - regex : "(`+)(.*?[^`])(\\1)" - }, { // reference - token : ["text", "constant", "text", "url", "string", "text"], - regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" - }, { // link by reference - token : ["text", "string", "text", "constant", "text"], - regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])" - }, { // link by url - token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\!?\\[)(" + // [ - escaped("]") + // link text or alt text - ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image - '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" - "(\\))" // ) - }, { // strong ** __ - token : "string.strong", - regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // emphasis * _ - 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" : [ { // Lists only escape on completely blank lines. - token : "empty_line", - regex : "^$", - next : "start" - }, { // list - 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" : [ { // Blockquotes only escape on blank lines. - token : "empty_line", - regex : "^\\s*$", - next : "start" - }, { // block quote - 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/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","ace/mode/behaviour/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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; - -var Mode = function() { - this.HighlightRules = ShHighlightRules; - this.foldingRules = new CStyleFoldMode(); - this.$behaviour = new CstyleBehaviour(); -}; -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/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","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 TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var XmlMode = require("./xml").Mode; -var HtmlMode = require("./html").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 = this.$defaultBehaviour; -}; -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/src/ace/mode-mask.js b/src/ace/mode-mask.js deleted file mode 100644 index 7a60ff04e..000000000 --- a/src/ace/mode-mask.js +++ /dev/null @@ -1,1803 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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|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_\\-]*" - }, { - 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" - }, { // h1 - token: "markup.heading.1", - regex: "^=+(?=\\s*$)" - }, { // h2 - token: "markup.heading.2", - regex: "^\\-+(?=\\s*$)" - }, { - token : function(value) { - return "markup.heading." + value.length; - }, - regex : /^#{1,6}(?=\s|$)/, - next : "header" - }, - codeBlockStartRule, - { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { // HR * - _ - token : "constant", - regex : "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$", - next: "allowBlock" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic" - }); - - this.addRules({ - "basic" : [{ - token : "constant.language.escape", - regex : /\\[\\`*_{}\[\]()#+\-.!]/ - }, { // code span ` - token : "support.function", - regex : "(`+)(.*?[^`])(\\1)" - }, { // reference - token : ["text", "constant", "text", "url", "string", "text"], - regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" - }, { // link by reference - token : ["text", "string", "text", "constant", "text"], - regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])" - }, { // link by url - token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\!?\\[)(" + // [ - escaped("]") + // link text or alt text - ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image - '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" - "(\\))" // ) - }, { // strong ** __ - token : "string.strong", - regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // emphasis * _ - 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" : [ { // Lists only escape on completely blank lines. - token : "empty_line", - regex : "^$", - next : "start" - }, { // list - 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" : [ { // Blockquotes only escape on blank lines. - token : "empty_line", - regex : "^\\s*$", - next : "start" - }, { // block quote - 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/src/ace/mode-matlab.js b/src/ace/mode-matlab.js deleted file mode 100644 index 6e03112ee..000000000 --- a/src/ace/mode-matlab.js +++ /dev/null @@ -1,263 +0,0 @@ -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/src/ace/mode-maze.js b/src/ace/mode-maze.js deleted file mode 100644 index 75e1da782..000000000 --- a/src/ace/mode-maze.js +++ /dev/null @@ -1,292 +0,0 @@ -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/src/ace/mode-mediawiki.js b/src/ace/mode-mediawiki.js deleted file mode 100644 index 199e90b91..000000000 --- a/src/ace/mode-mediawiki.js +++ /dev/null @@ -1,592 +0,0 @@ -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/src/ace/mode-mel.js b/src/ace/mode-mel.js deleted file mode 100644 index ba76cc3fb..000000000 --- a/src/ace/mode-mel.js +++ /dev/null @@ -1,263 +0,0 @@ -define("ace/mode/mel_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 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = MELHighlightRules; - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-mips.js b/src/ace/mode-mips.js deleted file mode 100644 index 4d28b88d6..000000000 --- a/src/ace/mode-mips.js +++ /dev/null @@ -1,264 +0,0 @@ -define("ace/mode/mips_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 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) { -"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/src/ace/mode-mixal.js b/src/ace/mode-mixal.js deleted file mode 100644 index 0e2885fc8..000000000 --- a/src/ace/mode-mixal.js +++ /dev/null @@ -1,122 +0,0 @@ -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', 'JXAN', '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/src/ace/mode-mushcode.js b/src/ace/mode-mushcode.js deleted file mode 100644 index 54004fad6..000000000 --- a/src/ace/mode-mushcode.js +++ /dev/null @@ -1,681 +0,0 @@ -define("ace/mode/mushcode_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 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/src/ace/mode-mysql.js b/src/ace/mode-mysql.js deleted file mode 100644 index c1209792a..000000000 --- a/src/ace/mode-mysql.js +++ /dev/null @@ -1,167 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|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|coalesce|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|groupby_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 = "by|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|ucase|lcase|mid|len|round|rank|now|format|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 keywordMapper = this.createKeywordMapper({ - "support.function": builtins, - "keyword": mySqlKeywords, - "constant": "false|true|null|unknown|date|time|timestamp|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/src/ace/mode-nginx.js b/src/ace/mode-nginx.js deleted file mode 100644 index c5b5d5409..000000000 --- a/src/ace/mode-nginx.js +++ /dev/null @@ -1,298 +0,0 @@ -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/src/ace/mode-nim.js b/src/ace/mode-nim.js deleted file mode 100644 index 7b5c8d8bd..000000000 --- a/src/ace/mode-nim.js +++ /dev/null @@ -1,363 +0,0 @@ -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 + ")(?=\\()" - }, {//pragmas - 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" - }, {// character - 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/src/ace/mode-nix.js b/src/ace/mode-nix.js deleted file mode 100644 index d5698eb14..000000000 --- a/src/ace/mode-nix.js +++ /dev/null @@ -1,647 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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 = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; - -var c_cppHighlightRules = function() { - - 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({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "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.C99.c", - regex : cFunctions - }, { - 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/range","ace/mode/behaviour/cstyle","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 Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - 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) { -"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/src/ace/mode-nsis.js b/src/ace/mode-nsis.js deleted file mode 100644 index 10816422a..000000000 --- a/src/ace/mode-nsis.js +++ /dev/null @@ -1,312 +0,0 @@ -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|cd|delfile|echo|error|execute|packhdr|pragma|finalize|getdllversion|gettlbversion|system|tempfile|warning|verbose|define|undef|insertmacro|macro|macroend|makensis|searchparse|searchreplace)\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|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|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|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) { -"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/src/ace/mode-nunjucks.js b/src/ace/mode-nunjucks.js deleted file mode 100644 index c59a814e6..000000000 --- a/src/ace/mode-nunjucks.js +++ /dev/null @@ -1,2698 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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 C_Highlight_File = require("./c_cpp_highlight_rules"); -var CHighlightRules = C_Highlight_File.c_cppHighlightRules; - -var ObjectiveCHighlightRules = function() { - - 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(); - var cRules = cObj.getRules(); - - 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: [ "support.function.cocoa.leopard"], - regex: "(?:\\b)(NS(?:Rect(?:ToCGRect|FromCGRect)|MakeCollectable|S(?:tringFromProtocol|ize(?:ToCGSize|FromCGSize))|Draw(?:NinePartImage|ThreePartImage)|P(?:oint(?:ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))(?:\\b)" - }, - { - token: ["support.function.cocoa"], - regex: "(?:\\b)(NS(?:R(?:ound(?:DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(?:CriticalAlertPanel(?:RelativeToWindow)?|InformationalAlertPanel(?:RelativeToWindow)?|AlertPanel(?:RelativeToWindow)?)|e(?:set(?:MapTable|HashTable)|c(?:ycleZone|t(?:Clip(?:List)?|F(?:ill(?:UsingOperation|List(?:UsingOperation|With(?:Grays|Colors(?:UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(?:dPixel|l(?:MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(?:SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(?:s)?|WindowServerMemory|AlertPanel)|M(?:i(?:n(?:X|Y)|d(?:X|Y))|ouseInRect|a(?:p(?:Remove|Get|Member|Insert(?:IfAbsent|KnownAbsent)?)|ke(?:R(?:ect|ange)|Size|Point)|x(?:Range|X|Y)))|B(?:itsPer(?:SampleFromDepth|PixelFromDepth)|e(?:stDepth|ep|gin(?:CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(?:ho(?:uldRetainWithZone|w(?:sServicesMenuItem|AnimationEffect))|tringFrom(?:R(?:ect|ange)|MapTable|S(?:ize|elector)|HashTable|Class|Point)|izeFromString|e(?:t(?:ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(?:Big(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|Short|Host(?:ShortTo(?:Big|Little)|IntTo(?:Big|Little)|DoubleTo(?:Big|Little)|FloatTo(?:Big|Little)|Long(?:To(?:Big|Little)|LongTo(?:Big|Little)))|Int|Double|Float|L(?:ittle(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|ong(?:Long)?)))|H(?:ighlightRect|o(?:stByteOrder|meDirectory(?:ForUser)?)|eight|ash(?:Remove|Get|Insert(?:IfAbsent|KnownAbsent)?)|FSType(?:CodeFromFileType|OfFile))|N(?:umberOfColorComponents|ext(?:MapEnumeratorPair|HashEnumeratorItem))|C(?:o(?:n(?:tainsRect|vert(?:GlyphsToPackedGlyphs|Swapped(?:DoubleToHost|FloatToHost)|Host(?:DoubleToSwapped|FloatToSwapped)))|unt(?:MapTable|HashTable|Frames|Windows(?:ForContext)?)|py(?:M(?:emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(?:MapTables|HashTables))|lassFromString|reate(?:MapTable(?:WithZone)?|HashTable(?:WithZone)?|Zone|File(?:namePboardType|ContentsPboardType)))|TemporaryDirectory|I(?:s(?:ControllerMarker|EmptyRect|FreedObject)|n(?:setRect|crementExtraRefCount|te(?:r(?:sect(?:sRect|ionR(?:ect|ange))|faceStyleForKey)|gralRect)))|Zone(?:Realloc|Malloc|Name|Calloc|Fr(?:omPointer|ee))|O(?:penStepRootDirectory|ffsetRect)|D(?:i(?:sableScreenUpdates|videRect)|ottedFrameRect|e(?:c(?:imal(?:Round|Multiply|S(?:tring|ubtract)|Normalize|Co(?:py|mpa(?:ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(?:MemoryPages|Object))|raw(?:Gr(?:oove|ayBezel)|B(?:itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(?:hiteBezel|indowBackground)|LightBezel))|U(?:serName|n(?:ionR(?:ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(?:Bundle(?:Setup|Cleanup)|Setup(?:VirtualMachine)?|Needs(?:ToLoadClasses|VirtualMachine)|ClassesF(?:orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(?:oint(?:InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(?:n(?:d(?:MapTableEnumeration|HashTableEnumeration)|umerate(?:MapTable|HashTable)|ableScreenUpdates)|qual(?:R(?:ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(?:ileTypeForHFSTypeCode|ullUserName|r(?:ee(?:MapTable|HashTable)|ame(?:Rect(?:WithWidth(?:UsingOperation)?)?|Address)))|Wi(?:ndowList(?:ForContext)?|dth)|Lo(?:cationInRange|g(?:v|PageSize)?)|A(?:ccessibility(?:R(?:oleDescription(?:ForUIElement)?|aiseBadArgumentException)|Unignored(?:Children(?:ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(?:Main|Load)|vailableWindowDepths|ll(?:MapTable(?:Values|Keys)|HashTableObjects|ocate(?:MemoryPages|Collectable|Object)))))(?:\\b)" - }, - { - token: ["support.class.cocoa.leopard"], - regex: "(?:\\b)(NS(?:RuleEditor|G(?:arbageCollector|radient)|MapTable|HashTable|Co(?:ndition|llectionView(?:Item)?)|T(?:oolbarItemGroup|extInputClient|r(?:eeNode|ackingArea))|InvocationOperation|Operation(?:Queue)?|D(?:ictionaryController|ockTile)|P(?:ointer(?:Functions|Array)|athC(?:o(?:ntrol(?:Delegate)?|mponentCell)|ell(?:Delegate)?)|r(?:intPanelAccessorizing|edicateEditor(?:RowTemplate)?))|ViewController|FastEnumeration|Animat(?:ionContext|ablePropertyContainer)))(?:\\b)" - }, - { - token: ["support.class.cocoa"], - regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)" - }, - { - token: ["support.type.cocoa.leopard"], - regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)" - }, - { - token: ["support.class.quartz"], - regex: "(?:\\b)(C(?:I(?:Sampler|Co(?:ntext|lor)|Image(?:Accumulator)?|PlugIn(?:Registration)?|Vector|Kernel|Filter(?:Generator|Shape)?)|A(?:Renderer|MediaTiming(?:Function)?|BasicAnimation|ScrollLayer|Constraint(?:LayoutManager)?|T(?:iledLayer|extLayer|rans(?:ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(?:nimation(?:Group)?|ction))))(?:\\b)" - }, - { - token: ["support.type.quartz"], - regex: "(?:\\b)(C(?:G(?:Float|Point|Size|Rect)|IFormat|AConstraintAttribute))(?:\\b)" - }, - { - token: ["support.type.cocoa"], - regex: "(?:\\b)(NS(?:R(?:ect(?:Edge)?|ange)|G(?:lyph(?:Relation|LayoutMode)?|radientType)|M(?:odalSession|a(?:trixMode|p(?:Table|Enumerator)))|B(?:itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(?:cr(?:oll(?:er(?:Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(?:Granularity|Direction|Affinity)|wapped(?:Double|Float)|aveOperationType)|Ha(?:sh(?:Table|Enumerator)|ndler(?:2)?)|C(?:o(?:ntrol(?:Size|Tint)|mp(?:ositingOperation|arisonResult))|ell(?:State|Type|ImagePosition|Attribute))|T(?:hreadPrivate|ypesetterGlyphInfo|i(?:ckMarkPosition|tlePosition|meInterval)|o(?:ol(?:TipTag|bar(?:SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(?:TabType|Alignment)|ab(?:State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(?:ContextAuxiliary|PixelFormatAuxiliary)|D(?:ocumentChangeType|atePickerElementFlags|ra(?:werState|gOperation))|UsableScrollerParts|P(?:oint|r(?:intingPageOrder|ogressIndicator(?:Style|Th(?:ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(?:nt(?:SymbolicTraits|TraitMask|Action)|cusRingType)|W(?:indow(?:OrderingMode|Depth)|orkspace(?:IconCreationOptions|LaunchOptions)|ritingDirection)|L(?:ineBreakMode|ayout(?:Status|Direction))|A(?:nimation(?:Progress|Effect)|ppl(?:ication(?:TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle)))(?:\\b)" - }, - { - token: ["support.constant.cocoa"], - regex: "(?:\\b)(NS(?:NotFound|Ordered(?:Ascending|Descending|Same)))(?:\\b)" - }, - { - token: ["support.constant.notification.cocoa.leopard"], - regex: "(?:\\b)(NS(?:MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification)(?:\\b)" - }, - { - token: ["support.constant.notification.cocoa"], - regex: "(?:\\b)(NS(?:Menu(?:Did(?:RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(?:ystemColorsDidChange|plitView(?:DidResizeSubviews|WillResizeSubviews))|C(?:o(?:nt(?:extHelpModeDid(?:Deactivate|Activate)|rolT(?:intDidChange|extDid(?:BeginEditing|Change|EndEditing)))|lor(?:PanelColorDidChange|ListDidChange)|mboBox(?:Selection(?:IsChanging|DidChange)|Will(?:Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(?:oolbar(?:DidRemoveItem|WillAddItem)|ext(?:Storage(?:DidProcessEditing|WillProcessEditing)|Did(?:BeginEditing|Change|EndEditing)|View(?:DidChange(?:Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)))|ImageRepRegistryDidChange|OutlineView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)|Item(?:Did(?:Collapse|Expand)|Will(?:Collapse|Expand)))|Drawer(?:Did(?:Close|Open)|Will(?:Close|Open))|PopUpButton(?:CellWillPopUp|WillPopUp)|View(?:GlobalFrameDidChange|BoundsDidChange|F(?:ocusDidChange|rameDidChange))|FontSetChanged|W(?:indow(?:Did(?:Resi(?:ze|gn(?:Main|Key))|M(?:iniaturize|ove)|Become(?:Main|Key)|ChangeScreen(?:|Profile)|Deminiaturize|Update|E(?:ndSheet|xpose))|Will(?:M(?:iniaturize|ove)|BeginSheet|Close))|orkspace(?:SessionDid(?:ResignActive|BecomeActive)|Did(?:Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(?:Sleep|Unmount|PowerOff|LaunchApplication)))|A(?:ntialiasThresholdChanged|ppl(?:ication(?:Did(?:ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(?:nhide|pdate)|FinishLaunching)|Will(?:ResignActive|BecomeActive|Hide|Terminate|U(?:nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification)(?:\\b)" - }, - { - token: ["support.constant.cocoa.leopard"], - regex: "(?:\\b)(NS(?:RuleEditor(?:RowType(?:Simple|Compound)|NestingMode(?:Si(?:ngle|mple)|Compound|List))|GradientDraws(?:BeforeStartingLocation|AfterEndingLocation)|M(?:inusSetExpressionType|a(?:chPortDeallocate(?:ReceiveRight|SendRight|None)|pTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(?:oxCustom|undleExecutableArchitecture(?:X86|I386|PPC(?:64)?)|etweenPredicateOperatorType|ackgroundStyle(?:Raised|Dark|L(?:ight|owered)))|S(?:tring(?:DrawingTruncatesLastVisibleLine|EncodingConversion(?:ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(?:e(?:ech(?:SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(?:GrammarFlag|SpellingFlag))|litViewDividerStyleThi(?:n|ck))|e(?:rvice(?:RequestTimedOutError|M(?:iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(?:inimum|aximum)|Application(?:NotFoundError|LaunchFailedError))|gmentStyle(?:Round(?:Rect|ed)|SmallSquare|Capsule|Textured(?:Rounded|Square)|Automatic)))|H(?:UDWindowMask|ashTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(?:oModeColorPanel|etServiceNoAutoRename)|C(?:hangeRedone|o(?:ntainsPredicateOperatorType|l(?:orRenderingIntent(?:RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(?:None|ContentArea|TrackableArea|EditableTextArea))|T(?:imeZoneNameStyle(?:S(?:hort(?:Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(?:Regular|SourceList)|racking(?:Mouse(?:Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(?:ssumeInside|ctive(?:In(?:KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(?:n(?:tersectSetExpressionType|dexedColorSpaceModel)|mageScale(?:None|Proportionally(?:Down|UpOrDown)|AxesIndependently))|Ope(?:nGLPFAAllowOfflineRenderers|rationQueue(?:DefaultMaxConcurrentOperationCount|Priority(?:High|Normal|Very(?:High|Low)|Low)))|D(?:iacriticInsensitiveSearch|ownloadsDirectory)|U(?:nionSetExpressionType|TF(?:16(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(?:ointerFunctions(?:Ma(?:chVirtualMemory|llocMemory)|Str(?:ongMemory|uctPersonality)|C(?:StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(?:paque(?:Memory|Personality)|bjectP(?:ointerPersonality|ersonality)))|at(?:hStyle(?:Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(?:Scaling|Copies|Orientation|P(?:a(?:perSize|ge(?:Range|SetupAccessory))|review)))|Executable(?:RuntimeMismatchError|NotLoadableError|ErrorM(?:inimum|aximum)|L(?:inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(?:Initial|Prior)|F(?:i(?:ndPanelSubstringMatchType(?:StartsWith|Contains|EndsWith|FullWord)|leRead(?:TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(?:ndow(?:BackingLocation(?:MainMemory|Default|VideoMemory)|Sharing(?:Read(?:Only|Write)|None)|CollectionBehavior(?:MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType))(?:\\b)" - }, - { - token: ["support.constant.cocoa"], - regex: "(?:\\b)(NS(?:R(?:GB(?:ModeColorPanel|ColorSpaceModel)|ight(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey)|ound(?:RectBezelStyle|Bankers|ed(?:BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(?:CapStyle|JoinStyle))|un(?:StoppedResponse|ContinuesResponse|AbortedResponse)|e(?:s(?:izableWindowMask|et(?:CursorRectsRunLoopOrdering|FunctionKey))|ce(?:ssedBezelStyle|iver(?:sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(?:evancyLevelIndicatorStyle|ative(?:Before|After))|gular(?:SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(?:n(?:domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(?:ModeMatrix|Button)))|G(?:IFFileType|lyph(?:Below|Inscribe(?:B(?:elow|ase)|Over(?:strike|Below)|Above)|Layout(?:WithPrevious|A(?:tAPoint|gainstAPoint))|A(?:ttribute(?:BidiLevel|Soft|Inscribe|Elastic)|bove))|r(?:ooveBorder|eaterThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|a(?:y(?:ModeColorPanel|ColorSpaceModel)|dient(?:None|Con(?:cave(?:Strong|Weak)|vex(?:Strong|Weak)))|phiteControlTint)))|XML(?:N(?:o(?:tationDeclarationKind|de(?:CompactEmptyElement|IsCDATA|OptionsNone|Use(?:SingleQuotes|DoubleQuotes)|Pre(?:serve(?:NamespaceOrder|C(?:haracterReferences|DATA)|DTD|Prefixes|E(?:ntities|mptyElements)|Quotes|Whitespace|A(?:ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(?:ocument(?:X(?:MLKind|HTMLKind|Include)|HTMLKind|T(?:idy(?:XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(?:arser(?:GTRequiredError|XMLDeclNot(?:StartedError|FinishedError)|Mi(?:splaced(?:XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(?:StartedError|FinishedError))|S(?:t(?:andaloneValueError|ringNot(?:StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(?:MTOKENRequiredError|o(?:t(?:ationNot(?:StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(?:haracterRef(?:In(?:DTDError|PrologError|EpilogError)|AtEOFError)|o(?:nditionalSectionNot(?:StartedError|FinishedError)|mment(?:NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(?:ternalError|valid(?:HexCharacterRefError|C(?:haracter(?:RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(?:NameError|Error)))|OutOfMemoryError|D(?:ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(?:RI(?:RequiredError|FragmentError)|n(?:declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(?:CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(?:MissingSemiError|NoNameError|In(?:Internal(?:SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(?:ocessingInstructionNot(?:StartedError|FinishedError)|ematureDocumentEndError))|E(?:n(?:codingNotSupportedError|tity(?:Ref(?:In(?:DTDError|PrologError|EpilogError)|erence(?:MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(?:StartedError|FinishedError)|Is(?:ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(?:StartedError|FinishedError)|xt(?:ernalS(?:tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(?:iteralNot(?:StartedError|FinishedError)|T(?:RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(?:RedefinedError|HasNoValueError|Not(?:StartedError|FinishedError)|ListNot(?:StartedError|FinishedError)))|rocessingInstructionKind)|E(?:ntity(?:GeneralKind|DeclarationKind|UnparsedKind|P(?:ar(?:sedKind|ameterKind)|redefined))|lement(?:Declaration(?:MixedKind|UndefinedKind|E(?:lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(?:N(?:MToken(?:sKind|Kind)|otationKind)|CDATAKind|ID(?:Ref(?:sKind|Kind)|Kind)|DeclarationKind|En(?:tit(?:yKind|iesKind)|umerationKind)|Kind))|M(?:i(?:n(?:XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(?:nthCalendarUnit|deSwitchFunctionKey|use(?:Moved(?:Mask)?|E(?:ntered(?:Mask)?|ventSubtype|xited(?:Mask)?))|veToBezierPathElement|mentary(?:ChangeButton|Push(?:Button|InButton)|Light(?:Button)?))|enuFunctionKey|a(?:c(?:intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(?:XEdge|YEdge))|ACHOperatingSystem)|B(?:MPFileType|o(?:ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(?:Se(?:condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(?:zelBorder|velLineJoinStyle|low(?:Bottom|Top)|gin(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(?:spaceCharacter|tabTextMovement|ingStore(?:Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(?:owser(?:NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(?:h(?:ift(?:JISStringEncoding|KeyMask)|ow(?:ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(?:s(?:ReqFunctionKey|tem(?:D(?:omainMask|efined(?:Mask)?)|FunctionKey))|mbolStringEncoding)|c(?:a(?:nnedOption|le(?:None|ToFit|Proportionally))|r(?:oll(?:er(?:NoPart|Increment(?:Page|Line|Arrow)|Decrement(?:Page|Line|Arrow)|Knob(?:Slot)?|Arrows(?:M(?:inEnd|axEnd)|None|DefaultSetting))|Wheel(?:Mask)?|LockFunctionKey)|eenChangedEventType))|t(?:opFunctionKey|r(?:ingDrawing(?:OneShot|DisableScreenFontSubstitution|Uses(?:DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(?:Status(?:Reading|NotOpen|Closed|Open(?:ing)?|Error|Writing|AtEnd)|Event(?:Has(?:BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(?:ndEncountered|rrorOccurred)))))|i(?:ngle(?:DateMode|UnderlineStyle)|ze(?:DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(?:condCalendarUnit|lect(?:By(?:Character|Paragraph|Word)|i(?:ng(?:Next|Previous)|onAffinity(?:Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(?:Momentary|Select(?:One|Any)))|quareLineCapStyle|witchButton|ave(?:ToOperation|Op(?:tions(?:Yes|No|Ask)|eration)|AsOperation)|mall(?:SquareBezelStyle|C(?:ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(?:ighlightModeMatrix|SBModeColorPanel|o(?:ur(?:Minute(?:SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(?:Never|OnlyFromMainDocumentDomain|Always)|e(?:lp(?:ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(?:MonthDa(?:yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(?:o(?:n(?:StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(?:ification(?:SuspensionBehavior(?:Hold|Coalesce|D(?:eliverImmediately|rop))|NoCoalescing|CoalescingOn(?:Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(?:cr(?:iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(?:itle|opLevelContainersSpecifierError|abs(?:BezelBorder|NoBorder|LineBorder))|I(?:nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(?:ll(?:Glyph|CellType)|m(?:eric(?:Search|PadKeyMask)|berFormatter(?:Round(?:Half(?:Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(?:10|Default)|S(?:cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(?:ercentStyle|ad(?:Before(?:Suffix|Prefix)|After(?:Suffix|Prefix))))))|e(?:t(?:Services(?:BadArgumentError|NotFoundError|C(?:ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(?:StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(?:t(?:iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(?:hange(?:ReadOtherContents|GrayCell(?:Mask)?|BackgroundCell(?:Mask)?|Cleared|Done|Undone|Autosaved)|MYK(?:ModeColorPanel|ColorSpaceModel)|ircular(?:BezelStyle|Slider)|o(?:n(?:stantValueExpressionType|t(?:inuousCapacityLevelIndicatorStyle|entsCellMask|ain(?:sComparison|erSpecifierError)|rol(?:Glyph|KeyMask))|densedFontMask)|lor(?:Panel(?:RGBModeMask|GrayModeMask|HSBModeMask|C(?:MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(?:p(?:osite(?:XOR|Source(?:In|O(?:ut|ver)|Atop)|Highlight|C(?:opy|lear)|Destination(?:In|O(?:ut|ver)|Atop)|Plus(?:Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(?:stom(?:SelectorPredicateOperatorType|PaletteModeColorPanel)|r(?:sor(?:Update(?:Mask)?|PointingDevice)|veToBezierPathElement))|e(?:nterT(?:extAlignment|abStopType)|ll(?:State|H(?:ighlighted|as(?:Image(?:Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(?:Bordered|InsetButton)|Disabled|Editable|LightsBy(?:Gray|Background|Contents)|AllowsMixedState))|l(?:ipPagination|o(?:s(?:ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(?:ControlTint|DisplayFunctionKey|LineFunctionKey))|a(?:seInsensitive(?:Search|PredicateOption)|n(?:notCreateScriptCommandError|cel(?:Button|TextMovement))|chesDirectory|lculation(?:NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(?:itical(?:Request|AlertStyle)|ayonModeColorPanel))|T(?:hick(?:SquareBezelStyle|erSquareBezelStyle)|ypesetter(?:Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(?:ineBreakAction|atestBehavior))|i(?:ckMark(?:Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(?:olbarItemVisibilityPriority(?:Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(?:Compression(?:N(?:one|EXT)|CCITTFAX(?:3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(?:rminate(?:Now|Cancel|Later)|xt(?:Read(?:InapplicableDocumentTypeError|WriteErrorM(?:inimum|aximum))|Block(?:M(?:i(?:nimum(?:Height|Width)|ddleAlignment)|a(?:rgin|ximum(?:Height|Width)))|B(?:o(?:ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(?:ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(?:Characters|Attributes)|CellType|ured(?:RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(?:FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(?:RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(?:Character|TextMovement|le(?:tP(?:oint(?:Mask|EventSubtype)?|roximity(?:Mask|EventSubtype)?)|Column(?:NoResizing|UserResizingMask|AutoresizingMask)|View(?:ReverseSequentialColumnAutoresizingStyle|GridNone|S(?:olid(?:HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(?:n(?:sert(?:CharFunctionKey|FunctionKey|LineFunctionKey)|t(?:Type|ernalS(?:criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(?:Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(?:2022JPStringEncoding|Latin(?:1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(?:R(?:ight|ep(?:MatchesDevice|LoadStatus(?:ReadingHeader|Completed|InvalidData|Un(?:expectedEOF|knownType)|WillNeedAllData)))|Below|C(?:ellType|ache(?:BySize|Never|Default|Always))|Interpolation(?:High|None|Default|Low)|O(?:nly|verlaps)|Frame(?:Gr(?:oove|ayBezel)|Button|None|Photo)|L(?:oadStatus(?:ReadError|C(?:ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(?:lign(?:Right|Bottom(?:Right|Left)?|Center|Top(?:Right|Left)?|Left)|bove)))|O(?:n(?:State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|TextMovement)|SF1OperatingSystem|pe(?:n(?:GL(?:GO(?:Re(?:setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(?:R(?:obust|endererID)|M(?:inimumPolicy|ulti(?:sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(?:creenMask|te(?:ncilSize|reo)|ingleRenderer|upersample|ample(?:s|Buffers|Alpha))|NoRecovery|C(?:o(?:lor(?:Size|Float)|mpliant)|losestPolicy)|OffScreen|D(?:oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(?:cc(?:umSize|elerated)|ux(?:Buffers|DepthStencil)|l(?:phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(?:criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(?:B(?:itfield|oolType)|S(?:hortType|tr(?:ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(?:Type|longType)|ArrayType))|D(?:i(?:s(?:c(?:losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(?:Selection|PredicateModifier))|o(?:c(?:ModalWindowMask|ument(?:Directory|ationDirectory))|ubleType|wn(?:TextMovement|ArrowFunctionKey))|e(?:s(?:cendingPageOrder|ktopDirectory)|cimalTabStopType|v(?:ice(?:NColorSpaceModel|IndependentModifierFlagsMask)|eloper(?:Directory|ApplicationDirectory))|fault(?:ControlTint|TokenStyle)|lete(?:Char(?:acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(?:yCalendarUnit|teFormatter(?:MediumStyle|Behavior(?:10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(?:wer(?:Clos(?:ingState|edState)|Open(?:ingState|State))|gOperation(?:Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(?:ser(?:CancelledError|D(?:irectory|omainMask)|FunctionKey)|RL(?:Handle(?:NotLoaded|Load(?:Succeeded|InProgress|Failed))|CredentialPersistence(?:None|Permanent|ForSession))|n(?:scaledWindowMask|cachedRead|i(?:codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(?:o(?:CloseGroupingRunLoopOrdering|FunctionKey)|e(?:finedDateComponent|rline(?:Style(?:Single|None|Thick|Double)|Pattern(?:Solid|D(?:ot|ash(?:Dot(?:Dot)?)?)))))|known(?:ColorSpaceModel|P(?:ointingDevice|ageOrder)|KeyS(?:criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(?:dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(?:ustifiedTextAlignment|PEG(?:2000FileType|FileType)|apaneseEUC(?:GlyphPacking|StringEncoding))|P(?:o(?:s(?:t(?:Now|erFontMask|WhenIdle|ASAP)|iti(?:on(?:Replace|Be(?:fore|ginning)|End|After)|ve(?:IntType|DoubleType|FloatType)))|pUp(?:NoArrow|ArrowAt(?:Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(?:InCell(?:Mask)?|OnPushOffButton)|e(?:n(?:TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(?:Mask)?)|P(?:S(?:caleField|tatus(?:Title|Field)|aveButton)|N(?:ote(?:Title|Field)|ame(?:Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(?:a(?:perFeedButton|ge(?:Range(?:To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(?:useFunctionKey|ragraphSeparatorCharacter|ge(?:DownFunctionKey|UpFunctionKey))|r(?:int(?:ing(?:ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(?:NotFound|OK|Error)|FunctionKey)|o(?:p(?:ertyList(?:XMLFormat|MutableContainers(?:AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(?:BarStyle|SpinningStyle|Preferred(?:SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(?:ssedTab|vFunctionKey))|L(?:HeightForm|CancelButton|TitleField|ImageButton|O(?:KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(?:n(?:terCharacter|d(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|v(?:e(?:nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(?:Comparison|PredicateOperatorType)|ra(?:serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(?:clude(?:10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(?:i(?:ew(?:M(?:in(?:XMargin|YMargin)|ax(?:XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(?:lidationErrorM(?:inimum|aximum)|riableExpressionType))|Key(?:SpecifierEvaluationScriptError|Down(?:Mask)?|Up(?:Mask)?|PathExpressionType|Value(?:MinusSetMutation|SetSetMutation|Change(?:Re(?:placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(?:New|Old)|UnionSetMutation|ValidationError))|QTMovie(?:NormalPlayback|Looping(?:BackAndForthPlayback|Playback))|F(?:1(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(?:nd(?:PanelAction(?:Replace(?:A(?:ndFind|ll(?:InSelection)?))?|S(?:howFindPanel|e(?:tFindString|lectAll(?:InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(?:Read(?:No(?:SuchFileError|PermissionError)|CorruptFileError|In(?:validFileNameError|applicableStringEncodingError)|Un(?:supportedSchemeError|knownError))|HandlingPanel(?:CancelButton|OKButton)|NoSuchFileError|ErrorM(?:inimum|aximum)|Write(?:NoPermissionError|In(?:validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(?:supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(?:nt(?:Mo(?:noSpaceTrait|dernSerifsClass)|BoldTrait|S(?:ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(?:o(?:ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(?:ntegerAdvancementsRenderingMode|talicTrait)|O(?:ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(?:nknownClass|IOptimizedTrait)|Panel(?:S(?:hadowEffectModeMask|t(?:andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(?:ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(?:amilyClassMask|reeformSerifsClass)|Antialiased(?:RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(?:Below|Type(?:None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(?:attingError(?:M(?:inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(?:ExpressionType|KeyMask)|3(?:1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(?:RevertButton|S(?:ize(?:Title|Field)|etButton)|CurrentField|Preview(?:Button|Field))|l(?:oat(?:ingPointSamplesBitmapFormat|Type)|agsChanged(?:Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(?:heelModeColorPanel|indow(?:s(?:NTOperatingSystem|CP125(?:1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(?:InterfaceStyle|OperatingSystem))|M(?:iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(?:NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(?:ctivation|ddingToRecents)|A(?:sync|nd(?:Hide(?:Others)?|Print)|llowingClassicStartup))|eek(?:day(?:CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(?:ntsBidiLevels|rningAlertStyle)|r(?:itingDirection(?:RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(?:i(?:stModeMatrix|ne(?:Moves(?:Right|Down|Up|Left)|B(?:order|reakBy(?:C(?:harWrapping|lipping)|Truncating(?:Middle|Head|Tail)|WordWrapping))|S(?:eparatorCharacter|weep(?:Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(?:ssThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey))|a(?:yout(?:RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(?:sc(?:iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(?:y(?:Type|PredicateModifier|EventMask)|choredSearch|imation(?:Blocking|Nonblocking(?:Threaded)?|E(?:ffect(?:DisappearingItemDefault|Poof)|ase(?:In(?:Out)?|Out))|Linear)|dPredicateType)|t(?:Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(?:obe(?:GB1CharacterCollection|CNS1CharacterCollection|Japan(?:1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(?:saveOperation|Pagination)|pp(?:lication(?:SupportDirectory|D(?:irectory|e(?:fined(?:Mask)?|legateReply(?:Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(?:Mask)?)|l(?:ternateKeyMask|pha(?:ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(?:SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(?:ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(?:sWrongScriptError|EvaluationScriptError)|bove(?:Bottom|Top)|WTEventType)))(?:\\b)" - }, - { - token: "support.function.C99.c", - regex: C_Highlight_File.cFunctions - }, - { - 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) { -"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/src/ace/mode-ocaml.js b/src/ace/mode-ocaml.js deleted file mode 100644 index fbd5223d2..000000000 --- a/src/ace/mode-ocaml.js +++ /dev/null @@ -1,421 +0,0 @@ -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/src/ace/mode-pascal.js b/src/ace/mode-pascal.js deleted file mode 100644 index 2fb3c57d1..000000000 --- a/src/ace/mode-pascal.js +++ /dev/null @@ -1,223 +0,0 @@ -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.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/pascal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pascal_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"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/src/ace/mode-perl.js b/src/ace/mode-perl.js deleted file mode 100644 index bc8d178c9..000000000 --- a/src/ace/mode-perl.js +++ /dev/null @@ -1,381 +0,0 @@ -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/src/ace/mode-perl6.js b/src/ace/mode-perl6.js deleted file mode 100644 index 4d25513c3..000000000 --- a/src/ace/mode-perl6.js +++ /dev/null @@ -1,593 +0,0 @@ -define("ace/mode/perl6_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 Perl6HighlightRules = 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|"+ - "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|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*)?(?:[eE][+-]?\\d+)?)?\\b" }; - var num_with_ = { token : "constant.numeric", regex : "(?:\\d+_?\\d+)+\\b" }; - var complex_numbers = { token : "constant.numeric", regex : "\\+?\\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, - num_with_, - complex_numbers, - 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, - num_with_, - complex_numbers, - 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, - num_with_, - complex_numbers, - booleans, - versions, - lang_keywords, - variables, - vars_special, - ops_char, - constants_unicode, - qstrings, - regexp, - { - token: "rparen", - regex: "}", - next : "qqheredoc" - } - ] - }; -}; - -oop.inherits(Perl6HighlightRules, TextHighlightRules); - -exports.Perl6HighlightRules = Perl6HighlightRules; -}); - -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/perl6",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl6_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 Perl6HighlightRules = require("./perl6_highlight_rules").Perl6HighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = Perl6HighlightRules; - - 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/perl6"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); (function() { - window.require(["ace/mode/perl6"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/mode-pgsql.js b/src/ace/mode-pgsql.js deleted file mode 100644 index 069b750ea..000000000 --- a/src/ace/mode-pgsql.js +++ /dev/null @@ -1,1743 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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) { -"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: "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": [{//TODO: nested {} - 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 : "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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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" - ); - - - 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 : "\\$[\\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" - }, { - 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/src/ace/mode-php.js b/src/ace/mode-php.js deleted file mode 100644 index 7db8bf2c7..000000000 --- a/src/ace/mode-php.js +++ /dev/null @@ -1,13110 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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|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_\\-]*" - }, { - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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_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, currentSate, stack) { - if (stack[1] != value) - return "string"; - stack.shift(); - stack.shift(); - return "markup.list"; - }, - regex : "^\\w+(?=;?$)", - next: "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) { -"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" - ] -}; - -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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/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/range","ace/worker/worker_client","ace/mode/php_completions","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/unicode","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 Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var PhpCompletions = require("./php_completions").PhpCompletions; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var unicode = require("../unicode"); -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 = new CstyleBehaviour(); - this.$completer = new PhpCompletions(); - this.foldingRules = new CStyleFoldMode(); -}; -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.subModes["php-"] = new CStyleFoldMode(); -}; -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/src/ace/mode-php_laravel_blade.js b/src/ace/mode-php_laravel_blade.js deleted file mode 100644 index b9393a8a2..000000000 --- a/src/ace/mode-php_laravel_blade.js +++ /dev/null @@ -1,13311 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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|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_\\-]*" - }, { - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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_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, currentSate, stack) { - if (stack[1] != value) - return "string"; - stack.shift(); - stack.shift(); - return "markup.list"; - }, - regex : "^\\w+(?=;?$)", - next: "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: "comments" - }, { - include: "directives" - }, { - include: "parenthesis" - }], - comments: [{ - token: "punctuation.definition.comment.blade", - regex: "(\\/\\/(.)*)|(\\#(.)*)", - next: "pop" - }, { - token: "punctuation.definition.comment.begin.php", - regex: "(?:\\/\\*)", - push: [{ - token: "punctuation.definition.comment.end.php", - regex: "(?:\\*\\/)", - next: "pop" - }, { - defaultToken: "comment.block.blade" - }] - }, { - 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" - }, { - 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" - }, { - 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) { -"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" - ] -}; - -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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/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/range","ace/worker/worker_client","ace/mode/php_completions","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/unicode","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 Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var PhpCompletions = require("./php_completions").PhpCompletions; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var unicode = require("../unicode"); -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 = new CstyleBehaviour(); - this.$completer = new PhpCompletions(); - this.foldingRules = new CStyleFoldMode(); -}; -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.subModes["php-"] = new CStyleFoldMode(); -}; -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/src/ace/mode-pig.js b/src/ace/mode-pig.js deleted file mode 100644 index 06a005377..000000000 --- a/src/ace/mode-pig.js +++ /dev/null @@ -1,310 +0,0 @@ -define("ace/mode/pig_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 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) { -"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/src/ace/mode-plain_text.js b/src/ace/mode-plain_text.js deleted file mode 100644 index 8c03013ef..000000000 --- a/src/ace/mode-plain_text.js +++ /dev/null @@ -1,32 +0,0 @@ -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/src/ace/mode-powershell.js b/src/ace/mode-powershell.js deleted file mode 100644 index 97aad7336..000000000 --- a/src/ace/mode-powershell.js +++ /dev/null @@ -1,418 +0,0 @@ -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 keywords = ( - "begin|break|catch|continue|data|do|dynamicparam|else|elseif|end|exit|filter|" + - "finally|for|foreach|from|function|if|in|inlinescript|hidden|parallel|param|" + - "process|return|sequence|switch|throw|trap|try|until|while|workflow" - ); - var builtinFunctions = ( - "Get-AppBackgroundTask|Start-AppBackgroundTask|Unregister-AppBackgroundTask|Disable-AppBackgroundTaskDiagnosticLog|Enable-AppBackgroundTaskDiagnosticLog|Set-AppBackgroundTaskResourcePolicy|" + - "Get-AppLockerFileInformation|Get-AppLockerPolicy|New-AppLockerPolicy|Set-AppLockerPolicy|Test-AppLockerPolicy|" + - "Get-AppxLastError|Get-AppxLog|Add-AppxPackage|Add-AppxVolume|Dismount-AppxVolume|Get-AppxDefaultVolume|Get-AppxPackage|Get-AppxPackageManifest|Get-AppxVolume|Mount-AppxVolume|Move-AppxPackage|Remove-AppxPackage|Remove-AppxVolume|Set-AppxDefaultVolume|" + - "Clear-AssignedAccess|Get-AssignedAccess|Set-AssignedAccess|" + - "Add-BitLockerKeyProtector|Backup-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|" + - "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|" + - "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|Edit-CIPolicyRule|Get-CIPolicy|Get-CIPolicyInfo|Get-SystemDriver|Merge-CIPolicy|New-CIPolicy|New-CIPolicyRule|Remove-CIPolicyRule|Set-CIPolicyVersion|Set-HVCIOptions|Set-RuleOption|" + - "Add-MpPreference|Get-MpComputerStatus|Get-MpPreference|Get-MpThreat|Get-MpThreatCatalog|Get-MpThreatDetection|Remove-MpPreference|Remove-MpThreat|Set-MpPreference|Start-MpScan|Start-MpWDOScan|Update-MpSignature|" + - "Disable-DAManualEntryPointSelection|Enable-DAManualEntryPointSelection|Get-DAClientExperienceConfiguration|Get-DAEntryPointTableItem|New-DAEntryPointTableItem|Remove-DAEntryPointTableItem|Rename-DAEntryPointTableItem|Reset-DAClientExperienceConfiguration|Reset-DAEntryPointTableItem|Set-DAClientExperienceConfiguration|Set-DAEntryPointTableItem|" + - "Add-ProvisionedAppxPackage|Apply-WindowsUnattend|Get-ProvisionedAppxPackage|Remove-ProvisionedAppxPackage|Add-AppxProvisionedPackage|Add-WindowsCapability|Add-WindowsDriver|Add-WindowsImage|Add-WindowsPackage|Clear-WindowsCorruptMountPoint|Disable-WindowsOptionalFeature|Dismount-WindowsImage|Enable-WindowsOptionalFeature|Expand-WindowsCustomDataImage|Expand-WindowsImage|Export-WindowsDriver|Export-WindowsImage|Get-AppxProvisionedPackage|Get-WIMBootEntry|Get-WindowsCapability|Get-WindowsDriver|Get-WindowsEdition|Get-WindowsImage|Get-WindowsImageContent|Get-WindowsOptionalFeature|Get-WindowsPackage|Mount-WindowsImage|New-WindowsCustomImage|New-WindowsImage|Optimize-WindowsImage|Remove-AppxProvisionedPackage|Remove-WindowsCapability|Remove-WindowsDriver|Remove-WindowsImage|Remove-WindowsPackage|Repair-WindowsImage|Save-WindowsImage|Set-AppXProvisionedDataFile|Set-WindowsEdition|Set-WindowsProductKey|Split-WindowsImage|Update-WIMBootEntry|Use-WindowsUnattend|" + - "Add-DnsClientNrptRule|Clear-DnsClientCache|Get-DnsClient|Get-DnsClientCache|Get-DnsClientGlobalSetting|Get-DnsClientNrptGlobal|Get-DnsClientNrptPolicy|Get-DnsClientNrptRule|Get-DnsClientServerAddress|Register-DnsClient|Remove-DnsClientNrptRule|Set-DnsClient|Set-DnsClientGlobalSetting|Set-DnsClientNrptGlobal|Set-DnsClientNrptRule|Set-DnsClientServerAddress|Resolve-DnsName|" + - "Add-EtwTraceProvider|Get-AutologgerConfig|Get-EtwTraceProvider|Get-EtwTraceSession|New-AutologgerConfig|New-EtwTraceSession|Remove-AutologgerConfig|Remove-EtwTraceProvider|Remove-EtwTraceSession|Send-EtwTraceSession|Set-AutologgerConfig|Set-EtwTraceProvider|Set-EtwTraceSession|" + - "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|" + - "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|" + - "Get-IseSnippet|Import-IseSnippet|New-IseSnippet|" + - "Add-KdsRootKey|Clear-KdsCache|Get-KdsConfiguration|Get-KdsRootKey|Set-KdsConfiguration|Test-KdsRootKey|" + - "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|" + - "Add-DtcClusterTMMapping|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|Remove-DtcClusterTMMapping|Reset-DtcLog|Set-DtcAdvancedHostSetting|Set-DtcAdvancedSetting|Set-DtcClusterDefault|Set-DtcClusterTMMapping|Set-DtcDefault|Set-DtcLog|Set-DtcNetworkSetting|Set-DtcTransaction|Set-DtcTransactionsTraceSession|Set-DtcTransactionsTraceSetting|Start-Dtc|Start-DtcTransactionsTraceSession|Stop-Dtc|Stop-DtcTransactionsTraceSession|Test-Dtc|Uninstall-Dtc|Write-DtcTransactionsTraceSession|Complete-DtcDiagnosticTransaction|Join-DtcDiagnosticResourceManager|New-DtcDiagnosticTransaction|Receive-DtcDiagnosticTransaction|Send-DtcDiagnosticTransaction|Start-DtcDiagnosticResourceManager|Stop-DtcDiagnosticResourceManager|Undo-DtcDiagnosticTransaction|" + - "Disable-NetAdapter|Disable-NetAdapterBinding|Disable-NetAdapterChecksumOffload|Disable-NetAdapterEncapsulatedPacketTaskOffload|Disable-NetAdapterIPsecOffload|Disable-NetAdapterLso|Disable-NetAdapterPacketDirect|Disable-NetAdapterPowerManagement|Disable-NetAdapterQos|Disable-NetAdapterRdma|Disable-NetAdapterRsc|Disable-NetAdapterRss|Disable-NetAdapterSriov|Disable-NetAdapterVmq|Enable-NetAdapter|Enable-NetAdapterBinding|Enable-NetAdapterChecksumOffload|Enable-NetAdapterEncapsulatedPacketTaskOffload|Enable-NetAdapterIPsecOffload|Enable-NetAdapterLso|Enable-NetAdapterPacketDirect|Enable-NetAdapterPowerManagement|Enable-NetAdapterQos|Enable-NetAdapterRdma|Enable-NetAdapterRsc|Enable-NetAdapterRss|Enable-NetAdapterSriov|Enable-NetAdapterVmq|Get-NetAdapter|Get-NetAdapterAdvancedProperty|Get-NetAdapterBinding|Get-NetAdapterChecksumOffload|Get-NetAdapterEncapsulatedPacketTaskOffload|Get-NetAdapterHardwareInfo|Get-NetAdapterIPsecOffload|Get-NetAdapterLso|Get-NetAdapterPacketDirect|Get-NetAdapterPowerManagement|Get-NetAdapterQos|Get-NetAdapterRdma|Get-NetAdapterRsc|Get-NetAdapterRss|Get-NetAdapterSriov|Get-NetAdapterSriovVf|Get-NetAdapterStatistics|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-NetAdapterEncapsulatedPacketTaskOffload|Set-NetAdapterIPsecOffload|Set-NetAdapterLso|Set-NetAdapterPacketDirect|Set-NetAdapterPowerManagement|Set-NetAdapterQos|Set-NetAdapterRdma|Set-NetAdapterRsc|Set-NetAdapterRss|Set-NetAdapterSriov|Set-NetAdapterVmq|" + - "Get-NetConnectionProfile|Set-NetConnectionProfile|" + - "Add-NetEventNetworkAdapter|Add-NetEventPacketCaptureProvider|Add-NetEventProvider|Add-NetEventVmNetworkAdapter|Add-NetEventVmSwitch|Add-NetEventWFPCaptureProvider|Get-NetEventNetworkAdapter|Get-NetEventPacketCaptureProvider|Get-NetEventProvider|Get-NetEventSession|Get-NetEventVmNetworkAdapter|Get-NetEventVmSwitch|Get-NetEventWFPCaptureProvider|New-NetEventSession|Remove-NetEventNetworkAdapter|Remove-NetEventPacketCaptureProvider|Remove-NetEventProvider|Remove-NetEventSession|Remove-NetEventVmNetworkAdapter|Remove-NetEventVmSwitch|Remove-NetEventWFPCaptureProvider|Set-NetEventPacketCaptureProvider|Set-NetEventProvider|Set-NetEventSession|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|" + - "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-NetFirewallAddressFilter|Get-NetFirewallApplicationFilter|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-NetFirewallRule|New-NetIPsecDospSetting|New-NetIPsecMainModeCryptoSet|New-NetIPsecMainModeRule|New-NetIPsecPhase1AuthSet|New-NetIPsecPhase2AuthSet|New-NetIPsecQuickModeCryptoSet|New-NetIPsecRule|Open-NetGPO|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-NetIPsecRule|Get-DAPolicyChange|New-NetIPsecAuthProposal|New-NetIPsecMainModeCryptoProposal|New-NetIPsecQuickModeCryptoProposal|" + - "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-DAConnectionStatus|Get-NCSIPolicyConfiguration|Reset-NCSIPolicyConfiguration|Set-NCSIPolicyConfiguration|" + - "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|" + - "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|" + - "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|" + - "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|" + - "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|" + - "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|" + - "Block-SmbShareAccess|Close-SmbOpenFile|Close-SmbSession|Disable-SmbDelegation|Enable-SmbDelegation|Get-SmbBandwidthLimit|Get-SmbClientConfiguration|Get-SmbClientNetworkInterface|Get-SmbConnection|Get-SmbDelegation|Get-SmbMapping|Get-SmbMultichannelConnection|Get-SmbMultichannelConstraint|Get-SmbOpenFile|Get-SmbServerConfiguration|Get-SmbServerNetworkInterface|Get-SmbSession|Get-SmbShare|Get-SmbShareAccess|Grant-SmbShareAccess|New-SmbMapping|New-SmbMultichannelConstraint|New-SmbShare|Remove-SmbBandwidthLimit|Remove-SmbMapping|Remove-SmbMultichannelConstraint|Remove-SmbShare|Revoke-SmbShareAccess|Set-SmbBandwidthLimit|Set-SmbClientConfiguration|Set-SmbPathAcl|Set-SmbServerConfiguration|Set-SmbShare|Unblock-SmbShareAccess|Update-SmbMultichannelConnection|" + - "Move-SmbClient|Get-SmbWitnessClient|Move-SmbWitnessClient|" + - "Get-StartApps|Export-StartLayout|Import-StartLayout|" + - "Disable-PhysicalDiskIndication|Disable-StorageDiagnosticLog|Enable-PhysicalDiskIndication|Enable-StorageDiagnosticLog|Flush-Volume|Get-DiskSNV|Get-PhysicalDiskSNV|Get-StorageEnclosureSNV|Initialize-Volume|Write-FileSystemCache|Add-InitiatorIdToMaskingSet|Add-PartitionAccessPath|Add-PhysicalDisk|Add-TargetPortToMaskingSet|Add-VirtualDiskToMaskingSet|Block-FileShareAccess|Clear-Disk|Clear-FileStorageTier|Clear-StorageDiagnosticInfo|Connect-VirtualDisk|Debug-FileShare|Debug-StorageSubSystem|Debug-Volume|Disable-PhysicalDiskIdentification|Disable-StorageEnclosureIdentification|Disable-StorageHighAvailability|Disconnect-VirtualDisk|Dismount-DiskImage|Enable-PhysicalDiskIdentification|Enable-StorageEnclosureIdentification|Enable-StorageHighAvailability|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-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|" + - "Disable-TlsCipherSuite|Disable-TlsSessionTicketKey|Enable-TlsCipherSuite|Enable-TlsSessionTicketKey|Export-TlsSessionTicketKey|Get-TlsCipherSuite|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|" + - "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-OdbcDsn|Disable-OdbcPerfCounter|Disable-WdacBidTrace|Enable-OdbcPerfCounter|Enable-WdacBidTrace|Get-OdbcDriver|Get-OdbcDsn|Get-OdbcPerfCounter|Get-WdacBidTrace|Remove-OdbcDsn|Set-OdbcDriver|Set-OdbcDsn|" + - "Get-WindowsDeveloperLicense|Show-WindowsDeveloperLicenseRegistration|Unregister-WindowsDeveloperLicense|" + - "Disable-WindowsErrorReporting|Enable-WindowsErrorReporting|Get-WindowsErrorReporting|" + - "Get-WindowsSearchSetting|Set-WindowsSearchSetting|" + - "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", // 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 : "[$](?:[Tt]rue|[Ff]alse)\\b" - }, { - token : "constant.language", - regex : "[$][Nn]ull\\b" - }, { - token : "variable.instance", - regex : "[$][a-zA-Z][a-zA-Z0-9_]*\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b" - }, { - token : "keyword.operator", - regex : "\\-(?:" + binaryOperatorsRe + ")" - }, { - token : "keyword.operator", - regex : "&|\\+|\\-|\\*|\\/|\\%|\\=|\\>|\\&|\\!|\\|" - }, { - 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" - } - ] - }; -}; - -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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = PowershellHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-praat.js b/src/ace/mode-praat.js deleted file mode 100644 index 171be549f..000000000 --- a/src/ace/mode-praat.js +++ /dev/null @@ -1,478 +0,0 @@ -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/src/ace/mode-prisma.js b/src/ace/mode-prisma.js deleted file mode 100644 index fc7048378..000000000 --- a/src/ace/mode-prisma.js +++ /dev/null @@ -1,489 +0,0 @@ -define("ace/mode/prisma_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 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) { -"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/src/ace/mode-prolog.js b/src/ace/mode-prolog.js deleted file mode 100644 index ce244ab2e..000000000 --- a/src/ace/mode-prolog.js +++ /dev/null @@ -1,371 +0,0 @@ -define("ace/mode/prolog_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 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) { -"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/src/ace/mode-properties.js b/src/ace/mode-properties.js deleted file mode 100644 index 89be56e6b..000000000 --- a/src/ace/mode-properties.js +++ /dev/null @@ -1,80 +0,0 @@ -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/src/ace/mode-protobuf.js b/src/ace/mode-protobuf.js deleted file mode 100644 index a4463de82..000000000 --- a/src/ace/mode-protobuf.js +++ /dev/null @@ -1,593 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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 = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; - -var c_cppHighlightRules = function() { - - 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({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "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.C99.c", - regex : cFunctions - }, { - 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/range","ace/mode/behaviour/cstyle","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 Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - 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) { -"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/src/ace/mode-puppet.js b/src/ace/mode-puppet.js deleted file mode 100644 index d647dea6f..000000000 --- a/src/ace/mode-puppet.js +++ /dev/null @@ -1,368 +0,0 @@ -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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -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 = new CstyleBehaviour(); - 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/src/ace/mode-python.js b/src/ace/mode-python.js deleted file mode 100644 index 6c46043a4..000000000 --- a/src/ace/mode-python.js +++ /dev/null @@ -1,508 +0,0 @@ -define("ace/mode/python_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 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: "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": [{//TODO: nested {} - 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.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/src/ace/mode-qml.js b/src/ace/mode-qml.js deleted file mode 100644 index ba61ca664..000000000 --- a/src/ace/mode-qml.js +++ /dev/null @@ -1,381 +0,0 @@ -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) { - "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/src/ace/mode-r.js b/src/ace/mode-r.js deleted file mode 100644 index 2fd493787..000000000 --- a/src/ace/mode-r.js +++ /dev/null @@ -1,312 +0,0 @@ -define("ace/mode/tex_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 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) -{ - - 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) { - "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/src/ace/mode-raku.js b/src/ace/mode-raku.js deleted file mode 100644 index d2a829c08..000000000 --- a/src/ace/mode-raku.js +++ /dev/null @@ -1,593 +0,0 @@ -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*)?(?:[eE][+-]?\\d+)?)?\\b" }; - var num_with_ = { token : "constant.numeric", regex : "(?:\\d+_?\\d+)+\\b" }; - var complex_numbers = { token : "constant.numeric", regex : "\\+?\\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, - num_with_, - complex_numbers, - 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, - num_with_, - complex_numbers, - 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, - num_with_, - complex_numbers, - 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/src/ace/mode-razor.js b/src/ace/mode-razor.js deleted file mode 100644 index 49b7588ee..000000000 --- a/src/ace/mode-razor.js +++ /dev/null @@ -1,2875 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/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/src/ace/mode-rdoc.js b/src/ace/mode-rdoc.js deleted file mode 100644 index 677add4d1..000000000 --- a/src/ace/mode-rdoc.js +++ /dev/null @@ -1,243 +0,0 @@ -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) { -"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) { -"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/src/ace/mode-red.js b/src/ace/mode-red.js deleted file mode 100644 index 202342050..000000000 --- a/src/ace/mode-red.js +++ /dev/null @@ -1,450 +0,0 @@ -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/src/ace/mode-redshift.js b/src/ace/mode-redshift.js deleted file mode 100644 index 0be3b1bff..000000000 --- a/src/ace/mode-redshift.js +++ /dev/null @@ -1,360 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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 : "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","ace/range"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var TextMode = require("../mode/text").Mode; -var RedshiftHighlightRules = require("./redshift_highlight_rules").RedshiftHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = RedshiftHighlightRules; -}; -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/src/ace/mode-rhtml.js b/src/ace/mode-rhtml.js deleted file mode 100644 index de4788dfd..000000000 --- a/src/ace/mode-rhtml.js +++ /dev/null @@ -1,2808 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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) { -"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) -{ - - 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) { -"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) { -"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/src/ace/mode-rst.js b/src/ace/mode-rst.js deleted file mode 100644 index 23e17db09..000000000 --- a/src/ace/mode-rst.js +++ /dev/null @@ -1,257 +0,0 @@ -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/src/ace/mode-ruby.js b/src/ace/mode-ruby.js deleted file mode 100644 index 12398cc91..000000000 --- a/src/ace/mode-ruby.js +++ /dev/null @@ -1,1003 +0,0 @@ -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.constantNumericDecimal = { - 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": [ - {// character classes - 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{\^?)([^/]*)(})/ - }, {// escapes - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, {// flag - token: "string.regexp", - regex: /[/][imxouesn]*/, - next: "start" - }, {// invalid operators - token: "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, {// operators - 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var FoldMode = require("./folding/ruby").FoldMode; - -var Mode = function() { - this.HighlightRules = RubyHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-rust.js b/src/ace/mode-rust.js deleted file mode 100644 index 19f6a9899..000000000 --- a/src/ace/mode-rust.js +++ /dev/null @@ -1,282 +0,0 @@ -define("ace/mode/rust_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 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() { - - this.$rules = { start: - [ { token: 'variable.other.source.rust', - 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' ], - regex: '\\b(fn)(\\s+)((?:r#)?'+ wordPattern + ')' }, - { token: 'support.constant', regex: wordPattern + '::' }, - { token: 'keyword.source.rust', - regex: '\\b(?: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)\\b' }, - { token: 'storage.type.source.rust', - regex: '\\b(?: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)\\b' }, - { token: 'variable.language.source.rust', regex: '\\bself\\b' }, - - { 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.operator', - regex: /\$|[-=]>|[-+%^=!&|<>]=?|[*/](?![*/])=?/ }, - { token : "punctuation.operator", regex : /[?:,;.]/ }, - { token : "paren.lparen", regex : /[\[({]/ }, - { token : "paren.rparen", regex : /[\])}]/ }, - { token: 'constant.language.source.rust', - regex: '\\b(?:true|false|Some|None|Ok|Err)\\b' }, - { token: 'support.constant.source.rust', - regex: '\\b(?: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)\\b' }, - { token: 'meta.preprocessor.source.rust', - regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' }, - { 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.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) { -"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/src/ace/mode-sass.js b/src/ace/mode-sass.js deleted file mode 100644 index ca340c353..000000000 --- a/src/ace/mode-sass.js +++ /dev/null @@ -1,529 +0,0 @@ -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|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_\\-]*" - }, { - 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.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/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/src/ace/mode-scad.js b/src/ace/mode-scad.js deleted file mode 100644 index 4150aab42..000000000 --- a/src/ace/mode-scad.js +++ /dev/null @@ -1,414 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = scadHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-scala.js b/src/ace/mode-scala.js deleted file mode 100644 index 68a320ca8..000000000 --- a/src/ace/mode-scala.js +++ /dev/null @@ -1,984 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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/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/src/ace/mode-scheme.js b/src/ace/mode-scheme.js deleted file mode 100644 index 9e069b0b6..000000000 --- a/src/ace/mode-scheme.js +++ /dev/null @@ -1,232 +0,0 @@ -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/src/ace/mode-scrypt.js b/src/ace/mode-scrypt.js deleted file mode 100644 index 80feb0ed0..000000000 --- a/src/ace/mode-scrypt.js +++ /dev/null @@ -1,364 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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) { - "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) { - "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(); - }; - 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/src/ace/mode-scss.js b/src/ace/mode-scss.js deleted file mode 100644 index 6c5c573ca..000000000 --- a/src/ace/mode-scss.js +++ /dev/null @@ -1,873 +0,0 @@ -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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/src/ace/mode-sh.js b/src/ace/mode-sh.js deleted file mode 100644 index 56df9c696..000000000 --- a/src/ace/mode-sh.js +++ /dev/null @@ -1,449 +0,0 @@ -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","ace/mode/behaviour/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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; - -var Mode = function() { - this.HighlightRules = ShHighlightRules; - this.foldingRules = new CStyleFoldMode(); - this.$behaviour = new CstyleBehaviour(); -}; -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/src/ace/mode-sjs.js b/src/ace/mode-sjs.js deleted file mode 100644 index 93855df3c..000000000 --- a/src/ace/mode-sjs.js +++ /dev/null @@ -1,1015 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = SJSHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-slim.js b/src/ace/mode-slim.js deleted file mode 100644 index 85d09c869..000000000 --- a/src/ace/mode-slim.js +++ /dev/null @@ -1,5240 +0,0 @@ -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/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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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/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","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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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_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/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" - }, { // h1 - token: "markup.heading.1", - regex: "^=+(?=\\s*$)" - }, { // h2 - token: "markup.heading.2", - regex: "^\\-+(?=\\s*$)" - }, { - token : function(value) { - return "markup.heading." + value.length; - }, - regex : /^#{1,6}(?=\s|$)/, - next : "header" - }, - codeBlockStartRule, - { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { // HR * - _ - token : "constant", - regex : "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$", - next: "allowBlock" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic" - }); - - this.addRules({ - "basic" : [{ - token : "constant.language.escape", - regex : /\\[\\`*_{}\[\]()#+\-.!]/ - }, { // code span ` - token : "support.function", - regex : "(`+)(.*?[^`])(\\1)" - }, { // reference - token : ["text", "constant", "text", "url", "string", "text"], - regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" - }, { // link by reference - token : ["text", "string", "text", "constant", "text"], - regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])" - }, { // link by url - token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\!?\\[)(" + // [ - escaped("]") + // link text or alt text - ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image - '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" - "(\\))" // ) - }, { // strong ** __ - token : "string.strong", - regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // emphasis * _ - 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" : [ { // Lists only escape on completely blank lines. - token : "empty_line", - regex : "^$", - next : "start" - }, { // list - 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" : [ { // Blockquotes only escape on blank lines. - token : "empty_line", - regex : "^\\s*$", - next : "start" - }, { // block quote - 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/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","ace/mode/behaviour/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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; - -var Mode = function() { - this.HighlightRules = ShHighlightRules; - this.foldingRules = new CStyleFoldMode(); - this.$behaviour = new CstyleBehaviour(); -}; -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/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","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 TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var XmlMode = require("./xml").Mode; -var HtmlMode = require("./html").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 = this.$defaultBehaviour; -}; -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.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/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.constantNumericDecimal = { - 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": [ - {// character classes - 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{\^?)([^/]*)(})/ - }, {// escapes - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, {// flag - token: "string.regexp", - regex: /[/][imxouesn]*/, - next: "start" - }, {// invalid operators - token: "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, {// operators - 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var FoldMode = require("./folding/ruby").FoldMode; - -var Mode = function() { - this.HighlightRules = RubyHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-smali.js b/src/ace/mode-smali.js deleted file mode 100644 index c3a6c1757..000000000 --- a/src/ace/mode-smali.js +++ /dev/null @@ -1,1249 +0,0 @@ -define("ace/mode/smali_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 SmaliHighlightRules = function () { - - this.$rules = { - start: [{ - include: "#annotation" - }, { - include: "#annotation-end" - }, { - include: "#annotation-value_list" - }, { - include: "#annotation-value" - }, { - include: "#annotation-name" - }, { - include: "#annotation-access" - }, { - include: "#comment-alone" - }, { - include: "#comment-inline" - }, { - include: "#field" - }, { - include: "#field-end" - }, { - token: [ - "text", - "constant.language.smali", - "text", - "variable.parameter.smali", - "text", - "entity.name.tag.smali", - "string.quoted.double.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(\.class)([\s\t]*)((?:(?:interface|public|protected|private|abstract|static|final|synchronized|transient|volatile|native|strictfp|synthetic|enum|annotation)[\s\t]+)*)([\s\t]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;)(?=[\s\t]*(?:#.*)?$)/, - comment: "Class name" - }, { - token: [ - "text", - "constant.language.smali", - "text", - "entity.name.tag.smali", - "string.quoted.double.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(\.(?:super|implements))([\s\t]+)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;)(?=[\s\t]*(?:#.*)?$)/, - comment: "Super / implements class name" - }, { - token: [ - "text", - "constant.language.smali", - "text", - "entity.name.tag.smali", - "string.quoted.double.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(\.source)([\s\t]+)(")(.*?)(")(?=[\s\t]*(?:#.*)?$)(?=[\s\t]*(?:#.*)?$)/, - comment: "Source file" - }, { - token: [ - "text", - "constant.language.smali", - "text", - "variable.parameter.smali", - "variable.parameter.smali", - "entity.name.function.smali", - "text", - "constant.numeric.smali", - "text", - "constant.numeric.smali", - "text", - "constant.numeric.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(\.method)([\s\t]*)((?:(?:bridge|varargs|declared-synchronized|public|protected|private|abstract|static|final|synchronized|transient|volatile|native|strictfp|synthetic|enum)[\s\t]+)*)((?:constructor )?)(||[\$\w_\-][\w\d_\$]*)(\()((?:[\[]*(?:Z|B|S|C|I|J|F|D|L[\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*;))*)(\))(?:(V)|([\[]*)(Z|B|S|C|I|J|F|D)|([\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))([\s\t]*)((?:#.*)?)$/, - push: [{ - token: ["text", "constant.language.smali"], - regex: /^([\s\t]*)(\.end method)(?=[\s\t]*(?:#.*)?$)/, - next: "pop" - }, { - include: "#comment-inline" - }, { - token: "constant.language.smali", - regex: /^[\s\t]*\.prologue(?=[\s\t]*(?:#.*)?$)/, - comment: "Prologue" - }, { - token: [ - "text", - "constant.language.smali", - "text", - "variable.parameter.smali", - "text", - "string.interpolated.smali", - "text", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "entity.name.tag.smali", - "string.interpolated.smali", - "entity.name.tag.smali", - "text", - "entity.name.tag.smali", - "string.interpolated.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(\.local)([\s\t]+)([vp]\d+)(,[\s\t]+)("[\w_\$][\w\$]*")(:[\[]*)(?:(Z|B|S|C|I|J|F|D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?:(,)(")(.*?)("))?(?:(,[\s\t]*)(")(.*?)("))?(?=[\s\t]*(?:#.*)?$)/, - comment: "Local" - }, { - token: [ - "text", - "constant.language.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "keyword.control.smali", - "text", - "keyword.control.smali", - "text", - "keyword.control.smali" - ], - regex: /^([\s\t]*)(\.catch)([\s\t]+)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;)([\s\t]+{)(:[A-Za-z_\d]+)([\s\t]+\.\.[\s\t]+)(:[A-Za-z_\d]+)(}[\s\t]+)(:[A-Za-z_\d]+)(?=[\s\t]*(?:#.*)?$)/, - comment: "Catch exceptions" - }, { - token: [ - "text", - "constant.language.smali", - "text", - "keyword.control.smali", - "text", - "keyword.control.smali", - "text", - "keyword.control.smali" - ], - regex: /^([\s\t]*)(\.catchall)([\s\t]+{)(:[A-Za-z_\d]+)([\s\t]+\.\.[\s\t]+)(:[A-Za-z_\d]+)(}[\s\t]+)(:[A-Za-z_\d]+)(?=[\s\t]*(?:#.*)?$)/, - comment: "Gotta catch 'em all!" - }, { - token: "constant.language.smali", - regex: /^[\s\t]*\.(?:end|restart)[\s\t]+local[\s\t]+[vp]\d+(?=[\s\t]*(?:#.*)?$)/, - comment: "End / Restart Local" - }, { - token: ["text", "constant.language.smali"], - regex: /^([\s\t]*)(\.sparse-switch)(?=[\s\t]*(?:#.*)?$)/, - push: [{ - token: ["text", "constant.language.smali"], - regex: /^([\s\t]*)(\.end sparse-switch)(?=[\s\t]*(?:#.*)?$)/, - next: "pop" - }, { - include: "#comment-inline" - }, { - token: [ - "text", - "variable.parameter.smali", - "text", - "keyword.control.smali" - ], - regex: /^([\s\t]*)(-?0x(?:0|[1-9a-f][\da-f]*))([\s\t]+->[\s\t]+)(:[A-Za-z_\d]+)(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true - }], - comment: "Sparse Switch" - }, { - token: [ - "text", - "constant.language.smali", - "text", - "variable.parameter.smali" - ], - regex: /^([\s\t]*)(\.packed-switch)([\s\t]+)(-0x1|0x(?:0|[1-9a-f][\da-f]*))(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true, - comment: "Begin Packed Switch, no idea what literal limit is for these. Have seen up to 0x7f090005" - }, { - token: "constant.language.smali", - regex: /^[\s\t]*\.end packed-switch(?=[\s\t]*(?:#.*)?$)/, - comment: "End Packed Switch" - }, { - token: [ - "text", - "constant.language.smali", - "text", - "variable.parameter.smali" - ], - regex: /^([\s\t]*)(\.array-data)([\s\t]+)(1|2|4|8)(?=[\s\t]*(?:#.*)?$)/, - push: [{ - token: ["text", "constant.language.smali"], - regex: /^([\s\t]*)(\.end array-data)(?=[\s\t]*(?:#.*)?$)/, - next: "pop" - }, { - include: "#comment-inline" - }, { - token: ["text", "variable.parameter.smali"], - regex: /^([\s\t]*)((?:-0x(?:0|[1-9a-f][\da-f]{0,6}|[1-7][\da-f]{7}|8[0]{7})|0x(?:0|[1-9a-f][\da-f]{0,6}|[1-7][\da-f]{7}))[st]?|(?:-0x(?:0|[1-9a-f][\da-f]{0,14}|[1-7][\da-f]{15}|8[0]{15})|0x(?:0|[1-9a-f][\da-f]{0,14}|[1-7][\da-f]{15}))L)\b(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true - }], - comment: "Array data" - }, { - include: "#field" - }, { - include: "#field-end" - }, { - include: "#annotation" - }, { - include: "#annotation-end" - }, { - include: "#annotation-value_list" - }, { - include: "#annotation-value" - }, { - include: "#annotation-name" - }, { - include: "#annotation-access" - }, { - include: "#comment-alone" - }, { - include: "#directive-method-line" - }, { - include: "#directive-method-registers_locals" - }, { - include: "#directive-method-label" - }, { - include: "#directive-method-parameter" - }, { - include: "#directive-method-parameter-end" - }, { - include: "#directives-method-relaxed" - }, { - include: "#opcode-format-10x" - }, { - include: "#opcode-format-10x-relaxed" - }, { - include: "#opcode-format-11n" - }, { - include: "#opcode-format-11n-relaxed" - }, { - include: "#opcode-format-11x" - }, { - include: "#opcode-format-11x-relaxed" - }, { - include: "#opcode-format-22x" - }, { - include: "#opcode-format-22x-relaxed" - }, { - include: "#opcode-format-32x" - }, { - include: "#opcode-format-32x-relaxed" - }, { - include: "#opcode-format-12x" - }, { - include: "#opcode-format-12x-relaxed" - }, { - include: "#opcode-format-21c-string" - }, { - include: "#opcode-format-21c-type" - }, { - include: "#opcode-format-21c-field" - }, { - include: "#opcode-format-21c-relaxed" - }, { - include: "#opcode-format-21h" - }, { - include: "#opcode-format-21h-relaxed" - }, { - include: "#opcode-format-21s" - }, { - include: "#opcode-format-21s-relaxed" - }, { - include: "#opcode-format-21t" - }, { - include: "#opcode-format-21t-relaxed" - }, { - include: "#opcode-format-31t" - }, { - include: "#opcode-format-31t-relaxed" - }, { - include: "#opcode-format-22b" - }, { - include: "#opcode-format-22b-relaxed" - }, { - include: "#opcode-format-22c-type" - }, { - include: "#opcode-format-22c-type_array" - }, { - include: "#opcode-format-22c-field" - }, { - include: "#opcode-format-22c-relaxed" - }, { - include: "#opcode-format-22s" - }, { - include: "#opcode-format-22s-relaxed" - }, { - include: "#opcode-format-22t" - }, { - include: "#opcode-format-22t-relaxed" - }, { - include: "#opcode-format-23x" - }, { - include: "#opcode-format-23x-relaxed" - }, { - include: "#opcode-format-3rc-type" - }, { - include: "#opcode-format-3rc-meth" - }, { - include: "#opcode-format-3rc-relaxed" - }, { - include: "#opcode-format-35c-type" - }, { - include: "#opcode-format-35c-meth" - }, { - include: "#opcode-format-35c-relaxed" - }, { - include: "#opcode-format-51l" - }, { - include: "#opcode-format-51l-relaxed" - }, { - include: "#opcode-format-31i" - }, { - include: "#opcode-format-31i-relaxed" - }, { - include: "#opcode-format-10t-20t-30t" - }, { - include: "#opcode-format-10t-20t-30t-relaxed" - }], - comment: "Method signature and body" - }, { - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(\.(?:class|super|implements|method|(?:end )?(?:method|annotation|field)))/, - comment: "Method directives - relaxed" - }], - "#field": [{ - token: [ - "text", - "constant.language.smali", - "text", - "variable.parameter.smali", - "string.interpolated.smali", - "text", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.language.smali", - "constant.numeric.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "string.quoted.double.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(\.field)([\s\t]+)((?:(?:bridge|varargs|declared-synchronized|public|protected|private|abstract|static|final|synchronized|transient|volatile|native|strictfp|synthetic|enum)[\s\t]+)*)([\w_\$\-][\w\$]*)(:[\[]*)(?:(Z|B|S|C|I|J|F|D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?:([\s\t]+=[\s\t]+)(?:(null|true|false)|(\d+(?:\.\d+)?[fldst]?)|((?:-0x(?:0|[1-9a-f][\da-f]{0,6}|[1-7][\da-f]{7}|8[0]{7})|0x(?:0|[1-9a-f][\da-f]{0,6}|[1-7][\da-f]{7}))|(?:-0x(?:0|[1-9a-f][\da-f]{0,14}|[1-7][\da-f]{15}|8[0]{15})|0x(?:0|[1-9a-f][\da-f]{0,14}|[1-7][\da-f]{15}))[fldst]?)\b|(["'])(.*?)(["'])))?(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true, - comment: "Field" - }], - "#field-end": [{ - token: ["text", "constant.language.smali"], - regex: /^([\s\t]*)(\.end field)(?=[\s\t]*(?:#.*)?$)/, - comment: "Parsing this is hard to do right. This is Good Enough™." - }], - "#annotation": [{ - token: [ - "text", - "constant.language.smali", - "text", - "storage.modifier.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(\.annotation)([\s\t]+)(build|runtime|system)([\s\t]+)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;)(?=[\s\t]*(?:#.*)?$)/ - }], - "#annotation-end": [{ - token: ["text", "constant.language.smali"], - regex: /^([\s\t]*)(\.end annotation)(?=[\s\t]*(?:#.*)?$)/, - comment: "Parsing this is hard to do right. This is Good Enough™." - }], - "#annotation-access": [{ - token: [ - "text", - "support.function.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(accessFlags)([\s\t]*=[\s\t]*)(0x(?:0|[1-9a-f][\da-f]{0,3}))(?=[\s\t]*(?:#.*)?$)/, - comment: "accessFlags property in annotation. Haven't seen any of these go over 0x4019." - }], - "#annotation-name": [{ - token: [ - "text", - "support.function.smali", - "text", - "constant.language.smali", - "entity.name.tag.smali", - "string.quoted.double.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(name)([\s\t]*=[\s\t]*)(?:(null)|(")(.*?)((?:")?))(?=[\s\t]*(?:#.*)?$)/, - comment: "Name property in annotation" - }], - "#annotation-value": [{ - token: [ - "text", - "support.function.smali", - "text", - "entity.name.tag.smali", - "string.quoted.double.smali", - "entity.name.tag.smali", - "text", - "entity.name.tag.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "string.interpolated.smali", - "text", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "entity.name.function.smali", - "text", - "constant.numeric.smali", - "text", - "constant.numeric.smali", - "text", - "constant.numeric.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(value)([\s\t]*=[\s\t]*)(?:(")(.*?)((?:")?)|(?:(\.)(enum|subannotation)([\s\t]+))?(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?:(->)(?:([\w_\$][\w\$]*)(:[\[]*)(?:(Z|B|S|C|I|J|F|D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))|(||[\$\w_][\w\d_\$]*)(\()((?:[\[]*(?:Z|B|S|C|I|J|F|D|L[\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*;))*)(\))(?:(V)|([\[]*)(Z|B|S|C|I|J|F|D)|([\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))))?([\s\t]*)((?:#.*)?)$/, - comment: "This is another hack because sublime can't handle multi-line regex, particulaly for 'end'." - }], - "#annotation-value_list": [{ - token: ["text", "support.function.smali", "text"], - regex: /^([\s\t]*)(value)([\s\t]*=[\s\t]*{)(?=[\s\t]*(?:#.*)?$)/, - push: [{ - token: "text", - regex: /^[\s\t]*}(?=[\s\t]*(?:#.*)?$)/, - next: "pop" - }, { - include: "#comment-inline" - }, { - token: [ - "entity.name.tag.smali", - "string.quoted.double.smali", - "entity.name.tag.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali" - ], - regex: /(?:(")(.*?)((?:")?)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?:,)?(?=[\s\t]*(?:#.*)?$)/ - }], - comment: "This is another hack. Deals." - }], - "#directive-method-registers_locals": [{ - token: [ - "text", - "constant.language.smali", - "text", - "variable.parameter.smali" - ], - regex: /([\s\t]*)(\.(?:registers|locals))([\s\t]+)(\d+)(?=[\s\t]*(?:#.*)?$)/, - comment: "Registers / Locals" - }], - "#directive-method-line": [{ - token: [ - "text", - "constant.language.smali", - "text", - "variable.parameter.smali" - ], - regex: /([\s\t]*)(\.line)([\s\t]+)(\d+)(?=[\s\t]*(?:#.*)?$)/, - comment: "Line" - }], - "#directive-method-parameter": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "entity.name.tag.smali", - "string.quoted.double.smali", - "entity.name.tag.smali" - ], - regex: /([\s\t]*)(\.param(?:eter)?)([\s\t]+)(p(?:0|[1-9][\d]?|[1-4][\d]{2}|50[\d]|51[0-2])\b)(?:(,[\s\t]*)(")(.*?)("))?(?=[\s\t]*(?:#.*)?$)/, - comment: "Parameter" - }], - "#directive-method-parameter-end": [{ - token: ["text", "constant.language.smali"], - regex: /^([\s\t]*)(\.end param)(?=[\s\t]*(?:#.*)?$)/, - comment: "Parsing this is hard to do right. This is Good Enough™." - }], - "#directive-method-label": [{ - token: ["text", "keyword.control.smali"], - regex: /^([\s\t]*)(:[A-Za-z_\d]+)(?=[\s\t]*(?:#.*)?$)/, - comment: "Label" - }], - "#directives-method-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(:|\.(?:parameter|line|registers|locals|(?:restart )?local|prologue|(?:end )?(?:annotation|(?:sparse|packed)-switch|local)|catch(?:all)?))/ - }], - "#comment-alone": [{ - token: ["text", "comment.line.number-sign.smali"], - regex: /^([\s\t]*)(#.*)$/, - comment: "Single line, stand alone comment" - }], - "#comment-inline": [{ - token: "comment.line.number-sign.smali", - regex: /#.*$/, - comment: "In-line comment" - }], - "#opcode-format-10x": [{ - token: ["text", "support.function.smali"], - regex: /^([\s\t]*)(nop|return-void)(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op" - }], - "#opcode-format-10x-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(nop|return-void)/ - }], - "#opcode-format-11n": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(const\/4)([\s\t]+)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*)(-0x[0-8]|0x[0-7])(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true, - comment: "Format: op vA, #+B" - }], - "#opcode-format-11n-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(const\/4)/ - }], - "#opcode-format-11x": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali" - ], - regex: /^([\s\t]*)(move-(?:result(?:-wide|-object)?|exception)|return(?:-wide|-object)?|monitor-(?:enter|exit)|throw)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vAA" - }], - "#opcode-format-11x-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(move-(?:result(?:-wide|-object)?|exception)|return(?:-wide|-object)?|monitor-(?:enter|exit)|throw)/ - }], - "#opcode-format-22x": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali" - ], - regex: /^([\s\t]*)(move(?:-wide|-object)?\/from16)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9][\d]{0,3}|[1-5][\d]{4}|6[0-4][\d]{3}|65[0-4][\d]{2}|655[0-2][\d]|6553[0-5])\b)(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vAA, vBBBB" - }], - "#opcode-format-22x-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(move(?:-wide|-object)?\/from16)/ - }], - "#opcode-format-32x": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali" - ], - regex: /^([\s\t]*)(move(?:-wide|-object)?\/16)([\s\t]+)([vp](?:0|[1-9][\d]{0,3}|[1-5][\d]{4}|6[0-4][\d]{3}|65[0-4][\d]{2}|655[0-2][\d]|6553[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9][\d]{0,3}|[1-5][\d]{4}|6[0-4][\d]{3}|65[0-4][\d]{2}|655[0-2][\d]|6553[0-5])\b)(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vAAAA, vBBBB" - }], - "#opcode-format-32x-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(move(?:-wide|-object)?\/16)/ - }], - "#opcode-format-12x": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali" - ], - regex: /^([\s\t]*)(move(?:-wide|-object)?|array-length|neg-(?:int|long|float|double)|not-(?:int|long)|int-to-(?:long|float|double|byte|char|short)|long-to-(?:int|float|double)|float-to-(?:int|long|double)|double-to-(?:int|long|float)|(?:add|sub|mul|div|rem|and|or|xor|shl|shr|ushr)-(?:int|long)\/2addr|(?:add|sub|mul|div|rem)-(?:float|double)\/2addr)([\s\t]+)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b)(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vA, vB" - }], - "#opcode-format-12x-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(move(?:-wide|-object)?|array-length|neg-(?:int|long|float|double)|not-(?:int|long)|int-to-(?:long|float|double|byte|char|short)|long-to-(?:int|float|double)|float-to-(?:int|long|double)|double-to-(?:int|long|float)|(?:add|sub|mul|div|rem|and|or|xor|shl|shr|ushr)-(?:int|long)\/2addr|(?:add|sub|mul|div|rem)-(?:float|double)\/2addr)/ - }], - "#opcode-format-21c-string": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "entity.name.tag.smali", - "string.quoted.double.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(const-string(?:\/jumbo)?)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)(")(.*?)(")(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vAA, string@BBBB" - }], - "#opcode-format-21c-type": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(const-class|check-cast|new-instance)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*[\[]*)(?:(Z|B|S|C|I|J|F|D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vAA, type@BBBB" - }], - "#opcode-format-21c-field": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "string.interpolated.smali", - "text", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)((?:sget|sput)(?:-wide|-object|-boolean|-byte|-char|-short)?)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;)(->)([\w_\$][\w\$]*)(:[\[]*)(?:(Z|B|S|C|I|J|F|D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vAA, field@BBBB" - }], - "#opcode-format-21c-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(const-string|const-class|check-cast|new-instance|(?:sget|sput)(?:-wide|-object|-boolean|-byte|-char|-short)?)/ - }], - "#opcode-format-21h": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(const(?:-wide)?\/high16)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)(-?0x(?:0|[1-9a-f][\da-f]{0,2}|[1-7][\da-f]{3}|8000)[0]{0,12}L?)\b(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true, - comment: "Format: op vAA, #+BBBB0000(00000000)" - }], - "#opcode-format-21h-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(const(?:-wide)?\/high16)/ - }], - "#opcode-format-21s": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(const(?:-wide)?\/16)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)(-0x(?:0|[1-9a-f][\da-f]{0,2}|[1-7][\da-f]{3}|8000)|0x(?:0|[1-9a-f][\da-f]{0,2}|[1-7][\da-f]{3}))\b(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true, - comment: "Format: op vAA, #+BBBB" - }], - "#opcode-format-21s-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(const(?:-wide)?\/16)/ - }], - "#opcode-format-21t": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "keyword.control.smali" - ], - regex: /^([\s\t]*)(if-(?:eq|ne|lt|ge|gt|le)z)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)(:[A-Za-z_\d]+)(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vAA, +BBBB" - }], - "#opcode-format-21t-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(if-(?:eq|ne|lt|ge|gt|le)z)/ - }], - "#opcode-format-31t": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "keyword.control" - ], - regex: /^([\s\t]*)(fill-array-data|(?:packed|sparse)-switch)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)(:[A-Za-z_\d]+)(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vAA, +BBBBBBBB" - }], - "#opcode-format-31t-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(fill-array-data|(?:packed|sparse)-switch)/ - }], - "#opcode-format-22b": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)((?:add|rsub|mul|div|rem|and|or|xor|shl|shr|ushr)-int\/lit8)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)(-0x(?:[\da-f]|[1-7][\da-f]|80)|0x(?:[\da-f]|[1-7][\da-f]))\b(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true, - comment: "Format: op vAA, vBB, #+CC" - }], - "#opcode-format-22b-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)((?:add|rsub|mul|div|rem|and|or|xor|shl|shr|ushr)-int\/lit8)/ - }], - "#opcode-format-22c-type": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(instance-of)([\s\t]+)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*[\[]*)(?:(Z|B|S|C|I|J|F|D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vA, vB, type@CCCC" - }], - "#opcode-format-22c-type_array": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(new-array)([\s\t]+)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*[\[]+)(?:(Z|B|S|C|I|J|F|D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vA, vB, [type@CCCC" - }], - "#opcode-format-22c-field": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "string.interpolated.smali", - "text", - "constant.numeric.smali", - "constant.numeric.smali", - "constant.numeric.smali", - "constant.numeric.smali", - "constant.numeric.smali", - "constant.numeric.smali", - "constant.numeric.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)((?:iget|iput)(?:-wide|-object|-boolean|-byte|-char|-short)?)([\s\t]+)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;)(->)([\w_\$][\w\$]*)(:[\[]*)(?:(Z)|(B)|(S)|(C)|(I)|(J)|(F)|(D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vA, vB, field@CCCC" - }], - "#opcode-format-22c-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(instance-of|new-array|(?:iget|iput)(?:-wide|-object|-boolean|-byte|-char|-short)?)/ - }], - "#opcode-format-22s": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)((?:add|mul|div|rem|and|or|xor)-int\/lit16|rsub-int)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)(-0x(?:0|[1-9a-f][\da-f]{0,2}|[1-7][\da-f]{3}|8000)|0x(?:0|[1-9a-f][\da-f]{0,2}|[1-7][\da-f]{3}))\b(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true, - comment: "Format: op vA, vB, #+CCCC" - }], - "#opcode-format-22s-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)((?:add|mul|div|rem|and|or|xor)-int\/lit16|rsub-int)/ - }], - "#opcode-format-22t": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "keyword.control" - ], - regex: /^([\s\t]*)(if-(?:eq|ne|lt|ge|gt|le))([\s\t]+)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*)(:[A-Za-z_\d]+)(?=[\s\t]*(?:#.*)?$)/, - comment: "*Format: op vA, vB, +CCCC" - }], - "#opcode-format-22t-relaxed": [{ - token: "invalid.illegal.smali", - regex: /if-(?:eq|ne|lt|ge|gt|le)/ - }], - "#opcode-format-23x": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali" - ], - regex: /^([\s\t]*)((?:cmpl|cmpg)-(?:float|double)|cmp-long|(?:aget|aput)(?:-wide|-object|-boolean|-byte|-char|-short)?|(?:add|sub|mul|div|rem|and|or|xor|shl|shr|ushr)-(?:int|long)|(?:add|sub|mul|div|rem)-(?:float|double))([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op vAA, vBB, vCC" - }], - "#opcode-format-23x-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)((?:cmpl|cmpg)-(?:float|double)|cmp-long|(?:aget|aput)(?:-wide|-object|-boolean|-byte|-char|-short)?|(?:add|sub|mul|div|rem|and|or|xor|shl|shr|ushr)-(?:int|long)|(?:add|sub|mul|div|rem)-(?:float|double))/ - }], - "#opcode-format-3rc-type": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(filled-new-array\/range)( {)([vp](?:0|[1-9][\d]{0,3}|[1-5][\d]{4}|6[0-4][\d]{3}|65[0-4][\d]{2}|655[0-2][\d]|6553[0-5])\b)( \.\. )([vp](?:0|[1-9][\d]{0,3}|[1-5][\d]{4}|6[0-4][\d]{3}|65[0-4][\d]{2}|655[0-2][\d]|6553[0-5])\b)(},[\s\t]*[\[]+)(?:(Z|B|S|C|I|J|F|D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op {vCCCC .. vNNNN}, type@BBBB" - }], - "#opcode-format-3rc-meth": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "entity.name.function.smali", - "text", - "constant.numeric.smali", - "text", - "constant.numeric.smali", - "text", - "constant.numeric.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(invoke-(?:virtual|super|direct|static|interface)\/range)( {[\s\t]*)([vp](?:0|[1-9][\d]{0,3}|[1-5][\d]{4}|6[0-4][\d]{3}|65[0-4][\d]{2}|655[0-2][\d]|6553[0-5])\b)( \.\. )([vp](?:0|[1-9][\d]{0,3}|[1-5][\d]{4}|6[0-4][\d]{3}|65[0-4][\d]{2}|655[0-2][\d]|6553[0-5])\b)([\s\t]*},[\s\t]*[\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;)(->)(||[\$\w_][\w\d_\$]*)(\()((?:[\[]*(?:Z|B|S|C|I|J|F|D|L[\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*;))*)(\))(?:(V)|([\[]*)(Z|B|S|C|I|J|F|D)|([\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))([\s\t]*)((?:#.*)?)$/, - comment: "Format: op {vCCCC .. vNNNN}, meth@BBBB" - }], - "#opcode-format-3rc-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)((?:filled-new-array|invoke-(?:virtual|super|direct|static|interface))\/range)/ - }], - "#opcode-format-35c-type": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(filled-new-array)( {)([vp](?:0|[1-9]|1[0-5])\b)(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b)(?:(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b))?(?:(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b))?(?:(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b))?(},[\s\t]*[\[]+)(?:(Z|B|S|C|I|J|F|D)|(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))([\s\t]*)((?:#.*)?)$/, - comment: "Format: op {vC, vD, vE, vF, vG}, type@BBBB" - }], - "#opcode-format-35c-meth": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "variable.parameter.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "entity.name.function.smali", - "text", - "text", - "constant.numeric.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.numeric.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.numeric.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.numeric.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.numeric.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali", - "text", - "constant.numeric.smali", - "text", - "constant.numeric.smali", - "text", - "entity.name.tag.smali", - "constant.numeric.smali", - "entity.name.tag.smali" - ], - regex: /^([\s\t]*)(invoke-(?:virtual|super|direct|static|interface))( {[\s\t]*)((?:[vp](?:0|[1-9]|1[0-5])\b)?)(?:(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b))?(?:(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b))?(?:(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b))?(?:(,[\s\t]*)([vp](?:0|[1-9]|1[0-5])\b))?([\s\t]*},[\s\t]*[\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;)(->)(||[\$\w_][\w\d_\$]*)(\()(?:([\[]*)(Z|B|S|C|I|J|F|D)|([\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))?(?:([\[]*)(Z|B|S|C|I|J|F|D)|([\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))?(?:([\[]*)(Z|B|S|C|I|J|F|D)|([\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))?(?:([\[]*)(Z|B|S|C|I|J|F|D)|([\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))?(?:([\[]*)(Z|B|S|C|I|J|F|D)|([\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))?(\))(?:(?:(V)|([\[]*)(Z|B|S|C|I|J|F|D))|([\[]*)(L)([\w_\$][\w\d_\$]*(?:\/[\w_\$][\w\d_\$]*)*)(;))(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op {vC, vD, vE, vF, vG}, meth@BBBB" - }], - "#opcode-format-35c-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(filled-new-array|invoke-(?:virtual|super|direct|static|interface))/ - }], - "#opcode-format-51l": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(const-wide)(?!\/32)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)((?:-0x(?:0|[1-9a-f][\da-f]{0,6}|[1-7][\da-f]{7}|8[0]{7})|0x(?:0|[1-9a-f][\da-f]{0,6}|[1-7][\da-f]{7}))|(?:-0x(?:0|[1-9a-f][\da-f]{0,14}|[1-7][\da-f]{15}|8[0]{15})|0x(?:0|[1-9a-f][\da-f]{0,14}|[1-7][\da-f]{15}))L)\b(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true, - comment: "Format: op vAA, #+BBBBBBBBBBBBBBBB" - }], - "#opcode-format-51l-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(const-wide)(?!\/32)/ - }], - "#opcode-format-31i": [{ - token: [ - "text", - "support.function.smali", - "text", - "variable.parameter.smali", - "text", - "constant.numeric.smali" - ], - regex: /^([\s\t]*)(const(?:-wide\/32)?)([\s\t]+)([vp](?:0|[1-9][\d]?|1[\d]{2}|2[0-4][\d]|25[0-5])\b)(,[\s\t]*)(-0x(?:0|[1-9a-f][\da-f]{0,6}|[1-7][\da-f]{7}|8[0]{7})|0x(?:0|[1-9a-f][\da-f]{0,6}|[1-7][\da-f]{7}))\b(?=[\s\t]*(?:#.*)?$)/, - caseInsensitive: true, - comment: "Format: op vAA, #+BBBBBBBB" - }], - "#opcode-format-31i-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(const(?:-wide\/32)?)/ - }], - "#opcode-format-10t-20t-30t": [{ - token: [ - "text", - "support.function.smali", - "text", - "keyword.control" - ], - regex: /^([\s\t]*)(goto(?:\/16|\/32)?)( )(:[A-Za-z_\d]+)(?=[\s\t]*(?:#.*)?$)/, - comment: "Format: op +AA(AA(AAAA))" - }], - "#opcode-format-10t-20t-30t-relaxed": [{ - token: ["text", "invalid.illegal.smali"], - regex: /^([\s\t]*)(goto(?:\/16|\/32)?)/ - }] - } - - this.normalizeRules(); - }; - - SmaliHighlightRules.metaData = { - name: "Smali", - scopeName: "source.smali", - fileTypes: ["Smali"], - foldingStartMarker: "[\\s\\t]*\\.method", - foldingStopMarker: "[\\s\\t]*\\.end method" - } - - - oop.inherits(SmaliHighlightRules, TextHighlightRules); - - exports.SmaliHighlightRules = SmaliHighlightRules; -}); - -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/smali", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/smali_highlight_rules", "ace/mode/folding/cstyle"], function (require, exports, module) { - "use strict"; - - var oop = require("../lib/oop"); - var TextMode = require("./text").Mode; - var SmaliHighlightRules = require("./smali_highlight_rules").SmaliHighlightRules; - var FoldMode = require("./folding/cstyle").FoldMode; - - var Mode = function () { - this.HighlightRules = SmaliHighlightRules; - this.foldingRules = new FoldMode(); - }; - oop.inherits(Mode, TextMode); - - (function () { - this.$id = "ace/mode/smali"; - }).call(Mode.prototype); - - exports.Mode = Mode; -}); \ No newline at end of file diff --git a/src/ace/mode-smarty.js b/src/ace/mode-smarty.js deleted file mode 100644 index 03a1654ff..000000000 --- a/src/ace/mode-smarty.js +++ /dev/null @@ -1,2635 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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) { -"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/src/ace/mode-smithy.js b/src/ace/mode-smithy.js deleted file mode 100644 index 6dd0bcfaa..000000000 --- a/src/ace/mode-smithy.js +++ /dev/null @@ -1,507 +0,0 @@ -define("ace/mode/smithy_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 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = SmithyHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-snippets.js b/src/ace/mode-snippets.js deleted file mode 100644 index 32276191d..000000000 --- a/src/ace/mode-snippets.js +++ /dev/null @@ -1,207 +0,0 @@ -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.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/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/src/ace/mode-soy_template.js b/src/ace/mode-soy_template.js deleted file mode 100644 index a9674ac57..000000000 --- a/src/ace/mode-soy_template.js +++ /dev/null @@ -1,2848 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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) { -"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/src/ace/mode-space.js b/src/ace/mode-space.js deleted file mode 100644 index 75d093401..000000000 --- a/src/ace/mode-space.js +++ /dev/null @@ -1,167 +0,0 @@ -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.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/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/src/ace/mode-sparql.js b/src/ace/mode-sparql.js deleted file mode 100644 index ddb8287f4..000000000 --- a/src/ace/mode-sparql.js +++ /dev/null @@ -1,320 +0,0 @@ -define("ace/mode/sparql_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 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) { -"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/src/ace/mode-sql.js b/src/ace/mode-sql.js deleted file mode 100644 index 3bb9e83b7..000000000 --- a/src/ace/mode-sql.js +++ /dev/null @@ -1,271 +0,0 @@ -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" - ); - - 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" - ); - - 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/src/ace/mode-sqlserver.js b/src/ace/mode-sqlserver.js deleted file mode 100644 index 69aa4384f..000000000 --- a/src/ace/mode-sqlserver.js +++ /dev/null @@ -1,445 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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|" + - "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|" + - "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|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: "no_regex" - }, { - 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/src/ace/mode-stylus.js b/src/ace/mode-stylus.js deleted file mode 100644 index 803db9abf..000000000 --- a/src/ace/mode-stylus.js +++ /dev/null @@ -1,472 +0,0 @@ -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|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_\\-]*" - }, { - 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) { -"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-f0-9]{6}" - }, - { - token : "constant.numeric", // hex3 color - regex : "#[a-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.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/stylus",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/stylus_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"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/src/ace/mode-svg.js b/src/ace/mode-svg.js deleted file mode 100644 index d8e0358d1..000000000 --- a/src/ace/mode-svg.js +++ /dev/null @@ -1,1582 +0,0 @@ -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","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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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/src/ace/mode-swift.js b/src/ace/mode-swift.js deleted file mode 100644 index 06644d6fd..000000000 --- a/src/ace/mode-swift.js +++ /dev/null @@ -1,395 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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; -}); - -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/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var HighlightRules = require("./swift_highlight_rules").HighlightRules; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = HighlightRules; - this.foldingRules = new FoldMode(); - this.$behaviour = new CstyleBehaviour(); - 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/src/ace/mode-tcl.js b/src/ace/mode-tcl.js deleted file mode 100644 index 632f928ad..000000000 --- a/src/ace/mode-tcl.js +++ /dev/null @@ -1,387 +0,0 @@ -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/src/ace/mode-terraform.js b/src/ace/mode-terraform.js deleted file mode 100644 index bd252bc32..000000000 --- a/src/ace/mode-terraform.js +++ /dev/null @@ -1,400 +0,0 @@ -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": [ - {// TODO: double $ - 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/behaviour/cstyle","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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -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 = new CstyleBehaviour(); - 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/src/ace/mode-tex.js b/src/ace/mode-tex.js deleted file mode 100644 index 9b3fb3b37..000000000 --- a/src/ace/mode-tex.js +++ /dev/null @@ -1,160 +0,0 @@ -define("ace/mode/tex_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 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) { -"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/src/ace/mode-textile.js b/src/ace/mode-textile.js deleted file mode 100644 index 8ce8ad64d..000000000 --- a/src/ace/mode-textile.js +++ /dev/null @@ -1,150 +0,0 @@ -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/src/ace/mode-toml.js b/src/ace/mode-toml.js deleted file mode 100644 index d90ff9d2f..000000000 --- a/src/ace/mode-toml.js +++ /dev/null @@ -1,153 +0,0 @@ -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/src/ace/mode-tsx.js b/src/ace/mode-tsx.js deleted file mode 100644 index 2b5d18d63..000000000 --- a/src/ace/mode-tsx.js +++ /dev/null @@ -1,888 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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) { -"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/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var jsMode = require("./javascript").Mode; -var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -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 = new CstyleBehaviour(); - 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/typescript"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var tsMode = require("./typescript").Mode; - -var Mode = function() { - tsMode.call(this); - this.$highlightRuleConfig = {jsx: true}; -}; -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/src/ace/mode-turtle.js b/src/ace/mode-turtle.js deleted file mode 100644 index 8a48ae104..000000000 --- a/src/ace/mode-turtle.js +++ /dev/null @@ -1,296 +0,0 @@ -define("ace/mode/turtle_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 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) { -"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/src/ace/mode-twig.js b/src/ace/mode-twig.js deleted file mode 100644 index b5eac5b2b..000000000 --- a/src/ace/mode-twig.js +++ /dev/null @@ -1,2693 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/src/ace/mode-typescript.js b/src/ace/mode-typescript.js deleted file mode 100644 index 3bebbdaba..000000000 --- a/src/ace/mode-typescript.js +++ /dev/null @@ -1,869 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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) { -"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/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var jsMode = require("./javascript").Mode; -var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -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 = new CstyleBehaviour(); - 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/src/ace/mode-vala.js b/src/ace/mode-vala.js deleted file mode 100644 index 2fe15bac5..000000000 --- a/src/ace/mode-vala.js +++ /dev/null @@ -1,677 +0,0 @@ -define("ace/mode/vala_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 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/tokenizer","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle","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 Tokenizer = require("../tokenizer").Tokenizer; -var ValaHighlightRules = require("./vala_highlight_rules").ValaHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -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 = new CstyleBehaviour(); - 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/src/ace/mode-vbscript.js b/src/ace/mode-vbscript.js deleted file mode 100644 index 19a3a0027..000000000 --- a/src/ace/mode-vbscript.js +++ /dev/null @@ -1,635 +0,0 @@ -define("ace/mode/vbscript_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 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) { -"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/src/ace/mode-velocity.js b/src/ace/mode-velocity.js deleted file mode 100644 index 98458db2d..000000000 --- a/src/ace/mode-velocity.js +++ /dev/null @@ -1,2792 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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) { -"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/src/ace/mode-verilog.js b/src/ace/mode-verilog.js deleted file mode 100644 index 81a8558ec..000000000 --- a/src/ace/mode-verilog.js +++ /dev/null @@ -1,118 +0,0 @@ -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/src/ace/mode-vhdl.js b/src/ace/mode-vhdl.js deleted file mode 100644 index 75f22a1f5..000000000 --- a/src/ace/mode-vhdl.js +++ /dev/null @@ -1,116 +0,0 @@ -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|ailas|all|architecture|assert|attribute|"+ - "begin|block|buffer|bus|case|component|configuration|"+ - "disconnect|downto|else|elsif|end|entity|file|for|function|"+ - "generate|generic|guarded|if|impure|in|inertial|inout|is|"+ - "label|linkage|literal|loop|mapnew|next|of|on|open|others|"+ - "out|port|process|pure|range|record|reject|report|return|"+ - "select|severity|shared|signal|subtype|then|to|transport|"+ - "type|unaffected|united|until|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|variable"; - - 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/src/ace/mode-visualforce.js b/src/ace/mode-visualforce.js deleted file mode 100644 index 30c2cd90d..000000000 --- a/src/ace/mode-visualforce.js +++ /dev/null @@ -1,2640 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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|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_\\-]*" - }, { - 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); - if (/:[^;]+$/.test(line)) { - /([\w\-]+):[^:]*$/.test(line); - - return this.getPropertyValueCompletions(state, session, pos, prefix); - } else { - return this.getPropertyCompletions(state, session, pos, prefix); - } - } - - return []; - }; - - this.getPropertyCompletions = function(state, session, pos, prefix) { - var properties = Object.keys(propertyMap); - return properties.map(function(property){ - return { - caption: property, - snippet: property + ': $0;', - 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/behaviour/xml",["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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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) { -"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) { -"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/src/ace/mode-wollok.js b/src/ace/mode-wollok.js deleted file mode 100644 index e62e249a8..000000000 --- a/src/ace/mode-wollok.js +++ /dev/null @@ -1,914 +0,0 @@ -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\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - 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/javascript_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 identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - 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", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "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 - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - 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 : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\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|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 : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - 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|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|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" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - 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" - }] - }); - - 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 : "", - 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/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/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/cstyle","ace/mode/folding/cstyle"], 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 CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$quotes = {'"': '"', "'": "'", "`": "`"}; - - 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.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/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/src/ace/mode-xml.js b/src/ace/mode-xml.js deleted file mode 100644 index ac4fbd711..000000000 --- a/src/ace/mode-xml.js +++ /dev/null @@ -1,676 +0,0 @@ -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","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"); - -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.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 (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]) { - 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) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - 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 isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - if (firstTag.start.row == firstTag.end.row) - start.column = firstTag.end.column; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) - tag.start.column = tag.end.column; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).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/src/ace/mode-xquery.js b/src/ace/mode-xquery.js deleted file mode 100644 index 4512ba9d9..000000000 --- a/src/ace/mode-xquery.js +++ /dev/null @@ -1,2644 +0,0 @@ -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","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"); - -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.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 (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]) { - 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/src/ace/mode-yaml.js b/src/ace/mode-yaml.js deleted file mode 100644 index b1c6f1da1..000000000 --- a/src/ace/mode-yaml.js +++ /dev/null @@ -1,330 +0,0 @@ -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|$))/ - },{ - token: ["meta.tag", "keyword"], - regex: /(\w+?)(\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.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/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"], 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/coffee").FoldMode; - -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.$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/src/ace/mode-zeek.js b/src/ace/mode-zeek.js deleted file mode 100644 index 6cd3f6504..000000000 --- a/src/ace/mode-zeek.js +++ /dev/null @@ -1,539 +0,0 @@ -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) { -"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/src/ace/modelist.js b/src/ace/modelist.js new file mode 100644 index 000000000..0840e7108 --- /dev/null +++ b/src/ace/modelist.js @@ -0,0 +1,130 @@ +const modesByName = {}; +const modes = []; + +export function initModes() { + ace.define( + "ace/ext/modelist", + ["require", "exports", "module"], + function (require, exports, module) { + /** + * Calculates a specificity score for a mode. + * Higher score means more specific. + * - Anchored patterns (e.g., "^Dockerfile") get a base score of 1000. + * - Non-anchored patterns (extensions) are scored by length. + */ + function getModeSpecificityScore(modeInstance) { + const extensionsStr = modeInstance.extensions; + if (!extensionsStr) return 0; + + const patterns = extensionsStr.split("|"); + let maxScore = 0; + + for (const pattern of patterns) { + let currentScore = 0; + if (pattern.startsWith("^")) { + // Exact filename match or anchored pattern + currentScore = 1000 + (pattern.length - 1); // Subtract 1 for '^' + } else { + // Extension match + currentScore = pattern.length; + } + if (currentScore > maxScore) { + maxScore = currentScore; + } + } + return maxScore; + } + module.exports = { + getModeForPath(path) { + let mode = modesByName.text; + let fileName = path.split(/[\/\\]/).pop(); + // Sort modes by specificity (descending) to check most specific first + const sortedModes = [...modes].sort((a, b) => { + return getModeSpecificityScore(b) - getModeSpecificityScore(a); + }); + + for (const iMode of sortedModes) { + if (iMode.supportsFile?.(fileName)) { + mode = iMode; + break; + } + } + return mode; + }, + get modesByName() { + return modesByName; + }, + get modes() { + return modes; + }, + }; + }, + ); +} + +/** + * Add language mode to ace editor + * @param {string} name name of the mode + * @param {string|Array} extensions extensions of the mode + * @param {string} [caption] display name of the mode + */ +export function addMode(name, extensions, caption) { + const filename = name.toLowerCase(); + const mode = new Mode(filename, caption, extensions); + modesByName[filename] = mode; + modes.push(mode); +} + +/** + * Remove language mode from ace editor + * @param {string} name + */ +export function removeMode(name) { + const filename = name.toLowerCase(); + delete modesByName[filename]; + const modeIndex = modes.findIndex((mode) => mode.name === filename); + if (modeIndex >= 0) { + modes.splice(modeIndex, 1); + } +} + +class Mode { + extensions; + displayName; + name; + mode; + extRe; + + /** + * Create a new mode + * @param {string} name + * @param {string} caption + * @param {string|Array} extensions + */ + constructor(name, caption, extensions) { + if (Array.isArray(extensions)) { + extensions = extensions.join("|"); + } + + this.name = name; + this.mode = "ace/mode/" + name; + this.extensions = extensions; + this.caption = caption || this.name.replace(/_/g, " "); + let re; + + if (/\^/.test(extensions)) { + re = + extensions.replace(/\|(\^)?/g, function (a, b) { + return "$|" + (b ? "^" : "^.*\\."); + }) + "$"; + } else { + re = "^.*\\.(" + extensions + ")$"; + } + + this.extRe = new RegExp(re, "i"); + } + + supportsFile(filename) { + return this.extRe.test(filename); + } +} diff --git a/src/ace/snippets/abap.js b/src/ace/snippets/abap.js deleted file mode 100644 index 8a6b11f7d..000000000 --- a/src/ace/snippets/abap.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/abap"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/abc.js b/src/ace/snippets/abc.js deleted file mode 100644 index f46e77a7a..000000000 --- a/src/ace/snippets/abc.js +++ /dev/null @@ -1,45 +0,0 @@ -define("ace/snippets/abc",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "\n\ -snippet zupfnoter.print\n\ - %%%%hn.print {\"startpos\": ${1:pos_y}, \"t\":\"${2:title}\", \"v\":[${3:voices}], \"s\":[[${4:syncvoices}1,2]], \"f\":[${5:flowlines}], \"sf\":[${6:subflowlines}], \"j\":[${7:jumplines}]}\n\ -\n\ -snippet zupfnoter.note\n\ - %%%%hn.note {\"pos\": [${1:pos_x},${2:pos_y}], \"text\": \"${3:text}\", \"style\": \"${4:style}\"}\n\ -\n\ -snippet zupfnoter.annotation\n\ - %%%%hn.annotation {\"id\": \"${1:id}\", \"pos\": [${2:pos}], \"text\": \"${3:text}\"}\n\ -\n\ -snippet zupfnoter.lyrics\n\ - %%%%hn.lyrics {\"pos\": [${1:x_pos},${2:y_pos}]}\n\ -\n\ -snippet zupfnoter.legend\n\ - %%%%hn.legend {\"pos\": [${1:x_pos},${2:y_pos}]}\n\ -\n\ -\n\ -\n\ -snippet zupfnoter.target\n\ - \"^:${1:target}\"\n\ -\n\ -snippet zupfnoter.goto\n\ - \"^@${1:target}@${2:distance}\"\n\ -\n\ -snippet zupfnoter.annotationref\n\ - \"^#${1:target}\"\n\ -\n\ -snippet zupfnoter.annotation\n\ - \"^!${1:text}@${2:x_offset},${3:y_offset}\"\n\ -\n\ -\n\ -"; -exports.scope = "abc"; - -}); (function() { - window.require(["ace/snippets/abc"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/actionscript.js b/src/ace/snippets/actionscript.js deleted file mode 100644 index 1a2981860..000000000 --- a/src/ace/snippets/actionscript.js +++ /dev/null @@ -1,171 +0,0 @@ -define("ace/snippets/actionscript",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet main\n\ - package {\n\ - import flash.display.*;\n\ - import flash.Events.*;\n\ - \n\ - public class Main extends Sprite {\n\ - public function Main ( ) {\n\ - trace(\"start\");\n\ - stage.scaleMode = StageScaleMode.NO_SCALE;\n\ - stage.addEventListener(Event.RESIZE, resizeListener);\n\ - }\n\ - \n\ - private function resizeListener (e:Event):void {\n\ - trace(\"The application window changed size!\");\n\ - trace(\"New width: \" + stage.stageWidth);\n\ - trace(\"New height: \" + stage.stageHeight);\n\ - }\n\ - \n\ - }\n\ - \n\ - }\n\ -snippet class\n\ - ${1:public|internal} class ${2:name} ${3:extends } {\n\ - public function $2 ( ) {\n\ - (\"start\");\n\ - }\n\ - }\n\ -snippet all\n\ - package name {\n\ -\n\ - ${1:public|internal|final} class ${2:name} ${3:extends } {\n\ - private|public| static const FOO = \"abc\";\n\ - private|public| static var BAR = \"abc\";\n\ -\n\ - // class initializer - no JIT !! one time setup\n\ - if Cababilities.os == \"Linux|MacOS\" {\n\ - FOO = \"other\";\n\ - }\n\ -\n\ - // constructor:\n\ - public function $2 ( ){\n\ - super2();\n\ - trace(\"start\");\n\ - }\n\ - public function name (a, b...){\n\ - super.name(..);\n\ - lable:break\n\ - }\n\ - }\n\ - }\n\ -\n\ - function A(){\n\ - // A can only be accessed within this file\n\ - }\n\ -snippet switch\n\ - switch(${1}){\n\ - case ${2}:\n\ - ${3}\n\ - break;\n\ - default:\n\ - }\n\ -snippet case\n\ - case ${1}:\n\ - ${2}\n\ - break;\n\ -snippet package\n\ - package ${1:package}{\n\ - ${2}\n\ - }\n\ -snippet wh\n\ - while ${1:cond}{\n\ - ${2}\n\ - }\n\ -snippet do\n\ - do {\n\ - ${2}\n\ - } while (${1:cond})\n\ -snippet while\n\ - while ${1:cond}{\n\ - ${2}\n\ - }\n\ -snippet for enumerate names\n\ - for (${1:var} in ${2:object}){\n\ - ${3}\n\ - }\n\ -snippet for enumerate values\n\ - for each (${1:var} in ${2:object}){\n\ - ${3}\n\ - }\n\ -snippet get_set\n\ - function get ${1:name} {\n\ - return ${2}\n\ - }\n\ - function set $1 (newValue) {\n\ - ${3}\n\ - }\n\ -snippet interface\n\ - interface name {\n\ - function method(${1}):${2:returntype};\n\ - }\n\ -snippet try\n\ - try {\n\ - ${1}\n\ - } catch (error:ErrorType) {\n\ - ${2}\n\ - } finally {\n\ - ${3}\n\ - }\n\ -# For Loop (same as c.snippet)\n\ -snippet for for (..) {..}\n\ - for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n\ - ${4:/* code */}\n\ - }\n\ -# Custom For Loop\n\ -snippet forr\n\ - for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {\n\ - ${5:/* code */}\n\ - }\n\ -# If Condition\n\ -snippet if\n\ - if (${1:/* condition */}) {\n\ - ${2:/* code */}\n\ - }\n\ -snippet el\n\ - else {\n\ - ${1}\n\ - }\n\ -# Ternary conditional\n\ -snippet t\n\ - ${1:/* condition */} ? ${2:a} : ${3:b}\n\ -snippet fun\n\ - function ${1:function_name}(${2})${3}\n\ - {\n\ - ${4:/* code */}\n\ - }\n\ -# FlxSprite (usefull when using the flixel library)\n\ -snippet FlxSprite\n\ - package\n\ - {\n\ - import org.flixel.*\n\ -\n\ - public class ${1:ClassName} extends ${2:FlxSprite}\n\ - {\n\ - public function $1(${3: X:Number, Y:Number}):void\n\ - {\n\ - super(X,Y);\n\ - ${4: //code...}\n\ - }\n\ -\n\ - override public function update():void\n\ - {\n\ - super.update();\n\ - ${5: //code...}\n\ - }\n\ - }\n\ - }\n\ -\n\ -"; -exports.scope = "actionscript"; - -}); (function() { - window.require(["ace/snippets/actionscript"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/ada.js b/src/ace/snippets/ada.js deleted file mode 100644 index 8eb30a101..000000000 --- a/src/ace/snippets/ada.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/ada"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/alda.js b/src/ace/snippets/alda.js deleted file mode 100644 index a78279958..000000000 --- a/src/ace/snippets/alda.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/alda"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/apache_conf.js b/src/ace/snippets/apache_conf.js deleted file mode 100644 index 21986504c..000000000 --- a/src/ace/snippets/apache_conf.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/apache_conf"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/apex.js b/src/ace/snippets/apex.js deleted file mode 100644 index 2dbcd0fce..000000000 --- a/src/ace/snippets/apex.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/apex"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/applescript.js b/src/ace/snippets/applescript.js deleted file mode 100644 index ea322dbde..000000000 --- a/src/ace/snippets/applescript.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/applescript"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/aql.js b/src/ace/snippets/aql.js deleted file mode 100644 index 5568f6a10..000000000 --- a/src/ace/snippets/aql.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/aql"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/asciidoc.js b/src/ace/snippets/asciidoc.js deleted file mode 100644 index e5b47cfa5..000000000 --- a/src/ace/snippets/asciidoc.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/asciidoc"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/asl.js b/src/ace/snippets/asl.js deleted file mode 100644 index 0166b9553..000000000 --- a/src/ace/snippets/asl.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/asl"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/assembly_x86.js b/src/ace/snippets/assembly_x86.js deleted file mode 100644 index ffbf5971f..000000000 --- a/src/ace/snippets/assembly_x86.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/assembly_x86"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/autohotkey.js b/src/ace/snippets/autohotkey.js deleted file mode 100644 index e0674d4ea..000000000 --- a/src/ace/snippets/autohotkey.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/autohotkey"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/batchfile.js b/src/ace/snippets/batchfile.js deleted file mode 100644 index 0404a41ee..000000000 --- a/src/ace/snippets/batchfile.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/batchfile"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/c9search.js b/src/ace/snippets/c9search.js deleted file mode 100644 index d83a158fc..000000000 --- a/src/ace/snippets/c9search.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/c9search"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/c_cpp.js b/src/ace/snippets/c_cpp.js deleted file mode 100644 index 5b30145c5..000000000 --- a/src/ace/snippets/c_cpp.js +++ /dev/null @@ -1,152 +0,0 @@ -define("ace/snippets/c_cpp",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "## STL Collections\n\ -# std::array\n\ -snippet array\n\ - std::array<${1:T}, ${2:N}> ${3};${4}\n\ -# std::vector\n\ -snippet vector\n\ - std::vector<${1:T}> ${2};${3}\n\ -# std::deque\n\ -snippet deque\n\ - std::deque<${1:T}> ${2};${3}\n\ -# std::forward_list\n\ -snippet flist\n\ - std::forward_list<${1:T}> ${2};${3}\n\ -# std::list\n\ -snippet list\n\ - std::list<${1:T}> ${2};${3}\n\ -# std::set\n\ -snippet set\n\ - std::set<${1:T}> ${2};${3}\n\ -# std::map\n\ -snippet map\n\ - std::map<${1:Key}, ${2:T}> ${3};${4}\n\ -# std::multiset\n\ -snippet mset\n\ - std::multiset<${1:T}> ${2};${3}\n\ -# std::multimap\n\ -snippet mmap\n\ - std::multimap<${1:Key}, ${2:T}> ${3};${4}\n\ -# std::unordered_set\n\ -snippet uset\n\ - std::unordered_set<${1:T}> ${2};${3}\n\ -# std::unordered_map\n\ -snippet umap\n\ - std::unordered_map<${1:Key}, ${2:T}> ${3};${4}\n\ -# std::unordered_multiset\n\ -snippet umset\n\ - std::unordered_multiset<${1:T}> ${2};${3}\n\ -# std::unordered_multimap\n\ -snippet ummap\n\ - std::unordered_multimap<${1:Key}, ${2:T}> ${3};${4}\n\ -# std::stack\n\ -snippet stack\n\ - std::stack<${1:T}> ${2};${3}\n\ -# std::queue\n\ -snippet queue\n\ - std::queue<${1:T}> ${2};${3}\n\ -# std::priority_queue\n\ -snippet pqueue\n\ - std::priority_queue<${1:T}> ${2};${3}\n\ -##\n\ -## Access Modifiers\n\ -# private\n\ -snippet pri\n\ - private\n\ -# protected\n\ -snippet pro\n\ - protected\n\ -# public\n\ -snippet pub\n\ - public\n\ -# friend\n\ -snippet fr\n\ - friend\n\ -# mutable\n\ -snippet mu\n\ - mutable\n\ -## boilerplate \n\ -snippet boilerplate\n\ - #include <${1:stdio.h}>\n\ - \n\ - int main(){\n\ - ${2}\n\ - return 0;\n\ - };\n\ -## Class\n\ -# class\n\ -snippet cl\n\ - class ${1:`Filename('$1', 'name')`} \n\ - {\n\ - public:\n\ - $1(${2});\n\ - ~$1();\n\ -\n\ - private:\n\ - ${3:/* data */}\n\ - };\n\ -# member function implementation\n\ -snippet mfun\n\ - ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) {\n\ - ${5:/* code */}\n\ - }\n\ -# namespace\n\ -snippet ns\n\ - namespace ${1:`Filename('', 'my')`} {\n\ - ${2}\n\ - } /* namespace $1 */\n\ -##\n\ -## Input/Output\n\ -# std::cout\n\ -snippet cout\n\ - std::cout << ${1} << std::endl;${2}\n\ -# std::cin\n\ -snippet cin\n\ - std::cin >> ${1};${2}\n\ -##\n\ -## Iteration\n\ -# for i \n\ -snippet fori\n\ - for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n\ - ${4:/* code */}\n\ - }${5}\n\ -\n\ -# foreach\n\ -snippet fore\n\ - for (${1:auto} ${2:i} : ${3:container}) {\n\ - ${4:/* code */}\n\ - }${5}\n\ -# iterator\n\ -snippet iter\n\ - for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {\n\ - ${6}\n\ - }${7}\n\ -\n\ -# auto iterator\n\ -snippet itera\n\ - for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {\n\ - ${2:std::cout << *$1 << std::endl;}\n\ - }${3}\n\ -##\n\ -## Lambdas\n\ -# lamda (one line)\n\ -snippet ld\n\ - [${1}](${2}){${3:/* code */}}${4}\n\ -# lambda (multi-line)\n\ -snippet lld\n\ - [${1}](${2}){\n\ - ${3:/* code */}\n\ - }${4}\n\ -"; -exports.scope = "c_cpp"; - -}); (function() { - window.require(["ace/snippets/c_cpp"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/cirru.js b/src/ace/snippets/cirru.js deleted file mode 100644 index 8bd664ed3..000000000 --- a/src/ace/snippets/cirru.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/cirru"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/clojure.js b/src/ace/snippets/clojure.js deleted file mode 100644 index 8392fad95..000000000 --- a/src/ace/snippets/clojure.js +++ /dev/null @@ -1,104 +0,0 @@ -define("ace/snippets/clojure",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet comm\n\ - (comment\n\ - ${1}\n\ - )\n\ -snippet condp\n\ - (condp ${1:pred} ${2:expr}\n\ - ${3})\n\ -snippet def\n\ - (def ${1})\n\ -snippet defm\n\ - (defmethod ${1:multifn} \"${2:doc-string}\" ${3:dispatch-val} [${4:args}]\n\ - ${5})\n\ -snippet defmm\n\ - (defmulti ${1:name} \"${2:doc-string}\" ${3:dispatch-fn})\n\ -snippet defma\n\ - (defmacro ${1:name} \"${2:doc-string}\" ${3:dispatch-fn})\n\ -snippet defn\n\ - (defn ${1:name} \"${2:doc-string}\" [${3:arg-list}]\n\ - ${4})\n\ -snippet defp\n\ - (defprotocol ${1:name}\n\ - ${2})\n\ -snippet defr\n\ - (defrecord ${1:name} [${2:fields}]\n\ - ${3:protocol}\n\ - ${4})\n\ -snippet deft\n\ - (deftest ${1:name}\n\ - (is (= ${2:assertion})))\n\ - ${3})\n\ -snippet is\n\ - (is (= ${1} ${2}))\n\ -snippet defty\n\ - (deftype ${1:Name} [${2:fields}]\n\ - ${3:Protocol}\n\ - ${4})\n\ -snippet doseq\n\ - (doseq [${1:elem} ${2:coll}]\n\ - ${3})\n\ -snippet fn\n\ - (fn [${1:arg-list}] ${2})\n\ -snippet if\n\ - (if ${1:test-expr}\n\ - ${2:then-expr}\n\ - ${3:else-expr})\n\ -snippet if-let \n\ - (if-let [${1:result} ${2:test-expr}]\n\ - (${3:then-expr} $1)\n\ - (${4:else-expr}))\n\ -snippet imp\n\ - (:import [${1:package}])\n\ - & {:keys [${1:keys}] :or {${2:defaults}}}\n\ -snippet let\n\ - (let [${1:name} ${2:expr}]\n\ - ${3})\n\ -snippet letfn\n\ - (letfn [(${1:name) [${2:args}]\n\ - ${3})])\n\ -snippet map\n\ - (map ${1:func} ${2:coll})\n\ -snippet mapl\n\ - (map #(${1:lambda}) ${2:coll})\n\ -snippet met\n\ - (${1:name} [${2:this} ${3:args}]\n\ - ${4})\n\ -snippet ns\n\ - (ns ${1:name}\n\ - ${2})\n\ -snippet dotimes\n\ - (dotimes [_ 10]\n\ - (time\n\ - (dotimes [_ ${1:times}]\n\ - ${2})))\n\ -snippet pmethod\n\ - (${1:name} [${2:this} ${3:args}])\n\ -snippet refer\n\ - (:refer-clojure :exclude [${1}])\n\ -snippet require\n\ - (:require [${1:namespace} :as [${2}]])\n\ -snippet use\n\ - (:use [${1:namespace} :only [${2}]])\n\ -snippet print\n\ - (println ${1})\n\ -snippet reduce\n\ - (reduce ${1:(fn [p n] ${3})} ${2})\n\ -snippet when\n\ - (when ${1:test} ${2:body})\n\ -snippet when-let\n\ - (when-let [${1:result} ${2:test}]\n\ - ${3:body})\n\ -"; -exports.scope = "clojure"; - -}); (function() { - window.require(["ace/snippets/clojure"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/cobol.js b/src/ace/snippets/cobol.js deleted file mode 100644 index 1fece5b64..000000000 --- a/src/ace/snippets/cobol.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/cobol"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/coffee.js b/src/ace/snippets/coffee.js deleted file mode 100644 index be831570a..000000000 --- a/src/ace/snippets/coffee.js +++ /dev/null @@ -1,109 +0,0 @@ -define("ace/snippets/coffee",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# Closure loop\n\ -snippet forindo\n\ - for ${1:name} in ${2:array}\n\ - do ($1) ->\n\ - ${3:// body}\n\ -# Array comprehension\n\ -snippet fora\n\ - for ${1:name} in ${2:array}\n\ - ${3:// body...}\n\ -# Object comprehension\n\ -snippet foro\n\ - for ${1:key}, ${2:value} of ${3:object}\n\ - ${4:// body...}\n\ -# Range comprehension (inclusive)\n\ -snippet forr\n\ - for ${1:name} in [${2:start}..${3:finish}]\n\ - ${4:// body...}\n\ -snippet forrb\n\ - for ${1:name} in [${2:start}..${3:finish}] by ${4:step}\n\ - ${5:// body...}\n\ -# Range comprehension (exclusive)\n\ -snippet forrex\n\ - for ${1:name} in [${2:start}...${3:finish}]\n\ - ${4:// body...}\n\ -snippet forrexb\n\ - for ${1:name} in [${2:start}...${3:finish}] by ${4:step}\n\ - ${5:// body...}\n\ -# Function\n\ -snippet fun\n\ - (${1:args}) ->\n\ - ${2:// body...}\n\ -# Function (bound)\n\ -snippet bfun\n\ - (${1:args}) =>\n\ - ${2:// body...}\n\ -# Class\n\ -snippet cla class ..\n\ - class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ - ${2}\n\ -snippet cla class .. constructor: ..\n\ - class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ - constructor: (${2:args}) ->\n\ - ${3}\n\ -\n\ - ${4}\n\ -snippet cla class .. extends ..\n\ - class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n\ - ${3}\n\ -snippet cla class .. extends .. constructor: ..\n\ - class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n\ - constructor: (${3:args}) ->\n\ - ${4}\n\ -\n\ - ${5}\n\ -# If\n\ -snippet if\n\ - if ${1:condition}\n\ - ${2:// body...}\n\ -# If __ Else\n\ -snippet ife\n\ - if ${1:condition}\n\ - ${2:// body...}\n\ - else\n\ - ${3:// body...}\n\ -# Else if\n\ -snippet elif\n\ - else if ${1:condition}\n\ - ${2:// body...}\n\ -# Ternary If\n\ -snippet ifte\n\ - if ${1:condition} then ${2:value} else ${3:other}\n\ -# Unless\n\ -snippet unl\n\ - ${1:action} unless ${2:condition}\n\ -# Switch\n\ -snippet swi\n\ - switch ${1:object}\n\ - when ${2:value}\n\ - ${3:// body...}\n\ -\n\ -# Log\n\ -snippet log\n\ - console.log ${1}\n\ -# Try __ Catch\n\ -snippet try\n\ - try\n\ - ${1}\n\ - catch ${2:error}\n\ - ${3}\n\ -# Require\n\ -snippet req\n\ - ${2:$1} = require '${1:sys}'${3}\n\ -# Export\n\ -snippet exp\n\ - ${1:root} = exports ? this\n\ -"; -exports.scope = "coffee"; - -}); (function() { - window.require(["ace/snippets/coffee"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/coldfusion.js b/src/ace/snippets/coldfusion.js deleted file mode 100644 index 0f1ff4d2b..000000000 --- a/src/ace/snippets/coldfusion.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/coldfusion"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/crystal.js b/src/ace/snippets/crystal.js deleted file mode 100644 index 39614eb1f..000000000 --- a/src/ace/snippets/crystal.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/crystal"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/csharp.js b/src/ace/snippets/csharp.js deleted file mode 100644 index 22c8f86c0..000000000 --- a/src/ace/snippets/csharp.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/csharp"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/csound_document.js b/src/ace/snippets/csound_document.js deleted file mode 100644 index 30e1fe61e..000000000 --- a/src/ace/snippets/csound_document.js +++ /dev/null @@ -1,24 +0,0 @@ -define("ace/snippets/csound_document",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# \n\ -snippet synth\n\ - \n\ - \n\ - ${1}\n\ - \n\ - \n\ - e\n\ - \n\ - \n\ -"; -exports.scope = "csound_document"; - -}); (function() { - window.require(["ace/snippets/csound_document"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/csound_orchestra.js b/src/ace/snippets/csound_orchestra.js deleted file mode 100644 index 43a19f730..000000000 --- a/src/ace/snippets/csound_orchestra.js +++ /dev/null @@ -1,61 +0,0 @@ -define("ace/snippets/csound_orchestra",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# else\n\ -snippet else\n\ - else\n\ - ${1:/* statements */}\n\ -# elseif\n\ -snippet elseif\n\ - elseif ${1:/* condition */} then\n\ - ${2:/* statements */}\n\ -# if\n\ -snippet if\n\ - if ${1:/* condition */} then\n\ - ${2:/* statements */}\n\ - endif\n\ -# instrument block\n\ -snippet instr\n\ - instr ${1:name}\n\ - ${2:/* statements */}\n\ - endin\n\ -# i-time while loop\n\ -snippet iwhile\n\ - i${1:Index} = ${2:0}\n\ - while i${1:Index} < ${3:/* count */} do\n\ - ${4:/* statements */}\n\ - i${1:Index} += 1\n\ - od\n\ -# k-rate while loop\n\ -snippet kwhile\n\ - k${1:Index} = ${2:0}\n\ - while k${1:Index} < ${3:/* count */} do\n\ - ${4:/* statements */}\n\ - k${1:Index} += 1\n\ - od\n\ -# opcode\n\ -snippet opcode\n\ - opcode ${1:name}, ${2:/* output types */ 0}, ${3:/* input types */ 0}\n\ - ${4:/* statements */}\n\ - endop\n\ -# until loop\n\ -snippet until\n\ - until ${1:/* condition */} do\n\ - ${2:/* statements */}\n\ - od\n\ -# while loop\n\ -snippet while\n\ - while ${1:/* condition */} do\n\ - ${2:/* statements */}\n\ - od\n\ -"; -exports.scope = "csound_orchestra"; - -}); (function() { - window.require(["ace/snippets/csound_orchestra"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/csound_score.js b/src/ace/snippets/csound_score.js deleted file mode 100644 index 3d7ae0e67..000000000 --- a/src/ace/snippets/csound_score.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/csound_score"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/csp.js b/src/ace/snippets/csp.js deleted file mode 100644 index 685814919..000000000 --- a/src/ace/snippets/csp.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/csp"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/css.js b/src/ace/snippets/css.js deleted file mode 100644 index 4842e89e7..000000000 --- a/src/ace/snippets/css.js +++ /dev/null @@ -1,981 +0,0 @@ -define("ace/snippets/css",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet .\n\ - ${1} {\n\ - ${2}\n\ - }\n\ -snippet !\n\ - !important\n\ -snippet bdi:m+\n\ - -moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\n\ -snippet bdi:m\n\ - -moz-border-image: ${1};\n\ -snippet bdrz:m\n\ - -moz-border-radius: ${1};\n\ -snippet bxsh:m+\n\ - -moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\ -snippet bxsh:m\n\ - -moz-box-shadow: ${1};\n\ -snippet bdi:w+\n\ - -webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\n\ -snippet bdi:w\n\ - -webkit-border-image: ${1};\n\ -snippet bdrz:w\n\ - -webkit-border-radius: ${1};\n\ -snippet bxsh:w+\n\ - -webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\ -snippet bxsh:w\n\ - -webkit-box-shadow: ${1};\n\ -snippet @f\n\ - @font-face {\n\ - font-family: ${1};\n\ - src: url(${2});\n\ - }\n\ -snippet @i\n\ - @import url(${1});\n\ -snippet @m\n\ - @media ${1:print} {\n\ - ${2}\n\ - }\n\ -snippet bg+\n\ - background: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};\n\ -snippet bga\n\ - background-attachment: ${1};\n\ -snippet bga:f\n\ - background-attachment: fixed;\n\ -snippet bga:s\n\ - background-attachment: scroll;\n\ -snippet bgbk\n\ - background-break: ${1};\n\ -snippet bgbk:bb\n\ - background-break: bounding-box;\n\ -snippet bgbk:c\n\ - background-break: continuous;\n\ -snippet bgbk:eb\n\ - background-break: each-box;\n\ -snippet bgcp\n\ - background-clip: ${1};\n\ -snippet bgcp:bb\n\ - background-clip: border-box;\n\ -snippet bgcp:cb\n\ - background-clip: content-box;\n\ -snippet bgcp:nc\n\ - background-clip: no-clip;\n\ -snippet bgcp:pb\n\ - background-clip: padding-box;\n\ -snippet bgc\n\ - background-color: #${1:FFF};\n\ -snippet bgc:t\n\ - background-color: transparent;\n\ -snippet bgi\n\ - background-image: url(${1});\n\ -snippet bgi:n\n\ - background-image: none;\n\ -snippet bgo\n\ - background-origin: ${1};\n\ -snippet bgo:bb\n\ - background-origin: border-box;\n\ -snippet bgo:cb\n\ - background-origin: content-box;\n\ -snippet bgo:pb\n\ - background-origin: padding-box;\n\ -snippet bgpx\n\ - background-position-x: ${1};\n\ -snippet bgpy\n\ - background-position-y: ${1};\n\ -snippet bgp\n\ - background-position: ${1:0} ${2:0};\n\ -snippet bgr\n\ - background-repeat: ${1};\n\ -snippet bgr:n\n\ - background-repeat: no-repeat;\n\ -snippet bgr:x\n\ - background-repeat: repeat-x;\n\ -snippet bgr:y\n\ - background-repeat: repeat-y;\n\ -snippet bgr:r\n\ - background-repeat: repeat;\n\ -snippet bgz\n\ - background-size: ${1};\n\ -snippet bgz:a\n\ - background-size: auto;\n\ -snippet bgz:ct\n\ - background-size: contain;\n\ -snippet bgz:cv\n\ - background-size: cover;\n\ -snippet bg\n\ - background: ${1};\n\ -snippet bg:ie\n\ - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');\n\ -snippet bg:n\n\ - background: none;\n\ -snippet bd+\n\ - border: ${1:1px} ${2:solid} #${3:000};\n\ -snippet bdb+\n\ - border-bottom: ${1:1px} ${2:solid} #${3:000};\n\ -snippet bdbc\n\ - border-bottom-color: #${1:000};\n\ -snippet bdbi\n\ - border-bottom-image: url(${1});\n\ -snippet bdbi:n\n\ - border-bottom-image: none;\n\ -snippet bdbli\n\ - border-bottom-left-image: url(${1});\n\ -snippet bdbli:c\n\ - border-bottom-left-image: continue;\n\ -snippet bdbli:n\n\ - border-bottom-left-image: none;\n\ -snippet bdblrz\n\ - border-bottom-left-radius: ${1};\n\ -snippet bdbri\n\ - border-bottom-right-image: url(${1});\n\ -snippet bdbri:c\n\ - border-bottom-right-image: continue;\n\ -snippet bdbri:n\n\ - border-bottom-right-image: none;\n\ -snippet bdbrrz\n\ - border-bottom-right-radius: ${1};\n\ -snippet bdbs\n\ - border-bottom-style: ${1};\n\ -snippet bdbs:n\n\ - border-bottom-style: none;\n\ -snippet bdbw\n\ - border-bottom-width: ${1};\n\ -snippet bdb\n\ - border-bottom: ${1};\n\ -snippet bdb:n\n\ - border-bottom: none;\n\ -snippet bdbk\n\ - border-break: ${1};\n\ -snippet bdbk:c\n\ - border-break: close;\n\ -snippet bdcl\n\ - border-collapse: ${1};\n\ -snippet bdcl:c\n\ - border-collapse: collapse;\n\ -snippet bdcl:s\n\ - border-collapse: separate;\n\ -snippet bdc\n\ - border-color: #${1:000};\n\ -snippet bdci\n\ - border-corner-image: url(${1});\n\ -snippet bdci:c\n\ - border-corner-image: continue;\n\ -snippet bdci:n\n\ - border-corner-image: none;\n\ -snippet bdf\n\ - border-fit: ${1};\n\ -snippet bdf:c\n\ - border-fit: clip;\n\ -snippet bdf:of\n\ - border-fit: overwrite;\n\ -snippet bdf:ow\n\ - border-fit: overwrite;\n\ -snippet bdf:r\n\ - border-fit: repeat;\n\ -snippet bdf:sc\n\ - border-fit: scale;\n\ -snippet bdf:sp\n\ - border-fit: space;\n\ -snippet bdf:st\n\ - border-fit: stretch;\n\ -snippet bdi\n\ - border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\n\ -snippet bdi:n\n\ - border-image: none;\n\ -snippet bdl+\n\ - border-left: ${1:1px} ${2:solid} #${3:000};\n\ -snippet bdlc\n\ - border-left-color: #${1:000};\n\ -snippet bdli\n\ - border-left-image: url(${1});\n\ -snippet bdli:n\n\ - border-left-image: none;\n\ -snippet bdls\n\ - border-left-style: ${1};\n\ -snippet bdls:n\n\ - border-left-style: none;\n\ -snippet bdlw\n\ - border-left-width: ${1};\n\ -snippet bdl\n\ - border-left: ${1};\n\ -snippet bdl:n\n\ - border-left: none;\n\ -snippet bdlt\n\ - border-length: ${1};\n\ -snippet bdlt:a\n\ - border-length: auto;\n\ -snippet bdrz\n\ - border-radius: ${1};\n\ -snippet bdr+\n\ - border-right: ${1:1px} ${2:solid} #${3:000};\n\ -snippet bdrc\n\ - border-right-color: #${1:000};\n\ -snippet bdri\n\ - border-right-image: url(${1});\n\ -snippet bdri:n\n\ - border-right-image: none;\n\ -snippet bdrs\n\ - border-right-style: ${1};\n\ -snippet bdrs:n\n\ - border-right-style: none;\n\ -snippet bdrw\n\ - border-right-width: ${1};\n\ -snippet bdr\n\ - border-right: ${1};\n\ -snippet bdr:n\n\ - border-right: none;\n\ -snippet bdsp\n\ - border-spacing: ${1};\n\ -snippet bds\n\ - border-style: ${1};\n\ -snippet bds:ds\n\ - border-style: dashed;\n\ -snippet bds:dtds\n\ - border-style: dot-dash;\n\ -snippet bds:dtdtds\n\ - border-style: dot-dot-dash;\n\ -snippet bds:dt\n\ - border-style: dotted;\n\ -snippet bds:db\n\ - border-style: double;\n\ -snippet bds:g\n\ - border-style: groove;\n\ -snippet bds:h\n\ - border-style: hidden;\n\ -snippet bds:i\n\ - border-style: inset;\n\ -snippet bds:n\n\ - border-style: none;\n\ -snippet bds:o\n\ - border-style: outset;\n\ -snippet bds:r\n\ - border-style: ridge;\n\ -snippet bds:s\n\ - border-style: solid;\n\ -snippet bds:w\n\ - border-style: wave;\n\ -snippet bdt+\n\ - border-top: ${1:1px} ${2:solid} #${3:000};\n\ -snippet bdtc\n\ - border-top-color: #${1:000};\n\ -snippet bdti\n\ - border-top-image: url(${1});\n\ -snippet bdti:n\n\ - border-top-image: none;\n\ -snippet bdtli\n\ - border-top-left-image: url(${1});\n\ -snippet bdtli:c\n\ - border-corner-image: continue;\n\ -snippet bdtli:n\n\ - border-corner-image: none;\n\ -snippet bdtlrz\n\ - border-top-left-radius: ${1};\n\ -snippet bdtri\n\ - border-top-right-image: url(${1});\n\ -snippet bdtri:c\n\ - border-top-right-image: continue;\n\ -snippet bdtri:n\n\ - border-top-right-image: none;\n\ -snippet bdtrrz\n\ - border-top-right-radius: ${1};\n\ -snippet bdts\n\ - border-top-style: ${1};\n\ -snippet bdts:n\n\ - border-top-style: none;\n\ -snippet bdtw\n\ - border-top-width: ${1};\n\ -snippet bdt\n\ - border-top: ${1};\n\ -snippet bdt:n\n\ - border-top: none;\n\ -snippet bdw\n\ - border-width: ${1};\n\ -snippet bd\n\ - border: ${1};\n\ -snippet bd:n\n\ - border: none;\n\ -snippet b\n\ - bottom: ${1};\n\ -snippet b:a\n\ - bottom: auto;\n\ -snippet bxsh+\n\ - box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\ -snippet bxsh\n\ - box-shadow: ${1};\n\ -snippet bxsh:n\n\ - box-shadow: none;\n\ -snippet bxz\n\ - box-sizing: ${1};\n\ -snippet bxz:bb\n\ - box-sizing: border-box;\n\ -snippet bxz:cb\n\ - box-sizing: content-box;\n\ -snippet cps\n\ - caption-side: ${1};\n\ -snippet cps:b\n\ - caption-side: bottom;\n\ -snippet cps:t\n\ - caption-side: top;\n\ -snippet cl\n\ - clear: ${1};\n\ -snippet cl:b\n\ - clear: both;\n\ -snippet cl:l\n\ - clear: left;\n\ -snippet cl:n\n\ - clear: none;\n\ -snippet cl:r\n\ - clear: right;\n\ -snippet cp\n\ - clip: ${1};\n\ -snippet cp:a\n\ - clip: auto;\n\ -snippet cp:r\n\ - clip: rect(${1:0} ${2:0} ${3:0} ${4:0});\n\ -snippet c\n\ - color: #${1:000};\n\ -snippet ct\n\ - content: ${1};\n\ -snippet ct:a\n\ - content: attr(${1});\n\ -snippet ct:cq\n\ - content: close-quote;\n\ -snippet ct:c\n\ - content: counter(${1});\n\ -snippet ct:cs\n\ - content: counters(${1});\n\ -snippet ct:ncq\n\ - content: no-close-quote;\n\ -snippet ct:noq\n\ - content: no-open-quote;\n\ -snippet ct:n\n\ - content: normal;\n\ -snippet ct:oq\n\ - content: open-quote;\n\ -snippet coi\n\ - counter-increment: ${1};\n\ -snippet cor\n\ - counter-reset: ${1};\n\ -snippet cur\n\ - cursor: ${1};\n\ -snippet cur:a\n\ - cursor: auto;\n\ -snippet cur:c\n\ - cursor: crosshair;\n\ -snippet cur:d\n\ - cursor: default;\n\ -snippet cur:ha\n\ - cursor: hand;\n\ -snippet cur:he\n\ - cursor: help;\n\ -snippet cur:m\n\ - cursor: move;\n\ -snippet cur:p\n\ - cursor: pointer;\n\ -snippet cur:t\n\ - cursor: text;\n\ -snippet d\n\ - display: ${1};\n\ -snippet d:mib\n\ - display: -moz-inline-box;\n\ -snippet d:mis\n\ - display: -moz-inline-stack;\n\ -snippet d:b\n\ - display: block;\n\ -snippet d:cp\n\ - display: compact;\n\ -snippet d:ib\n\ - display: inline-block;\n\ -snippet d:itb\n\ - display: inline-table;\n\ -snippet d:i\n\ - display: inline;\n\ -snippet d:li\n\ - display: list-item;\n\ -snippet d:n\n\ - display: none;\n\ -snippet d:ri\n\ - display: run-in;\n\ -snippet d:tbcp\n\ - display: table-caption;\n\ -snippet d:tbc\n\ - display: table-cell;\n\ -snippet d:tbclg\n\ - display: table-column-group;\n\ -snippet d:tbcl\n\ - display: table-column;\n\ -snippet d:tbfg\n\ - display: table-footer-group;\n\ -snippet d:tbhg\n\ - display: table-header-group;\n\ -snippet d:tbrg\n\ - display: table-row-group;\n\ -snippet d:tbr\n\ - display: table-row;\n\ -snippet d:tb\n\ - display: table;\n\ -snippet ec\n\ - empty-cells: ${1};\n\ -snippet ec:h\n\ - empty-cells: hide;\n\ -snippet ec:s\n\ - empty-cells: show;\n\ -snippet exp\n\ - expression()\n\ -snippet fl\n\ - float: ${1};\n\ -snippet fl:l\n\ - float: left;\n\ -snippet fl:n\n\ - float: none;\n\ -snippet fl:r\n\ - float: right;\n\ -snippet f+\n\ - font: ${1:1em} ${2:Arial},${3:sans-serif};\n\ -snippet fef\n\ - font-effect: ${1};\n\ -snippet fef:eb\n\ - font-effect: emboss;\n\ -snippet fef:eg\n\ - font-effect: engrave;\n\ -snippet fef:n\n\ - font-effect: none;\n\ -snippet fef:o\n\ - font-effect: outline;\n\ -snippet femp\n\ - font-emphasize-position: ${1};\n\ -snippet femp:a\n\ - font-emphasize-position: after;\n\ -snippet femp:b\n\ - font-emphasize-position: before;\n\ -snippet fems\n\ - font-emphasize-style: ${1};\n\ -snippet fems:ac\n\ - font-emphasize-style: accent;\n\ -snippet fems:c\n\ - font-emphasize-style: circle;\n\ -snippet fems:ds\n\ - font-emphasize-style: disc;\n\ -snippet fems:dt\n\ - font-emphasize-style: dot;\n\ -snippet fems:n\n\ - font-emphasize-style: none;\n\ -snippet fem\n\ - font-emphasize: ${1};\n\ -snippet ff\n\ - font-family: ${1};\n\ -snippet ff:c\n\ - font-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;\n\ -snippet ff:f\n\ - font-family: ${1:Capitals,Impact},fantasy;\n\ -snippet ff:m\n\ - font-family: ${1:Monaco,'Courier New'},monospace;\n\ -snippet ff:ss\n\ - font-family: ${1:Helvetica,Arial},sans-serif;\n\ -snippet ff:s\n\ - font-family: ${1:Georgia,'Times New Roman'},serif;\n\ -snippet fza\n\ - font-size-adjust: ${1};\n\ -snippet fza:n\n\ - font-size-adjust: none;\n\ -snippet fz\n\ - font-size: ${1};\n\ -snippet fsm\n\ - font-smooth: ${1};\n\ -snippet fsm:aw\n\ - font-smooth: always;\n\ -snippet fsm:a\n\ - font-smooth: auto;\n\ -snippet fsm:n\n\ - font-smooth: never;\n\ -snippet fst\n\ - font-stretch: ${1};\n\ -snippet fst:c\n\ - font-stretch: condensed;\n\ -snippet fst:e\n\ - font-stretch: expanded;\n\ -snippet fst:ec\n\ - font-stretch: extra-condensed;\n\ -snippet fst:ee\n\ - font-stretch: extra-expanded;\n\ -snippet fst:n\n\ - font-stretch: normal;\n\ -snippet fst:sc\n\ - font-stretch: semi-condensed;\n\ -snippet fst:se\n\ - font-stretch: semi-expanded;\n\ -snippet fst:uc\n\ - font-stretch: ultra-condensed;\n\ -snippet fst:ue\n\ - font-stretch: ultra-expanded;\n\ -snippet fs\n\ - font-style: ${1};\n\ -snippet fs:i\n\ - font-style: italic;\n\ -snippet fs:n\n\ - font-style: normal;\n\ -snippet fs:o\n\ - font-style: oblique;\n\ -snippet fv\n\ - font-variant: ${1};\n\ -snippet fv:n\n\ - font-variant: normal;\n\ -snippet fv:sc\n\ - font-variant: small-caps;\n\ -snippet fw\n\ - font-weight: ${1};\n\ -snippet fw:b\n\ - font-weight: bold;\n\ -snippet fw:br\n\ - font-weight: bolder;\n\ -snippet fw:lr\n\ - font-weight: lighter;\n\ -snippet fw:n\n\ - font-weight: normal;\n\ -snippet f\n\ - font: ${1};\n\ -snippet h\n\ - height: ${1};\n\ -snippet h:a\n\ - height: auto;\n\ -snippet l\n\ - left: ${1};\n\ -snippet l:a\n\ - left: auto;\n\ -snippet lts\n\ - letter-spacing: ${1};\n\ -snippet lh\n\ - line-height: ${1};\n\ -snippet lisi\n\ - list-style-image: url(${1});\n\ -snippet lisi:n\n\ - list-style-image: none;\n\ -snippet lisp\n\ - list-style-position: ${1};\n\ -snippet lisp:i\n\ - list-style-position: inside;\n\ -snippet lisp:o\n\ - list-style-position: outside;\n\ -snippet list\n\ - list-style-type: ${1};\n\ -snippet list:c\n\ - list-style-type: circle;\n\ -snippet list:dclz\n\ - list-style-type: decimal-leading-zero;\n\ -snippet list:dc\n\ - list-style-type: decimal;\n\ -snippet list:d\n\ - list-style-type: disc;\n\ -snippet list:lr\n\ - list-style-type: lower-roman;\n\ -snippet list:n\n\ - list-style-type: none;\n\ -snippet list:s\n\ - list-style-type: square;\n\ -snippet list:ur\n\ - list-style-type: upper-roman;\n\ -snippet lis\n\ - list-style: ${1};\n\ -snippet lis:n\n\ - list-style: none;\n\ -snippet mb\n\ - margin-bottom: ${1};\n\ -snippet mb:a\n\ - margin-bottom: auto;\n\ -snippet ml\n\ - margin-left: ${1};\n\ -snippet ml:a\n\ - margin-left: auto;\n\ -snippet mr\n\ - margin-right: ${1};\n\ -snippet mr:a\n\ - margin-right: auto;\n\ -snippet mt\n\ - margin-top: ${1};\n\ -snippet mt:a\n\ - margin-top: auto;\n\ -snippet m\n\ - margin: ${1};\n\ -snippet m:4\n\ - margin: ${1:0} ${2:0} ${3:0} ${4:0};\n\ -snippet m:3\n\ - margin: ${1:0} ${2:0} ${3:0};\n\ -snippet m:2\n\ - margin: ${1:0} ${2:0};\n\ -snippet m:0\n\ - margin: 0;\n\ -snippet m:a\n\ - margin: auto;\n\ -snippet mah\n\ - max-height: ${1};\n\ -snippet mah:n\n\ - max-height: none;\n\ -snippet maw\n\ - max-width: ${1};\n\ -snippet maw:n\n\ - max-width: none;\n\ -snippet mih\n\ - min-height: ${1};\n\ -snippet miw\n\ - min-width: ${1};\n\ -snippet op\n\ - opacity: ${1};\n\ -snippet op:ie\n\ - filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});\n\ -snippet op:ms\n\ - -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';\n\ -snippet orp\n\ - orphans: ${1};\n\ -snippet o+\n\ - outline: ${1:1px} ${2:solid} #${3:000};\n\ -snippet oc\n\ - outline-color: ${1:#000};\n\ -snippet oc:i\n\ - outline-color: invert;\n\ -snippet oo\n\ - outline-offset: ${1};\n\ -snippet os\n\ - outline-style: ${1};\n\ -snippet ow\n\ - outline-width: ${1};\n\ -snippet o\n\ - outline: ${1};\n\ -snippet o:n\n\ - outline: none;\n\ -snippet ovs\n\ - overflow-style: ${1};\n\ -snippet ovs:a\n\ - overflow-style: auto;\n\ -snippet ovs:mq\n\ - overflow-style: marquee;\n\ -snippet ovs:mv\n\ - overflow-style: move;\n\ -snippet ovs:p\n\ - overflow-style: panner;\n\ -snippet ovs:s\n\ - overflow-style: scrollbar;\n\ -snippet ovx\n\ - overflow-x: ${1};\n\ -snippet ovx:a\n\ - overflow-x: auto;\n\ -snippet ovx:h\n\ - overflow-x: hidden;\n\ -snippet ovx:s\n\ - overflow-x: scroll;\n\ -snippet ovx:v\n\ - overflow-x: visible;\n\ -snippet ovy\n\ - overflow-y: ${1};\n\ -snippet ovy:a\n\ - overflow-y: auto;\n\ -snippet ovy:h\n\ - overflow-y: hidden;\n\ -snippet ovy:s\n\ - overflow-y: scroll;\n\ -snippet ovy:v\n\ - overflow-y: visible;\n\ -snippet ov\n\ - overflow: ${1};\n\ -snippet ov:a\n\ - overflow: auto;\n\ -snippet ov:h\n\ - overflow: hidden;\n\ -snippet ov:s\n\ - overflow: scroll;\n\ -snippet ov:v\n\ - overflow: visible;\n\ -snippet pb\n\ - padding-bottom: ${1};\n\ -snippet pl\n\ - padding-left: ${1};\n\ -snippet pr\n\ - padding-right: ${1};\n\ -snippet pt\n\ - padding-top: ${1};\n\ -snippet p\n\ - padding: ${1};\n\ -snippet p:4\n\ - padding: ${1:0} ${2:0} ${3:0} ${4:0};\n\ -snippet p:3\n\ - padding: ${1:0} ${2:0} ${3:0};\n\ -snippet p:2\n\ - padding: ${1:0} ${2:0};\n\ -snippet p:0\n\ - padding: 0;\n\ -snippet pgba\n\ - page-break-after: ${1};\n\ -snippet pgba:aw\n\ - page-break-after: always;\n\ -snippet pgba:a\n\ - page-break-after: auto;\n\ -snippet pgba:l\n\ - page-break-after: left;\n\ -snippet pgba:r\n\ - page-break-after: right;\n\ -snippet pgbb\n\ - page-break-before: ${1};\n\ -snippet pgbb:aw\n\ - page-break-before: always;\n\ -snippet pgbb:a\n\ - page-break-before: auto;\n\ -snippet pgbb:l\n\ - page-break-before: left;\n\ -snippet pgbb:r\n\ - page-break-before: right;\n\ -snippet pgbi\n\ - page-break-inside: ${1};\n\ -snippet pgbi:a\n\ - page-break-inside: auto;\n\ -snippet pgbi:av\n\ - page-break-inside: avoid;\n\ -snippet pos\n\ - position: ${1};\n\ -snippet pos:a\n\ - position: absolute;\n\ -snippet pos:f\n\ - position: fixed;\n\ -snippet pos:r\n\ - position: relative;\n\ -snippet pos:s\n\ - position: static;\n\ -snippet q\n\ - quotes: ${1};\n\ -snippet q:en\n\ - quotes: '\\201C' '\\201D' '\\2018' '\\2019';\n\ -snippet q:n\n\ - quotes: none;\n\ -snippet q:ru\n\ - quotes: '\\00AB' '\\00BB' '\\201E' '\\201C';\n\ -snippet rz\n\ - resize: ${1};\n\ -snippet rz:b\n\ - resize: both;\n\ -snippet rz:h\n\ - resize: horizontal;\n\ -snippet rz:n\n\ - resize: none;\n\ -snippet rz:v\n\ - resize: vertical;\n\ -snippet r\n\ - right: ${1};\n\ -snippet r:a\n\ - right: auto;\n\ -snippet tbl\n\ - table-layout: ${1};\n\ -snippet tbl:a\n\ - table-layout: auto;\n\ -snippet tbl:f\n\ - table-layout: fixed;\n\ -snippet tal\n\ - text-align-last: ${1};\n\ -snippet tal:a\n\ - text-align-last: auto;\n\ -snippet tal:c\n\ - text-align-last: center;\n\ -snippet tal:l\n\ - text-align-last: left;\n\ -snippet tal:r\n\ - text-align-last: right;\n\ -snippet ta\n\ - text-align: ${1};\n\ -snippet ta:c\n\ - text-align: center;\n\ -snippet ta:l\n\ - text-align: left;\n\ -snippet ta:r\n\ - text-align: right;\n\ -snippet td\n\ - text-decoration: ${1};\n\ -snippet td:l\n\ - text-decoration: line-through;\n\ -snippet td:n\n\ - text-decoration: none;\n\ -snippet td:o\n\ - text-decoration: overline;\n\ -snippet td:u\n\ - text-decoration: underline;\n\ -snippet te\n\ - text-emphasis: ${1};\n\ -snippet te:ac\n\ - text-emphasis: accent;\n\ -snippet te:a\n\ - text-emphasis: after;\n\ -snippet te:b\n\ - text-emphasis: before;\n\ -snippet te:c\n\ - text-emphasis: circle;\n\ -snippet te:ds\n\ - text-emphasis: disc;\n\ -snippet te:dt\n\ - text-emphasis: dot;\n\ -snippet te:n\n\ - text-emphasis: none;\n\ -snippet th\n\ - text-height: ${1};\n\ -snippet th:a\n\ - text-height: auto;\n\ -snippet th:f\n\ - text-height: font-size;\n\ -snippet th:m\n\ - text-height: max-size;\n\ -snippet th:t\n\ - text-height: text-size;\n\ -snippet ti\n\ - text-indent: ${1};\n\ -snippet ti:-\n\ - text-indent: -9999px;\n\ -snippet tj\n\ - text-justify: ${1};\n\ -snippet tj:a\n\ - text-justify: auto;\n\ -snippet tj:d\n\ - text-justify: distribute;\n\ -snippet tj:ic\n\ - text-justify: inter-cluster;\n\ -snippet tj:ii\n\ - text-justify: inter-ideograph;\n\ -snippet tj:iw\n\ - text-justify: inter-word;\n\ -snippet tj:k\n\ - text-justify: kashida;\n\ -snippet tj:t\n\ - text-justify: tibetan;\n\ -snippet to+\n\ - text-outline: ${1:0} ${2:0} #${3:000};\n\ -snippet to\n\ - text-outline: ${1};\n\ -snippet to:n\n\ - text-outline: none;\n\ -snippet tr\n\ - text-replace: ${1};\n\ -snippet tr:n\n\ - text-replace: none;\n\ -snippet tsh+\n\ - text-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\ -snippet tsh\n\ - text-shadow: ${1};\n\ -snippet tsh:n\n\ - text-shadow: none;\n\ -snippet tt\n\ - text-transform: ${1};\n\ -snippet tt:c\n\ - text-transform: capitalize;\n\ -snippet tt:l\n\ - text-transform: lowercase;\n\ -snippet tt:n\n\ - text-transform: none;\n\ -snippet tt:u\n\ - text-transform: uppercase;\n\ -snippet tw\n\ - text-wrap: ${1};\n\ -snippet tw:no\n\ - text-wrap: none;\n\ -snippet tw:n\n\ - text-wrap: normal;\n\ -snippet tw:s\n\ - text-wrap: suppress;\n\ -snippet tw:u\n\ - text-wrap: unrestricted;\n\ -snippet t\n\ - top: ${1};\n\ -snippet t:a\n\ - top: auto;\n\ -snippet va\n\ - vertical-align: ${1};\n\ -snippet va:bl\n\ - vertical-align: baseline;\n\ -snippet va:b\n\ - vertical-align: bottom;\n\ -snippet va:m\n\ - vertical-align: middle;\n\ -snippet va:sub\n\ - vertical-align: sub;\n\ -snippet va:sup\n\ - vertical-align: super;\n\ -snippet va:tb\n\ - vertical-align: text-bottom;\n\ -snippet va:tt\n\ - vertical-align: text-top;\n\ -snippet va:t\n\ - vertical-align: top;\n\ -snippet v\n\ - visibility: ${1};\n\ -snippet v:c\n\ - visibility: collapse;\n\ -snippet v:h\n\ - visibility: hidden;\n\ -snippet v:v\n\ - visibility: visible;\n\ -snippet whsc\n\ - white-space-collapse: ${1};\n\ -snippet whsc:ba\n\ - white-space-collapse: break-all;\n\ -snippet whsc:bs\n\ - white-space-collapse: break-strict;\n\ -snippet whsc:k\n\ - white-space-collapse: keep-all;\n\ -snippet whsc:l\n\ - white-space-collapse: loose;\n\ -snippet whsc:n\n\ - white-space-collapse: normal;\n\ -snippet whs\n\ - white-space: ${1};\n\ -snippet whs:n\n\ - white-space: normal;\n\ -snippet whs:nw\n\ - white-space: nowrap;\n\ -snippet whs:pl\n\ - white-space: pre-line;\n\ -snippet whs:pw\n\ - white-space: pre-wrap;\n\ -snippet whs:p\n\ - white-space: pre;\n\ -snippet wid\n\ - widows: ${1};\n\ -snippet w\n\ - width: ${1};\n\ -snippet w:a\n\ - width: auto;\n\ -snippet wob\n\ - word-break: ${1};\n\ -snippet wob:ba\n\ - word-break: break-all;\n\ -snippet wob:bs\n\ - word-break: break-strict;\n\ -snippet wob:k\n\ - word-break: keep-all;\n\ -snippet wob:l\n\ - word-break: loose;\n\ -snippet wob:n\n\ - word-break: normal;\n\ -snippet wos\n\ - word-spacing: ${1};\n\ -snippet wow\n\ - word-wrap: ${1};\n\ -snippet wow:no\n\ - word-wrap: none;\n\ -snippet wow:n\n\ - word-wrap: normal;\n\ -snippet wow:s\n\ - word-wrap: suppress;\n\ -snippet wow:u\n\ - word-wrap: unrestricted;\n\ -snippet z\n\ - z-index: ${1};\n\ -snippet z:a\n\ - z-index: auto;\n\ -snippet zoo\n\ - zoom: 1;\n\ -"; -exports.scope = "css"; - -}); (function() { - window.require(["ace/snippets/css"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/curly.js b/src/ace/snippets/curly.js deleted file mode 100644 index d0c5487d9..000000000 --- a/src/ace/snippets/curly.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/curly"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/d.js b/src/ace/snippets/d.js deleted file mode 100644 index 18257d4f6..000000000 --- a/src/ace/snippets/d.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/d"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/dart.js b/src/ace/snippets/dart.js deleted file mode 100644 index f4612f327..000000000 --- a/src/ace/snippets/dart.js +++ /dev/null @@ -1,97 +0,0 @@ -define("ace/snippets/dart",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet lib\n\ - library ${1};\n\ - ${2}\n\ -snippet im\n\ - import '${1}';\n\ - ${2}\n\ -snippet pa\n\ - part '${1}';\n\ - ${2}\n\ -snippet pao\n\ - part of ${1};\n\ - ${2}\n\ -snippet main\n\ - void main() {\n\ - ${1:/* code */}\n\ - }\n\ -snippet st\n\ - static ${1}\n\ -snippet fi\n\ - final ${1}\n\ -snippet re\n\ - return ${1}\n\ -snippet br\n\ - break;\n\ -snippet th\n\ - throw ${1}\n\ -snippet cl\n\ - class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\ -snippet imp\n\ - implements ${1}\n\ -snippet ext\n\ - extends ${1}\n\ -snippet if\n\ - if (${1:true}) {\n\ - ${2}\n\ - }\n\ -snippet ife\n\ - if (${1:true}) {\n\ - ${2}\n\ - } else {\n\ - ${3}\n\ - }\n\ -snippet el\n\ - else\n\ -snippet sw\n\ - switch (${1}) {\n\ - ${2}\n\ - }\n\ -snippet cs\n\ - case ${1}:\n\ - ${2}\n\ -snippet de\n\ - default:\n\ - ${1}\n\ -snippet for\n\ - for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {\n\ - ${4:$1[$2]}\n\ - }\n\ -snippet fore\n\ - for (final ${2:item} in ${1:itemList}) {\n\ - ${3:/* code */}\n\ - }\n\ -snippet wh\n\ - while (${1:/* condition */}) {\n\ - ${2:/* code */}\n\ - }\n\ -snippet dowh\n\ - do {\n\ - ${2:/* code */}\n\ - } while (${1:/* condition */});\n\ -snippet as\n\ - assert(${1:/* condition */});\n\ -snippet try\n\ - try {\n\ - ${2}\n\ - } catch (${1:Exception e}) {\n\ - }\n\ -snippet tryf\n\ - try {\n\ - ${2}\n\ - } catch (${1:Exception e}) {\n\ - } finally {\n\ - }\n\ -"; -exports.scope = "dart"; - -}); (function() { - window.require(["ace/snippets/dart"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/diff.js b/src/ace/snippets/diff.js deleted file mode 100644 index 478e6fe24..000000000 --- a/src/ace/snippets/diff.js +++ /dev/null @@ -1,25 +0,0 @@ -define("ace/snippets/diff",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\n\ -snippet header DEP-3 style header\n\ - Description: ${1}\n\ - Origin: ${2:vendor|upstream|other}, ${3:url of the original patch}\n\ - Bug: ${4:url in upstream bugtracker}\n\ - Forwarded: ${5:no|not-needed|url}\n\ - Author: ${6:`g:snips_author`}\n\ - Reviewed-by: ${7:name and email}\n\ - Last-Update: ${8:`strftime(\"%Y-%m-%d\")`}\n\ - Applied-Upstream: ${9:upstream version|url|commit}\n\ -\n\ -"; -exports.scope = "diff"; - -}); (function() { - window.require(["ace/snippets/diff"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/django.js b/src/ace/snippets/django.js deleted file mode 100644 index 07692569a..000000000 --- a/src/ace/snippets/django.js +++ /dev/null @@ -1,135 +0,0 @@ -define("ace/snippets/django",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# Model Fields\n\ -\n\ -# Note: Optional arguments are using defaults that match what Django will use\n\ -# as a default, e.g. with max_length fields. Doing this as a form of self\n\ -# documentation and to make it easy to know whether you should override the\n\ -# default or not.\n\ -\n\ -# Note: Optional arguments that are booleans will use the opposite since you\n\ -# can either not specify them, or override them, e.g. auto_now_add=False.\n\ -\n\ -snippet auto\n\ - ${1:FIELDNAME} = models.AutoField(${2})\n\ -snippet bool\n\ - ${1:FIELDNAME} = models.BooleanField(${2:default=True})\n\ -snippet block\n\ - {% block ${1:container} %}\n\ - {% endblock %}\n\ -snippet char\n\ - ${1:FIELDNAME} = models.CharField(max_length=${2}${3:, blank=True})\n\ -snippet comma\n\ - ${1:FIELDNAME} = models.CommaSeparatedIntegerField(max_length=${2}${3:, blank=True})\n\ -snippet date\n\ - ${1:FIELDNAME} = models.DateField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\n\ -snippet datetime\n\ - ${1:FIELDNAME} = models.DateTimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\n\ -snippet decimal\n\ - ${1:FIELDNAME} = models.DecimalField(max_digits=${2}, decimal_places=${3})\n\ -snippet email\n\ - ${1:FIELDNAME} = models.EmailField(max_length=${2:75}${3:, blank=True})\n\ -snippet file\n\ - ${1:FIELDNAME} = models.FileField(upload_to=${2:path/for/upload}${3:, max_length=100})\n\ -snippet filepath\n\ - ${1:FIELDNAME} = models.FilePathField(path=${2:\"/abs/path/to/dir\"}${3:, max_length=100}${4:, match=\"*.ext\"}${5:, recursive=True}${6:, blank=True, })\n\ -snippet float\n\ - ${1:FIELDNAME} = models.FloatField(${2})\n\ -snippet for\n\ - {% for ${1:obj} in ${2:objs} %}\n\ - {% endfor %}\n\ -snippet if\n\ - {% if ${1} %}\n\ - {% endif %}\n\ -snippet image\n\ - ${1:FIELDNAME} = models.ImageField(upload_to=${2:path/for/upload}${3:, height_field=height, width_field=width}${4:, max_length=100})\n\ -snippet int\n\ - ${1:FIELDNAME} = models.IntegerField(${2})\n\ -snippet ip\n\ - ${1:FIELDNAME} = models.IPAddressField(${2})\n\ -snippet loads\n\ - {% load ${1:static} %}\n\ -snippet nullbool\n\ - ${1:FIELDNAME} = models.NullBooleanField(${2})\n\ -snippet posint\n\ - ${1:FIELDNAME} = models.PositiveIntegerField(${2})\n\ -snippet possmallint\n\ - ${1:FIELDNAME} = models.PositiveSmallIntegerField(${2})\n\ -snippet slug\n\ - ${1:FIELDNAME} = models.SlugField(max_length=${2:50}${3:, blank=True})\n\ -snippet smallint\n\ - ${1:FIELDNAME} = models.SmallIntegerField(${2})\n\ -snippet tag:static\n\ - {% ${1:static} '${2}' %}\n\ -snippet text\n\ - ${1:FIELDNAME} = models.TextField(${2:blank=True})\n\ -snippet time\n\ - ${1:FIELDNAME} = models.TimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\n\ -snippet url\n\ - ${1:FIELDNAME} = models.URLField(${2:verify_exists=False}${3:, max_length=200}${4:, blank=True})\n\ -snippet xml\n\ - ${1:FIELDNAME} = models.XMLField(schema_path=${2:None}${3:, blank=True})\n\ -# Relational Fields\n\ -snippet fk\n\ - ${1:FIELDNAME} = models.ForeignKey(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, to_field=''})\n\ -snippet m2m\n\ - ${1:FIELDNAME} = models.ManyToManyField(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, symmetrical=False}${6:, through=''}${7:, db_table=''})\n\ -snippet o2o\n\ - ${1:FIELDNAME} = models.OneToOneField(${2:OtherModel}${3:, parent_link=True}${4:, related_name=''}${5:, limit_choices_to=}${6:, to_field=''})\n\ -\n\ -# Code Skeletons\n\ -\n\ -snippet form\n\ - class ${1:FormName}(forms.Form):\n\ - \"\"\"${2:docstring}\"\"\"\n\ - ${3}\n\ -\n\ -snippet model\n\ - class ${1:ModelName}(models.Model):\n\ - \"\"\"${2:docstring}\"\"\"\n\ - ${3}\n\ - \n\ - class Meta:\n\ - ${4}\n\ - \n\ - def __unicode__(self):\n\ - ${5}\n\ - \n\ - def save(self, force_insert=False, force_update=False):\n\ - ${6}\n\ - \n\ - @models.permalink\n\ - def get_absolute_url(self):\n\ - return ('${7:view_or_url_name}' ${8})\n\ -\n\ -snippet modeladmin\n\ - class ${1:ModelName}Admin(admin.ModelAdmin):\n\ - ${2}\n\ - \n\ - admin.site.register($1, $1Admin)\n\ - \n\ -snippet tabularinline\n\ - class ${1:ModelName}Inline(admin.TabularInline):\n\ - model = $1\n\ -\n\ -snippet stackedinline\n\ - class ${1:ModelName}Inline(admin.StackedInline):\n\ - model = $1\n\ -\n\ -snippet r2r\n\ - return render_to_response('${1:template.html}', {\n\ - ${2}\n\ - }${3:, context_instance=RequestContext(request)}\n\ - )\n\ -"; -exports.scope = "django"; - -}); (function() { - window.require(["ace/snippets/django"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/dockerfile.js b/src/ace/snippets/dockerfile.js deleted file mode 100644 index cd5d4182f..000000000 --- a/src/ace/snippets/dockerfile.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/dockerfile"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/dot.js b/src/ace/snippets/dot.js deleted file mode 100644 index aec363b01..000000000 --- a/src/ace/snippets/dot.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/dot"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/drools.js b/src/ace/snippets/drools.js deleted file mode 100644 index 11996e41e..000000000 --- a/src/ace/snippets/drools.js +++ /dev/null @@ -1,33 +0,0 @@ -define("ace/snippets/drools",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "\n\ -snippet rule\n\ - rule \"${1?:rule_name}\"\n\ - when\n\ - ${2:// when...} \n\ - then\n\ - ${3:// then...}\n\ - end\n\ -\n\ -snippet query\n\ - query ${1?:query_name}\n\ - ${2:// find} \n\ - end\n\ - \n\ -snippet declare\n\ - declare ${1?:type_name}\n\ - ${2:// attributes} \n\ - end\n\ -\n\ -"; -exports.scope = "drools"; - -}); (function() { - window.require(["ace/snippets/drools"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/edifact.js b/src/ace/snippets/edifact.js deleted file mode 100644 index c5b8e4cfe..000000000 --- a/src/ace/snippets/edifact.js +++ /dev/null @@ -1,254 +0,0 @@ -define("ace/snippets/edifact",["require","exports","module"], function(require, exports, module) { - "use strict"; - - exports.snippetText = "## Access Modifiers\n\ -snippet u\n\ - UN\n\ -snippet un\n\ - UNB\n\ -snippet pr\n\ - private\n\ -##\n\ -## Annotations\n\ -snippet before\n\ - @Before\n\ - static void ${1:intercept}(${2:args}) { ${3} }\n\ -snippet mm\n\ - @ManyToMany\n\ - ${1}\n\ -snippet mo\n\ - @ManyToOne\n\ - ${1}\n\ -snippet om\n\ - @OneToMany${1:(cascade=CascadeType.ALL)}\n\ - ${2}\n\ -snippet oo\n\ - @OneToOne\n\ - ${1}\n\ -##\n\ -## Basic Java packages and import\n\ -snippet im\n\ - import\n\ -snippet j.b\n\ - java.beans.\n\ -snippet j.i\n\ - java.io.\n\ -snippet j.m\n\ - java.math.\n\ -snippet j.n\n\ - java.net.\n\ -snippet j.u\n\ - java.util.\n\ -##\n\ -## Class\n\ -snippet cl\n\ - class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\ -snippet in\n\ - interface ${1:`Filename(\"\", \"untitled\")`} ${2:extends Parent}${3}\n\ -snippet tc\n\ - public class ${1:`Filename()`} extends ${2:TestCase}\n\ -##\n\ -## Class Enhancements\n\ -snippet ext\n\ - extends \n\ -snippet imp\n\ - implements\n\ -##\n\ -## Comments\n\ -snippet /*\n\ - /*\n\ - * ${1}\n\ - */\n\ -##\n\ -## Constants\n\ -snippet co\n\ - static public final ${1:String} ${2:var} = ${3};${4}\n\ -snippet cos\n\ - static public final String ${1:var} = \"${2}\";${3}\n\ -##\n\ -## Control Statements\n\ -snippet case\n\ - case ${1}:\n\ - ${2}\n\ -snippet def\n\ - default:\n\ - ${2}\n\ -snippet el\n\ - else\n\ -snippet elif\n\ - else if (${1}) ${2}\n\ -snippet if\n\ - if (${1}) ${2}\n\ -snippet sw\n\ - switch (${1}) {\n\ - ${2}\n\ - }\n\ -##\n\ -## Create a Method\n\ -snippet m\n\ - ${1:void} ${2:method}(${3}) ${4:throws }${5}\n\ -##\n\ -## Create a Variable\n\ -snippet v\n\ - ${1:String} ${2:var}${3: = null}${4};${5}\n\ -##\n\ -## Enhancements to Methods, variables, classes, etc.\n\ -snippet ab\n\ - abstract\n\ -snippet fi\n\ - final\n\ -snippet st\n\ - static\n\ -snippet sy\n\ - synchronized\n\ -##\n\ -## Error Methods\n\ -snippet err\n\ - System.err.print(\"${1:Message}\");\n\ -snippet errf\n\ - System.err.printf(\"${1:Message}\", ${2:exception});\n\ -snippet errln\n\ - System.err.println(\"${1:Message}\");\n\ -##\n\ -## Exception Handling\n\ -snippet as\n\ - assert ${1:test} : \"${2:Failure message}\";${3}\n\ -snippet ca\n\ - catch(${1:Exception} ${2:e}) ${3}\n\ -snippet thr\n\ - throw\n\ -snippet ths\n\ - throws\n\ -snippet try\n\ - try {\n\ - ${3}\n\ - } catch(${1:Exception} ${2:e}) {\n\ - }\n\ -snippet tryf\n\ - try {\n\ - ${3}\n\ - } catch(${1:Exception} ${2:e}) {\n\ - } finally {\n\ - }\n\ -##\n\ -## Find Methods\n\ -snippet findall\n\ - List<${1:listName}> ${2:items} = ${1}.findAll();${3}\n\ -snippet findbyid\n\ - ${1:var} ${2:item} = ${1}.findById(${3});${4}\n\ -##\n\ -## Javadocs\n\ -snippet /**\n\ - /**\n\ - * ${1}\n\ - */\n\ -snippet @au\n\ - @author `system(\"grep \\`id -un\\` /etc/passwd | cut -d \\\":\\\" -f5 | cut -d \\\",\\\" -f1\")`\n\ -snippet @br\n\ - @brief ${1:Description}\n\ -snippet @fi\n\ - @file ${1:`Filename()`}.java\n\ -snippet @pa\n\ - @param ${1:param}\n\ -snippet @re\n\ - @return ${1:param}\n\ -##\n\ -## Logger Methods\n\ -snippet debug\n\ - Logger.debug(${1:param});${2}\n\ -snippet error\n\ - Logger.error(${1:param});${2}\n\ -snippet info\n\ - Logger.info(${1:param});${2}\n\ -snippet warn\n\ - Logger.warn(${1:param});${2}\n\ -##\n\ -## Loops\n\ -snippet enfor\n\ - for (${1} : ${2}) ${3}\n\ -snippet for\n\ - for (${1}; ${2}; ${3}) ${4}\n\ -snippet wh\n\ - while (${1}) ${2}\n\ -##\n\ -## Main method\n\ -snippet main\n\ - public static void main (String[] args) {\n\ - ${1:/* code */}\n\ - }\n\ -##\n\ -## Print Methods\n\ -snippet print\n\ - System.out.print(\"${1:Message}\");\n\ -snippet printf\n\ - System.out.printf(\"${1:Message}\", ${2:args});\n\ -snippet println\n\ - System.out.println(${1});\n\ -##\n\ -## Render Methods\n\ -snippet ren\n\ - render(${1:param});${2}\n\ -snippet rena\n\ - renderArgs.put(\"${1}\", ${2});${3}\n\ -snippet renb\n\ - renderBinary(${1:param});${2}\n\ -snippet renj\n\ - renderJSON(${1:param});${2}\n\ -snippet renx\n\ - renderXml(${1:param});${2}\n\ -##\n\ -## Setter and Getter Methods\n\ -snippet set\n\ - ${1:public} void set${3:}(${2:String} ${4:}){\n\ - this.$4 = $4;\n\ - }\n\ -snippet get\n\ - ${1:public} ${2:String} get${3:}(){\n\ - return this.${4:};\n\ - }\n\ -##\n\ -## Terminate Methods or Loops\n\ -snippet re\n\ - return\n\ -snippet br\n\ - break;\n\ -##\n\ -## Test Methods\n\ -snippet t\n\ - public void test${1:Name}() throws Exception {\n\ - ${2}\n\ - }\n\ -snippet test\n\ - @Test\n\ - public void test${1:Name}() throws Exception {\n\ - ${2}\n\ - }\n\ -##\n\ -## Utils\n\ -snippet Sc\n\ - Scanner\n\ -##\n\ -## Miscellaneous\n\ -snippet action\n\ - public static void ${1:index}(${2:args}) { ${3} }\n\ -snippet rnf\n\ - notFound(${1:param});${2}\n\ -snippet rnfin\n\ - notFoundIfNull(${1:param});${2}\n\ -snippet rr\n\ - redirect(${1:param});${2}\n\ -snippet ru\n\ - unauthorized(${1:param});${2}\n\ -snippet unless\n\ - (unless=${1:param});${2}\n\ -"; - exports.scope = "edifact"; - -}); (function() { - window.require(["ace/snippets/edifact"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/eiffel.js b/src/ace/snippets/eiffel.js deleted file mode 100644 index 60a36440f..000000000 --- a/src/ace/snippets/eiffel.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/eiffel"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/ejs.js b/src/ace/snippets/ejs.js deleted file mode 100644 index 3e0f355e7..000000000 --- a/src/ace/snippets/ejs.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/ejs"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/elixir.js b/src/ace/snippets/elixir.js deleted file mode 100644 index f40833798..000000000 --- a/src/ace/snippets/elixir.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/elixir"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/elm.js b/src/ace/snippets/elm.js deleted file mode 100644 index c1122649f..000000000 --- a/src/ace/snippets/elm.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/elm"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/erlang.js b/src/ace/snippets/erlang.js deleted file mode 100644 index 6bcc1793d..000000000 --- a/src/ace/snippets/erlang.js +++ /dev/null @@ -1,174 +0,0 @@ -define("ace/snippets/erlang",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# module and export all\n\ -snippet mod\n\ - -module(${1:`Filename('', 'my')`}).\n\ - \n\ - -compile([export_all]).\n\ - \n\ - start() ->\n\ - ${2}\n\ - \n\ - stop() ->\n\ - ok.\n\ -# define directive\n\ -snippet def\n\ - -define(${1:macro}, ${2:body}).${3}\n\ -# export directive\n\ -snippet exp\n\ - -export([${1:function}/${2:arity}]).\n\ -# include directive\n\ -snippet inc\n\ - -include(\"${1:file}\").${2}\n\ -# behavior directive\n\ -snippet beh\n\ - -behaviour(${1:behaviour}).${2}\n\ -# if expression\n\ -snippet if\n\ - if\n\ - ${1:guard} ->\n\ - ${2:body}\n\ - end\n\ -# case expression\n\ -snippet case\n\ - case ${1:expression} of\n\ - ${2:pattern} ->\n\ - ${3:body};\n\ - end\n\ -# anonymous function\n\ -snippet fun\n\ - fun (${1:Parameters}) -> ${2:body} end${3}\n\ -# try...catch\n\ -snippet try\n\ - try\n\ - ${1}\n\ - catch\n\ - ${2:_:_} -> ${3:got_some_exception}\n\ - end\n\ -# record directive\n\ -snippet rec\n\ - -record(${1:record}, {\n\ - ${2:field}=${3:value}}).${4}\n\ -# todo comment\n\ -snippet todo\n\ - %% TODO: ${1}\n\ -## Snippets below (starting with '%') are in EDoc format.\n\ -## See http://www.erlang.org/doc/apps/edoc/chapter.html#id56887 for more details\n\ -# doc comment\n\ -snippet %d\n\ - %% @doc ${1}\n\ -# end of doc comment\n\ -snippet %e\n\ - %% @end\n\ -# specification comment\n\ -snippet %s\n\ - %% @spec ${1}\n\ -# private function marker\n\ -snippet %p\n\ - %% @private\n\ -# OTP application\n\ -snippet application\n\ - -module(${1:`Filename('', 'my')`}).\n\ -\n\ - -behaviour(application).\n\ -\n\ - -export([start/2, stop/1]).\n\ -\n\ - start(_Type, _StartArgs) ->\n\ - case ${2:root_supervisor}:start_link() of\n\ - {ok, Pid} ->\n\ - {ok, Pid};\n\ - Other ->\n\ - {error, Other}\n\ - end.\n\ -\n\ - stop(_State) ->\n\ - ok. \n\ -# OTP supervisor\n\ -snippet supervisor\n\ - -module(${1:`Filename('', 'my')`}).\n\ -\n\ - -behaviour(supervisor).\n\ -\n\ - %% API\n\ - -export([start_link/0]).\n\ -\n\ - %% Supervisor callbacks\n\ - -export([init/1]).\n\ -\n\ - -define(SERVER, ?MODULE).\n\ -\n\ - start_link() ->\n\ - supervisor:start_link({local, ?SERVER}, ?MODULE, []).\n\ -\n\ - init([]) ->\n\ - Server = {${2:my_server}, {$2, start_link, []},\n\ - permanent, 2000, worker, [$2]},\n\ - Children = [Server],\n\ - RestartStrategy = {one_for_one, 0, 1},\n\ - {ok, {RestartStrategy, Children}}.\n\ -# OTP gen_server\n\ -snippet gen_server\n\ - -module(${1:`Filename('', 'my')`}).\n\ -\n\ - -behaviour(gen_server).\n\ -\n\ - %% API\n\ - -export([\n\ - start_link/0\n\ - ]).\n\ -\n\ - %% gen_server callbacks\n\ - -export([init/1, handle_call/3, handle_cast/2, handle_info/2,\n\ - terminate/2, code_change/3]).\n\ -\n\ - -define(SERVER, ?MODULE).\n\ -\n\ - -record(state, {}).\n\ -\n\ - %%%===================================================================\n\ - %%% API\n\ - %%%===================================================================\n\ -\n\ - start_link() ->\n\ - gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).\n\ -\n\ - %%%===================================================================\n\ - %%% gen_server callbacks\n\ - %%%===================================================================\n\ -\n\ - init([]) ->\n\ - {ok, #state{}}.\n\ -\n\ - handle_call(_Request, _From, State) ->\n\ - Reply = ok,\n\ - {reply, Reply, State}.\n\ -\n\ - handle_cast(_Msg, State) ->\n\ - {noreply, State}.\n\ -\n\ - handle_info(_Info, State) ->\n\ - {noreply, State}.\n\ -\n\ - terminate(_Reason, _State) ->\n\ - ok.\n\ -\n\ - code_change(_OldVsn, State, _Extra) ->\n\ - {ok, State}.\n\ -\n\ - %%%===================================================================\n\ - %%% Internal functions\n\ - %%%===================================================================\n\ -\n\ -"; -exports.scope = "erlang"; - -}); (function() { - window.require(["ace/snippets/erlang"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/forth.js b/src/ace/snippets/forth.js deleted file mode 100644 index a7a0c053f..000000000 --- a/src/ace/snippets/forth.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/forth"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/fortran.js b/src/ace/snippets/fortran.js deleted file mode 100644 index ec3ae4e64..000000000 --- a/src/ace/snippets/fortran.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/fortran"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/fsharp.js b/src/ace/snippets/fsharp.js deleted file mode 100644 index dfe6a1391..000000000 --- a/src/ace/snippets/fsharp.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/fsharp"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/fsl.js b/src/ace/snippets/fsl.js deleted file mode 100644 index f55a69b43..000000000 --- a/src/ace/snippets/fsl.js +++ /dev/null @@ -1,14 +0,0 @@ -define("ace/snippets/fsl",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); (function() { - window.require(["ace/snippets/fsl"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/ftl.js b/src/ace/snippets/ftl.js deleted file mode 100644 index aa9f0e0bb..000000000 --- a/src/ace/snippets/ftl.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/ftl"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/gcode.js b/src/ace/snippets/gcode.js deleted file mode 100644 index d85b1b483..000000000 --- a/src/ace/snippets/gcode.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/gcode"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/gherkin.js b/src/ace/snippets/gherkin.js deleted file mode 100644 index 11c54661b..000000000 --- a/src/ace/snippets/gherkin.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/gherkin"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/gitignore.js b/src/ace/snippets/gitignore.js deleted file mode 100644 index a6af8361d..000000000 --- a/src/ace/snippets/gitignore.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/gitignore"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/glsl.js b/src/ace/snippets/glsl.js deleted file mode 100644 index bdea4bfaa..000000000 --- a/src/ace/snippets/glsl.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/glsl"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/gobstones.js b/src/ace/snippets/gobstones.js deleted file mode 100644 index 77b02daab..000000000 --- a/src/ace/snippets/gobstones.js +++ /dev/null @@ -1,1718 +0,0 @@ -define("ace/snippets/gobstones",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# scope: gobstones\n\ -\n\ -# program\n\ -snippet program\n\ - program {\n\ - ${1:// cuerpo...}\n\ - }\n\ -\n\ -# interactive program\n\ -snippet interactive program\n\ - interactive program {\n\ - ${1:INIT} -> { ${2:// cuerpo...} }\n\ - ${3:TIMEOUT(${4:5000}) -> { ${5:// cuerpo...} }\n\ - ${6:K_ENTER} -> { ${7:// cuerpo...} }\n\ - _ -> {}\n\ - }\n\ -\n\ -# procedure\n\ -snippet procedure\n\ - procedure ${1:Nombre}(${2:parametros}) {\n\ - ${3:// cuerpo...}\n\ - }\n\ -\n\ -# function\n\ -snippet function\n\ - function ${1:nombre}(${2:parametros}) {\n\ - return (${3:expresión..})\n\ - }\n\ -\n\ -# return\n\ -snippet return\n\ - return (${1:expresión...})\n\ -\n\ -# type\n\ -snippet type\n\ - type ${1:Nombre}\n\ -\n\ -# is variant\n\ -snippet is variant\n\ - is variant {\n\ - case ${1:NombreDelValor1} {}\n\ - case ${2:NombreDelValor2} {}\n\ - case ${3:NombreDelValor3} {}\n\ - case ${4:NombreDelValor4} {}\n\ - }\n\ -\n\ -# is record\n\ -snippet is record\n\ - is record {\n\ - field ${1:campo1} // ${2:Tipo}\n\ - field ${3:campo2} // ${4:Tipo}\n\ - field ${5:campo3} // ${6:Tipo}\n\ - field ${7:campo4} // ${8:Tipo}\n\ - }\n\ -\n\ -# type _ is variant\n\ -snippet type _ is variant\n\ - type ${1:Nombre} is variant {\n\ - case ${2:NombreDelValor1} {}\n\ - case ${3:NombreDelValor2} {}\n\ - case ${4:NombreDelValor3} {}\n\ - case ${5:NombreDelValor4} {}\n\ - }\n\ -\n\ -# type _ is record\n\ -snippet type _ is record\n\ - type ${1:Nombre} is record {\n\ - field ${2:campo1} // ${3:Tipo}\n\ - field ${4:campo2} // ${5:Tipo}\n\ - field ${6:campo3} // ${7:Tipo}\n\ - field ${8:campo4} // ${9:Tipo}\n\ - }\n\ -\n\ -# repeat\n\ -snippet repeat\n\ - repeat ${1:cantidad} {\n\ - ${2:// cuerpo...}\n\ - }\n\ -\n\ -# foreach\n\ -snippet foreach\n\ - foreach ${1:índice} in ${2:lista} {\n\ - ${3:// cuerpo...}\n\ - }\n\ -\n\ -# while\n\ -snippet while\n\ - while (${1?:condición}) {\n\ - ${2:// cuerpo...}\n\ - }\n\ -\n\ -# if\n\ -snippet if\n\ - if (${1?:condición}) {\n\ - ${2:// cuerpo...}\n\ - }\n\ -\n\ -# elseif\n\ -snippet elseif\n\ - elseif (${1?:condición}) {\n\ - ${2:// cuerpo...}\n\ - }\n\ -\n\ -# else\n\ -snippet else\n\ - else {\n\ - ${1:// cuerpo...}\n\ - }\n\ -\n\ -# if (con else)\n\ -snippet if (con else)\n\ - if (${1:condición}) {\n\ - ${2:// cuerpo...}\n\ - } else {\n\ - ${3:// cuerpo....}\n\ - }\n\ -\n\ -# if (con elseif)\n\ -snippet if (con elseif)\n\ - if (${1:condición}) {\n\ - ${2:// cuerpo...}\n\ - } elseif (${3:condición}) {\n\ - ${4:// cuerpo...}\n\ - }\n\ -\n\ -# if (con elseif y else)\n\ -snippet if (con elseif y else)\n\ - if (${1:condición}) {\n\ - ${2:// cuerpo...}\n\ - } elseif (${3:condición}) {\n\ - ${4:// cuerpo...}\n\ - } else {\n\ - ${5:// cuerpo....}\n\ - }\n\ -\n\ -# if (con 3 elseif)\n\ -snippet if (con 3 elseif)\n\ - if (${1:condición}) {\n\ - ${2:// cuerpo...}\n\ - } elseif (${3:condición}) {\n\ - ${4:// cuerpo...}\n\ - } elseif (${5:condición}) {\n\ - ${6:// cuerpo...}\n\ - } elseif (${7:condición}) {\n\ - ${8:// cuerpo...}\n\ - }\n\ -\n\ -# choose (2 valores)\n\ -snippet choose (2 valores)\n\ - choose\n\ - ${1:Valor1} when (${2:condición})\n\ - ${3:Valor2} otherwise\n\ -\n\ -# choose (2 valores y boom)\n\ -snippet choose (2 valores y boom)\n\ - choose\n\ - ${1:Valor1} when (${2:condición})\n\ - ${3:Valor2} when (${4:condición})\n\ - ${5:Valor3} when (${6:condición})\n\ - ${7:Valor4} when (${8:condición})\n\ - boom(\"${9:No es un valor válido}\") otherwise\n\ -\n\ -# matching (4 valores)\n\ -snippet matching (4 valores)\n\ - matching (${1:variable}) select\n\ - ${2:Valor1} on ${3:opción1}\n\ - ${4:Valor2} on ${5:opción2}\n\ - ${6:Valor3} on ${7:opción3}\n\ - ${8:Valor4} on ${9:opción4}\n\ - boom(\"${10:No es un valor válido}\") otherwise\n\ -\n\ -# select (4 casos)\n\ -snippet select (4 casos)\n\ - select\n\ - ${1:Valor1} on (${2:opción1})\n\ - ${3:Valor2} on (${4:opción2})\n\ - ${5:Valor3} on (${6:opción3})\n\ - ${7:Valor4} on (${8:opción4})\n\ - boom(\"${9:No es un valor válido}\") otherwise\n\ -\n\ -# switch\n\ -snippet switch\n\ - switch (${1:variable}) {\n\ - ${2:Valor1} -> {${3:// cuerpo...}}\n\ - ${4:Valor2} -> {${5:// cuerpo...}}\n\ - ${6:Valor3} -> {${7:// cuerpo...}}\n\ - ${8:Valor4} -> {${9:// cuerpo...}}\n\ - _ -> {${10:// cuerpo...}}\n\ - }\n\ -\n\ -# Poner\n\ -snippet Poner\n\ - Poner(${1:color})\n\ -\n\ -# Sacar\n\ -snippet Sacar\n\ - Sacar(${1:color})\n\ -\n\ -# Mover\n\ -snippet Mover\n\ - Mover(${1:dirección})\n\ -\n\ -# IrAlBorde\n\ -snippet IrAlBorde\n\ - IrAlBorde(${1:dirección})\n\ -\n\ -# VaciarTablero\n\ -snippet VaciarTablero\n\ - VaciarTablero()\n\ -\n\ -# BOOM\n\ -snippet BOOM\n\ - BOOM(\"${1:Mensaje de error}\")\n\ -\n\ -# hayBolitas\n\ -snippet hayBolitas\n\ - hayBolitas(${1:color})\n\ -\n\ -# nroBolitas\n\ -snippet nroBolitas\n\ - nroBolitas(${1:color})\n\ -\n\ -# puedeMover\n\ -snippet puedeMover\n\ - puedeMover(${1:dirección})\n\ -\n\ -# siguiente\n\ -snippet siguiente\n\ - siguiente(${1:color|dirección})\n\ -\n\ -# previo\n\ -snippet previo\n\ - previo(${1:color|dirección})\n\ -\n\ -# opuesto\n\ -snippet opuesto\n\ - opuesto(${1:dirección})\n\ -\n\ -# minDir\n\ -snippet minDir\n\ - minDir()\n\ -\n\ -# maxDir\n\ -snippet maxDir\n\ - maxDir()\n\ -\n\ -# minColor\n\ -snippet minColor\n\ - minDir()\n\ -\n\ -# maxColor\n\ -snippet maxColor\n\ - maxDir()\n\ -\n\ -# minBool\n\ -snippet minBool\n\ - minBool()\n\ -\n\ -# maxBool\n\ -snippet maxBool\n\ - maxBool()\n\ -\n\ -# primero\n\ -snippet primero\n\ - primero(${1:lista})\n\ -\n\ -# sinElPrimero\n\ -snippet sinElPrimero\n\ - sinElPrimero(${1:lista})\n\ -\n\ -# esVacía\n\ -snippet esVacía\n\ - esVacía(${1:lista})\n\ -\n\ -# boom\n\ -snippet boom\n\ - boom(\"${1:Mensaje de error}\")\n\ -\n\ -# Azul\n\ -snippet Azul\n\ - Azul\n\ -\n\ -# Negro\n\ -snippet Negro\n\ - Negro\n\ -\n\ -# Rojo\n\ -snippet Rojo\n\ - Rojo\n\ -\n\ -# Verde\n\ -snippet Verde\n\ - Verde\n\ -\n\ -# Norte\n\ -snippet Norte\n\ - Norte\n\ -\n\ -# Este\n\ -snippet Este\n\ - Este\n\ -\n\ -# Sur\n\ -snippet Sur\n\ - Sur\n\ -\n\ -# Oeste\n\ -snippet Oeste\n\ - Oeste\n\ -\n\ -# True\n\ -snippet True\n\ - True\n\ -\n\ -# False\n\ -snippet False\n\ - False\n\ -\n\ -# INIT\n\ -snippet INIT\n\ - INIT -> {$1:// cuerpo...}\n\ -\n\ -# TIMEOUT\n\ -snippet TIMEOUT\n\ - TIMEOUT(${1:5000}) -> {$2:// cuerpo...}\n\ -\n\ -# K_A\n\ -snippet K_A\n\ - K_A -> { ${1://cuerpo...} }\n\ -# K_CTRL_A\n\ -snippet K_CTRL_A\n\ - K_CTRL_A -> { ${1://cuerpo...} }\n\ -# K_ALT_A\n\ -snippet K_ALT_A\n\ - K_ALT_A -> { ${1://cuerpo...} }\n\ -# K_SHIFT_A\n\ -snippet K_SHIFT_A\n\ - K_SHIFT_A -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_A\n\ -snippet K_CTRL_ALT_A\n\ - K_CTRL_ALT_A -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_A\n\ -snippet K_CTRL_SHIFT_A\n\ - K_CTRL_SHIFT_A -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_A\n\ -snippet K_CTRL_ALT_SHIFT_A\n\ - K_CTRL_ALT_SHIFT_A -> { ${1://cuerpo...} }\n\ -\n\ -# K_B\n\ -snippet K_B\n\ - K_B -> { ${1://cuerpo...} }\n\ -# K_CTRL_B\n\ -snippet K_CTRL_B\n\ - K_CTRL_B -> { ${1://cuerpo...} }\n\ -# K_ALT_B\n\ -snippet K_ALT_B\n\ - K_ALT_B -> { ${1://cuerpo...} }\n\ -# K_SHIFT_B\n\ -snippet K_SHIFT_B\n\ - K_SHIFT_B -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_B\n\ -snippet K_CTRL_ALT_B\n\ - K_CTRL_ALT_B -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_B\n\ -snippet K_CTRL_SHIFT_B\n\ - K_CTRL_SHIFT_B -> { ${1://cuerpo...} }\n\ -# K_ALT_SHIFT_C\n\ -snippet K_ALT_SHIFT_C\n\ - K_ALT_SHIFT_C -> { ${1://cuerpo...} }\n\ -# K_CTRL_BLT_SHIFT_B\n\ -snippet K_CTRL_BLT_SHIFT_B\n\ - K_CTRL_ALT_SHIFT_B -> { ${1://cuerpo...} }\n\ -\n\ -# K_C\n\ -snippet K_C\n\ - K_C -> { ${1://cuerpo...} }\n\ -# K_CTRL_C\n\ -snippet K_CTRL_C\n\ - K_CTRL_C -> { ${1://cuerpo...} }\n\ -# K_ALT_C\n\ -snippet K_ALT_C\n\ - K_ALT_C -> { ${1://cuerpo...} }\n\ -# K_SHIFT_C\n\ -snippet K_SHIFT_C\n\ - K_SHIFT_C -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_C\n\ -snippet K_CTRL_ALT_C\n\ - K_CTRL_ALT_C -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_C\n\ -snippet K_CTRL_SHIFT_C\n\ - K_CTRL_SHIFT_C -> { ${1://cuerpo...} }\n\ -# K_ALT_SHIFT_C\n\ -snippet K_ALT_SHIFT_C\n\ - K_ALT_SHIFT_C -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_C\n\ -snippet K_CTRL_ALT_SHIFT_C\n\ - K_CTRL_ALT_SHIFT_C -> { ${1://cuerpo...} }\n\ -\n\ -# K_D\n\ -snippet K_D\n\ - K_D -> { ${1://cuerpo...} }\n\ -# K_CTRL_D\n\ -snippet K_CTRL_D\n\ - K_CTRL_D -> { ${1://cuerpo...} }\n\ -# K_ALT_D\n\ -snippet K_ALT_D\n\ - K_DLT_D -> { ${1://cuerpo...} }\n\ -# K_SHIFT_D\n\ -snippet K_SHIFT_D\n\ - K_SHIFT_D -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_D\n\ -snippet K_CTRL_ALT_D\n\ - K_CTRL_DLT_D -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_D\n\ -snippet K_CTRL_SHIFT_D\n\ - K_CTRL_SHIFT_D -> { ${1://cuerpo...} }\n\ -# K_ALT_SHIFT_D\n\ -snippet K_ALT_SHIFT_D\n\ - K_ALT_SHIFT_D -> { ${1://cuerpo...} }\n\ -# K_CTRL_DLT_SHIFT_D\n\ -snippet K_CTRL_DLT_SHIFT_D\n\ - K_CTRL_ALT_SHIFT_D -> { ${1://cuerpo...} }\n\ -\n\ -# K_E\n\ -snippet K_E\n\ - K_E -> { ${1://cuerpo...} }\n\ -# K_CTRL_E\n\ -snippet K_CTRL_E\n\ - K_CTRL_E -> { ${1://cuerpo...} }\n\ -# K_ALT_E\n\ -snippet K_ALT_E\n\ - K_ALT_E -> { ${1://cuerpo...} }\n\ -# K_SHIFT_E\n\ -snippet K_SHIFT_E\n\ - K_SHIFT_E -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_E\n\ -snippet K_CTRL_ALT_E\n\ - K_CTRL_ALT_E -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_E\n\ -snippet K_CTRL_SHIFT_E\n\ - K_CTRL_SHIFT_E -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_E\n\ -snippet K_CTRL_ALT_SHIFT_E\n\ - K_CTRL_ALT_SHIFT_E -> { ${1://cuerpo...} }\n\ -\n\ -# K_F\n\ -snippet K_F\n\ - K_F -> { ${1://cuerpo...} }\n\ -# K_CTRL_F\n\ -snippet K_CTRL_F\n\ - K_CTRL_F -> { ${1://cuerpo...} }\n\ -# K_ALT_F\n\ -snippet K_ALT_F\n\ - K_ALT_F -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F\n\ -snippet K_SHIFT_F\n\ - K_SHIFT_F -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F\n\ -snippet K_CTRL_ALT_F\n\ - K_CTRL_ALT_F -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F\n\ -snippet K_CTRL_SHIFT_F\n\ - K_CTRL_SHIFT_F -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F\n\ -snippet K_CTRL_ALT_SHIFT_F\n\ - K_CTRL_ALT_SHIFT_F -> { ${1://cuerpo...} }\n\ -\n\ -# K_G\n\ -snippet K_G\n\ - K_G -> { ${1://cuerpo...} }\n\ -# K_CTRL_G\n\ -snippet K_CTRL_G\n\ - K_CTRL_G -> { ${1://cuerpo...} }\n\ -# K_ALT_G\n\ -snippet K_ALT_G\n\ - K_ALT_G -> { ${1://cuerpo...} }\n\ -# K_SHIFT_G\n\ -snippet K_SHIFT_G\n\ - K_SHIFT_G -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_G\n\ -snippet K_CTRL_ALT_G\n\ - K_CTRL_ALT_G -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_G\n\ -snippet K_CTRL_SHIFT_G\n\ - K_CTRL_SHIFT_G -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_G\n\ -snippet K_CTRL_ALT_SHIFT_G\n\ - K_CTRL_ALT_SHIFT_G -> { ${1://cuerpo...} }\n\ -\n\ -# K_H\n\ -snippet K_H\n\ - K_H -> { ${1://cuerpo...} }\n\ -# K_CTRL_H\n\ -snippet K_CTRL_H\n\ - K_CTRL_H -> { ${1://cuerpo...} }\n\ -# K_ALT_H\n\ -snippet K_ALT_H\n\ - K_ALT_H -> { ${1://cuerpo...} }\n\ -# K_SHIFT_H\n\ -snippet K_SHIFT_H\n\ - K_SHIFT_H -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_H\n\ -snippet K_CTRL_ALT_H\n\ - K_CTRL_ALT_H -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_H\n\ -snippet K_CTRL_SHIFT_H\n\ - K_CTRL_SHIFT_H -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_H\n\ -snippet K_CTRL_ALT_SHIFT_H\n\ - K_CTRL_ALT_SHIFT_H -> { ${1://cuerpo...} }\n\ -\n\ -# K_I\n\ -snippet K_I\n\ - K_I -> { ${1://cuerpo...} }\n\ -# K_CTRL_I\n\ -snippet K_CTRL_I\n\ - K_CTRL_I -> { ${1://cuerpo...} }\n\ -# K_ALT_I\n\ -snippet K_ALT_I\n\ - K_ALT_I -> { ${1://cuerpo...} }\n\ -# K_SHIFT_I\n\ -snippet K_SHIFT_I\n\ - K_SHIFT_I -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_I\n\ -snippet K_CTRL_ALT_I\n\ - K_CTRL_ALT_I -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_I\n\ -snippet K_CTRL_SHIFT_I\n\ - K_CTRL_SHIFT_I -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_I\n\ -snippet K_CTRL_ALT_SHIFT_I\n\ - K_CTRL_ALT_SHIFT_I -> { ${1://cuerpo...} }\n\ -\n\ -# K_J\n\ -snippet K_J\n\ - K_J -> { ${1://cuerpo...} }\n\ -# K_CTRL_J\n\ -snippet K_CTRL_J\n\ - K_CTRL_J -> { ${1://cuerpo...} }\n\ -# K_ALT_J\n\ -snippet K_ALT_J\n\ - K_ALT_J -> { ${1://cuerpo...} }\n\ -# K_SHIFT_J\n\ -snippet K_SHIFT_J\n\ - K_SHIFT_J -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_J\n\ -snippet K_CTRL_ALT_J\n\ - K_CTRL_ALT_J -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_J\n\ -snippet K_CTRL_SHIFT_J\n\ - K_CTRL_SHIFT_J -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_J\n\ -snippet K_CTRL_ALT_SHIFT_J\n\ - K_CTRL_ALT_SHIFT_J -> { ${1://cuerpo...} }\n\ -\n\ -# K_K\n\ -snippet K_K\n\ - K_K -> { ${1://cuerpo...} }\n\ -# K_CTRL_K\n\ -snippet K_CTRL_K\n\ - K_CTRL_K -> { ${1://cuerpo...} }\n\ -# K_ALT_K\n\ -snippet K_ALT_K\n\ - K_ALT_K -> { ${1://cuerpo...} }\n\ -# K_SHIFT_K\n\ -snippet K_SHIFT_K\n\ - K_SHIFT_K -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_K\n\ -snippet K_CTRL_ALT_K\n\ - K_CTRL_ALT_K -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_K\n\ -snippet K_CTRL_SHIFT_K\n\ - K_CTRL_SHIFT_K -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_K\n\ -snippet K_CTRL_ALT_SHIFT_K\n\ - K_CTRL_ALT_SHIFT_K -> { ${1://cuerpo...} }\n\ -\n\ -# K_L\n\ -snippet K_L\n\ - K_L -> { ${1://cuerpo...} }\n\ -# K_CTRL_L\n\ -snippet K_CTRL_L\n\ - K_CTRL_L -> { ${1://cuerpo...} }\n\ -# K_ALT_L\n\ -snippet K_ALT_L\n\ - K_ALT_L -> { ${1://cuerpo...} }\n\ -# K_SHIFT_L\n\ -snippet K_SHIFT_L\n\ - K_SHIFT_L -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_L\n\ -snippet K_CTRL_ALT_L\n\ - K_CTRL_ALT_L -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_L\n\ -snippet K_CTRL_SHIFT_L\n\ - K_CTRL_SHIFT_L -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_L\n\ -snippet K_CTRL_ALT_SHIFT_L\n\ - K_CTRL_ALT_SHIFT_L -> { ${1://cuerpo...} }\n\ -\n\ -# K_M\n\ -snippet K_M\n\ - K_M -> { ${1://cuerpo...} }\n\ -# K_CTRL_M\n\ -snippet K_CTRL_M\n\ - K_CTRL_M -> { ${1://cuerpo...} }\n\ -# K_ALT_M\n\ -snippet K_ALT_M\n\ - K_ALT_M -> { ${1://cuerpo...} }\n\ -# K_SHIFT_M\n\ -snippet K_SHIFT_M\n\ - K_SHIFT_M -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_M\n\ -snippet K_CTRL_ALT_M\n\ - K_CTRL_ALT_M -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_M\n\ -snippet K_CTRL_SHIFT_M\n\ - K_CTRL_SHIFT_M -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_M\n\ -snippet K_CTRL_ALT_SHIFT_M\n\ - K_CTRL_ALT_SHIFT_M -> { ${1://cuerpo...} }\n\ -\n\ -# K_N\n\ -snippet K_N\n\ - K_N -> { ${1://cuerpo...} }\n\ -# K_CTRL_N\n\ -snippet K_CTRL_N\n\ - K_CTRL_N -> { ${1://cuerpo...} }\n\ -# K_ALT_N\n\ -snippet K_ALT_N\n\ - K_ALT_N -> { ${1://cuerpo...} }\n\ -# K_SHIFT_N\n\ -snippet K_SHIFT_N\n\ - K_SHIFT_N -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_N\n\ -snippet K_CTRL_ALT_N\n\ - K_CTRL_ALT_N -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_N\n\ -snippet K_CTRL_SHIFT_N\n\ - K_CTRL_SHIFT_N -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_N\n\ -snippet K_CTRL_ALT_SHIFT_N\n\ - K_CTRL_ALT_SHIFT_N -> { ${1://cuerpo...} }\n\ -\n\ -# K_Ñ\n\ -snippet K_Ñ\n\ - K_Ñ -> { ${1://cuerpo...} }\n\ -# K_CTRL_Ñ\n\ -snippet K_CTRL_Ñ\n\ - K_CTRL_Ñ -> { ${1://cuerpo...} }\n\ -# K_ALT_Ñ\n\ -snippet K_ALT_Ñ\n\ - K_ALT_Ñ -> { ${1://cuerpo...} }\n\ -# K_SHIFT_Ñ\n\ -snippet K_SHIFT_Ñ\n\ - K_SHIFT_Ñ -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_Ñ\n\ -snippet K_CTRL_ALT_Ñ\n\ - K_CTRL_ALT_Ñ -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_Ñ\n\ -snippet K_CTRL_SHIFT_Ñ\n\ - K_CTRL_SHIFT_Ñ -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_Ñ\n\ -snippet K_CTRL_ALT_SHIFT_Ñ\n\ - K_CTRL_ALT_SHIFT_Ñ -> { ${1://cuerpo...} }\n\ -\n\ -# K_O\n\ -snippet K_O\n\ - K_O -> { ${1://cuerpo...} }\n\ -# K_CTRL_O\n\ -snippet K_CTRL_O\n\ - K_CTRL_O -> { ${1://cuerpo...} }\n\ -# K_ALT_O\n\ -snippet K_ALT_O\n\ - K_ALT_O -> { ${1://cuerpo...} }\n\ -# K_SHIFT_O\n\ -snippet K_SHIFT_O\n\ - K_SHIFT_O -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_O\n\ -snippet K_CTRL_ALT_O\n\ - K_CTRL_ALT_O -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_O\n\ -snippet K_CTRL_SHIFT_O\n\ - K_CTRL_SHIFT_O -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_O\n\ -snippet K_CTRL_ALT_SHIFT_O\n\ - K_CTRL_ALT_SHIFT_O -> { ${1://cuerpo...} }\n\ -\n\ -# K_P\n\ -snippet K_P\n\ - K_P -> { ${1://cuerpo...} }\n\ -# K_CTRL_P\n\ -snippet K_CTRL_P\n\ - K_CTRL_P -> { ${1://cuerpo...} }\n\ -# K_ALT_P\n\ -snippet K_ALT_P\n\ - K_ALT_P -> { ${1://cuerpo...} }\n\ -# K_SHIFT_P\n\ -snippet K_SHIFT_P\n\ - K_SHIFT_P -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_P\n\ -snippet K_CTRL_ALT_P\n\ - K_CTRL_ALT_P -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_P\n\ -snippet K_CTRL_SHIFT_P\n\ - K_CTRL_SHIFT_P -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_P\n\ -snippet K_CTRL_ALT_SHIFT_P\n\ - K_CTRL_ALT_SHIFT_P -> { ${1://cuerpo...} }\n\ -\n\ -# K_Q\n\ -snippet K_Q\n\ - K_Q -> { ${1://cuerpo...} }\n\ -# K_CTRL_Q\n\ -snippet K_CTRL_Q\n\ - K_CTRL_Q -> { ${1://cuerpo...} }\n\ -# K_ALT_Q\n\ -snippet K_ALT_Q\n\ - K_ALT_Q -> { ${1://cuerpo...} }\n\ -# K_SHIFT_Q\n\ -snippet K_SHIFT_Q\n\ - K_SHIFT_Q -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_Q\n\ -snippet K_CTRL_ALT_Q\n\ - K_CTRL_ALT_Q -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_Q\n\ -snippet K_CTRL_SHIFT_Q\n\ - K_CTRL_SHIFT_Q -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_Q\n\ -snippet K_CTRL_ALT_SHIFT_Q\n\ - K_CTRL_ALT_SHIFT_Q -> { ${1://cuerpo...} }\n\ -\n\ -# K_R\n\ -snippet K_R\n\ - K_R -> { ${1://cuerpo...} }\n\ -# K_CTRL_R\n\ -snippet K_CTRL_R\n\ - K_CTRL_R -> { ${1://cuerpo...} }\n\ -# K_ALT_R\n\ -snippet K_ALT_R\n\ - K_ALT_R -> { ${1://cuerpo...} }\n\ -# K_SHIFT_R\n\ -snippet K_SHIFT_R\n\ - K_SHIFT_R -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_R\n\ -snippet K_CTRL_ALT_R\n\ - K_CTRL_ALT_R -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_R\n\ -snippet K_CTRL_SHIFT_R\n\ - K_CTRL_SHIFT_R -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_R\n\ -snippet K_CTRL_ALT_SHIFT_R\n\ - K_CTRL_ALT_SHIFT_R -> { ${1://cuerpo...} }\n\ -\n\ -# K_S\n\ -snippet K_S\n\ - K_S -> { ${1://cuerpo...} }\n\ -# K_CTRL_S\n\ -snippet K_CTRL_S\n\ - K_CTRL_S -> { ${1://cuerpo...} }\n\ -# K_ALT_S\n\ -snippet K_ALT_S\n\ - K_ALT_S -> { ${1://cuerpo...} }\n\ -# K_SHIFT_S\n\ -snippet K_SHIFT_S\n\ - K_SHIFT_S -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_S\n\ -snippet K_CTRL_ALT_S\n\ - K_CTRL_ALT_S -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_S\n\ -snippet K_CTRL_SHIFT_S\n\ - K_CTRL_SHIFT_S -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_S\n\ -snippet K_CTRL_ALT_SHIFT_S\n\ - K_CTRL_ALT_SHIFT_S -> { ${1://cuerpo...} }\n\ -\n\ -# K_T\n\ -snippet K_T\n\ - K_T -> { ${1://cuerpo...} }\n\ -# K_CTRL_T\n\ -snippet K_CTRL_T\n\ - K_CTRL_T -> { ${1://cuerpo...} }\n\ -# K_ALT_T\n\ -snippet K_ALT_T\n\ - K_ALT_T -> { ${1://cuerpo...} }\n\ -# K_SHIFT_T\n\ -snippet K_SHIFT_T\n\ - K_SHIFT_T -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_T\n\ -snippet K_CTRL_ALT_T\n\ - K_CTRL_ALT_T -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_T\n\ -snippet K_CTRL_SHIFT_T\n\ - K_CTRL_SHIFT_T -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_T\n\ -snippet K_CTRL_ALT_SHIFT_T\n\ - K_CTRL_ALT_SHIFT_T -> { ${1://cuerpo...} }\n\ -\n\ -# K_U\n\ -snippet K_U\n\ - K_U -> { ${1://cuerpo...} }\n\ -# K_CTRL_U\n\ -snippet K_CTRL_U\n\ - K_CTRL_U -> { ${1://cuerpo...} }\n\ -# K_ALT_U\n\ -snippet K_ALT_U\n\ - K_ALT_U -> { ${1://cuerpo...} }\n\ -# K_SHIFT_U\n\ -snippet K_SHIFT_U\n\ - K_SHIFT_U -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_U\n\ -snippet K_CTRL_ALT_U\n\ - K_CTRL_ALT_U -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_U\n\ -snippet K_CTRL_SHIFT_U\n\ - K_CTRL_SHIFT_U -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_U\n\ -snippet K_CTRL_ALT_SHIFT_U\n\ - K_CTRL_ALT_SHIFT_U -> { ${1://cuerpo...} }\n\ -\n\ -# K_V\n\ -snippet K_V\n\ - K_V -> { ${1://cuerpo...} }\n\ -# K_CTRL_V\n\ -snippet K_CTRL_V\n\ - K_CTRL_V -> { ${1://cuerpo...} }\n\ -# K_ALT_V\n\ -snippet K_ALT_V\n\ - K_ALT_V -> { ${1://cuerpo...} }\n\ -# K_SHIFT_V\n\ -snippet K_SHIFT_V\n\ - K_SHIFT_V -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_V\n\ -snippet K_CTRL_ALT_V\n\ - K_CTRL_ALT_V -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_V\n\ -snippet K_CTRL_SHIFT_V\n\ - K_CTRL_SHIFT_V -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_V\n\ -snippet K_CTRL_ALT_SHIFT_V\n\ - K_CTRL_ALT_SHIFT_V -> { ${1://cuerpo...} }\n\ -\n\ -# K_W\n\ -snippet K_W\n\ - K_W -> { ${1://cuerpo...} }\n\ -# K_CTRL_W\n\ -snippet K_CTRL_W\n\ - K_CTRL_W -> { ${1://cuerpo...} }\n\ -# K_ALT_W\n\ -snippet K_ALT_W\n\ - K_ALT_W -> { ${1://cuerpo...} }\n\ -# K_SHIFT_W\n\ -snippet K_SHIFT_W\n\ - K_SHIFT_W -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_W\n\ -snippet K_CTRL_ALT_W\n\ - K_CTRL_ALT_W -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_W\n\ -snippet K_CTRL_SHIFT_W\n\ - K_CTRL_SHIFT_W -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_W\n\ -snippet K_CTRL_ALT_SHIFT_W\n\ - K_CTRL_ALT_SHIFT_W -> { ${1://cuerpo...} }\n\ -\n\ -# K_X\n\ -snippet K_X\n\ - K_X -> { ${1://cuerpo...} }\n\ -# K_CTRL_X\n\ -snippet K_CTRL_X\n\ - K_CTRL_X -> { ${1://cuerpo...} }\n\ -# K_ALT_X\n\ -snippet K_ALT_X\n\ - K_ALT_X -> { ${1://cuerpo...} }\n\ -# K_SHIFT_X\n\ -snippet K_SHIFT_X\n\ - K_SHIFT_X -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_X\n\ -snippet K_CTRL_ALT_X\n\ - K_CTRL_ALT_X -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_X\n\ -snippet K_CTRL_SHIFT_X\n\ - K_CTRL_SHIFT_X -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_X\n\ -snippet K_CTRL_ALT_SHIFT_X\n\ - K_CTRL_ALT_SHIFT_X -> { ${1://cuerpo...} }\n\ -\n\ -# K_Y\n\ -snippet K_Y\n\ - K_Y -> { ${1://cuerpo...} }\n\ -# K_CTRL_Y\n\ -snippet K_CTRL_Y\n\ - K_CTRL_Y -> { ${1://cuerpo...} }\n\ -# K_ALT_Y\n\ -snippet K_ALT_Y\n\ - K_ALT_Y -> { ${1://cuerpo...} }\n\ -# K_SHIFT_Y\n\ -snippet K_SHIFT_Y\n\ - K_SHIFT_Y -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_Y\n\ -snippet K_CTRL_ALT_Y\n\ - K_CTRL_ALT_Y -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_Y\n\ -snippet K_CTRL_SHIFT_Y\n\ - K_CTRL_SHIFT_Y -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_Y\n\ -snippet K_CTRL_ALT_SHIFT_Y\n\ - K_CTRL_ALT_SHIFT_Y -> { ${1://cuerpo...} }\n\ -\n\ -# K_Z\n\ -snippet K_Z\n\ - K_Z -> { ${1://cuerpo...} }\n\ -# K_CTRL_Z\n\ -snippet K_CTRL_Z\n\ - K_CTRL_Z -> { ${1://cuerpo...} }\n\ -# K_ALT_Z\n\ -snippet K_ALT_Z\n\ - K_ALT_Z -> { ${1://cuerpo...} }\n\ -# K_SHIFT_Z\n\ -snippet K_SHIFT_Z\n\ - K_SHIFT_Z -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_Z\n\ -snippet K_CTRL_ALT_Z\n\ - K_CTRL_ALT_Z -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_Z\n\ -snippet K_CTRL_SHIFT_Z\n\ - K_CTRL_SHIFT_Z -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_Z\n\ -snippet K_CTRL_ALT_SHIFT_Z\n\ - K_CTRL_ALT_SHIFT_Z -> { ${1://cuerpo...} }\n\ -\n\ -# K_0\n\ -snippet K_0\n\ - K_0 -> { ${1://cuerpo...} }\n\ -# K_CTRL_0\n\ -snippet K_CTRL_0\n\ - K_CTRL_0 -> { ${1://cuerpo...} }\n\ -# K_ALT_0\n\ -snippet K_ALT_0\n\ - K_ALT_0 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_0\n\ -snippet K_SHIFT_0\n\ - K_SHIFT_0 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_0\n\ -snippet K_CTRL_ALT_0\n\ - K_CTRL_ALT_0 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_0\n\ -snippet K_CTRL_SHIFT_0\n\ - K_CTRL_SHIFT_0 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_0\n\ -snippet K_CTRL_ALT_SHIFT_0\n\ - K_CTRL_ALT_SHIFT_0 -> { ${1://cuerpo...} }\n\ -\n\ -# K_1\n\ -snippet K_1\n\ - K_1 -> { ${1://cuerpo...} }\n\ -# K_CTRL_1\n\ -snippet K_CTRL_1\n\ - K_CTRL_1 -> { ${1://cuerpo...} }\n\ -# K_ALT_1\n\ -snippet K_ALT_1\n\ - K_ALT_1 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_1\n\ -snippet K_SHIFT_1\n\ - K_SHIFT_1 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_1\n\ -snippet K_CTRL_ALT_1\n\ - K_CTRL_ALT_1 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_1\n\ -snippet K_CTRL_SHIFT_1\n\ - K_CTRL_SHIFT_1 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_1\n\ -snippet K_CTRL_ALT_SHIFT_1\n\ - K_CTRL_ALT_SHIFT_1 -> { ${1://cuerpo...} }\n\ -\n\ -# K_2\n\ -snippet K_2\n\ - K_2 -> { ${1://cuerpo...} }\n\ -# K_CTRL_2\n\ -snippet K_CTRL_2\n\ - K_CTRL_2 -> { ${1://cuerpo...} }\n\ -# K_ALT_2\n\ -snippet K_ALT_2\n\ - K_ALT_2 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_2\n\ -snippet K_SHIFT_2\n\ - K_SHIFT_2 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_2\n\ -snippet K_CTRL_ALT_2\n\ - K_CTRL_ALT_2 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_2\n\ -snippet K_CTRL_SHIFT_2\n\ - K_CTRL_SHIFT_2 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_2\n\ -snippet K_CTRL_ALT_SHIFT_2\n\ - K_CTRL_ALT_SHIFT_2 -> { ${1://cuerpo...} }\n\ -\n\ -# K_3\n\ -snippet K_3\n\ - K_3 -> { ${1://cuerpo...} }\n\ -# K_CTRL_3\n\ -snippet K_CTRL_3\n\ - K_CTRL_3 -> { ${1://cuerpo...} }\n\ -# K_ALT_3\n\ -snippet K_ALT_3\n\ - K_ALT_3 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_3\n\ -snippet K_SHIFT_3\n\ - K_SHIFT_3 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_3\n\ -snippet K_CTRL_ALT_3\n\ - K_CTRL_ALT_3 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_3\n\ -snippet K_CTRL_SHIFT_3\n\ - K_CTRL_SHIFT_3 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_3\n\ -snippet K_CTRL_ALT_SHIFT_3\n\ - K_CTRL_ALT_SHIFT_3 -> { ${1://cuerpo...} }\n\ -\n\ -# K_4\n\ -snippet K_4\n\ - K_4 -> { ${1://cuerpo...} }\n\ -# K_CTRL_4\n\ -snippet K_CTRL_4\n\ - K_CTRL_4 -> { ${1://cuerpo...} }\n\ -# K_ALT_4\n\ -snippet K_ALT_4\n\ - K_ALT_4 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_4\n\ -snippet K_SHIFT_4\n\ - K_SHIFT_4 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_4\n\ -snippet K_CTRL_ALT_4\n\ - K_CTRL_ALT_4 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_4\n\ -snippet K_CTRL_SHIFT_4\n\ - K_CTRL_SHIFT_4 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_4\n\ -snippet K_CTRL_ALT_SHIFT_4\n\ - K_CTRL_ALT_SHIFT_4 -> { ${1://cuerpo...} }\n\ -\n\ -# K_5\n\ -snippet K_5\n\ - K_5 -> { ${1://cuerpo...} }\n\ -# K_CTRL_5\n\ -snippet K_CTRL_5\n\ - K_CTRL_5 -> { ${1://cuerpo...} }\n\ -# K_ALT_5\n\ -snippet K_ALT_5\n\ - K_ALT_5 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_5\n\ -snippet K_SHIFT_5\n\ - K_SHIFT_5 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_5\n\ -snippet K_CTRL_ALT_5\n\ - K_CTRL_ALT_5 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_5\n\ -snippet K_CTRL_SHIFT_5\n\ - K_CTRL_SHIFT_5 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_5\n\ -snippet K_CTRL_ALT_SHIFT_5\n\ - K_CTRL_ALT_SHIFT_5 -> { ${1://cuerpo...} }\n\ -\n\ -# K_6\n\ -snippet K_6\n\ - K_6 -> { ${1://cuerpo...} }\n\ -# K_CTRL_6\n\ -snippet K_CTRL_6\n\ - K_CTRL_6 -> { ${1://cuerpo...} }\n\ -# K_ALT_6\n\ -snippet K_ALT_6\n\ - K_ALT_6 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_6\n\ -snippet K_SHIFT_6\n\ - K_SHIFT_6 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_6\n\ -snippet K_CTRL_ALT_6\n\ - K_CTRL_ALT_6 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_6\n\ -snippet K_CTRL_SHIFT_6\n\ - K_CTRL_SHIFT_6 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_6\n\ -snippet K_CTRL_ALT_SHIFT_6\n\ - K_CTRL_ALT_SHIFT_6 -> { ${1://cuerpo...} }\n\ -\n\ -# K_7\n\ -snippet K_7\n\ - K_7 -> { ${1://cuerpo...} }\n\ -# K_CTRL_7\n\ -snippet K_CTRL_7\n\ - K_CTRL_7 -> { ${1://cuerpo...} }\n\ -# K_ALT_7\n\ -snippet K_ALT_7\n\ - K_ALT_7 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_7\n\ -snippet K_SHIFT_7\n\ - K_SHIFT_7 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_7\n\ -snippet K_CTRL_ALT_7\n\ - K_CTRL_ALT_7 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_7\n\ -snippet K_CTRL_SHIFT_7\n\ - K_CTRL_SHIFT_7 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_7\n\ -snippet K_CTRL_ALT_SHIFT_7\n\ - K_CTRL_ALT_SHIFT_7 -> { ${1://cuerpo...} }\n\ -\n\ -# K_8\n\ -snippet K_8\n\ - K_8 -> { ${1://cuerpo...} }\n\ -# K_CTRL_8\n\ -snippet K_CTRL_8\n\ - K_CTRL_8 -> { ${1://cuerpo...} }\n\ -# K_ALT_8\n\ -snippet K_ALT_8\n\ - K_ALT_8 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_8\n\ -snippet K_SHIFT_8\n\ - K_SHIFT_8 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_8\n\ -snippet K_CTRL_ALT_8\n\ - K_CTRL_ALT_8 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_8\n\ -snippet K_CTRL_SHIFT_8\n\ - K_CTRL_SHIFT_8 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_8\n\ -snippet K_CTRL_ALT_SHIFT_8\n\ - K_CTRL_ALT_SHIFT_8 -> { ${1://cuerpo...} }\n\ -\n\ -# K_9\n\ -snippet K_9\n\ - K_9 -> { ${1://cuerpo...} }\n\ -# K_CTRL_9\n\ -snippet K_CTRL_9\n\ - K_CTRL_9 -> { ${1://cuerpo...} }\n\ -# K_ALT_9\n\ -snippet K_ALT_9\n\ - K_ALT_9 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_9\n\ -snippet K_SHIFT_9\n\ - K_SHIFT_9 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_9\n\ -snippet K_CTRL_ALT_9\n\ - K_CTRL_ALT_9 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_9\n\ -snippet K_CTRL_SHIFT_9\n\ - K_CTRL_SHIFT_9 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_9\n\ -snippet K_CTRL_ALT_SHIFT_9\n\ - K_CTRL_ALT_SHIFT_9 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F1\n\ -snippet K_F1\n\ - K_F1 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F1\n\ -snippet K_CTRL_F1\n\ - K_CTRL_F1 -> { ${1://cuerpo...} }\n\ -# K_ALT_F1\n\ -snippet K_ALT_F1\n\ - K_ALT_F1 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F1\n\ -snippet K_SHIFT_F1\n\ - K_SHIFT_F1 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F1\n\ -snippet K_CTRL_ALT_F1\n\ - K_CTRL_ALT_F1 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F1\n\ -snippet K_CTRL_SHIFT_F1\n\ - K_CTRL_SHIFT_F1 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F1\n\ -snippet K_CTRL_ALT_SHIFT_F1\n\ - K_CTRL_ALT_SHIFT_F1 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F2\n\ -snippet K_F2\n\ - K_F2 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F2\n\ -snippet K_CTRL_F2\n\ - K_CTRL_F2 -> { ${1://cuerpo...} }\n\ -# K_ALT_F2\n\ -snippet K_ALT_F2\n\ - K_ALT_F2 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F2\n\ -snippet K_SHIFT_F2\n\ - K_SHIFT_F2 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F2\n\ -snippet K_CTRL_ALT_F2\n\ - K_CTRL_ALT_F2 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F2\n\ -snippet K_CTRL_SHIFT_F2\n\ - K_CTRL_SHIFT_F2 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F2\n\ -snippet K_CTRL_ALT_SHIFT_F2\n\ - K_CTRL_ALT_SHIFT_F2 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F3\n\ -snippet K_F3\n\ - K_F3 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F3\n\ -snippet K_CTRL_F3\n\ - K_CTRL_F3 -> { ${1://cuerpo...} }\n\ -# K_ALT_F3\n\ -snippet K_ALT_F3\n\ - K_ALT_F3 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F3\n\ -snippet K_SHIFT_F3\n\ - K_SHIFT_F3 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F3\n\ -snippet K_CTRL_ALT_F3\n\ - K_CTRL_ALT_F3 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F3\n\ -snippet K_CTRL_SHIFT_F3\n\ - K_CTRL_SHIFT_F3 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F3\n\ -snippet K_CTRL_ALT_SHIFT_F3\n\ - K_CTRL_ALT_SHIFT_F3 -> { ${1://cuerpo...} }\n\ -\n\ -# K_A\n\ -snippet K_A\n\ - K_A -> { ${1://cuerpo...} }\n\ -# K_CTRL_A\n\ -snippet K_CTRL_A\n\ - K_CTRL_A -> { ${1://cuerpo...} }\n\ -# K_ALT_A\n\ -snippet K_ALT_A\n\ - K_ALT_A -> { ${1://cuerpo...} }\n\ -# K_SHIFT_A\n\ -snippet K_SHIFT_A\n\ - K_SHIFT_A -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_A\n\ -snippet K_CTRL_ALT_A\n\ - K_CTRL_ALT_A -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_A\n\ -snippet K_CTRL_SHIFT_A\n\ - K_CTRL_SHIFT_A -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_A\n\ -snippet K_CTRL_ALT_SHIFT_A\n\ - K_CTRL_ALT_SHIFT_A -> { ${1://cuerpo...} }\n\ -\n\ -# K_F5\n\ -snippet K_F5\n\ - K_F5 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F5\n\ -snippet K_CTRL_F5\n\ - K_CTRL_F5 -> { ${1://cuerpo...} }\n\ -# K_ALT_F5\n\ -snippet K_ALT_F5\n\ - K_ALT_F5 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F5\n\ -snippet K_SHIFT_F5\n\ - K_SHIFT_F5 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F5\n\ -snippet K_CTRL_ALT_F5\n\ - K_CTRL_ALT_F5 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F5\n\ -snippet K_CTRL_SHIFT_F5\n\ - K_CTRL_SHIFT_F5 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F5\n\ -snippet K_CTRL_ALT_SHIFT_F5\n\ - K_CTRL_ALT_SHIFT_F5 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F6\n\ -snippet K_F6\n\ - K_F6 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F6\n\ -snippet K_CTRL_F6\n\ - K_CTRL_F6 -> { ${1://cuerpo...} }\n\ -# K_ALT_F6\n\ -snippet K_ALT_F6\n\ - K_ALT_F6 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F6\n\ -snippet K_SHIFT_F6\n\ - K_SHIFT_F6 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F6\n\ -snippet K_CTRL_ALT_F6\n\ - K_CTRL_ALT_F6 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F6\n\ -snippet K_CTRL_SHIFT_F6\n\ - K_CTRL_SHIFT_F6 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F6\n\ -snippet K_CTRL_ALT_SHIFT_F6\n\ - K_CTRL_ALT_SHIFT_F6 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F7\n\ -snippet K_F7\n\ - K_F7 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F7\n\ -snippet K_CTRL_F7\n\ - K_CTRL_F7 -> { ${1://cuerpo...} }\n\ -# K_ALT_F7\n\ -snippet K_ALT_F7\n\ - K_ALT_F7 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F7\n\ -snippet K_SHIFT_F7\n\ - K_SHIFT_F7 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F7\n\ -snippet K_CTRL_ALT_F7\n\ - K_CTRL_ALT_F7 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F7\n\ -snippet K_CTRL_SHIFT_F7\n\ - K_CTRL_SHIFT_F7 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F7\n\ -snippet K_CTRL_ALT_SHIFT_F7\n\ - K_CTRL_ALT_SHIFT_F7 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F8\n\ -snippet K_F8\n\ - K_F8 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F8\n\ -snippet K_CTRL_F8\n\ - K_CTRL_F8 -> { ${1://cuerpo...} }\n\ -# K_ALT_F8\n\ -snippet K_ALT_F8\n\ - K_ALT_F8 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F8\n\ -snippet K_SHIFT_F8\n\ - K_SHIFT_F8 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F8\n\ -snippet K_CTRL_ALT_F8\n\ - K_CTRL_ALT_F8 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F8\n\ -snippet K_CTRL_SHIFT_F8\n\ - K_CTRL_SHIFT_F8 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F8\n\ -snippet K_CTRL_ALT_SHIFT_F8\n\ - K_CTRL_ALT_SHIFT_F8 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F9\n\ -snippet K_F9\n\ - K_F9 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F9\n\ -snippet K_CTRL_F9\n\ - K_CTRL_F9 -> { ${1://cuerpo...} }\n\ -# K_ALT_F9\n\ -snippet K_ALT_F9\n\ - K_ALT_F9 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F9\n\ -snippet K_SHIFT_F9\n\ - K_SHIFT_F9 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F9\n\ -snippet K_CTRL_ALT_F9\n\ - K_CTRL_ALT_F9 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F9\n\ -snippet K_CTRL_SHIFT_F9\n\ - K_CTRL_SHIFT_F9 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F9\n\ -snippet K_CTRL_ALT_SHIFT_F9\n\ - K_CTRL_ALT_SHIFT_F9 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F10\n\ -snippet K_F10\n\ - K_F10 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F10\n\ -snippet K_CTRL_F10\n\ - K_CTRL_F10 -> { ${1://cuerpo...} }\n\ -# K_ALT_F10\n\ -snippet K_ALT_F10\n\ - K_ALT_F10 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F10\n\ -snippet K_SHIFT_F10\n\ - K_SHIFT_F10 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F10\n\ -snippet K_CTRL_ALT_F10\n\ - K_CTRL_ALT_F10 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F10\n\ -snippet K_CTRL_SHIFT_F10\n\ - K_CTRL_SHIFT_F10 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F10\n\ -snippet K_CTRL_ALT_SHIFT_F10\n\ - K_CTRL_ALT_SHIFT_F10 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F11\n\ -snippet K_F11\n\ - K_F11 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F11\n\ -snippet K_CTRL_F11\n\ - K_CTRL_F11 -> { ${1://cuerpo...} }\n\ -# K_ALT_F11\n\ -snippet K_ALT_F11\n\ - K_ALT_F11 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F11\n\ -snippet K_SHIFT_F11\n\ - K_SHIFT_F11 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F11\n\ -snippet K_CTRL_ALT_F11\n\ - K_CTRL_ALT_F11 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F11\n\ -snippet K_CTRL_SHIFT_F11\n\ - K_CTRL_SHIFT_F11 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F11\n\ -snippet K_CTRL_ALT_SHIFT_F11\n\ - K_CTRL_ALT_SHIFT_F11 -> { ${1://cuerpo...} }\n\ -\n\ -# K_F12\n\ -snippet K_F12\n\ - K_F12 -> { ${1://cuerpo...} }\n\ -# K_CTRL_F12\n\ -snippet K_CTRL_F12\n\ - K_CTRL_F12 -> { ${1://cuerpo...} }\n\ -# K_ALT_F12\n\ -snippet K_ALT_F12\n\ - K_ALT_F12 -> { ${1://cuerpo...} }\n\ -# K_SHIFT_F12\n\ -snippet K_SHIFT_F12\n\ - K_SHIFT_F12 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_F12\n\ -snippet K_CTRL_ALT_F12\n\ - K_CTRL_ALT_F12 -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_F12\n\ -snippet K_CTRL_SHIFT_F12\n\ - K_CTRL_SHIFT_F12 -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_F12\n\ -snippet K_CTRL_ALT_SHIFT_F12\n\ - K_CTRL_ALT_SHIFT_F12 -> { ${1://cuerpo...} }\n\ -\n\ -# K_RETURN\n\ -snippet K_RETURN\n\ - K_RETURN -> { ${1://cuerpo...} }\n\ -# K_CTRL_RETURN\n\ -snippet K_CTRL_RETURN\n\ - K_CTRL_RETURN -> { ${1://cuerpo...} }\n\ -# K_ALT_RETURN\n\ -snippet K_ALT_RETURN\n\ - K_ALT_RETURN -> { ${1://cuerpo...} }\n\ -# K_SHIFT_RETURN\n\ -snippet K_SHIFT_RETURN\n\ - K_SHIFT_RETURN -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_RETURN\n\ -snippet K_CTRL_ALT_RETURN\n\ - K_CTRL_ALT_RETURN -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_RETURN\n\ -snippet K_CTRL_SHIFT_RETURN\n\ - K_CTRL_SHIFT_RETURN -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_RETURN\n\ -snippet K_CTRL_ALT_SHIFT_RETURN\n\ - K_CTRL_ALT_SHIFT_RETURN -> { ${1://cuerpo...} }\n\ -\n\ -# K_SPACE\n\ -snippet K_SPACE\n\ - K_SPACE -> { ${1://cuerpo...} }\n\ -# K_CTRL_SPACE\n\ -snippet K_CTRL_SPACE\n\ - K_CTRL_SPACE -> { ${1://cuerpo...} }\n\ -# K_ALT_SPACE\n\ -snippet K_ALT_SPACE\n\ - K_ALT_SPACE -> { ${1://cuerpo...} }\n\ -# K_SHIFT_SPACE\n\ -snippet K_SHIFT_SPACE\n\ - K_SHIFT_SPACE -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SPACE\n\ -snippet K_CTRL_ALT_SPACE\n\ - K_CTRL_ALT_SPACE -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_SPACE\n\ -snippet K_CTRL_SHIFT_SPACE\n\ - K_CTRL_SHIFT_SPACE -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_SPACE\n\ -snippet K_CTRL_ALT_SHIFT_SPACE\n\ - K_CTRL_ALT_SHIFT_SPACE -> { ${1://cuerpo...} }\n\ -\n\ -# K_ESCAPE\n\ -snippet K_ESCAPE\n\ - K_ESCAPE -> { ${1://cuerpo...} }\n\ -# K_CTRL_ESCAPE\n\ -snippet K_CTRL_ESCAPE\n\ - K_CTRL_ESCAPE -> { ${1://cuerpo...} }\n\ -# K_ALT_ESCAPE\n\ -snippet K_ALT_ESCAPE\n\ - K_ALT_ESCAPE -> { ${1://cuerpo...} }\n\ -# K_SHIFT_ESCAPE\n\ -snippet K_SHIFT_ESCAPE\n\ - K_SHIFT_ESCAPE -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_ESCAPE\n\ -snippet K_CTRL_ALT_ESCAPE\n\ - K_CTRL_ALT_ESCAPE -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_ESCAPE\n\ -snippet K_CTRL_SHIFT_ESCAPE\n\ - K_CTRL_SHIFT_ESCAPE -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_ESCAPE\n\ -snippet K_CTRL_ALT_SHIFT_ESCAPE\n\ - K_CTRL_ALT_SHIFT_ESCAPE -> { ${1://cuerpo...} }\n\ -\n\ -# K_BACKSPACE\n\ -snippet K_BACKSPACE\n\ - K_BACKSPACE -> { ${1://cuerpo...} }\n\ -# K_CTRL_BACKSPACE\n\ -snippet K_CTRL_BACKSPACE\n\ - K_CTRL_BACKSPACE -> { ${1://cuerpo...} }\n\ -# K_ALT_BACKSPACE\n\ -snippet K_ALT_BACKSPACE\n\ - K_ALT_BACKSPACE -> { ${1://cuerpo...} }\n\ -# K_SHIFT_BACKSPACE\n\ -snippet K_SHIFT_BACKSPACE\n\ - K_SHIFT_BACKSPACE -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_BACKSPACE\n\ -snippet K_CTRL_ALT_BACKSPACE\n\ - K_CTRL_ALT_BACKSPACE -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_BACKSPACE\n\ -snippet K_CTRL_SHIFT_BACKSPACE\n\ - K_CTRL_SHIFT_BACKSPACE -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_BACKSPACE\n\ -snippet K_CTRL_ALT_SHIFT_BACKSPACE\n\ - K_CTRL_ALT_SHIFT_BACKSPACE -> { ${1://cuerpo...} }\n\ -\n\ -# K_TAB\n\ -snippet K_TAB\n\ - K_TAB -> { ${1://cuerpo...} }\n\ -# K_CTRL_TAB\n\ -snippet K_CTRL_TAB\n\ - K_CTRL_TAB -> { ${1://cuerpo...} }\n\ -# K_ALT_TAB\n\ -snippet K_ALT_TAB\n\ - K_ALT_TAB -> { ${1://cuerpo...} }\n\ -# K_SHIFT_TAB\n\ -snippet K_SHIFT_TAB\n\ - K_SHIFT_TAB -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_TAB\n\ -snippet K_CTRL_ALT_TAB\n\ - K_CTRL_ALT_TAB -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_TAB\n\ -snippet K_CTRL_SHIFT_TAB\n\ - K_CTRL_SHIFT_TAB -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_TAB\n\ -snippet K_CTRL_ALT_SHIFT_TAB\n\ - K_CTRL_ALT_SHIFT_TAB -> { ${1://cuerpo...} }\n\ -\n\ -# K_UP\n\ -snippet K_UP\n\ - K_UP -> { ${1://cuerpo...} }\n\ -# K_CTRL_UP\n\ -snippet K_CTRL_UP\n\ - K_CTRL_UP -> { ${1://cuerpo...} }\n\ -# K_ALT_UP\n\ -snippet K_ALT_UP\n\ - K_ALT_UP -> { ${1://cuerpo...} }\n\ -# K_SHIFT_UP\n\ -snippet K_SHIFT_UP\n\ - K_SHIFT_UP -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_UP\n\ -snippet K_CTRL_ALT_UP\n\ - K_CTRL_ALT_UP -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_UP\n\ -snippet K_CTRL_SHIFT_UP\n\ - K_CTRL_SHIFT_UP -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_UP\n\ -snippet K_CTRL_ALT_SHIFT_UP\n\ - K_CTRL_ALT_SHIFT_UP -> { ${1://cuerpo...} }\n\ -\n\ -# K_DOWN\n\ -snippet K_DOWN\n\ - K_DOWN -> { ${1://cuerpo...} }\n\ -# K_CTRL_DOWN\n\ -snippet K_CTRL_DOWN\n\ - K_CTRL_DOWN -> { ${1://cuerpo...} }\n\ -# K_ALT_DOWN\n\ -snippet K_ALT_DOWN\n\ - K_ALT_DOWN -> { ${1://cuerpo...} }\n\ -# K_SHIFT_DOWN\n\ -snippet K_SHIFT_DOWN\n\ - K_SHIFT_DOWN -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_DOWN\n\ -snippet K_CTRL_ALT_DOWN\n\ - K_CTRL_ALT_DOWN -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_DOWN\n\ -snippet K_CTRL_SHIFT_DOWN\n\ - K_CTRL_SHIFT_DOWN -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_DOWN\n\ -snippet K_CTRL_ALT_SHIFT_DOWN\n\ - K_CTRL_ALT_SHIFT_DOWN -> { ${1://cuerpo...} }\n\ -\n\ -# K_LEFT\n\ -snippet K_LEFT\n\ - K_LEFT -> { ${1://cuerpo...} }\n\ -# K_CTRL_LEFT\n\ -snippet K_CTRL_LEFT\n\ - K_CTRL_LEFT -> { ${1://cuerpo...} }\n\ -# K_ALT_LEFT\n\ -snippet K_ALT_LEFT\n\ - K_ALT_LEFT -> { ${1://cuerpo...} }\n\ -# K_SHIFT_LEFT\n\ -snippet K_SHIFT_LEFT\n\ - K_SHIFT_LEFT -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_LEFT\n\ -snippet K_CTRL_ALT_LEFT\n\ - K_CTRL_ALT_LEFT -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_LEFT\n\ -snippet K_CTRL_SHIFT_LEFT\n\ - K_CTRL_SHIFT_LEFT -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_LEFT\n\ -snippet K_CTRL_ALT_SHIFT_LEFT\n\ - K_CTRL_ALT_SHIFT_LEFT -> { ${1://cuerpo...} }\n\ -\n\ -# K_RIGHT\n\ -snippet K_RIGHT\n\ - K_RIGHT -> { ${1://cuerpo...} }\n\ -# K_CTRL_RIGHT\n\ -snippet K_CTRL_RIGHT\n\ - K_CTRL_RIGHT -> { ${1://cuerpo...} }\n\ -# K_ALT_RIGHT\n\ -snippet K_ALT_RIGHT\n\ - K_ALT_RIGHT -> { ${1://cuerpo...} }\n\ -# K_SHIFT_RIGHT\n\ -snippet K_SHIFT_RIGHT\n\ - K_SHIFT_RIGHT -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_RIGHT\n\ -snippet K_CTRL_ALT_RIGHT\n\ - K_CTRL_ALT_RIGHT -> { ${1://cuerpo...} }\n\ -# K_CTRL_SHIFT_RIGHT\n\ -snippet K_CTRL_SHIFT_RIGHT\n\ - K_CTRL_SHIFT_RIGHT -> { ${1://cuerpo...} }\n\ -# K_CTRL_ALT_SHIFT_RIGHT\n\ -snippet K_CTRL_ALT_SHIFT_RIGHT\n\ - K_CTRL_ALT_SHIFT_RIGHT -> { ${1://cuerpo...} }\n\ -\n\ -# recorrido (simple)\n\ -snippet recorrido (simple)\n\ - ${1:// Ir al inicio}\n\ - while (not ${2:// es último elemento}) {\n\ - ${3:// Procesar el elemento}\n\ - ${4:// Ir al próximo elemento}\n\ - }\n\ - ${5:// Finalizar}\n\ -\n\ -# recorrido (de acumulación)\n\ -snippet recorrido (de acumulación)\n\ - ${1:// Ir al inicio}\n\ - ${2:cantidadVistos} := ${3:// contar elementos en lugar actual}\n\ - while (not ${4:// es último elemento}) {\n\ - ${4:// Ir al próximo elemento}\n\ - ${2:cantidadVistos} := ${2:cantidadVistos} + ${3:// contar elementos en lugar actual}\n\ - }\n\ - return (${2:cantidadVistos})\n\ -\n\ -# recorrido (de búsqueda)\n\ -snippet recorrido (de búsqueda)\n\ - ${1:// Ir al inicio}\n\ - while (not ${2:// encontré lo que buscaba}) {\n\ - ${3:// Ir al próximo elemento}\n\ - }\n\ - return (${2:// encontré lo que buscaba })\n\ -\n\ -# recorrido (de búsqueda con borde)\n\ -snippet recorrido (de búsqueda con borde)\n\ - ${1:// Ir al inicio}\n\ - while (not ${2:// encontré lo que buscaba} && not ${3:// es último elemento}) {\n\ - ${4:// Ir al próximo elemento}\n\ - }\n\ - return (${2:// encontré lo que buscaba })\n\ -\n\ -# recorrido (de tipos enumerativos)\n\ -snippet recorrido (de tipos enumerativos)\n\ - ${1:elementoActual} := ${2:minElemento()}\n\ - while (${1:elementoActual} /= ${3:maxElemento()}) {\n\ - ${4:// Procesar con elemento actual}\n\ - ${1:elementoActual} := siguiente(${1:elementoActual})\n\ - }\n\ - ${4:// Procesar con elemento actual}\n\ -\n\ -# recorrido (de búsqueda sobre lista)\n\ -snippet recorrido (de búsqueda sobre lista)\n\ - ${1:listaRecorrida} := ${2:lista}\n\ - while (primero(${1:listaRecorrida}) /= ${3://elemento buscado}) {\n\ - ${1:elementoActual} := sinElPrimero(${1:elementoActual})\n\ - }\n\ - return (primero(${1:listaRecorrida}))\n\ -\n\ -# recorrido (de búsqueda sobre lista con borde)\n\ -snippet recorrido (de búsqueda sobre lista con borde)\n\ - ${1:listaRecorrida} := ${2:lista}\n\ - while (not esVacía(${1:listaRecorrida}) && primero(${1:listaRecorrida}) /= ${3://elemento buscado}) {\n\ - ${1:elementoActual} := sinElPrimero(${1:elementoActual})\n\ - }\n\ - return (not esVacía(${1:listaRecorrida}))\n\ -\n\ -# docs (procedimiento)\n\ -snippet docs (procedimiento)\n\ - /*\n\ - @PROPÓSITO: ${1:...}\n\ - @PRECONDICIÓN: ${2:...}\n\ - */\n\ -\n\ -# docs (procedimiento con parámetros)\n\ -snippet docs (procedimiento con parámetros)\n\ - /*\n\ - @PROPÓSITO: ${1:...}\n\ - @PRECONDICIÓN: ${2:...}\n\ - @PARÁMETROS:\n\ - * ${3:nombreDelParámetro} : ${4:Tipo} - ${5:descripción}\n\ - */\n\ -\n\ -# docs (función)\n\ -snippet docs (función)\n\ - /*\n\ - @PROPÓSITO: ${1:...}\n\ - @PRECONDICIÓN: ${2:...}\n\ - @TIPO: ${3:...}\n\ - */\n\ -\n\ -# docs (función con parámetros)\n\ -snippet docs (función con parámetros)\n\ - /*\n\ - @PROPÓSITO: ${1:...}\n\ - @PRECONDICIÓN: ${2:...}\n\ - @PARÁMETROS:\n\ - * ${3:nombreDelParámetro} : ${4:Tipo} - ${5:descripción}\n\ - @TIPO: ${6:...}\n\ - */\n\ -"; -exports.scope = "gobstones"; - -}); (function() { - window.require(["ace/snippets/gobstones"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/golang.js b/src/ace/snippets/golang.js deleted file mode 100644 index 18a9f97b6..000000000 --- a/src/ace/snippets/golang.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/golang"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/graphqlschema.js b/src/ace/snippets/graphqlschema.js deleted file mode 100644 index a4da17b78..000000000 --- a/src/ace/snippets/graphqlschema.js +++ /dev/null @@ -1,46 +0,0 @@ -define("ace/snippets/graphqlschema",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# Type Snippet\n\ -trigger type\n\ -snippet type\n\ - type ${1:type_name} {\n\ - ${2:type_siblings}\n\ - }\n\ -\n\ -# Input Snippet\n\ -trigger input\n\ -snippet input\n\ - input ${1:input_name} {\n\ - ${2:input_siblings}\n\ - }\n\ -\n\ -# Interface Snippet\n\ -trigger interface\n\ -snippet interface\n\ - interface ${1:interface_name} {\n\ - ${2:interface_siblings}\n\ - }\n\ -\n\ -# Interface Snippet\n\ -trigger union\n\ -snippet union\n\ - union ${1:union_name} = ${2:type} | ${3: type}\n\ -\n\ -# Enum Snippet\n\ -trigger enum\n\ -snippet enum\n\ - enum ${1:enum_name} {\n\ - ${2:enum_siblings}\n\ - }\n\ -"; -exports.scope = "graphqlschema"; - -}); (function() { - window.require(["ace/snippets/graphqlschema"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/groovy.js b/src/ace/snippets/groovy.js deleted file mode 100644 index 72f2f32ec..000000000 --- a/src/ace/snippets/groovy.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/groovy"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/haml.js b/src/ace/snippets/haml.js deleted file mode 100644 index 174f6adab..000000000 --- a/src/ace/snippets/haml.js +++ /dev/null @@ -1,34 +0,0 @@ -define("ace/snippets/haml",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet t\n\ - %table\n\ - %tr\n\ - %th\n\ - ${1:headers}\n\ - %tr\n\ - %td\n\ - ${2:headers}\n\ -snippet ul\n\ - %ul\n\ - %li\n\ - ${1:item}\n\ - %li\n\ -snippet =rp\n\ - = render :partial => '${1:partial}'\n\ -snippet =rpl\n\ - = render :partial => '${1:partial}', :locals => {}\n\ -snippet =rpc\n\ - = render :partial => '${1:partial}', :collection => @$1\n\ -\n\ -"; -exports.scope = "haml"; - -}); (function() { - window.require(["ace/snippets/haml"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/handlebars.js b/src/ace/snippets/handlebars.js deleted file mode 100644 index 2eaf61de4..000000000 --- a/src/ace/snippets/handlebars.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/handlebars"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/haskell.js b/src/ace/snippets/haskell.js deleted file mode 100644 index 054187b85..000000000 --- a/src/ace/snippets/haskell.js +++ /dev/null @@ -1,96 +0,0 @@ -define("ace/snippets/haskell",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet lang\n\ - {-# LANGUAGE ${1:OverloadedStrings} #-}\n\ -snippet info\n\ - -- |\n\ - -- Module : ${1:Module.Namespace}\n\ - -- Copyright : ${2:Author} ${3:2011-2012}\n\ - -- License : ${4:BSD3}\n\ - --\n\ - -- Maintainer : ${5:email@something.com}\n\ - -- Stability : ${6:experimental}\n\ - -- Portability : ${7:unknown}\n\ - --\n\ - -- ${8:Description}\n\ - --\n\ -snippet import\n\ - import ${1:Data.Text}\n\ -snippet import2\n\ - import ${1:Data.Text} (${2:head})\n\ -snippet importq\n\ - import qualified ${1:Data.Text} as ${2:T}\n\ -snippet inst\n\ - instance ${1:Monoid} ${2:Type} where\n\ - ${3}\n\ -snippet type\n\ - type ${1:Type} = ${2:Type}\n\ -snippet data\n\ - data ${1:Type} = ${2:$1} ${3:Int}\n\ -snippet newtype\n\ - newtype ${1:Type} = ${2:$1} ${3:Int}\n\ -snippet class\n\ - class ${1:Class} a where\n\ - ${2}\n\ -snippet module\n\ - module `substitute(substitute(expand('%:r'), '[/\\\\]','.','g'),'^\\%(\\l*\\.\\)\\?','','')` (\n\ - ) where\n\ - `expand('%') =~ 'Main' ? \"\\n\\nmain = do\\n print \\\"hello world\\\"\" : \"\"`\n\ -\n\ -snippet const\n\ - ${1:name} :: ${2:a}\n\ - $1 = ${3:undefined}\n\ -snippet fn\n\ - ${1:fn} :: ${2:a} -> ${3:a}\n\ - $1 ${4} = ${5:undefined}\n\ -snippet fn2\n\ - ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}\n\ - $1 ${5} = ${6:undefined}\n\ -snippet ap\n\ - ${1:map} ${2:fn} ${3:list}\n\ -snippet do\n\ - do\n\ - \n\ -snippet λ\n\ - \\${1:x} -> ${2}\n\ -snippet \\\n\ - \\${1:x} -> ${2}\n\ -snippet <-\n\ - ${1:a} <- ${2:m a}\n\ -snippet ←\n\ - ${1:a} <- ${2:m a}\n\ -snippet ->\n\ - ${1:m a} -> ${2:a}\n\ -snippet →\n\ - ${1:m a} -> ${2:a}\n\ -snippet tup\n\ - (${1:a}, ${2:b})\n\ -snippet tup2\n\ - (${1:a}, ${2:b}, ${3:c})\n\ -snippet tup3\n\ - (${1:a}, ${2:b}, ${3:c}, ${4:d})\n\ -snippet rec\n\ - ${1:Record} { ${2:recFieldA} = ${3:undefined}\n\ - , ${4:recFieldB} = ${5:undefined}\n\ - }\n\ -snippet case\n\ - case ${1:something} of\n\ - ${2} -> ${3}\n\ -snippet let\n\ - let ${1} = ${2}\n\ - in ${3}\n\ -snippet where\n\ - where\n\ - ${1:fn} = ${2:undefined}\n\ -"; -exports.scope = "haskell"; - -}); (function() { - window.require(["ace/snippets/haskell"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/haskell_cabal.js b/src/ace/snippets/haskell_cabal.js deleted file mode 100644 index 1a90a9cbf..000000000 --- a/src/ace/snippets/haskell_cabal.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/haskell_cabal"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/haxe.js b/src/ace/snippets/haxe.js deleted file mode 100644 index b1f2dbe6c..000000000 --- a/src/ace/snippets/haxe.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/haxe"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/hjson.js b/src/ace/snippets/hjson.js deleted file mode 100644 index 96938d67d..000000000 --- a/src/ace/snippets/hjson.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/hjson"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/html.js b/src/ace/snippets/html.js deleted file mode 100644 index 885d2a2d6..000000000 --- a/src/ace/snippets/html.js +++ /dev/null @@ -1,867 +0,0 @@ -define("ace/snippets/html",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# Some useful Unicode entities\n\ -# Non-Breaking Space\n\ -snippet nbs\n\ -  \n\ -# ←\n\ -snippet left\n\ - ←\n\ -# →\n\ -snippet right\n\ - →\n\ -# ↑\n\ -snippet up\n\ - ↑\n\ -# ↓\n\ -snippet down\n\ - ↓\n\ -# ↩\n\ -snippet return\n\ - ↩\n\ -# ⇤\n\ -snippet backtab\n\ - ⇤\n\ -# ⇥\n\ -snippet tab\n\ - ⇥\n\ -# ⇧\n\ -snippet shift\n\ - ⇧\n\ -# ⌃\n\ -snippet ctrl\n\ - ⌃\n\ -# ⌅\n\ -snippet enter\n\ - ⌅\n\ -# ⌘\n\ -snippet cmd\n\ - ⌘\n\ -# ⌥\n\ -snippet option\n\ - ⌥\n\ -# ⌦\n\ -snippet delete\n\ - ⌦\n\ -# ⌫\n\ -snippet backspace\n\ - ⌫\n\ -# ⎋\n\ -snippet esc\n\ - ⎋\n\ -# Generic Doctype\n\ -snippet doctype HTML 4.01 Strict\n\ - \n\ -snippet doctype HTML 4.01 Transitional\n\ - \n\ -snippet doctype HTML 5\n\ - \n\ -snippet doctype XHTML 1.0 Frameset\n\ - \n\ -snippet doctype XHTML 1.0 Strict\n\ - \n\ -snippet doctype XHTML 1.0 Transitional\n\ - \n\ -snippet doctype XHTML 1.1\n\ - \n\ -# HTML Doctype 4.01 Strict\n\ -snippet docts\n\ - \n\ -# HTML Doctype 4.01 Transitional\n\ -snippet doct\n\ - \n\ -# HTML Doctype 5\n\ -snippet doct5\n\ - \n\ -# XHTML Doctype 1.0 Frameset\n\ -snippet docxf\n\ - \n\ -# XHTML Doctype 1.0 Strict\n\ -snippet docxs\n\ - \n\ -# XHTML Doctype 1.0 Transitional\n\ -snippet docxt\n\ - \n\ -# XHTML Doctype 1.1\n\ -snippet docx\n\ - \n\ -# html5shiv\n\ -snippet html5shiv\n\ - \n\ -snippet html5printshiv\n\ - \n\ -# Attributes\n\ -snippet attr\n\ - ${1:attribute}=\"${2:property}\"\n\ -snippet attr+\n\ - ${1:attribute}=\"${2:property}\" attr+${3}\n\ -snippet .\n\ - class=\"${1}\"${2}\n\ -snippet #\n\ - id=\"${1}\"${2}\n\ -snippet alt\n\ - alt=\"${1}\"${2}\n\ -snippet charset\n\ - charset=\"${1:utf-8}\"${2}\n\ -snippet data\n\ - data-${1}=\"${2:$1}\"${3}\n\ -snippet for\n\ - for=\"${1}\"${2}\n\ -snippet height\n\ - height=\"${1}\"${2}\n\ -snippet href\n\ - href=\"${1:#}\"${2}\n\ -snippet lang\n\ - lang=\"${1:en}\"${2}\n\ -snippet media\n\ - media=\"${1}\"${2}\n\ -snippet name\n\ - name=\"${1}\"${2}\n\ -snippet rel\n\ - rel=\"${1}\"${2}\n\ -snippet scope\n\ - scope=\"${1:row}\"${2}\n\ -snippet src\n\ - src=\"${1}\"${2}\n\ -snippet title=\n\ - title=\"${1}\"${2}\n\ -snippet type\n\ - type=\"${1}\"${2}\n\ -snippet value\n\ - value=\"${1}\"${2}\n\ -snippet width\n\ - width=\"${1}\"${2}\n\ -# Elements\n\ -snippet a\n\ - ${2:$1}\n\ -snippet a.\n\ - ${3:$1}\n\ -snippet a#\n\ - ${3:$1}\n\ -snippet a:ext\n\ - ${2:$1}\n\ -snippet a:mail\n\ - ${3:email me}\n\ -snippet abbr\n\ - ${2}\n\ -snippet address\n\ -
\n\ - ${1}\n\ -
\n\ -snippet area\n\ - \"${4}\"\n\ -snippet area+\n\ - \"${4}\"\n\ - area+${5}\n\ -snippet area:c\n\ - \"${3}\"\n\ -snippet area:d\n\ - \"${3}\"\n\ -snippet area:p\n\ - \"${3}\"\n\ -snippet area:r\n\ - \"${3}\"\n\ -snippet article\n\ -
\n\ - ${1}\n\ -
\n\ -snippet article.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet article#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet aside\n\ -
\n\ - ${1}\n\ -
\n\ -snippet aside.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet aside#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet audio\n\ - ${2}\n\ -snippet b\n\ - ${1}\n\ -snippet base\n\ - \n\ -snippet bdi\n\ - ${1}\n\ -snippet bdo\n\ - ${2}\n\ -snippet bdo:l\n\ - ${1}\n\ -snippet bdo:r\n\ - ${1}\n\ -snippet blockquote\n\ -
\n\ - ${1}\n\ -
\n\ -snippet body\n\ - \n\ - ${1}\n\ - \n\ -snippet br\n\ -
${1}\n\ -snippet button\n\ - \n\ -snippet button.\n\ - \n\ -snippet button#\n\ - \n\ -snippet button:s\n\ - \n\ -snippet button:r\n\ - \n\ -snippet canvas\n\ - \n\ -snippet caption\n\ - ${1}\n\ -snippet cite\n\ - ${1}\n\ -snippet code\n\ - ${1}\n\ -snippet col\n\ - ${1}\n\ -snippet col+\n\ - \n\ - col+${1}\n\ -snippet colgroup\n\ - \n\ - ${1}\n\ - \n\ -snippet colgroup+\n\ - \n\ - \n\ - col+${1}\n\ - \n\ -snippet command\n\ - \n\ -snippet command:c\n\ - \n\ -snippet command:r\n\ - \n\ -snippet datagrid\n\ - \n\ - ${1}\n\ - \n\ -snippet datalist\n\ - \n\ - ${1}\n\ - \n\ -snippet datatemplate\n\ - \n\ - ${1}\n\ - \n\ -snippet dd\n\ -
${1}
\n\ -snippet dd.\n\ -
${2}
\n\ -snippet dd#\n\ -
${2}
\n\ -snippet del\n\ - ${1}\n\ -snippet details\n\ -
${1}
\n\ -snippet dfn\n\ - ${1}\n\ -snippet dialog\n\ - \n\ - ${1}\n\ - \n\ -snippet div\n\ -
\n\ - ${1}\n\ -
\n\ -snippet div.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet div#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet dl\n\ -
\n\ - ${1}\n\ -
\n\ -snippet dl.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet dl#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet dl+\n\ -
\n\ -
${1}
\n\ -
${2}
\n\ - dt+${3}\n\ -
\n\ -snippet dt\n\ -
${1}
\n\ -snippet dt.\n\ -
${2}
\n\ -snippet dt#\n\ -
${2}
\n\ -snippet dt+\n\ -
${1}
\n\ -
${2}
\n\ - dt+${3}\n\ -snippet em\n\ - ${1}\n\ -snippet embed\n\ - \n\ -snippet fieldset\n\ -
\n\ - ${1}\n\ -
\n\ -snippet fieldset.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet fieldset#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet fieldset+\n\ -
\n\ - ${1}\n\ - ${2}\n\ -
\n\ - fieldset+${3}\n\ -snippet figcaption\n\ -
${1}
\n\ -snippet figure\n\ -
${1}
\n\ -snippet footer\n\ -
\n\ - ${1}\n\ -
\n\ -snippet footer.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet footer#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet form\n\ -
\n\ - ${3}\n\ -
\n\ -snippet form.\n\ -
\n\ - ${4}\n\ -
\n\ -snippet form#\n\ -
\n\ - ${4}\n\ -
\n\ -snippet h1\n\ -

${1}

\n\ -snippet h1.\n\ -

${2}

\n\ -snippet h1#\n\ -

${2}

\n\ -snippet h2\n\ -

${1}

\n\ -snippet h2.\n\ -

${2}

\n\ -snippet h2#\n\ -

${2}

\n\ -snippet h3\n\ -

${1}

\n\ -snippet h3.\n\ -

${2}

\n\ -snippet h3#\n\ -

${2}

\n\ -snippet h4\n\ -

${1}

\n\ -snippet h4.\n\ -

${2}

\n\ -snippet h4#\n\ -

${2}

\n\ -snippet h5\n\ -
${1}
\n\ -snippet h5.\n\ -
${2}
\n\ -snippet h5#\n\ -
${2}
\n\ -snippet h6\n\ -
${1}
\n\ -snippet h6.\n\ -
${2}
\n\ -snippet h6#\n\ -
${2}
\n\ -snippet head\n\ - \n\ - \n\ -\n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ - ${2}\n\ - \n\ -snippet header\n\ -
\n\ - ${1}\n\ -
\n\ -snippet header.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet header#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet hgroup\n\ -
\n\ - ${1}\n\ -
\n\ -snippet hgroup.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet hr\n\ -
${1}\n\ -snippet html\n\ - \n\ - ${1}\n\ - \n\ -snippet xhtml\n\ - \n\ - ${1}\n\ - \n\ -snippet html5\n\ - \n\ - \n\ - \n\ - \n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ - ${2:meta}\n\ - \n\ - \n\ - ${3:body}\n\ - \n\ - \n\ -snippet xhtml5\n\ - \n\ - \n\ - \n\ - \n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ - ${2:meta}\n\ - \n\ - \n\ - ${3:body}\n\ - \n\ - \n\ -snippet i\n\ - ${1}\n\ -snippet iframe\n\ - ${2}\n\ -snippet iframe.\n\ - ${3}\n\ -snippet iframe#\n\ - ${3}\n\ -snippet img\n\ - \"${2}\"${3}\n\ -snippet img.\n\ - \"${3}\"${4}\n\ -snippet img#\n\ - \"${3}\"${4}\n\ -snippet input\n\ - ${5}\n\ -snippet input.\n\ - ${6}\n\ -snippet input:text\n\ - ${4}\n\ -snippet input:submit\n\ - ${4}\n\ -snippet input:hidden\n\ - ${4}\n\ -snippet input:button\n\ - ${4}\n\ -snippet input:image\n\ - ${5}\n\ -snippet input:checkbox\n\ - ${3}\n\ -snippet input:radio\n\ - ${3}\n\ -snippet input:color\n\ - ${4}\n\ -snippet input:date\n\ - ${4}\n\ -snippet input:datetime\n\ - ${4}\n\ -snippet input:datetime-local\n\ - ${4}\n\ -snippet input:email\n\ - ${4}\n\ -snippet input:file\n\ - ${4}\n\ -snippet input:month\n\ - ${4}\n\ -snippet input:number\n\ - ${4}\n\ -snippet input:password\n\ - ${4}\n\ -snippet input:range\n\ - ${4}\n\ -snippet input:reset\n\ - ${4}\n\ -snippet input:search\n\ - ${4}\n\ -snippet input:time\n\ - ${4}\n\ -snippet input:url\n\ - ${4}\n\ -snippet input:week\n\ - ${4}\n\ -snippet ins\n\ - ${1}\n\ -snippet kbd\n\ - ${1}\n\ -snippet keygen\n\ - ${1}\n\ -snippet label\n\ - \n\ -snippet label:i\n\ - \n\ - ${7}\n\ -snippet label:s\n\ - \n\ - \n\ -snippet legend\n\ - ${1}\n\ -snippet legend+\n\ - ${1}\n\ -snippet li\n\ -
  • ${1}
  • \n\ -snippet li.\n\ -
  • ${2}
  • \n\ -snippet li+\n\ -
  • ${1}
  • \n\ - li+${2}\n\ -snippet lia\n\ -
  • ${1}
  • \n\ -snippet lia+\n\ -
  • ${1}
  • \n\ - lia+${3}\n\ -snippet link\n\ - ${5}\n\ -snippet link:atom\n\ - ${2}\n\ -snippet link:css\n\ - ${4}\n\ -snippet link:favicon\n\ - ${2}\n\ -snippet link:rss\n\ - ${2}\n\ -snippet link:touch\n\ - ${2}\n\ -snippet map\n\ - \n\ - ${2}\n\ - \n\ -snippet map.\n\ - \n\ - ${3}\n\ - \n\ -snippet map#\n\ - \n\ - ${3}\n\ - \n\ -snippet map+\n\ - \n\ - \"${5}\"${6}\n\ - ${7}\n\ -snippet mark\n\ - ${1}\n\ -snippet menu\n\ - \n\ - ${1}\n\ - \n\ -snippet menu:c\n\ - \n\ - ${1}\n\ - \n\ -snippet menu:t\n\ - \n\ - ${1}\n\ - \n\ -snippet meta\n\ - ${3}\n\ -snippet meta:compat\n\ - ${3}\n\ -snippet meta:refresh\n\ - ${3}\n\ -snippet meta:utf\n\ - ${3}\n\ -snippet meter\n\ - ${1}\n\ -snippet nav\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet nav.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet nav#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet noscript\n\ - \n\ -snippet object\n\ - \n\ - ${3}\n\ - ${4}\n\ -# Embed QT Movie\n\ -snippet movie\n\ - \n\ - \n\ - \n\ - \n\ - \n\ - ${6}\n\ -snippet ol\n\ -
      \n\ - ${1}\n\ -
    \n\ -snippet ol.\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ol#\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ol+\n\ -
      \n\ -
    1. ${1}
    2. \n\ - li+${2}\n\ -
    \n\ -snippet opt\n\ - \n\ -snippet opt+\n\ - \n\ - opt+${3}\n\ -snippet optt\n\ - \n\ -snippet optgroup\n\ - \n\ - \n\ - opt+${3}\n\ - \n\ -snippet output\n\ - ${1}\n\ -snippet p\n\ -

    ${1}

    \n\ -snippet param\n\ - ${3}\n\ -snippet pre\n\ -
    \n\
    -		${1}\n\
    -	
    \n\ -snippet progress\n\ - ${1}\n\ -snippet q\n\ - ${1}\n\ -snippet rp\n\ - ${1}\n\ -snippet rt\n\ - ${1}\n\ -snippet ruby\n\ - \n\ - ${1}\n\ - \n\ -snippet s\n\ - ${1}\n\ -snippet samp\n\ - \n\ - ${1}\n\ - \n\ -snippet script\n\ - \n\ -snippet scriptsrc\n\ - \n\ -snippet newscript\n\ - \n\ -snippet newscriptsrc\n\ - \n\ -snippet section\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet section.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet section#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet select\n\ - \n\ -snippet select.\n\ - \n\ -snippet select+\n\ - \n\ -snippet small\n\ - ${1}\n\ -snippet source\n\ - \n\ -snippet span\n\ - ${1}\n\ -snippet strong\n\ - ${1}\n\ -snippet style\n\ - \n\ -snippet sub\n\ - ${1}\n\ -snippet summary\n\ - \n\ - ${1}\n\ - \n\ -snippet sup\n\ - ${1}\n\ -snippet table\n\ - \n\ - ${2}\n\ -
    \n\ -snippet table.\n\ - \n\ - ${3}\n\ -
    \n\ -snippet table#\n\ - \n\ - ${3}\n\ -
    \n\ -snippet tbody\n\ - \n\ - ${1}\n\ - \n\ -snippet td\n\ - ${1}\n\ -snippet td.\n\ - ${2}\n\ -snippet td#\n\ - ${2}\n\ -snippet td+\n\ - ${1}\n\ - td+${2}\n\ -snippet textarea\n\ - ${6}\n\ -snippet tfoot\n\ - \n\ - ${1}\n\ - \n\ -snippet th\n\ - ${1}\n\ -snippet th.\n\ - ${2}\n\ -snippet th#\n\ - ${2}\n\ -snippet th+\n\ - ${1}\n\ - th+${2}\n\ -snippet thead\n\ - \n\ - ${1}\n\ - \n\ -snippet time\n\ - ${3:$1}\n\ -snippet title\n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ -snippet tr\n\ - \n\ - ${1}\n\ - \n\ -snippet tr+\n\ - \n\ - ${1}\n\ - td+${2}\n\ - \n\ -snippet track\n\ - ${5}${6}\n\ -snippet ul\n\ -
      \n\ - ${1}\n\ -
    \n\ -snippet ul.\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ul#\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ul+\n\ -
      \n\ -
    • ${1}
    • \n\ - li+${2}\n\ -
    \n\ -snippet var\n\ - ${1}\n\ -snippet video\n\ - ${7}${8}\n\ -snippet wbr\n\ - ${1}\n\ -"; -exports.scope = "html"; - -}); (function() { - window.require(["ace/snippets/html"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/html_elixir.js b/src/ace/snippets/html_elixir.js deleted file mode 100644 index 0db3e076f..000000000 --- a/src/ace/snippets/html_elixir.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/html_elixir"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/html_ruby.js b/src/ace/snippets/html_ruby.js deleted file mode 100644 index 5d4499743..000000000 --- a/src/ace/snippets/html_ruby.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/html_ruby"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/ini.js b/src/ace/snippets/ini.js deleted file mode 100644 index f31743c5b..000000000 --- a/src/ace/snippets/ini.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/ini"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/io.js b/src/ace/snippets/io.js deleted file mode 100644 index 47b33590e..000000000 --- a/src/ace/snippets/io.js +++ /dev/null @@ -1,76 +0,0 @@ -define("ace/snippets/io",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippets = [ - { - "content": "assertEquals(${1:expected}, ${2:expr})", - "name": "assertEquals", - "scope": "io", - "tabTrigger": "ae" - }, - { - "content": "${1:${2:newValue} := ${3:Object} }clone do(\n\t$0\n)", - "name": "clone do", - "scope": "io", - "tabTrigger": "cdo" - }, - { - "content": "docSlot(\"${1:slotName}\", \"${2:documentation}\")", - "name": "docSlot", - "scope": "io", - "tabTrigger": "ds" - }, - { - "content": "(${1:header,}\n\t${2:body}\n)$0", - "keyEquivalent": "@(", - "name": "Indented Bracketed Line", - "scope": "io", - "tabTrigger": "(" - }, - { - "content": "\n\t$0\n", - "keyEquivalent": "\r", - "name": "Special: Return Inside Empty Parenthesis", - "scope": "io meta.empty-parenthesis.io, io meta.comma-parenthesis.io" - }, - { - "content": "${1:methodName} := method(${2:args,}\n\t$0\n)", - "name": "method", - "scope": "io", - "tabTrigger": "m" - }, - { - "content": "newSlot(\"${1:slotName}\", ${2:defaultValue}, \"${3:docString}\")$0", - "name": "newSlot", - "scope": "io", - "tabTrigger": "ns" - }, - { - "content": "${1:name} := Object clone do(\n\t$0\n)", - "name": "Object clone do", - "scope": "io", - "tabTrigger": "ocdo" - }, - { - "content": "test${1:SomeFeature} := method(\n\t$0\n)", - "name": "testMethod", - "scope": "io", - "tabTrigger": "ts" - }, - { - "content": "${1:Something}Test := ${2:UnitTest} clone do(\n\t$0\n)", - "name": "UnitTest", - "scope": "io", - "tabTrigger": "ut" - } -]; -exports.scope = "io"; - -}); (function() { - window.require(["ace/snippets/io"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/jack.js b/src/ace/snippets/jack.js deleted file mode 100644 index fc242d3c2..000000000 --- a/src/ace/snippets/jack.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/jack"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/jade.js b/src/ace/snippets/jade.js deleted file mode 100644 index 1a1c1c25e..000000000 --- a/src/ace/snippets/jade.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/jade"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/java.js b/src/ace/snippets/java.js deleted file mode 100644 index 1ae4f8642..000000000 --- a/src/ace/snippets/java.js +++ /dev/null @@ -1,254 +0,0 @@ -define("ace/snippets/java",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "## Access Modifiers\n\ -snippet po\n\ - protected\n\ -snippet pu\n\ - public\n\ -snippet pr\n\ - private\n\ -##\n\ -## Annotations\n\ -snippet before\n\ - @Before\n\ - static void ${1:intercept}(${2:args}) { ${3} }\n\ -snippet mm\n\ - @ManyToMany\n\ - ${1}\n\ -snippet mo\n\ - @ManyToOne\n\ - ${1}\n\ -snippet om\n\ - @OneToMany${1:(cascade=CascadeType.ALL)}\n\ - ${2}\n\ -snippet oo\n\ - @OneToOne\n\ - ${1}\n\ -##\n\ -## Basic Java packages and import\n\ -snippet im\n\ - import\n\ -snippet j.b\n\ - java.beans.\n\ -snippet j.i\n\ - java.io.\n\ -snippet j.m\n\ - java.math.\n\ -snippet j.n\n\ - java.net.\n\ -snippet j.u\n\ - java.util.\n\ -##\n\ -## Class\n\ -snippet cl\n\ - class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\ -snippet in\n\ - interface ${1:`Filename(\"\", \"untitled\")`} ${2:extends Parent}${3}\n\ -snippet tc\n\ - public class ${1:`Filename()`} extends ${2:TestCase}\n\ -##\n\ -## Class Enhancements\n\ -snippet ext\n\ - extends \n\ -snippet imp\n\ - implements\n\ -##\n\ -## Comments\n\ -snippet /*\n\ - /*\n\ - * ${1}\n\ - */\n\ -##\n\ -## Constants\n\ -snippet co\n\ - static public final ${1:String} ${2:var} = ${3};${4}\n\ -snippet cos\n\ - static public final String ${1:var} = \"${2}\";${3}\n\ -##\n\ -## Control Statements\n\ -snippet case\n\ - case ${1}:\n\ - ${2}\n\ -snippet def\n\ - default:\n\ - ${2}\n\ -snippet el\n\ - else\n\ -snippet elif\n\ - else if (${1}) ${2}\n\ -snippet if\n\ - if (${1}) ${2}\n\ -snippet sw\n\ - switch (${1}) {\n\ - ${2}\n\ - }\n\ -##\n\ -## Create a Method\n\ -snippet m\n\ - ${1:void} ${2:method}(${3}) ${4:throws }${5}\n\ -##\n\ -## Create a Variable\n\ -snippet v\n\ - ${1:String} ${2:var}${3: = null}${4};${5}\n\ -##\n\ -## Enhancements to Methods, variables, classes, etc.\n\ -snippet ab\n\ - abstract\n\ -snippet fi\n\ - final\n\ -snippet st\n\ - static\n\ -snippet sy\n\ - synchronized\n\ -##\n\ -## Error Methods\n\ -snippet err\n\ - System.err.print(\"${1:Message}\");\n\ -snippet errf\n\ - System.err.printf(\"${1:Message}\", ${2:exception});\n\ -snippet errln\n\ - System.err.println(\"${1:Message}\");\n\ -##\n\ -## Exception Handling\n\ -snippet as\n\ - assert ${1:test} : \"${2:Failure message}\";${3}\n\ -snippet ca\n\ - catch(${1:Exception} ${2:e}) ${3}\n\ -snippet thr\n\ - throw\n\ -snippet ths\n\ - throws\n\ -snippet try\n\ - try {\n\ - ${3}\n\ - } catch(${1:Exception} ${2:e}) {\n\ - }\n\ -snippet tryf\n\ - try {\n\ - ${3}\n\ - } catch(${1:Exception} ${2:e}) {\n\ - } finally {\n\ - }\n\ -##\n\ -## Find Methods\n\ -snippet findall\n\ - List<${1:listName}> ${2:items} = ${1}.findAll();${3}\n\ -snippet findbyid\n\ - ${1:var} ${2:item} = ${1}.findById(${3});${4}\n\ -##\n\ -## Javadocs\n\ -snippet /**\n\ - /**\n\ - * ${1}\n\ - */\n\ -snippet @au\n\ - @author `system(\"grep \\`id -un\\` /etc/passwd | cut -d \\\":\\\" -f5 | cut -d \\\",\\\" -f1\")`\n\ -snippet @br\n\ - @brief ${1:Description}\n\ -snippet @fi\n\ - @file ${1:`Filename()`}.java\n\ -snippet @pa\n\ - @param ${1:param}\n\ -snippet @re\n\ - @return ${1:param}\n\ -##\n\ -## Logger Methods\n\ -snippet debug\n\ - Logger.debug(${1:param});${2}\n\ -snippet error\n\ - Logger.error(${1:param});${2}\n\ -snippet info\n\ - Logger.info(${1:param});${2}\n\ -snippet warn\n\ - Logger.warn(${1:param});${2}\n\ -##\n\ -## Loops\n\ -snippet enfor\n\ - for (${1} : ${2}) ${3}\n\ -snippet for\n\ - for (${1}; ${2}; ${3}) ${4}\n\ -snippet wh\n\ - while (${1}) ${2}\n\ -##\n\ -## Main method\n\ -snippet main\n\ - public static void main (String[] args) {\n\ - ${1:/* code */}\n\ - }\n\ -##\n\ -## Print Methods\n\ -snippet print\n\ - System.out.print(\"${1:Message}\");\n\ -snippet printf\n\ - System.out.printf(\"${1:Message}\", ${2:args});\n\ -snippet println\n\ - System.out.println(${1});\n\ -##\n\ -## Render Methods\n\ -snippet ren\n\ - render(${1:param});${2}\n\ -snippet rena\n\ - renderArgs.put(\"${1}\", ${2});${3}\n\ -snippet renb\n\ - renderBinary(${1:param});${2}\n\ -snippet renj\n\ - renderJSON(${1:param});${2}\n\ -snippet renx\n\ - renderXml(${1:param});${2}\n\ -##\n\ -## Setter and Getter Methods\n\ -snippet set\n\ - ${1:public} void set${3:}(${2:String} ${4:}){\n\ - this.$4 = $4;\n\ - }\n\ -snippet get\n\ - ${1:public} ${2:String} get${3:}(){\n\ - return this.${4:};\n\ - }\n\ -##\n\ -## Terminate Methods or Loops\n\ -snippet re\n\ - return\n\ -snippet br\n\ - break;\n\ -##\n\ -## Test Methods\n\ -snippet t\n\ - public void test${1:Name}() throws Exception {\n\ - ${2}\n\ - }\n\ -snippet test\n\ - @Test\n\ - public void test${1:Name}() throws Exception {\n\ - ${2}\n\ - }\n\ -##\n\ -## Utils\n\ -snippet Sc\n\ - Scanner\n\ -##\n\ -## Miscellaneous\n\ -snippet action\n\ - public static void ${1:index}(${2:args}) { ${3} }\n\ -snippet rnf\n\ - notFound(${1:param});${2}\n\ -snippet rnfin\n\ - notFoundIfNull(${1:param});${2}\n\ -snippet rr\n\ - redirect(${1:param});${2}\n\ -snippet ru\n\ - unauthorized(${1:param});${2}\n\ -snippet unless\n\ - (unless=${1:param});${2}\n\ -"; -exports.scope = "java"; - -}); (function() { - window.require(["ace/snippets/java"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/javascript.js b/src/ace/snippets/javascript.js deleted file mode 100644 index 711e54747..000000000 --- a/src/ace/snippets/javascript.js +++ /dev/null @@ -1,214 +0,0 @@ -define('ace/snippets/javascript', ['require', 'exports', 'module'], function ( - require, - exports, - module, -) { - 'use strict'; - - exports.snippetText = - '# Prototype\n\ -snippet proto\n\ - ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n\ - ${4:// body...}\n\ - };\n\ -# Function\n\ -snippet fun\n\ - function ${1?:function_name}(${2:argument}) {\n\ - ${3:// body...}\n\ - }\n\ -# Anonymous Function\n\ -regex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\n\ -snippet f\n\ - function${M1?: ${1:functionName}}($2) {\n\ - ${0:$TM_SELECTED_TEXT}\n\ - }${M2?;}${M3?,}${M4?)}\n\ -# Immediate function\n\ -trigger \\(?f\\(\n\ -endTrigger \\)?\n\ -snippet f(\n\ - (function(${1}) {\n\ - ${0:${TM_SELECTED_TEXT:/* code */}}\n\ - }(${1}));\n\ -# if\n\ -snippet if\n\ - if (${1:true}) {\n\ - ${0}\n\ - }\n\ -# if ... else\n\ -snippet ife\n\ - if (${1:true}) {\n\ - ${2}\n\ - } else {\n\ - ${0}\n\ - }\n\ -# eventlistener \n\ -snippet addeventlistener\n\ - addEventListener("${1:click}", ${2})\n\ -# tertiary conditional\n\ -snippet ter\n\ - ${1:/* condition */} ? ${2:a} : ${3:b}\n\ -# switch\n\ -snippet switch\n\ - switch (${1:expression}) {\n\ - case \'${3:case}\':\n\ - ${4:// code}\n\ - break;\n\ - ${5}\n\ - default:\n\ - ${2:// code}\n\ - }\n\ -# case\n\ -snippet case\n\ - case \'${1:case}\':\n\ - ${2:// code}\n\ - break;\n\ - ${3}\n\ -\n\ -# while (...) {...}\n\ -snippet wh\n\ - while (${1:/* condition */}) {\n\ - ${0:/* code */}\n\ - }\n\ -# try\n\ -snippet try\n\ - try {\n\ - ${0:/* code */}\n\ - } catch (e) {}\n\ -# do...while\n\ -snippet do\n\ - do {\n\ - ${2:/* code */}\n\ - } while (${1:/* condition */});\n\ -# Object Method\n\ -snippet :f\n\ -regex /([,{[])|^\\s*/:f/\n\ - ${1:method_name}: function(${2:attribute}) {\n\ - ${0}\n\ - }${3:,}\n\ -# setTimeout function\n\ -snippet setTimeout\n\ -regex /\\b/st|timeout|setTimeo?u?t?/\n\ - setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n\ -# Get Elements\n\ -snippet gett\n\ - getElementsBy${1:TagName}(\'${2}\')${3}\n\ -snippet queryall\n\ - querySelectorAll(\'${1}\')${2}\n\ -# Get Element\n\ -snippet get\n\ - getElementById(\'${1}\')${2}\n\ -snippet query\n\ - querySelector(\'${1}\')${2}\n\ -# console.log (Firebug)\n\ -snippet cl\n\ - console.log(${1});\n\ -# return\n\ -snippet ret\n\ - return ${1:result}\n\ -# for (property in object ) { ... }\n\ -snippet fori\n\ - for (let ${1:prop} in ${2:Things}) {\n\ - ${0:$2[$1]}\n\ - }\n\ -# hasOwnProperty\n\ -snippet has\n\ - hasOwnProperty(${1})\n\ -# docstring\n\ -snippet /**\n\ - /**\n\ - * ${1:description}\n\ - *\n\ - */\n\ -snippet @par\n\ -regex /^\\s*\\*\\s*/@(para?m?)?/\n\ - @param {${1:type}} ${2:name} ${3:description}\n\ -snippet @ret\n\ - @return {${1:type}} ${2:description}\n\ -# JSON.parse\n\ -snippet jsonp\n\ - JSON.parse(${1:jstr});\n\ -# JSON.stringify\n\ -snippet jsons\n\ - JSON.stringify(${1:object});\n\ -# self-defining function\n\ -snippet sdf\n\ - let ${1:function_name} = function(${2:argument}) {\n\ - ${3:// initial code ...}\n\ -\n\ - $1 = function($2) {\n\ - ${4:// main code}\n\ - };\n\ - }\n\ -# singleton\n\ -snippet sing\n\ - function ${1:Singleton} (${2:argument}) {\n\ - // the cached instance\n\ - let instance;\n\ -\n\ - // rewrite the constructor\n\ - $1 = function $1($2) {\n\ - return instance;\n\ - };\n\ - \n\ - // carry over the prototype properties\n\ - $1.prototype = this;\n\ -\n\ - // the instance\n\ - instance = new $1();\n\ -\n\ - // reset the constructor pointer\n\ - instance.constructor = $1;\n\ -\n\ - ${3:// code ...}\n\ -\n\ - return instance;\n\ - }\n\ -# class\n\ -snippet class\n\ -regex /^\\s*/clas{0,2}/\n\ - class ${1:className} {\n\ - $40$0\n\ - }\n\ -# \n\ -snippet for-\n\ - for (let ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n\ - ${0:${2:Things}[${1:i}];}\n\ - }\n\ -# for (...) {...}\n\ -snippet for\n\ - for (let ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n\ - ${3:$2[$1]}$0\n\ - }\n\ -# for (...) {...} (Improved Native For-Loop)\n\ -snippet forr\n\ - for (let ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n\ - ${3:$2[$1]}$0\n\ - }\n\ -\n\ -\n\ -#modules\n\ -snippet def\n\ - define(function(require, exports, module) {\n\ - "use strict";\n\ - let ${1/.*\\///} = require("${1}");\n\ - \n\ - $TM_SELECTED_TEXT\n\ - });\n\ -snippet req\n\ -guard ^\\s*\n\ - let ${1/.*\\///} = require("${1}");\n\ - $0\n\ -snippet requ\n\ -guard ^\\s*\n\ - let ${1/.*\\/(.)/\\u$1/} = require("${1}").${1/.*\\/(.)/\\u$1/};\n\ - $0\n\ -'; - exports.scope = 'javascript'; -}); -(function () { - window.require(['ace/snippets/javascript'], function (m) { - if (typeof module == 'object' && typeof exports == 'object' && module) { - module.exports = m; - } - }); -})(); diff --git a/src/ace/snippets/json.js b/src/ace/snippets/json.js deleted file mode 100644 index f1c015c42..000000000 --- a/src/ace/snippets/json.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/json"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/json5.js b/src/ace/snippets/json5.js deleted file mode 100644 index 4ae9f4b7b..000000000 --- a/src/ace/snippets/json5.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/json5"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/jsoniq.js b/src/ace/snippets/jsoniq.js deleted file mode 100644 index 256068d39..000000000 --- a/src/ace/snippets/jsoniq.js +++ /dev/null @@ -1,75 +0,0 @@ -define("ace/snippets/jsoniq",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet for\n\ - for $${1:item} in ${2:expr}\n\ -snippet return\n\ - return ${1:expr}\n\ -snippet import\n\ - import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\ -snippet some\n\ - some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ -snippet every\n\ - every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ -snippet if\n\ - if(${1:true}) then ${2:expr} else ${3:true}\n\ -snippet switch\n\ - switch(${1:\"foo\"})\n\ - case ${2:\"foo\"}\n\ - return ${3:true}\n\ - default return ${4:false}\n\ -snippet try\n\ - try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\ -snippet tumbling\n\ - for tumbling window $${1:varname} in ${2:expr}\n\ - start at $${3:start} when ${4:expr}\n\ - end at $${5:end} when ${6:expr}\n\ - return ${7:expr}\n\ -snippet sliding\n\ - for sliding window $${1:varname} in ${2:expr}\n\ - start at $${3:start} when ${4:expr}\n\ - end at $${5:end} when ${6:expr}\n\ - return ${7:expr}\n\ -snippet let\n\ - let $${1:varname} := ${2:expr}\n\ -snippet group\n\ - group by $${1:varname} := ${2:expr}\n\ -snippet order\n\ - order by ${1:expr} ${2:descending}\n\ -snippet stable\n\ - stable order by ${1:expr}\n\ -snippet count\n\ - count $${1:varname}\n\ -snippet ordered\n\ - ordered { ${1:expr} }\n\ -snippet unordered\n\ - unordered { ${1:expr} }\n\ -snippet treat \n\ - treat as ${1:expr}\n\ -snippet castable\n\ - castable as ${1:atomicType}\n\ -snippet cast\n\ - cast as ${1:atomicType}\n\ -snippet typeswitch\n\ - typeswitch(${1:expr})\n\ - case ${2:type} return ${3:expr}\n\ - default return ${4:expr}\n\ -snippet var\n\ - declare variable $${1:varname} := ${2:expr};\n\ -snippet fn\n\ - declare function ${1:ns}:${2:name}(){\n\ - ${3:expr}\n\ - };\n\ -snippet module\n\ - module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\ -"; -exports.scope = "jsoniq"; - -}); (function() { - window.require(["ace/snippets/jsoniq"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/jsp.js b/src/ace/snippets/jsp.js deleted file mode 100644 index 741d5aa86..000000000 --- a/src/ace/snippets/jsp.js +++ /dev/null @@ -1,113 +0,0 @@ -define("ace/snippets/jsp",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet @page\n\ - <%@page contentType=\"text/html\" pageEncoding=\"UTF-8\"%>\n\ -snippet jstl\n\ - <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\ - <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\ -snippet jstl:c\n\ - <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\ -snippet jstl:fn\n\ - <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\ -snippet cpath\n\ - ${pageContext.request.contextPath}\n\ -snippet cout\n\ - \n\ -snippet cset\n\ - \n\ -snippet cremove\n\ - \n\ -snippet ccatch\n\ - \n\ -snippet cif\n\ - \n\ - ${2}\n\ - \n\ -snippet cchoose\n\ - \n\ - ${1}\n\ - \n\ -snippet cwhen\n\ - \n\ - ${2}\n\ - \n\ -snippet cother\n\ - \n\ - ${1}\n\ - \n\ -snippet cfore\n\ - \n\ - ${4:}\n\ - \n\ -snippet cfort\n\ - ${2:item1,item2,item3}\n\ - \n\ - ${5:}\n\ - \n\ -snippet cparam\n\ - \n\ -snippet cparam+\n\ - \n\ - cparam+${3}\n\ -snippet cimport\n\ - \n\ -snippet cimport+\n\ - \n\ - \n\ - cparam+${4}\n\ - \n\ -snippet curl\n\ - \n\ - ${3}\n\ -snippet curl+\n\ - \n\ - \n\ - cparam+${6}\n\ - \n\ - ${3}\n\ -snippet credirect\n\ - \n\ -snippet contains\n\ - ${fn:contains(${1:string}, ${2:substr})}\n\ -snippet contains:i\n\ - ${fn:containsIgnoreCase(${1:string}, ${2:substr})}\n\ -snippet endswith\n\ - ${fn:endsWith(${1:string}, ${2:suffix})}\n\ -snippet escape\n\ - ${fn:escapeXml(${1:string})}\n\ -snippet indexof\n\ - ${fn:indexOf(${1:string}, ${2:substr})}\n\ -snippet join\n\ - ${fn:join(${1:collection}, ${2:delims})}\n\ -snippet length\n\ - ${fn:length(${1:collection_or_string})}\n\ -snippet replace\n\ - ${fn:replace(${1:string}, ${2:substr}, ${3:replace})}\n\ -snippet split\n\ - ${fn:split(${1:string}, ${2:delims})}\n\ -snippet startswith\n\ - ${fn:startsWith(${1:string}, ${2:prefix})}\n\ -snippet substr\n\ - ${fn:substring(${1:string}, ${2:begin}, ${3:end})}\n\ -snippet substr:a\n\ - ${fn:substringAfter(${1:string}, ${2:substr})}\n\ -snippet substr:b\n\ - ${fn:substringBefore(${1:string}, ${2:substr})}\n\ -snippet lc\n\ - ${fn:toLowerCase(${1:string})}\n\ -snippet uc\n\ - ${fn:toUpperCase(${1:string})}\n\ -snippet trim\n\ - ${fn:trim(${1:string})}\n\ -"; -exports.scope = "jsp"; - -}); (function() { - window.require(["ace/snippets/jsp"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/jssm.js b/src/ace/snippets/jssm.js deleted file mode 100644 index 2fcea71cc..000000000 --- a/src/ace/snippets/jssm.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/jssm"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/jsx.js b/src/ace/snippets/jsx.js deleted file mode 100644 index b26a3586b..000000000 --- a/src/ace/snippets/jsx.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/jsx"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/julia.js b/src/ace/snippets/julia.js deleted file mode 100644 index 30a746507..000000000 --- a/src/ace/snippets/julia.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/julia"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/kotlin.js b/src/ace/snippets/kotlin.js deleted file mode 100644 index c9e543c7d..000000000 --- a/src/ace/snippets/kotlin.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/kotlin"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/latex.js b/src/ace/snippets/latex.js deleted file mode 100644 index 711a30b78..000000000 --- a/src/ace/snippets/latex.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/latex"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/latte.js b/src/ace/snippets/latte.js deleted file mode 100644 index d5c341ce8..000000000 --- a/src/ace/snippets/latte.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/latte"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/less.js b/src/ace/snippets/less.js deleted file mode 100644 index 2b4c6b3b4..000000000 --- a/src/ace/snippets/less.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/less"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/liquid.js b/src/ace/snippets/liquid.js deleted file mode 100644 index 751d4625b..000000000 --- a/src/ace/snippets/liquid.js +++ /dev/null @@ -1,895 +0,0 @@ -define("ace/snippets/liquid",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "\n\ -# liquid specific snippets\n\ -snippet ife\n\ - {% if ${1:condition} %}\n\ -\n\ - {% else %}\n\ -\n\ - {% endif %}\n\ -snippet if\n\ - {% if ${1:condition} %}\n\ - \n\ - {% endif %}\n\ -snippet for\n\ - {% for in ${1:iterator} %}\n\ -\n\ - {% endfor %}\n\ -snippet capture\n\ - {% capture ${1} %}\n\ -\n\ - {% endcapture %}\n\ -snippet comment\n\ - {% comment %}\n\ - ${1:comment}\n\ - {% endcomment %}\n\ -\n\ -# Include html.snippets\n\ -# Some useful Unicode entities\n\ -# Non-Breaking Space\n\ -snippet nbs\n\ -  \n\ -# ←\n\ -snippet left\n\ - ←\n\ -# →\n\ -snippet right\n\ - →\n\ -# ↑\n\ -snippet up\n\ - ↑\n\ -# ↓\n\ -snippet down\n\ - ↓\n\ -# ↩\n\ -snippet return\n\ - ↩\n\ -# ⇤\n\ -snippet backtab\n\ - ⇤\n\ -# ⇥\n\ -snippet tab\n\ - ⇥\n\ -# ⇧\n\ -snippet shift\n\ - ⇧\n\ -# ⌃\n\ -snippet ctrl\n\ - ⌃\n\ -# ⌅\n\ -snippet enter\n\ - ⌅\n\ -# ⌘\n\ -snippet cmd\n\ - ⌘\n\ -# ⌥\n\ -snippet option\n\ - ⌥\n\ -# ⌦\n\ -snippet delete\n\ - ⌦\n\ -# ⌫\n\ -snippet backspace\n\ - ⌫\n\ -# ⎋\n\ -snippet esc\n\ - ⎋\n\ -# Generic Doctype\n\ -snippet doctype HTML 4.01 Strict\n\ - \n\ -snippet doctype HTML 4.01 Transitional\n\ - \n\ -snippet doctype HTML 5\n\ - \n\ -snippet doctype XHTML 1.0 Frameset\n\ - \n\ -snippet doctype XHTML 1.0 Strict\n\ - \n\ -snippet doctype XHTML 1.0 Transitional\n\ - \n\ -snippet doctype XHTML 1.1\n\ - \n\ -# HTML Doctype 4.01 Strict\n\ -snippet docts\n\ - \n\ -# HTML Doctype 4.01 Transitional\n\ -snippet doct\n\ - \n\ -# HTML Doctype 5\n\ -snippet doct5\n\ - \n\ -# XHTML Doctype 1.0 Frameset\n\ -snippet docxf\n\ - \n\ -# XHTML Doctype 1.0 Strict\n\ -snippet docxs\n\ - \n\ -# XHTML Doctype 1.0 Transitional\n\ -snippet docxt\n\ - \n\ -# XHTML Doctype 1.1\n\ -snippet docx\n\ - \n\ -# html5shiv\n\ -snippet html5shiv\n\ - \n\ -snippet html5printshiv\n\ - \n\ -# Attributes\n\ -snippet attr\n\ - ${1:attribute}=\"${2:property}\"\n\ -snippet attr+\n\ - ${1:attribute}=\"${2:property}\" attr+${3}\n\ -snippet .\n\ - class=\"${1}\"${2}\n\ -snippet #\n\ - id=\"${1}\"${2}\n\ -snippet alt\n\ - alt=\"${1}\"${2}\n\ -snippet charset\n\ - charset=\"${1:utf-8}\"${2}\n\ -snippet data\n\ - data-${1}=\"${2:$1}\"${3}\n\ -snippet for\n\ - for=\"${1}\"${2}\n\ -snippet height\n\ - height=\"${1}\"${2}\n\ -snippet href\n\ - href=\"${1:#}\"${2}\n\ -snippet lang\n\ - lang=\"${1:en}\"${2}\n\ -snippet media\n\ - media=\"${1}\"${2}\n\ -snippet name\n\ - name=\"${1}\"${2}\n\ -snippet rel\n\ - rel=\"${1}\"${2}\n\ -snippet scope\n\ - scope=\"${1:row}\"${2}\n\ -snippet src\n\ - src=\"${1}\"${2}\n\ -snippet title=\n\ - title=\"${1}\"${2}\n\ -snippet type\n\ - type=\"${1}\"${2}\n\ -snippet value\n\ - value=\"${1}\"${2}\n\ -snippet width\n\ - width=\"${1}\"${2}\n\ -# Elements\n\ -snippet a\n\ - ${2:$1}\n\ -snippet a.\n\ - ${3:$1}\n\ -snippet a#\n\ - ${3:$1}\n\ -snippet a:ext\n\ - ${2:$1}\n\ -snippet a:mail\n\ - ${3:email me}\n\ -snippet abbr\n\ - ${2}\n\ -snippet address\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet area\n\ - \"${4}\"\n\ -snippet area+\n\ - \"${4}\"\n\ - area+${5}\n\ -snippet area:c\n\ - \"${3}\"\n\ -snippet area:d\n\ - \"${3}\"\n\ -snippet area:p\n\ - \"${3}\"\n\ -snippet area:r\n\ - \"${3}\"\n\ -snippet article\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet article.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet article#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet aside\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet aside.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet aside#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet audio\n\ - ${2}\n\ -snippet b\n\ - ${1}\n\ -snippet base\n\ - \n\ -snippet bdi\n\ - ${1}\n\ -snippet bdo\n\ - ${2}\n\ -snippet bdo:l\n\ - ${1}\n\ -snippet bdo:r\n\ - ${1}\n\ -snippet blockquote\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet body\n\ - \n\ - ${1}\n\ - \n\ -snippet br\n\ -
    ${1}\n\ -snippet button\n\ - \n\ -snippet button.\n\ - \n\ -snippet button#\n\ - \n\ -snippet button:s\n\ - \n\ -snippet button:r\n\ - \n\ -snippet canvas\n\ - \n\ - ${1}\n\ - \n\ -snippet caption\n\ - ${1}\n\ -snippet cite\n\ - ${1}\n\ -snippet code\n\ - ${1}\n\ -snippet col\n\ - ${1}\n\ -snippet col+\n\ - \n\ - col+${1}\n\ -snippet colgroup\n\ - \n\ - ${1}\n\ - \n\ -snippet colgroup+\n\ - \n\ - \n\ - col+${1}\n\ - \n\ -snippet command\n\ - \n\ -snippet command:c\n\ - \n\ -snippet command:r\n\ - \n\ -snippet datagrid\n\ - \n\ - ${1}\n\ - \n\ -snippet datalist\n\ - \n\ - ${1}\n\ - \n\ -snippet datatemplate\n\ - \n\ - ${1}\n\ - \n\ -snippet dd\n\ -
    ${1}
    \n\ -snippet dd.\n\ -
    ${2}
    \n\ -snippet dd#\n\ -
    ${2}
    \n\ -snippet del\n\ - ${1}\n\ -snippet details\n\ -
    ${1}
    \n\ -snippet dfn\n\ - ${1}\n\ -snippet dialog\n\ - \n\ - ${1}\n\ - \n\ -snippet div\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet div.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet div#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet dl\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet dl.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet dl#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet dl+\n\ -
    \n\ -
    ${1}
    \n\ -
    ${2}
    \n\ - dt+${3}\n\ -
    \n\ -snippet dt\n\ -
    ${1}
    \n\ -snippet dt.\n\ -
    ${2}
    \n\ -snippet dt#\n\ -
    ${2}
    \n\ -snippet dt+\n\ -
    ${1}
    \n\ -
    ${2}
    \n\ - dt+${3}\n\ -snippet em\n\ - ${1}\n\ -snippet embed\n\ - \n\ -snippet fieldset\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet fieldset.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet fieldset#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet fieldset+\n\ -
    \n\ - ${1}\n\ - ${2}\n\ -
    \n\ - fieldset+${3}\n\ -snippet figcaption\n\ -
    ${1}
    \n\ -snippet figure\n\ -
    ${1}
    \n\ -snippet footer\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet footer.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet footer#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet form\n\ -
    \n\ - ${3}\n\ -
    \n\ -snippet form.\n\ -
    \n\ - ${4}\n\ -
    \n\ -snippet form#\n\ -
    \n\ - ${4}\n\ -
    \n\ -snippet h1\n\ -

    ${1}

    \n\ -snippet h1.\n\ -

    ${2}

    \n\ -snippet h1#\n\ -

    ${2}

    \n\ -snippet h2\n\ -

    ${1}

    \n\ -snippet h2.\n\ -

    ${2}

    \n\ -snippet h2#\n\ -

    ${2}

    \n\ -snippet h3\n\ -

    ${1}

    \n\ -snippet h3.\n\ -

    ${2}

    \n\ -snippet h3#\n\ -

    ${2}

    \n\ -snippet h4\n\ -

    ${1}

    \n\ -snippet h4.\n\ -

    ${2}

    \n\ -snippet h4#\n\ -

    ${2}

    \n\ -snippet h5\n\ -
    ${1}
    \n\ -snippet h5.\n\ -
    ${2}
    \n\ -snippet h5#\n\ -
    ${2}
    \n\ -snippet h6\n\ -
    ${1}
    \n\ -snippet h6.\n\ -
    ${2}
    \n\ -snippet h6#\n\ -
    ${2}
    \n\ -snippet head\n\ - \n\ - \n\ -\n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ - ${2}\n\ - \n\ -snippet header\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet header.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet header#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet hgroup\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet hgroup.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet hr\n\ -
    ${1}\n\ -snippet html\n\ - \n\ - ${1}\n\ - \n\ -snippet xhtml\n\ - \n\ - ${1}\n\ - \n\ -snippet html5\n\ - \n\ - \n\ - \n\ - \n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ - ${2:meta}\n\ - \n\ - \n\ - ${3:body}\n\ - \n\ - \n\ -snippet xhtml5\n\ - \n\ - \n\ - \n\ - \n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ - ${2:meta}\n\ - \n\ - \n\ - ${3:body}\n\ - \n\ - \n\ -snippet i\n\ - ${1}\n\ -snippet iframe\n\ - ${2}\n\ -snippet iframe.\n\ - ${3}\n\ -snippet iframe#\n\ - ${3}\n\ -snippet img\n\ - \"${2}\"${3}\n\ -snippet img.\n\ - \"${3}\"${4}\n\ -snippet img#\n\ - \"${3}\"${4}\n\ -snippet input\n\ - ${5}\n\ -snippet input.\n\ - ${6}\n\ -snippet input:text\n\ - ${4}\n\ -snippet input:submit\n\ - ${4}\n\ -snippet input:hidden\n\ - ${4}\n\ -snippet input:button\n\ - ${4}\n\ -snippet input:image\n\ - ${5}\n\ -snippet input:checkbox\n\ - ${3}\n\ -snippet input:radio\n\ - ${3}\n\ -snippet input:color\n\ - ${4}\n\ -snippet input:date\n\ - ${4}\n\ -snippet input:datetime\n\ - ${4}\n\ -snippet input:datetime-local\n\ - ${4}\n\ -snippet input:email\n\ - ${4}\n\ -snippet input:file\n\ - ${4}\n\ -snippet input:month\n\ - ${4}\n\ -snippet input:number\n\ - ${4}\n\ -snippet input:password\n\ - ${4}\n\ -snippet input:range\n\ - ${4}\n\ -snippet input:reset\n\ - ${4}\n\ -snippet input:search\n\ - ${4}\n\ -snippet input:time\n\ - ${4}\n\ -snippet input:url\n\ - ${4}\n\ -snippet input:week\n\ - ${4}\n\ -snippet ins\n\ - ${1}\n\ -snippet kbd\n\ - ${1}\n\ -snippet keygen\n\ - ${1}\n\ -snippet label\n\ - \n\ -snippet label:i\n\ - \n\ - ${7}\n\ -snippet label:s\n\ - \n\ - \n\ -snippet legend\n\ - ${1}\n\ -snippet legend+\n\ - ${1}\n\ -snippet li\n\ -
  • ${1}
  • \n\ -snippet li.\n\ -
  • ${2}
  • \n\ -snippet li+\n\ -
  • ${1}
  • \n\ - li+${2}\n\ -snippet lia\n\ -
  • ${1}
  • \n\ -snippet lia+\n\ -
  • ${1}
  • \n\ - lia+${3}\n\ -snippet link\n\ - ${5}\n\ -snippet link:atom\n\ - ${2}\n\ -snippet link:css\n\ - ${4}\n\ -snippet link:favicon\n\ - ${2}\n\ -snippet link:rss\n\ - ${2}\n\ -snippet link:touch\n\ - ${2}\n\ -snippet map\n\ - \n\ - ${2}\n\ - \n\ -snippet map.\n\ - \n\ - ${3}\n\ - \n\ -snippet map#\n\ - \n\ - ${3}\n\ - \n\ -snippet map+\n\ - \n\ - \"${5}\"${6}\n\ - ${7}\n\ -snippet mark\n\ - ${1}\n\ -snippet menu\n\ - \n\ - ${1}\n\ - \n\ -snippet menu:c\n\ - \n\ - ${1}\n\ - \n\ -snippet menu:t\n\ - \n\ - ${1}\n\ - \n\ -snippet meta\n\ - ${3}\n\ -snippet meta:compat\n\ - ${3}\n\ -snippet meta:refresh\n\ - ${3}\n\ -snippet meta:utf\n\ - ${3}\n\ -snippet meter\n\ - ${1}\n\ -snippet nav\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet nav.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet nav#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet noscript\n\ - \n\ -snippet object\n\ - \n\ - ${3}\n\ - ${4}\n\ -# Embed QT Movie\n\ -snippet movie\n\ - \n\ - \n\ - \n\ - \n\ - \n\ - ${6}\n\ -snippet ol\n\ -
      \n\ - ${1}\n\ -
    \n\ -snippet ol.\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ol#\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ol+\n\ -
      \n\ -
    1. ${1}
    2. \n\ - li+${2}\n\ -
    \n\ -snippet opt\n\ - \n\ -snippet opt+\n\ - \n\ - opt+${3}\n\ -snippet optt\n\ - \n\ -snippet optgroup\n\ - \n\ - \n\ - opt+${3}\n\ - \n\ -snippet output\n\ - ${1}\n\ -snippet p\n\ -

    ${1}

    \n\ -snippet param\n\ - ${3}\n\ -snippet pre\n\ -
    \n\
    -		${1}\n\
    -	
    \n\ -snippet progress\n\ - ${1}\n\ -snippet q\n\ - ${1}\n\ -snippet rp\n\ - ${1}\n\ -snippet rt\n\ - ${1}\n\ -snippet ruby\n\ - \n\ - ${1}\n\ - \n\ -snippet s\n\ - ${1}\n\ -snippet samp\n\ - \n\ - ${1}\n\ - \n\ -snippet script\n\ - \n\ -snippet scriptsrc\n\ - \n\ -snippet newscript\n\ - \n\ -snippet newscriptsrc\n\ - \n\ -snippet section\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet section.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet section#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet select\n\ - \n\ -snippet select.\n\ - \n\ -snippet select+\n\ - \n\ -snippet small\n\ - ${1}\n\ -snippet source\n\ - \n\ -snippet span\n\ - ${1}\n\ -snippet strong\n\ - ${1}\n\ -snippet style\n\ - \n\ -snippet sub\n\ - ${1}\n\ -snippet summary\n\ - \n\ - ${1}\n\ - \n\ -snippet sup\n\ - ${1}\n\ -snippet table\n\ - \n\ - ${2}\n\ -
    \n\ -snippet table.\n\ - \n\ - ${3}\n\ -
    \n\ -snippet table#\n\ - \n\ - ${3}\n\ -
    \n\ -snippet tbody\n\ - \n\ - ${1}\n\ - \n\ -snippet td\n\ - ${1}\n\ -snippet td.\n\ - ${2}\n\ -snippet td#\n\ - ${2}\n\ -snippet td+\n\ - ${1}\n\ - td+${2}\n\ -snippet textarea\n\ - ${6}\n\ -snippet tfoot\n\ - \n\ - ${1}\n\ - \n\ -snippet th\n\ - ${1}\n\ -snippet th.\n\ - ${2}\n\ -snippet th#\n\ - ${2}\n\ -snippet th+\n\ - ${1}\n\ - th+${2}\n\ -snippet thead\n\ - \n\ - ${1}\n\ - \n\ -snippet time\n\ - ${3:$1}\n\ -snippet title\n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ -snippet tr\n\ - \n\ - ${1}\n\ - \n\ -snippet tr+\n\ - \n\ - ${1}\n\ - td+${2}\n\ - \n\ -snippet track\n\ - ${5}${6}\n\ -snippet ul\n\ -
      \n\ - ${1}\n\ -
    \n\ -snippet ul.\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ul#\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ul+\n\ -
      \n\ -
    • ${1}
    • \n\ - li+${2}\n\ -
    \n\ -snippet var\n\ - ${1}\n\ -snippet video\n\ - ${7}${8}\n\ -snippet wbr\n\ - ${1}\n\ -"; -exports.scope = "liquid"; - -}); (function() { - window.require(["ace/snippets/liquid"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/lisp.js b/src/ace/snippets/lisp.js deleted file mode 100644 index a971e2131..000000000 --- a/src/ace/snippets/lisp.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/lisp"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/livescript.js b/src/ace/snippets/livescript.js deleted file mode 100644 index ed4b397ac..000000000 --- a/src/ace/snippets/livescript.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/livescript"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/logiql.js b/src/ace/snippets/logiql.js deleted file mode 100644 index d0fea2bda..000000000 --- a/src/ace/snippets/logiql.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/logiql"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/logtalk.js b/src/ace/snippets/logtalk.js deleted file mode 100644 index 4ae82ed92..000000000 --- a/src/ace/snippets/logtalk.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/logtalk"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/lsl.js b/src/ace/snippets/lsl.js deleted file mode 100644 index ee79cd67c..000000000 --- a/src/ace/snippets/lsl.js +++ /dev/null @@ -1,1246 +0,0 @@ -define("ace/snippets/lsl",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet @\n\ - @${1:label};\n\ -snippet CAMERA_ACTIVE\n\ - CAMERA_ACTIVE, ${1:integer isActive}, $0\n\ -snippet CAMERA_BEHINDNESS_ANGLE\n\ - CAMERA_BEHINDNESS_ANGLE, ${1:float degrees}, $0\n\ -snippet CAMERA_BEHINDNESS_LAG\n\ - CAMERA_BEHINDNESS_LAG, ${1:float seconds}, $0\n\ -snippet CAMERA_DISTANCE\n\ - CAMERA_DISTANCE, ${1:float meters}, $0\n\ -snippet CAMERA_FOCUS\n\ - CAMERA_FOCUS, ${1:vector position}, $0\n\ -snippet CAMERA_FOCUS_LAG\n\ - CAMERA_FOCUS_LAG, ${1:float seconds}, $0\n\ -snippet CAMERA_FOCUS_LOCKED\n\ - CAMERA_FOCUS_LOCKED, ${1:integer isLocked}, $0\n\ -snippet CAMERA_FOCUS_OFFSET\n\ - CAMERA_FOCUS_OFFSET, ${1:vector meters}, $0\n\ -snippet CAMERA_FOCUS_THRESHOLD\n\ - CAMERA_FOCUS_THRESHOLD, ${1:float meters}, $0\n\ -snippet CAMERA_PITCH\n\ - CAMERA_PITCH, ${1:float degrees}, $0\n\ -snippet CAMERA_POSITION\n\ - CAMERA_POSITION, ${1:vector position}, $0\n\ -snippet CAMERA_POSITION_LAG\n\ - CAMERA_POSITION_LAG, ${1:float seconds}, $0\n\ -snippet CAMERA_POSITION_LOCKED\n\ - CAMERA_POSITION_LOCKED, ${1:integer isLocked}, $0\n\ -snippet CAMERA_POSITION_THRESHOLD\n\ - CAMERA_POSITION_THRESHOLD, ${1:float meters}, $0\n\ -snippet CHARACTER_AVOIDANCE_MODE\n\ - CHARACTER_AVOIDANCE_MODE, ${1:integer flags}, $0\n\ -snippet CHARACTER_DESIRED_SPEED\n\ - CHARACTER_DESIRED_SPEED, ${1:float speed}, $0\n\ -snippet CHARACTER_DESIRED_TURN_SPEED\n\ - CHARACTER_DESIRED_TURN_SPEED, ${1:float speed}, $0\n\ -snippet CHARACTER_LENGTH\n\ - CHARACTER_LENGTH, ${1:float length}, $0\n\ -snippet CHARACTER_MAX_TURN_RADIUS\n\ - CHARACTER_MAX_TURN_RADIUS, ${1:float radius}, $0\n\ -snippet CHARACTER_ORIENTATION\n\ - CHARACTER_ORIENTATION, ${1:integer orientation}, $0\n\ -snippet CHARACTER_RADIUS\n\ - CHARACTER_RADIUS, ${1:float radius}, $0\n\ -snippet CHARACTER_STAY_WITHIN_PARCEL\n\ - CHARACTER_STAY_WITHIN_PARCEL, ${1:boolean stay}, $0\n\ -snippet CHARACTER_TYPE\n\ - CHARACTER_TYPE, ${1:integer type}, $0\n\ -snippet HTTP_BODY_MAXLENGTH\n\ - HTTP_BODY_MAXLENGTH, ${1:integer length}, $0\n\ -snippet HTTP_CUSTOM_HEADER\n\ - HTTP_CUSTOM_HEADER, ${1:string name}, ${2:string value}, $0\n\ -snippet HTTP_METHOD\n\ - HTTP_METHOD, ${1:string method}, $0\n\ -snippet HTTP_MIMETYPE\n\ - HTTP_MIMETYPE, ${1:string mimeType}, $0\n\ -snippet HTTP_PRAGMA_NO_CACHE\n\ - HTTP_PRAGMA_NO_CACHE, ${1:integer send_header}, $0\n\ -snippet HTTP_VERBOSE_THROTTLE\n\ - HTTP_VERBOSE_THROTTLE, ${1:integer noisy}, $0\n\ -snippet HTTP_VERIFY_CERT\n\ - HTTP_VERIFY_CERT, ${1:integer verify}, $0\n\ -snippet RC_DATA_FLAGS\n\ - RC_DATA_FLAGS, ${1:integer flags}, $0\n\ -snippet RC_DETECT_PHANTOM\n\ - RC_DETECT_PHANTOM, ${1:integer dectedPhantom}, $0\n\ -snippet RC_MAX_HITS\n\ - RC_MAX_HITS, ${1:integer maxHits}, $0\n\ -snippet RC_REJECT_TYPES\n\ - RC_REJECT_TYPES, ${1:integer filterMask}, $0\n\ -snippet at_rot_target\n\ - at_rot_target(${1:integer handle}, ${2:rotation targetrot}, ${3:rotation ourrot})\n\ - {\n\ - $0\n\ - }\n\ -snippet at_target\n\ - at_target(${1:integer tnum}, ${2:vector targetpos}, ${3:vector ourpos})\n\ - {\n\ - $0\n\ - }\n\ -snippet attach\n\ - attach(${1:key id})\n\ - {\n\ - $0\n\ - }\n\ -snippet changed\n\ - changed(${1:integer change})\n\ - {\n\ - $0\n\ - }\n\ -snippet collision\n\ - collision(${1:integer index})\n\ - {\n\ - $0\n\ - }\n\ -snippet collision_end\n\ - collision_end(${1:integer index})\n\ - {\n\ - $0\n\ - }\n\ -snippet collision_start\n\ - collision_start(${1:integer index})\n\ - {\n\ - $0\n\ - }\n\ -snippet control\n\ - control(${1:key id}, ${2:integer level}, ${3:integer edge})\n\ - {\n\ - $0\n\ - }\n\ -snippet dataserver\n\ - dataserver(${1:key query_id}, ${2:string data})\n\ - {\n\ - $0\n\ - }\n\ -snippet do\n\ - do\n\ - {\n\ - $0\n\ - }\n\ - while (${1:condition});\n\ -snippet else\n\ - else\n\ - {\n\ - $0\n\ - }\n\ -snippet email\n\ - email(${1:string time}, ${2:string address}, ${3:string subject}, ${4:string message}, ${5:integer num_left})\n\ - {\n\ - $0\n\ - }\n\ -snippet experience_permissions\n\ - experience_permissions(${1:key agent_id})\n\ - {\n\ - $0\n\ - }\n\ -snippet experience_permissions_denied\n\ - experience_permissions_denied(${1:key agent_id}, ${2:integer reason})\n\ - {\n\ - $0\n\ - }\n\ -snippet for\n\ - for (${1:start}; ${3:condition}; ${3:step})\n\ - {\n\ - $0\n\ - }\n\ -snippet http_request\n\ - http_request(${1:key request_id}, ${2:string method}, ${3:string body})\n\ - {\n\ - $0\n\ - }\n\ -snippet http_response\n\ - http_response(${1:key request_id}, ${2:integer status}, ${3:list metadata}, ${4:string body})\n\ - {\n\ - $0\n\ - }\n\ -snippet if\n\ - if (${1:condition})\n\ - {\n\ - $0\n\ - }\n\ -snippet jump\n\ - jump ${1:label};\n\ -snippet land_collision\n\ - land_collision(${1:vector pos})\n\ - {\n\ - $0\n\ - }\n\ -snippet land_collision_end\n\ - land_collision_end(${1:vector pos})\n\ - {\n\ - $0\n\ - }\n\ -snippet land_collision_start\n\ - land_collision_start(${1:vector pos})\n\ - {\n\ - $0\n\ - }\n\ -snippet link_message\n\ - link_message(${1:integer sender_num}, ${2:integer num}, ${3:string str}, ${4:key id})\n\ - {\n\ - $0\n\ - }\n\ -snippet listen\n\ - listen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string message})\n\ - {\n\ - $0\n\ - }\n\ -snippet llAbs\n\ - llAbs(${1:integer val})\n\ -snippet llAcos\n\ - llAcos(${1:float val})\n\ -snippet llAddToLandBanList\n\ - llAddToLandBanList(${1:key agent}, ${2:float hours});\n\ - $0\n\ -snippet llAddToLandPassList\n\ - llAddToLandPassList(${1:key agent}, ${2:float hours});\n\ - $0\n\ -snippet llAdjustSoundVolume\n\ - llAdjustSoundVolume(${1:float volume});\n\ - $0\n\ -snippet llAgentInExperience\n\ - llAgentInExperience(${1:key agent})\n\ -snippet llAllowInventoryDrop\n\ - llAllowInventoryDrop(${1:integer add});\n\ - $0\n\ -snippet llAngleBetween\n\ - llAngleBetween(${1:rotation a}, ${2:rotation b})\n\ -snippet llApplyImpulse\n\ - llApplyImpulse(${1:vector force}, ${2:integer local});\n\ - $0\n\ -snippet llApplyRotationalImpulse\n\ - llApplyRotationalImpulse(${1:vector force}, ${2:integer local});\n\ - $0\n\ -snippet llAsin\n\ - llAsin(${1:float val})\n\ -snippet llAtan2\n\ - llAtan2(${1:float y}, ${2:float x})\n\ -snippet llAttachToAvatar\n\ - llAttachToAvatar(${1:integer attach_point});\n\ - $0\n\ -snippet llAttachToAvatarTemp\n\ - llAttachToAvatarTemp(${1:integer attach_point});\n\ - $0\n\ -snippet llAvatarOnLinkSitTarget\n\ - llAvatarOnLinkSitTarget(${1:integer link})\n\ -snippet llAvatarOnSitTarget\n\ - llAvatarOnSitTarget()\n\ -snippet llAxes2Rot\n\ - llAxes2Rot(${1:vector fwd}, ${2:vector left}, ${3:vector up})\n\ -snippet llAxisAngle2Rot\n\ - llAxisAngle2Rot(${1:vector axis}, ${2:float angle})\n\ -snippet llBase64ToInteger\n\ - llBase64ToInteger(${1:string str})\n\ -snippet llBase64ToString\n\ - llBase64ToString(${1:string str})\n\ -snippet llBreakAllLinks\n\ - llBreakAllLinks();\n\ - $0\n\ -snippet llBreakLink\n\ - llBreakLink(${1:integer link});\n\ - $0\n\ -snippet llCastRay\n\ - llCastRay(${1:vector start}, ${2:vector end}, ${3:list options});\n\ - $0\n\ -snippet llCeil\n\ - llCeil(${1:float val})\n\ -snippet llClearCameraParams\n\ - llClearCameraParams();\n\ - $0\n\ -snippet llClearLinkMedia\n\ - llClearLinkMedia(${1:integer link}, ${2:integer face});\n\ - $0\n\ -snippet llClearPrimMedia\n\ - llClearPrimMedia(${1:integer face});\n\ - $0\n\ -snippet llCloseRemoteDataChannel\n\ - llCloseRemoteDataChannel(${1:key channel});\n\ - $0\n\ -snippet llCollisionFilter\n\ - llCollisionFilter(${1:string name}, ${2:key id}, ${3:integer accept});\n\ - $0\n\ -snippet llCollisionSound\n\ - llCollisionSound(${1:string impact_sound}, ${2:float impact_volume});\n\ - $0\n\ -snippet llCos\n\ - llCos(${1:float theta})\n\ -snippet llCreateCharacter\n\ - llCreateCharacter(${1:list options});\n\ - $0\n\ -snippet llCreateKeyValue\n\ - llCreateKeyValue(${1:string k})\n\ -snippet llCreateLink\n\ - llCreateLink(${1:key target}, ${2:integer parent});\n\ - $0\n\ -snippet llCSV2List\n\ - llCSV2List(${1:string src})\n\ -snippet llDataSizeKeyValue\n\ - llDataSizeKeyValue()\n\ -snippet llDeleteCharacter\n\ - llDeleteCharacter();\n\ - $0\n\ -snippet llDeleteKeyValue\n\ - llDeleteKeyValue(${1:string k})\n\ -snippet llDeleteSubList\n\ - llDeleteSubList(${1:list src}, ${2:integer start}, ${3:integer end})\n\ -snippet llDeleteSubString\n\ - llDeleteSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\ -snippet llDetachFromAvatar\n\ - llDetachFromAvatar();\n\ - $0\n\ -snippet llDetectedGrab\n\ - llDetectedGrab(${1:integer number})\n\ -snippet llDetectedGroup\n\ - llDetectedGroup(${1:integer number})\n\ -snippet llDetectedKey\n\ - llDetectedKey(${1:integer number})\n\ -snippet llDetectedLinkNumber\n\ - llDetectedLinkNumber(${1:integer number})\n\ -snippet llDetectedName\n\ - llDetectedName(${1:integer number})\n\ -snippet llDetectedOwner\n\ - llDetectedOwner(${1:integer number})\n\ -snippet llDetectedPos\n\ - llDetectedPosl(${1:integer number})\n\ -snippet llDetectedRot\n\ - llDetectedRot(${1:integer number})\n\ -snippet llDetectedTouchBinormal\n\ - llDetectedTouchBinormal(${1:integer number})\n\ -snippet llDetectedTouchFace\n\ - llDetectedTouchFace(${1:integer number})\n\ -snippet llDetectedTouchNormal\n\ - llDetectedTouchNormal(${1:integer number})\n\ -snippet llDetectedTouchPos\n\ - llDetectedTouchPos(${1:integer number})\n\ -snippet llDetectedTouchST\n\ - llDetectedTouchST(${1:integer number})\n\ -snippet llDetectedTouchUV\n\ - llDetectedTouchUV(${1:integer number})\n\ -snippet llDetectedType\n\ - llDetectedType(${1:integer number})\n\ -snippet llDetectedVel\n\ - llDetectedVel(${1:integer number})\n\ -snippet llDialog\n\ - llDialog(${1:key agent}, ${2:string message}, ${3:list buttons}, ${4:integer channel});\n\ - $0\n\ -snippet llDie\n\ - llDie();\n\ - $0\n\ -snippet llDumpList2String\n\ - llDumpList2String(${1:list src}, ${2:string separator})\n\ -snippet llEdgeOfWorld\n\ - llEdgeOfWorld(${1:vector pos}, ${2:vector dir})\n\ -snippet llEjectFromLand\n\ - llEjectFromLand(${1:key agent});\n\ - $0\n\ -snippet llEmail\n\ - llEmail(${1:string address}, ${2:string subject}, ${3:string message});\n\ - $0\n\ -snippet llEscapeURL\n\ - llEscapeURL(${1:string url})\n\ -snippet llEuler2Rot\n\ - llEuler2Rot(${1:vector v})\n\ -snippet llExecCharacterCmd\n\ - llExecCharacterCmd(${1:integer command}, ${2:list options});\n\ - $0\n\ -snippet llEvade\n\ - llEvade(${1:key target}, ${2:list options});\n\ - $0\n\ -snippet llFabs\n\ - llFabs(${1:float val})\n\ -snippet llFleeFrom\n\ - llFleeFrom(${1:vector position}, ${2:float distance}, ${3:list options});\n\ - $0\n\ -snippet llFloor\n\ - llFloor(${1:float val})\n\ -snippet llForceMouselook\n\ - llForceMouselook(${1:integer mouselook});\n\ - $0\n\ -snippet llFrand\n\ - llFrand(${1:float mag})\n\ -snippet llGenerateKey\n\ - llGenerateKey()\n\ -snippet llGetAccel\n\ - llGetAccel()\n\ -snippet llGetAgentInfo\n\ - llGetAgentInfo(${1:key id})\n\ -snippet llGetAgentLanguage\n\ - llGetAgentLanguage(${1:key agent})\n\ -snippet llGetAgentList\n\ - llGetAgentList(${1:integer scope}, ${2:list options})\n\ -snippet llGetAgentSize\n\ - llGetAgentSize(${1:key agent})\n\ -snippet llGetAlpha\n\ - llGetAlpha(${1:integer face})\n\ -snippet llGetAndResetTime\n\ - llGetAndResetTime()\n\ -snippet llGetAnimation\n\ - llGetAnimation(${1:key id})\n\ -snippet llGetAnimationList\n\ - llGetAnimationList(${1:key agent})\n\ -snippet llGetAnimationOverride\n\ - llGetAnimationOverride(${1:string anim_state})\n\ -snippet llGetAttached\n\ - llGetAttached()\n\ -snippet llGetAttachedList\n\ - llGetAttachedList(${1:key id})\n\ -snippet llGetBoundingBox\n\ - llGetBoundingBox(${1:key object})\n\ -snippet llGetCameraPos\n\ - llGetCameraPos()\n\ -snippet llGetCameraRot\n\ - llGetCameraRot()\n\ -snippet llGetCenterOfMass\n\ - llGetCenterOfMass()\n\ -snippet llGetClosestNavPoint\n\ - llGetClosestNavPoint(${1:vector point}, ${2:list options})\n\ -snippet llGetColor\n\ - llGetColor(${1:integer face})\n\ -snippet llGetCreator\n\ - llGetCreator()\n\ -snippet llGetDate\n\ - llGetDate()\n\ -snippet llGetDisplayName\n\ - llGetDisplayName(${1:key id})\n\ -snippet llGetEnergy\n\ - llGetEnergy()\n\ -snippet llGetEnv\n\ - llGetEnv(${1:string name})\n\ -snippet llGetExperienceDetails\n\ - llGetExperienceDetails(${1:key experience_id})\n\ -snippet llGetExperienceErrorMessage\n\ - llGetExperienceErrorMessage(${1:integer error})\n\ -snippet llGetForce\n\ - llGetForce()\n\ -snippet llGetFreeMemory\n\ - llGetFreeMemory()\n\ -snippet llGetFreeURLs\n\ - llGetFreeURLs()\n\ -snippet llGetGeometricCenter\n\ - llGetGeometricCenter()\n\ -snippet llGetGMTclock\n\ - llGetGMTclock()\n\ -snippet llGetHTTPHeader\n\ - llGetHTTPHeader(${1:key request_id}, ${2:string header})\n\ -snippet llGetInventoryCreator\n\ - llGetInventoryCreator(${1:string item})\n\ -snippet llGetInventoryKey\n\ - llGetInventoryKey(${1:string name})\n\ -snippet llGetInventoryName\n\ - llGetInventoryName(${1:integer type}, ${2:integer number})\n\ -snippet llGetInventoryNumber\n\ - llGetInventoryNumber(${1:integer type})\n\ -snippet llGetInventoryPermMask\n\ - llGetInventoryPermMask(${1:string item}, ${2:integer mask})\n\ -snippet llGetInventoryType\n\ - llGetInventoryType(${1:string name})\n\ -snippet llGetKey\n\ - llGetKey()\n\ -snippet llGetLandOwnerAt\n\ - llGetLandOwnerAt(${1:vector pos})\n\ -snippet llGetLinkKey\n\ - llGetLinkKey(${1:integer link})\n\ -snippet llGetLinkMedia\n\ - llGetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})\n\ -snippet llGetLinkName\n\ - llGetLinkName(${1:integer link})\n\ -snippet llGetLinkNumber\n\ - llGetLinkNumber()\n\ -snippet llGetLinkNumberOfSides\n\ - llGetLinkNumberOfSides(${1:integer link})\n\ -snippet llGetLinkPrimitiveParams\n\ - llGetLinkPrimitiveParams(${1:integer link}, ${2:list params})\n\ -snippet llGetListEntryType\n\ - llGetListEntryType(${1:list src}, ${2:integer index})\n\ -snippet llGetListLength\n\ - llGetListLength(${1:list src})\n\ -snippet llGetLocalPos\n\ - llGetLocalPos()\n\ -snippet llGetLocalRot\n\ - llGetLocalRot()\n\ -snippet llGetMass\n\ - llGetMass()\n\ -snippet llGetMassMKS\n\ - llGetMassMKS()\n\ -snippet llGetMaxScaleFactor\n\ - llGetMaxScaleFactor()\n\ -snippet llGetMemoryLimit\n\ - llGetMemoryLimit()\n\ -snippet llGetMinScaleFactor\n\ - llGetMinScaleFactor()\n\ -snippet llGetNextEmail\n\ - llGetNextEmail(${1:string address}, ${2:string subject});\n\ - $0\n\ -snippet llGetNotecardLine\n\ - llGetNotecardLine(${1:string name}, ${2:integer line})\n\ -snippet llGetNumberOfNotecardLines\n\ - llGetNumberOfNotecardLines(${1:string name})\n\ -snippet llGetNumberOfPrims\n\ - llGetNumberOfPrims()\n\ -snippet llGetNumberOfSides\n\ - llGetNumberOfSides()\n\ -snippet llGetObjectDesc\n\ - llGetObjectDesc()\n\ -snippet llGetObjectDetails\n\ - llGetObjectDetails(${1:key id}, ${2:list params})\n\ -snippet llGetObjectMass\n\ - llGetObjectMass(${1:key id})\n\ -snippet llGetObjectName\n\ - llGetObjectName()\n\ -snippet llGetObjectPermMask\n\ - llGetObjectPermMask(${1:integer mask})\n\ -snippet llGetObjectPrimCount\n\ - llGetObjectPrimCount(${1:key prim})\n\ -snippet llGetOmega\n\ - llGetOmega()\n\ -snippet llGetOwner\n\ - llGetOwner()\n\ -snippet llGetOwnerKey\n\ - llGetOwnerKey(${1:key id})\n\ -snippet llGetParcelDetails\n\ - llGetParcelDetails(${1:vector pos}, ${2:list params})\n\ -snippet llGetParcelFlags\n\ - llGetParcelFlags(${1:vector pos})\n\ -snippet llGetParcelMaxPrims\n\ - llGetParcelMaxPrims(${1:vector pos}, ${2:integer sim_wide})\n\ -snippet llGetParcelMusicURL\n\ - llGetParcelMusicURL()\n\ -snippet llGetParcelPrimCount\n\ - llGetParcelPrimCount(${1:vector pos}, ${2:integer category}, ${3:integer sim_wide})\n\ -snippet llGetParcelPrimOwners\n\ - llGetParcelPrimOwners(${1:vector pos})\n\ -snippet llGetPermissions\n\ - llGetPermissions()\n\ -snippet llGetPermissionsKey\n\ - llGetPermissionsKey()\n\ -snippet llGetPhysicsMaterial\n\ - llGetPhysicsMaterial()\n\ -snippet llGetPos\n\ - llGetPos()\n\ -snippet llGetPrimitiveParams\n\ - llGetPrimitiveParams(${1:list params})\n\ -snippet llGetPrimMediaParams\n\ - llGetPrimMediaParams(${1:integer face}, ${2:list params})\n\ -snippet llGetRegionAgentCount\n\ - llGetRegionAgentCount()\n\ -snippet llGetRegionCorner\n\ - llGetRegionCorner()\n\ -snippet llGetRegionFlags\n\ - llGetRegionFlags()\n\ -snippet llGetRegionFPS\n\ - llGetRegionFPS()\n\ -snippet llGetRegionName\n\ - llGetRegionName()\n\ -snippet llGetRegionTimeDilation\n\ - llGetRegionTimeDilation()\n\ -snippet llGetRootPosition\n\ - llGetRootPosition()\n\ -snippet llGetRootRotation\n\ - llGetRootRotation()\n\ -snippet llGetRot\n\ - llGetRot()\n\ -snippet llGetScale\n\ - llGetScale()\n\ -snippet llGetScriptName\n\ - llGetScriptName()\n\ -snippet llGetScriptState\n\ - llGetScriptState(${1:string script})\n\ -snippet llGetSimStats\n\ - llGetSimStats(${1:integer stat_type})\n\ -snippet llGetSimulatorHostname\n\ - llGetSimulatorHostname()\n\ -snippet llGetSPMaxMemory\n\ - llGetSPMaxMemory()\n\ -snippet llGetStartParameter\n\ - llGetStartParameter()\n\ -snippet llGetStaticPath\n\ - llGetStaticPath(${1:vector start}, ${2:vector end}, ${3:float radius}, ${4:list params})\n\ -snippet llGetStatus\n\ - llGetStatus(${1:integer status})\n\ -snippet llGetSubString\n\ - llGetSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\ -snippet llGetSunDirection\n\ - llGetSunDirection()\n\ -snippet llGetTexture\n\ - llGetTexture(${1:integer face})\n\ -snippet llGetTextureOffset\n\ - llGetTextureOffset(${1:integer face})\n\ -snippet llGetTextureRot\n\ - llGetTextureRot(${1:integer face})\n\ -snippet llGetTextureScale\n\ - llGetTextureScale(${1:integer face})\n\ -snippet llGetTime\n\ - llGetTime()\n\ -snippet llGetTimeOfDay\n\ - llGetTimeOfDay()\n\ -snippet llGetTimestamp\n\ - llGetTimestamp()\n\ -snippet llGetTorque\n\ - llGetTorque()\n\ -snippet llGetUnixTime\n\ - llGetUnixTime()\n\ -snippet llGetUsedMemory\n\ - llGetUsedMemory()\n\ -snippet llGetUsername\n\ - llGetUsername(${1:key id})\n\ -snippet llGetVel\n\ - llGetVel()\n\ -snippet llGetWallclock\n\ - llGetWallclock()\n\ -snippet llGiveInventory\n\ - llGiveInventory(${1:key destination}, ${2:string inventory});\n\ - $0\n\ -snippet llGiveInventoryList\n\ - llGiveInventoryList(${1:key target}, ${2:string folder}, ${3:list inventory});\n\ - $0\n\ -snippet llGiveMoney\n\ - llGiveMoney(${1:key destination}, ${2:integer amount})\n\ -snippet llGround\n\ - llGround(${1:vector offset})\n\ -snippet llGroundContour\n\ - llGroundContour(${1:vector offset})\n\ -snippet llGroundNormal\n\ - llGroundNormal(${1:vector offset})\n\ -snippet llGroundRepel\n\ - llGroundRepel(${1:float height}, ${2:integer water}, ${3:float tau});\n\ - $0\n\ -snippet llGroundSlope\n\ - llGroundSlope(${1:vector offset})\n\ -snippet llHTTPRequest\n\ - llHTTPRequest(${1:string url}, ${2:list parameters}, ${3:string body})\n\ -snippet llHTTPResponse\n\ - llHTTPResponse(${1:key request_id}, ${2:integer status}, ${3:string body});\n\ - $0\n\ -snippet llInsertString\n\ - llInsertString(${1:string dst}, ${2:integer pos}, ${3:string src})\n\ -snippet llInstantMessage\n\ - llInstantMessage(${1:key user}, ${2:string message});\n\ - $0\n\ -snippet llIntegerToBase64\n\ - llIntegerToBase64(${1:integer number})\n\ -snippet llJson2List\n\ - llJson2List(${1:string json})\n\ -snippet llJsonGetValue\n\ - llJsonGetValue(${1:string json}, ${2:list specifiers})\n\ -snippet llJsonSetValue\n\ - llJsonSetValue(${1:string json}, ${2:list specifiers}, ${3:string newValue})\n\ -snippet llJsonValueType\n\ - llJsonValueType(${1:string json}, ${2:list specifiers})\n\ -snippet llKey2Name\n\ - llKey2Name(${1:key id})\n\ -snippet llKeyCountKeyValue\n\ - llKeyCountKeyValue()\n\ -snippet llKeysKeyValue\n\ - llKeysKeyValue(${1:integer first}, ${2:integer count})\n\ -snippet llLinkParticleSystem\n\ - llLinkParticleSystem(${1:integer link}, ${2:list rules});\n\ - $0\n\ -snippet llLinkSitTarget\n\ - llLinkSitTarget(${1:integer link}, ${2:vector offset}, ${3:rotation rot});\n\ - $0\n\ -snippet llList2CSV\n\ - llList2CSV(${1:list src})\n\ -snippet llList2Float\n\ - llList2Float(${1:list src}, ${2:integer index})\n\ -snippet llList2Integer\n\ - llList2Integer(${1:list src}, ${2:integer index})\n\ -snippet llList2Json\n\ - llList2Json(${1:string type}, ${2:list values})\n\ -snippet llList2Key\n\ - llList2Key(${1:list src}, ${2:integer index})\n\ -snippet llList2List\n\ - llList2List(${1:list src}, ${2:integer start}, ${3:integer end})\n\ -snippet llList2ListStrided\n\ - llList2ListStrided(${1:list src}, ${2:integer start}, ${3:integer end}, ${4:integer stride})\n\ -snippet llList2Rot\n\ - llList2Rot(${1:list src}, ${2:integer index})\n\ -snippet llList2String\n\ - llList2String(${1:list src}, ${2:integer index})\n\ -snippet llList2Vector\n\ - llList2Vector(${1:list src}, ${2:integer index})\n\ -snippet llListen\n\ - llListen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string msg})\n\ -snippet llListenControl\n\ - llListenControl(${1:integer handle}, ${2:integer active});\n\ - $0\n\ -snippet llListenRemove\n\ - llListenRemove(${1:integer handle});\n\ - $0\n\ -snippet llListFindList\n\ - llListFindList(${1:list src}, ${2:list test})\n\ -snippet llListInsertList\n\ - llListInsertList(${1:list dest}, ${2:list src}, ${3:integer start})\n\ -snippet llListRandomize\n\ - llListRandomize(${1:list src}, ${2:integer stride})\n\ -snippet llListReplaceList\n\ - llListReplaceList(${1:list dest}, ${2:list src}, ${3:integer start}, ${4:integer end})\n\ -snippet llListSort\n\ - llListSort(${1:list src}, ${2:integer stride}, ${3:integer ascending})\n\ -snippet llListStatistics\n\ - llListStatistics(${1:integer operation}, ${2:list src})\n\ -snippet llLoadURL\n\ - llLoadURL(${1:key agent}, ${2:string message}, ${3:string url});\n\ - $0\n\ -snippet llLog\n\ - llLog(${1:float val})\n\ -snippet llLog10\n\ - llLog10(${1:float val})\n\ -snippet llLookAt\n\ - llLookAt(${1:vector target}, ${2:float strength}, ${3:float damping});\n\ - $0\n\ -snippet llLoopSound\n\ - llLoopSound(${1:string sound}, ${2:float volume});\n\ - $0\n\ -snippet llLoopSoundMaster\n\ - llLoopSoundMaster(${1:string sound}, ${2:float volume});\n\ - $0\n\ -snippet llLoopSoundSlave\n\ - llLoopSoundSlave(${1:string sound}, ${2:float volume});\n\ - $0\n\ -snippet llManageEstateAccess\n\ - llManageEstateAccess(${1:integer action}, ${2:key agent})\n\ -snippet llMapDestination\n\ - llMapDestination(${1:string simname}, ${2:vector pos}, ${3:vector look_at});\n\ - $0\n\ -snippet llMD5String\n\ - llMD5String(${1:string src}, ${2:integer nonce})\n\ -snippet llMessageLinked\n\ - llMessageLinked(${1:integer link}, ${2:integer num}, ${3:string str}, ${4:key id});\n\ - $0\n\ -snippet llMinEventDelay\n\ - llMinEventDelay(${1:float delay});\n\ - $0\n\ -snippet llModifyLand\n\ - llModifyLand(${1:integer action}, ${2:integer brush});\n\ - $0\n\ -snippet llModPow\n\ - llModPow(${1:integer a}, ${2:integer b}, ${3:integer c})\n\ -snippet llMoveToTarget\n\ - llMoveToTarget(${1:vector target}, ${2:float tau});\n\ - $0\n\ -snippet llNavigateTo\n\ - llNavigateTo(${1:vector pos}, ${2:list options});\n\ - $0\n\ -snippet llOffsetTexture\n\ - llOffsetTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\ - $0\n\ -snippet llOpenRemoteDataChannel\n\ - llOpenRemoteDataChannel();\n\ - $0\n\ -snippet llOverMyLand\n\ - llOverMyLand(${1:key id})\n\ -snippet llOwnerSay\n\ - llOwnerSay(${1:string msg});\n\ - $0\n\ -snippet llParcelMediaCommandList\n\ - llParcelMediaCommandList(${1:list commandList});\n\ - $0\n\ -snippet llParcelMediaQuery\n\ - llParcelMediaQuery(${1:list query})\n\ -snippet llParseString2List\n\ - llParseString2List(${1:string src}, ${2:list separators}, ${3:list spacers})\n\ -snippet llParseStringKeepNulls\n\ - llParseStringKeepNulls(${1:string src}, ${2:list separators}, ${3:list spacers})\n\ -snippet llParticleSystem\n\ - llParticleSystem(${1:list rules});\n\ - $0\n\ -snippet llPassCollisions\n\ - llPassCollisions(${1:integer pass});\n\ - $0\n\ -snippet llPassTouches\n\ - llPassTouches(${1:integer pass});\n\ - $0\n\ -snippet llPatrolPoints\n\ - llPatrolPoints(${1:list patrolPoints}, ${2:list options});\n\ - $0\n\ -snippet llPlaySound\n\ - llPlaySound(${1:string sound}, ${2:float volume});\n\ - $0\n\ -snippet llPlaySoundSlave\n\ - llPlaySoundSlave(${1:string sound}, ${2:float volume});\n\ - $0\n\ -snippet llPow\n\ - llPow(${1:float base}, ${2:float exponent})\n\ -snippet llPreloadSound\n\ - llPreloadSound(${1:string sound});\n\ - $0\n\ -snippet llPursue\n\ - llPursue(${1:key target}, ${2:list options});\n\ - $0\n\ -snippet llPushObject\n\ - llPushObject(${1:key target}, ${2:vector impulse}, ${3:vector ang_impulse}, ${4:integer local});\n\ - $0\n\ -snippet llReadKeyValue\n\ - llReadKeyValue(${1:string k})\n\ -snippet llRegionSay\n\ - llRegionSay(${1:integer channel}, ${2:string msg});\n\ - $0\n\ -snippet llRegionSayTo\n\ - llRegionSayTo(${1:key target}, ${2:integer channel}, ${3:string msg});\n\ - $0\n\ -snippet llReleaseControls\n\ - llReleaseControls();\n\ - $0\n\ -snippet llReleaseURL\n\ - llReleaseURL(${1:string url});\n\ - $0\n\ -snippet llRemoteDataReply\n\ - llRemoteDataReply(${1:key channel}, ${2:key message_id}, ${3:string sdata}, ${4:integer idata});\n\ - $0\n\ -snippet llRemoteLoadScriptPin\n\ - llRemoteLoadScriptPin(${1:key target}, ${2:string name}, ${3:integer pin}, ${4:integer running}, ${5:integer start_param});\n\ - $0\n\ -snippet llRemoveFromLandBanList\n\ - llRemoveFromLandBanList(${1:key agent});\n\ - $0\n\ -snippet llRemoveFromLandPassList\n\ - llRemoveFromLandPassList(${1:key agent});\n\ - $0\n\ -snippet llRemoveInventory\n\ - llRemoveInventory(${1:string item});\n\ - $0\n\ -snippet llRemoveVehicleFlags\n\ - llRemoveVehicleFlags(${1:integer flags});\n\ - $0\n\ -snippet llRequestAgentData\n\ - llRequestAgentData(${1:key id}, ${2:integer data})\n\ -snippet llRequestDisplayName\n\ - llRequestDisplayName(${1:key id})\n\ -snippet llRequestExperiencePermissions\n\ - llRequestExperiencePermissions(${1:key agent}, ${2:string name})\n\ -snippet llRequestInventoryData\n\ - llRequestInventoryData(${1:string name})\n\ -snippet llRequestPermissions\n\ - llRequestPermissions(${1:key agent}, ${2:integer permissions})\n\ -snippet llRequestSecureURL\n\ - llRequestSecureURL()\n\ -snippet llRequestSimulatorData\n\ - llRequestSimulatorData(${1:string region}, ${2:integer data})\n\ -snippet llRequestURL\n\ - llRequestURL()\n\ -snippet llRequestUsername\n\ - llRequestUsername(${1:key id})\n\ -snippet llResetAnimationOverride\n\ - llResetAnimationOverride(${1:string anim_state});\n\ - $0\n\ -snippet llResetLandBanList\n\ - llResetLandBanList();\n\ - $0\n\ -snippet llResetLandPassList\n\ - llResetLandPassList();\n\ - $0\n\ -snippet llResetOtherScript\n\ - llResetOtherScript(${1:string name});\n\ - $0\n\ -snippet llResetScript\n\ - llResetScript();\n\ - $0\n\ -snippet llResetTime\n\ - llResetTime();\n\ - $0\n\ -snippet llReturnObjectsByID\n\ - llReturnObjectsByID(${1:list objects})\n\ -snippet llReturnObjectsByOwner\n\ - llReturnObjectsByOwner(${1:key owner}, ${2:integer scope})\n\ -snippet llRezAtRoot\n\ - llRezAtRoot(${1:string inventory}, ${2:vector position}, ${3:vector velocity}, ${4:rotation rot}, ${5:integer param});\n\ - $0\n\ -snippet llRezObject\n\ - llRezObject(${1:string inventory}, ${2:vector pos}, ${3:vector vel}, ${4:rotation rot}, ${5:integer param});\n\ - $0\n\ -snippet llRot2Angle\n\ - llRot2Angle(${1:rotation rot})\n\ -snippet llRot2Axis\n\ - llRot2Axis(${1:rotation rot})\n\ -snippet llRot2Euler\n\ - llRot2Euler(${1:rotation quat})\n\ -snippet llRot2Fwd\n\ - llRot2Fwd(${1:rotation q})\n\ -snippet llRot2Left\n\ - llRot2Left(${1:rotation q})\n\ -snippet llRot2Up\n\ - llRot2Up(${1:rotation q})\n\ -snippet llRotateTexture\n\ - llRotateTexture(${1:float angle}, ${2:integer face});\n\ - $0\n\ -snippet llRotBetween\n\ - llRotBetween(${1:vector start}, ${2:vector end})\n\ -snippet llRotLookAt\n\ - llRotLookAt(${1:rotation target_direction}, ${2:float strength}, ${3:float damping});\n\ - $0\n\ -snippet llRotTarget\n\ - llRotTarget(${1:rotation rot}, ${2:float error})\n\ -snippet llRotTargetRemove\n\ - llRotTargetRemove(${1:integer handle});\n\ - $0\n\ -snippet llRound\n\ - llRound(${1:float val})\n\ -snippet llSameGroup\n\ - llSameGroup(${1:key group})\n\ -snippet llSay\n\ - llSay(${1:integer channel}, ${2:string msg});\n\ - $0\n\ -snippet llScaleByFactor\n\ - llScaleByFactor(${1:float scaling_factor})\n\ -snippet llScaleTexture\n\ - llScaleTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\ - $0\n\ -snippet llScriptDanger\n\ - llScriptDanger(${1:vector pos})\n\ -snippet llScriptProfiler\n\ - llScriptProfiler(${1:integer flags});\n\ - $0\n\ -snippet llSendRemoteData\n\ - llSendRemoteData(${1:key channel}, ${2:string dest}, ${3:integer idata}, ${4:string sdata})\n\ -snippet llSensor\n\ - llSensor(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc});\n\ - $0\n\ -snippet llSensorRepeat\n\ - llSensorRepeat(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc}, ${6:float rate});\n\ - $0\n\ -snippet llSetAlpha\n\ - llSetAlpha(${1:float alpha}, ${2:integer face});\n\ - $0\n\ -snippet llSetAngularVelocity\n\ - llSetAngularVelocity(${1:vector force}, ${2:integer local});\n\ - $0\n\ -snippet llSetAnimationOverride\n\ - llSetAnimationOverride(${1:string anim_state}, ${2:string anim})\n\ -snippet llSetBuoyancy\n\ - llSetBuoyancy(${1:float buoyancy});\n\ - $0\n\ -snippet llSetCameraAtOffset\n\ - llSetCameraAtOffset(${1:vector offset});\n\ - $0\n\ -snippet llSetCameraEyeOffset\n\ - llSetCameraEyeOffset(${1:vector offset});\n\ - $0\n\ -snippet llSetCameraParams\n\ - llSetCameraParams(${1:list rules});\n\ - $0\n\ -snippet llSetClickAction\n\ - llSetClickAction(${1:integer action});\n\ - $0\n\ -snippet llSetColor\n\ - llSetColor(${1:vector color}, ${2:integer face});\n\ - $0\n\ -snippet llSetContentType\n\ - llSetContentType(${1:key request_id}, ${2:integer content_type});\n\ - $0\n\ -snippet llSetDamage\n\ - llSetDamage(${1:float damage});\n\ - $0\n\ -snippet llSetForce\n\ - llSetForce(${1:vector force}, ${2:integer local});\n\ - $0\n\ -snippet llSetForceAndTorque\n\ - llSetForceAndTorque(${1:vector force}, ${2:vector torque}, ${3:integer local});\n\ - $0\n\ -snippet llSetHoverHeight\n\ - llSetHoverHeight(${1:float height}, ${2:integer water}, ${3:float tau});\n\ - $0\n\ -snippet llSetKeyframedMotion\n\ - llSetKeyframedMotion(${1:list keyframes}, ${2:list options});\n\ - $0\n\ -snippet llSetLinkAlpha\n\ - llSetLinkAlpha(${1:integer link}, ${2:float alpha}, ${3:integer face});\n\ - $0\n\ -snippet llSetLinkCamera\n\ - llSetLinkCamera(${1:integer link}, ${2:vector eye}, ${3:vector at});\n\ - $0\n\ -snippet llSetLinkColor\n\ - llSetLinkColor(${1:integer link}, ${2:vector color}, ${3:integer face});\n\ - $0\n\ -snippet llSetLinkMedia\n\ - llSetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params});\n\ - $0\n\ -snippet llSetLinkPrimitiveParams\n\ - llSetLinkPrimitiveParams(${1:integer link}, ${2:list rules});\n\ - $0\n\ -snippet llSetLinkPrimitiveParamsFast\n\ - llSetLinkPrimitiveParamsFast(${1:integer link}, ${2:list rules});\n\ - $0\n\ -snippet llSetLinkTexture\n\ - llSetLinkTexture(${1:integer link}, ${2:string texture}, ${3:integer face});\n\ - $0\n\ -snippet llSetLinkTextureAnim\n\ - llSetLinkTextureAnim(${1:integer link}, ${2:integer mode}, ${3:integer face}, ${4:integer sizex}, ${5:integer sizey}, ${6:float start}, ${7:float length}, ${8:float rate});\n\ - $0\n\ -snippet llSetLocalRot\n\ - llSetLocalRot(${1:rotation rot});\n\ - $0\n\ -snippet llSetMemoryLimit\n\ - llSetMemoryLimit(${1:integer limit})\n\ -snippet llSetObjectDesc\n\ - llSetObjectDesc(${1:string description});\n\ - $0\n\ -snippet llSetObjectName\n\ - llSetObjectName(${1:string name});\n\ - $0\n\ -snippet llSetParcelMusicURL\n\ - llSetParcelMusicURL(${1:string url});\n\ - $0\n\ -snippet llSetPayPrice\n\ - llSetPayPrice(${1:integer price}, [${2:integer price_button_a}, ${3:integer price_button_b}, ${4:integer price_button_c}, ${5:integer price_button_d}]);\n\ - $0\n\ -snippet llSetPhysicsMaterial\n\ - llSetPhysicsMaterial(${1:integer mask}, ${2:float gravity_multiplier}, ${3:float restitution}, ${4:float friction}, ${5:float density});\n\ - $0\n\ -snippet llSetPos\n\ - llSetPos(${1:vector pos});\n\ - $0\n\ -snippet llSetPrimitiveParams\n\ - llSetPrimitiveParams(${1:list rules});\n\ - $0\n\ -snippet llSetPrimMediaParams\n\ - llSetPrimMediaParams(${1:integer face}, ${2:list params});\n\ - $0\n\ -snippet llSetRegionPos\n\ - llSetRegionPos(${1:vector position})\n\ -snippet llSetRemoteScriptAccessPin\n\ - llSetRemoteScriptAccessPin(${1:integer pin});\n\ - $0\n\ -snippet llSetRot\n\ - llSetRot(${1:rotation rot});\n\ - $0\n\ -snippet llSetScale\n\ - llSetScale(${1:vector size});\n\ - $0\n\ -snippet llSetScriptState\n\ - llSetScriptState(${1:string name}, ${2:integer run});\n\ - $0\n\ -snippet llSetSitText\n\ - llSetSitText(${1:string text});\n\ - $0\n\ -snippet llSetSoundQueueing\n\ - llSetSoundQueueing(${1:integer queue});\n\ - $0\n\ -snippet llSetSoundRadius\n\ - llSetSoundRadius(${1:float radius});\n\ - $0\n\ -snippet llSetStatus\n\ - llSetStatus(${1:integer status}, ${2:integer value});\n\ - $0\n\ -snippet llSetText\n\ - llSetText(${1:string text}, ${2:vector color}, ${3:float alpha});\n\ - $0\n\ -snippet llSetTexture\n\ - llSetTexture(${1:string texture}, ${2:integer face});\n\ - $0\n\ -snippet llSetTextureAnim\n\ - llSetTextureAnim(${1:integer mode}, ${2:integer face}, ${3:integer sizex}, ${4:integer sizey}, ${5:float start}, ${6:float length}, ${7:float rate});\n\ - $0\n\ -snippet llSetTimerEvent\n\ - llSetTimerEvent(${1:float sec});\n\ - $0\n\ -snippet llSetTorque\n\ - llSetTorque(${1:vector torque}, ${2:integer local});\n\ - $0\n\ -snippet llSetTouchText\n\ - llSetTouchText(${1:string text});\n\ - $0\n\ -snippet llSetVehicleFlags\n\ - llSetVehicleFlags(${1:integer flags});\n\ - $0\n\ -snippet llSetVehicleFloatParam\n\ - llSetVehicleFloatParam(${1:integer param}, ${2:float value});\n\ - $0\n\ -snippet llSetVehicleRotationParam\n\ - llSetVehicleRotationParam(${1:integer param}, ${2:rotation rot});\n\ - $0\n\ -snippet llSetVehicleType\n\ - llSetVehicleType(${1:integer type});\n\ - $0\n\ -snippet llSetVehicleVectorParam\n\ - llSetVehicleVectorParam(${1:integer param}, ${2:vector vec});\n\ - $0\n\ -snippet llSetVelocity\n\ - llSetVelocity(${1:vector force}, ${2:integer local});\n\ - $0\n\ -snippet llSHA1String\n\ - llSHA1String(${1:string src})\n\ -snippet llShout\n\ - llShout(${1:integer channel}, ${2:string msg});\n\ - $0\n\ -snippet llSin\n\ - llSin(${1:float theta})\n\ -snippet llSitTarget\n\ - llSitTarget(${1:vector offset}, ${2:rotation rot});\n\ - $0\n\ -snippet llSleep\n\ - llSleep(${1:float sec});\n\ - $0\n\ -snippet llSqrt\n\ - llSqrt(${1:float val})\n\ -snippet llStartAnimation\n\ - llStartAnimation(${1:string anim});\n\ - $0\n\ -snippet llStopAnimation\n\ - llStopAnimation(${1:string anim});\n\ - $0\n\ -snippet llStopHover\n\ - llStopHover();\n\ - $0\n\ -snippet llStopLookAt\n\ - llStopLookAt();\n\ - $0\n\ -snippet llStopMoveToTarget\n\ - llStopMoveToTarget();\n\ - $0\n\ -snippet llStopSound\n\ - llStopSound();\n\ - $0\n\ -snippet llStringLength\n\ - llStringLength(${1:string str})\n\ -snippet llStringToBase64\n\ - llStringToBase64(${1:string str})\n\ -snippet llStringTrim\n\ - llStringTrim(${1:string src}, ${2:integer type})\n\ -snippet llSubStringIndex\n\ - llSubStringIndex(${1:string source}, ${2:string pattern})\n\ -snippet llTakeControls\n\ - llTakeControls(${1:integer controls}, ${2:integer accept}, ${3:integer pass_on});\n\ - $0\n\ -snippet llTan\n\ - llTan(${1:float theta})\n\ -snippet llTarget\n\ - llTarget(${1:vector position}, ${2:float range})\n\ -snippet llTargetOmega\n\ - llTargetOmega(${1:vector axis}, ${2:float spinrate}, ${3:float gain});\n\ - $0\n\ -snippet llTargetRemove\n\ - llTargetRemove(${1:integer handle});\n\ - $0\n\ -snippet llTeleportAgent\n\ - llTeleportAgent(${1:key agent}, ${2:string landmark}, ${3:vector position}, ${4:vector look_at});\n\ - $0\n\ -snippet llTeleportAgentGlobalCoords\n\ - llTeleportAgentGlobalCoords(${1:key agent}, ${2:vector global_coordinates}, ${3:vector region_coordinates}, ${4:vector look_at});\n\ - $0\n\ -snippet llTeleportAgentHome\n\ - llTeleportAgentHome(${1:key agent});\n\ - $0\n\ -snippet llTextBox\n\ - llTextBox(${1:key agent}, ${2:string message}, ${3:integer channel});\n\ - $0\n\ -snippet llToLower\n\ - llToLower(${1:string src})\n\ -snippet llToUpper\n\ - llToUpper(${1:string src})\n\ -snippet llTransferLindenDollars\n\ - llTransferLindenDollars(${1:key destination}, ${2:integer amount})\n\ -snippet llTriggerSound\n\ - llTriggerSound(${1:string sound}, ${2:float volume});\n\ - $0\n\ -snippet llTriggerSoundLimited\n\ - llTriggerSoundLimited(${1:string sound}, ${2:float volume}, ${3:vector top_north_east}, ${4:vector bottom_south_west});\n\ - $0\n\ -snippet llUnescapeURL\n\ - llUnescapeURL(${1:string url})\n\ -snippet llUnSit\n\ - llUnSit(${1:key id});\n\ - $0\n\ -snippet llUpdateCharacter\n\ - llUpdateCharacter(${1:list options})\n\ -snippet llUpdateKeyValue\n\ - llUpdateKeyValue(${1:string k}, ${2:string v}, ${3:integer checked}, ${4:string ov})\n\ -snippet llVecDist\n\ - llVecDist(${1:vector vec_a}, ${2:vector vec_b})\n\ -snippet llVecMag\n\ - llVecMag(${1:vector vec})\n\ -snippet llVecNorm\n\ - llVecNorm(${1:vector vec})\n\ -snippet llVolumeDetect\n\ - llVolumeDetect(${1:integer detect});\n\ - $0\n\ -snippet llWanderWithin\n\ - llWanderWithin(${1:vector origin}, ${2:vector dist}, ${3:list options});\n\ - $0\n\ -snippet llWater\n\ - llWater(${1:vector offset});\n\ - $0\n\ -snippet llWhisper\n\ - llWhisper(${1:integer channel}, ${2:string msg});\n\ - $0\n\ -snippet llWind\n\ - llWind(${1:vector offset});\n\ - $0\n\ -snippet llXorBase64\n\ - llXorBase64(${1:string str1}, ${2:string str2})\n\ -snippet money\n\ - money(${1:key id}, ${2:integer amount})\n\ - {\n\ - $0\n\ - }\n\ -snippet object_rez\n\ - object_rez(${1:key id})\n\ - {\n\ - $0\n\ - }\n\ -snippet on_rez\n\ - on_rez(${1:integer start_param})\n\ - {\n\ - $0\n\ - }\n\ -snippet path_update\n\ - path_update(${1:integer type}, ${2:list reserved})\n\ - {\n\ - $0\n\ - }\n\ -snippet remote_data\n\ - remote_data(${1:integer event_type}, ${2:key channel}, ${3:key message_id}, ${4:string sender}, ${5:integer idata}, ${6:string sdata})\n\ - {\n\ - $0\n\ - }\n\ -snippet run_time_permissions\n\ - run_time_permissions(${1:integer perm})\n\ - {\n\ - $0\n\ - }\n\ -snippet sensor\n\ - sensor(${1:integer index})\n\ - {\n\ - $0\n\ - }\n\ -snippet state\n\ - state ${1:name}\n\ -snippet touch\n\ - touch(${1:integer index})\n\ - {\n\ - $0\n\ - }\n\ -snippet touch_end\n\ - touch_end(${1:integer index})\n\ - {\n\ - $0\n\ - }\n\ -snippet touch_start\n\ - touch_start(${1:integer index})\n\ - {\n\ - $0\n\ - }\n\ -snippet transaction_result\n\ - transaction_result(${1:key id}, ${2:integer success}, ${3:string data})\n\ - {\n\ - $0\n\ - }\n\ -snippet while\n\ - while (${1:condition})\n\ - {\n\ - $0\n\ - }\n\ -"; -exports.scope = "lsl"; - -}); (function() { - window.require(["ace/snippets/lsl"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/lua.js b/src/ace/snippets/lua.js deleted file mode 100644 index acf24bf81..000000000 --- a/src/ace/snippets/lua.js +++ /dev/null @@ -1,35 +0,0 @@ -define("ace/snippets/lua",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet #!\n\ - #!/usr/bin/env lua\n\ - $1\n\ -snippet local\n\ - local ${1:x} = ${2:1}\n\ -snippet fun\n\ - function ${1:fname}(${2:...})\n\ - ${3:-- body}\n\ - end\n\ -snippet for\n\ - for ${1:i}=${2:1},${3:10} do\n\ - ${4:print(i)}\n\ - end\n\ -snippet forp\n\ - for ${1:i},${2:v} in pairs(${3:table_name}) do\n\ - ${4:-- body}\n\ - end\n\ -snippet fori\n\ - for ${1:i},${2:v} in ipairs(${3:table_name}) do\n\ - ${4:-- body}\n\ - end\n\ -"; -exports.scope = "lua"; - -}); (function() { - window.require(["ace/snippets/lua"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/luapage.js b/src/ace/snippets/luapage.js deleted file mode 100644 index db7de7823..000000000 --- a/src/ace/snippets/luapage.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/luapage"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/lucene.js b/src/ace/snippets/lucene.js deleted file mode 100644 index bb248e9c4..000000000 --- a/src/ace/snippets/lucene.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/lucene"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/makefile.js b/src/ace/snippets/makefile.js deleted file mode 100644 index 138f8bbd8..000000000 --- a/src/ace/snippets/makefile.js +++ /dev/null @@ -1,18 +0,0 @@ -define("ace/snippets/makefile",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet ifeq\n\ - ifeq (${1:cond0},${2:cond1})\n\ - ${3:code}\n\ - endif\n\ -"; -exports.scope = "makefile"; - -}); (function() { - window.require(["ace/snippets/makefile"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/markdown.js b/src/ace/snippets/markdown.js deleted file mode 100644 index 8f55e6ffa..000000000 --- a/src/ace/snippets/markdown.js +++ /dev/null @@ -1,102 +0,0 @@ -define("ace/snippets/markdown",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# Markdown\n\ -\n\ -# Includes octopress (http://octopress.org/) snippets\n\ -\n\ -snippet [\n\ - [${1:text}](http://${2:address} \"${3:title}\")\n\ -snippet [*\n\ - [${1:link}](${2:`@*`} \"${3:title}\")${4}\n\ -\n\ -snippet [:\n\ - [${1:id}]: http://${2:url} \"${3:title}\"\n\ -snippet [:*\n\ - [${1:id}]: ${2:`@*`} \"${3:title}\"\n\ -\n\ -snippet ![\n\ - ![${1:alttext}](${2:/images/image.jpg} \"${3:title}\")\n\ -snippet ![*\n\ - ![${1:alt}](${2:`@*`} \"${3:title}\")${4}\n\ -\n\ -snippet ![:\n\ - ![${1:id}]: ${2:url} \"${3:title}\"\n\ -snippet ![:*\n\ - ![${1:id}]: ${2:`@*`} \"${3:title}\"\n\ -\n\ -snippet ===\n\ -regex /^/=+/=*//\n\ - ${PREV_LINE/./=/g}\n\ - \n\ - ${0}\n\ -snippet ---\n\ -regex /^/-+/-*//\n\ - ${PREV_LINE/./-/g}\n\ - \n\ - ${0}\n\ -snippet blockquote\n\ - {% blockquote %}\n\ - ${1:quote}\n\ - {% endblockquote %}\n\ -\n\ -snippet blockquote-author\n\ - {% blockquote ${1:author}, ${2:title} %}\n\ - ${3:quote}\n\ - {% endblockquote %}\n\ -\n\ -snippet blockquote-link\n\ - {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n\ - ${4:quote}\n\ - {% endblockquote %}\n\ -\n\ -snippet bt-codeblock-short\n\ - ```\n\ - ${1:code_snippet}\n\ - ```\n\ -\n\ -snippet bt-codeblock-full\n\ - ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n\ - ${5:code_snippet}\n\ - ```\n\ -\n\ -snippet codeblock-short\n\ - {% codeblock %}\n\ - ${1:code_snippet}\n\ - {% endcodeblock %}\n\ -\n\ -snippet codeblock-full\n\ - {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n\ - ${5:code_snippet}\n\ - {% endcodeblock %}\n\ -\n\ -snippet gist-full\n\ - {% gist ${1:gist_id} ${2:filename} %}\n\ -\n\ -snippet gist-short\n\ - {% gist ${1:gist_id} %}\n\ -\n\ -snippet img\n\ - {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\ -\n\ -snippet youtube\n\ - {% youtube ${1:video_id} %}\n\ -\n\ -# The quote should appear only once in the text. It is inherently part of it.\n\ -# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\ -\n\ -snippet pullquote\n\ - {% pullquote %}\n\ - ${1:text} {\" ${2:quote} \"} ${3:text}\n\ - {% endpullquote %}\n\ -"; -exports.scope = "markdown"; - -}); (function() { - window.require(["ace/snippets/markdown"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/mask.js b/src/ace/snippets/mask.js deleted file mode 100644 index f63c0a61b..000000000 --- a/src/ace/snippets/mask.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/mask"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/matlab.js b/src/ace/snippets/matlab.js deleted file mode 100644 index cc5fb70e7..000000000 --- a/src/ace/snippets/matlab.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/matlab"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/maze.js b/src/ace/snippets/maze.js deleted file mode 100644 index 573285a4f..000000000 --- a/src/ace/snippets/maze.js +++ /dev/null @@ -1,23 +0,0 @@ -define("ace/snippets/maze",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet >\n\ -description assignment\n\ -scope maze\n\ - -> ${1}= ${2}\n\ -\n\ -snippet >\n\ -description if\n\ -scope maze\n\ - -> IF ${2:**} THEN %${3:L} ELSE %${4:R}\n\ -"; -exports.scope = "maze"; - -}); (function() { - window.require(["ace/snippets/maze"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/mediawiki.js b/src/ace/snippets/mediawiki.js deleted file mode 100644 index bd73d0006..000000000 --- a/src/ace/snippets/mediawiki.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/mediawiki"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/mel.js b/src/ace/snippets/mel.js deleted file mode 100644 index fa5ecbc89..000000000 --- a/src/ace/snippets/mel.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/mel"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/mips.js b/src/ace/snippets/mips.js deleted file mode 100644 index 9badca8ef..000000000 --- a/src/ace/snippets/mips.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/mips"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/mixal.js b/src/ace/snippets/mixal.js deleted file mode 100644 index 8246ef784..000000000 --- a/src/ace/snippets/mixal.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/mixal"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/mushcode.js b/src/ace/snippets/mushcode.js deleted file mode 100644 index 8eddd370b..000000000 --- a/src/ace/snippets/mushcode.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/mushcode"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/mysql.js b/src/ace/snippets/mysql.js deleted file mode 100644 index d8544a1b7..000000000 --- a/src/ace/snippets/mysql.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/mysql"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/nginx.js b/src/ace/snippets/nginx.js deleted file mode 100644 index 565e3b8a6..000000000 --- a/src/ace/snippets/nginx.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/nginx"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/nim.js b/src/ace/snippets/nim.js deleted file mode 100644 index b3b4dfc04..000000000 --- a/src/ace/snippets/nim.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/nim"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/nix.js b/src/ace/snippets/nix.js deleted file mode 100644 index bc63bd3d5..000000000 --- a/src/ace/snippets/nix.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/nix"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/nsis.js b/src/ace/snippets/nsis.js deleted file mode 100644 index caf0839d1..000000000 --- a/src/ace/snippets/nsis.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/nsis"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/nunjucks.js b/src/ace/snippets/nunjucks.js deleted file mode 100644 index 748d2d9ff..000000000 --- a/src/ace/snippets/nunjucks.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/nunjucks"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/objectivec.js b/src/ace/snippets/objectivec.js deleted file mode 100644 index 77bad68f2..000000000 --- a/src/ace/snippets/objectivec.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/objectivec"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/ocaml.js b/src/ace/snippets/ocaml.js deleted file mode 100644 index 23789d1ec..000000000 --- a/src/ace/snippets/ocaml.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/ocaml"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/pascal.js b/src/ace/snippets/pascal.js deleted file mode 100644 index f6d60d88e..000000000 --- a/src/ace/snippets/pascal.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/pascal"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/perl.js b/src/ace/snippets/perl.js deleted file mode 100644 index 7b217b95d..000000000 --- a/src/ace/snippets/perl.js +++ /dev/null @@ -1,361 +0,0 @@ -define("ace/snippets/perl",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# #!/usr/bin/perl\n\ -snippet #!\n\ - #!/usr/bin/env perl\n\ -\n\ -# Hash Pointer\n\ -snippet .\n\ - =>\n\ -# Function\n\ -snippet sub\n\ - sub ${1:function_name} {\n\ - ${2:#body ...}\n\ - }\n\ -# Conditional\n\ -snippet if\n\ - if (${1}) {\n\ - ${2:# body...}\n\ - }\n\ -# Conditional if..else\n\ -snippet ife\n\ - if (${1}) {\n\ - ${2:# body...}\n\ - }\n\ - else {\n\ - ${3:# else...}\n\ - }\n\ -# Conditional if..elsif..else\n\ -snippet ifee\n\ - if (${1}) {\n\ - ${2:# body...}\n\ - }\n\ - elsif (${3}) {\n\ - ${4:# elsif...}\n\ - }\n\ - else {\n\ - ${5:# else...}\n\ - }\n\ -# Conditional One-line\n\ -snippet xif\n\ - ${1:expression} if ${2:condition};${3}\n\ -# Unless conditional\n\ -snippet unless\n\ - unless (${1}) {\n\ - ${2:# body...}\n\ - }\n\ -# Unless conditional One-line\n\ -snippet xunless\n\ - ${1:expression} unless ${2:condition};${3}\n\ -# Try/Except\n\ -snippet eval\n\ - local $@;\n\ - eval {\n\ - ${1:# do something risky...}\n\ - };\n\ - if (my $e = $@) {\n\ - ${2:# handle failure...}\n\ - }\n\ -# While Loop\n\ -snippet wh\n\ - while (${1}) {\n\ - ${2:# body...}\n\ - }\n\ -# While Loop One-line\n\ -snippet xwh\n\ - ${1:expression} while ${2:condition};${3}\n\ -# C-style For Loop\n\ -snippet cfor\n\ - for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) {\n\ - ${4:# body...}\n\ - }\n\ -# For loop one-line\n\ -snippet xfor\n\ - ${1:expression} for @${2:array};${3}\n\ -# Foreach Loop\n\ -snippet for\n\ - foreach my $${1:x} (@${2:array}) {\n\ - ${3:# body...}\n\ - }\n\ -# Foreach Loop One-line\n\ -snippet fore\n\ - ${1:expression} foreach @${2:array};${3}\n\ -# Package\n\ -snippet package\n\ - package ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`};\n\ -\n\ - ${2}\n\ -\n\ - 1;\n\ -\n\ - __END__\n\ -# Package syntax perl >= 5.14\n\ -snippet packagev514\n\ - package ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`} ${2:0.99};\n\ -\n\ - ${3}\n\ -\n\ - 1;\n\ -\n\ - __END__\n\ -#moose\n\ -snippet moose\n\ - use Moose;\n\ - use namespace::autoclean;\n\ - ${1:#}BEGIN {extends '${2:ParentClass}'};\n\ -\n\ - ${3}\n\ -# parent\n\ -snippet parent\n\ - use parent qw(${1:Parent Class});\n\ -# Read File\n\ -snippet slurp\n\ - my $${1:var} = do { local $/; open my $file, '<', \"${2:file}\"; <$file> };\n\ - ${3}\n\ -# strict warnings\n\ -snippet strwar\n\ - use strict;\n\ - use warnings;\n\ -# older versioning with perlcritic bypass\n\ -snippet vers\n\ - ## no critic\n\ - our $VERSION = '${1:version}';\n\ - eval $VERSION;\n\ - ## use critic\n\ -# new 'switch' like feature\n\ -snippet switch\n\ - use feature 'switch';\n\ -\n\ -# Anonymous subroutine\n\ -snippet asub\n\ - sub {\n\ - ${1:# body }\n\ - }\n\ -\n\ -\n\ -\n\ -# Begin block\n\ -snippet begin\n\ - BEGIN {\n\ - ${1:# begin body}\n\ - }\n\ -\n\ -# call package function with some parameter\n\ -snippet pkgmv\n\ - __PACKAGE__->${1:package_method}(${2:var})\n\ -\n\ -# call package function without a parameter\n\ -snippet pkgm\n\ - __PACKAGE__->${1:package_method}()\n\ -\n\ -# call package \"get_\" function without a parameter\n\ -snippet pkget\n\ - __PACKAGE__->get_${1:package_method}()\n\ -\n\ -# call package function with a parameter\n\ -snippet pkgetv\n\ - __PACKAGE__->get_${1:package_method}(${2:var})\n\ -\n\ -# complex regex\n\ -snippet qrx\n\ - qr/\n\ - ${1:regex}\n\ - /xms\n\ -\n\ -#simpler regex\n\ -snippet qr/\n\ - qr/${1:regex}/x\n\ -\n\ -#given\n\ -snippet given\n\ - given ($${1:var}) {\n\ - ${2:# cases}\n\ - ${3:# default}\n\ - }\n\ -\n\ -# switch-like case\n\ -snippet when\n\ - when (${1:case}) {\n\ - ${2:# body}\n\ - }\n\ -\n\ -# hash slice\n\ -snippet hslice\n\ - @{ ${1:hash} }{ ${2:array} }\n\ -\n\ -\n\ -# map\n\ -snippet map\n\ - map { ${2: body } } ${1: @array } ;\n\ -\n\ -\n\ -\n\ -# Pod stub\n\ -snippet ppod\n\ - =head1 NAME\n\ -\n\ - ${1:ClassName} - ${2:ShortDesc}\n\ -\n\ - =head1 SYNOPSIS\n\ -\n\ - use $1;\n\ -\n\ - ${3:# synopsis...}\n\ -\n\ - =head1 DESCRIPTION\n\ -\n\ - ${4:# longer description...}\n\ -\n\ -\n\ - =head1 INTERFACE\n\ -\n\ -\n\ - =head1 DEPENDENCIES\n\ -\n\ -\n\ - =head1 SEE ALSO\n\ -\n\ -\n\ -# Heading for a subroutine stub\n\ -snippet psub\n\ - =head2 ${1:MethodName}\n\ -\n\ - ${2:Summary....}\n\ -\n\ -# Heading for inline subroutine pod\n\ -snippet psubi\n\ - =head2 ${1:MethodName}\n\ -\n\ - ${2:Summary...}\n\ -\n\ -\n\ - =cut\n\ -# inline documented subroutine\n\ -snippet subpod\n\ - =head2 $1\n\ -\n\ - Summary of $1\n\ -\n\ - =cut\n\ -\n\ - sub ${1:subroutine_name} {\n\ - ${2:# body...}\n\ - }\n\ -# Subroutine signature\n\ -snippet parg\n\ - =over 2\n\ -\n\ - =item\n\ - Arguments\n\ -\n\ -\n\ - =over 3\n\ -\n\ - =item\n\ - C<${1:DataStructure}>\n\ -\n\ - ${2:Sample}\n\ -\n\ -\n\ - =back\n\ -\n\ -\n\ - =item\n\ - Return\n\ -\n\ - =over 3\n\ -\n\ -\n\ - =item\n\ - C<${3:...return data}>\n\ -\n\ -\n\ - =back\n\ -\n\ -\n\ - =back\n\ -\n\ -\n\ -\n\ -# Moose has\n\ -snippet has\n\ - has ${1:attribute} => (\n\ - is => '${2:ro|rw}',\n\ - isa => '${3:Str|Int|HashRef|ArrayRef|etc}',\n\ - default => sub {\n\ - ${4:defaultvalue}\n\ - },\n\ - ${5:# other attributes}\n\ - );\n\ -\n\ -\n\ -# override\n\ -snippet override\n\ - override ${1:attribute} => sub {\n\ - ${2:# my $self = shift;};\n\ - ${3:# my ($self, $args) = @_;};\n\ - };\n\ -\n\ -\n\ -# use test classes\n\ -snippet tuse\n\ - use Test::More;\n\ - use Test::Deep; # (); # uncomment to stop prototype errors\n\ - use Test::Exception;\n\ -\n\ -# local test lib\n\ -snippet tlib\n\ - use lib qw{ ./t/lib };\n\ -\n\ -#test methods\n\ -snippet tmeths\n\ - $ENV{TEST_METHOD} = '${1:regex}';\n\ -\n\ -# runtestclass\n\ -snippet trunner\n\ - use ${1:test_class};\n\ - $1->runtests();\n\ -\n\ -# Test::Class-style test\n\ -snippet tsub\n\ - sub t${1:number}_${2:test_case} :Test(${3:num_of_tests}) {\n\ - my $self = shift;\n\ - ${4:# body}\n\ -\n\ - }\n\ -\n\ -# Test::Routine-style test\n\ -snippet trsub\n\ - test ${1:test_name} => { description => '${2:Description of test.}'} => sub {\n\ - my ($self) = @_;\n\ - ${3:# test code}\n\ - };\n\ -\n\ -#prep test method\n\ -snippet tprep\n\ - sub prep${1:number}_${2:test_case} :Test(startup) {\n\ - my $self = shift;\n\ - ${4:# body}\n\ - }\n\ -\n\ -# cause failures to print stack trace\n\ -snippet debug_trace\n\ - use Carp; # 'verbose';\n\ - # cloak \"die\"\n\ - # warn \"warning\"\n\ - $SIG{'__DIE__'} = sub {\n\ - require Carp; Carp::confess\n\ - };\n\ -\n\ -"; -exports.scope = "perl"; - -}); (function() { - window.require(["ace/snippets/perl"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/perl6.js b/src/ace/snippets/perl6.js deleted file mode 100644 index 873cc4897..000000000 --- a/src/ace/snippets/perl6.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/perl6"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/pgsql.js b/src/ace/snippets/pgsql.js deleted file mode 100644 index c15cb260a..000000000 --- a/src/ace/snippets/pgsql.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/pgsql"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/php.js b/src/ace/snippets/php.js deleted file mode 100644 index dda20827b..000000000 --- a/src/ace/snippets/php.js +++ /dev/null @@ -1,397 +0,0 @@ -define("ace/snippets/php",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet ec\n\ - echo ${1};\n\ -snippet ns\n\ - namespace ${1:Foo\\Bar\\Baz};\n\ - ${2}\n\ -snippet use\n\ - use ${1:Foo\\Bar\\Baz};\n\ - ${2}\n\ -snippet c\n\ - ${1:abstract }class ${2:$FILENAME}\n\ - {\n\ - ${3}\n\ - }\n\ -snippet i\n\ - interface ${1:$FILENAME}\n\ - {\n\ - ${2}\n\ - }\n\ -snippet t.\n\ - $this->${1}\n\ -snippet f\n\ - function ${1:foo}(${2:array }${3:$bar})\n\ - {\n\ - ${4}\n\ - }\n\ -# method\n\ -snippet m\n\ - ${1:abstract }${2:protected}${3: static} function ${4:foo}(${5:array }${6:$bar})\n\ - {\n\ - ${7}\n\ - }\n\ -# setter method\n\ -snippet sm\n\ - /**\n\ - * Sets the value of ${1:foo}\n\ - *\n\ - * @param ${2:$1} $$1 ${3:description}\n\ - *\n\ - * @return ${4:$FILENAME}\n\ - */\n\ - ${5:public} function set${6:$2}(${7:$2 }$$1)\n\ - {\n\ - $this->${8:$1} = $$1;\n\ - return $this;\n\ - }${9}\n\ -# getter method\n\ -snippet gm\n\ - /**\n\ - * Gets the value of ${1:foo}\n\ - *\n\ - * @return ${2:$1}\n\ - */\n\ - ${3:public} function get${4:$2}()\n\ - {\n\ - return $this->${5:$1};\n\ - }${6}\n\ -#setter\n\ -snippet $s\n\ - ${1:$foo}->set${2:Bar}(${3});\n\ -#getter\n\ -snippet $g\n\ - ${1:$foo}->get${2:Bar}();\n\ -\n\ -# Tertiary conditional\n\ -snippet =?:\n\ - $${1:foo} = ${2:true} ? ${3:a} : ${4};\n\ -snippet ?:\n\ - ${1:true} ? ${2:a} : ${3}\n\ -\n\ -snippet C\n\ - $_COOKIE['${1:variable}']${2}\n\ -snippet E\n\ - $_ENV['${1:variable}']${2}\n\ -snippet F\n\ - $_FILES['${1:variable}']${2}\n\ -snippet G\n\ - $_GET['${1:variable}']${2}\n\ -snippet P\n\ - $_POST['${1:variable}']${2}\n\ -snippet R\n\ - $_REQUEST['${1:variable}']${2}\n\ -snippet S\n\ - $_SERVER['${1:variable}']${2}\n\ -snippet SS\n\ - $_SESSION['${1:variable}']${2}\n\ -\n\ -# the following are old ones\n\ -snippet inc\n\ - include '${1:file}';${2}\n\ -snippet inc1\n\ - include_once '${1:file}';${2}\n\ -snippet req\n\ - require '${1:file}';${2}\n\ -snippet req1\n\ - require_once '${1:file}';${2}\n\ -# Start Docblock\n\ -snippet /*\n\ - /**\n\ - * ${1}\n\ - */\n\ -# Class - post doc\n\ -snippet doc_cp\n\ - /**\n\ - * ${1:undocumented class}\n\ - *\n\ - * @package ${2:default}\n\ - * @subpackage ${3:default}\n\ - * @author ${4:`g:snips_author`}\n\ - */${5}\n\ -# Class Variable - post doc\n\ -snippet doc_vp\n\ - /**\n\ - * ${1:undocumented class variable}\n\ - *\n\ - * @var ${2:string}\n\ - */${3}\n\ -# Class Variable\n\ -snippet doc_v\n\ - /**\n\ - * ${3:undocumented class variable}\n\ - *\n\ - * @var ${4:string}\n\ - */\n\ - ${1:var} $${2};${5}\n\ -# Class\n\ -snippet doc_c\n\ - /**\n\ - * ${3:undocumented class}\n\ - *\n\ - * @package ${4:default}\n\ - * @subpackage ${5:default}\n\ - * @author ${6:`g:snips_author`}\n\ - */\n\ - ${1:}class ${2:}\n\ - {\n\ - ${7}\n\ - } // END $1class $2\n\ -# Constant Definition - post doc\n\ -snippet doc_dp\n\ - /**\n\ - * ${1:undocumented constant}\n\ - */${2}\n\ -# Constant Definition\n\ -snippet doc_d\n\ - /**\n\ - * ${3:undocumented constant}\n\ - */\n\ - define(${1}, ${2});${4}\n\ -# Function - post doc\n\ -snippet doc_fp\n\ - /**\n\ - * ${1:undocumented function}\n\ - *\n\ - * @return ${2:void}\n\ - * @author ${3:`g:snips_author`}\n\ - */${4}\n\ -# Function signature\n\ -snippet doc_s\n\ - /**\n\ - * ${4:undocumented function}\n\ - *\n\ - * @return ${5:void}\n\ - * @author ${6:`g:snips_author`}\n\ - */\n\ - ${1}function ${2}(${3});${7}\n\ -# Function\n\ -snippet doc_f\n\ - /**\n\ - * ${4:undocumented function}\n\ - *\n\ - * @return ${5:void}\n\ - * @author ${6:`g:snips_author`}\n\ - */\n\ - ${1}function ${2}(${3})\n\ - {${7}\n\ - }\n\ -# Header\n\ -snippet doc_h\n\ - /**\n\ - * ${1}\n\ - *\n\ - * @author ${2:`g:snips_author`}\n\ - * @version ${3:$Id$}\n\ - * @copyright ${4:$2}, `strftime('%d %B, %Y')`\n\ - * @package ${5:default}\n\ - */\n\ -\n\ -# Interface\n\ -snippet interface\n\ - /**\n\ - * ${2:undocumented class}\n\ - *\n\ - * @package ${3:default}\n\ - * @author ${4:`g:snips_author`}\n\ - */\n\ - interface ${1:$FILENAME}\n\ - {\n\ - ${5}\n\ - }\n\ -# class ...\n\ -snippet class\n\ - /**\n\ - * ${1}\n\ - */\n\ - class ${2:$FILENAME}\n\ - {\n\ - ${3}\n\ - /**\n\ - * ${4}\n\ - */\n\ - ${5:public} function ${6:__construct}(${7:argument})\n\ - {\n\ - ${8:// code...}\n\ - }\n\ - }\n\ -# define(...)\n\ -snippet def\n\ - define('${1}'${2});${3}\n\ -# defined(...)\n\ -snippet def?\n\ - ${1}defined('${2}')${3}\n\ -snippet wh\n\ - while (${1:/* condition */}) {\n\ - ${2:// code...}\n\ - }\n\ -# do ... while\n\ -snippet do\n\ - do {\n\ - ${2:// code... }\n\ - } while (${1:/* condition */});\n\ -snippet if\n\ - if (${1:/* condition */}) {\n\ - ${2:// code...}\n\ - }\n\ -snippet ife\n\ - if (${1:/* condition */}) {\n\ - ${2:// code...}\n\ - } else {\n\ - ${3:// code...}\n\ - }\n\ - ${4}\n\ -snippet else\n\ - else {\n\ - ${1:// code...}\n\ - }\n\ -snippet elseif\n\ - elseif (${1:/* condition */}) {\n\ - ${2:// code...}\n\ - }\n\ -snippet switch\n\ - switch ($${1:variable}) {\n\ - case '${2:value}':\n\ - ${3:// code...}\n\ - break;\n\ - ${5}\n\ - default:\n\ - ${4:// code...}\n\ - break;\n\ - }\n\ -snippet case\n\ - case '${1:value}':\n\ - ${2:// code...}\n\ - break;${3}\n\ -snippet for\n\ - for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) {\n\ - ${4: // code...}\n\ - }\n\ -snippet foreach\n\ - foreach ($${1:variable} as $${2:value}) {\n\ - ${3:// code...}\n\ - }\n\ -snippet foreachk\n\ - foreach ($${1:variable} as $${2:key} => $${3:value}) {\n\ - ${4:// code...}\n\ - }\n\ -# $... = array (...)\n\ -snippet array\n\ - $${1:arrayName} = array('${2}' => ${3});${4}\n\ -snippet try\n\ - try {\n\ - ${2}\n\ - } catch (${1:Exception} $e) {\n\ - }\n\ -# lambda with closure\n\ -snippet lambda\n\ - ${1:static }function (${2:args}) use (${3:&$x, $y /*put vars in scope (closure) */}) {\n\ - ${4}\n\ - };\n\ -# pre_dump();\n\ -snippet pd\n\ - echo '
    '; var_dump(${1}); echo '
    ';\n\ -# pre_dump(); die();\n\ -snippet pdd\n\ - echo '
    '; var_dump(${1}); echo '
    '; die(${2:});\n\ -snippet vd\n\ - var_dump(${1});\n\ -snippet vdd\n\ - var_dump(${1}); die(${2:});\n\ -snippet http_redirect\n\ - header (\"HTTP/1.1 301 Moved Permanently\");\n\ - header (\"Location: \".URL);\n\ - exit();\n\ -# Getters & Setters\n\ -snippet gs\n\ - /**\n\ - * Gets the value of ${1:foo}\n\ - *\n\ - * @return ${2:$1}\n\ - */\n\ - public function get${3:$2}()\n\ - {\n\ - return $this->${4:$1};\n\ - }\n\ -\n\ - /**\n\ - * Sets the value of $1\n\ - *\n\ - * @param $2 $$1 ${5:description}\n\ - *\n\ - * @return ${6:$FILENAME}\n\ - */\n\ - public function set$3(${7:$2 }$$1)\n\ - {\n\ - $this->$4 = $$1;\n\ - return $this;\n\ - }${8}\n\ -# anotation, get, and set, useful for doctrine\n\ -snippet ags\n\ - /**\n\ - * ${1:description}\n\ - *\n\ - * @${7}\n\ - */\n\ - ${2:protected} $${3:foo};\n\ -\n\ - public function get${4:$3}()\n\ - {\n\ - return $this->$3;\n\ - }\n\ -\n\ - public function set$4(${5:$4 }$${6:$3})\n\ - {\n\ - $this->$3 = $$6;\n\ - return $this;\n\ - }\n\ -snippet rett\n\ - return true;\n\ -snippet retf\n\ - return false;\n\ -scope html\n\ -snippet \n\ -# this one is for php5.4\n\ -snippet \n\ -snippet ifil\n\ - \n\ - ${2:}\n\ - \n\ -snippet ifeil\n\ - \n\ - ${2:}\n\ - \n\ - ${3:}\n\ - \n\ - ${4}\n\ -snippet foreachil\n\ - \n\ - ${3:}\n\ - \n\ -snippet foreachkil\n\ - $${3:value}): ?>\n\ - ${4:}\n\ - \n\ -scope html-tag\n\ -snippet ifil\\n\\\n\ - ${2:code}\n\ -snippet ifeil\\n\\\n\ - ${2:code}${3:code}${4}\n\ -"; -exports.scope = "php"; - -}); (function() { - window.require(["ace/snippets/php"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/php_laravel_blade.js b/src/ace/snippets/php_laravel_blade.js deleted file mode 100644 index d4790ba28..000000000 --- a/src/ace/snippets/php_laravel_blade.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/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/src/ace/snippets/pig.js b/src/ace/snippets/pig.js deleted file mode 100644 index 157d19211..000000000 --- a/src/ace/snippets/pig.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/pig"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/plain_text.js b/src/ace/snippets/plain_text.js deleted file mode 100644 index 92dfce5cd..000000000 --- a/src/ace/snippets/plain_text.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/plain_text"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/powershell.js b/src/ace/snippets/powershell.js deleted file mode 100644 index 0f36eeded..000000000 --- a/src/ace/snippets/powershell.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/powershell"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/praat.js b/src/ace/snippets/praat.js deleted file mode 100644 index e4e734fc7..000000000 --- a/src/ace/snippets/praat.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/praat"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/prisma.js b/src/ace/snippets/prisma.js deleted file mode 100644 index 4a9e2b3e3..000000000 --- a/src/ace/snippets/prisma.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/prisma"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/prolog.js b/src/ace/snippets/prolog.js deleted file mode 100644 index 4c23dac38..000000000 --- a/src/ace/snippets/prolog.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/prolog"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/properties.js b/src/ace/snippets/properties.js deleted file mode 100644 index 36c01dcb8..000000000 --- a/src/ace/snippets/properties.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/properties"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/protobuf.js b/src/ace/snippets/protobuf.js deleted file mode 100644 index b169bbfc5..000000000 --- a/src/ace/snippets/protobuf.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/protobuf"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/puppet.js b/src/ace/snippets/puppet.js deleted file mode 100644 index 52021e3a5..000000000 --- a/src/ace/snippets/puppet.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/puppet"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/python.js b/src/ace/snippets/python.js deleted file mode 100644 index a06c09995..000000000 --- a/src/ace/snippets/python.js +++ /dev/null @@ -1,172 +0,0 @@ -define("ace/snippets/python",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet #!\n\ - #!/usr/bin/env python\n\ -snippet imp\n\ - import ${1:module}\n\ -snippet from\n\ - from ${1:package} import ${2:module}\n\ -# Module Docstring\n\ -snippet docs\n\ - '''\n\ - File: ${1:FILENAME:file_name}\n\ - Author: ${2:author}\n\ - Description: ${3}\n\ - '''\n\ -snippet wh\n\ - while ${1:condition}:\n\ - ${2:# TODO: write code...}\n\ -# dowh - does the same as do...while in other languages\n\ -snippet dowh\n\ - while True:\n\ - ${1:# TODO: write code...}\n\ - if ${2:condition}:\n\ - break\n\ -snippet with\n\ - with ${1:expr} as ${2:var}:\n\ - ${3:# TODO: write code...}\n\ -# New Class\n\ -snippet cl\n\ - class ${1:ClassName}(${2:object}):\n\ - \"\"\"${3:docstring for $1}\"\"\"\n\ - def __init__(self, ${4:arg}):\n\ - ${5:super($1, self).__init__()}\n\ - self.$4 = $4\n\ - ${6}\n\ -# New Function\n\ -snippet def\n\ - def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\ - \"\"\"${3:docstring for $1}\"\"\"\n\ - ${4:# TODO: write code...}\n\ -snippet deff\n\ - def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\ - ${3:# TODO: write code...}\n\ -# New Method\n\ -snippet defs\n\ - def ${1:mname}(self, ${2:arg}):\n\ - ${3:# TODO: write code...}\n\ -# New Property\n\ -snippet property\n\ - def ${1:foo}():\n\ - doc = \"${2:The $1 property.}\"\n\ - def fget(self):\n\ - ${3:return self._$1}\n\ - def fset(self, value):\n\ - ${4:self._$1 = value}\n\ -# Ifs\n\ -snippet if\n\ - if ${1:condition}:\n\ - ${2:# TODO: write code...}\n\ -snippet el\n\ - else:\n\ - ${1:# TODO: write code...}\n\ -snippet ei\n\ - elif ${1:condition}:\n\ - ${2:# TODO: write code...}\n\ -# For\n\ -snippet for\n\ - for ${1:item} in ${2:items}:\n\ - ${3:# TODO: write code...}\n\ -# Encodes\n\ -snippet cutf8\n\ - # -*- coding: utf-8 -*-\n\ -snippet clatin1\n\ - # -*- coding: latin-1 -*-\n\ -snippet cascii\n\ - # -*- coding: ascii -*-\n\ -# Lambda\n\ -snippet ld\n\ - ${1:var} = lambda ${2:vars} : ${3:action}\n\ -snippet .\n\ - self.\n\ -snippet try Try/Except\n\ - try:\n\ - ${1:# TODO: write code...}\n\ - except ${2:Exception}, ${3:e}:\n\ - ${4:raise $3}\n\ -snippet try Try/Except/Else\n\ - try:\n\ - ${1:# TODO: write code...}\n\ - except ${2:Exception}, ${3:e}:\n\ - ${4:raise $3}\n\ - else:\n\ - ${5:# TODO: write code...}\n\ -snippet try Try/Except/Finally\n\ - try:\n\ - ${1:# TODO: write code...}\n\ - except ${2:Exception}, ${3:e}:\n\ - ${4:raise $3}\n\ - finally:\n\ - ${5:# TODO: write code...}\n\ -snippet try Try/Except/Else/Finally\n\ - try:\n\ - ${1:# TODO: write code...}\n\ - except ${2:Exception}, ${3:e}:\n\ - ${4:raise $3}\n\ - else:\n\ - ${5:# TODO: write code...}\n\ - finally:\n\ - ${6:# TODO: write code...}\n\ -# if __name__ == '__main__':\n\ -snippet ifmain\n\ - if __name__ == '__main__':\n\ - ${1:main()}\n\ -# __magic__\n\ -snippet _\n\ - __${1:init}__${2}\n\ -# python debugger (pdb)\n\ -snippet pdb\n\ - import pdb; pdb.set_trace()\n\ -# ipython debugger (ipdb)\n\ -snippet ipdb\n\ - import ipdb; ipdb.set_trace()\n\ -# ipython debugger (pdbbb)\n\ -snippet pdbbb\n\ - import pdbpp; pdbpp.set_trace()\n\ -snippet pprint\n\ - import pprint; pprint.pprint(${1})${2}\n\ -snippet \"\n\ - \"\"\"\n\ - ${1:doc}\n\ - \"\"\"\n\ -# test function/method\n\ -snippet test\n\ - def test_${1:description}(${2:self}):\n\ - ${3:# TODO: write code...}\n\ -# test case\n\ -snippet testcase\n\ - class ${1:ExampleCase}(unittest.TestCase):\n\ - \n\ - def test_${2:description}(self):\n\ - ${3:# TODO: write code...}\n\ -snippet fut\n\ - from __future__ import ${1}\n\ -#getopt\n\ -snippet getopt\n\ - try:\n\ - # Short option syntax: \"hv:\"\n\ - # Long option syntax: \"help\" or \"verbose=\"\n\ - opts, args = getopt.getopt(sys.argv[1:], \"${1:short_options}\", [${2:long_options}])\n\ - \n\ - except getopt.GetoptError, err:\n\ - # Print debug info\n\ - print str(err)\n\ - ${3:error_action}\n\ -\n\ - for option, argument in opts:\n\ - if option in (\"-h\", \"--help\"):\n\ - ${4}\n\ - elif option in (\"-v\", \"--verbose\"):\n\ - verbose = argument\n\ -"; -exports.scope = "python"; - -}); (function() { - window.require(["ace/snippets/python"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/qml.js b/src/ace/snippets/qml.js deleted file mode 100644 index cb4f66ede..000000000 --- a/src/ace/snippets/qml.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/qml"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/r.js b/src/ace/snippets/r.js deleted file mode 100644 index dd26a5258..000000000 --- a/src/ace/snippets/r.js +++ /dev/null @@ -1,135 +0,0 @@ -define("ace/snippets/r",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet #!\n\ - #!/usr/bin/env Rscript\n\ -\n\ -# includes\n\ -snippet lib\n\ - library(${1:package})\n\ -snippet req\n\ - require(${1:package})\n\ -snippet source\n\ - source('${1:file}')\n\ -\n\ -# conditionals\n\ -snippet if\n\ - if (${1:condition}) {\n\ - ${2:code}\n\ - }\n\ -snippet el\n\ - else {\n\ - ${1:code}\n\ - }\n\ -snippet ei\n\ - else if (${1:condition}) {\n\ - ${2:code}\n\ - }\n\ -\n\ -# functions\n\ -snippet fun\n\ - ${1:name} = function (${2:variables}) {\n\ - ${3:code}\n\ - }\n\ -snippet ret\n\ - return(${1:code})\n\ -\n\ -# dataframes, lists, etc\n\ -snippet df\n\ - ${1:name}[${2:rows}, ${3:cols}]\n\ -snippet c\n\ - c(${1:items})\n\ -snippet li\n\ - list(${1:items})\n\ -snippet mat\n\ - matrix(${1:data}, nrow=${2:rows}, ncol=${3:cols})\n\ -\n\ -# apply functions\n\ -snippet apply\n\ - apply(${1:array}, ${2:margin}, ${3:function})\n\ -snippet lapply\n\ - lapply(${1:list}, ${2:function})\n\ -snippet sapply\n\ - sapply(${1:list}, ${2:function})\n\ -snippet vapply\n\ - vapply(${1:list}, ${2:function}, ${3:type})\n\ -snippet mapply\n\ - mapply(${1:function}, ${2:...})\n\ -snippet tapply\n\ - tapply(${1:vector}, ${2:index}, ${3:function})\n\ -snippet rapply\n\ - rapply(${1:list}, ${2:function})\n\ -\n\ -# plyr functions\n\ -snippet dd\n\ - ddply(${1:frame}, ${2:variables}, ${3:function})\n\ -snippet dl\n\ - dlply(${1:frame}, ${2:variables}, ${3:function})\n\ -snippet da\n\ - daply(${1:frame}, ${2:variables}, ${3:function})\n\ -snippet d_\n\ - d_ply(${1:frame}, ${2:variables}, ${3:function})\n\ -\n\ -snippet ad\n\ - adply(${1:array}, ${2:margin}, ${3:function})\n\ -snippet al\n\ - alply(${1:array}, ${2:margin}, ${3:function})\n\ -snippet aa\n\ - aaply(${1:array}, ${2:margin}, ${3:function})\n\ -snippet a_\n\ - a_ply(${1:array}, ${2:margin}, ${3:function})\n\ -\n\ -snippet ld\n\ - ldply(${1:list}, ${2:function})\n\ -snippet ll\n\ - llply(${1:list}, ${2:function})\n\ -snippet la\n\ - laply(${1:list}, ${2:function})\n\ -snippet l_\n\ - l_ply(${1:list}, ${2:function})\n\ -\n\ -snippet md\n\ - mdply(${1:matrix}, ${2:function})\n\ -snippet ml\n\ - mlply(${1:matrix}, ${2:function})\n\ -snippet ma\n\ - maply(${1:matrix}, ${2:function})\n\ -snippet m_\n\ - m_ply(${1:matrix}, ${2:function})\n\ -\n\ -# plot functions\n\ -snippet pl\n\ - plot(${1:x}, ${2:y})\n\ -snippet ggp\n\ - ggplot(${1:data}, aes(${2:aesthetics}))\n\ -snippet img\n\ - ${1:(jpeg,bmp,png,tiff)}(filename=\"${2:filename}\", width=${3}, height=${4}, unit=\"${5}\")\n\ - ${6:plot}\n\ - dev.off()\n\ -\n\ -# statistical test functions\n\ -snippet fis\n\ - fisher.test(${1:x}, ${2:y})\n\ -snippet chi\n\ - chisq.test(${1:x}, ${2:y})\n\ -snippet tt\n\ - t.test(${1:x}, ${2:y})\n\ -snippet wil\n\ - wilcox.test(${1:x}, ${2:y})\n\ -snippet cor\n\ - cor.test(${1:x}, ${2:y})\n\ -snippet fte\n\ - var.test(${1:x}, ${2:y})\n\ -snippet kvt \n\ - kv.test(${1:x}, ${2:y})\n\ -"; -exports.scope = "r"; - -}); (function() { - window.require(["ace/snippets/r"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/raku.js b/src/ace/snippets/raku.js deleted file mode 100644 index 8beaf95dc..000000000 --- a/src/ace/snippets/raku.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/raku"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/razor.js b/src/ace/snippets/razor.js deleted file mode 100644 index 505528b53..000000000 --- a/src/ace/snippets/razor.js +++ /dev/null @@ -1,17 +0,0 @@ -define("ace/snippets/razor",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet if\n\ -(${1} == ${2}) {\n\ - ${3}\n\ -}"; -exports.scope = "razor"; - -}); (function() { - window.require(["ace/snippets/razor"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/rdoc.js b/src/ace/snippets/rdoc.js deleted file mode 100644 index e4845db4c..000000000 --- a/src/ace/snippets/rdoc.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/rdoc"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/red.js b/src/ace/snippets/red.js deleted file mode 100644 index 80cbd1b55..000000000 --- a/src/ace/snippets/red.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/red"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/redshift.js b/src/ace/snippets/redshift.js deleted file mode 100644 index bedd14733..000000000 --- a/src/ace/snippets/redshift.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/redshift"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/rhtml.js b/src/ace/snippets/rhtml.js deleted file mode 100644 index 7eb8a5eba..000000000 --- a/src/ace/snippets/rhtml.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/rhtml"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/rst.js b/src/ace/snippets/rst.js deleted file mode 100644 index 2c89a897e..000000000 --- a/src/ace/snippets/rst.js +++ /dev/null @@ -1,36 +0,0 @@ -define("ace/snippets/rst",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# rst\n\ -\n\ -snippet :\n\ - :${1:field name}: ${2:field body}\n\ -snippet *\n\ - *${1:Emphasis}*\n\ -snippet **\n\ - **${1:Strong emphasis}**\n\ -snippet _\n\ - \\`${1:hyperlink-name}\\`_\n\ - .. _\\`$1\\`: ${2:link-block}\n\ -snippet =\n\ - ${1:Title}\n\ - =====${2:=}\n\ - ${3}\n\ -snippet -\n\ - ${1:Title}\n\ - -----${2:-}\n\ - ${3}\n\ -snippet cont:\n\ - .. contents::\n\ - \n\ -"; -exports.scope = "rst"; - -}); (function() { - window.require(["ace/snippets/rst"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/ruby.js b/src/ace/snippets/ruby.js deleted file mode 100644 index c34cac47e..000000000 --- a/src/ace/snippets/ruby.js +++ /dev/null @@ -1,942 +0,0 @@ -define("ace/snippets/ruby",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "########################################\n\ -# Ruby snippets - for Rails, see below #\n\ -########################################\n\ -\n\ -# encoding for Ruby 1.9\n\ -snippet enc\n\ - # encoding: utf-8\n\ -\n\ -# #!/usr/bin/env ruby\n\ -snippet #!\n\ - #!/usr/bin/env ruby\n\ - # encoding: utf-8\n\ -\n\ -# New Block\n\ -snippet =b\n\ - =begin rdoc\n\ - ${1}\n\ - =end\n\ -snippet y\n\ - :yields: ${1:arguments}\n\ -snippet rb\n\ - #!/usr/bin/env ruby -wKU\n\ -snippet beg\n\ - begin\n\ - ${3}\n\ - rescue ${1:Exception} => ${2:e}\n\ - end\n\ -\n\ -snippet req require\n\ - require \"${1}\"${2}\n\ -snippet #\n\ - # =>\n\ -snippet end\n\ - __END__\n\ -snippet case\n\ - case ${1:object}\n\ - when ${2:condition}\n\ - ${3}\n\ - end\n\ -snippet when\n\ - when ${1:condition}\n\ - ${2}\n\ -snippet def\n\ - def ${1:method_name}\n\ - ${2}\n\ - end\n\ -snippet deft\n\ - def test_${1:case_name}\n\ - ${2}\n\ - end\n\ -snippet if\n\ - if ${1:condition}\n\ - ${2}\n\ - end\n\ -snippet ife\n\ - if ${1:condition}\n\ - ${2}\n\ - else\n\ - ${3}\n\ - end\n\ -snippet elsif\n\ - elsif ${1:condition}\n\ - ${2}\n\ -snippet unless\n\ - unless ${1:condition}\n\ - ${2}\n\ - end\n\ -snippet while\n\ - while ${1:condition}\n\ - ${2}\n\ - end\n\ -snippet for\n\ - for ${1:e} in ${2:c}\n\ - ${3}\n\ - end\n\ -snippet until\n\ - until ${1:condition}\n\ - ${2}\n\ - end\n\ -snippet cla class .. end\n\ - class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ - ${2}\n\ - end\n\ -snippet cla class .. initialize .. end\n\ - class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ - def initialize(${2:args})\n\ - ${3}\n\ - end\n\ - end\n\ -snippet cla class .. < ParentClass .. initialize .. end\n\ - class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} < ${2:ParentClass}\n\ - def initialize(${3:args})\n\ - ${4}\n\ - end\n\ - end\n\ -snippet cla ClassName = Struct .. do .. end\n\ - ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} = Struct.new(:${2:attr_names}) do\n\ - def ${3:method_name}\n\ - ${4}\n\ - end\n\ - end\n\ -snippet cla class BlankSlate .. initialize .. end\n\ - class ${1:BlankSlate}\n\ - instance_methods.each { |meth| undef_method(meth) unless meth =~ /\\A__/ }\n\ - end\n\ -snippet cla class << self .. end\n\ - class << ${1:self}\n\ - ${2}\n\ - end\n\ -# class .. < DelegateClass .. initialize .. end\n\ -snippet cla-\n\ - class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} < DelegateClass(${2:ParentClass})\n\ - def initialize(${3:args})\n\ - super(${4:del_obj})\n\ -\n\ - ${5}\n\ - end\n\ - end\n\ -snippet mod module .. end\n\ - module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ - ${2}\n\ - end\n\ -snippet mod module .. module_function .. end\n\ - module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ - module_function\n\ -\n\ - ${2}\n\ - end\n\ -snippet mod module .. ClassMethods .. end\n\ - module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\ - module ClassMethods\n\ - ${2}\n\ - end\n\ -\n\ - module InstanceMethods\n\ -\n\ - end\n\ -\n\ - def self.included(receiver)\n\ - receiver.extend ClassMethods\n\ - receiver.send :include, InstanceMethods\n\ - end\n\ - end\n\ -# attr_reader\n\ -snippet r\n\ - attr_reader :${1:attr_names}\n\ -# attr_writer\n\ -snippet w\n\ - attr_writer :${1:attr_names}\n\ -# attr_accessor\n\ -snippet rw\n\ - attr_accessor :${1:attr_names}\n\ -snippet atp\n\ - attr_protected :${1:attr_names}\n\ -snippet ata\n\ - attr_accessible :${1:attr_names}\n\ -# include Enumerable\n\ -snippet Enum\n\ - include Enumerable\n\ -\n\ - def each(&block)\n\ - ${1}\n\ - end\n\ -# include Comparable\n\ -snippet Comp\n\ - include Comparable\n\ -\n\ - def <=>(other)\n\ - ${1}\n\ - end\n\ -# extend Forwardable\n\ -snippet Forw-\n\ - extend Forwardable\n\ -# def self\n\ -snippet defs\n\ - def self.${1:class_method_name}\n\ - ${2}\n\ - end\n\ -# def method_missing\n\ -snippet defmm\n\ - def method_missing(meth, *args, &blk)\n\ - ${1}\n\ - end\n\ -snippet defd\n\ - def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name}\n\ -snippet defds\n\ - def_delegators :${1:@del_obj}, :${2:del_methods}\n\ -snippet am\n\ - alias_method :${1:new_name}, :${2:old_name}\n\ -snippet app\n\ - if __FILE__ == $PROGRAM_NAME\n\ - ${1}\n\ - end\n\ -# usage_if()\n\ -snippet usai\n\ - if ARGV.${1}\n\ - abort \"Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}\"${3}\n\ - end\n\ -# usage_unless()\n\ -snippet usau\n\ - unless ARGV.${1}\n\ - abort \"Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}\"${3}\n\ - end\n\ -snippet array\n\ - Array.new(${1:10}) { |${2:i}| ${3} }\n\ -snippet hash\n\ - Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} }\n\ -snippet file File.foreach() { |line| .. }\n\ - File.foreach(${1:\"path/to/file\"}) { |${2:line}| ${3} }\n\ -snippet file File.read()\n\ - File.read(${1:\"path/to/file\"})${2}\n\ -snippet Dir Dir.global() { |file| .. }\n\ - Dir.glob(${1:\"dir/glob/*\"}) { |${2:file}| ${3} }\n\ -snippet Dir Dir[\"..\"]\n\ - Dir[${1:\"glob/**/*.rb\"}]${2}\n\ -snippet dir\n\ - Filename.dirname(__FILE__)\n\ -snippet deli\n\ - delete_if { |${1:e}| ${2} }\n\ -snippet fil\n\ - fill(${1:range}) { |${2:i}| ${3} }\n\ -# flatten_once()\n\ -snippet flao\n\ - inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3}\n\ -snippet zip\n\ - zip(${1:enums}) { |${2:row}| ${3} }\n\ -# downto(0) { |n| .. }\n\ -snippet dow\n\ - downto(${1:0}) { |${2:n}| ${3} }\n\ -snippet ste\n\ - step(${1:2}) { |${2:n}| ${3} }\n\ -snippet tim\n\ - times { |${1:n}| ${2} }\n\ -snippet upt\n\ - upto(${1:1.0/0.0}) { |${2:n}| ${3} }\n\ -snippet loo\n\ - loop { ${1} }\n\ -snippet ea\n\ - each { |${1:e}| ${2} }\n\ -snippet ead\n\ - each do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet eab\n\ - each_byte { |${1:byte}| ${2} }\n\ -snippet eac- each_char { |chr| .. }\n\ - each_char { |${1:chr}| ${2} }\n\ -snippet eac- each_cons(..) { |group| .. }\n\ - each_cons(${1:2}) { |${2:group}| ${3} }\n\ -snippet eai\n\ - each_index { |${1:i}| ${2} }\n\ -snippet eaid\n\ - each_index do |${1:i}|\n\ - ${2}\n\ - end\n\ -snippet eak\n\ - each_key { |${1:key}| ${2} }\n\ -snippet eakd\n\ - each_key do |${1:key}|\n\ - ${2}\n\ - end\n\ -snippet eal\n\ - each_line { |${1:line}| ${2} }\n\ -snippet eald\n\ - each_line do |${1:line}|\n\ - ${2}\n\ - end\n\ -snippet eap\n\ - each_pair { |${1:name}, ${2:val}| ${3} }\n\ -snippet eapd\n\ - each_pair do |${1:name}, ${2:val}|\n\ - ${3}\n\ - end\n\ -snippet eas-\n\ - each_slice(${1:2}) { |${2:group}| ${3} }\n\ -snippet easd-\n\ - each_slice(${1:2}) do |${2:group}|\n\ - ${3}\n\ - end\n\ -snippet eav\n\ - each_value { |${1:val}| ${2} }\n\ -snippet eavd\n\ - each_value do |${1:val}|\n\ - ${2}\n\ - end\n\ -snippet eawi\n\ - each_with_index { |${1:e}, ${2:i}| ${3} }\n\ -snippet eawid\n\ - each_with_index do |${1:e},${2:i}|\n\ - ${3}\n\ - end\n\ -snippet reve\n\ - reverse_each { |${1:e}| ${2} }\n\ -snippet reved\n\ - reverse_each do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet inj\n\ - inject(${1:init}) { |${2:mem}, ${3:var}| ${4} }\n\ -snippet injd\n\ - inject(${1:init}) do |${2:mem}, ${3:var}|\n\ - ${4}\n\ - end\n\ -snippet map\n\ - map { |${1:e}| ${2} }\n\ -snippet mapd\n\ - map do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet mapwi-\n\ - enum_with_index.map { |${1:e}, ${2:i}| ${3} }\n\ -snippet sor\n\ - sort { |a, b| ${1} }\n\ -snippet sorb\n\ - sort_by { |${1:e}| ${2} }\n\ -snippet ran\n\ - sort_by { rand }\n\ -snippet all\n\ - all? { |${1:e}| ${2} }\n\ -snippet any\n\ - any? { |${1:e}| ${2} }\n\ -snippet cl\n\ - classify { |${1:e}| ${2} }\n\ -snippet col\n\ - collect { |${1:e}| ${2} }\n\ -snippet cold\n\ - collect do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet det\n\ - detect { |${1:e}| ${2} }\n\ -snippet detd\n\ - detect do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet fet\n\ - fetch(${1:name}) { |${2:key}| ${3} }\n\ -snippet fin\n\ - find { |${1:e}| ${2} }\n\ -snippet find\n\ - find do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet fina\n\ - find_all { |${1:e}| ${2} }\n\ -snippet finad\n\ - find_all do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet gre\n\ - grep(${1:/pattern/}) { |${2:match}| ${3} }\n\ -snippet sub\n\ - ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} }\n\ -snippet sca\n\ - scan(${1:/pattern/}) { |${2:match}| ${3} }\n\ -snippet scad\n\ - scan(${1:/pattern/}) do |${2:match}|\n\ - ${3}\n\ - end\n\ -snippet max\n\ - max { |a, b| ${1} }\n\ -snippet min\n\ - min { |a, b| ${1} }\n\ -snippet par\n\ - partition { |${1:e}| ${2} }\n\ -snippet pard\n\ - partition do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet rej\n\ - reject { |${1:e}| ${2} }\n\ -snippet rejd\n\ - reject do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet sel\n\ - select { |${1:e}| ${2} }\n\ -snippet seld\n\ - select do |${1:e}|\n\ - ${2}\n\ - end\n\ -snippet lam\n\ - lambda { |${1:args}| ${2} }\n\ -snippet doo\n\ - do\n\ - ${1}\n\ - end\n\ -snippet dov\n\ - do |${1:variable}|\n\ - ${2}\n\ - end\n\ -snippet :\n\ - :${1:key} => ${2:\"value\"}${3}\n\ -snippet ope\n\ - open(${1:\"path/or/url/or/pipe\"}, \"${2:w}\") { |${3:io}| ${4} }\n\ -# path_from_here()\n\ -snippet fpath\n\ - File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2}\n\ -# unix_filter {}\n\ -snippet unif\n\ - ARGF.each_line${1} do |${2:line}|\n\ - ${3}\n\ - end\n\ -# option_parse {}\n\ -snippet optp\n\ - require \"optparse\"\n\ -\n\ - options = {${1:default => \"args\"}}\n\ -\n\ - ARGV.options do |opts|\n\ - opts.banner = \"Usage: #{File.basename($PROGRAM_NAME)}\n\ -snippet opt\n\ - opts.on( \"-${1:o}\", \"--${2:long-option-name}\", ${3:String},\n\ - \"${4:Option description.}\") do |${5:opt}|\n\ - ${6}\n\ - end\n\ -snippet tc\n\ - require \"test/unit\"\n\ -\n\ - require \"${1:library_file_name}\"\n\ -\n\ - class Test${2:$1} < Test::Unit::TestCase\n\ - def test_${3:case_name}\n\ - ${4}\n\ - end\n\ - end\n\ -snippet ts\n\ - require \"test/unit\"\n\ -\n\ - require \"tc_${1:test_case_file}\"\n\ - require \"tc_${2:test_case_file}\"${3}\n\ -snippet as\n\ - assert ${1:test}, \"${2:Failure message.}\"${3}\n\ -snippet ase\n\ - assert_equal ${1:expected}, ${2:actual}${3}\n\ -snippet asne\n\ - assert_not_equal ${1:unexpected}, ${2:actual}${3}\n\ -snippet asid\n\ - assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:2 ** -20}${4}\n\ -snippet asio\n\ - assert_instance_of ${1:ExpectedClass}, ${2:actual_instance}${3}\n\ -snippet asko\n\ - assert_kind_of ${1:ExpectedKind}, ${2:actual_instance}${3}\n\ -snippet asn\n\ - assert_nil ${1:instance}${2}\n\ -snippet asnn\n\ - assert_not_nil ${1:instance}${2}\n\ -snippet asm\n\ - assert_match /${1:expected_pattern}/, ${2:actual_string}${3}\n\ -snippet asnm\n\ - assert_no_match /${1:unexpected_pattern}/, ${2:actual_string}${3}\n\ -snippet aso\n\ - assert_operator ${1:left}, :${2:operator}, ${3:right}${4}\n\ -snippet asr\n\ - assert_raise ${1:Exception} { ${2} }\n\ -snippet asrd\n\ - assert_raise ${1:Exception} do\n\ - ${2}\n\ - end\n\ -snippet asnr\n\ - assert_nothing_raised ${1:Exception} { ${2} }\n\ -snippet asnrd\n\ - assert_nothing_raised ${1:Exception} do\n\ - ${2}\n\ - end\n\ -snippet asrt\n\ - assert_respond_to ${1:object}, :${2:method}${3}\n\ -snippet ass assert_same(..)\n\ - assert_same ${1:expected}, ${2:actual}${3}\n\ -snippet ass assert_send(..)\n\ - assert_send [${1:object}, :${2:message}, ${3:args}]${4}\n\ -snippet asns\n\ - assert_not_same ${1:unexpected}, ${2:actual}${3}\n\ -snippet ast\n\ - assert_throws :${1:expected} { ${2} }\n\ -snippet astd\n\ - assert_throws :${1:expected} do\n\ - ${2}\n\ - end\n\ -snippet asnt\n\ - assert_nothing_thrown { ${1} }\n\ -snippet asntd\n\ - assert_nothing_thrown do\n\ - ${1}\n\ - end\n\ -snippet fl\n\ - flunk \"${1:Failure message.}\"${2}\n\ -# Benchmark.bmbm do .. end\n\ -snippet bm-\n\ - TESTS = ${1:10_000}\n\ - Benchmark.bmbm do |results|\n\ - ${2}\n\ - end\n\ -snippet rep\n\ - results.report(\"${1:name}:\") { TESTS.times { ${2} }}\n\ -# Marshal.dump(.., file)\n\ -snippet Md\n\ - File.open(${1:\"path/to/file.dump\"}, \"wb\") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4}\n\ -# Mashal.load(obj)\n\ -snippet Ml\n\ - File.open(${1:\"path/to/file.dump\"}, \"rb\") { |${2:file}| Marshal.load($2) }${3}\n\ -# deep_copy(..)\n\ -snippet deec\n\ - Marshal.load(Marshal.dump(${1:obj_to_copy}))${2}\n\ -snippet Pn-\n\ - PStore.new(${1:\"file_name.pstore\"})${2}\n\ -snippet tra\n\ - transaction(${1:true}) { ${2} }\n\ -# xmlread(..)\n\ -snippet xml-\n\ - REXML::Document.new(File.read(${1:\"path/to/file\"}))${2}\n\ -# xpath(..) { .. }\n\ -snippet xpa\n\ - elements.each(${1:\"//Xpath\"}) do |${2:node}|\n\ - ${3}\n\ - end\n\ -# class_from_name()\n\ -snippet clafn\n\ - split(\"::\").inject(Object) { |par, const| par.const_get(const) }\n\ -# singleton_class()\n\ -snippet sinc\n\ - class << self; self end\n\ -snippet nam\n\ - namespace :${1:`Filename()`} do\n\ - ${2}\n\ - end\n\ -snippet tas\n\ - desc \"${1:Task description}\"\n\ - task :${2:task_name => [:dependent, :tasks]} do\n\ - ${3}\n\ - end\n\ -# block\n\ -snippet b\n\ - { |${1:var}| ${2} }\n\ -snippet begin\n\ - begin\n\ - raise 'A test exception.'\n\ - rescue Exception => e\n\ - puts e.message\n\ - puts e.backtrace.inspect\n\ - else\n\ - # other exception\n\ - ensure\n\ - # always executed\n\ - end\n\ -\n\ -#debugging\n\ -snippet debug\n\ - require 'ruby-debug'; debugger; true;\n\ -snippet pry\n\ - require 'pry'; binding.pry\n\ -\n\ -#############################################\n\ -# Rails snippets - for pure Ruby, see above #\n\ -#############################################\n\ -snippet art\n\ - assert_redirected_to ${1::action => \"${2:index}\"}\n\ -snippet artnp\n\ - assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1}, ${4:@$2})\n\ -snippet artnpp\n\ - assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1})\n\ -snippet artp\n\ - assert_redirected_to ${1:model}_path(${2:@$1})\n\ -snippet artpp\n\ - assert_redirected_to ${1:model}s_path\n\ -snippet asd\n\ - assert_difference \"${1:Model}.${2:count}\", $1 do\n\ - ${3}\n\ - end\n\ -snippet asnd\n\ - assert_no_difference \"${1:Model}.${2:count}\" do\n\ - ${3}\n\ - end\n\ -snippet asre\n\ - assert_response :${1:success}, @response.body${2}\n\ -snippet asrj\n\ - assert_rjs :${1:replace}, \"${2:dom id}\"\n\ -snippet ass assert_select(..)\n\ - assert_select '${1:path}', :${2:text} => '${3:inner_html' ${4:do}\n\ -snippet bf\n\ - before_filter :${1:method}\n\ -snippet bt\n\ - belongs_to :${1:association}\n\ -snippet crw\n\ - cattr_accessor :${1:attr_names}\n\ -snippet defcreate\n\ - def create\n\ - @${1:model_class_name} = ${2:ModelClassName}.new(params[:$1])\n\ -\n\ - respond_to do |wants|\n\ - if @$1.save\n\ - flash[:notice] = '$2 was successfully created.'\n\ - wants.html { redirect_to(@$1) }\n\ - wants.xml { render :xml => @$1, :status => :created, :location => @$1 }\n\ - else\n\ - wants.html { render :action => \"new\" }\n\ - wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\ - end\n\ - end\n\ - end${3}\n\ -snippet defdestroy\n\ - def destroy\n\ - @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ - @$1.destroy\n\ -\n\ - respond_to do |wants|\n\ - wants.html { redirect_to($1s_url) }\n\ - wants.xml { head :ok }\n\ - end\n\ - end${3}\n\ -snippet defedit\n\ - def edit\n\ - @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ - end\n\ -snippet defindex\n\ - def index\n\ - @${1:model_class_name} = ${2:ModelClassName}.all\n\ -\n\ - respond_to do |wants|\n\ - wants.html # index.html.erb\n\ - wants.xml { render :xml => @$1s }\n\ - end\n\ - end${3}\n\ -snippet defnew\n\ - def new\n\ - @${1:model_class_name} = ${2:ModelClassName}.new\n\ -\n\ - respond_to do |wants|\n\ - wants.html # new.html.erb\n\ - wants.xml { render :xml => @$1 }\n\ - end\n\ - end${3}\n\ -snippet defshow\n\ - def show\n\ - @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ -\n\ - respond_to do |wants|\n\ - wants.html # show.html.erb\n\ - wants.xml { render :xml => @$1 }\n\ - end\n\ - end${3}\n\ -snippet defupdate\n\ - def update\n\ - @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\ -\n\ - respond_to do |wants|\n\ - if @$1.update_attributes(params[:$1])\n\ - flash[:notice] = '$2 was successfully updated.'\n\ - wants.html { redirect_to(@$1) }\n\ - wants.xml { head :ok }\n\ - else\n\ - wants.html { render :action => \"edit\" }\n\ - wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\ - end\n\ - end\n\ - end${3}\n\ -snippet flash\n\ - flash[:${1:notice}] = \"${2}\"\n\ -snippet habtm\n\ - has_and_belongs_to_many :${1:object}, :join_table => \"${2:table_name}\", :foreign_key => \"${3}_id\"${4}\n\ -snippet hm\n\ - has_many :${1:object}\n\ -snippet hmd\n\ - has_many :${1:other}s, :class_name => \"${2:$1}\", :foreign_key => \"${3:$1}_id\", :dependent => :destroy${4}\n\ -snippet hmt\n\ - has_many :${1:object}, :through => :${2:object}\n\ -snippet ho\n\ - has_one :${1:object}\n\ -snippet i18\n\ - I18n.t('${1:type.key}')${2}\n\ -snippet ist\n\ - <%= image_submit_tag(\"${1:agree.png}\", :id => \"${2:id}\"${3} %>\n\ -snippet log\n\ - Rails.logger.${1:debug} ${2}\n\ -snippet log2\n\ - RAILS_DEFAULT_LOGGER.${1:debug} ${2}\n\ -snippet logd\n\ - logger.debug { \"${1:message}\" }${2}\n\ -snippet loge\n\ - logger.error { \"${1:message}\" }${2}\n\ -snippet logf\n\ - logger.fatal { \"${1:message}\" }${2}\n\ -snippet logi\n\ - logger.info { \"${1:message}\" }${2}\n\ -snippet logw\n\ - logger.warn { \"${1:message}\" }${2}\n\ -snippet mapc\n\ - ${1:map}.${2:connect} '${3:controller/:action/:id}'\n\ -snippet mapca\n\ - ${1:map}.catch_all \"*${2:anything}\", :controller => \"${3:default}\", :action => \"${4:error}\"${5}\n\ -snippet mapr\n\ - ${1:map}.resource :${2:resource}\n\ -snippet maprs\n\ - ${1:map}.resources :${2:resource}\n\ -snippet mapwo\n\ - ${1:map}.with_options :${2:controller} => '${3:thing}' do |$3|\n\ - ${4}\n\ - end\n\ -snippet mbs\n\ - before_save :${1:method}\n\ -snippet mcht\n\ - change_table :${1:table_name} do |t|\n\ - ${2}\n\ - end\n\ -snippet mp\n\ - map(&:${1:id})\n\ -snippet mrw\n\ - mattr_accessor :${1:attr_names}\n\ -snippet oa\n\ - order(\"${1:field}\")\n\ -snippet od\n\ - order(\"${1:field} DESC\")\n\ -snippet pa\n\ - params[:${1:id}]${2}\n\ -snippet ra\n\ - render :action => \"${1:action}\"\n\ -snippet ral\n\ - render :action => \"${1:action}\", :layout => \"${2:layoutname}\"\n\ -snippet rest\n\ - respond_to do |wants|\n\ - wants.${1:html} { ${2} }\n\ - end\n\ -snippet rf\n\ - render :file => \"${1:filepath}\"\n\ -snippet rfu\n\ - render :file => \"${1:filepath}\", :use_full_path => ${2:false}\n\ -snippet ri\n\ - render :inline => \"${1:<%= 'hello' %>}\"\n\ -snippet ril\n\ - render :inline => \"${1:<%= 'hello' %>}\", :locals => { ${2::name} => \"${3:value}\"${4} }\n\ -snippet rit\n\ - render :inline => \"${1:<%= 'hello' %>}\", :type => ${2::rxml}\n\ -snippet rjson\n\ - render :json => ${1:text to render}\n\ -snippet rl\n\ - render :layout => \"${1:layoutname}\"\n\ -snippet rn\n\ - render :nothing => ${1:true}\n\ -snippet rns\n\ - render :nothing => ${1:true}, :status => ${2:401}\n\ -snippet rp\n\ - render :partial => \"${1:item}\"\n\ -snippet rpc\n\ - render :partial => \"${1:item}\", :collection => ${2:@$1s}\n\ -snippet rpl\n\ - render :partial => \"${1:item}\", :locals => { :${2:$1} => ${3:@$1}\n\ -snippet rpo\n\ - render :partial => \"${1:item}\", :object => ${2:@$1}\n\ -snippet rps\n\ - render :partial => \"${1:item}\", :status => ${2:500}\n\ -snippet rt\n\ - render :text => \"${1:text to render}\"\n\ -snippet rtl\n\ - render :text => \"${1:text to render}\", :layout => \"${2:layoutname}\"\n\ -snippet rtlt\n\ - render :text => \"${1:text to render}\", :layout => ${2:true}\n\ -snippet rts\n\ - render :text => \"${1:text to render}\", :status => ${2:401}\n\ -snippet ru\n\ - render :update do |${1:page}|\n\ - $1.${2}\n\ - end\n\ -snippet rxml\n\ - render :xml => ${1:text to render}\n\ -snippet sc\n\ - scope :${1:name}, :where(:@${2:field} => ${3:value})\n\ -snippet sl\n\ - scope :${1:name}, lambda do |${2:value}|\n\ - where(\"${3:field = ?}\", ${4:bind var})\n\ - end\n\ -snippet sha1\n\ - Digest::SHA1.hexdigest(${1:string})\n\ -snippet sweeper\n\ - class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper\n\ - observe $1\n\ -\n\ - def after_save(${2:model_class_name})\n\ - expire_cache($2)\n\ - end\n\ -\n\ - def after_destroy($2)\n\ - expire_cache($2)\n\ - end\n\ -\n\ - def expire_cache($2)\n\ - expire_page\n\ - end\n\ - end\n\ -snippet tcb\n\ - t.boolean :${1:title}\n\ - ${2}\n\ -snippet tcbi\n\ - t.binary :${1:title}, :limit => ${2:2}.megabytes\n\ - ${3}\n\ -snippet tcd\n\ - t.decimal :${1:title}, :precision => ${2:10}, :scale => ${3:2}\n\ - ${4}\n\ -snippet tcda\n\ - t.date :${1:title}\n\ - ${2}\n\ -snippet tcdt\n\ - t.datetime :${1:title}\n\ - ${2}\n\ -snippet tcf\n\ - t.float :${1:title}\n\ - ${2}\n\ -snippet tch\n\ - t.change :${1:name}, :${2:string}, :${3:limit} => ${4:80}\n\ - ${5}\n\ -snippet tci\n\ - t.integer :${1:title}\n\ - ${2}\n\ -snippet tcl\n\ - t.integer :lock_version, :null => false, :default => 0\n\ - ${1}\n\ -snippet tcr\n\ - t.references :${1:taggable}, :polymorphic => { :default => '${2:Photo}' }\n\ - ${3}\n\ -snippet tcs\n\ - t.string :${1:title}\n\ - ${2}\n\ -snippet tct\n\ - t.text :${1:title}\n\ - ${2}\n\ -snippet tcti\n\ - t.time :${1:title}\n\ - ${2}\n\ -snippet tcts\n\ - t.timestamp :${1:title}\n\ - ${2}\n\ -snippet tctss\n\ - t.timestamps\n\ - ${1}\n\ -snippet va\n\ - validates_associated :${1:attribute}\n\ -snippet vao\n\ - validates_acceptance_of :${1:terms}\n\ -snippet vc\n\ - validates_confirmation_of :${1:attribute}\n\ -snippet ve\n\ - validates_exclusion_of :${1:attribute}, :in => ${2:%w( mov avi )}\n\ -snippet vf\n\ - validates_format_of :${1:attribute}, :with => /${2:regex}/\n\ -snippet vi\n\ - validates_inclusion_of :${1:attribute}, :in => %w(${2: mov avi })\n\ -snippet vl\n\ - validates_length_of :${1:attribute}, :within => ${2:3}..${3:20}\n\ -snippet vn\n\ - validates_numericality_of :${1:attribute}\n\ -snippet vpo\n\ - validates_presence_of :${1:attribute}\n\ -snippet vu\n\ - validates_uniqueness_of :${1:attribute}\n\ -snippet wants\n\ - wants.${1:js|xml|html} { ${2} }\n\ -snippet wc\n\ - where(${1:\"conditions\"}${2:, bind_var})\n\ -snippet wh\n\ - where(${1:field} => ${2:value})\n\ -snippet xdelete\n\ - xhr :delete, :${1:destroy}, :id => ${2:1}${3}\n\ -snippet xget\n\ - xhr :get, :${1:show}, :id => ${2:1}${3}\n\ -snippet xpost\n\ - xhr :post, :${1:create}, :${2:object} => { ${3} }\n\ -snippet xput\n\ - xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { ${4} }${5}\n\ -snippet test\n\ - test \"should ${1:do something}\" do\n\ - ${2}\n\ - end\n\ -#migrations\n\ -snippet mac\n\ - add_column :${1:table_name}, :${2:column_name}, :${3:data_type}\n\ -snippet mrc\n\ - remove_column :${1:table_name}, :${2:column_name}\n\ -snippet mrnc\n\ - rename_column :${1:table_name}, :${2:old_column_name}, :${3:new_column_name}\n\ -snippet mcc\n\ - change_column :${1:table}, :${2:column}, :${3:type}\n\ -snippet mccc\n\ - t.column :${1:title}, :${2:string}\n\ -snippet mct\n\ - create_table :${1:table_name} do |t|\n\ - t.column :${2:name}, :${3:type}\n\ - end\n\ -snippet migration\n\ - class ${1:class_name} < ActiveRecord::Migration\n\ - def self.up\n\ - ${2}\n\ - end\n\ -\n\ - def self.down\n\ - end\n\ - end\n\ -\n\ -snippet trc\n\ - t.remove :${1:column}\n\ -snippet tre\n\ - t.rename :${1:old_column_name}, :${2:new_column_name}\n\ - ${3}\n\ -snippet tref\n\ - t.references :${1:model}\n\ -\n\ -#rspec\n\ -snippet it\n\ - it \"${1:spec_name}\" do\n\ - ${2}\n\ - end\n\ -snippet itp\n\ - it \"${1:spec_name}\"\n\ - ${2}\n\ -snippet desc\n\ - describe ${1:class_name} do\n\ - ${2}\n\ - end\n\ -snippet cont\n\ - context \"${1:message}\" do\n\ - ${2}\n\ - end\n\ -snippet bef\n\ - before :${1:each} do\n\ - ${2}\n\ - end\n\ -snippet aft\n\ - after :${1:each} do\n\ - ${2}\n\ - end\n\ -"; -exports.scope = "ruby"; - -}); (function() { - window.require(["ace/snippets/ruby"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/rust.js b/src/ace/snippets/rust.js deleted file mode 100644 index 63d42815a..000000000 --- a/src/ace/snippets/rust.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/rust"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/sass.js b/src/ace/snippets/sass.js deleted file mode 100644 index 0a4de9b44..000000000 --- a/src/ace/snippets/sass.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/sass"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/scad.js b/src/ace/snippets/scad.js deleted file mode 100644 index 2fb082641..000000000 --- a/src/ace/snippets/scad.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/scad"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/scala.js b/src/ace/snippets/scala.js deleted file mode 100644 index adc0abbd4..000000000 --- a/src/ace/snippets/scala.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/scala"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/scheme.js b/src/ace/snippets/scheme.js deleted file mode 100644 index 29c3d3579..000000000 --- a/src/ace/snippets/scheme.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/scheme"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/scrypt.js b/src/ace/snippets/scrypt.js deleted file mode 100644 index 2d0601a10..000000000 --- a/src/ace/snippets/scrypt.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/scrypt"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/scss.js b/src/ace/snippets/scss.js deleted file mode 100644 index 6e808dea9..000000000 --- a/src/ace/snippets/scss.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/scss"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/sh.js b/src/ace/snippets/sh.js deleted file mode 100644 index 6155075e6..000000000 --- a/src/ace/snippets/sh.js +++ /dev/null @@ -1,97 +0,0 @@ -define("ace/snippets/sh",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# Shebang. Executing bash via /usr/bin/env makes scripts more portable.\n\ -snippet #!\n\ - #!/usr/bin/env bash\n\ - \n\ -snippet if\n\ - if [[ ${1:condition} ]]; then\n\ - ${2:#statements}\n\ - fi\n\ -snippet elif\n\ - elif [[ ${1:condition} ]]; then\n\ - ${2:#statements}\n\ -snippet for\n\ - for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do\n\ - ${3:#statements}\n\ - done\n\ -snippet fori\n\ - for ${1:needle} in ${2:haystack} ; do\n\ - ${3:#statements}\n\ - done\n\ -snippet wh\n\ - while [[ ${1:condition} ]]; do\n\ - ${2:#statements}\n\ - done\n\ -snippet until\n\ - until [[ ${1:condition} ]]; do\n\ - ${2:#statements}\n\ - done\n\ -snippet case\n\ - case ${1:word} in\n\ - ${2:pattern})\n\ - ${3};;\n\ - esac\n\ -snippet go \n\ - while getopts '${1:o}' ${2:opts} \n\ - do \n\ - case $$2 in\n\ - ${3:o0})\n\ - ${4:#staments};;\n\ - esac\n\ - done\n\ -# Set SCRIPT_DIR variable to directory script is located.\n\ -snippet sdir\n\ - SCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\ -# getopt\n\ -snippet getopt\n\ - __ScriptVersion=\"${1:version}\"\n\ -\n\ - #=== FUNCTION ================================================================\n\ - # NAME: usage\n\ - # DESCRIPTION: Display usage information.\n\ - #===============================================================================\n\ - function usage ()\n\ - {\n\ - cat <<- EOT\n\ -\n\ - Usage : $${0:0} [options] [--] \n\ -\n\ - Options: \n\ - -h|help Display this message\n\ - -v|version Display script version\n\ -\n\ - EOT\n\ - } # ---------- end of function usage ----------\n\ -\n\ - #-----------------------------------------------------------------------\n\ - # Handle command line arguments\n\ - #-----------------------------------------------------------------------\n\ -\n\ - while getopts \":hv\" opt\n\ - do\n\ - case $opt in\n\ -\n\ - h|help ) usage; exit 0 ;;\n\ -\n\ - v|version ) echo \"$${0:0} -- Version $__ScriptVersion\"; exit 0 ;;\n\ -\n\ - \\? ) echo -e \"\\n Option does not exist : $OPTARG\\n\"\n\ - usage; exit 1 ;;\n\ -\n\ - esac # --- end of case ---\n\ - done\n\ - shift $(($OPTIND-1))\n\ -\n\ -"; -exports.scope = "sh"; - -}); (function() { - window.require(["ace/snippets/sh"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/sjs.js b/src/ace/snippets/sjs.js deleted file mode 100644 index bc8c18720..000000000 --- a/src/ace/snippets/sjs.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/sjs"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/slim.js b/src/ace/snippets/slim.js deleted file mode 100644 index 2fcd039ac..000000000 --- a/src/ace/snippets/slim.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/slim"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/smarty.js b/src/ace/snippets/smarty.js deleted file mode 100644 index 3affd2eac..000000000 --- a/src/ace/snippets/smarty.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/smarty"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/smithy.js b/src/ace/snippets/smithy.js deleted file mode 100644 index 4077f9eee..000000000 --- a/src/ace/snippets/smithy.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/smithy"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/snippets.js b/src/ace/snippets/snippets.js deleted file mode 100644 index 137aa82a8..000000000 --- a/src/ace/snippets/snippets.js +++ /dev/null @@ -1,23 +0,0 @@ -define("ace/snippets/snippets",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# snippets for making snippets :)\n\ -snippet snip\n\ - snippet ${1:trigger}\n\ - ${2}\n\ -snippet msnip\n\ - snippet ${1:trigger} ${2:description}\n\ - ${3}\n\ -snippet v\n\ - {VISUAL}\n\ -"; -exports.scope = "snippets"; - -}); (function() { - window.require(["ace/snippets/snippets"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/soy_template.js b/src/ace/snippets/soy_template.js deleted file mode 100644 index c74096586..000000000 --- a/src/ace/snippets/soy_template.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/soy_template"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/space.js b/src/ace/snippets/space.js deleted file mode 100644 index 8f4859770..000000000 --- a/src/ace/snippets/space.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/space"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/sparql.js b/src/ace/snippets/sparql.js deleted file mode 100644 index fe60397ed..000000000 --- a/src/ace/snippets/sparql.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/sparql"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/sql.js b/src/ace/snippets/sql.js deleted file mode 100644 index 944b0391b..000000000 --- a/src/ace/snippets/sql.js +++ /dev/null @@ -1,40 +0,0 @@ -define("ace/snippets/sql",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet tbl\n\ - create table ${1:table} (\n\ - ${2:columns}\n\ - );\n\ -snippet col\n\ - ${1:name} ${2:type} ${3:default ''} ${4:not null}\n\ -snippet ccol\n\ - ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\n\ -snippet ncol\n\ - ${1:name} number ${3:default 0} ${4:not null}\n\ -snippet dcol\n\ - ${1:name} date ${3:default sysdate} ${4:not null}\n\ -snippet ind\n\ - create index ${3:$1_$2} on ${1:table}(${2:column});\n\ -snippet uind\n\ - create unique index ${1:name} on ${2:table}(${3:column});\n\ -snippet tblcom\n\ - comment on table ${1:table} is '${2:comment}';\n\ -snippet colcom\n\ - comment on column ${1:table}.${2:column} is '${3:comment}';\n\ -snippet addcol\n\ - alter table ${1:table} add (${2:column} ${3:type});\n\ -snippet seq\n\ - create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\n\ -snippet s*\n\ - select * from ${1:table}\n\ -"; -exports.scope = "sql"; - -}); (function() { - window.require(["ace/snippets/sql"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/sqlserver.js b/src/ace/snippets/sqlserver.js deleted file mode 100644 index ba3db1f40..000000000 --- a/src/ace/snippets/sqlserver.js +++ /dev/null @@ -1,83 +0,0 @@ -define("ace/snippets/sqlserver",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# ISNULL\n\ -snippet isnull\n\ - ISNULL(${1:check_expression}, ${2:replacement_value})\n\ -# FORMAT\n\ -snippet format\n\ - FORMAT(${1:value}, ${2:format})\n\ -# CAST\n\ -snippet cast\n\ - CAST(${1:expression} AS ${2:data_type})\n\ -# CONVERT\n\ -snippet convert\n\ - CONVERT(${1:data_type}, ${2:expression})\n\ -# DATEPART\n\ -snippet datepart\n\ - DATEPART(${1:datepart}, ${2:date})\n\ -# DATEDIFF\n\ -snippet datediff\n\ - DATEDIFF(${1:datepart}, ${2:startdate}, ${3:enddate})\n\ -# DATEADD\n\ -snippet dateadd\n\ - DATEADD(${1:datepart}, ${2:number}, ${3:date})\n\ -# DATEFROMPARTS \n\ -snippet datefromparts\n\ - DATEFROMPARTS(${1:year}, ${2:month}, ${3:day})\n\ -# OBJECT_DEFINITION\n\ -snippet objectdef\n\ - SELECT OBJECT_DEFINITION(OBJECT_ID('${1:sys.server_permissions /*object name*/}'))\n\ -# STUFF XML\n\ -snippet stuffxml\n\ - STUFF((SELECT ', ' + ${1:ColumnName}\n\ - FROM ${2:TableName}\n\ - WHERE ${3:WhereClause}\n\ - FOR XML PATH('')), 1, 1, '') AS ${4:Alias}\n\ - ${5:/*https://msdn.microsoft.com/en-us/library/ms188043.aspx*/}\n\ -# Create Procedure\n\ -snippet createproc\n\ - -- =============================================\n\ - -- Author: ${1:Author}\n\ - -- Create date: ${2:Date}\n\ - -- Description: ${3:Description}\n\ - -- =============================================\n\ - CREATE PROCEDURE ${4:Procedure_Name}\n\ - ${5:/*Add the parameters for the stored procedure here*/}\n\ - AS\n\ - BEGIN\n\ - -- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.\n\ - SET NOCOUNT ON;\n\ - \n\ - ${6:/*Add the T-SQL statements to compute the return value here*/}\n\ - \n\ - END\n\ - GO\n\ -# Create Scalar Function\n\ -snippet createfn\n\ - -- =============================================\n\ - -- Author: ${1:Author}\n\ - -- Create date: ${2:Date}\n\ - -- Description: ${3:Description}\n\ - -- =============================================\n\ - CREATE FUNCTION ${4:Scalar_Function_Name}\n\ - -- Add the parameters for the function here\n\ - RETURNS ${5:Function_Data_Type}\n\ - AS\n\ - BEGIN\n\ - DECLARE @Result ${5:Function_Data_Type}\n\ - \n\ - ${6:/*Add the T-SQL statements to compute the return value here*/}\n\ - \n\ - END\n\ - GO"; -exports.scope = "sqlserver"; - -}); (function() { - window.require(["ace/snippets/sqlserver"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/stylus.js b/src/ace/snippets/stylus.js deleted file mode 100644 index 34f1d7141..000000000 --- a/src/ace/snippets/stylus.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/stylus"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/svg.js b/src/ace/snippets/svg.js deleted file mode 100644 index 1aa4a8502..000000000 --- a/src/ace/snippets/svg.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/svg"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/swift.js b/src/ace/snippets/swift.js deleted file mode 100644 index 143e32b7a..000000000 --- a/src/ace/snippets/swift.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/swift"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/tcl.js b/src/ace/snippets/tcl.js deleted file mode 100644 index c18242058..000000000 --- a/src/ace/snippets/tcl.js +++ /dev/null @@ -1,106 +0,0 @@ -define("ace/snippets/tcl",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# #!/usr/bin/env tclsh\n\ -snippet #!\n\ - #!/usr/bin/env tclsh\n\ - \n\ -# Process\n\ -snippet pro\n\ - proc ${1:function_name} {${2:args}} {\n\ - ${3:#body ...}\n\ - }\n\ -#xif\n\ -snippet xif\n\ - ${1:expr}? ${2:true} : ${3:false}\n\ -# Conditional\n\ -snippet if\n\ - if {${1}} {\n\ - ${2:# body...}\n\ - }\n\ -# Conditional if..else\n\ -snippet ife\n\ - if {${1}} {\n\ - ${2:# body...}\n\ - } else {\n\ - ${3:# else...}\n\ - }\n\ -# Conditional if..elsif..else\n\ -snippet ifee\n\ - if {${1}} {\n\ - ${2:# body...}\n\ - } elseif {${3}} {\n\ - ${4:# elsif...}\n\ - } else {\n\ - ${5:# else...}\n\ - }\n\ -# If catch then\n\ -snippet ifc\n\ - if { [catch {${1:#do something...}} ${2:err}] } {\n\ - ${3:# handle failure...}\n\ - }\n\ -# Catch\n\ -snippet catch\n\ - catch {${1}} ${2:err} ${3:options}\n\ -# While Loop\n\ -snippet wh\n\ - while {${1}} {\n\ - ${2:# body...}\n\ - }\n\ -# For Loop\n\ -snippet for\n\ - for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} {\n\ - ${4:# body...}\n\ - }\n\ -# Foreach Loop\n\ -snippet fore\n\ - foreach ${1:x} {${2:#list}} {\n\ - ${3:# body...}\n\ - }\n\ -# after ms script...\n\ -snippet af\n\ - after ${1:ms} ${2:#do something}\n\ -# after cancel id\n\ -snippet afc\n\ - after cancel ${1:id or script}\n\ -# after idle\n\ -snippet afi\n\ - after idle ${1:script}\n\ -# after info id\n\ -snippet afin\n\ - after info ${1:id}\n\ -# Expr\n\ -snippet exp\n\ - expr {${1:#expression here}}\n\ -# Switch\n\ -snippet sw\n\ - switch ${1:var} {\n\ - ${3:pattern 1} {\n\ - ${4:#do something}\n\ - }\n\ - default {\n\ - ${2:#do something}\n\ - }\n\ - }\n\ -# Case\n\ -snippet ca\n\ - ${1:pattern} {\n\ - ${2:#do something}\n\ - }${3}\n\ -# Namespace eval\n\ -snippet ns\n\ - namespace eval ${1:path} {${2:#script...}}\n\ -# Namespace current\n\ -snippet nsc\n\ - namespace current\n\ -"; -exports.scope = "tcl"; - -}); (function() { - window.require(["ace/snippets/tcl"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/terraform.js b/src/ace/snippets/terraform.js deleted file mode 100644 index c9d8d31d6..000000000 --- a/src/ace/snippets/terraform.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/terraform"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/tex.js b/src/ace/snippets/tex.js deleted file mode 100644 index a76dfe732..000000000 --- a/src/ace/snippets/tex.js +++ /dev/null @@ -1,204 +0,0 @@ -define("ace/snippets/tex",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "#PREAMBLE\n\ -#newcommand\n\ -snippet nc\n\ - \\newcommand{\\${1:cmd}}[${2:opt}]{${3:realcmd}}${4}\n\ -#usepackage\n\ -snippet up\n\ - \\usepackage[${1:[options}]{${2:package}}\n\ -#newunicodechar\n\ -snippet nuc\n\ - \\newunicodechar{${1}}{${2:\\ensuremath}${3:tex-substitute}}}\n\ -#DeclareMathOperator\n\ -snippet dmo\n\ - \\DeclareMathOperator{${1}}{${2}}\n\ -\n\ -#DOCUMENT\n\ -# \\begin{}...\\end{}\n\ -snippet begin\n\ - \\begin{${1:env}}\n\ - ${2}\n\ - \\end{$1}\n\ -# Tabular\n\ -snippet tab\n\ - \\begin{${1:tabular}}{${2:c}}\n\ - ${3}\n\ - \\end{$1}\n\ -snippet thm\n\ - \\begin[${1:author}]{${2:thm}}\n\ - ${3}\n\ - \\end{$1}\n\ -snippet center\n\ - \\begin{center}\n\ - ${1}\n\ - \\end{center}\n\ -# Align(ed)\n\ -snippet ali\n\ - \\begin{align${1:ed}}\n\ - ${2}\n\ - \\end{align$1}\n\ -# Gather(ed)\n\ -snippet gat\n\ - \\begin{gather${1:ed}}\n\ - ${2}\n\ - \\end{gather$1}\n\ -# Equation\n\ -snippet eq\n\ - \\begin{equation}\n\ - ${1}\n\ - \\end{equation}\n\ -# Equation\n\ -snippet eq*\n\ - \\begin{equation*}\n\ - ${1}\n\ - \\end{equation*}\n\ -# Unnumbered Equation\n\ -snippet \\\n\ - \\[\n\ - ${1}\n\ - \\]\n\ -# Enumerate\n\ -snippet enum\n\ - \\begin{enumerate}\n\ - \\item ${1}\n\ - \\end{enumerate}\n\ -# Itemize\n\ -snippet itemize\n\ - \\begin{itemize}\n\ - \\item ${1}\n\ - \\end{itemize}\n\ -# Description\n\ -snippet desc\n\ - \\begin{description}\n\ - \\item[${1}] ${2}\n\ - \\end{description}\n\ -# Matrix\n\ -snippet mat\n\ - \\begin{${1:p/b/v/V/B/small}matrix}\n\ - ${2}\n\ - \\end{$1matrix}\n\ -# Cases\n\ -snippet cas\n\ - \\begin{cases}\n\ - ${1:equation}, &\\text{ if }${2:case}\\\\\n\ - ${3}\n\ - \\end{cases}\n\ -# Split\n\ -snippet spl\n\ - \\begin{split}\n\ - ${1}\n\ - \\end{split}\n\ -# Part\n\ -snippet part\n\ - \\part{${1:part name}} % (fold)\n\ - \\label{prt:${2:$1}}\n\ - ${3}\n\ - % part $2 (end)\n\ -# Chapter\n\ -snippet cha\n\ - \\chapter{${1:chapter name}}\n\ - \\label{cha:${2:$1}}\n\ - ${3}\n\ -# Section\n\ -snippet sec\n\ - \\section{${1:section name}}\n\ - \\label{sec:${2:$1}}\n\ - ${3}\n\ -# Sub Section\n\ -snippet sub\n\ - \\subsection{${1:subsection name}}\n\ - \\label{sub:${2:$1}}\n\ - ${3}\n\ -# Sub Sub Section\n\ -snippet subs\n\ - \\subsubsection{${1:subsubsection name}}\n\ - \\label{ssub:${2:$1}}\n\ - ${3}\n\ -# Paragraph\n\ -snippet par\n\ - \\paragraph{${1:paragraph name}}\n\ - \\label{par:${2:$1}}\n\ - ${3}\n\ -# Sub Paragraph\n\ -snippet subp\n\ - \\subparagraph{${1:subparagraph name}}\n\ - \\label{subp:${2:$1}}\n\ - ${3}\n\ -#References\n\ -snippet itd\n\ - \\item[${1:description}] ${2:item}\n\ -snippet figure\n\ - ${1:Figure}~\\ref{${2:fig:}}${3}\n\ -snippet table\n\ - ${1:Table}~\\ref{${2:tab:}}${3}\n\ -snippet listing\n\ - ${1:Listing}~\\ref{${2:list}}${3}\n\ -snippet section\n\ - ${1:Section}~\\ref{${2:sec:}}${3}\n\ -snippet page\n\ - ${1:page}~\\pageref{${2}}${3}\n\ -snippet index\n\ - \\index{${1:index}}${2}\n\ -#Citations\n\ -snippet cite\n\ - \\cite[${1}]{${2}}${3}\n\ -snippet fcite\n\ - \\footcite[${1}]{${2}}${3}\n\ -#Formating text: italic, bold, underline, small capital, emphase ..\n\ -snippet it\n\ - \\textit{${1:text}}\n\ -snippet bf\n\ - \\textbf{${1:text}}\n\ -snippet under\n\ - \\underline{${1:text}}\n\ -snippet emp\n\ - \\emph{${1:text}}\n\ -snippet sc\n\ - \\textsc{${1:text}}\n\ -#Choosing font\n\ -snippet sf\n\ - \\textsf{${1:text}}\n\ -snippet rm\n\ - \\textrm{${1:text}}\n\ -snippet tt\n\ - \\texttt{${1:text}}\n\ -#misc\n\ -snippet ft\n\ - \\footnote{${1:text}}\n\ -snippet fig\n\ - \\begin{figure}\n\ - \\begin{center}\n\ - \\includegraphics[scale=${1}]{Figures/${2}}\n\ - \\end{center}\n\ - \\caption{${3}}\n\ - \\label{fig:${4}}\n\ - \\end{figure}\n\ -snippet tikz\n\ - \\begin{figure}\n\ - \\begin{center}\n\ - \\begin{tikzpicture}[scale=${1:1}]\n\ - ${2}\n\ - \\end{tikzpicture}\n\ - \\end{center}\n\ - \\caption{${3}}\n\ - \\label{fig:${4}}\n\ - \\end{figure}\n\ -#math\n\ -snippet stackrel\n\ - \\stackrel{${1:above}}{${2:below}} ${3}\n\ -snippet frac\n\ - \\frac{${1:num}}{${2:denom}}\n\ -snippet sum\n\ - \\sum^{${1:n}}_{${2:i=1}}{${3}}"; -exports.scope = "tex"; - -}); (function() { - window.require(["ace/snippets/tex"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/text.js b/src/ace/snippets/text.js deleted file mode 100644 index 85b4d10e5..000000000 --- a/src/ace/snippets/text.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/text"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/textile.js b/src/ace/snippets/textile.js deleted file mode 100644 index 56088f291..000000000 --- a/src/ace/snippets/textile.js +++ /dev/null @@ -1,44 +0,0 @@ -define("ace/snippets/textile",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# Jekyll post header\n\ -snippet header\n\ - ---\n\ - title: ${1:title}\n\ - layout: post\n\ - date: ${2:date} ${3:hour:minute:second} -05:00\n\ - ---\n\ -\n\ -# Image\n\ -snippet img\n\ - !${1:url}(${2:title}):${3:link}!\n\ -\n\ -# Table\n\ -snippet |\n\ - |${1}|${2}\n\ -\n\ -# Link\n\ -snippet link\n\ - \"${1:link text}\":${2:url}\n\ -\n\ -# Acronym\n\ -snippet (\n\ - (${1:Expand acronym})${2}\n\ -\n\ -# Footnote\n\ -snippet fn\n\ - [${1:ref number}] ${3}\n\ -\n\ - fn$1. ${2:footnote}\n\ - \n\ -"; -exports.scope = "textile"; - -}); (function() { - window.require(["ace/snippets/textile"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/toml.js b/src/ace/snippets/toml.js deleted file mode 100644 index e585672c2..000000000 --- a/src/ace/snippets/toml.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/toml"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/tsx.js b/src/ace/snippets/tsx.js deleted file mode 100644 index f0456fdd9..000000000 --- a/src/ace/snippets/tsx.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/tsx"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/turtle.js b/src/ace/snippets/turtle.js deleted file mode 100644 index 7e0a30cec..000000000 --- a/src/ace/snippets/turtle.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/turtle"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/twig.js b/src/ace/snippets/twig.js deleted file mode 100644 index 2cec7aaa7..000000000 --- a/src/ace/snippets/twig.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/twig"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/typescript.js b/src/ace/snippets/typescript.js deleted file mode 100644 index 27dc42bf1..000000000 --- a/src/ace/snippets/typescript.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/typescript"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/vala.js b/src/ace/snippets/vala.js deleted file mode 100644 index d99c0af10..000000000 --- a/src/ace/snippets/vala.js +++ /dev/null @@ -1,200 +0,0 @@ -define("ace/snippets/vala",["require","exports","module"], function(require, exports, module) { -"use strict"; -exports.snippets = [ - { - "content": "case ${1:condition}:\n\t$0\n\tbreak;\n", - "name": "case", - "scope": "vala", - "tabTrigger": "case" - }, - { - "content": "/**\n * ${6}\n */\n${1:public} class ${2:MethodName}${3: : GLib.Object} {\n\n\t/**\n\t * ${7}\n\t */\n\tpublic ${2}(${4}) {\n\t\t${5}\n\t}\n\n\t$0\n}", - "name": "class", - "scope": "vala", - "tabTrigger": "class" - }, - { - "content": "(${1}) => {\n\t${0}\n}\n", - "name": "closure", - "scope": "vala", - "tabTrigger": "=>" - }, - { - "content": "/*\n * $0\n */", - "name": "Comment (multiline)", - "scope": "vala", - "tabTrigger": "/*" - }, - { - "content": "Console.WriteLine($1);\n$0", - "name": "Console.WriteLine (writeline)", - "scope": "vala", - "tabTrigger": "writeline" - }, - { - "content": "[DBus(name = \"$0\")]", - "name": "DBus annotation", - "scope": "vala", - "tabTrigger": "[DBus" - }, - { - "content": "delegate ${1:void} ${2:DelegateName}($0);", - "name": "delegate", - "scope": "vala", - "tabTrigger": "delegate" - }, - { - "content": "do {\n\t$0\n} while ($1);\n", - "name": "do while", - "scope": "vala", - "tabTrigger": "dowhile" - }, - { - "content": "/**\n * $0\n */", - "name": "DocBlock", - "scope": "vala", - "tabTrigger": "/**" - }, - { - "content": "else if ($1) {\n\t$0\n}\n", - "name": "else if (elseif)", - "scope": "vala", - "tabTrigger": "elseif" - }, - { - "content": "else {\n\t$0\n}", - "name": "else", - "scope": "vala", - "tabTrigger": "else" - }, - { - "content": "enum {$1:EnumName} {\n\t$0\n}", - "name": "enum", - "scope": "vala", - "tabTrigger": "enum" - }, - { - "content": "public errordomain ${1:Error} {\n\t$0\n}", - "name": "error domain", - "scope": "vala", - "tabTrigger": "errordomain" - }, - { - "content": "for ($1;$2;$3) {\n\t$0\n}", - "name": "for", - "scope": "vala", - "tabTrigger": "for" - }, - { - "content": "foreach ($1 in $2) {\n\t$0\n}", - "name": "foreach", - "scope": "vala", - "tabTrigger": "foreach" - }, - { - "content": "Gee.ArrayList<${1:G}>($0);", - "name": "Gee.ArrayList", - "scope": "vala", - "tabTrigger": "ArrayList" - }, - { - "content": "Gee.HashMap<${1:K},${2:V}>($0);", - "name": "Gee.HashMap", - "scope": "vala", - "tabTrigger": "HashMap" - }, - { - "content": "Gee.HashSet<${1:G}>($0);", - "name": "Gee.HashSet", - "scope": "vala", - "tabTrigger": "HashSet" - }, - { - "content": "if ($1) {\n\t$0\n}", - "name": "if", - "scope": "vala", - "tabTrigger": "if" - }, - { - "content": "interface ${1:InterfaceName}{$2: : SuperInterface} {\n\t$0\n}", - "name": "interface", - "scope": "vala", - "tabTrigger": "interface" - }, - { - "content": "public static int main(string [] argv) {\n\t${0}\n\treturn 0;\n}", - "name": "Main function", - "scope": "vala", - "tabTrigger": "main" - }, - { - "content": "namespace $1 {\n\t$0\n}\n", - "name": "namespace (ns)", - "scope": "vala", - "tabTrigger": "ns" - }, - { - "content": "stdout.printf($0);", - "name": "printf", - "scope": "vala", - "tabTrigger": "printf" - }, - { - "content": "${1:public} ${2:Type} ${3:Name} {\n\tset {\n\t\t$0\n\t}\n\tget {\n\n\t}\n}", - "name": "property (prop)", - "scope": "vala", - "tabTrigger": "prop" - }, - { - "content": "${1:public} ${2:Type} ${3:Name} {\n\tget {\n\t\t$0\n\t}\n}", - "name": "read-only property (roprop)", - "scope": "vala", - "tabTrigger": "roprop" - }, - { - "content": "@\"${1:\\$var}\"", - "name": "String template (@)", - "scope": "vala", - "tabTrigger": "@" - }, - { - "content": "struct ${1:StructName} {\n\t$0\n}", - "name": "struct", - "scope": "vala", - "tabTrigger": "struct" - }, - { - "content": "switch ($1) {\n\t$0\n}", - "name": "switch", - "scope": "vala", - "tabTrigger": "switch" - }, - { - "content": "try {\n\t$2\n} catch (${1:Error} e) {\n\t$0\n}", - "name": "try/catch", - "scope": "vala", - "tabTrigger": "try" - }, - { - "content": "\"\"\"$0\"\"\";", - "name": "Verbatim string (\"\"\")", - "scope": "vala", - "tabTrigger": "verbatim" - }, - { - "content": "while ($1) {\n\t$0\n}", - "name": "while", - "scope": "vala", - "tabTrigger": "while" - } -]; -exports.scope = ""; - -}); (function() { - window.require(["ace/snippets/vala"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/vbscript.js b/src/ace/snippets/vbscript.js deleted file mode 100644 index 637e51913..000000000 --- a/src/ace/snippets/vbscript.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/vbscript"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/velocity.js b/src/ace/snippets/velocity.js deleted file mode 100644 index bda0443ca..000000000 --- a/src/ace/snippets/velocity.js +++ /dev/null @@ -1,43 +0,0 @@ -define("ace/snippets/velocity",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# macro\n\ -snippet #macro\n\ - #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n\ - ${3:## macro code}\n\ - #end\n\ -# foreach\n\ -snippet #foreach\n\ - #foreach ( ${1:\\$item} in ${2:\\$collection} )\n\ - ${3:## foreach code}\n\ - #end\n\ -# if\n\ -snippet #if\n\ - #if ( ${1:true} )\n\ - ${0}\n\ - #end\n\ -# if ... else\n\ -snippet #ife\n\ - #if ( ${1:true} )\n\ - ${2}\n\ - #else\n\ - ${0}\n\ - #end\n\ -#import\n\ -snippet #import\n\ - #import ( \"${1:path/to/velocity/format}\" )\n\ -# set\n\ -snippet #set\n\ - #set ( $${1:var} = ${0} )\n\ -"; -exports.scope = "velocity"; -exports.includeScopes = ["html", "javascript", "css"]; - -}); (function() { - window.require(["ace/snippets/velocity"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/verilog.js b/src/ace/snippets/verilog.js deleted file mode 100644 index d824e8463..000000000 --- a/src/ace/snippets/verilog.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/verilog"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/vhdl.js b/src/ace/snippets/vhdl.js deleted file mode 100644 index 015c2fbf3..000000000 --- a/src/ace/snippets/vhdl.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/vhdl"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/visualforce.js b/src/ace/snippets/visualforce.js deleted file mode 100644 index 135cf6bde..000000000 --- a/src/ace/snippets/visualforce.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/visualforce"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/wollok.js b/src/ace/snippets/wollok.js deleted file mode 100644 index c01674ccd..000000000 --- a/src/ace/snippets/wollok.js +++ /dev/null @@ -1,98 +0,0 @@ -define("ace/snippets/wollok",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "##\n\ -## Basic Java packages and import\n\ -snippet im\n\ - import\n\ -snippet w.l\n\ - wollok.lang\n\ -snippet w.i\n\ - wollok.lib\n\ -\n\ -## Class and object\n\ -snippet cl\n\ - class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\ -snippet obj\n\ - object ${1:`Filename(\"\", \"untitled\")`} ${2:inherits Parent}${3}\n\ -snippet te\n\ - test ${1:`Filename(\"\", \"untitled\")`}\n\ -\n\ -##\n\ -## Enhancements\n\ -snippet inh\n\ - inherits\n\ -\n\ -##\n\ -## Comments\n\ -snippet /*\n\ - /*\n\ - * ${1}\n\ - */\n\ -\n\ -##\n\ -## Control Statements\n\ -snippet el\n\ - else\n\ -snippet if\n\ - if (${1}) ${2}\n\ -\n\ -##\n\ -## Create a Method\n\ -snippet m\n\ - method ${1:method}(${2}) ${5}\n\ -\n\ -## \n\ -## Tests\n\ -snippet as\n\ - assert.equals(${1:expected}, ${2:actual})\n\ -\n\ -##\n\ -## Exceptions\n\ -snippet ca\n\ - catch ${1:e} : (${2:Exception} ) ${3}\n\ -snippet thr\n\ - throw\n\ -snippet try\n\ - try {\n\ - ${3}\n\ - } catch ${1:e} : ${2:Exception} {\n\ - }\n\ -\n\ -##\n\ -## Javadocs\n\ -snippet /**\n\ - /**\n\ - * ${1}\n\ - */\n\ -\n\ -##\n\ -## Print Methods\n\ -snippet print\n\ - console.println(\"${1:Message}\")\n\ -\n\ -##\n\ -## Setter and Getter Methods\n\ -snippet set\n\ - method set${1:}(${2:}) {\n\ - $1 = $2\n\ - }\n\ -snippet get\n\ - method get${1:}() {\n\ - return ${1:};\n\ - }\n\ -\n\ -##\n\ -## Terminate Methods or Loops\n\ -snippet re\n\ - return"; -exports.scope = "wollok"; - -}); (function() { - window.require(["ace/snippets/wollok"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/xml.js b/src/ace/snippets/xml.js deleted file mode 100644 index 927c66597..000000000 --- a/src/ace/snippets/xml.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/xml"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/xquery.js b/src/ace/snippets/xquery.js deleted file mode 100644 index 969b6a426..000000000 --- a/src/ace/snippets/xquery.js +++ /dev/null @@ -1,75 +0,0 @@ -define("ace/snippets/xquery",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet for\n\ - for $${1:item} in ${2:expr}\n\ -snippet return\n\ - return ${1:expr}\n\ -snippet import\n\ - import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\ -snippet some\n\ - some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ -snippet every\n\ - every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\ -snippet if\n\ - if(${1:true}) then ${2:expr} else ${3:true}\n\ -snippet switch\n\ - switch(${1:\"foo\"})\n\ - case ${2:\"foo\"}\n\ - return ${3:true}\n\ - default return ${4:false}\n\ -snippet try\n\ - try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\ -snippet tumbling\n\ - for tumbling window $${1:varname} in ${2:expr}\n\ - start at $${3:start} when ${4:expr}\n\ - end at $${5:end} when ${6:expr}\n\ - return ${7:expr}\n\ -snippet sliding\n\ - for sliding window $${1:varname} in ${2:expr}\n\ - start at $${3:start} when ${4:expr}\n\ - end at $${5:end} when ${6:expr}\n\ - return ${7:expr}\n\ -snippet let\n\ - let $${1:varname} := ${2:expr}\n\ -snippet group\n\ - group by $${1:varname} := ${2:expr}\n\ -snippet order\n\ - order by ${1:expr} ${2:descending}\n\ -snippet stable\n\ - stable order by ${1:expr}\n\ -snippet count\n\ - count $${1:varname}\n\ -snippet ordered\n\ - ordered { ${1:expr} }\n\ -snippet unordered\n\ - unordered { ${1:expr} }\n\ -snippet treat \n\ - treat as ${1:expr}\n\ -snippet castable\n\ - castable as ${1:atomicType}\n\ -snippet cast\n\ - cast as ${1:atomicType}\n\ -snippet typeswitch\n\ - typeswitch(${1:expr})\n\ - case ${2:type} return ${3:expr}\n\ - default return ${4:expr}\n\ -snippet var\n\ - declare variable $${1:varname} := ${2:expr};\n\ -snippet fn\n\ - declare function ${1:ns}:${2:name}(){\n\ - ${3:expr}\n\ - };\n\ -snippet module\n\ - module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\ -"; -exports.scope = "xquery"; - -}); (function() { - window.require(["ace/snippets/xquery"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/yaml.js b/src/ace/snippets/yaml.js deleted file mode 100644 index 13a274dc8..000000000 --- a/src/ace/snippets/yaml.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/yaml"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/snippets/zeek.js b/src/ace/snippets/zeek.js deleted file mode 100644 index a1fc7cdff..000000000 --- a/src/ace/snippets/zeek.js +++ /dev/null @@ -1,9 +0,0 @@ - -; (function() { - window.require(["ace/snippets/zeek"], function(m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); - })(); - \ No newline at end of file diff --git a/src/ace/supportedModes.js b/src/ace/supportedModes.js new file mode 100644 index 000000000..e0134a1d8 --- /dev/null +++ b/src/ace/supportedModes.js @@ -0,0 +1,220 @@ +import { addMode } from "./modelist"; + +const modeList = { + 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_x86: "asm|a", + Assembly_arm32: "s", + Astro: "astro", + AutoHotKey: "ahk", + Basic: "bas", + BatchFile: "bat|cmd", + BibTeX: "bib", + C_Cpp: "cpp|c|cc|cxx|h|hh|hpp|ino", + C9Search: "c9search_results", + Cirru: "cirru|cr", + Clojure: "clj|cljs", + Clue: "clue", + 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", + CSV: "csv", + Curly: "curly", + Cuttlefish: "conf", + D: "d|di", + Dart: "dart", + Diff: "diff|patch", + Dockerfile: "^Dockerfile", + Dot: "dot", + Drools: "drl", + Edifact: "edi", + Eiffel: "e|ge", + EJS: "ejs", + Elixir: "ex|exs", + Elm: "elm", + Erlang: "erl|hrl", + Forth: "frt|fs|ldr|fth|4th", + Fortran: "f|f90", + FSharp: "fsi|fs|ml|mli|fsx|fsscript", + FSL: "fsl", + FTL: "ftl", + Flix: "flix", + 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|jsx|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", + Puppet: "epp|pp", + Python: "py", + PRQL: "prql", + 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", + TSV: "TSV", + TSX: "tsx", + Turtle: "ttl", + Twig: "twig|swig", + Typescript: "ts|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", + Django: "html", +}; + +const languageNames = { + ObjectiveC: "Objective-C", + CSharp: "C#", + golang: "Go", + C_Cpp: "C/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", +}; + +Object.keys(modeList).forEach((key) => { + const extensions = modeList[key]; + const caption = languageNames[key]; + + addMode(key, extensions, caption); +}); diff --git a/src/ace/theme-ambiance.js b/src/ace/theme-ambiance.js deleted file mode 100644 index 0830aed50..000000000 --- a/src/ace/theme-ambiance.js +++ /dev/null @@ -1,185 +0,0 @@ -define("ace/theme/ambiance",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-ambiance"; -exports.cssText = ".ace-ambiance .ace_gutter {\ -background-color: #3d3d3d;\ -background-image: linear-gradient(left, #3D3D3D, #333);\ -background-repeat: repeat-x;\ -border-right: 1px solid #4d4d4d;\ -text-shadow: 0px 1px 1px #4d4d4d;\ -color: #222;\ -}\ -.ace-ambiance .ace_gutter-layer {\ -background: repeat left top;\ -}\ -.ace-ambiance .ace_gutter-active-line {\ -background-color: #3F3F3F;\ -}\ -.ace-ambiance .ace_fold-widget {\ -text-align: center;\ -}\ -.ace-ambiance .ace_fold-widget:hover {\ -color: #777;\ -}\ -.ace-ambiance .ace_fold-widget.ace_start,\ -.ace-ambiance .ace_fold-widget.ace_end,\ -.ace-ambiance .ace_fold-widget.ace_closed{\ -background: none !important;\ -border: none;\ -box-shadow: none;\ -}\ -.ace-ambiance .ace_fold-widget.ace_start:after {\ -content: '▾'\ -}\ -.ace-ambiance .ace_fold-widget.ace_end:after {\ -content: '▴'\ -}\ -.ace-ambiance .ace_fold-widget.ace_closed:after {\ -content: '‣'\ -}\ -.ace-ambiance .ace_print-margin {\ -border-left: 1px dotted #2D2D2D;\ -right: 0;\ -background: #262626;\ -}\ -.ace-ambiance .ace_scroller {\ --webkit-box-shadow: inset 0 0 10px black;\ --moz-box-shadow: inset 0 0 10px black;\ --o-box-shadow: inset 0 0 10px black;\ -box-shadow: inset 0 0 10px black;\ -}\ -.ace-ambiance {\ -color: #E6E1DC;\ -background-color: #202020;\ -}\ -.ace-ambiance .ace_cursor {\ -border-left: 1px solid #7991E8;\ -}\ -.ace-ambiance .ace_overwrite-cursors .ace_cursor {\ -border: 1px solid #FFE300;\ -background: #766B13;\ -}\ -.ace-ambiance.normal-mode .ace_cursor-layer {\ -z-index: 0;\ -}\ -.ace-ambiance .ace_marker-layer .ace_selection {\ -background: rgba(221, 240, 255, 0.20);\ -}\ -.ace-ambiance .ace_marker-layer .ace_selected-word {\ -border-radius: 4px;\ -border: 8px solid #3f475d;\ -box-shadow: 0 0 4px black;\ -}\ -.ace-ambiance .ace_marker-layer .ace_step {\ -background: rgb(198, 219, 174);\ -}\ -.ace-ambiance .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(255, 255, 255, 0.25);\ -}\ -.ace-ambiance .ace_marker-layer .ace_active-line {\ -background: rgba(255, 255, 255, 0.031);\ -}\ -.ace-ambiance .ace_invisible {\ -color: #333;\ -}\ -.ace-ambiance .ace_paren {\ -color: #24C2C7;\ -}\ -.ace-ambiance .ace_keyword {\ -color: #cda869;\ -}\ -.ace-ambiance .ace_keyword.ace_operator {\ -color: #fa8d6a;\ -}\ -.ace-ambiance .ace_punctuation.ace_operator {\ -color: #fa8d6a;\ -}\ -.ace-ambiance .ace_identifier {\ -}\ -.ace-ambiance .ace-statement {\ -color: #cda869;\ -}\ -.ace-ambiance .ace_constant {\ -color: #CF7EA9;\ -}\ -.ace-ambiance .ace_constant.ace_language {\ -color: #CF7EA9;\ -}\ -.ace-ambiance .ace_constant.ace_library {\ -}\ -.ace-ambiance .ace_constant.ace_numeric {\ -color: #78CF8A;\ -}\ -.ace-ambiance .ace_invalid {\ -text-decoration: underline;\ -}\ -.ace-ambiance .ace_invalid.ace_illegal {\ -color:#F8F8F8;\ -background-color: rgba(86, 45, 86, 0.75);\ -}\ -.ace-ambiance .ace_invalid,\ -.ace-ambiance .ace_deprecated {\ -text-decoration: underline;\ -font-style: italic;\ -color: #D2A8A1;\ -}\ -.ace-ambiance .ace_support {\ -color: #9B859D;\ -}\ -.ace-ambiance .ace_support.ace_function {\ -color: #DAD085;\ -}\ -.ace-ambiance .ace_function.ace_buildin {\ -color: #9b859d;\ -}\ -.ace-ambiance .ace_string {\ -color: #8f9d6a;\ -}\ -.ace-ambiance .ace_string.ace_regexp {\ -color: #DAD085;\ -}\ -.ace-ambiance .ace_comment {\ -font-style: italic;\ -color: #555;\ -}\ -.ace-ambiance .ace_comment.ace_doc {\ -}\ -.ace-ambiance .ace_comment.ace_doc.ace_tag {\ -color: #666;\ -font-style: normal;\ -}\ -.ace-ambiance .ace_definition,\ -.ace-ambiance .ace_type {\ -color: #aac6e3;\ -}\ -.ace-ambiance .ace_variable {\ -color: #9999cc;\ -}\ -.ace-ambiance .ace_variable.ace_language {\ -color: #9b859d;\ -}\ -.ace-ambiance .ace_xml-pe {\ -color: #494949;\ -}\ -.ace-ambiance .ace_gutter-layer,\ -.ace-ambiance .ace_text-layer {\ -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\");\ -}\ -.ace-ambiance .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\ -}\ -"; - -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/src/ace/theme-chaos.js b/src/ace/theme-chaos.js deleted file mode 100644 index 630a72f72..000000000 --- a/src/ace/theme-chaos.js +++ /dev/null @@ -1,163 +0,0 @@ -define("ace/theme/chaos",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-chaos"; -exports.cssText = ".ace-chaos .ace_gutter {\ -background: #141414;\ -color: #595959;\ -border-right: 1px solid #282828;\ -}\ -.ace-chaos .ace_gutter-cell.ace_warning {\ -background-image: none;\ -background: #FC0;\ -border-left: none;\ -padding-left: 0;\ -color: #000;\ -}\ -.ace-chaos .ace_gutter-cell.ace_error {\ -background-position: -6px center;\ -background-image: none;\ -background: #F10;\ -border-left: none;\ -padding-left: 0;\ -color: #000;\ -}\ -.ace-chaos .ace_print-margin {\ -border-left: 1px solid #555;\ -right: 0;\ -background: #1D1D1D;\ -}\ -.ace-chaos {\ -background-color: #161616;\ -color: #E6E1DC;\ -}\ -.ace-chaos .ace_cursor {\ -border-left: 2px solid #FFFFFF;\ -}\ -.ace-chaos .ace_cursor.ace_overwrite {\ -border-left: 0px;\ -border-bottom: 1px solid #FFFFFF;\ -}\ -.ace-chaos .ace_marker-layer .ace_selection {\ -background: #494836;\ -}\ -.ace-chaos .ace_marker-layer .ace_step {\ -background: rgb(198, 219, 174);\ -}\ -.ace-chaos .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #FCE94F;\ -}\ -.ace-chaos .ace_marker-layer .ace_active-line {\ -background: #333;\ -}\ -.ace-chaos .ace_gutter-active-line {\ -background-color: #222;\ -}\ -.ace-chaos .ace_invisible {\ -color: #404040;\ -}\ -.ace-chaos .ace_keyword {\ -color:#00698F;\ -}\ -.ace-chaos .ace_keyword.ace_operator {\ -color:#FF308F;\ -}\ -.ace-chaos .ace_constant {\ -color:#1EDAFB;\ -}\ -.ace-chaos .ace_constant.ace_language {\ -color:#FDC251;\ -}\ -.ace-chaos .ace_constant.ace_library {\ -color:#8DFF0A;\ -}\ -.ace-chaos .ace_constant.ace_numeric {\ -color:#58C554;\ -}\ -.ace-chaos .ace_invalid {\ -color:#FFFFFF;\ -background-color:#990000;\ -}\ -.ace-chaos .ace_invalid.ace_deprecated {\ -color:#FFFFFF;\ -background-color:#990000;\ -}\ -.ace-chaos .ace_support {\ -color: #999;\ -}\ -.ace-chaos .ace_support.ace_function {\ -color:#00AEEF;\ -}\ -.ace-chaos .ace_function {\ -color:#00AEEF;\ -}\ -.ace-chaos .ace_string {\ -color:#58C554;\ -}\ -.ace-chaos .ace_comment {\ -color:#555;\ -font-style:italic;\ -padding-bottom: 0px;\ -}\ -.ace-chaos .ace_variable {\ -color:#997744;\ -}\ -.ace-chaos .ace_meta.ace_tag {\ -color:#BE53E6;\ -}\ -.ace-chaos .ace_entity.ace_other.ace_attribute-name {\ -color:#FFFF89;\ -}\ -.ace-chaos .ace_markup.ace_underline {\ -text-decoration: underline;\ -}\ -.ace-chaos .ace_fold-widget {\ -text-align: center;\ -}\ -.ace-chaos .ace_fold-widget:hover {\ -color: #777;\ -}\ -.ace-chaos .ace_fold-widget.ace_start,\ -.ace-chaos .ace_fold-widget.ace_end,\ -.ace-chaos .ace_fold-widget.ace_closed{\ -background: none !important;\ -border: none;\ -box-shadow: none;\ -}\ -.ace-chaos .ace_fold-widget.ace_start:after {\ -content: '▾'\ -}\ -.ace-chaos .ace_fold-widget.ace_end:after {\ -content: '▴'\ -}\ -.ace-chaos .ace_fold-widget.ace_closed:after {\ -content: '‣'\ -}\ -.ace-chaos .ace_indent-guide {\ -border-right:1px dotted #333;\ -margin-right:-1px;\ -}\ -.ace-chaos .ace_fold { \ -background: #222; \ -border-radius: 3px; \ -color: #7AF; \ -border: none; \ -}\ -.ace-chaos .ace_fold:hover {\ -background: #CCC; \ -color: #000;\ -}\ -"; - -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/src/ace/theme-chrome.js b/src/ace/theme-chrome.js deleted file mode 100644 index 9fa527e4a..000000000 --- a/src/ace/theme-chrome.js +++ /dev/null @@ -1,135 +0,0 @@ -define("ace/theme/chrome",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-chrome"; -exports.cssText = ".ace-chrome .ace_gutter {\ -background: #ebebeb;\ -color: #333;\ -overflow : hidden;\ -}\ -.ace-chrome .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-chrome {\ -background-color: #FFFFFF;\ -color: black;\ -}\ -.ace-chrome .ace_cursor {\ -color: black;\ -}\ -.ace-chrome .ace_invisible {\ -color: rgb(191, 191, 191);\ -}\ -.ace-chrome .ace_constant.ace_buildin {\ -color: rgb(88, 72, 246);\ -}\ -.ace-chrome .ace_constant.ace_language {\ -color: rgb(88, 92, 246);\ -}\ -.ace-chrome .ace_constant.ace_library {\ -color: rgb(6, 150, 14);\ -}\ -.ace-chrome .ace_invalid {\ -background-color: rgb(153, 0, 0);\ -color: white;\ -}\ -.ace-chrome .ace_fold {\ -}\ -.ace-chrome .ace_support.ace_function {\ -color: rgb(60, 76, 114);\ -}\ -.ace-chrome .ace_support.ace_constant {\ -color: rgb(6, 150, 14);\ -}\ -.ace-chrome .ace_support.ace_type,\ -.ace-chrome .ace_support.ace_class\ -.ace-chrome .ace_support.ace_other {\ -color: rgb(109, 121, 222);\ -}\ -.ace-chrome .ace_variable.ace_parameter {\ -font-style:italic;\ -color:#FD971F;\ -}\ -.ace-chrome .ace_keyword.ace_operator {\ -color: rgb(104, 118, 135);\ -}\ -.ace-chrome .ace_comment {\ -color: #236e24;\ -}\ -.ace-chrome .ace_comment.ace_doc {\ -color: #236e24;\ -}\ -.ace-chrome .ace_comment.ace_doc.ace_tag {\ -color: #236e24;\ -}\ -.ace-chrome .ace_constant.ace_numeric {\ -color: rgb(0, 0, 205);\ -}\ -.ace-chrome .ace_variable {\ -color: rgb(49, 132, 149);\ -}\ -.ace-chrome .ace_xml-pe {\ -color: rgb(104, 104, 91);\ -}\ -.ace-chrome .ace_entity.ace_name.ace_function {\ -color: #0000A2;\ -}\ -.ace-chrome .ace_heading {\ -color: rgb(12, 7, 255);\ -}\ -.ace-chrome .ace_list {\ -color:rgb(185, 6, 144);\ -}\ -.ace-chrome .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-chrome .ace_marker-layer .ace_step {\ -background: rgb(252, 255, 0);\ -}\ -.ace-chrome .ace_marker-layer .ace_stack {\ -background: rgb(164, 229, 101);\ -}\ -.ace-chrome .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-chrome .ace_marker-layer .ace_active-line {\ -background: rgba(0, 0, 0, 0.07);\ -}\ -.ace-chrome .ace_gutter-active-line {\ -background-color : #dcdcdc;\ -}\ -.ace-chrome .ace_marker-layer .ace_selected-word {\ -background: rgb(250, 250, 255);\ -border: 1px solid rgb(200, 200, 250);\ -}\ -.ace-chrome .ace_storage,\ -.ace-chrome .ace_keyword,\ -.ace-chrome .ace_meta.ace_tag {\ -color: rgb(147, 15, 128);\ -}\ -.ace-chrome .ace_string.ace_regex {\ -color: rgb(255, 0, 0)\ -}\ -.ace-chrome .ace_string {\ -color: #1A1AA6;\ -}\ -.ace-chrome .ace_entity.ace_other.ace_attribute-name {\ -color: #994409;\ -}\ -.ace-chrome .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ -}\ -"; - -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/src/ace/theme-clouds.js b/src/ace/theme-clouds.js deleted file mode 100644 index 2673f62f8..000000000 --- a/src/ace/theme-clouds.js +++ /dev/null @@ -1,102 +0,0 @@ -define("ace/theme/clouds",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-clouds"; -exports.cssText = ".ace-clouds .ace_gutter {\ -background: #ebebeb;\ -color: #333\ -}\ -.ace-clouds .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8\ -}\ -.ace-clouds {\ -background-color: #FFFFFF;\ -color: #000000\ -}\ -.ace-clouds .ace_cursor {\ -color: #000000\ -}\ -.ace-clouds .ace_marker-layer .ace_selection {\ -background: #BDD5FC\ -}\ -.ace-clouds.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #FFFFFF;\ -}\ -.ace-clouds .ace_marker-layer .ace_step {\ -background: rgb(255, 255, 0)\ -}\ -.ace-clouds .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #BFBFBF\ -}\ -.ace-clouds .ace_marker-layer .ace_active-line {\ -background: #FFFBD1\ -}\ -.ace-clouds .ace_gutter-active-line {\ -background-color : #dcdcdc\ -}\ -.ace-clouds .ace_marker-layer .ace_selected-word {\ -border: 1px solid #BDD5FC\ -}\ -.ace-clouds .ace_invisible {\ -color: #BFBFBF\ -}\ -.ace-clouds .ace_keyword,\ -.ace-clouds .ace_meta,\ -.ace-clouds .ace_support.ace_constant.ace_property-value {\ -color: #AF956F\ -}\ -.ace-clouds .ace_keyword.ace_operator {\ -color: #484848\ -}\ -.ace-clouds .ace_keyword.ace_other.ace_unit {\ -color: #96DC5F\ -}\ -.ace-clouds .ace_constant.ace_language {\ -color: #39946A\ -}\ -.ace-clouds .ace_constant.ace_numeric {\ -color: #46A609\ -}\ -.ace-clouds .ace_constant.ace_character.ace_entity {\ -color: #BF78CC\ -}\ -.ace-clouds .ace_invalid {\ -background-color: #FF002A\ -}\ -.ace-clouds .ace_fold {\ -background-color: #AF956F;\ -border-color: #000000\ -}\ -.ace-clouds .ace_storage,\ -.ace-clouds .ace_support.ace_class,\ -.ace-clouds .ace_support.ace_function,\ -.ace-clouds .ace_support.ace_other,\ -.ace-clouds .ace_support.ace_type {\ -color: #C52727\ -}\ -.ace-clouds .ace_string {\ -color: #5D90CD\ -}\ -.ace-clouds .ace_comment {\ -color: #BCC8BA\ -}\ -.ace-clouds .ace_entity.ace_name.ace_tag,\ -.ace-clouds .ace_entity.ace_other.ace_attribute-name {\ -color: #606060\ -}\ -.ace-clouds .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y\ -}"; - -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/src/ace/theme-clouds_midnight.js b/src/ace/theme-clouds_midnight.js deleted file mode 100644 index d88ece21d..000000000 --- a/src/ace/theme-clouds_midnight.js +++ /dev/null @@ -1,103 +0,0 @@ -define("ace/theme/clouds_midnight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-clouds-midnight"; -exports.cssText = ".ace-clouds-midnight .ace_gutter {\ -background: #232323;\ -color: #929292\ -}\ -.ace-clouds-midnight .ace_print-margin {\ -width: 1px;\ -background: #232323\ -}\ -.ace-clouds-midnight {\ -background-color: #191919;\ -color: #929292\ -}\ -.ace-clouds-midnight .ace_cursor {\ -color: #7DA5DC\ -}\ -.ace-clouds-midnight .ace_marker-layer .ace_selection {\ -background: #000000\ -}\ -.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #191919;\ -}\ -.ace-clouds-midnight .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-clouds-midnight .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #BFBFBF\ -}\ -.ace-clouds-midnight .ace_marker-layer .ace_active-line {\ -background: rgba(215, 215, 215, 0.031)\ -}\ -.ace-clouds-midnight .ace_gutter-active-line {\ -background-color: rgba(215, 215, 215, 0.031)\ -}\ -.ace-clouds-midnight .ace_marker-layer .ace_selected-word {\ -border: 1px solid #000000\ -}\ -.ace-clouds-midnight .ace_invisible {\ -color: #666\ -}\ -.ace-clouds-midnight .ace_keyword,\ -.ace-clouds-midnight .ace_meta,\ -.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {\ -color: #927C5D\ -}\ -.ace-clouds-midnight .ace_keyword.ace_operator {\ -color: #4B4B4B\ -}\ -.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {\ -color: #366F1A\ -}\ -.ace-clouds-midnight .ace_constant.ace_language {\ -color: #39946A\ -}\ -.ace-clouds-midnight .ace_constant.ace_numeric {\ -color: #46A609\ -}\ -.ace-clouds-midnight .ace_constant.ace_character.ace_entity {\ -color: #A165AC\ -}\ -.ace-clouds-midnight .ace_invalid {\ -color: #FFFFFF;\ -background-color: #E92E2E\ -}\ -.ace-clouds-midnight .ace_fold {\ -background-color: #927C5D;\ -border-color: #929292\ -}\ -.ace-clouds-midnight .ace_storage,\ -.ace-clouds-midnight .ace_support.ace_class,\ -.ace-clouds-midnight .ace_support.ace_function,\ -.ace-clouds-midnight .ace_support.ace_other,\ -.ace-clouds-midnight .ace_support.ace_type {\ -color: #E92E2E\ -}\ -.ace-clouds-midnight .ace_string {\ -color: #5D90CD\ -}\ -.ace-clouds-midnight .ace_comment {\ -color: #3C403B\ -}\ -.ace-clouds-midnight .ace_entity.ace_name.ace_tag,\ -.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\ -color: #606060\ -}\ -.ace-clouds-midnight .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-cobalt.js b/src/ace/theme-cobalt.js deleted file mode 100644 index 5459c7561..000000000 --- a/src/ace/theme-cobalt.js +++ /dev/null @@ -1,120 +0,0 @@ -define("ace/theme/cobalt",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-cobalt"; -exports.cssText = ".ace-cobalt .ace_gutter {\ -background: #011e3a;\ -color: rgb(128,145,160)\ -}\ -.ace-cobalt .ace_print-margin {\ -width: 1px;\ -background: #555555\ -}\ -.ace-cobalt {\ -background-color: #002240;\ -color: #FFFFFF\ -}\ -.ace-cobalt .ace_cursor {\ -color: #FFFFFF\ -}\ -.ace-cobalt .ace_marker-layer .ace_selection {\ -background: rgba(179, 101, 57, 0.75)\ -}\ -.ace-cobalt.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #002240;\ -}\ -.ace-cobalt .ace_marker-layer .ace_step {\ -background: rgb(127, 111, 19)\ -}\ -.ace-cobalt .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(255, 255, 255, 0.15)\ -}\ -.ace-cobalt .ace_marker-layer .ace_active-line {\ -background: rgba(0, 0, 0, 0.35)\ -}\ -.ace-cobalt .ace_gutter-active-line {\ -background-color: rgba(0, 0, 0, 0.35)\ -}\ -.ace-cobalt .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(179, 101, 57, 0.75)\ -}\ -.ace-cobalt .ace_invisible {\ -color: rgba(255, 255, 255, 0.15)\ -}\ -.ace-cobalt .ace_keyword,\ -.ace-cobalt .ace_meta {\ -color: #FF9D00\ -}\ -.ace-cobalt .ace_constant,\ -.ace-cobalt .ace_constant.ace_character,\ -.ace-cobalt .ace_constant.ace_character.ace_escape,\ -.ace-cobalt .ace_constant.ace_other {\ -color: #FF628C\ -}\ -.ace-cobalt .ace_invalid {\ -color: #F8F8F8;\ -background-color: #800F00\ -}\ -.ace-cobalt .ace_support {\ -color: #80FFBB\ -}\ -.ace-cobalt .ace_support.ace_constant {\ -color: #EB939A\ -}\ -.ace-cobalt .ace_fold {\ -background-color: #FF9D00;\ -border-color: #FFFFFF\ -}\ -.ace-cobalt .ace_support.ace_function {\ -color: #FFB054\ -}\ -.ace-cobalt .ace_storage {\ -color: #FFEE80\ -}\ -.ace-cobalt .ace_entity {\ -color: #FFDD00\ -}\ -.ace-cobalt .ace_string {\ -color: #3AD900\ -}\ -.ace-cobalt .ace_string.ace_regexp {\ -color: #80FFC2\ -}\ -.ace-cobalt .ace_comment {\ -font-style: italic;\ -color: #0088FF\ -}\ -.ace-cobalt .ace_heading,\ -.ace-cobalt .ace_markup.ace_heading {\ -color: #C8E4FD;\ -background-color: #001221\ -}\ -.ace-cobalt .ace_list,\ -.ace-cobalt .ace_markup.ace_list {\ -background-color: #130D26\ -}\ -.ace-cobalt .ace_variable {\ -color: #CCCCCC\ -}\ -.ace-cobalt .ace_variable.ace_language {\ -color: #FF80E1\ -}\ -.ace-cobalt .ace_meta.ace_tag {\ -color: #9EFFFF\ -}\ -.ace-cobalt .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y\ -}\ -"; - -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/src/ace/theme-crimson_editor.js b/src/ace/theme-crimson_editor.js deleted file mode 100644 index b162e5be5..000000000 --- a/src/ace/theme-crimson_editor.js +++ /dev/null @@ -1,125 +0,0 @@ -define("ace/theme/crimson_editor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -exports.isDark = false; -exports.cssText = ".ace-crimson-editor .ace_gutter {\ -background: #ebebeb;\ -color: #333;\ -overflow : hidden;\ -}\ -.ace-crimson-editor .ace_gutter-layer {\ -width: 100%;\ -text-align: right;\ -}\ -.ace-crimson-editor .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-crimson-editor {\ -background-color: #FFFFFF;\ -color: rgb(64, 64, 64);\ -}\ -.ace-crimson-editor .ace_cursor {\ -color: black;\ -}\ -.ace-crimson-editor .ace_invisible {\ -color: rgb(191, 191, 191);\ -}\ -.ace-crimson-editor .ace_identifier {\ -color: black;\ -}\ -.ace-crimson-editor .ace_keyword {\ -color: blue;\ -}\ -.ace-crimson-editor .ace_constant.ace_buildin {\ -color: rgb(88, 72, 246);\ -}\ -.ace-crimson-editor .ace_constant.ace_language {\ -color: rgb(255, 156, 0);\ -}\ -.ace-crimson-editor .ace_constant.ace_library {\ -color: rgb(6, 150, 14);\ -}\ -.ace-crimson-editor .ace_invalid {\ -text-decoration: line-through;\ -color: rgb(224, 0, 0);\ -}\ -.ace-crimson-editor .ace_fold {\ -}\ -.ace-crimson-editor .ace_support.ace_function {\ -color: rgb(192, 0, 0);\ -}\ -.ace-crimson-editor .ace_support.ace_constant {\ -color: rgb(6, 150, 14);\ -}\ -.ace-crimson-editor .ace_support.ace_type,\ -.ace-crimson-editor .ace_support.ace_class {\ -color: rgb(109, 121, 222);\ -}\ -.ace-crimson-editor .ace_keyword.ace_operator {\ -color: rgb(49, 132, 149);\ -}\ -.ace-crimson-editor .ace_string {\ -color: rgb(128, 0, 128);\ -}\ -.ace-crimson-editor .ace_comment {\ -color: rgb(76, 136, 107);\ -}\ -.ace-crimson-editor .ace_comment.ace_doc {\ -color: rgb(0, 102, 255);\ -}\ -.ace-crimson-editor .ace_comment.ace_doc.ace_tag {\ -color: rgb(128, 159, 191);\ -}\ -.ace-crimson-editor .ace_constant.ace_numeric {\ -color: rgb(0, 0, 64);\ -}\ -.ace-crimson-editor .ace_variable {\ -color: rgb(0, 64, 128);\ -}\ -.ace-crimson-editor .ace_xml-pe {\ -color: rgb(104, 104, 91);\ -}\ -.ace-crimson-editor .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-crimson-editor .ace_marker-layer .ace_step {\ -background: rgb(252, 255, 0);\ -}\ -.ace-crimson-editor .ace_marker-layer .ace_stack {\ -background: rgb(164, 229, 101);\ -}\ -.ace-crimson-editor .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-crimson-editor .ace_marker-layer .ace_active-line {\ -background: rgb(232, 242, 254);\ -}\ -.ace-crimson-editor .ace_gutter-active-line {\ -background-color : #dcdcdc;\ -}\ -.ace-crimson-editor .ace_meta.ace_tag {\ -color:rgb(28, 2, 255);\ -}\ -.ace-crimson-editor .ace_marker-layer .ace_selected-word {\ -background: rgb(250, 250, 255);\ -border: 1px solid rgb(200, 200, 250);\ -}\ -.ace-crimson-editor .ace_string.ace_regex {\ -color: rgb(192, 0, 192);\ -}\ -.ace-crimson-editor .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ -}"; - -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/src/ace/theme-dawn.js b/src/ace/theme-dawn.js deleted file mode 100644 index 923dad68d..000000000 --- a/src/ace/theme-dawn.js +++ /dev/null @@ -1,115 +0,0 @@ -define("ace/theme/dawn",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-dawn"; -exports.cssText = ".ace-dawn .ace_gutter {\ -background: #ebebeb;\ -color: #333\ -}\ -.ace-dawn .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8\ -}\ -.ace-dawn {\ -background-color: #F9F9F9;\ -color: #080808\ -}\ -.ace-dawn .ace_cursor {\ -color: #000000\ -}\ -.ace-dawn .ace_marker-layer .ace_selection {\ -background: rgba(39, 95, 255, 0.30)\ -}\ -.ace-dawn.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #F9F9F9;\ -}\ -.ace-dawn .ace_marker-layer .ace_step {\ -background: rgb(255, 255, 0)\ -}\ -.ace-dawn .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(75, 75, 126, 0.50)\ -}\ -.ace-dawn .ace_marker-layer .ace_active-line {\ -background: rgba(36, 99, 180, 0.12)\ -}\ -.ace-dawn .ace_gutter-active-line {\ -background-color : #dcdcdc\ -}\ -.ace-dawn .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(39, 95, 255, 0.30)\ -}\ -.ace-dawn .ace_invisible {\ -color: rgba(75, 75, 126, 0.50)\ -}\ -.ace-dawn .ace_keyword,\ -.ace-dawn .ace_meta {\ -color: #794938\ -}\ -.ace-dawn .ace_constant,\ -.ace-dawn .ace_constant.ace_character,\ -.ace-dawn .ace_constant.ace_character.ace_escape,\ -.ace-dawn .ace_constant.ace_other {\ -color: #811F24\ -}\ -.ace-dawn .ace_invalid.ace_illegal {\ -text-decoration: underline;\ -font-style: italic;\ -color: #F8F8F8;\ -background-color: #B52A1D\ -}\ -.ace-dawn .ace_invalid.ace_deprecated {\ -text-decoration: underline;\ -font-style: italic;\ -color: #B52A1D\ -}\ -.ace-dawn .ace_support {\ -color: #691C97\ -}\ -.ace-dawn .ace_support.ace_constant {\ -color: #B4371F\ -}\ -.ace-dawn .ace_fold {\ -background-color: #794938;\ -border-color: #080808\ -}\ -.ace-dawn .ace_list,\ -.ace-dawn .ace_markup.ace_list,\ -.ace-dawn .ace_support.ace_function {\ -color: #693A17\ -}\ -.ace-dawn .ace_storage {\ -font-style: italic;\ -color: #A71D5D\ -}\ -.ace-dawn .ace_string {\ -color: #0B6125\ -}\ -.ace-dawn .ace_string.ace_regexp {\ -color: #CF5628\ -}\ -.ace-dawn .ace_comment {\ -font-style: italic;\ -color: #5A525F\ -}\ -.ace-dawn .ace_heading,\ -.ace-dawn .ace_markup.ace_heading {\ -color: #19356D\ -}\ -.ace-dawn .ace_variable {\ -color: #234A97\ -}\ -.ace-dawn .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-dracula.js b/src/ace/theme-dracula.js deleted file mode 100644 index 3085b9d96..000000000 --- a/src/ace/theme-dracula.js +++ /dev/null @@ -1,135 +0,0 @@ -define("ace/theme/dracula",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-dracula"; -exports.cssText = "\ -.ace-dracula .ace_gutter {\ -background: #282a36;\ -color: rgb(144,145,148)\ -}\ -.ace-dracula .ace_print-margin {\ -width: 1px;\ -background: #44475a\ -}\ -.ace-dracula {\ -background-color: #282a36;\ -color: #f8f8f2\ -}\ -.ace-dracula .ace_cursor {\ -color: #f8f8f0\ -}\ -.ace-dracula .ace_marker-layer .ace_selection {\ -background: #44475a\ -}\ -.ace-dracula.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #282a36;\ -border-radius: 2px\ -}\ -.ace-dracula .ace_marker-layer .ace_step {\ -background: rgb(198, 219, 174)\ -}\ -.ace-dracula .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #a29709\ -}\ -.ace-dracula .ace_marker-layer .ace_active-line {\ -background: #44475a\ -}\ -.ace-dracula .ace_gutter-active-line {\ -background-color: #44475a\ -}\ -.ace-dracula .ace_marker-layer .ace_selected-word {\ -box-shadow: 0px 0px 0px 1px #a29709;\ -border-radius: 3px;\ -}\ -.ace-dracula .ace_fold {\ -background-color: #50fa7b;\ -border-color: #f8f8f2\ -}\ -.ace-dracula .ace_keyword {\ -color: #ff79c6\ -}\ -.ace-dracula .ace_constant.ace_language {\ -color: #bd93f9\ -}\ -.ace-dracula .ace_constant.ace_numeric {\ -color: #bd93f9\ -}\ -.ace-dracula .ace_constant.ace_character {\ -color: #bd93f9\ -}\ -.ace-dracula .ace_constant.ace_character.ace_escape {\ -color: #ff79c6\ -}\ -.ace-dracula .ace_constant.ace_other {\ -color: #bd93f9\ -}\ -.ace-dracula .ace_support.ace_function {\ -color: #8be9fd\ -}\ -.ace-dracula .ace_support.ace_constant {\ -color: #6be5fd\ -}\ -.ace-dracula .ace_support.ace_class {\ -font-style: italic;\ -color: #66d9ef\ -}\ -.ace-dracula .ace_support.ace_type {\ -font-style: italic;\ -color: #66d9ef\ -}\ -.ace-dracula .ace_storage {\ -color: #ff79c6\ -}\ -.ace-dracula .ace_storage.ace_type {\ -font-style: italic;\ -color: #8be9fd\ -}\ -.ace-dracula .ace_invalid {\ -color: #F8F8F0;\ -background-color: #ff79c6\ -}\ -.ace-dracula .ace_invalid.ace_deprecated {\ -color: #F8F8F0;\ -background-color: #bd93f9\ -}\ -.ace-dracula .ace_string {\ -color: #f1fa8c\ -}\ -.ace-dracula .ace_comment {\ -color: #6272a4\ -}\ -.ace-dracula .ace_variable {\ -color: #50fa7b\ -}\ -.ace-dracula .ace_variable.ace_parameter {\ -font-style: italic;\ -color: #ffb86c\ -}\ -.ace-dracula .ace_entity.ace_other.ace_attribute-name {\ -color: #50fa7b\ -}\ -.ace-dracula .ace_entity.ace_name.ace_function {\ -color: #50fa7b\ -}\ -.ace-dracula .ace_entity.ace_name.ace_tag {\ -color: #ff79c6\ -}\ -.ace-dracula .ace_invisible {\ -color: #626680;\ -}\ -.ace-dracula .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ -}"; -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/src/ace/theme-dreamweaver.js b/src/ace/theme-dreamweaver.js deleted file mode 100644 index fa9771e92..000000000 --- a/src/ace/theme-dreamweaver.js +++ /dev/null @@ -1,148 +0,0 @@ -define("ace/theme/dreamweaver",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -exports.isDark = false; -exports.cssClass = "ace-dreamweaver"; -exports.cssText = ".ace-dreamweaver .ace_gutter {\ -background: #e8e8e8;\ -color: #333;\ -}\ -.ace-dreamweaver .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-dreamweaver {\ -background-color: #FFFFFF;\ -color: black;\ -}\ -.ace-dreamweaver .ace_fold {\ -background-color: #757AD8;\ -}\ -.ace-dreamweaver .ace_cursor {\ -color: black;\ -}\ -.ace-dreamweaver .ace_invisible {\ -color: rgb(191, 191, 191);\ -}\ -.ace-dreamweaver .ace_storage,\ -.ace-dreamweaver .ace_keyword {\ -color: blue;\ -}\ -.ace-dreamweaver .ace_constant.ace_buildin {\ -color: rgb(88, 72, 246);\ -}\ -.ace-dreamweaver .ace_constant.ace_language {\ -color: rgb(88, 92, 246);\ -}\ -.ace-dreamweaver .ace_constant.ace_library {\ -color: rgb(6, 150, 14);\ -}\ -.ace-dreamweaver .ace_invalid {\ -background-color: rgb(153, 0, 0);\ -color: white;\ -}\ -.ace-dreamweaver .ace_support.ace_function {\ -color: rgb(60, 76, 114);\ -}\ -.ace-dreamweaver .ace_support.ace_constant {\ -color: rgb(6, 150, 14);\ -}\ -.ace-dreamweaver .ace_support.ace_type,\ -.ace-dreamweaver .ace_support.ace_class {\ -color: #009;\ -}\ -.ace-dreamweaver .ace_support.ace_php_tag {\ -color: #f00;\ -}\ -.ace-dreamweaver .ace_keyword.ace_operator {\ -color: rgb(104, 118, 135);\ -}\ -.ace-dreamweaver .ace_string {\ -color: #00F;\ -}\ -.ace-dreamweaver .ace_comment {\ -color: rgb(76, 136, 107);\ -}\ -.ace-dreamweaver .ace_comment.ace_doc {\ -color: rgb(0, 102, 255);\ -}\ -.ace-dreamweaver .ace_comment.ace_doc.ace_tag {\ -color: rgb(128, 159, 191);\ -}\ -.ace-dreamweaver .ace_constant.ace_numeric {\ -color: rgb(0, 0, 205);\ -}\ -.ace-dreamweaver .ace_variable {\ -color: #06F\ -}\ -.ace-dreamweaver .ace_xml-pe {\ -color: rgb(104, 104, 91);\ -}\ -.ace-dreamweaver .ace_entity.ace_name.ace_function {\ -color: #00F;\ -}\ -.ace-dreamweaver .ace_heading {\ -color: rgb(12, 7, 255);\ -}\ -.ace-dreamweaver .ace_list {\ -color:rgb(185, 6, 144);\ -}\ -.ace-dreamweaver .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-dreamweaver .ace_marker-layer .ace_step {\ -background: rgb(252, 255, 0);\ -}\ -.ace-dreamweaver .ace_marker-layer .ace_stack {\ -background: rgb(164, 229, 101);\ -}\ -.ace-dreamweaver .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-dreamweaver .ace_marker-layer .ace_active-line {\ -background: rgba(0, 0, 0, 0.07);\ -}\ -.ace-dreamweaver .ace_gutter-active-line {\ -background-color : #DCDCDC;\ -}\ -.ace-dreamweaver .ace_marker-layer .ace_selected-word {\ -background: rgb(250, 250, 255);\ -border: 1px solid rgb(200, 200, 250);\ -}\ -.ace-dreamweaver .ace_meta.ace_tag {\ -color:#009;\ -}\ -.ace-dreamweaver .ace_meta.ace_tag.ace_anchor {\ -color:#060;\ -}\ -.ace-dreamweaver .ace_meta.ace_tag.ace_form {\ -color:#F90;\ -}\ -.ace-dreamweaver .ace_meta.ace_tag.ace_image {\ -color:#909;\ -}\ -.ace-dreamweaver .ace_meta.ace_tag.ace_script {\ -color:#900;\ -}\ -.ace-dreamweaver .ace_meta.ace_tag.ace_style {\ -color:#909;\ -}\ -.ace-dreamweaver .ace_meta.ace_tag.ace_table {\ -color:#099;\ -}\ -.ace-dreamweaver .ace_string.ace_regex {\ -color: rgb(255, 0, 0)\ -}\ -.ace-dreamweaver .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ -}"; - -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/src/ace/theme-eclipse.js b/src/ace/theme-eclipse.js deleted file mode 100644 index 5deddde3f..000000000 --- a/src/ace/theme-eclipse.js +++ /dev/null @@ -1,105 +0,0 @@ -define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -exports.isDark = false; -exports.cssText = ".ace-eclipse .ace_gutter {\ -background: #ebebeb;\ -border-right: 1px solid rgb(159, 159, 159);\ -color: rgb(136, 136, 136);\ -}\ -.ace-eclipse .ace_print-margin {\ -width: 1px;\ -background: #ebebeb;\ -}\ -.ace-eclipse {\ -background-color: #FFFFFF;\ -color: black;\ -}\ -.ace-eclipse .ace_fold {\ -background-color: rgb(60, 76, 114);\ -}\ -.ace-eclipse .ace_cursor {\ -color: black;\ -}\ -.ace-eclipse .ace_storage,\ -.ace-eclipse .ace_keyword,\ -.ace-eclipse .ace_variable {\ -color: rgb(127, 0, 85);\ -}\ -.ace-eclipse .ace_constant.ace_buildin {\ -color: rgb(88, 72, 246);\ -}\ -.ace-eclipse .ace_constant.ace_library {\ -color: rgb(6, 150, 14);\ -}\ -.ace-eclipse .ace_function {\ -color: rgb(60, 76, 114);\ -}\ -.ace-eclipse .ace_string {\ -color: rgb(42, 0, 255);\ -}\ -.ace-eclipse .ace_comment {\ -color: rgb(113, 150, 130);\ -}\ -.ace-eclipse .ace_comment.ace_doc {\ -color: rgb(63, 95, 191);\ -}\ -.ace-eclipse .ace_comment.ace_doc.ace_tag {\ -color: rgb(127, 159, 191);\ -}\ -.ace-eclipse .ace_constant.ace_numeric {\ -color: darkblue;\ -}\ -.ace-eclipse .ace_tag {\ -color: rgb(25, 118, 116);\ -}\ -.ace-eclipse .ace_type {\ -color: rgb(127, 0, 127);\ -}\ -.ace-eclipse .ace_xml-pe {\ -color: rgb(104, 104, 91);\ -}\ -.ace-eclipse .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-eclipse .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-eclipse .ace_meta.ace_tag {\ -color:rgb(25, 118, 116);\ -}\ -.ace-eclipse .ace_invisible {\ -color: #ddd;\ -}\ -.ace-eclipse .ace_entity.ace_other.ace_attribute-name {\ -color:rgb(127, 0, 127);\ -}\ -.ace-eclipse .ace_marker-layer .ace_step {\ -background: rgb(255, 255, 0);\ -}\ -.ace-eclipse .ace_active-line {\ -background: rgb(232, 242, 254);\ -}\ -.ace-eclipse .ace_gutter-active-line {\ -background-color : #DADADA;\ -}\ -.ace-eclipse .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgb(181, 213, 255);\ -}\ -.ace-eclipse .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ -}"; - -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/src/ace/theme-github.js b/src/ace/theme-github.js deleted file mode 100644 index 12d70bc77..000000000 --- a/src/ace/theme-github.js +++ /dev/null @@ -1,110 +0,0 @@ -define("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-github"; -exports.cssText = "\ -.ace-github .ace_gutter {\ -background: #e8e8e8;\ -color: #AAA;\ -}\ -.ace-github {\ -background: #fff;\ -color: #000;\ -}\ -.ace-github .ace_keyword {\ -font-weight: bold;\ -}\ -.ace-github .ace_string {\ -color: #D14;\ -}\ -.ace-github .ace_variable.ace_class {\ -color: teal;\ -}\ -.ace-github .ace_constant.ace_numeric {\ -color: #099;\ -}\ -.ace-github .ace_constant.ace_buildin {\ -color: #0086B3;\ -}\ -.ace-github .ace_support.ace_function {\ -color: #0086B3;\ -}\ -.ace-github .ace_comment {\ -color: #998;\ -font-style: italic;\ -}\ -.ace-github .ace_variable.ace_language {\ -color: #0086B3;\ -}\ -.ace-github .ace_paren {\ -font-weight: bold;\ -}\ -.ace-github .ace_boolean {\ -font-weight: bold;\ -}\ -.ace-github .ace_string.ace_regexp {\ -color: #009926;\ -font-weight: normal;\ -}\ -.ace-github .ace_variable.ace_instance {\ -color: teal;\ -}\ -.ace-github .ace_constant.ace_language {\ -font-weight: bold;\ -}\ -.ace-github .ace_cursor {\ -color: black;\ -}\ -.ace-github.ace_focus .ace_marker-layer .ace_active-line {\ -background: rgb(255, 255, 204);\ -}\ -.ace-github .ace_marker-layer .ace_active-line {\ -background: rgb(245, 245, 245);\ -}\ -.ace-github .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-github.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px white;\ -}\ -.ace-github.ace_nobold .ace_line > span {\ -font-weight: normal !important;\ -}\ -.ace-github .ace_marker-layer .ace_step {\ -background: rgb(252, 255, 0);\ -}\ -.ace-github .ace_marker-layer .ace_stack {\ -background: rgb(164, 229, 101);\ -}\ -.ace-github .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-github .ace_gutter-active-line {\ -background-color : rgba(0, 0, 0, 0.07);\ -}\ -.ace-github .ace_marker-layer .ace_selected-word {\ -background: rgb(250, 250, 255);\ -border: 1px solid rgb(200, 200, 250);\ -}\ -.ace-github .ace_invisible {\ -color: #BFBFBF\ -}\ -.ace-github .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-github .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ -}"; - - 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/src/ace/theme-gob.js b/src/ace/theme-gob.js deleted file mode 100644 index 7326db1ec..000000000 --- a/src/ace/theme-gob.js +++ /dev/null @@ -1,119 +0,0 @@ -define("ace/theme/gob",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-gob"; -exports.cssText = ".ace-gob .ace_gutter {\ -background: #0B1818;\ -color: #03EE03\ -}\ -.ace-gob .ace_print-margin {\ -width: 1px;\ -background: #131313\ -}\ -.ace-gob {\ -background-color: #0B0B0B;\ -color: #00FF00\ -}\ -.ace-gob .ace_cursor {\ -border-color: rgba(16, 248, 255, 0.90);\ -background-color: rgba(16, 240, 248, 0.70);\ -opacity: 0.4;\ -}\ -.ace-gob .ace_marker-layer .ace_selection {\ -background: rgba(221, 240, 255, 0.20)\ -}\ -.ace-gob.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #141414;\ -}\ -.ace-gob .ace_marker-layer .ace_step {\ -background: rgb(16, 128, 0)\ -}\ -.ace-gob .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(64, 255, 255, 0.25)\ -}\ -.ace-gob .ace_marker-layer .ace_active-line {\ -background: rgba(255, 255, 255, 0.04)\ -}\ -.ace-gob .ace_gutter-active-line {\ -background-color: rgba(255, 255, 255, 0.04)\ -}\ -.ace-gob .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(192, 240, 255, 0.20)\ -}\ -.ace-gob .ace_invisible {\ -color: rgba(255, 255, 255, 0.25)\ -}\ -.ace-gob .ace_keyword,\ -.ace-gob .ace_meta {\ -color: #10D8E8\ -}\ -.ace-gob .ace_constant,\ -.ace-gob .ace_constant.ace_character,\ -.ace-gob .ace_constant.ace_character.ace_escape,\ -.ace-gob .ace_constant.ace_other,\ -.ace-gob .ace_heading,\ -.ace-gob .ace_markup.ace_heading,\ -.ace-gob .ace_support.ace_constant {\ -color: #10F0A0\ -}\ -.ace-gob .ace_invalid.ace_illegal {\ -color: #F8F8F8;\ -background-color: rgba(86, 45, 86, 0.75)\ -}\ -.ace-gob .ace_invalid.ace_deprecated {\ -text-decoration: underline;\ -font-style: italic;\ -color: #20F8C0\ -}\ -.ace-gob .ace_support {\ -color: #20E8B0\ -}\ -.ace-gob .ace_fold {\ -background-color: #50B8B8;\ -border-color: #70F8F8\ -}\ -.ace-gob .ace_support.ace_function {\ -color: #00F800\ -}\ -.ace-gob .ace_list,\ -.ace-gob .ace_markup.ace_list,\ -.ace-gob .ace_storage {\ -color: #10FF98\ -}\ -.ace-gob .ace_entity.ace_name.ace_function,\ -.ace-gob .ace_meta.ace_tag,\ -.ace-gob .ace_variable {\ -color: #00F868\ -}\ -.ace-gob .ace_string {\ -color: #10F060\ -}\ -.ace-gob .ace_string.ace_regexp {\ -color: #20F090;\ -}\ -.ace-gob .ace_comment {\ -font-style: italic;\ -color: #00E060;\ -}\ -.ace-gob .ace_variable {\ -color: #00F888;\ -}\ -.ace-gob .ace_xml-pe {\ -color: #488858;\ -}\ -.ace-gob .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\ -}\ -"; - -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/src/ace/theme-gruvbox.js b/src/ace/theme-gruvbox.js deleted file mode 100644 index c52e8f0fc..000000000 --- a/src/ace/theme-gruvbox.js +++ /dev/null @@ -1,89 +0,0 @@ -define("ace/theme/gruvbox",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-gruvbox"; -exports.cssText = ".ace-gruvbox .ace_gutter-active-line {\ -background-color: #3C3836;\ -}\ -.ace-gruvbox {\ -color: #EBDAB4;\ -background-color: #1D2021;\ -}\ -.ace-gruvbox .ace_invisible {\ -color: #504945;\ -}\ -.ace-gruvbox .ace_marker-layer .ace_selection {\ -background: rgba(179, 101, 57, 0.75)\ -}\ -.ace-gruvbox.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #002240;\ -}\ -.ace-gruvbox .ace_keyword {\ -color: #8ec07c;\ -}\ -.ace-gruvbox .ace_comment {\ -font-style: italic;\ -color: #928375;\ -}\ -.ace-gruvbox .ace-statement {\ -color: red;\ -}\ -.ace-gruvbox .ace_variable {\ -color: #84A598;\ -}\ -.ace-gruvbox .ace_variable.ace_language {\ -color: #D2879B;\ -}\ -.ace-gruvbox .ace_constant {\ -color: #C2859A;\ -}\ -.ace-gruvbox .ace_constant.ace_language {\ -color: #C2859A;\ -}\ -.ace-gruvbox .ace_constant.ace_numeric {\ -color: #C2859A;\ -}\ -.ace-gruvbox .ace_string {\ -color: #B8BA37;\ -}\ -.ace-gruvbox .ace_support {\ -color: #F9BC41;\ -}\ -.ace-gruvbox .ace_support.ace_function {\ -color: #F84B3C;\ -}\ -.ace-gruvbox .ace_storage {\ -color: #8FBF7F;\ -}\ -.ace-gruvbox .ace_keyword.ace_operator {\ -color: #EBDAB4;\ -}\ -.ace-gruvbox .ace_punctuation.ace_operator {\ -color: yellow;\ -}\ -.ace-gruvbox .ace_marker-layer .ace_active-line {\ -background: #3C3836;\ -}\ -.ace-gruvbox .ace_marker-layer .ace_selected-word {\ -border-radius: 4px;\ -border: 8px solid #3f475d;\ -}\ -.ace-gruvbox .ace_print-margin {\ -width: 5px;\ -background: #3C3836;\ -}\ -.ace-gruvbox .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\ -}"; - -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/src/ace/theme-idle_fingers.js b/src/ace/theme-idle_fingers.js deleted file mode 100644 index 1af5e27a2..000000000 --- a/src/ace/theme-idle_fingers.js +++ /dev/null @@ -1,103 +0,0 @@ -define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-idle-fingers"; -exports.cssText = ".ace-idle-fingers .ace_gutter {\ -background: #3b3b3b;\ -color: rgb(153,153,153)\ -}\ -.ace-idle-fingers .ace_print-margin {\ -width: 1px;\ -background: #3b3b3b\ -}\ -.ace-idle-fingers {\ -background-color: #323232;\ -color: #FFFFFF\ -}\ -.ace-idle-fingers .ace_cursor {\ -color: #91FF00\ -}\ -.ace-idle-fingers .ace_marker-layer .ace_selection {\ -background: rgba(90, 100, 126, 0.88)\ -}\ -.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #323232;\ -}\ -.ace-idle-fingers .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-idle-fingers .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #404040\ -}\ -.ace-idle-fingers .ace_marker-layer .ace_active-line {\ -background: #353637\ -}\ -.ace-idle-fingers .ace_gutter-active-line {\ -background-color: #353637\ -}\ -.ace-idle-fingers .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(90, 100, 126, 0.88)\ -}\ -.ace-idle-fingers .ace_invisible {\ -color: #404040\ -}\ -.ace-idle-fingers .ace_keyword,\ -.ace-idle-fingers .ace_meta {\ -color: #CC7833\ -}\ -.ace-idle-fingers .ace_constant,\ -.ace-idle-fingers .ace_constant.ace_character,\ -.ace-idle-fingers .ace_constant.ace_character.ace_escape,\ -.ace-idle-fingers .ace_constant.ace_other,\ -.ace-idle-fingers .ace_support.ace_constant {\ -color: #6C99BB\ -}\ -.ace-idle-fingers .ace_invalid {\ -color: #FFFFFF;\ -background-color: #FF0000\ -}\ -.ace-idle-fingers .ace_fold {\ -background-color: #CC7833;\ -border-color: #FFFFFF\ -}\ -.ace-idle-fingers .ace_support.ace_function {\ -color: #B83426\ -}\ -.ace-idle-fingers .ace_variable.ace_parameter {\ -font-style: italic\ -}\ -.ace-idle-fingers .ace_string {\ -color: #A5C261\ -}\ -.ace-idle-fingers .ace_string.ace_regexp {\ -color: #CCCC33\ -}\ -.ace-idle-fingers .ace_comment {\ -font-style: italic;\ -color: #BC9458\ -}\ -.ace-idle-fingers .ace_meta.ace_tag {\ -color: #FFE5BB\ -}\ -.ace-idle-fingers .ace_entity.ace_name {\ -color: #FFC66D\ -}\ -.ace-idle-fingers .ace_collab.ace_user1 {\ -color: #323232;\ -background-color: #FFF980\ -}\ -.ace-idle-fingers .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-iplastic.js b/src/ace/theme-iplastic.js deleted file mode 100644 index 6eaf7abe3..000000000 --- a/src/ace/theme-iplastic.js +++ /dev/null @@ -1,128 +0,0 @@ -define("ace/theme/iplastic",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-iplastic"; -exports.cssText = ".ace-iplastic .ace_gutter {\ -background: #dddddd;\ -color: #666666\ -}\ -.ace-iplastic .ace_print-margin {\ -width: 1px;\ -background: #bbbbbb\ -}\ -.ace-iplastic {\ -background-color: #eeeeee;\ -color: #333333\ -}\ -.ace-iplastic .ace_cursor {\ -color: #333\ -}\ -.ace-iplastic .ace_marker-layer .ace_selection {\ -background: #BAD6FD;\ -}\ -.ace-iplastic.ace_multiselect .ace_selection.ace_start {\ -border-radius: 4px\ -}\ -.ace-iplastic .ace_marker-layer .ace_step {\ -background: #444444\ -}\ -.ace-iplastic .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #49483E;\ -background: #FFF799\ -}\ -.ace-iplastic .ace_marker-layer .ace_active-line {\ -background: #e5e5e5\ -}\ -.ace-iplastic .ace_gutter-active-line {\ -background-color: #eeeeee\ -}\ -.ace-iplastic .ace_marker-layer .ace_selected-word {\ -border: 1px solid #555555;\ -border-radius:4px\ -}\ -.ace-iplastic .ace_invisible {\ -color: #999999\ -}\ -.ace-iplastic .ace_entity.ace_name.ace_tag,\ -.ace-iplastic .ace_keyword,\ -.ace-iplastic .ace_meta.ace_tag,\ -.ace-iplastic .ace_storage {\ -color: #0000FF\ -}\ -.ace-iplastic .ace_punctuation,\ -.ace-iplastic .ace_punctuation.ace_tag {\ -color: #000\ -}\ -.ace-iplastic .ace_constant {\ -color: #333333;\ -font-weight: 700\ -}\ -.ace-iplastic .ace_constant.ace_character,\ -.ace-iplastic .ace_constant.ace_language,\ -.ace-iplastic .ace_constant.ace_numeric,\ -.ace-iplastic .ace_constant.ace_other {\ -color: #0066FF;\ -font-weight: 700\ -}\ -.ace-iplastic .ace_constant.ace_numeric{\ -font-weight: 100\ -}\ -.ace-iplastic .ace_invalid {\ -color: #F8F8F0;\ -background-color: #F92672\ -}\ -.ace-iplastic .ace_invalid.ace_deprecated {\ -color: #F8F8F0;\ -background-color: #AE81FF\ -}\ -.ace-iplastic .ace_support.ace_constant,\ -.ace-iplastic .ace_support.ace_function {\ -color: #333333;\ -font-weight: 700\ -}\ -.ace-iplastic .ace_fold {\ -background-color: #464646;\ -border-color: #F8F8F2\ -}\ -.ace-iplastic .ace_storage.ace_type,\ -.ace-iplastic .ace_support.ace_class,\ -.ace-iplastic .ace_support.ace_type {\ -color: #3333fc;\ -font-weight: 700\ -}\ -.ace-iplastic .ace_entity.ace_name.ace_function,\ -.ace-iplastic .ace_entity.ace_other,\ -.ace-iplastic .ace_entity.ace_other.ace_attribute-name,\ -.ace-iplastic .ace_variable {\ -color: #3366cc;\ -font-style: italic\ -}\ -.ace-iplastic .ace_variable.ace_parameter {\ -font-style: italic;\ -color: #2469E0\ -}\ -.ace-iplastic .ace_string {\ -color: #a55f03\ -}\ -.ace-iplastic .ace_comment {\ -color: #777777;\ -font-style: italic\ -}\ -.ace-iplastic .ace_fold-widget {\ -background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==);\ -}\ -.ace-iplastic .ace_indent-guide {\ -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\ -}"; - -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/src/ace/theme-katzenmilch.js b/src/ace/theme-katzenmilch.js deleted file mode 100644 index 596d97020..000000000 --- a/src/ace/theme-katzenmilch.js +++ /dev/null @@ -1,128 +0,0 @@ -define("ace/theme/katzenmilch",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-katzenmilch"; -exports.cssText = ".ace-katzenmilch .ace_gutter,\ -.ace-katzenmilch .ace_gutter {\ -background: #e8e8e8;\ -color: #333\ -}\ -.ace-katzenmilch .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8\ -}\ -.ace-katzenmilch {\ -background-color: #f3f2f3;\ -color: rgba(15, 0, 9, 1.0)\ -}\ -.ace-katzenmilch .ace_cursor {\ -border-left: 2px solid #100011\ -}\ -.ace-katzenmilch .ace_overwrite-cursors .ace_cursor {\ -border-left: 0px;\ -border-bottom: 1px solid #100011\ -}\ -.ace-katzenmilch .ace_marker-layer .ace_selection {\ -background: rgba(100, 5, 208, 0.27)\ -}\ -.ace-katzenmilch.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #f3f2f3;\ -}\ -.ace-katzenmilch .ace_marker-layer .ace_step {\ -background: rgb(198, 219, 174)\ -}\ -.ace-katzenmilch .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(0, 0, 0, 0.33);\ -}\ -.ace-katzenmilch .ace_marker-layer .ace_active-line {\ -background: rgb(232, 242, 254)\ -}\ -.ace-katzenmilch .ace_gutter-active-line {\ -background-color: rgb(232, 242, 254)\ -}\ -.ace-katzenmilch .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(100, 5, 208, 0.27)\ -}\ -.ace-katzenmilch .ace_invisible {\ -color: #BFBFBF\ -}\ -.ace-katzenmilch .ace_fold {\ -background-color: rgba(2, 95, 73, 0.97);\ -border-color: rgba(15, 0, 9, 1.0)\ -}\ -.ace-katzenmilch .ace_keyword {\ -color: #674Aa8;\ -rbackground-color: rgba(163, 170, 216, 0.055)\ -}\ -.ace-katzenmilch .ace_constant.ace_language {\ -color: #7D7e52;\ -rbackground-color: rgba(189, 190, 130, 0.059)\ -}\ -.ace-katzenmilch .ace_constant.ace_numeric {\ -color: rgba(79, 130, 123, 0.93);\ -rbackground-color: rgba(119, 194, 187, 0.059)\ -}\ -.ace-katzenmilch .ace_constant.ace_character,\ -.ace-katzenmilch .ace_constant.ace_other {\ -color: rgba(2, 95, 105, 1.0);\ -rbackground-color: rgba(127, 34, 153, 0.063)\ -}\ -.ace-katzenmilch .ace_support.ace_function {\ -color: #9D7e62;\ -rbackground-color: rgba(189, 190, 130, 0.039)\ -}\ -.ace-katzenmilch .ace_support.ace_class {\ -color: rgba(239, 106, 167, 1.0);\ -rbackground-color: rgba(239, 106, 167, 0.063)\ -}\ -.ace-katzenmilch .ace_storage {\ -color: rgba(123, 92, 191, 1.0);\ -rbackground-color: rgba(139, 93, 223, 0.051)\ -}\ -.ace-katzenmilch .ace_invalid {\ -color: #DFDFD5;\ -rbackground-color: #CC1B27\ -}\ -.ace-katzenmilch .ace_string {\ -color: #5a5f9b;\ -rbackground-color: rgba(170, 175, 219, 0.035)\ -}\ -.ace-katzenmilch .ace_comment {\ -font-style: italic;\ -color: rgba(64, 79, 80, 0.67);\ -rbackground-color: rgba(95, 15, 255, 0.0078)\ -}\ -.ace-katzenmilch .ace_entity.ace_name.ace_function,\ -.ace-katzenmilch .ace_variable {\ -color: rgba(2, 95, 73, 0.97);\ -rbackground-color: rgba(34, 255, 73, 0.12)\ -}\ -.ace-katzenmilch .ace_variable.ace_language {\ -color: #316fcf;\ -rbackground-color: rgba(58, 175, 255, 0.039)\ -}\ -.ace-katzenmilch .ace_variable.ace_parameter {\ -font-style: italic;\ -color: rgba(51, 150, 159, 0.87);\ -rbackground-color: rgba(5, 214, 249, 0.043)\ -}\ -.ace-katzenmilch .ace_entity.ace_other.ace_attribute-name {\ -color: rgba(73, 70, 194, 0.93);\ -rbackground-color: rgba(73, 134, 194, 0.035)\ -}\ -.ace-katzenmilch .ace_entity.ace_name.ace_tag {\ -color: #3976a2;\ -rbackground-color: rgba(73, 166, 210, 0.039)\ -}"; - -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/src/ace/theme-kr_theme.js b/src/ace/theme-kr_theme.js deleted file mode 100644 index 1509c0b1e..000000000 --- a/src/ace/theme-kr_theme.js +++ /dev/null @@ -1,111 +0,0 @@ -define("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-kr-theme"; -exports.cssText = ".ace-kr-theme .ace_gutter {\ -background: #1c1917;\ -color: #FCFFE0\ -}\ -.ace-kr-theme .ace_print-margin {\ -width: 1px;\ -background: #1c1917\ -}\ -.ace-kr-theme {\ -background-color: #0B0A09;\ -color: #FCFFE0\ -}\ -.ace-kr-theme .ace_cursor {\ -color: #FF9900\ -}\ -.ace-kr-theme .ace_marker-layer .ace_selection {\ -background: rgba(170, 0, 255, 0.45)\ -}\ -.ace-kr-theme.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #0B0A09;\ -}\ -.ace-kr-theme .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-kr-theme .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(255, 177, 111, 0.32)\ -}\ -.ace-kr-theme .ace_marker-layer .ace_active-line {\ -background: #38403D\ -}\ -.ace-kr-theme .ace_gutter-active-line {\ -background-color : #38403D\ -}\ -.ace-kr-theme .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(170, 0, 255, 0.45)\ -}\ -.ace-kr-theme .ace_invisible {\ -color: rgba(255, 177, 111, 0.32)\ -}\ -.ace-kr-theme .ace_keyword,\ -.ace-kr-theme .ace_meta {\ -color: #949C8B\ -}\ -.ace-kr-theme .ace_constant,\ -.ace-kr-theme .ace_constant.ace_character,\ -.ace-kr-theme .ace_constant.ace_character.ace_escape,\ -.ace-kr-theme .ace_constant.ace_other {\ -color: rgba(210, 117, 24, 0.76)\ -}\ -.ace-kr-theme .ace_invalid {\ -color: #F8F8F8;\ -background-color: #A41300\ -}\ -.ace-kr-theme .ace_support {\ -color: #9FC28A\ -}\ -.ace-kr-theme .ace_support.ace_constant {\ -color: #C27E66\ -}\ -.ace-kr-theme .ace_fold {\ -background-color: #949C8B;\ -border-color: #FCFFE0\ -}\ -.ace-kr-theme .ace_support.ace_function {\ -color: #85873A\ -}\ -.ace-kr-theme .ace_storage {\ -color: #FFEE80\ -}\ -.ace-kr-theme .ace_string {\ -color: rgba(164, 161, 181, 0.8)\ -}\ -.ace-kr-theme .ace_string.ace_regexp {\ -color: rgba(125, 255, 192, 0.65)\ -}\ -.ace-kr-theme .ace_comment {\ -font-style: italic;\ -color: #706D5B\ -}\ -.ace-kr-theme .ace_variable {\ -color: #D1A796\ -}\ -.ace-kr-theme .ace_list,\ -.ace-kr-theme .ace_markup.ace_list {\ -background-color: #0F0040\ -}\ -.ace-kr-theme .ace_variable.ace_language {\ -color: #FF80E1\ -}\ -.ace-kr-theme .ace_meta.ace_tag {\ -color: #BABD9C\ -}\ -.ace-kr-theme .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-kuroir.js b/src/ace/theme-kuroir.js deleted file mode 100644 index 85af8e85b..000000000 --- a/src/ace/theme-kuroir.js +++ /dev/null @@ -1,68 +0,0 @@ -define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-kuroir"; -exports.cssText = "\ -.ace-kuroir .ace_gutter {\ -background: #e8e8e8;\ -color: #333;\ -}\ -.ace-kuroir .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-kuroir {\ -background-color: #E8E9E8;\ -color: #363636;\ -}\ -.ace-kuroir .ace_cursor {\ -color: #202020;\ -}\ -.ace-kuroir .ace_marker-layer .ace_selection {\ -background: rgba(245, 170, 0, 0.57);\ -}\ -.ace-kuroir.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #E8E9E8;\ -}\ -.ace-kuroir .ace_marker-layer .ace_step {\ -background: rgb(198, 219, 174);\ -}\ -.ace-kuroir .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(0, 0, 0, 0.29);\ -}\ -.ace-kuroir .ace_marker-layer .ace_active-line {\ -background: rgba(203, 220, 47, 0.22);\ -}\ -.ace-kuroir .ace_gutter-active-line {\ -background-color: rgba(203, 220, 47, 0.22);\ -}\ -.ace-kuroir .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(245, 170, 0, 0.57);\ -}\ -.ace-kuroir .ace_invisible {\ -color: #BFBFBF\ -}\ -.ace-kuroir .ace_fold {\ -border-color: #363636;\ -}\ -.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;\ -background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;\ -font-style:italic;\ -color:#FD1732;\ -background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;\ -background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);\ -background-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;\ -background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}\ -"; - -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/src/ace/theme-merbivore.js b/src/ace/theme-merbivore.js deleted file mode 100644 index e638fb1c6..000000000 --- a/src/ace/theme-merbivore.js +++ /dev/null @@ -1,102 +0,0 @@ -define("ace/theme/merbivore",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-merbivore"; -exports.cssText = ".ace-merbivore .ace_gutter {\ -background: #202020;\ -color: #E6E1DC\ -}\ -.ace-merbivore .ace_print-margin {\ -width: 1px;\ -background: #555651\ -}\ -.ace-merbivore {\ -background-color: #161616;\ -color: #E6E1DC\ -}\ -.ace-merbivore .ace_cursor {\ -color: #FFFFFF\ -}\ -.ace-merbivore .ace_marker-layer .ace_selection {\ -background: #454545\ -}\ -.ace-merbivore.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #161616;\ -}\ -.ace-merbivore .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-merbivore .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #404040\ -}\ -.ace-merbivore .ace_marker-layer .ace_active-line {\ -background: #333435\ -}\ -.ace-merbivore .ace_gutter-active-line {\ -background-color: #333435\ -}\ -.ace-merbivore .ace_marker-layer .ace_selected-word {\ -border: 1px solid #454545\ -}\ -.ace-merbivore .ace_invisible {\ -color: #404040\ -}\ -.ace-merbivore .ace_entity.ace_name.ace_tag,\ -.ace-merbivore .ace_keyword,\ -.ace-merbivore .ace_meta,\ -.ace-merbivore .ace_meta.ace_tag,\ -.ace-merbivore .ace_storage,\ -.ace-merbivore .ace_support.ace_function {\ -color: #FC6F09\ -}\ -.ace-merbivore .ace_constant,\ -.ace-merbivore .ace_constant.ace_character,\ -.ace-merbivore .ace_constant.ace_character.ace_escape,\ -.ace-merbivore .ace_constant.ace_other,\ -.ace-merbivore .ace_support.ace_type {\ -color: #1EDAFB\ -}\ -.ace-merbivore .ace_constant.ace_character.ace_escape {\ -color: #519F50\ -}\ -.ace-merbivore .ace_constant.ace_language {\ -color: #FDC251\ -}\ -.ace-merbivore .ace_constant.ace_library,\ -.ace-merbivore .ace_string,\ -.ace-merbivore .ace_support.ace_constant {\ -color: #8DFF0A\ -}\ -.ace-merbivore .ace_constant.ace_numeric {\ -color: #58C554\ -}\ -.ace-merbivore .ace_invalid {\ -color: #FFFFFF;\ -background-color: #990000\ -}\ -.ace-merbivore .ace_fold {\ -background-color: #FC6F09;\ -border-color: #E6E1DC\ -}\ -.ace-merbivore .ace_comment {\ -font-style: italic;\ -color: #AD2EA4\ -}\ -.ace-merbivore .ace_entity.ace_other.ace_attribute-name {\ -color: #FFFF89\ -}\ -.ace-merbivore .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-merbivore_soft.js b/src/ace/theme-merbivore_soft.js deleted file mode 100644 index d79865b0f..000000000 --- a/src/ace/theme-merbivore_soft.js +++ /dev/null @@ -1,103 +0,0 @@ -define("ace/theme/merbivore_soft",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-merbivore-soft"; -exports.cssText = ".ace-merbivore-soft .ace_gutter {\ -background: #262424;\ -color: #E6E1DC\ -}\ -.ace-merbivore-soft .ace_print-margin {\ -width: 1px;\ -background: #262424\ -}\ -.ace-merbivore-soft {\ -background-color: #1C1C1C;\ -color: #E6E1DC\ -}\ -.ace-merbivore-soft .ace_cursor {\ -color: #FFFFFF\ -}\ -.ace-merbivore-soft .ace_marker-layer .ace_selection {\ -background: #494949\ -}\ -.ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #1C1C1C;\ -}\ -.ace-merbivore-soft .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-merbivore-soft .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #404040\ -}\ -.ace-merbivore-soft .ace_marker-layer .ace_active-line {\ -background: #333435\ -}\ -.ace-merbivore-soft .ace_gutter-active-line {\ -background-color: #333435\ -}\ -.ace-merbivore-soft .ace_marker-layer .ace_selected-word {\ -border: 1px solid #494949\ -}\ -.ace-merbivore-soft .ace_invisible {\ -color: #404040\ -}\ -.ace-merbivore-soft .ace_entity.ace_name.ace_tag,\ -.ace-merbivore-soft .ace_keyword,\ -.ace-merbivore-soft .ace_meta,\ -.ace-merbivore-soft .ace_meta.ace_tag,\ -.ace-merbivore-soft .ace_storage {\ -color: #FC803A\ -}\ -.ace-merbivore-soft .ace_constant,\ -.ace-merbivore-soft .ace_constant.ace_character,\ -.ace-merbivore-soft .ace_constant.ace_character.ace_escape,\ -.ace-merbivore-soft .ace_constant.ace_other,\ -.ace-merbivore-soft .ace_support.ace_type {\ -color: #68C1D8\ -}\ -.ace-merbivore-soft .ace_constant.ace_character.ace_escape {\ -color: #B3E5B4\ -}\ -.ace-merbivore-soft .ace_constant.ace_language {\ -color: #E1C582\ -}\ -.ace-merbivore-soft .ace_constant.ace_library,\ -.ace-merbivore-soft .ace_string,\ -.ace-merbivore-soft .ace_support.ace_constant {\ -color: #8EC65F\ -}\ -.ace-merbivore-soft .ace_constant.ace_numeric {\ -color: #7FC578\ -}\ -.ace-merbivore-soft .ace_invalid,\ -.ace-merbivore-soft .ace_invalid.ace_deprecated {\ -color: #FFFFFF;\ -background-color: #FE3838\ -}\ -.ace-merbivore-soft .ace_fold {\ -background-color: #FC803A;\ -border-color: #E6E1DC\ -}\ -.ace-merbivore-soft .ace_comment,\ -.ace-merbivore-soft .ace_meta {\ -font-style: italic;\ -color: #AC4BB8\ -}\ -.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {\ -color: #EAF1A3\ -}\ -.ace-merbivore-soft .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-mono_industrial.js b/src/ace/theme-mono_industrial.js deleted file mode 100644 index 0bd57662e..000000000 --- a/src/ace/theme-mono_industrial.js +++ /dev/null @@ -1,114 +0,0 @@ -define("ace/theme/mono_industrial",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-mono-industrial"; -exports.cssText = ".ace-mono-industrial .ace_gutter {\ -background: #1d2521;\ -color: #C5C9C9\ -}\ -.ace-mono-industrial .ace_print-margin {\ -width: 1px;\ -background: #555651\ -}\ -.ace-mono-industrial {\ -background-color: #222C28;\ -color: #FFFFFF\ -}\ -.ace-mono-industrial .ace_cursor {\ -color: #FFFFFF\ -}\ -.ace-mono-industrial .ace_marker-layer .ace_selection {\ -background: rgba(145, 153, 148, 0.40)\ -}\ -.ace-mono-industrial.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #222C28;\ -}\ -.ace-mono-industrial .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-mono-industrial .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(102, 108, 104, 0.50)\ -}\ -.ace-mono-industrial .ace_marker-layer .ace_active-line {\ -background: rgba(12, 13, 12, 0.25)\ -}\ -.ace-mono-industrial .ace_gutter-active-line {\ -background-color: rgba(12, 13, 12, 0.25)\ -}\ -.ace-mono-industrial .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(145, 153, 148, 0.40)\ -}\ -.ace-mono-industrial .ace_invisible {\ -color: rgba(102, 108, 104, 0.50)\ -}\ -.ace-mono-industrial .ace_string {\ -background-color: #151C19;\ -color: #FFFFFF\ -}\ -.ace-mono-industrial .ace_keyword,\ -.ace-mono-industrial .ace_meta {\ -color: #A39E64\ -}\ -.ace-mono-industrial .ace_constant,\ -.ace-mono-industrial .ace_constant.ace_character,\ -.ace-mono-industrial .ace_constant.ace_character.ace_escape,\ -.ace-mono-industrial .ace_constant.ace_numeric,\ -.ace-mono-industrial .ace_constant.ace_other {\ -color: #E98800\ -}\ -.ace-mono-industrial .ace_entity.ace_name.ace_function,\ -.ace-mono-industrial .ace_keyword.ace_operator,\ -.ace-mono-industrial .ace_variable {\ -color: #A8B3AB\ -}\ -.ace-mono-industrial .ace_invalid {\ -color: #FFFFFF;\ -background-color: rgba(153, 0, 0, 0.68)\ -}\ -.ace-mono-industrial .ace_support.ace_constant {\ -color: #C87500\ -}\ -.ace-mono-industrial .ace_fold {\ -background-color: #A8B3AB;\ -border-color: #FFFFFF\ -}\ -.ace-mono-industrial .ace_support.ace_function {\ -color: #588E60\ -}\ -.ace-mono-industrial .ace_entity.ace_name,\ -.ace-mono-industrial .ace_support.ace_class,\ -.ace-mono-industrial .ace_support.ace_type {\ -color: #5778B6\ -}\ -.ace-mono-industrial .ace_storage {\ -color: #C23B00\ -}\ -.ace-mono-industrial .ace_variable.ace_language,\ -.ace-mono-industrial .ace_variable.ace_parameter {\ -color: #648BD2\ -}\ -.ace-mono-industrial .ace_comment {\ -color: #666C68;\ -background-color: #151C19\ -}\ -.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {\ -color: #909993\ -}\ -.ace-mono-industrial .ace_entity.ace_name.ace_tag {\ -color: #A65EFF\ -}\ -.ace-mono-industrial .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-monokai.js b/src/ace/theme-monokai.js deleted file mode 100644 index 7eed6b445..000000000 --- a/src/ace/theme-monokai.js +++ /dev/null @@ -1,112 +0,0 @@ -define("ace/theme/monokai",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-monokai"; -exports.cssText = ".ace-monokai .ace_gutter {\ -background: #2F3129;\ -color: #8F908A\ -}\ -.ace-monokai .ace_print-margin {\ -width: 1px;\ -background: #555651\ -}\ -.ace-monokai {\ -background-color: #272822;\ -color: #F8F8F2\ -}\ -.ace-monokai .ace_cursor {\ -color: #F8F8F0\ -}\ -.ace-monokai .ace_marker-layer .ace_selection {\ -background: #49483E\ -}\ -.ace-monokai.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #272822;\ -}\ -.ace-monokai .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-monokai .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #49483E\ -}\ -.ace-monokai .ace_marker-layer .ace_active-line {\ -background: #202020\ -}\ -.ace-monokai .ace_gutter-active-line {\ -background-color: #272727\ -}\ -.ace-monokai .ace_marker-layer .ace_selected-word {\ -border: 1px solid #49483E\ -}\ -.ace-monokai .ace_invisible {\ -color: #52524d\ -}\ -.ace-monokai .ace_entity.ace_name.ace_tag,\ -.ace-monokai .ace_keyword,\ -.ace-monokai .ace_meta.ace_tag,\ -.ace-monokai .ace_storage {\ -color: #F92672\ -}\ -.ace-monokai .ace_punctuation,\ -.ace-monokai .ace_punctuation.ace_tag {\ -color: #fff\ -}\ -.ace-monokai .ace_constant.ace_character,\ -.ace-monokai .ace_constant.ace_language,\ -.ace-monokai .ace_constant.ace_numeric,\ -.ace-monokai .ace_constant.ace_other {\ -color: #AE81FF\ -}\ -.ace-monokai .ace_invalid {\ -color: #F8F8F0;\ -background-color: #F92672\ -}\ -.ace-monokai .ace_invalid.ace_deprecated {\ -color: #F8F8F0;\ -background-color: #AE81FF\ -}\ -.ace-monokai .ace_support.ace_constant,\ -.ace-monokai .ace_support.ace_function {\ -color: #66D9EF\ -}\ -.ace-monokai .ace_fold {\ -background-color: #A6E22E;\ -border-color: #F8F8F2\ -}\ -.ace-monokai .ace_storage.ace_type,\ -.ace-monokai .ace_support.ace_class,\ -.ace-monokai .ace_support.ace_type {\ -font-style: italic;\ -color: #66D9EF\ -}\ -.ace-monokai .ace_entity.ace_name.ace_function,\ -.ace-monokai .ace_entity.ace_other,\ -.ace-monokai .ace_entity.ace_other.ace_attribute-name,\ -.ace-monokai .ace_variable {\ -color: #A6E22E\ -}\ -.ace-monokai .ace_variable.ace_parameter {\ -font-style: italic;\ -color: #FD971F\ -}\ -.ace-monokai .ace_string {\ -color: #E6DB74\ -}\ -.ace-monokai .ace_comment {\ -color: #75715E\ -}\ -.ace-monokai .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-nord_dark.js b/src/ace/theme-nord_dark.js deleted file mode 100644 index f99f6da8e..000000000 --- a/src/ace/theme-nord_dark.js +++ /dev/null @@ -1,101 +0,0 @@ -define("ace/theme/nord_dark", ["require", "exports", "module", "ace/lib/dom"], function (require, exports, module) { - - exports.isDark = true; - exports.cssClass = "ace-nord-dark"; - exports.cssText = ".ace-nord-dark .ace_gutter {\ -color: #616e88;\ -}\ -.ace-nord-dark .ace_print-margin {\ -width: 1px;\ -background: #4c566a;\ -}\ -.ace-nord-dark {\ -background-color: #2e3440;\ -color: #d8dee9;\ -}\ -.ace-nord-dark .ace_entity.ace_other.ace_attribute-name,\ -.ace-nord-dark .ace_storage {\ -color: #d8dee9;\ -}\ -.ace-nord-dark .ace_cursor {\ -color: #d8dee9;\ -},\ -.ace-nord-dark .ace_string.ace_regexp {\ -color: #bf616a;\ -}\ -.ace-nord-dark .ace_marker-layer .ace_active-line {\ -background: rgba(67, 76, 94, 0.8);\ -}\ -.ace-nord-dark .ace_marker-layer .ace_selection {\ -background: rgba(67, 76, 94, 0.8);\ -}\ -.ace-nord-dark.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #2e3440;\ -}\ -.ace-nord-dark .ace_marker-layer .ace_step {\ -background: #ebcb8b;\ -}\ -.ace-nord-dark .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(136, 192, 208, 0.4);\ -}\ -.ace-nord-dark .ace_gutter-active-line {\ -background-color: rgba(67, 76, 94, 0.8);\ -}\ -.ace-nord-dark .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(136, 192, 208, 0.4);\ -}\ -.ace-nord-dark .ace_invisible {\ -color: #4c566a;\ -}\ -.ace-nord-dark .ace_keyword,\ -.ace-nord-dark .ace_meta,\ -.ace-nord-dark .ace_support.ace_class,\ -.ace-nord-dark .ace_support.ace_type {\ -color: #81a1c1;\ -}\ -.ace-nord-dark .ace_constant.ace_character,\ -.ace-nord-dark .ace_constant.ace_other {\ -color: #d8dee9;\ -}\ -.ace-nord-dark .ace_constant.ace_language {\ -color: #5e81ac;\ -}\ -.ace-nord-dark .ace_constant.ace_escape {\ -color: #ebcB8b;\ -}\ -.ace-nord-dark .ace_constant.ace_numeric {\ -color: #b48ead;\ -}\ -.ace-nord-dark .ace_fold {\ -background-color: #4c566a;\ -border-color: #d8dee9;\ -}\ -.ace-nord-dark .ace_entity.ace_name.ace_function,\ -.ace-nord-dark .ace_entity.ace_name.ace_tag,\ -.ace-nord-dark .ace_support.ace_function,\ -.ace-nord-dark .ace_variable,\ -.ace-nord-dark .ace_variable.ace_language {\ -color: #8fbcbb;\ -}\ -.ace-nord-dark .ace_string {\ -color: #a3be8c;\ -}\ -.ace-nord-dark .ace_comment {\ -color: #616e88;\ -}\ -.ace-nord-dark .ace_indent-guide {\ -box-shadow: inset -1px 0 0 0 rgba(67, 76, 94, 0.7);\ -}\ -"; - 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; - } - }); -})(); diff --git a/src/ace/theme-one_dark.js b/src/ace/theme-one_dark.js deleted file mode 100644 index b99f2287b..000000000 --- a/src/ace/theme-one_dark.js +++ /dev/null @@ -1,139 +0,0 @@ -define("ace/theme/one_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - - exports.isDark = true; - exports.cssClass = "ace-one-dark"; - exports.cssText = ".ace-one-dark .ace_gutter {\ -background: #282c34;\ -color: #6a6f7a\ -}\ -.ace-one-dark .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8\ -}\ -.ace-one-dark {\ -background-color: #282c34;\ -color: #abb2bf\ -}\ -.ace-one-dark .ace_cursor {\ -color: #528bff\ -}\ -.ace-one-dark .ace_marker-layer .ace_selection {\ -background: #3d4350\ -}\ -.ace-one-dark.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0 #282c34;\ -border-radius: 2px\ -}\ -.ace-one-dark .ace_marker-layer .ace_step {\ -background: #c6dbae\ -}\ -.ace-one-dark .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #747369\ -}\ -.ace-one-dark .ace_marker-layer .ace_active-line {\ -background: rgba(76, 87, 103, .19)\ -}\ -.ace-one-dark .ace_gutter-active-line {\ -background-color: rgba(76, 87, 103, .19)\ -}\ -.ace-one-dark .ace_marker-layer .ace_selected-word {\ -border: 1px solid #3d4350\ -}\ -.ace-one-dark .ace_fold {\ -background-color: #61afef;\ -border-color: #abb2bf\ -}\ -.ace-one-dark .ace_keyword {\ -color: #c678dd\ -}\ -.ace-one-dark .ace_keyword.ace_operator {\ -color: #c678dd\ -}\ -.ace-one-dark .ace_keyword.ace_other.ace_unit {\ -color: #d19a66\ -}\ -.ace-one-dark .ace_constant.ace_language {\ -color: #d19a66\ -}\ -.ace-one-dark .ace_constant.ace_numeric {\ -color: #d19a66\ -}\ -.ace-one-dark .ace_constant.ace_character {\ -color: #56b6c2\ -}\ -.ace-one-dark .ace_constant.ace_other {\ -color: #56b6c2\ -}\ -.ace-one-dark .ace_support.ace_function {\ -color: #61afef\ -}\ -.ace-one-dark .ace_support.ace_constant {\ -color: #d19a66\ -}\ -.ace-one-dark .ace_support.ace_class {\ -color: #e5c07b\ -}\ -.ace-one-dark .ace_support.ace_type {\ -color: #e5c07b\ -}\ -.ace-one-dark .ace_storage {\ -color: #c678dd\ -}\ -.ace-one-dark .ace_storage.ace_type {\ -color: #c678dd\ -}\ -.ace-one-dark .ace_invalid {\ -color: #fff;\ -background-color: #f2777a\ -}\ -.ace-one-dark .ace_invalid.ace_deprecated {\ -color: #272b33;\ -background-color: #d27b53\ -}\ -.ace-one-dark .ace_string {\ -color: #98c379\ -}\ -.ace-one-dark .ace_string.ace_regexp {\ -color: #e06c75\ -}\ -.ace-one-dark .ace_comment {\ -font-style: italic;\ -color: #5c6370\ -}\ -.ace-one-dark .ace_variable {\ -color: #e06c75\ -}\ -.ace-one-dark .ace_variable.ace_parameter {\ -color: #d19a66\ -}\ -.ace-one-dark .ace_meta.ace_tag {\ -color: #e06c75\ -}\ -.ace-one-dark .ace_entity.ace_other.ace_attribute-name {\ -color: #e06c75\ -}\ -.ace-one-dark .ace_entity.ace_name.ace_function {\ -color: #61afef\ -}\ -.ace-one-dark .ace_entity.ace_name.ace_tag {\ -color: #e06c75\ -}\ -.ace-one-dark .ace_markup.ace_heading {\ -color: #98c379\ -}\ -.ace-one-dark .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\ -}\ -"; - - 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/src/ace/theme-pastel_on_dark.js b/src/ace/theme-pastel_on_dark.js deleted file mode 100644 index cc51053dc..000000000 --- a/src/ace/theme-pastel_on_dark.js +++ /dev/null @@ -1,115 +0,0 @@ -define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-pastel-on-dark"; -exports.cssText = ".ace-pastel-on-dark .ace_gutter {\ -background: #353030;\ -color: #8F938F\ -}\ -.ace-pastel-on-dark .ace_print-margin {\ -width: 1px;\ -background: #353030\ -}\ -.ace-pastel-on-dark {\ -background-color: #2C2828;\ -color: #8F938F\ -}\ -.ace-pastel-on-dark .ace_cursor {\ -color: #A7A7A7\ -}\ -.ace-pastel-on-dark .ace_marker-layer .ace_selection {\ -background: rgba(221, 240, 255, 0.20)\ -}\ -.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #2C2828;\ -}\ -.ace-pastel-on-dark .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(255, 255, 255, 0.25)\ -}\ -.ace-pastel-on-dark .ace_marker-layer .ace_active-line {\ -background: rgba(255, 255, 255, 0.031)\ -}\ -.ace-pastel-on-dark .ace_gutter-active-line {\ -background-color: rgba(255, 255, 255, 0.031)\ -}\ -.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(221, 240, 255, 0.20)\ -}\ -.ace-pastel-on-dark .ace_invisible {\ -color: rgba(255, 255, 255, 0.25)\ -}\ -.ace-pastel-on-dark .ace_keyword,\ -.ace-pastel-on-dark .ace_meta {\ -color: #757aD8\ -}\ -.ace-pastel-on-dark .ace_constant,\ -.ace-pastel-on-dark .ace_constant.ace_character,\ -.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,\ -.ace-pastel-on-dark .ace_constant.ace_other {\ -color: #4FB7C5\ -}\ -.ace-pastel-on-dark .ace_keyword.ace_operator {\ -color: #797878\ -}\ -.ace-pastel-on-dark .ace_constant.ace_character {\ -color: #AFA472\ -}\ -.ace-pastel-on-dark .ace_constant.ace_language {\ -color: #DE8E30\ -}\ -.ace-pastel-on-dark .ace_constant.ace_numeric {\ -color: #CCCCCC\ -}\ -.ace-pastel-on-dark .ace_invalid,\ -.ace-pastel-on-dark .ace_invalid.ace_illegal {\ -color: #F8F8F8;\ -background-color: rgba(86, 45, 86, 0.75)\ -}\ -.ace-pastel-on-dark .ace_invalid.ace_deprecated {\ -text-decoration: underline;\ -font-style: italic;\ -color: #D2A8A1\ -}\ -.ace-pastel-on-dark .ace_fold {\ -background-color: #757aD8;\ -border-color: #8F938F\ -}\ -.ace-pastel-on-dark .ace_support.ace_function {\ -color: #AEB2F8\ -}\ -.ace-pastel-on-dark .ace_string {\ -color: #66A968\ -}\ -.ace-pastel-on-dark .ace_string.ace_regexp {\ -color: #E9C062\ -}\ -.ace-pastel-on-dark .ace_comment {\ -color: #A6C6FF\ -}\ -.ace-pastel-on-dark .ace_variable {\ -color: #BEBF55\ -}\ -.ace-pastel-on-dark .ace_variable.ace_language {\ -color: #C1C144\ -}\ -.ace-pastel-on-dark .ace_xml-pe {\ -color: #494949\ -}\ -.ace-pastel-on-dark .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-solarized_dark.js b/src/ace/theme-solarized_dark.js deleted file mode 100644 index e9a2664d1..000000000 --- a/src/ace/theme-solarized_dark.js +++ /dev/null @@ -1,95 +0,0 @@ -define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-solarized-dark"; -exports.cssText = ".ace-solarized-dark .ace_gutter {\ -background: #01313f;\ -color: #d0edf7\ -}\ -.ace-solarized-dark .ace_print-margin {\ -width: 1px;\ -background: #33555E\ -}\ -.ace-solarized-dark {\ -background-color: #002B36;\ -color: #93A1A1\ -}\ -.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,\ -.ace-solarized-dark .ace_storage {\ -color: #93A1A1\ -}\ -.ace-solarized-dark .ace_cursor,\ -.ace-solarized-dark .ace_string.ace_regexp {\ -color: #D30102\ -}\ -.ace-solarized-dark .ace_marker-layer .ace_active-line,\ -.ace-solarized-dark .ace_marker-layer .ace_selection {\ -background: rgba(255, 255, 255, 0.1)\ -}\ -.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #002B36;\ -}\ -.ace-solarized-dark .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-solarized-dark .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(147, 161, 161, 0.50)\ -}\ -.ace-solarized-dark .ace_gutter-active-line {\ -background-color: #0d3440\ -}\ -.ace-solarized-dark .ace_marker-layer .ace_selected-word {\ -border: 1px solid #073642\ -}\ -.ace-solarized-dark .ace_invisible {\ -color: rgba(147, 161, 161, 0.50)\ -}\ -.ace-solarized-dark .ace_keyword,\ -.ace-solarized-dark .ace_meta,\ -.ace-solarized-dark .ace_support.ace_class,\ -.ace-solarized-dark .ace_support.ace_type {\ -color: #859900\ -}\ -.ace-solarized-dark .ace_constant.ace_character,\ -.ace-solarized-dark .ace_constant.ace_other {\ -color: #CB4B16\ -}\ -.ace-solarized-dark .ace_constant.ace_language {\ -color: #B58900\ -}\ -.ace-solarized-dark .ace_constant.ace_numeric {\ -color: #D33682\ -}\ -.ace-solarized-dark .ace_fold {\ -background-color: #268BD2;\ -border-color: #93A1A1\ -}\ -.ace-solarized-dark .ace_entity.ace_name.ace_function,\ -.ace-solarized-dark .ace_entity.ace_name.ace_tag,\ -.ace-solarized-dark .ace_support.ace_function,\ -.ace-solarized-dark .ace_variable,\ -.ace-solarized-dark .ace_variable.ace_language {\ -color: #268BD2\ -}\ -.ace-solarized-dark .ace_string {\ -color: #2AA198\ -}\ -.ace-solarized-dark .ace_comment {\ -font-style: italic;\ -color: #657B83\ -}\ -.ace-solarized-dark .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-solarized_light.js b/src/ace/theme-solarized_light.js deleted file mode 100644 index 2746ea63c..000000000 --- a/src/ace/theme-solarized_light.js +++ /dev/null @@ -1,98 +0,0 @@ -define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-solarized-light"; -exports.cssText = ".ace-solarized-light .ace_gutter {\ -background: #fbf1d3;\ -color: #333\ -}\ -.ace-solarized-light .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8\ -}\ -.ace-solarized-light {\ -background-color: #FDF6E3;\ -color: #586E75\ -}\ -.ace-solarized-light .ace_cursor {\ -color: #000000\ -}\ -.ace-solarized-light .ace_marker-layer .ace_selection {\ -background: rgba(7, 54, 67, 0.09)\ -}\ -.ace-solarized-light.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #FDF6E3;\ -}\ -.ace-solarized-light .ace_marker-layer .ace_step {\ -background: rgb(255, 255, 0)\ -}\ -.ace-solarized-light .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(147, 161, 161, 0.50)\ -}\ -.ace-solarized-light .ace_marker-layer .ace_active-line {\ -background: #EEE8D5\ -}\ -.ace-solarized-light .ace_gutter-active-line {\ -background-color : #EDE5C1\ -}\ -.ace-solarized-light .ace_marker-layer .ace_selected-word {\ -border: 1px solid #7f9390\ -}\ -.ace-solarized-light .ace_invisible {\ -color: rgba(147, 161, 161, 0.50)\ -}\ -.ace-solarized-light .ace_keyword,\ -.ace-solarized-light .ace_meta,\ -.ace-solarized-light .ace_support.ace_class,\ -.ace-solarized-light .ace_support.ace_type {\ -color: #859900\ -}\ -.ace-solarized-light .ace_constant.ace_character,\ -.ace-solarized-light .ace_constant.ace_other {\ -color: #CB4B16\ -}\ -.ace-solarized-light .ace_constant.ace_language {\ -color: #B58900\ -}\ -.ace-solarized-light .ace_constant.ace_numeric {\ -color: #D33682\ -}\ -.ace-solarized-light .ace_fold {\ -background-color: #268BD2;\ -border-color: #586E75\ -}\ -.ace-solarized-light .ace_entity.ace_name.ace_function,\ -.ace-solarized-light .ace_entity.ace_name.ace_tag,\ -.ace-solarized-light .ace_support.ace_function,\ -.ace-solarized-light .ace_variable,\ -.ace-solarized-light .ace_variable.ace_language {\ -color: #268BD2\ -}\ -.ace-solarized-light .ace_storage {\ -color: #073642\ -}\ -.ace-solarized-light .ace_string {\ -color: #2AA198\ -}\ -.ace-solarized-light .ace_string.ace_regexp {\ -color: #D30102\ -}\ -.ace-solarized-light .ace_comment,\ -.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\ -color: #93A1A1\ -}\ -.ace-solarized-light .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-sqlserver.js b/src/ace/theme-sqlserver.js deleted file mode 100644 index 1b626a28f..000000000 --- a/src/ace/theme-sqlserver.js +++ /dev/null @@ -1,145 +0,0 @@ -define("ace/theme/sqlserver",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-sqlserver"; -exports.cssText = ".ace-sqlserver .ace_gutter {\ -background: #ebebeb;\ -color: #333;\ -overflow: hidden;\ -}\ -.ace-sqlserver .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-sqlserver {\ -background-color: #FFFFFF;\ -color: black;\ -}\ -.ace-sqlserver .ace_identifier {\ -color: black;\ -}\ -.ace-sqlserver .ace_keyword {\ -color: #0000FF;\ -}\ -.ace-sqlserver .ace_numeric {\ -color: black;\ -}\ -.ace-sqlserver .ace_storage {\ -color: #11B7BE;\ -}\ -.ace-sqlserver .ace_keyword.ace_operator,\ -.ace-sqlserver .ace_lparen,\ -.ace-sqlserver .ace_rparen,\ -.ace-sqlserver .ace_punctuation {\ -color: #808080;\ -}\ -.ace-sqlserver .ace_set.ace_statement {\ -color: #0000FF;\ -text-decoration: underline;\ -}\ -.ace-sqlserver .ace_cursor {\ -color: black;\ -}\ -.ace-sqlserver .ace_invisible {\ -color: rgb(191, 191, 191);\ -}\ -.ace-sqlserver .ace_constant.ace_buildin {\ -color: rgb(88, 72, 246);\ -}\ -.ace-sqlserver .ace_constant.ace_language {\ -color: #979797;\ -}\ -.ace-sqlserver .ace_constant.ace_library {\ -color: rgb(6, 150, 14);\ -}\ -.ace-sqlserver .ace_invalid {\ -background-color: rgb(153, 0, 0);\ -color: white;\ -}\ -.ace-sqlserver .ace_support.ace_function {\ -color: #FF00FF;\ -}\ -.ace-sqlserver .ace_support.ace_constant {\ -color: rgb(6, 150, 14);\ -}\ -.ace-sqlserver .ace_class {\ -color: #008080;\ -}\ -.ace-sqlserver .ace_support.ace_other {\ -color: #6D79DE;\ -}\ -.ace-sqlserver .ace_variable.ace_parameter {\ -font-style: italic;\ -color: #FD971F;\ -}\ -.ace-sqlserver .ace_comment {\ -color: #008000;\ -}\ -.ace-sqlserver .ace_constant.ace_numeric {\ -color: black;\ -}\ -.ace-sqlserver .ace_variable {\ -color: rgb(49, 132, 149);\ -}\ -.ace-sqlserver .ace_xml-pe {\ -color: rgb(104, 104, 91);\ -}\ -.ace-sqlserver .ace_support.ace_storedprocedure {\ -color: #800000;\ -}\ -.ace-sqlserver .ace_heading {\ -color: rgb(12, 7, 255);\ -}\ -.ace-sqlserver .ace_list {\ -color: rgb(185, 6, 144);\ -}\ -.ace-sqlserver .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-sqlserver .ace_marker-layer .ace_step {\ -background: rgb(252, 255, 0);\ -}\ -.ace-sqlserver .ace_marker-layer .ace_stack {\ -background: rgb(164, 229, 101);\ -}\ -.ace-sqlserver .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-sqlserver .ace_marker-layer .ace_active-line {\ -background: rgba(0, 0, 0, 0.07);\ -}\ -.ace-sqlserver .ace_gutter-active-line {\ -background-color: #dcdcdc;\ -}\ -.ace-sqlserver .ace_marker-layer .ace_selected-word {\ -background: rgb(250, 250, 255);\ -border: 1px solid rgb(200, 200, 250);\ -}\ -.ace-sqlserver .ace_meta.ace_tag {\ -color: #0000FF;\ -}\ -.ace-sqlserver .ace_string.ace_regex {\ -color: #FF0000;\ -}\ -.ace-sqlserver .ace_string {\ -color: #FF0000;\ -}\ -.ace-sqlserver .ace_entity.ace_other.ace_attribute-name {\ -color: #994409;\ -}\ -.ace-sqlserver .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ -}\ -"; - -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/src/ace/theme-terminal.js b/src/ace/theme-terminal.js deleted file mode 100644 index b10de0bd3..000000000 --- a/src/ace/theme-terminal.js +++ /dev/null @@ -1,121 +0,0 @@ -define("ace/theme/terminal",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-terminal-theme"; -exports.cssText = ".ace-terminal-theme .ace_gutter {\ -background: #1a0005;\ -color: steelblue\ -}\ -.ace-terminal-theme .ace_print-margin {\ -width: 1px;\ -background: #1a1a1a\ -}\ -.ace-terminal-theme {\ -background-color: black;\ -color: #DEDEDE\ -}\ -.ace-terminal-theme .ace_cursor {\ -color: #9F9F9F\ -}\ -.ace-terminal-theme .ace_marker-layer .ace_selection {\ -background: #424242\ -}\ -.ace-terminal-theme.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px black;\ -}\ -.ace-terminal-theme .ace_marker-layer .ace_step {\ -background: rgb(0, 0, 0)\ -}\ -.ace-terminal-theme .ace_marker-layer .ace_bracket {\ -background: #090;\ -}\ -.ace-terminal-theme .ace_marker-layer .ace_bracket-start {\ -background: #090;\ -}\ -.ace-terminal-theme .ace_marker-layer .ace_bracket-unmatched {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #900\ -}\ -.ace-terminal-theme .ace_marker-layer .ace_active-line {\ -background: #2A2A2A\ -}\ -.ace-terminal-theme .ace_gutter-active-line {\ -background-color: #2A112A\ -}\ -.ace-terminal-theme .ace_marker-layer .ace_selected-word {\ -border: 1px solid #424242\ -}\ -.ace-terminal-theme .ace_invisible {\ -color: #343434\ -}\ -.ace-terminal-theme .ace_keyword,\ -.ace-terminal-theme .ace_meta,\ -.ace-terminal-theme .ace_storage,\ -.ace-terminal-theme .ace_storage.ace_type,\ -.ace-terminal-theme .ace_support.ace_type {\ -color: tomato\ -}\ -.ace-terminal-theme .ace_keyword.ace_operator {\ -color: deeppink\ -}\ -.ace-terminal-theme .ace_constant.ace_character,\ -.ace-terminal-theme .ace_constant.ace_language,\ -.ace-terminal-theme .ace_constant.ace_numeric,\ -.ace-terminal-theme .ace_keyword.ace_other.ace_unit,\ -.ace-terminal-theme .ace_support.ace_constant,\ -.ace-terminal-theme .ace_variable.ace_parameter {\ -color: #E78C45\ -}\ -.ace-terminal-theme .ace_constant.ace_other {\ -color: gold\ -}\ -.ace-terminal-theme .ace_invalid {\ -color: yellow;\ -background-color: red\ -}\ -.ace-terminal-theme .ace_invalid.ace_deprecated {\ -color: #CED2CF;\ -background-color: #B798BF\ -}\ -.ace-terminal-theme .ace_fold {\ -background-color: #7AA6DA;\ -border-color: #DEDEDE\ -}\ -.ace-terminal-theme .ace_entity.ace_name.ace_function,\ -.ace-terminal-theme .ace_support.ace_function,\ -.ace-terminal-theme .ace_variable {\ -color: #7AA6DA\ -}\ -.ace-terminal-theme .ace_support.ace_class,\ -.ace-terminal-theme .ace_support.ace_type {\ -color: #E7C547\ -}\ -.ace-terminal-theme .ace_heading,\ -.ace-terminal-theme .ace_string {\ -color: #B9CA4A\ -}\ -.ace-terminal-theme .ace_entity.ace_name.ace_tag,\ -.ace-terminal-theme .ace_entity.ace_other.ace_attribute-name,\ -.ace-terminal-theme .ace_meta.ace_tag,\ -.ace-terminal-theme .ace_string.ace_regexp,\ -.ace-terminal-theme .ace_variable {\ -color: #D54E53\ -}\ -.ace-terminal-theme .ace_comment {\ -color: orangered\ -}\ -.ace-terminal-theme .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLBWV/8PAAK4AYnhiq+xAAAAAElFTkSuQmCC) right repeat-y;\ -}\ -"; - -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/src/ace/theme-textmate.js b/src/ace/theme-textmate.js deleted file mode 100644 index dc651d74b..000000000 --- a/src/ace/theme-textmate.js +++ /dev/null @@ -1,137 +0,0 @@ -define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -exports.isDark = false; -exports.cssClass = "ace-tm"; -exports.cssText = ".ace-tm .ace_gutter {\ -background: #f0f0f0;\ -color: #333;\ -}\ -.ace-tm .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-tm .ace_fold {\ -background-color: #6B72E6;\ -}\ -.ace-tm {\ -background-color: #FFFFFF;\ -color: black;\ -}\ -.ace-tm .ace_cursor {\ -color: black;\ -}\ -.ace-tm .ace_invisible {\ -color: rgb(191, 191, 191);\ -}\ -.ace-tm .ace_storage,\ -.ace-tm .ace_keyword {\ -color: blue;\ -}\ -.ace-tm .ace_constant {\ -color: rgb(197, 6, 11);\ -}\ -.ace-tm .ace_constant.ace_buildin {\ -color: rgb(88, 72, 246);\ -}\ -.ace-tm .ace_constant.ace_language {\ -color: rgb(88, 92, 246);\ -}\ -.ace-tm .ace_constant.ace_library {\ -color: rgb(6, 150, 14);\ -}\ -.ace-tm .ace_invalid {\ -background-color: rgba(255, 0, 0, 0.1);\ -color: red;\ -}\ -.ace-tm .ace_support.ace_function {\ -color: rgb(60, 76, 114);\ -}\ -.ace-tm .ace_support.ace_constant {\ -color: rgb(6, 150, 14);\ -}\ -.ace-tm .ace_support.ace_type,\ -.ace-tm .ace_support.ace_class {\ -color: rgb(109, 121, 222);\ -}\ -.ace-tm .ace_keyword.ace_operator {\ -color: rgb(104, 118, 135);\ -}\ -.ace-tm .ace_string {\ -color: rgb(3, 106, 7);\ -}\ -.ace-tm .ace_comment {\ -color: rgb(76, 136, 107);\ -}\ -.ace-tm .ace_comment.ace_doc {\ -color: rgb(0, 102, 255);\ -}\ -.ace-tm .ace_comment.ace_doc.ace_tag {\ -color: rgb(128, 159, 191);\ -}\ -.ace-tm .ace_constant.ace_numeric {\ -color: rgb(0, 0, 205);\ -}\ -.ace-tm .ace_variable {\ -color: rgb(49, 132, 149);\ -}\ -.ace-tm .ace_xml-pe {\ -color: rgb(104, 104, 91);\ -}\ -.ace-tm .ace_entity.ace_name.ace_function {\ -color: #0000A2;\ -}\ -.ace-tm .ace_heading {\ -color: rgb(12, 7, 255);\ -}\ -.ace-tm .ace_list {\ -color:rgb(185, 6, 144);\ -}\ -.ace-tm .ace_meta.ace_tag {\ -color:rgb(0, 22, 142);\ -}\ -.ace-tm .ace_string.ace_regex {\ -color: rgb(255, 0, 0)\ -}\ -.ace-tm .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-tm.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px white;\ -}\ -.ace-tm .ace_marker-layer .ace_step {\ -background: rgb(252, 255, 0);\ -}\ -.ace-tm .ace_marker-layer .ace_stack {\ -background: rgb(164, 229, 101);\ -}\ -.ace-tm .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-tm .ace_marker-layer .ace_active-line {\ -background: rgba(0, 0, 0, 0.07);\ -}\ -.ace-tm .ace_gutter-active-line {\ -background-color : #dcdcdc;\ -}\ -.ace-tm .ace_marker-layer .ace_selected-word {\ -background: rgb(250, 250, 255);\ -border: 1px solid rgb(200, 200, 250);\ -}\ -.ace-tm .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ -}\ -"; -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/src/ace/theme-tomorrow.js b/src/ace/theme-tomorrow.js deleted file mode 100644 index b1f73da83..000000000 --- a/src/ace/theme-tomorrow.js +++ /dev/null @@ -1,115 +0,0 @@ -define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-tomorrow"; -exports.cssText = ".ace-tomorrow .ace_gutter {\ -background: #f6f6f6;\ -color: #4D4D4C\ -}\ -.ace-tomorrow .ace_print-margin {\ -width: 1px;\ -background: #f6f6f6\ -}\ -.ace-tomorrow {\ -background-color: #FFFFFF;\ -color: #4D4D4C\ -}\ -.ace-tomorrow .ace_cursor {\ -color: #AEAFAD\ -}\ -.ace-tomorrow .ace_marker-layer .ace_selection {\ -background: #D6D6D6\ -}\ -.ace-tomorrow.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #FFFFFF;\ -}\ -.ace-tomorrow .ace_marker-layer .ace_step {\ -background: rgb(255, 255, 0)\ -}\ -.ace-tomorrow .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #D1D1D1\ -}\ -.ace-tomorrow .ace_marker-layer .ace_active-line {\ -background: #EFEFEF\ -}\ -.ace-tomorrow .ace_gutter-active-line {\ -background-color : #dcdcdc\ -}\ -.ace-tomorrow .ace_marker-layer .ace_selected-word {\ -border: 1px solid #D6D6D6\ -}\ -.ace-tomorrow .ace_invisible {\ -color: #D1D1D1\ -}\ -.ace-tomorrow .ace_keyword,\ -.ace-tomorrow .ace_meta,\ -.ace-tomorrow .ace_storage,\ -.ace-tomorrow .ace_storage.ace_type,\ -.ace-tomorrow .ace_support.ace_type {\ -color: #8959A8\ -}\ -.ace-tomorrow .ace_keyword.ace_operator {\ -color: #3E999F\ -}\ -.ace-tomorrow .ace_constant.ace_character,\ -.ace-tomorrow .ace_constant.ace_language,\ -.ace-tomorrow .ace_constant.ace_numeric,\ -.ace-tomorrow .ace_keyword.ace_other.ace_unit,\ -.ace-tomorrow .ace_support.ace_constant,\ -.ace-tomorrow .ace_variable.ace_parameter {\ -color: #F5871F\ -}\ -.ace-tomorrow .ace_constant.ace_other {\ -color: #666969\ -}\ -.ace-tomorrow .ace_invalid {\ -color: #FFFFFF;\ -background-color: #C82829\ -}\ -.ace-tomorrow .ace_invalid.ace_deprecated {\ -color: #FFFFFF;\ -background-color: #8959A8\ -}\ -.ace-tomorrow .ace_fold {\ -background-color: #4271AE;\ -border-color: #4D4D4C\ -}\ -.ace-tomorrow .ace_entity.ace_name.ace_function,\ -.ace-tomorrow .ace_support.ace_function,\ -.ace-tomorrow .ace_variable {\ -color: #4271AE\ -}\ -.ace-tomorrow .ace_support.ace_class,\ -.ace-tomorrow .ace_support.ace_type {\ -color: #C99E00\ -}\ -.ace-tomorrow .ace_heading,\ -.ace-tomorrow .ace_markup.ace_heading,\ -.ace-tomorrow .ace_string {\ -color: #718C00\ -}\ -.ace-tomorrow .ace_entity.ace_name.ace_tag,\ -.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,\ -.ace-tomorrow .ace_meta.ace_tag,\ -.ace-tomorrow .ace_string.ace_regexp,\ -.ace-tomorrow .ace_variable {\ -color: #C82829\ -}\ -.ace-tomorrow .ace_comment {\ -color: #8E908C\ -}\ -.ace-tomorrow .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y\ -}"; - -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/src/ace/theme-tomorrow_night.js b/src/ace/theme-tomorrow_night.js deleted file mode 100644 index 36c748fd6..000000000 --- a/src/ace/theme-tomorrow_night.js +++ /dev/null @@ -1,115 +0,0 @@ -define("ace/theme/tomorrow_night",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-tomorrow-night"; -exports.cssText = ".ace-tomorrow-night .ace_gutter {\ -background: #25282c;\ -color: #C5C8C6\ -}\ -.ace-tomorrow-night .ace_print-margin {\ -width: 1px;\ -background: #25282c\ -}\ -.ace-tomorrow-night {\ -background-color: #1D1F21;\ -color: #C5C8C6\ -}\ -.ace-tomorrow-night .ace_cursor {\ -color: #AEAFAD\ -}\ -.ace-tomorrow-night .ace_marker-layer .ace_selection {\ -background: #373B41\ -}\ -.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #1D1F21;\ -}\ -.ace-tomorrow-night .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-tomorrow-night .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #4B4E55\ -}\ -.ace-tomorrow-night .ace_marker-layer .ace_active-line {\ -background: #282A2E\ -}\ -.ace-tomorrow-night .ace_gutter-active-line {\ -background-color: #282A2E\ -}\ -.ace-tomorrow-night .ace_marker-layer .ace_selected-word {\ -border: 1px solid #373B41\ -}\ -.ace-tomorrow-night .ace_invisible {\ -color: #4B4E55\ -}\ -.ace-tomorrow-night .ace_keyword,\ -.ace-tomorrow-night .ace_meta,\ -.ace-tomorrow-night .ace_storage,\ -.ace-tomorrow-night .ace_storage.ace_type,\ -.ace-tomorrow-night .ace_support.ace_type {\ -color: #B294BB\ -}\ -.ace-tomorrow-night .ace_keyword.ace_operator {\ -color: #8ABEB7\ -}\ -.ace-tomorrow-night .ace_constant.ace_character,\ -.ace-tomorrow-night .ace_constant.ace_language,\ -.ace-tomorrow-night .ace_constant.ace_numeric,\ -.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,\ -.ace-tomorrow-night .ace_support.ace_constant,\ -.ace-tomorrow-night .ace_variable.ace_parameter {\ -color: #DE935F\ -}\ -.ace-tomorrow-night .ace_constant.ace_other {\ -color: #CED1CF\ -}\ -.ace-tomorrow-night .ace_invalid {\ -color: #CED2CF;\ -background-color: #DF5F5F\ -}\ -.ace-tomorrow-night .ace_invalid.ace_deprecated {\ -color: #CED2CF;\ -background-color: #B798BF\ -}\ -.ace-tomorrow-night .ace_fold {\ -background-color: #81A2BE;\ -border-color: #C5C8C6\ -}\ -.ace-tomorrow-night .ace_entity.ace_name.ace_function,\ -.ace-tomorrow-night .ace_support.ace_function,\ -.ace-tomorrow-night .ace_variable {\ -color: #81A2BE\ -}\ -.ace-tomorrow-night .ace_support.ace_class,\ -.ace-tomorrow-night .ace_support.ace_type {\ -color: #F0C674\ -}\ -.ace-tomorrow-night .ace_heading,\ -.ace-tomorrow-night .ace_markup.ace_heading,\ -.ace-tomorrow-night .ace_string {\ -color: #B5BD68\ -}\ -.ace-tomorrow-night .ace_entity.ace_name.ace_tag,\ -.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,\ -.ace-tomorrow-night .ace_meta.ace_tag,\ -.ace-tomorrow-night .ace_string.ace_regexp,\ -.ace-tomorrow-night .ace_variable {\ -color: #CC6666\ -}\ -.ace-tomorrow-night .ace_comment {\ -color: #969896\ -}\ -.ace-tomorrow-night .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-tomorrow_night_blue.js b/src/ace/theme-tomorrow_night_blue.js deleted file mode 100644 index 7bf7fc646..000000000 --- a/src/ace/theme-tomorrow_night_blue.js +++ /dev/null @@ -1,113 +0,0 @@ -define("ace/theme/tomorrow_night_blue",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-tomorrow-night-blue"; -exports.cssText = ".ace-tomorrow-night-blue .ace_gutter {\ -background: #00204b;\ -color: #7388b5\ -}\ -.ace-tomorrow-night-blue .ace_print-margin {\ -width: 1px;\ -background: #00204b\ -}\ -.ace-tomorrow-night-blue {\ -background-color: #002451;\ -color: #FFFFFF\ -}\ -.ace-tomorrow-night-blue .ace_constant.ace_other,\ -.ace-tomorrow-night-blue .ace_cursor {\ -color: #FFFFFF\ -}\ -.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\ -background: #003F8E\ -}\ -.ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #002451;\ -}\ -.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\ -background: rgb(127, 111, 19)\ -}\ -.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #404F7D\ -}\ -.ace-tomorrow-night-blue .ace_marker-layer .ace_active-line {\ -background: #00346E\ -}\ -.ace-tomorrow-night-blue .ace_gutter-active-line {\ -background-color: #022040\ -}\ -.ace-tomorrow-night-blue .ace_marker-layer .ace_selected-word {\ -border: 1px solid #003F8E\ -}\ -.ace-tomorrow-night-blue .ace_invisible {\ -color: #404F7D\ -}\ -.ace-tomorrow-night-blue .ace_keyword,\ -.ace-tomorrow-night-blue .ace_meta,\ -.ace-tomorrow-night-blue .ace_storage,\ -.ace-tomorrow-night-blue .ace_storage.ace_type,\ -.ace-tomorrow-night-blue .ace_support.ace_type {\ -color: #EBBBFF\ -}\ -.ace-tomorrow-night-blue .ace_keyword.ace_operator {\ -color: #99FFFF\ -}\ -.ace-tomorrow-night-blue .ace_constant.ace_character,\ -.ace-tomorrow-night-blue .ace_constant.ace_language,\ -.ace-tomorrow-night-blue .ace_constant.ace_numeric,\ -.ace-tomorrow-night-blue .ace_keyword.ace_other.ace_unit,\ -.ace-tomorrow-night-blue .ace_support.ace_constant,\ -.ace-tomorrow-night-blue .ace_variable.ace_parameter {\ -color: #FFC58F\ -}\ -.ace-tomorrow-night-blue .ace_invalid {\ -color: #FFFFFF;\ -background-color: #F99DA5\ -}\ -.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\ -color: #FFFFFF;\ -background-color: #EBBBFF\ -}\ -.ace-tomorrow-night-blue .ace_fold {\ -background-color: #BBDAFF;\ -border-color: #FFFFFF\ -}\ -.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function,\ -.ace-tomorrow-night-blue .ace_support.ace_function,\ -.ace-tomorrow-night-blue .ace_variable {\ -color: #BBDAFF\ -}\ -.ace-tomorrow-night-blue .ace_support.ace_class,\ -.ace-tomorrow-night-blue .ace_support.ace_type {\ -color: #FFEEAD\ -}\ -.ace-tomorrow-night-blue .ace_heading,\ -.ace-tomorrow-night-blue .ace_markup.ace_heading,\ -.ace-tomorrow-night-blue .ace_string {\ -color: #D1F1A9\ -}\ -.ace-tomorrow-night-blue .ace_entity.ace_name.ace_tag,\ -.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name,\ -.ace-tomorrow-night-blue .ace_meta.ace_tag,\ -.ace-tomorrow-night-blue .ace_string.ace_regexp,\ -.ace-tomorrow-night-blue .ace_variable {\ -color: #FF9DA4\ -}\ -.ace-tomorrow-night-blue .ace_comment {\ -color: #7285B7\ -}\ -.ace-tomorrow-night-blue .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-tomorrow_night_bright.js b/src/ace/theme-tomorrow_night_bright.js deleted file mode 100644 index 3bf12ddd4..000000000 --- a/src/ace/theme-tomorrow_night_bright.js +++ /dev/null @@ -1,128 +0,0 @@ -define("ace/theme/tomorrow_night_bright",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-tomorrow-night-bright"; -exports.cssText = ".ace-tomorrow-night-bright .ace_gutter {\ -background: #1a1a1a;\ -color: #DEDEDE\ -}\ -.ace-tomorrow-night-bright .ace_print-margin {\ -width: 1px;\ -background: #1a1a1a\ -}\ -.ace-tomorrow-night-bright {\ -background-color: #000000;\ -color: #DEDEDE\ -}\ -.ace-tomorrow-night-bright .ace_cursor {\ -color: #9F9F9F\ -}\ -.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {\ -background: #424242\ -}\ -.ace-tomorrow-night-bright.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #000000;\ -}\ -.ace-tomorrow-night-bright .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #888888\ -}\ -.ace-tomorrow-night-bright .ace_marker-layer .ace_highlight {\ -border: 1px solid rgb(110, 119, 0);\ -border-bottom: 0;\ -box-shadow: inset 0 -1px rgb(110, 119, 0);\ -margin: -1px 0 0 -1px;\ -background: rgba(255, 235, 0, 0.1)\ -}\ -.ace-tomorrow-night-bright .ace_marker-layer .ace_active-line {\ -background: #2A2A2A\ -}\ -.ace-tomorrow-night-bright .ace_gutter-active-line {\ -background-color: #2A2A2A\ -}\ -.ace-tomorrow-night-bright .ace_stack {\ -background-color: rgb(66, 90, 44)\ -}\ -.ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {\ -border: 1px solid #888888\ -}\ -.ace-tomorrow-night-bright .ace_invisible {\ -color: #343434\ -}\ -.ace-tomorrow-night-bright .ace_keyword,\ -.ace-tomorrow-night-bright .ace_meta,\ -.ace-tomorrow-night-bright .ace_storage,\ -.ace-tomorrow-night-bright .ace_storage.ace_type,\ -.ace-tomorrow-night-bright .ace_support.ace_type {\ -color: #C397D8\ -}\ -.ace-tomorrow-night-bright .ace_keyword.ace_operator {\ -color: #70C0B1\ -}\ -.ace-tomorrow-night-bright .ace_constant.ace_character,\ -.ace-tomorrow-night-bright .ace_constant.ace_language,\ -.ace-tomorrow-night-bright .ace_constant.ace_numeric,\ -.ace-tomorrow-night-bright .ace_keyword.ace_other.ace_unit,\ -.ace-tomorrow-night-bright .ace_support.ace_constant,\ -.ace-tomorrow-night-bright .ace_variable.ace_parameter {\ -color: #E78C45\ -}\ -.ace-tomorrow-night-bright .ace_constant.ace_other {\ -color: #EEEEEE\ -}\ -.ace-tomorrow-night-bright .ace_invalid {\ -color: #CED2CF;\ -background-color: #DF5F5F\ -}\ -.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {\ -color: #CED2CF;\ -background-color: #B798BF\ -}\ -.ace-tomorrow-night-bright .ace_fold {\ -background-color: #7AA6DA;\ -border-color: #DEDEDE\ -}\ -.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function,\ -.ace-tomorrow-night-bright .ace_support.ace_function,\ -.ace-tomorrow-night-bright .ace_variable {\ -color: #7AA6DA\ -}\ -.ace-tomorrow-night-bright .ace_support.ace_class,\ -.ace-tomorrow-night-bright .ace_support.ace_type {\ -color: #E7C547\ -}\ -.ace-tomorrow-night-bright .ace_heading,\ -.ace-tomorrow-night-bright .ace_markup.ace_heading,\ -.ace-tomorrow-night-bright .ace_string {\ -color: #B9CA4A\ -}\ -.ace-tomorrow-night-bright .ace_entity.ace_name.ace_tag,\ -.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name,\ -.ace-tomorrow-night-bright .ace_meta.ace_tag,\ -.ace-tomorrow-night-bright .ace_string.ace_regexp,\ -.ace-tomorrow-night-bright .ace_variable {\ -color: #D54E53\ -}\ -.ace-tomorrow-night-bright .ace_comment {\ -color: #969896\ -}\ -.ace-tomorrow-night-bright .ace_c9searchresults.ace_keyword {\ -color: #C2C280\ -}\ -.ace-tomorrow-night-bright .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-tomorrow_night_eighties.js b/src/ace/theme-tomorrow_night_eighties.js deleted file mode 100644 index e5c48fcae..000000000 --- a/src/ace/theme-tomorrow_night_eighties.js +++ /dev/null @@ -1,115 +0,0 @@ -define("ace/theme/tomorrow_night_eighties",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-tomorrow-night-eighties"; -exports.cssText = ".ace-tomorrow-night-eighties .ace_gutter {\ -background: #272727;\ -color: #CCC\ -}\ -.ace-tomorrow-night-eighties .ace_print-margin {\ -width: 1px;\ -background: #272727\ -}\ -.ace-tomorrow-night-eighties {\ -background-color: #2D2D2D;\ -color: #CCCCCC\ -}\ -.ace-tomorrow-night-eighties .ace_constant.ace_other,\ -.ace-tomorrow-night-eighties .ace_cursor {\ -color: #CCCCCC\ -}\ -.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {\ -background: #515151\ -}\ -.ace-tomorrow-night-eighties.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #2D2D2D;\ -}\ -.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #6A6A6A\ -}\ -.ace-tomorrow-night-bright .ace_stack {\ -background: rgb(66, 90, 44)\ -}\ -.ace-tomorrow-night-eighties .ace_marker-layer .ace_active-line {\ -background: #393939\ -}\ -.ace-tomorrow-night-eighties .ace_gutter-active-line {\ -background-color: #393939\ -}\ -.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected-word {\ -border: 1px solid #515151\ -}\ -.ace-tomorrow-night-eighties .ace_invisible {\ -color: #6A6A6A\ -}\ -.ace-tomorrow-night-eighties .ace_keyword,\ -.ace-tomorrow-night-eighties .ace_meta,\ -.ace-tomorrow-night-eighties .ace_storage,\ -.ace-tomorrow-night-eighties .ace_storage.ace_type,\ -.ace-tomorrow-night-eighties .ace_support.ace_type {\ -color: #CC99CC\ -}\ -.ace-tomorrow-night-eighties .ace_keyword.ace_operator {\ -color: #66CCCC\ -}\ -.ace-tomorrow-night-eighties .ace_constant.ace_character,\ -.ace-tomorrow-night-eighties .ace_constant.ace_language,\ -.ace-tomorrow-night-eighties .ace_constant.ace_numeric,\ -.ace-tomorrow-night-eighties .ace_keyword.ace_other.ace_unit,\ -.ace-tomorrow-night-eighties .ace_support.ace_constant,\ -.ace-tomorrow-night-eighties .ace_variable.ace_parameter {\ -color: #F99157\ -}\ -.ace-tomorrow-night-eighties .ace_invalid {\ -color: #CDCDCD;\ -background-color: #F2777A\ -}\ -.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {\ -color: #CDCDCD;\ -background-color: #CC99CC\ -}\ -.ace-tomorrow-night-eighties .ace_fold {\ -background-color: #6699CC;\ -border-color: #CCCCCC\ -}\ -.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function,\ -.ace-tomorrow-night-eighties .ace_support.ace_function,\ -.ace-tomorrow-night-eighties .ace_variable {\ -color: #6699CC\ -}\ -.ace-tomorrow-night-eighties .ace_support.ace_class,\ -.ace-tomorrow-night-eighties .ace_support.ace_type {\ -color: #FFCC66\ -}\ -.ace-tomorrow-night-eighties .ace_heading,\ -.ace-tomorrow-night-eighties .ace_markup.ace_heading,\ -.ace-tomorrow-night-eighties .ace_string {\ -color: #99CC99\ -}\ -.ace-tomorrow-night-eighties .ace_comment {\ -color: #999999\ -}\ -.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_tag,\ -.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name,\ -.ace-tomorrow-night-eighties .ace_meta.ace_tag,\ -.ace-tomorrow-night-eighties .ace_variable {\ -color: #F2777A\ -}\ -.ace-tomorrow-night-eighties .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-twilight.js b/src/ace/theme-twilight.js deleted file mode 100644 index 03e9d07da..000000000 --- a/src/ace/theme-twilight.js +++ /dev/null @@ -1,116 +0,0 @@ -define("ace/theme/twilight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-twilight"; -exports.cssText = ".ace-twilight .ace_gutter {\ -background: #232323;\ -color: #E2E2E2\ -}\ -.ace-twilight .ace_print-margin {\ -width: 1px;\ -background: #232323\ -}\ -.ace-twilight {\ -background-color: #141414;\ -color: #F8F8F8\ -}\ -.ace-twilight .ace_cursor {\ -color: #A7A7A7\ -}\ -.ace-twilight .ace_marker-layer .ace_selection {\ -background: rgba(221, 240, 255, 0.20)\ -}\ -.ace-twilight.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #141414;\ -}\ -.ace-twilight .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-twilight .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgba(255, 255, 255, 0.25)\ -}\ -.ace-twilight .ace_marker-layer .ace_active-line {\ -background: rgba(255, 255, 255, 0.031)\ -}\ -.ace-twilight .ace_gutter-active-line {\ -background-color: rgba(255, 255, 255, 0.031)\ -}\ -.ace-twilight .ace_marker-layer .ace_selected-word {\ -border: 1px solid rgba(221, 240, 255, 0.20)\ -}\ -.ace-twilight .ace_invisible {\ -color: rgba(255, 255, 255, 0.25)\ -}\ -.ace-twilight .ace_keyword,\ -.ace-twilight .ace_meta {\ -color: #CDA869\ -}\ -.ace-twilight .ace_constant,\ -.ace-twilight .ace_constant.ace_character,\ -.ace-twilight .ace_constant.ace_character.ace_escape,\ -.ace-twilight .ace_constant.ace_other,\ -.ace-twilight .ace_heading,\ -.ace-twilight .ace_markup.ace_heading,\ -.ace-twilight .ace_support.ace_constant {\ -color: #CF6A4C\ -}\ -.ace-twilight .ace_invalid.ace_illegal {\ -color: #F8F8F8;\ -background-color: rgba(86, 45, 86, 0.75)\ -}\ -.ace-twilight .ace_invalid.ace_deprecated {\ -text-decoration: underline;\ -font-style: italic;\ -color: #D2A8A1\ -}\ -.ace-twilight .ace_support {\ -color: #9B859D\ -}\ -.ace-twilight .ace_fold {\ -background-color: #AC885B;\ -border-color: #F8F8F8\ -}\ -.ace-twilight .ace_support.ace_function {\ -color: #DAD085\ -}\ -.ace-twilight .ace_list,\ -.ace-twilight .ace_markup.ace_list,\ -.ace-twilight .ace_storage {\ -color: #F9EE98\ -}\ -.ace-twilight .ace_entity.ace_name.ace_function,\ -.ace-twilight .ace_meta.ace_tag {\ -color: #AC885B\ -}\ -.ace-twilight .ace_string {\ -color: #8F9D6A\ -}\ -.ace-twilight .ace_string.ace_regexp {\ -color: #E9C062\ -}\ -.ace-twilight .ace_comment {\ -font-style: italic;\ -color: #5F5A60\ -}\ -.ace-twilight .ace_variable {\ -color: #7587A6\ -}\ -.ace-twilight .ace_xml-pe {\ -color: #494949\ -}\ -.ace-twilight .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\ -}\ -"; - -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/src/ace/theme-vibrant_ink.js b/src/ace/theme-vibrant_ink.js deleted file mode 100644 index 26f7de904..000000000 --- a/src/ace/theme-vibrant_ink.js +++ /dev/null @@ -1,101 +0,0 @@ -define("ace/theme/vibrant_ink",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = true; -exports.cssClass = "ace-vibrant-ink"; -exports.cssText = ".ace-vibrant-ink .ace_gutter {\ -background: #1a1a1a;\ -color: #BEBEBE\ -}\ -.ace-vibrant-ink .ace_print-margin {\ -width: 1px;\ -background: #1a1a1a\ -}\ -.ace-vibrant-ink {\ -background-color: #0F0F0F;\ -color: #FFFFFF\ -}\ -.ace-vibrant-ink .ace_cursor {\ -color: #FFFFFF\ -}\ -.ace-vibrant-ink .ace_marker-layer .ace_selection {\ -background: #6699CC\ -}\ -.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #0F0F0F;\ -}\ -.ace-vibrant-ink .ace_marker-layer .ace_step {\ -background: rgb(102, 82, 0)\ -}\ -.ace-vibrant-ink .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #404040\ -}\ -.ace-vibrant-ink .ace_marker-layer .ace_active-line {\ -background: #333333\ -}\ -.ace-vibrant-ink .ace_gutter-active-line {\ -background-color: #333333\ -}\ -.ace-vibrant-ink .ace_marker-layer .ace_selected-word {\ -border: 1px solid #6699CC\ -}\ -.ace-vibrant-ink .ace_invisible {\ -color: #404040\ -}\ -.ace-vibrant-ink .ace_keyword,\ -.ace-vibrant-ink .ace_meta {\ -color: #FF6600\ -}\ -.ace-vibrant-ink .ace_constant,\ -.ace-vibrant-ink .ace_constant.ace_character,\ -.ace-vibrant-ink .ace_constant.ace_character.ace_escape,\ -.ace-vibrant-ink .ace_constant.ace_other {\ -color: #339999\ -}\ -.ace-vibrant-ink .ace_constant.ace_numeric {\ -color: #99CC99\ -}\ -.ace-vibrant-ink .ace_invalid,\ -.ace-vibrant-ink .ace_invalid.ace_deprecated {\ -color: #CCFF33;\ -background-color: #000000\ -}\ -.ace-vibrant-ink .ace_fold {\ -background-color: #FFCC00;\ -border-color: #FFFFFF\ -}\ -.ace-vibrant-ink .ace_entity.ace_name.ace_function,\ -.ace-vibrant-ink .ace_support.ace_function,\ -.ace-vibrant-ink .ace_variable {\ -color: #FFCC00\ -}\ -.ace-vibrant-ink .ace_variable.ace_parameter {\ -font-style: italic\ -}\ -.ace-vibrant-ink .ace_string {\ -color: #66FF00\ -}\ -.ace-vibrant-ink .ace_string.ace_regexp {\ -color: #44B4CC\ -}\ -.ace-vibrant-ink .ace_comment {\ -color: #9933CC\ -}\ -.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {\ -font-style: italic;\ -color: #99CC99\ -}\ -.ace-vibrant-ink .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y\ -}"; - -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/src/ace/theme-xcode.js b/src/ace/theme-xcode.js deleted file mode 100644 index daded3a15..000000000 --- a/src/ace/theme-xcode.js +++ /dev/null @@ -1,95 +0,0 @@ -define("ace/theme/xcode",["require","exports","module","ace/lib/dom"], function(require, exports, module) { - -exports.isDark = false; -exports.cssClass = "ace-xcode"; -exports.cssText = "\ -.ace-xcode .ace_gutter {\ -background: #e8e8e8;\ -color: #333\ -}\ -.ace-xcode .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8\ -}\ -.ace-xcode {\ -background-color: #FFFFFF;\ -color: #000000\ -}\ -.ace-xcode .ace_cursor {\ -color: #000000\ -}\ -.ace-xcode .ace_marker-layer .ace_selection {\ -background: #B5D5FF\ -}\ -.ace-xcode.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px #FFFFFF;\ -}\ -.ace-xcode .ace_marker-layer .ace_step {\ -background: rgb(198, 219, 174)\ -}\ -.ace-xcode .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid #BFBFBF\ -}\ -.ace-xcode .ace_marker-layer .ace_active-line {\ -background: rgba(0, 0, 0, 0.071)\ -}\ -.ace-xcode .ace_gutter-active-line {\ -background-color: rgba(0, 0, 0, 0.071)\ -}\ -.ace-xcode .ace_marker-layer .ace_selected-word {\ -border: 1px solid #B5D5FF\ -}\ -.ace-xcode .ace_constant.ace_language,\ -.ace-xcode .ace_keyword,\ -.ace-xcode .ace_meta,\ -.ace-xcode .ace_variable.ace_language {\ -color: #C800A4\ -}\ -.ace-xcode .ace_invisible {\ -color: #BFBFBF\ -}\ -.ace-xcode .ace_constant.ace_character,\ -.ace-xcode .ace_constant.ace_other {\ -color: #275A5E\ -}\ -.ace-xcode .ace_constant.ace_numeric {\ -color: #3A00DC\ -}\ -.ace-xcode .ace_entity.ace_other.ace_attribute-name,\ -.ace-xcode .ace_support.ace_constant,\ -.ace-xcode .ace_support.ace_function {\ -color: #450084\ -}\ -.ace-xcode .ace_fold {\ -background-color: #C800A4;\ -border-color: #000000\ -}\ -.ace-xcode .ace_entity.ace_name.ace_tag,\ -.ace-xcode .ace_support.ace_class,\ -.ace-xcode .ace_support.ace_type {\ -color: #790EAD\ -}\ -.ace-xcode .ace_storage {\ -color: #C900A4\ -}\ -.ace-xcode .ace_string {\ -color: #DF0002\ -}\ -.ace-xcode .ace_comment {\ -color: #008E00\ -}\ -.ace-xcode .ace_indent-guide {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y\ -}"; - -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/src/ace/touchHandler.js b/src/ace/touchHandler.js new file mode 100644 index 000000000..23d29a695 --- /dev/null +++ b/src/ace/touchHandler.js @@ -0,0 +1,1085 @@ +import { key } from "handlers/quickTools"; +import tag from "html-tag-js"; +import constants from "lib/constants"; +import selectionMenu from "lib/selectionMenu"; +import appSettings from "lib/settings"; +import { getColorRange } from "utils/color/regex"; + +export let scrollAnimationFrame; // scroll animation frame id + +const SCROLL_SPEED = { + FAST_X2: 0.99, + FAST: 0.97, + NORMAL: 0.95, + SLOW: 0.9, +}; + +/** + * Handler for touch events + * @param {AceAjax.Editor} editor Ace editor instance + * @param {boolean} minimal if true, disable selection, menu and cursor + */ +export default function addTouchListeners(editor, minimal, onclick) { + const { renderer, container: $el } = editor; + const { $gutter } = renderer; + const { Range } = ace.require("ace/range"); + + let { + diagonalScrolling, + reverseScrolling, + teardropSize, + teardropTimeout, + scrollSpeed, + } = appSettings.value; + + if (minimal) { + diagonalScrolling = false; + reverseScrolling = false; + teardropSize = 0; + } + + /** + * Selection controller start + */ + const $start = tag("span", { + className: "cursor start", + dataset: { + size: teardropSize, + }, + size: teardropSize, + }); + + /** + * Selection controller end + */ + const $end = tag("span", { + className: "cursor end", + dataset: { + size: teardropSize, + }, + size: teardropSize, + }); + + /** + * Tear drop cursor + */ + const $cursor = tag("span", { + className: "cursor single", + dataset: { + size: teardropSize, + }, + get size() { + const widthSq = teardropSize * teardropSize * 2; + const actualWidth = Math.sqrt(widthSq); + delete this.size; + this.size = actualWidth; + return actualWidth; + }, + startHide() { + clearTimeout($cursor.dataset.timeout); + $cursor.dataset.timeout = setTimeout(() => { + $cursor.remove(); + hideMenu(); + }, teardropTimeout); + }, + }); + + /** + * Text menu for touch devices + */ + const $menu = ; + const RESET_CLICK_COUNT_TIME = 500; // ms + const config = { passive: false }; // event listener config + const ACE_NO_CURSOR = + ".ace_gutter,.ace_gutter *,.ace_fold,.ace_inline_button"; + + let LOCK_X = appSettings.value.textWrap; + + let scrollTimeout; // timeout to check if scrolling is finished + let menuActive; // true if menu is active + let mode; // cursor, selection or scroll + let moveY; // touch difference in vertical direction + let moveX; // touch difference in horizontal direction + let lastX; // last x + let lastY; // last y + let directionX; // direction in x + let directionY; // direction in y + let initialX; // initial x + let initialY; // initial y + let initialTimeX; // initial time + let initialTimeY; // initial time + let lockX; // lock x for prevent scrolling in horizontal direction + let lockY; // lock y for prevent scrolling in vertical direction + let clickCount = 0; // number of clicks + let selectionActive; // true if selection is active + let lastClickPos = null; + let teardropDoesShowMenu = true; // teardrop handler + let teardropTouchEnded = false; // teardrop handler + let teardropMoveTimeout; // teardrop handler + let forceCursorMode = false; // force to show cursor + let $activeTeardrop; // active teardrop + let timeTouchStart; // time of touch start + let touchEnded = true; // true if touch ended + let threshold = appSettings.value.touchMoveThreshold; + + $el.addEventListener("touchstart", touchStart, config, true); + $el.addEventListener("contextmenu", contextmenu, config, true); + + editor.setSelection = (value) => { + selectionActive = value; + }; + + editor.setMenu = (value) => { + menuActive = value; + }; + + if (!minimal) { + editor.on("change", onupdate); + editor.on("changeSession", onchangesession); + editor.on("scroll", onscroll); + editor.on("fold", onfold); + editor.on("select-word", () => { + selectionMode($end); + }); + editor.on("scroll-intoview", () => { + if (selectionActive) { + selectionMode($end); + } else { + cursorMode(); + } + }); + + appSettings.on("update:diagonalScrolling", (value) => { + diagonalScrolling = value; + }); + appSettings.on("update:reverseScrolling", (value) => { + reverseScrolling = value; + }); + appSettings.on("update:teardropSize", (value) => { + teardropSize = value; + $start.dataset.size = value; + $end.dataset.size = value; + $cursor.dataset.size = value; + }); + appSettings.on("update:textWrap", (value) => { + LOCK_X = value; + onupdate(); + }); + appSettings.on("update:scrollSpeed", (value) => { + scrollSpeed = value; + }); + appSettings.on("update:touchMoveThreshold", (value) => { + threshold = value; + }); + } + + /** + * Editor container on touch start + * @param {TouchEvent} e Touch event + */ + function touchStart(e) { + /**@type {HTMLElement} */ + const $target = e.target; + + editor.textInput.onContextMenu = null; + cancelAnimationFrame(scrollAnimationFrame); + const { clientX, clientY } = e.touches[0]; + + if (minimal && clientX <= constants.SIDEBAR_SLIDE_START_THRESHOLD_PX) { + return; + } + + if (isIn($start, clientX, clientY)) { + e.preventDefault(); + teardropHandler($start); + return; + } + + if (isIn($end, clientX, clientY)) { + e.preventDefault(); + teardropHandler($end); + return; + } + + if (isIn($cursor, clientX, clientY)) { + e.preventDefault(); + teardropHandler($cursor); + return; + } + + if ($target.matches(ACE_NO_CURSOR)) { + moveCursorTo(0, clientY); + return; + } + + touchEnded = false; + lastX = clientX; + lastY = clientY; + initialX = clientX; + initialY = clientY; + initialTimeX = e.timeStamp; + initialTimeY = e.timeStamp; + moveY = 0; + moveX = 0; + lockX = LOCK_X; + lockY = false; + mode = "wait"; + + setTimeout(() => { + clickCount = 0; + lastClickPos = null; + }, RESET_CLICK_COUNT_TIME); + + document.addEventListener("touchmove", touchMove, config); + document.addEventListener("touchend", touchEnd, config); + } + + /** + * Editor container on touch move + * @param {TouchEvent} e Event + */ + function touchMove(e) { + if (mode === "selection") { + removeListeners(); + return; + } + + let currentDirectionX; // direction in x + let currentDirectionY; // direction in y + const { clientX, clientY } = e.touches[0]; + + moveX = clientX - lastX; + moveY = clientY - lastY; + currentDirectionX = moveX > 0 ? 1 : -1; + currentDirectionY = moveY > 0 ? 1 : -1; + + if (directionX !== currentDirectionX) { + initialX = clientX; + initialTimeX = e.timeStamp; + } + + if (directionY !== currentDirectionY) { + initialY = clientY; + initialTimeY = e.timeStamp; + } + + directionX = currentDirectionX; + directionY = currentDirectionY; + lastX = clientX; + lastY = clientY; + + if (!moveX && !moveY) { + return; + } + + if (!diagonalScrolling && !lockX && !lockY) { + if (Math.abs(moveX) > Math.abs(moveY)) { + lockY = true; + } else { + lockX = true; + } + } + + if (lockX || Math.abs(moveX) < threshold) { + moveX = 0; + } + + if (lockY || Math.abs(moveY) < threshold) { + moveY = 0; + } + + if (moveX || moveY) { + e.preventDefault(); + [moveX, moveY] = testScroll(moveX, moveY); + mode = "scroll"; + scroll(moveX, moveY); + } + } + + /** + * Editor container on touch end + * @param {TouchEvent} e Event + */ + function touchEnd(e) { + const { clientX, clientY } = e.changedTouches[0]; + // why I was using e.preventDefault() ? 🤔 + // because select word and select line misbehave without + // preventDefault + removeListeners(); + touchEnded = true; + + if (mode === "scroll") { + const deltaTimeX = e.timeStamp - initialTimeX; + const deltaTimeY = e.timeStamp - initialTimeY; + const deltaX = clientX - initialX; + const deltaY = clientY - initialY; + const velocityX = lockX ? 0 : Math.round(deltaX / deltaTimeX); // in px/ms + const velocityY = lockY ? 0 : Math.round(deltaY / deltaTimeY); // in px/ms + scrollAnimation(velocityX, velocityY); + return; + } + + if (mode === "wait") { + if (lastClickPos) { + const { clientX: clickXThen, clientY: clickYThen } = lastClickPos; + const { row: rowNow, column: columnNow } = + renderer.screenToTextCoordinates(clientX, clientY); + const { row: rowThen, column: columnThen } = + renderer.screenToTextCoordinates(clickXThen, clickYThen); + + const rowDiff = Math.abs(rowNow - rowThen); + const columnDiff = Math.abs(columnNow - columnThen); + if (!rowDiff && columnDiff <= 2) { + clickCount += 1; + } + } else { + clickCount = 1; + } + + lastClickPos = { clientX, clientY }; + + if (clickCount === 2) { + mode = "selection"; + } else if (clickCount >= 3) { + mode = "select-line"; + } else { + mode = "cursor"; + } + } + + if (minimal && mode === "cursor") { + moveCursorTo(clientX, clientY); + if (onclick) onclick(); + return; + } else if (minimal) { + return; + } + + if (mode === "cursor") { + e.preventDefault(); + const shiftKey = key.shift || e.shiftKey; + const ctrlKey = key.ctrl || e.ctrlKey; + moveCursorTo(clientX, clientY, shiftKey, ctrlKey); + if (!ctrlKey && !shiftKey) { + forceCursorMode = true; + cursorMode(); + } + if (!editor.isFocused()) editor.focus(); + return; + } + + if (mode === "selection") { + e.preventDefault(); + moveCursorTo(clientX, clientY); + select(); + vibrate(); + return; + } + + if (mode === "select-line") { + e.preventDefault(); + moveCursorTo(clientX, clientY); + editor.selection.selectLine(); + selectionMode($end); + vibrate(); + } + } + + /** + * Checks if given element is in the touch area + * @param {Element} $el + * @param {number} cX + * @param {number} cY + * @returns + */ + function isIn($el, cX, cY) { + const { + x, + y, + left, + top, + width: sWidth, + height: sHeight, + } = $el.getBoundingClientRect(); + + const sx = x || left; + const sy = y || top; + + return cX > sx && cX < sx + sWidth && cY > sy && cY < sy + sHeight; + } + + /** + * Vibrate device + * @returns {void} + */ + function vibrate() { + if (appSettings.value.vibrateOnTap) { + navigator.vibrate(constants.VIBRATION_TIME); + } + } + + /** + * Callback for contextmenu event + * @param {MouseEvent} e Event + */ + function contextmenu(e) { + e.preventDefault(); + e.stopPropagation(); + if (minimal) return; + const { clientX, clientY } = e; + moveCursorTo(clientX, clientY); + select(); + touchEnded = true; + editor.focus(); + } + + /** + * Select word at cursor position + * @returns {void} + */ + function select() { + removeListeners(); + const range = getColorRange() || editor.selection.getWordRange(); + if (!range || range?.isEmpty()) return; + editor.selection.setSelectionRange(range); + selectionMode($end); + } + + /** + * Scrolls the editor with smooth animation + * @param {number} velocityX velocity in x direction + * @param {number} velocityY velocity in y direction + * @param {number} [timeThen] + * @returns {void} + */ + function scrollAnimation(velocityX, velocityY, timeThen = 0) { + if (!velocityX && !velocityY) { + onscrollend(); + return; + } + + const timeNow = Date.now(); + + if (!timeThen) { + scrollAnimationFrame = requestAnimationFrame( + scrollAnimation.bind(null, velocityX, velocityY, timeNow), + ); + return; + } + + const timeElapsed = timeNow - timeThen; + const FRICTION = SCROLL_SPEED[scrollSpeed]; + const nextX = velocityX * timeElapsed; + const nextY = velocityY * timeElapsed; + + let scrollX = Number.parseInt(nextX * 100) / 100; + let scrollY = Number.parseInt(nextY * 100) / 100; + + const [canScrollX, canScrollY] = testScroll(scrollX, scrollY); + + if (!canScrollX) { + velocityX = 0; + scrollX = 0; + } + + if (!canScrollY) { + velocityY = 0; + scrollY = 0; + } + + if (!scrollX && !scrollY) { + cancelAnimationFrame(scrollAnimationFrame); + return; + } + + scroll(scrollX, scrollY); + + velocityX *= FRICTION; + velocityY *= FRICTION; + + scrollAnimationFrame = requestAnimationFrame( + scrollAnimation.bind(null, velocityX, velocityY, timeNow), + ); + } + + /** + * Test if scrolling is possible + * @param {number} moveX move in x direction + * @param {number} moveY move in y direction + * @returns {[number, number]} + */ + function testScroll(moveX, moveY) { + const UP = reverseScrolling ? "down" : "up"; + const DOWN = reverseScrolling ? "up" : "down"; + const LEFT = reverseScrolling ? "right" : "left"; + const RIGHT = reverseScrolling ? "left" : "right"; + + const vDirection = moveY > 0 ? DOWN : UP; + const hDirection = moveX > 0 ? RIGHT : LEFT; + + const { getEditorHeight, getEditorWidth } = editorManager; + const scrollLeft = editor.renderer.getScrollLeft(); + const scrollTop = editor.renderer.getScrollTop(); + const [editorWidth, editorHeight] = [ + getEditorWidth(editor), + getEditorHeight(editor), + ]; + + if ( + (vDirection === "down" && scrollTop <= 0) || + (vDirection === "up" && scrollTop >= editorHeight) + ) { + moveY = 0; + } + + if ( + (hDirection === "right" && scrollLeft <= 0) || + (hDirection === "left" && scrollLeft >= editorWidth) + ) { + moveX = 0; + } + + return [moveX, moveY]; + } + + /** + * Scroll to given position + * @param {number} x + * @param {number} y + */ + function scroll(x, y) { + let direction = reverseScrolling ? 1 : -1; + let scrollX = direction * x; + let scrollY = direction * y; + + renderer.scrollBy(scrollX, scrollY); + } + + /** + * Remove all listeners + */ + function removeListeners() { + document.removeEventListener("touchmove", touchMove, config); + document.removeEventListener("touchend", touchEnd, config); + } + + /** + * Compare two ranges + * @param {AceAjax.Range} r1 + * @param {AceAjax.Range} r2 + * @returns {boolean} + */ + function compareRanges(r1, r2) { + return ( + r1.start.row === r2.start.row && + r1.start.column === r2.start.column && + r1.end.row === r2.end.row && + r1.end.column === r2.end.column + ); + } + + /** + * Moves cursor to given position + * @param {number} x + * @param {number} y + * @param {boolean} [shiftKey] + * @param {boolean} [ctrlKey] + */ + function moveCursorTo(x, y, shiftKey = false, ctrlKey = false) { + const pos = renderer.screenToTextCoordinates(x, y); + + hideTooltip(); + + if (shiftKey) { + const anchor = + editor.selection.getSelectionAnchor() || editor.getCursorPosition(); + editor.selection.setRange({ start: anchor, end: pos }); + selectionMode($end); + return; + } + + if (ctrlKey) { + const range = new Range(pos.row, pos.column, pos.row, pos.column); + const ranges = editor.selection.getAllRanges(); + const exists = ranges.some((r) => compareRanges(r, range)); + if (exists) { + editor.selection.clearSelection(); + ranges.splice(ranges.indexOf(exists), 1); + ranges.forEach((r) => editor.selection.addRange(r)); + return; + } + + editor.selection.addRange(range); + return; + } + + editor.selection.moveToPosition(pos); + } + + /** + * Shows teardrop + * @returns {void} + */ + function cursorMode() { + if ((!teardropSize || !editor.isFocused()) && !forceCursorMode) { + $cursor.remove(); + return; + } + + forceCursorMode = false; + clearTimeout($cursor.dataset.timeout); + clearSelectionMode(); + + const { pageX, pageY } = renderer.textToScreenCoordinates( + editor.getCursorPosition(), + ); + const { lineHeight } = renderer; + const actualHeight = lineHeight; + const [x, y] = relativePosition(pageX, pageY + actualHeight); + $cursor.style.left = `${x}px`; + $cursor.style.top = `${y}px`; + if (!$cursor.isConnected) $el.append($cursor); + $cursor.startHide(); + + editor.selection.on("changeCursor", clearCursorMode); + } + + /** + * Remove cursor mode + * @returns {void} + */ + function clearCursorMode() { + if (!$el.contains($cursor)) return; + if ($cursor.dataset.immortal === "true") return; + $cursor.remove(); + clearTimeout($cursor.dataset.timeout); + + editor.selection.off("changeCursor", clearCursorMode); + } + + /** + * Shows both teardrops + * @param {HTMLElement} $trigger + * @returns {void} + */ + function selectionMode($trigger) { + if (!teardropSize) return; + + clearCursorMode(); + selectionActive = true; + positionEnd(); + positionStart(); + if ($trigger) showMenu($trigger); + + setTimeout(() => { + editor.selection.on("changeSelection", clearSelectionMode); + editor.selection.on("changeCursor", clearSelectionMode); + }, 0); + } + + /** + * Positions the start teardrop + */ + function positionStart() { + const range = editor.getSelectionRange(); + const { pageX, pageY } = renderer.textToScreenCoordinates(range.start); + const { lineHeight } = renderer; + + // Calculate desired position but ensure it stays within viewport + let targetX = pageX - teardropSize; + const [relativeX, y] = relativePosition(targetX, pageY + lineHeight); + + // Ensure the teardrop doesn't go outside the left edge + // Leave some padding (e.g., 4px) so it's not flush against the edge + const minX = 4; + const constrainedX = Math.max(relativeX, minX); + + $start.style.left = `${constrainedX}px`; + $start.style.top = `${y}px`; + + if (!$start.isConnected) $el.append($start); + } + + /** + * Positions the end teardrop + */ + function positionEnd() { + const range = editor.getSelectionRange(); + const { pageX, pageY } = renderer.textToScreenCoordinates(range.end); + const { lineHeight } = renderer; + const [x, y] = relativePosition(pageX, pageY + lineHeight); + + $end.style.left = `${x}px`; + $end.style.top = `${y}px`; + + if (!$end.isConnected) $el.append($end); + } + + /** + * Remove selection mode + * @param {Event} e Event + * @param {boolean} clearActive whether to clear selectionActive + * @returns {void} + */ + function clearSelectionMode(e, clearActive = true) { + const $els = [$start.dataset.immortal, $end.dataset.immortal]; + if ($els.includes("true")) return; + if ($el.contains($start)) $start.remove(); + if ($el.contains($end)) $end.remove(); + if (clearActive) { + selectionActive = false; + } + + editor.selection.off("changeSelection", clearSelectionMode); + editor.selection.off("changeCursor", clearSelectionMode); + } + + /** + * Shows the edit context menu + * @param {HTMLElement} [$trigger] A trigger element that triggered the menu, if not provided, menu will be shown at the current cursor position + */ + function showMenu($trigger) { + menuActive = true; + const rect = $trigger?.getBoundingClientRect(); + const { bottom, left } = rect; + const readOnly = editor.getReadOnly(); + const [x, y] = relativePosition(left, bottom); + if (readOnly) { + populateMenuItems("read-only"); + } else { + populateMenuItems(); + } + + $menu.style.left = `${x}px`; + $menu.style.top = `${y}px`; + + if (!$menu.isConnected) $el.parentElement.append($menu); + if ($trigger) positionMenu($trigger); + + editor.selection.on("changeCursor", hideMenu); + editor.selection.on("changeSelection", hideMenu); + } + + /** + * @param {boolean} clearActive whether to clear menuActive + * @returns {void} + */ + function hideMenu(clearActive = true) { + if (!$el.parentElement.contains($menu)) return; + $menu.remove(); + editor.selection.off("changeCursor", hideMenu); + editor.selection.off("changeSelection", hideMenu); + if (clearActive) menuActive = false; + } + + /** + * Populates the menu items + * @param {HTMLElement} $trigger + * @returns + */ + function positionMenu($trigger) { + const getProp = ($el, prop) => $el.getBoundingClientRect()[prop]; + const containerRight = getProp($el, "right"); + const containerLeft = getProp($el, "left"); + const containerBottom = getProp($el, "bottom"); + const { lineHeight } = editor.renderer; + const margin = 10; + + // if menu is positioned off screen horizontally from the right + const menuRight = getProp($menu, "right"); + if (menuRight + margin > containerRight) { + const menuLeft = getProp($menu, "left"); + const [x] = relativePosition( + menuLeft - Math.abs(menuRight - containerRight), + ); + $menu.style.left = `${x - margin}px`; + } + + // if menu is positioned off screen horizontally from the left + const menuLeft = getProp($menu, "left"); + if (menuLeft - margin < containerLeft) { + const [x] = relativePosition( + menuLeft + Math.abs(menuLeft - containerLeft), + ); + $menu.style.left = `${x + margin}px`; + } + + if (shrink()) return; + + // if menu is positioned off screen vertically from the bottom + const menuBottom = getProp($menu, "bottom"); + if (menuBottom > containerBottom) { + const range = editor.getSelectionRange(); + let pos; + + if ($trigger === $start) { + pos = range.start; + } else { + pos = range.end; + } + + const { pageY } = renderer.textToScreenCoordinates(pos); + const [, y] = relativePosition(null, pageY - lineHeight * 1.8); + $menu.style.top = `${y}px`; + } + + function shrink() { + const [left, right] = [getProp($menu, "left"), getProp($menu, "right")]; + const tooLeft = left < containerLeft; + const tooRight = right > containerRight; + if (tooLeft || tooRight) { + const { scale = 1 } = $menu.dataset; + $menu.dataset.scale = Number.parseFloat(scale - 0.1); + $menu.style.transform = `scale(${$menu.dataset.scale})`; + positionMenu($trigger); + return true; + } + return false; + } + } + + /** + * Handles teardrop + * @param {HTMLDivElement} $teardrop Teardrop element to handle + */ + function teardropHandler($teardrop) { + $activeTeardrop = $teardrop; + $activeTeardrop.dataset.immortal = true; + teardropDoesShowMenu = true; + teardropTouchEnded = false; + + if (mode === "cursor") { + const timeout = Number.parseInt($cursor.dataset.timeout, 10); + clearTimeout(timeout); + } + + timeTouchStart = Date.now(); + document.addEventListener("touchmove", teardropTouchMoveHandler, config); + document.addEventListener("touchend", teardropTouchEndHandler, config); + } + + /** + * Touch event handler for teardrop + * @param {Event} e + */ + function teardropTouchMoveHandler(e) { + const { clientX, clientY } = e.touches[0]; + const { lineHeight } = renderer; + const { start, end } = editor.selection.getRange(); + let y = clientY - lineHeight * 1.8; + let x = clientX; + + if (timeTouchStart) { + timeTouchStart = null; + + // Prevents accidental touchmove + if (diffX < threshold && diffY < threshold) return; + + const diffX = Math.abs(lastX - clientX); + const diffY = Math.abs(lastY - clientY); + const timeDiff = Date.now() - timeTouchStart; + + // Prevents accidental touchmove or highly sensitive touchmove + if (timeDiff < 50) return; + return; + } + + if ($activeTeardrop === $cursor) { + const { row, column } = renderer.screenToTextCoordinates(x, y); + editor.gotoLine(row + 1, column); + } else if ($activeTeardrop === $start) { + x = clientX + teardropSize; + + const { pageX, pageY } = renderer.textToScreenCoordinates(end); + if (pageY <= y) { + y = pageY; + } + + if (pageY <= y && pageX < x) { + x = pageX; + } + + let { row, column } = renderer.screenToTextCoordinates(x, y); + + if (column === end.column) { + --column; + } + + editor.selection.setSelectionAnchor(row, column); + positionEnd(); + } else { + const { pageX, pageY } = renderer.textToScreenCoordinates(start); + if (pageY >= y) { + y = pageY; + } + + if (pageY >= y && pageX > x) { + x = pageX; + } + + let { row, column } = renderer.screenToTextCoordinates(x, y); + + // if (column === start.column) { + // ++column; + // } + + editor.selection.moveCursorToPosition({ row, column }); + positionStart(); + } + + clearTimeout(teardropMoveTimeout); + const parent = $el.getBoundingClientRect(); + let deltaX = 0; + if (clientY < parent.top) deltaX = -lineHeight; + if (clientY > parent.bottom) deltaX = lineHeight; + + if (deltaX) { + teardropMoveTimeout = setTimeout(() => { + const top = editor.session.getScrollTop(); + editor.session.setScrollTop(top + deltaX); + if (teardropTouchEnded) return; + teardropTouchMoveHandler(e); + }, 100); + } + + const [left, top] = relativePosition(clientX, clientY - lineHeight); + $activeTeardrop.style.left = `${left}px`; + $activeTeardrop.style.top = `${top}px`; + } + + /** + * Touch event handler for teardrop + */ + function teardropTouchEndHandler() { + teardropTouchEnded = true; + if ($activeTeardrop === $cursor) { + cursorMode(); + } else { + selectionMode($activeTeardrop); + } + + $activeTeardrop.dataset.immortal = false; + document.removeEventListener("touchmove", teardropTouchMoveHandler, config); + document.removeEventListener("touchend", teardropTouchEndHandler, config); + if (teardropDoesShowMenu) { + showMenu($activeTeardrop); + } + editor.focus(); + } + + /** + * Editor container on scroll + */ + function onscroll() { + clearTimeout(scrollTimeout); + clearCursorMode(); + clearSelectionMode(null, false); + hideMenu(false); + + hideTooltip(); + scrollTimeout = setTimeout(onscrollend, 100); + } + + /** + * Hides tooltip in the gutter + */ + function hideTooltip() { + $gutter.dispatchEvent(new MouseEvent("mouseout")); + } + + /** + * Editor container on scroll end + */ + function onscrollend() { + scrollTimeout = null; + editor._emit("scroll-end"); + if (!touchEnded) return; + + if (selectionActive) { + selectionMode(); + } + + if (menuActive) { + showMenu($end); + } + } + + /** + * Editor container on update + */ + function onupdate() { + clearSelectionMode(); + clearCursorMode(); + hideMenu(); + } + + /** + * Editor container on change session + */ + function onchangesession() { + if (scrollTimeout) { + clearTimeout(scrollTimeout); + onscrollend(); + } + + cancelAnimationFrame(scrollAnimationFrame); + setTimeout(() => { + const copyText = editor.session.getTextRange(editor.getSelectionRange()); + if (copyText) { + selectionMode($end); + return; + } + + clearSelectionMode(); + cursorMode(); + hideMenu(); + }, 0); + } + + /** + * Editor container on fold + */ + function onfold() { + if (selectionActive) { + positionEnd(); + positionStart(); + hideMenu(); + showMenu($end); + } else { + clearCursorMode(); + } + } + + /** + * Populates the menu items + * @param {'regular'|'read-only'|'select'} mode + */ + function populateMenuItems(mode = "regular") { + $menu.innerHTML = ""; + const copyText = editor.getCopyText(); + const items = []; + + selectionMenu().forEach((item) => { + if (mode === "read-only" && !item.readOnly) return; + if (copyText && !["selected", "all"].includes(item.mode)) return; + if (!copyText && item.mode === "selected") return; + + items.push(item); + }); + + items.forEach(({ onclick, text }) => { + $menu.append(
    {text}
    ); + }); + } + + /** + * Returns relative position of given coordinates + * @param {number} x x coordinate + * @param {number} y y coordinate + * @returns {[number, number]} + */ + function relativePosition(x, y) { + const { top, left } = $el.getBoundingClientRect(); + return [x - left, y - top]; + } +} diff --git a/src/ace/worker-base.js b/src/ace/worker-base.js deleted file mode 100644 index ca582ac58..000000000 --- a/src/ace/worker-base.js +++ /dev/null @@ -1,1421 +0,0 @@ -"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.data, - file: file, - line: line, - col: col, - stack: 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 = {}; -require.tlns = {}; -window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { - for (var i in topLevelNamespaces) - 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 = require(msg.module)[msg.classname]; - main = window.main = new clazz(sender); - } -}; -})(this); - -define("ace/range",[], function(require, exports, module) { -"use strict"; -var comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; -var Range = function(startRow, startColumn, endRow, endColumn) { - this.start = { - row: startRow, - column: startColumn - }; - - this.end = { - row: endRow, - column: endColumn - }; -}; - -(function() { - this.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; - }; - this.toString = function() { - return ("Range: [" + this.start.row + "/" + this.start.column + - "] -> [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.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; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.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; - } - }; - this.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; - } - }; - this.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; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.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; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.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); - } - }; - this.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); - }; - this.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); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.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); - }; - this.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 - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -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 this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - 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 - }; - } - this.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 - }); - }; - this.detach = function() { - this.document.off("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$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; - }; - -}).call(Anchor.prototype); - -}); - -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 = function(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); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.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); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.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; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.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); - }; - - this.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}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$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; - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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; - }; - this.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: ["", ""] - }); - } - }; - this.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; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.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); - } - }; - - this.$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); - } - }; - - this.$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); - }; - this.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() - }); - }; - this.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}; - }; - this.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; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -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 [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.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; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.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; - } - }; - this.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; - } - }; - this.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; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.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; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.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); - } - }; - this.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); - }; - this.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); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.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); - }; - this.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 - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -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 this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - 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 - }; - } - this.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 - }); - }; - this.detach = function() { - this.document.off("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$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; - }; - -}).call(Anchor.prototype); - -}); - -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 = function(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); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.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); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.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; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.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); - }; - - this.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}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$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; - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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; - }; - this.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: ["", ""] - }); - } - }; - this.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; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.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); - } - }; - - this.$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); - } - }; - - this.$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); - }; - this.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() - }); - }; - this.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}; - }; - this.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; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -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=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 [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.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; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.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; - } - }; - this.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; - } - }; - this.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; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.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; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.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); - } - }; - this.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); - }; - this.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); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.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); - }; - this.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 - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -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 this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - 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 - }; - } - this.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 - }); - }; - this.detach = function() { - this.document.off("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$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; - }; - -}).call(Anchor.prototype); - -}); - -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 = function(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); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.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); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.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; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.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); - }; - - this.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}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$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; - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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; - }; - this.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: ["", ""] - }); - } - }; - this.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; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.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); - } - }; - - this.$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); - } - }; - - this.$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); - }; - this.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() - }); - }; - this.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}; - }; - this.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; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -define("ace/worker/mirror",[], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; -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) { - if (Array.isArray(data[i+1])) { - var d = {action: "insert", start: data[i], lines: data[i+1]}; - } else { - var d = {action: "remove", start: data[i], end: data[i+1]}; - } - 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 if (tokenStream.peek() === Tokens.RBRACE) { - } else { - 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.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" : "#", - "animation-direction" : "#", - "animation-duration" : "#", - "animation-fill-mode" : "[ none | forwards | backwards | both ]#", - "animation-iteration-count" : "[ | infinite ]#", - "animation-name" : "[ none | ]#", - "animation-play-state" : "[ running | paused ]#", - "animation-timing-function" : 1, - "-moz-animation-delay" : "#", - "-moz-animation-direction" : "[ normal | alternate ]#", - "-moz-animation-duration" : "#", - "-moz-animation-iteration-count" : "[ | infinite ]#", - "-moz-animation-name" : "[ none | ]#", - "-moz-animation-play-state" : "[ running | paused ]#", - - "-ms-animation-delay" : "#", - "-ms-animation-direction" : "[ normal | alternate ]#", - "-ms-animation-duration" : "#", - "-ms-animation-iteration-count" : "[ | infinite ]#", - "-ms-animation-name" : "[ none | ]#", - "-ms-animation-play-state" : "[ running | paused ]#", - - "-webkit-animation-delay" : "#", - "-webkit-animation-direction" : "[ normal | alternate ]#", - "-webkit-animation-duration" : "#", - "-webkit-animation-fill-mode" : "[ none | forwards | backwards | both ]#", - "-webkit-animation-iteration-count" : "[ | infinite ]#", - "-webkit-animation-name" : "[ none | ]#", - "-webkit-animation-play-state" : "[ running | paused ]#", - - "-o-animation-delay" : "#", - "-o-animation-direction" : "[ normal | alternate ]#", - "-o-animation-duration" : "#", - "-o-animation-iteration-count" : "[ | infinite ]#", - "-o-animation-name" : "[ none | ]#", - "-o-animation-play-state" : "[ running | paused ]#", - - "appearance" : "none | auto", - "-moz-appearance" : "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized", - "-ms-appearance" : "none | icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal", - "-webkit-appearance" : "none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | listbox | listitem | media-fullscreen-button | media-mute-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical", - "-o-appearance" : "none | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal", - - "azimuth" : "", - "backface-visibility" : "visible | hidden", - "background" : 1, - "background-attachment" : "#", - "background-clip" : "#", - "background-color" : "", - "background-image" : "#", - "background-origin" : "#", - "background-position" : "", - "background-repeat" : "#", - "background-size" : "#", - "baseline-shift" : "baseline | sub | super | | ", - "behavior" : 1, - "binding" : 1, - "bleed" : "", - "bookmark-label" : " | | ", - "bookmark-level" : "none | ", - "bookmark-state" : "open | closed", - "bookmark-target" : "none | | ", - "border" : " || || ", - "border-bottom" : " || || ", - "border-bottom-color" : "", - "border-bottom-left-radius" : "", - "border-bottom-right-radius" : "", - "border-bottom-style" : "", - "border-bottom-width" : "", - "border-collapse" : "collapse | separate", - "border-color" : "{1,4}", - "border-image" : 1, - "border-image-outset" : "[ | ]{1,4}", - "border-image-repeat" : "[ stretch | repeat | round | space ]{1,2}", - "border-image-slice" : "", - "border-image-source" : " | none", - "border-image-width" : "[ | | | auto ]{1,4}", - "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" : "{1,2}", - "border-style" : "{1,4}", - "border-top" : " || || ", - "border-top-color" : "", - "border-top-left-radius" : "", - "border-top-right-radius" : "", - "border-top-style" : "", - "border-top-width" : "", - "border-width" : "{1,4}", - "bottom" : "", - "-moz-box-align" : "start | end | center | baseline | stretch", - "-moz-box-decoration-break" : "slice | clone", - "-moz-box-direction" : "normal | reverse", - "-moz-box-flex" : "", - "-moz-box-flex-group" : "", - "-moz-box-lines" : "single | multiple", - "-moz-box-ordinal-group" : "", - "-moz-box-orient" : "horizontal | vertical | inline-axis | block-axis", - "-moz-box-pack" : "start | end | center | justify", - "-o-box-decoration-break" : "slice | clone", - "-webkit-box-align" : "start | end | center | baseline | stretch", - "-webkit-box-decoration-break" : "slice | clone", - "-webkit-box-direction" : "normal | reverse", - "-webkit-box-flex" : "", - "-webkit-box-flex-group" : "", - "-webkit-box-lines" : "single | multiple", - "-webkit-box-ordinal-group" : "", - "-webkit-box-orient" : "horizontal | vertical | inline-axis | block-axis", - "-webkit-box-pack" : "start | end | center | justify", - "box-decoration-break" : "slice | clone", - "box-shadow" : "", - "box-sizing" : "content-box | border-box", - "break-after" : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column", - "break-before" : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column", - "break-inside" : "auto | avoid | avoid-page | avoid-column", - "caption-side" : "top | bottom", - "clear" : "none | right | left | both", - "clip" : " | auto", - "-webkit-clip-path" : " | | none", - "clip-path" : " | | none", - "clip-rule" : "nonzero | evenodd", - "color" : "", - "color-interpolation" : "auto | sRGB | linearRGB", - "color-interpolation-filters" : "auto | sRGB | linearRGB", - "color-profile" : 1, - "color-rendering" : "auto | optimizeSpeed | optimizeQuality", - "column-count" : " | auto", // https ://www.w3.org/TR/css3-multicol/ - "column-fill" : "auto | balance", - "column-gap" : " | normal", - "column-rule" : " || || ", - "column-rule-color" : "", - "column-rule-style" : "", - "column-rule-width" : "", - "column-span" : "none | all", - "column-width" : " | auto", - "columns" : 1, - "content" : 1, - "counter-increment" : 1, - "counter-reset" : 1, - "crop" : " | auto", - "cue" : "cue-after | cue-before", - "cue-after" : 1, - "cue-before" : 1, - "cursor" : 1, - "direction" : "ltr | rtl", - "display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | run-in | ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container | contents | none | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex", - "dominant-baseline" : "auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge", - "drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | | ", - "drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", - "drop-initial-before-adjust" : "before-edge | text-before-edge | central | middle | hanging | mathematical | | ", - "drop-initial-before-align" : "caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical", - "drop-initial-size" : "auto | line | | ", - "drop-initial-value" : "", - "elevation" : " | below | level | above | higher | lower", - "empty-cells" : "show | hide", - "enable-background" : 1, - "fill" : "", - "fill-opacity" : "", - "fill-rule" : "nonzero | evenodd", - "filter" : " | none", - "fit" : "fill | hidden | meet | slice", - "fit-position" : 1, - "flex" : "", - "flex-basis" : "", - "flex-direction" : "row | row-reverse | column | column-reverse", - "flex-flow" : " || ", - "flex-grow" : "", - "flex-shrink" : "", - "flex-wrap" : "nowrap | wrap | wrap-reverse", - "-webkit-flex" : "", - "-webkit-flex-basis" : "", - "-webkit-flex-direction" : "row | row-reverse | column | column-reverse", - "-webkit-flex-flow" : " || ", - "-webkit-flex-grow" : "", - "-webkit-flex-shrink" : "", - "-webkit-flex-wrap" : "nowrap | wrap | wrap-reverse", - "-ms-flex" : "", - "-ms-flex-align" : "start | end | center | stretch | baseline", - "-ms-flex-direction" : "row | row-reverse | column | column-reverse", - "-ms-flex-order" : "", - "-ms-flex-pack" : "start | end | center | justify | distribute", - "-ms-flex-wrap" : "nowrap | wrap | wrap-reverse", - "float" : "left | right | none", - "float-offset" : 1, - "flood-color" : 1, - "flood-opacity" : "", - "font" : " | caption | icon | menu | message-box | small-caption | status-bar", - "font-family" : "", - "font-feature-settings" : " | normal", - "font-kerning" : "auto | normal | none", - "font-size" : "", - "font-size-adjust" : " | none", - "font-stretch" : "", - "font-style" : "", - "font-variant" : " | normal | none", - "font-variant-alternates" : " | normal", - "font-variant-caps" : " | normal", - "font-variant-east-asian" : " | normal", - "font-variant-ligatures" : " | normal | none", - "font-variant-numeric" : " | normal", - "font-variant-position" : "normal | sub | super", - "font-weight" : "", - "gap" : "[ | ]{1,2}", - "glyph-orientation-horizontal" : "", - "glyph-orientation-vertical" : "auto | ", - "grid" : 1, - "grid-area" : 1, - "grid-auto-columns" : 1, - "grid-auto-flow" : 1, - "grid-auto-position" : 1, - "grid-auto-rows" : 1, - "grid-cell-stacking" : "columns | rows | layer", - "grid-column" : 1, - "grid-columns" : 1, - "grid-column-align" : "start | end | center | stretch", - "grid-column-sizing" : 1, - "grid-column-start" : 1, - "grid-column-end" : 1, - "grid-column-span" : "", - "grid-flow" : "none | rows | columns", - "grid-gap" : "[ | ]{1,2}", - "grid-layer" : "", - "grid-row" : 1, - "grid-rows" : 1, - "grid-row-align" : "start | end | center | stretch", - "grid-row-gap" : 1, - "grid-row-start" : 1, - "grid-row-end" : 1, - "grid-row-span" : "", - "grid-row-sizing" : 1, - "grid-template" : 1, - "grid-template-areas" : 1, - "grid-template-columns" : 1, - "grid-template-rows" : 1, - "hanging-punctuation" : 1, - "height" : " | ", - "hyphenate-after" : " | auto", - "hyphenate-before" : " | auto", - "hyphenate-character" : " | auto", - "hyphenate-lines" : "no-limit | ", - "hyphenate-resource" : 1, - "hyphens" : "none | manual | auto", - "icon" : 1, - "image-orientation" : "angle | auto", - "image-rendering" : "auto | optimizeSpeed | optimizeQuality", - "image-resolution" : 1, - "ime-mode" : "auto | normal | active | inactive | disabled", - "inline-box-align" : "last | ", - "justify-content" : "flex-start | flex-end | center | space-between | space-around | space-evenly | stretch", - "-webkit-justify-content" : "flex-start | flex-end | center | space-between | space-around | space-evenly | stretch", - "kerning" : "auto | ", - "left" : "", - "letter-spacing" : " | normal", - "line-height" : "", - "line-break" : "auto | loose | normal | strict", - "line-stacking" : 1, - "line-stacking-ruby" : "exclude-ruby | include-ruby", - "line-stacking-shift" : "consider-shifts | disregard-shifts", - "line-stacking-strategy" : "inline-line-height | block-line-height | max-height | grid-height", - "list-style" : 1, - "list-style-image" : " | none", - "list-style-position" : "inside | outside", - "list-style-type" : "disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none", - "margin" : "{1,4}", - "margin-bottom" : "", - "margin-left" : "", - "margin-right" : "", - "margin-top" : "", - "mark" : 1, - "mark-after" : 1, - "mark-before" : 1, - "marker" : 1, - "marker-end" : 1, - "marker-mid" : 1, - "marker-start" : 1, - "marks" : 1, - "marquee-direction" : 1, - "marquee-play-count" : 1, - "marquee-speed" : 1, - "marquee-style" : 1, - "mask" : 1, - "max-height" : " | | | none", - "max-width" : " | | | none", - "min-height" : " | | | contain-floats | -moz-contain-floats | -webkit-contain-floats", - "min-width" : " | | | contain-floats | -moz-contain-floats | -webkit-contain-floats", - "mix-blend-mode" : "", - "move-to" : 1, - "nav-down" : 1, - "nav-index" : 1, - "nav-left" : 1, - "nav-right" : 1, - "nav-up" : 1, - "object-fit" : "fill | contain | cover | none | scale-down", - "object-position" : "", - "opacity" : "", - "order" : "", - "-webkit-order" : "", - "orphans" : "", - "outline" : 1, - "outline-color" : " | invert", - "outline-offset" : 1, - "outline-style" : "", - "outline-width" : "", - "overflow" : "visible | hidden | scroll | auto", - "overflow-style" : 1, - "overflow-wrap" : "normal | break-word", - "overflow-x" : 1, - "overflow-y" : 1, - "padding" : "{1,4}", - "padding-bottom" : "", - "padding-left" : "", - "padding-right" : "", - "padding-top" : "", - "page" : 1, - "page-break-after" : "auto | always | avoid | left | right", - "page-break-before" : "auto | always | avoid | left | right", - "page-break-inside" : "auto | avoid", - "page-policy" : 1, - "pause" : 1, - "pause-after" : 1, - "pause-before" : 1, - "perspective" : 1, - "perspective-origin" : 1, - "phonemes" : 1, - "pitch" : 1, - "pitch-range" : 1, - "play-during" : 1, - "pointer-events" : "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all", - "position" : "static | relative | absolute | fixed | sticky | -webkit-sticky", - "presentation-level" : 1, - "punctuation-trim" : 1, - "quotes" : 1, - "rendering-intent" : 1, - "resize" : 1, - "rest" : 1, - "rest-after" : 1, - "rest-before" : 1, - "richness" : 1, - "right" : "", - "rotation" : 1, - "rotation-point" : 1, - "ruby-align" : 1, - "ruby-overhang" : 1, - "ruby-position" : 1, - "ruby-span" : 1, - "shape-rendering" : "auto | optimizeSpeed | crispEdges | geometricPrecision", - "size" : 1, - "speak" : "normal | none | spell-out", - "speak-header" : "once | always", - "speak-numeral" : "digits | continuous", - "speak-punctuation" : "code | none", - "speech-rate" : 1, - "src" : 1, - "stop-color" : 1, - "stop-opacity" : "", - "stress" : 1, - "string-set" : 1, - "stroke" : "", - "stroke-dasharray" : "none | ", - "stroke-dashoffset" : " | ", - "stroke-linecap" : "butt | round | square", - "stroke-linejoin" : "miter | round | bevel", - "stroke-miterlimit" : "", - "stroke-opacity" : "", - "stroke-width" : " | ", - - "table-layout" : "auto | fixed", - "tab-size" : " | ", - "target" : 1, - "target-name" : 1, - "target-new" : 1, - "target-position" : 1, - "text-align" : "left | right | center | justify | match-parent | start | end", - "text-align-last" : 1, - "text-anchor" : "start | middle | end", - "text-decoration" : " || || ", - "text-decoration-color" : "", - "text-decoration-line" : "", - "text-decoration-style" : "", - "text-decoration-skip" : "none | [ objects || spaces || ink || edges || box-decoration ]", - "-webkit-text-decoration-skip" : "none | [ objects || spaces || ink || edges || box-decoration ]", - "text-underline-position" : "auto | [ under || [ left | right ] ]", - "text-emphasis" : 1, - "text-height" : 1, - "text-indent" : " | ", - "text-justify" : "auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida", - "text-outline" : 1, - "text-overflow" : 1, - "text-rendering" : "auto | optimizeSpeed | optimizeLegibility | geometricPrecision", - "text-shadow" : 1, - "text-transform" : "capitalize | uppercase | lowercase | none", - "text-wrap" : "normal | none | avoid", - "top" : "", - "-ms-touch-action" : "auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation", - "touch-action" : "auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation", - "transform" : 1, - "transform-origin" : 1, - "transform-style" : 1, - "transition" : 1, - "transition-delay" : 1, - "transition-duration" : 1, - "transition-property" : 1, - "transition-timing-function" : 1, - "unicode-bidi" : "normal | embed | isolate | bidi-override | isolate-override | plaintext", - "user-modify" : "read-only | read-write | write-only", - "user-select" : "auto | text | none | contain | all", - "vertical-align" : "auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | | ", - "visibility" : "visible | hidden | collapse", - "voice-balance" : 1, - "voice-duration" : 1, - "voice-family" : 1, - "voice-pitch" : 1, - "voice-pitch-range" : 1, - "voice-rate" : 1, - "voice-stress" : 1, - "voice-volume" : 1, - "volume" : 1, - "white-space" : "normal | pre | nowrap | pre-wrap | pre-line | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap", // https ://perishablepress.com/wrapping-content/ - "white-space-collapse" : 1, - "widows" : "", - "width" : " | | | auto", - "will-change" : "", - "word-break" : "normal | keep-all | break-all | break-word", - "word-spacing" : " | normal", - "word-wrap" : "normal | break-word", - "writing-mode" : "horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb", - "z-index" : " | auto", - "zoom" : " | | normal" -}; - -},{}],8:[function(require,module,exports){ -"use strict"; - -module.exports = PropertyName; - -var SyntaxUnit = require("../util/SyntaxUnit"); - -var Parser = require("./Parser"); -function PropertyName(text, hack, line, col) { - - SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_NAME_TYPE); - this.hack = hack; - -} - -PropertyName.prototype = new SyntaxUnit(); -PropertyName.prototype.constructor = PropertyName; -PropertyName.prototype.toString = function() { - return (this.hack ? this.hack : "") + this.text; -}; - -},{"../util/SyntaxUnit":26,"./Parser":6}],9:[function(require,module,exports){ -"use strict"; - -module.exports = PropertyValue; - -var SyntaxUnit = require("../util/SyntaxUnit"); - -var Parser = require("./Parser"); -function PropertyValue(parts, line, col) { - - SyntaxUnit.call(this, parts.join(" "), line, col, Parser.PROPERTY_VALUE_TYPE); - this.parts = parts; - -} - -PropertyValue.prototype = new SyntaxUnit(); -PropertyValue.prototype.constructor = PropertyValue; - - -},{"../util/SyntaxUnit":26,"./Parser":6}],10:[function(require,module,exports){ -"use strict"; - -module.exports = PropertyValueIterator; -function PropertyValueIterator(value) { - this._i = 0; - this._parts = value.parts; - this._marks = []; - this.value = value; - -} -PropertyValueIterator.prototype.count = function() { - return this._parts.length; -}; -PropertyValueIterator.prototype.isFirst = function() { - return this._i === 0; -}; -PropertyValueIterator.prototype.hasNext = function() { - return this._i < this._parts.length; -}; -PropertyValueIterator.prototype.mark = function() { - this._marks.push(this._i); -}; -PropertyValueIterator.prototype.peek = function(count) { - return this.hasNext() ? this._parts[this._i + (count || 0)] : null; -}; -PropertyValueIterator.prototype.next = function() { - return this.hasNext() ? this._parts[this._i++] : null; -}; -PropertyValueIterator.prototype.previous = function() { - return this._i > 0 ? this._parts[--this._i] : null; -}; -PropertyValueIterator.prototype.restore = function() { - if (this._marks.length) { - this._i = this._marks.pop(); - } -}; -PropertyValueIterator.prototype.drop = function() { - this._marks.pop(); -}; - -},{}],11:[function(require,module,exports){ -"use strict"; - -module.exports = PropertyValuePart; - -var SyntaxUnit = require("../util/SyntaxUnit"); - -var Colors = require("./Colors"); -var Parser = require("./Parser"); -var Tokens = require("./Tokens"); -function PropertyValuePart(text, line, col, optionalHint) { - var hint = optionalHint || {}; - - SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_VALUE_PART_TYPE); - this.type = "unknown"; - - var temp; - if (/^([+-]?[\d.]+)([a-z]+)$/i.test(text)) { // dimension - this.type = "dimension"; - this.value = Number(RegExp.$1); - this.units = RegExp.$2; - switch (this.units.toLowerCase()) { - - case "em": - case "rem": - case "ex": - case "px": - case "cm": - case "mm": - case "in": - case "pt": - case "pc": - case "ch": - case "vh": - case "vw": - case "vmax": - case "vmin": - this.type = "length"; - break; - - case "fr": - this.type = "grid"; - break; - - case "deg": - case "rad": - case "grad": - case "turn": - this.type = "angle"; - break; - - case "ms": - case "s": - this.type = "time"; - break; - - case "hz": - case "khz": - this.type = "frequency"; - break; - - case "dpi": - case "dpcm": - this.type = "resolution"; - break; - - } - - } else if (/^([+-]?[\d.]+)%$/i.test(text)) { // percentage - this.type = "percentage"; - this.value = Number(RegExp.$1); - } else if (/^([+-]?\d+)$/i.test(text)) { // integer - this.type = "integer"; - this.value = Number(RegExp.$1); - } else if (/^([+-]?[\d.]+)$/i.test(text)) { // number - this.type = "number"; - this.value = Number(RegExp.$1); - - } else if (/^#([a-f0-9]{3,6})/i.test(text)) { // hexcolor - this.type = "color"; - temp = RegExp.$1; - if (temp.length === 3) { - this.red = parseInt(temp.charAt(0) + temp.charAt(0), 16); - this.green = parseInt(temp.charAt(1) + temp.charAt(1), 16); - this.blue = parseInt(temp.charAt(2) + temp.charAt(2), 16); - } else { - this.red = parseInt(temp.substring(0, 2), 16); - this.green = parseInt(temp.substring(2, 4), 16); - this.blue = parseInt(temp.substring(4, 6), 16); - } - } else if (/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)) { // rgb() color with absolute numbers - this.type = "color"; - this.red = Number(RegExp.$1); - this.green = Number(RegExp.$2); - this.blue = Number(RegExp.$3); - } else if (/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)) { // rgb() color with percentages - this.type = "color"; - this.red = Number(RegExp.$1) * 255 / 100; - this.green = Number(RegExp.$2) * 255 / 100; - this.blue = Number(RegExp.$3) * 255 / 100; - } else if (/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/i.test(text)) { // rgba() color with absolute numbers - this.type = "color"; - this.red = Number(RegExp.$1); - this.green = Number(RegExp.$2); - this.blue = Number(RegExp.$3); - this.alpha = Number(RegExp.$4); - } else if (/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d.]+)\s*\)/i.test(text)) { // rgba() color with percentages - this.type = "color"; - this.red = Number(RegExp.$1) * 255 / 100; - this.green = Number(RegExp.$2) * 255 / 100; - this.blue = Number(RegExp.$3) * 255 / 100; - this.alpha = Number(RegExp.$4); - } else if (/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)) { // hsl() - this.type = "color"; - this.hue = Number(RegExp.$1); - this.saturation = Number(RegExp.$2) / 100; - this.lightness = Number(RegExp.$3) / 100; - } else if (/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d.]+)\s*\)/i.test(text)) { // hsla() color with percentages - this.type = "color"; - this.hue = Number(RegExp.$1); - this.saturation = Number(RegExp.$2) / 100; - this.lightness = Number(RegExp.$3) / 100; - this.alpha = Number(RegExp.$4); - } else if (/^url\(("([^\\"]|\.)*")\)/i.test(text)) { // URI - this.type = "uri"; - this.uri = PropertyValuePart.parseString(RegExp.$1); - } else if (/^([^(]+)\(/i.test(text)) { - this.type = "function"; - this.name = RegExp.$1; - this.value = text; - } else if (/^"([^\n\r\f\\"]|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*"/i.test(text)) { // double-quoted string - this.type = "string"; - this.value = PropertyValuePart.parseString(text); - } else if (/^'([^\n\r\f\\']|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*'/i.test(text)) { // single-quoted string - this.type = "string"; - this.value = PropertyValuePart.parseString(text); - } else if (Colors[text.toLowerCase()]) { // named color - this.type = "color"; - temp = Colors[text.toLowerCase()].substring(1); - this.red = parseInt(temp.substring(0, 2), 16); - this.green = parseInt(temp.substring(2, 4), 16); - this.blue = parseInt(temp.substring(4, 6), 16); - } else if (/^[,/]$/.test(text)) { - this.type = "operator"; - this.value = text; - } else if (/^-?[a-z_\u00A0-\uFFFF][a-z0-9\-_\u00A0-\uFFFF]*$/i.test(text)) { - this.type = "identifier"; - this.value = text; - } - this.wasIdent = Boolean(hint.ident); - -} - -PropertyValuePart.prototype = new SyntaxUnit(); -PropertyValuePart.prototype.constructor = PropertyValuePart; -PropertyValuePart.parseString = function(str) { - str = str.slice(1, -1); // Strip surrounding single/double quotes - var replacer = function(match, esc) { - if (/^(\n|\r\n|\r|\f)$/.test(esc)) { - return ""; - } - var m = /^[0-9a-f]{1,6}/i.exec(esc); - if (m) { - var codePoint = parseInt(m[0], 16); - if (String.fromCodePoint) { - return String.fromCodePoint(codePoint); - } else { - return String.fromCharCode(codePoint); - } - } - return esc; - }; - return str.replace(/\\(\r\n|[^\r0-9a-f]|[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)/ig, - replacer); -}; -PropertyValuePart.serializeString = function(value) { - var replacer = function(match, c) { - if (c === "\"") { - return "\\" + c; - } - var cp = String.codePointAt ? String.codePointAt(0) : - String.charCodeAt(0); - return "\\" + cp.toString(16) + " "; - }; - return "\"" + value.replace(/["\r\n\f]/g, replacer) + "\""; -}; -PropertyValuePart.fromToken = function(token) { - var part = new PropertyValuePart(token.value, token.startLine, token.startCol, { - ident: token.type === Tokens.IDENT - }); - return part; -}; - -},{"../util/SyntaxUnit":26,"./Colors":1,"./Parser":6,"./Tokens":18}],12:[function(require,module,exports){ -"use strict"; - -var Pseudos = module.exports = { - __proto__: null, - ":first-letter": 1, - ":first-line": 1, - ":before": 1, - ":after": 1 -}; - -Pseudos.ELEMENT = 1; -Pseudos.CLASS = 2; - -Pseudos.isElement = function(pseudo) { - return pseudo.indexOf("::") === 0 || Pseudos[pseudo.toLowerCase()] === Pseudos.ELEMENT; -}; - -},{}],13:[function(require,module,exports){ -"use strict"; - -module.exports = Selector; - -var SyntaxUnit = require("../util/SyntaxUnit"); - -var Parser = require("./Parser"); -var Specificity = require("./Specificity"); -function Selector(parts, line, col) { - - SyntaxUnit.call(this, parts.join(" "), line, col, Parser.SELECTOR_TYPE); - this.parts = parts; - this.specificity = Specificity.calculate(this); - -} - -Selector.prototype = new SyntaxUnit(); -Selector.prototype.constructor = Selector; - - -},{"../util/SyntaxUnit":26,"./Parser":6,"./Specificity":16}],14:[function(require,module,exports){ -"use strict"; - -module.exports = SelectorPart; - -var SyntaxUnit = require("../util/SyntaxUnit"); - -var Parser = require("./Parser"); -function SelectorPart(elementName, modifiers, text, line, col) { - - SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_PART_TYPE); - this.elementName = elementName; - this.modifiers = modifiers; - -} - -SelectorPart.prototype = new SyntaxUnit(); -SelectorPart.prototype.constructor = SelectorPart; - - -},{"../util/SyntaxUnit":26,"./Parser":6}],15:[function(require,module,exports){ -"use strict"; - -module.exports = SelectorSubPart; - -var SyntaxUnit = require("../util/SyntaxUnit"); - -var Parser = require("./Parser"); -function SelectorSubPart(text, type, line, col) { - - SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE); - this.type = type; - this.args = []; - -} - -SelectorSubPart.prototype = new SyntaxUnit(); -SelectorSubPart.prototype.constructor = SelectorSubPart; - - -},{"../util/SyntaxUnit":26,"./Parser":6}],16:[function(require,module,exports){ -"use strict"; - -module.exports = Specificity; - -var Pseudos = require("./Pseudos"); -var SelectorPart = require("./SelectorPart"); -function Specificity(a, b, c, d) { - this.a = a; - this.b = b; - this.c = c; - this.d = d; -} - -Specificity.prototype = { - constructor: Specificity, - compare: function(other) { - var comps = ["a", "b", "c", "d"], - i, len; - - for (i = 0, len = comps.length; i < len; i++) { - if (this[comps[i]] < other[comps[i]]) { - return -1; - } else if (this[comps[i]] > other[comps[i]]) { - return 1; - } - } - - return 0; - }, - valueOf: function() { - return (this.a * 1000) + (this.b * 100) + (this.c * 10) + this.d; - }, - toString: function() { - return this.a + "," + this.b + "," + this.c + "," + this.d; - } - -}; -Specificity.calculate = function(selector) { - - var i, - len, - part, - b = 0, - c = 0, - d = 0; - - function updateValues(part) { - - var i, j, len, num, - elementName = part.elementName ? part.elementName.text : "", - modifier; - - if (elementName && elementName.charAt(elementName.length - 1) !== "*") { - d++; - } - - for (i = 0, len = part.modifiers.length; i < len; i++) { - modifier = part.modifiers[i]; - switch (modifier.type) { - case "class": - case "attribute": - c++; - break; - - case "id": - b++; - break; - - case "pseudo": - if (Pseudos.isElement(modifier.text)) { - d++; - } else { - c++; - } - break; - - case "not": - for (j = 0, num = modifier.args.length; j < num; j++) { - updateValues(modifier.args[j]); - } - } - } - } - - for (i = 0, len = selector.parts.length; i < len; i++) { - part = selector.parts[i]; - - if (part instanceof SelectorPart) { - updateValues(part); - } - } - - return new Specificity(0, b, c, d); -}; - -},{"./Pseudos":12,"./SelectorPart":14}],17:[function(require,module,exports){ -"use strict"; - -module.exports = TokenStream; - -var TokenStreamBase = require("../util/TokenStreamBase"); - -var PropertyValuePart = require("./PropertyValuePart"); -var Tokens = require("./Tokens"); - -var h = /^[0-9a-fA-F]$/, - nonascii = /^[\u00A0-\uFFFF]$/, - nl = /\n|\r\n|\r|\f/, - whitespace = /\u0009|\u000a|\u000c|\u000d|\u0020/; - - -function isHexDigit(c) { - return c != null && h.test(c); -} - -function isDigit(c) { - return c != null && /\d/.test(c); -} - -function isWhitespace(c) { - return c != null && whitespace.test(c); -} - -function isNewLine(c) { - return c != null && nl.test(c); -} - -function isNameStart(c) { - return c != null && /[a-z_\u00A0-\uFFFF\\]/i.test(c); -} - -function isNameChar(c) { - return c != null && (isNameStart(c) || /[0-9\-\\]/.test(c)); -} - -function isIdentStart(c) { - return c != null && (isNameStart(c) || /-\\/.test(c)); -} - -function mix(receiver, supplier) { - for (var prop in supplier) { - if (Object.prototype.hasOwnProperty.call(supplier, prop)) { - receiver[prop] = supplier[prop]; - } - } - return receiver; -} - -function wouldStartIdent(twoCodePoints) { - return typeof twoCodePoints === "string" && - (twoCodePoints[0] === "-" && isNameStart(twoCodePoints[1]) || isNameStart(twoCodePoints[0])); -} - -function wouldStartUnsignedNumber(twoCodePoints) { - return typeof twoCodePoints === "string" && - (isDigit(twoCodePoints[0]) || (twoCodePoints[0] === "." && isDigit(twoCodePoints[1]))); -} -function TokenStream(input) { - TokenStreamBase.call(this, input, Tokens); -} - -TokenStream.prototype = mix(new TokenStreamBase(), { - _getToken: function() { - - var c, - reader = this._reader, - token = null, - startLine = reader.getLine(), - startCol = reader.getCol(); - - c = reader.read(); - - while (c) { - switch (c) { - case "/": - - if (reader.peek() === "*") { - token = this.commentToken(c, startLine, startCol); - } else { - token = this.charToken(c, startLine, startCol); - } - break; - case "|": - case "~": - case "^": - case "$": - case "*": - if (reader.peek() === "=") { - token = this.comparisonToken(c, startLine, startCol); - } else { - token = this.charToken(c, startLine, startCol); - } - break; - case "\"": - case "'": - token = this.stringToken(c, startLine, startCol); - break; - case "#": - if (isNameChar(reader.peek())) { - token = this.hashToken(c, startLine, startCol); - } else { - token = this.charToken(c, startLine, startCol); - } - break; - case ".": - if (isDigit(reader.peek())) { - token = this.numberToken(c, startLine, startCol); - } else { - token = this.charToken(c, startLine, startCol); - } - break; - case "-": - if (wouldStartUnsignedNumber(reader.peekCount(2))) { - token = this.numberToken(c, startLine, startCol); - break; - } else if (reader.peekCount(2) === "->") { - token = this.htmlCommentEndToken(c, startLine, startCol); - } else { - token = this._getDefaultToken(c, startLine, startCol); - } - break; - case "+": - if (wouldStartUnsignedNumber(reader.peekCount(2))) { - token = this.numberToken(c, startLine, startCol); - } else { - token = this.charToken(c, startLine, startCol); - } - break; - case "!": - token = this.importantToken(c, startLine, startCol); - break; - case "@": - token = this.atRuleToken(c, startLine, startCol); - break; - case ":": - token = this.notToken(c, startLine, startCol); - break; - case "<": - token = this.htmlCommentStartToken(c, startLine, startCol); - break; - case "\\": - if (/[^\r\n\f]/.test(reader.peek())) { - token = this.identOrFunctionToken(this.readEscape(c, true), startLine, startCol); - } else { - token = this.charToken(c, startLine, startCol); - } - break; - case "U": - case "u": - if (reader.peek() === "+") { - token = this.unicodeRangeToken(c, startLine, startCol); - } else { - token = this._getDefaultToken(c, startLine, startCol); - } - break; - - default: - token = this._getDefaultToken(c, startLine, startCol); - - } - break; - } - - if (!token && c === null) { - token = this.createToken(Tokens.EOF, null, startLine, startCol); - } - - return token; - }, - _getDefaultToken: function(c, startLine, startCol) { - var reader = this._reader, - token = null; - - if (isDigit(c)) { - token = this.numberToken(c, startLine, startCol); - } else - if (isWhitespace(c)) { - token = this.whitespaceToken(c, startLine, startCol); - } else - if (wouldStartIdent(c + reader.peekCount(1))) { - token = this.identOrFunctionToken(c, startLine, startCol); - } else { - token = this.charToken(c, startLine, startCol); - } - - return token; - }, - createToken: function(tt, value, startLine, startCol, options) { - var reader = this._reader; - options = options || {}; - - return { - value: value, - type: tt, - channel: options.channel, - endChar: options.endChar, - hide: options.hide || false, - startLine: startLine, - startCol: startCol, - endLine: reader.getLine(), - endCol: reader.getCol() - }; - }, - atRuleToken: function(first, startLine, startCol) { - var rule = first, - reader = this._reader, - tt = Tokens.CHAR, - ident; - reader.mark(); - ident = this.readName(); - rule = first + ident; - tt = Tokens.type(rule.toLowerCase()); - if (tt === Tokens.CHAR || tt === Tokens.UNKNOWN) { - if (rule.length > 1) { - tt = Tokens.UNKNOWN_SYM; - } else { - tt = Tokens.CHAR; - rule = first; - reader.reset(); - } - } - - return this.createToken(tt, rule, startLine, startCol); - }, - charToken: function(c, startLine, startCol) { - var tt = Tokens.type(c); - var opts = {}; - - if (tt === -1) { - tt = Tokens.CHAR; - } else { - opts.endChar = Tokens[tt].endChar; - } - - return this.createToken(tt, c, startLine, startCol, opts); - }, - commentToken: function(first, startLine, startCol) { - var comment = this.readComment(first); - - return this.createToken(Tokens.COMMENT, comment, startLine, startCol); - }, - comparisonToken: function(c, startLine, startCol) { - var reader = this._reader, - comparison = c + reader.read(), - tt = Tokens.type(comparison) || Tokens.CHAR; - - return this.createToken(tt, comparison, startLine, startCol); - }, - hashToken: function(first, startLine, startCol) { - var name = this.readName(first); - - return this.createToken(Tokens.HASH, name, startLine, startCol); - }, - htmlCommentStartToken: function(first, startLine, startCol) { - var reader = this._reader, - text = first; - - reader.mark(); - text += reader.readCount(3); - - if (text === "") { - return this.createToken(Tokens.CDC, text, startLine, startCol); - } else { - reader.reset(); - return this.charToken(first, startLine, startCol); - } - }, - identOrFunctionToken: function(first, startLine, startCol) { - var reader = this._reader, - ident = this.readName(first), - tt = Tokens.IDENT, - uriFns = ["url(", "url-prefix(", "domain("], - uri; - if (reader.peek() === "(") { - ident += reader.read(); - if (uriFns.indexOf(ident.toLowerCase()) > -1) { - reader.mark(); - uri = this.readURI(ident); - if (uri === null) { - reader.reset(); - tt = Tokens.FUNCTION; - } else { - tt = Tokens.URI; - ident = uri; - } - } else { - tt = Tokens.FUNCTION; - } - } else if (reader.peek() === ":") { // might be an IE function - if (ident.toLowerCase() === "progid") { - ident += reader.readTo("("); - tt = Tokens.IE_FUNCTION; - } - } - - return this.createToken(tt, ident, startLine, startCol); - }, - importantToken: function(first, startLine, startCol) { - var reader = this._reader, - important = first, - tt = Tokens.CHAR, - temp, - c; - - reader.mark(); - c = reader.read(); - - while (c) { - if (c === "/") { - if (reader.peek() !== "*") { - break; - } else { - temp = this.readComment(c); - if (temp === "") { // broken! - break; - } - } - } else if (isWhitespace(c)) { - important += c + this.readWhitespace(); - } else if (/i/i.test(c)) { - temp = reader.readCount(8); - if (/mportant/i.test(temp)) { - important += c + temp; - tt = Tokens.IMPORTANT_SYM; - - } - break; // we're done - } else { - break; - } - - c = reader.read(); - } - - if (tt === Tokens.CHAR) { - reader.reset(); - return this.charToken(first, startLine, startCol); - } else { - return this.createToken(tt, important, startLine, startCol); - } - - - }, - notToken: function(first, startLine, startCol) { - var reader = this._reader, - text = first; - - reader.mark(); - text += reader.readCount(4); - - if (text.toLowerCase() === ":not(") { - return this.createToken(Tokens.NOT, text, startLine, startCol); - } else { - reader.reset(); - return this.charToken(first, startLine, startCol); - } - }, - numberToken: function(first, startLine, startCol) { - var reader = this._reader, - value = this.readNumber(first), - ident, - tt = Tokens.NUMBER, - c = reader.peek(); - - if (isIdentStart(c)) { - ident = this.readName(reader.read()); - value += ident; - - if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^fr$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)) { - tt = Tokens.LENGTH; - } else if (/^deg|^rad$|^grad$|^turn$/i.test(ident)) { - tt = Tokens.ANGLE; - } else if (/^ms$|^s$/i.test(ident)) { - tt = Tokens.TIME; - } else if (/^hz$|^khz$/i.test(ident)) { - tt = Tokens.FREQ; - } else if (/^dpi$|^dpcm$/i.test(ident)) { - tt = Tokens.RESOLUTION; - } else { - tt = Tokens.DIMENSION; - } - - } else if (c === "%") { - value += reader.read(); - tt = Tokens.PERCENTAGE; - } - - return this.createToken(tt, value, startLine, startCol); - }, - stringToken: function(first, startLine, startCol) { - var delim = first, - string = first, - reader = this._reader, - tt = Tokens.STRING, - c = reader.read(), - i; - - while (c) { - string += c; - - if (c === "\\") { - c = reader.read(); - if (c === null) { - break; // premature EOF after backslash - } else if (/[^\r\n\f0-9a-f]/i.test(c)) { - string += c; - } else { - for (i = 0; isHexDigit(c) && i < 6; i++) { - string += c; - c = reader.read(); - } - if (c === "\r" && reader.peek() === "\n") { - string += c; - c = reader.read(); - } - if (isWhitespace(c)) { - string += c; - } else { - continue; - } - } - } else if (c === delim) { - break; // delimiter found. - } else if (isNewLine(reader.peek())) { - tt = Tokens.INVALID; - break; - } - c = reader.read(); - } - if (c === null) { - tt = Tokens.INVALID; - } - - return this.createToken(tt, string, startLine, startCol); - }, - - unicodeRangeToken: function(first, startLine, startCol) { - var reader = this._reader, - value = first, - temp, - tt = Tokens.CHAR; - if (reader.peek() === "+") { - reader.mark(); - value += reader.read(); - value += this.readUnicodeRangePart(true); - if (value.length === 2) { - reader.reset(); - } else { - - tt = Tokens.UNICODE_RANGE; - if (value.indexOf("?") === -1) { - - if (reader.peek() === "-") { - reader.mark(); - temp = reader.read(); - temp += this.readUnicodeRangePart(false); - if (temp.length === 1) { - reader.reset(); - } else { - value += temp; - } - } - - } - } - } - - return this.createToken(tt, value, startLine, startCol); - }, - whitespaceToken: function(first, startLine, startCol) { - var value = first + this.readWhitespace(); - return this.createToken(Tokens.S, value, startLine, startCol); - }, - - readUnicodeRangePart: function(allowQuestionMark) { - var reader = this._reader, - part = "", - c = reader.peek(); - while (isHexDigit(c) && part.length < 6) { - reader.read(); - part += c; - c = reader.peek(); - } - if (allowQuestionMark) { - while (c === "?" && part.length < 6) { - reader.read(); - part += c; - c = reader.peek(); - } - } - - return part; - }, - - readWhitespace: function() { - var reader = this._reader, - whitespace = "", - c = reader.peek(); - - while (isWhitespace(c)) { - reader.read(); - whitespace += c; - c = reader.peek(); - } - - return whitespace; - }, - readNumber: function(first) { - var reader = this._reader, - number = first, - hasDot = first === ".", - c = reader.peek(); - - - while (c) { - if (isDigit(c)) { - number += reader.read(); - } else if (c === ".") { - if (hasDot) { - break; - } else { - hasDot = true; - number += reader.read(); - } - } else { - break; - } - - c = reader.peek(); - } - - return number; - }, - readString: function() { - var token = this.stringToken(this._reader.read(), 0, 0); - return token.type === Tokens.INVALID ? null : token.value; - }, - readURI: function(first) { - var reader = this._reader, - uri = first, - inner = "", - c = reader.peek(); - while (c && isWhitespace(c)) { - reader.read(); - c = reader.peek(); - } - if (c === "'" || c === "\"") { - inner = this.readString(); - if (inner !== null) { - inner = PropertyValuePart.parseString(inner); - } - } else { - inner = this.readUnquotedURL(); - } - - c = reader.peek(); - while (c && isWhitespace(c)) { - reader.read(); - c = reader.peek(); - } - if (inner === null || c !== ")") { - uri = null; - } else { - uri += PropertyValuePart.serializeString(inner) + reader.read(); - } - - return uri; - }, - readUnquotedURL: function(first) { - var reader = this._reader, - url = first || "", - c; - - for (c = reader.peek(); c; c = reader.peek()) { - if (nonascii.test(c) || /^[-!#$%&*-[\]-~]$/.test(c)) { - url += c; - reader.read(); - } else if (c === "\\") { - if (/^[^\r\n\f]$/.test(reader.peek(2))) { - url += this.readEscape(reader.read(), true); - } else { - break; // bad escape sequence. - } - } else { - break; // bad character - } - } - - return url; - }, - - readName: function(first) { - var reader = this._reader, - ident = first || "", - c; - - for (c = reader.peek(); c; c = reader.peek()) { - if (c === "\\") { - if (/^[^\r\n\f]$/.test(reader.peek(2))) { - ident += this.readEscape(reader.read(), true); - } else { - break; - } - } else if (isNameChar(c)) { - ident += reader.read(); - } else { - break; - } - } - - return ident; - }, - - readEscape: function(first, unescape) { - var reader = this._reader, - cssEscape = first || "", - i = 0, - c = reader.peek(); - - if (isHexDigit(c)) { - do { - cssEscape += reader.read(); - c = reader.peek(); - } while (c && isHexDigit(c) && ++i < 6); - } - - if (cssEscape.length === 1) { - if (/^[^\r\n\f0-9a-f]$/.test(c)) { - reader.read(); - if (unescape) { - return c; - } - } else { - throw new Error("Bad escape sequence."); - } - } else if (c === "\r") { - reader.read(); - if (reader.peek() === "\n") { - c += reader.read(); - } - } else if (/^[ \t\n\f]$/.test(c)) { - reader.read(); - } else { - c = ""; - } - - if (unescape) { - var cp = parseInt(cssEscape.slice(first.length), 16); - return String.fromCodePoint ? String.fromCodePoint(cp) : - String.fromCharCode(cp); - } - return cssEscape + c; - }, - - readComment: function(first) { - var reader = this._reader, - comment = first || "", - c = reader.read(); - - if (c === "*") { - while (c) { - comment += c; - if (comment.length > 2 && c === "*" && reader.peek() === "/") { - comment += reader.read(); - break; - } - - c = reader.read(); - } - - return comment; - } else { - return ""; - } - - } -}); - -},{"../util/TokenStreamBase":27,"./PropertyValuePart":11,"./Tokens":18}],18:[function(require,module,exports){ -"use strict"; - -var Tokens = module.exports = [ - { name: "CDO" }, - { name: "CDC" }, - { name: "S", whitespace: true/*, channel: "ws"*/ }, - { name: "COMMENT", comment: true, hide: true, channel: "comment" }, - { name: "INCLUDES", text: "~=" }, - { name: "DASHMATCH", text: "|=" }, - { name: "PREFIXMATCH", text: "^=" }, - { name: "SUFFIXMATCH", text: "$=" }, - { name: "SUBSTRINGMATCH", text: "*=" }, - { name: "STRING" }, - { name: "IDENT" }, - { name: "HASH" }, - { name: "IMPORT_SYM", text: "@import" }, - { name: "PAGE_SYM", text: "@page" }, - { name: "MEDIA_SYM", text: "@media" }, - { name: "FONT_FACE_SYM", text: "@font-face" }, - { name: "CHARSET_SYM", text: "@charset" }, - { name: "NAMESPACE_SYM", text: "@namespace" }, - { name: "SUPPORTS_SYM", text: "@supports" }, - { name: "VIEWPORT_SYM", text: ["@viewport", "@-ms-viewport", "@-o-viewport"] }, - { name: "DOCUMENT_SYM", text: ["@document", "@-moz-document"] }, - { name: "UNKNOWN_SYM" }, - { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] }, - { name: "IMPORTANT_SYM" }, - { name: "LENGTH" }, - { name: "ANGLE" }, - { name: "TIME" }, - { name: "FREQ" }, - { name: "DIMENSION" }, - { name: "PERCENTAGE" }, - { name: "NUMBER" }, - { name: "URI" }, - { name: "FUNCTION" }, - { name: "UNICODE_RANGE" }, - { name: "INVALID" }, - { name: "PLUS", text: "+" }, - { name: "GREATER", text: ">" }, - { name: "COMMA", text: "," }, - { name: "TILDE", text: "~" }, - { name: "NOT" }, - { name: "TOPLEFTCORNER_SYM", text: "@top-left-corner" }, - { name: "TOPLEFT_SYM", text: "@top-left" }, - { name: "TOPCENTER_SYM", text: "@top-center" }, - { name: "TOPRIGHT_SYM", text: "@top-right" }, - { name: "TOPRIGHTCORNER_SYM", text: "@top-right-corner" }, - { name: "BOTTOMLEFTCORNER_SYM", text: "@bottom-left-corner" }, - { name: "BOTTOMLEFT_SYM", text: "@bottom-left" }, - { name: "BOTTOMCENTER_SYM", text: "@bottom-center" }, - { name: "BOTTOMRIGHT_SYM", text: "@bottom-right" }, - { name: "BOTTOMRIGHTCORNER_SYM", text: "@bottom-right-corner" }, - { name: "LEFTTOP_SYM", text: "@left-top" }, - { name: "LEFTMIDDLE_SYM", text: "@left-middle" }, - { name: "LEFTBOTTOM_SYM", text: "@left-bottom" }, - { name: "RIGHTTOP_SYM", text: "@right-top" }, - { name: "RIGHTMIDDLE_SYM", text: "@right-middle" }, - { name: "RIGHTBOTTOM_SYM", text: "@right-bottom" }, - { name: "RESOLUTION", state: "media" }, - { name: "IE_FUNCTION" }, - { name: "CHAR" }, - { - name: "PIPE", - text: "|" - }, - { - name: "SLASH", - text: "/" - }, - { - name: "MINUS", - text: "-" - }, - { - name: "STAR", - text: "*" - }, - - { - name: "LBRACE", - endChar: "}", - text: "{" - }, - { - name: "RBRACE", - text: "}" - }, - { - name: "LBRACKET", - endChar: "]", - text: "[" - }, - { - name: "RBRACKET", - text: "]" - }, - { - name: "EQUALS", - text: "=" - }, - { - name: "COLON", - text: ":" - }, - { - name: "SEMICOLON", - text: ";" - }, - { - name: "LPAREN", - endChar: ")", - text: "(" - }, - { - name: "RPAREN", - text: ")" - }, - { - name: "DOT", - text: "." - } -]; - -(function() { - var nameMap = [], - typeMap = Object.create(null); - - Tokens.UNKNOWN = -1; - Tokens.unshift({ name:"EOF" }); - for (var i = 0, len = Tokens.length; i < len; i++) { - nameMap.push(Tokens[i].name); - Tokens[Tokens[i].name] = i; - if (Tokens[i].text) { - if (Tokens[i].text instanceof Array) { - for (var j = 0; j < Tokens[i].text.length; j++) { - typeMap[Tokens[i].text[j]] = i; - } - } else { - typeMap[Tokens[i].text] = i; - } - } - } - - Tokens.name = function(tt) { - return nameMap[tt]; - }; - - Tokens.type = function(c) { - return typeMap[c] || -1; - }; -})(); - -},{}],19:[function(require,module,exports){ - -"use strict"; - -var Matcher = require("./Matcher"); -var Properties = require("./Properties"); -var ValidationTypes = require("./ValidationTypes"); -var ValidationError = require("./ValidationError"); -var PropertyValueIterator = require("./PropertyValueIterator"); - -var Validation = module.exports = { - - validate: function(property, value) { - var name = property.toString().toLowerCase(), - expression = new PropertyValueIterator(value), - spec = Properties[name], - part; - - if (!spec) { - if (name.indexOf("-") !== 0) { // vendor prefixed are ok - throw new ValidationError("Unknown property '" + property + "'.", property.line, property.col); - } - } else if (typeof spec !== "number") { - if (ValidationTypes.isAny(expression, "inherit | initial | unset")) { - if (expression.hasNext()) { - part = expression.next(); - throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col); - } - return; - } - this.singleProperty(spec, expression); - - } - - }, - - singleProperty: function(types, expression) { - - var result = false, - value = expression.value, - part; - - result = Matcher.parse(types).match(expression); - - if (!result) { - if (expression.hasNext() && !expression.isFirst()) { - part = expression.peek(); - throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col); - } else { - throw new ValidationError("Expected (" + ValidationTypes.describe(types) + ") but found '" + value + "'.", value.line, value.col); - } - } else if (expression.hasNext()) { - part = expression.next(); - throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col); - } - - } - -}; - -},{"./Matcher":3,"./Properties":7,"./PropertyValueIterator":10,"./ValidationError":20,"./ValidationTypes":21}],20:[function(require,module,exports){ -"use strict"; - -module.exports = ValidationError; -function ValidationError(message, line, col) { - this.col = col; - this.line = line; - this.message = message; - -} -ValidationError.prototype = new Error(); - -},{}],21:[function(require,module,exports){ -"use strict"; - -var ValidationTypes = module.exports; - -var Matcher = require("./Matcher"); - -function copy(to, from) { - Object.keys(from).forEach(function(prop) { - to[prop] = from[prop]; - }); -} -copy(ValidationTypes, { - - isLiteral: function (part, literals) { - var text = part.text.toString().toLowerCase(), - args = literals.split(" | "), - i, - len, - found = false; - - for (i = 0, len = args.length; i < len && !found; i++) { - if (args[i].charAt(0) === "<") { - found = this.simple[args[i]](part); - } else if (args[i].slice(-2) === "()") { - found = (part.type === "function" && - part.name === args[i].slice(0, -2)); - } else if (text === args[i].toLowerCase()) { - found = true; - } - } - - return found; - }, - - isSimple: function(type) { - return Boolean(this.simple[type]); - }, - - isComplex: function(type) { - return Boolean(this.complex[type]); - }, - - describe: function(type) { - if (this.complex[type] instanceof Matcher) { - return this.complex[type].toString(0); - } - return type; - }, - isAny: function (expression, types) { - var args = types.split(" | "), - i, - len, - found = false; - - for (i = 0, len = args.length; i < len && !found && expression.hasNext(); i++) { - found = this.isType(expression, args[i]); - } - - return found; - }, - isAnyOfGroup: function(expression, types) { - var args = types.split(" || "), - i, - len, - found = false; - - for (i = 0, len = args.length; i < len && !found; i++) { - found = this.isType(expression, args[i]); - } - - return found ? args[i - 1] : false; - }, - isType: function (expression, type) { - var part = expression.peek(), - result = false; - - if (type.charAt(0) !== "<") { - result = this.isLiteral(part, type); - if (result) { - expression.next(); - } - } else if (this.simple[type]) { - result = this.simple[type](part); - if (result) { - expression.next(); - } - } else if (this.complex[type] instanceof Matcher) { - result = this.complex[type].match(expression); - } else { - result = this.complex[type](expression); - } - - return result; - }, - - - simple: { - __proto__: null, - - "": - "xx-small | x-small | small | medium | large | x-large | xx-large", - - "": - "scroll-position | contents | ", - - "": function(part) { - return this[""](part) && - !/^(unset|initial|inherit|will-change|auto|scroll-position|contents)$/i.test(part); - }, - - "": function(part) { - return part.type === "angle"; - }, - - "": "scroll | fixed | local", - - "": "attr()", - "": "inset() | circle() | ellipse() | polygon()", - - "": " | | none", - - "": - "none | hidden | dotted | dashed | solid | double | groove | " + - "ridge | inset | outset", - - "": " | thin | medium | thick", - - "": "padding-box | border-box | content-box", - - "": "", - - "": function(part) { - return part.type === "color" || String(part) === "transparent" || String(part) === "currentColor"; - }, - "": function(part) { - return part.type === "color"; - }, - - "": "content()", - "": - "fill-available | -moz-available | -webkit-fill-available | " + - "max-content | -moz-max-content | -webkit-max-content | " + - "min-content | -moz-min-content | -webkit-min-content | " + - "fit-content | -moz-fit-content | -webkit-fit-content", - - "": function(part) { - return part.type === "function" && /^[A-Z0-9]{4}$/i.test(part); - }, - "": - "blur() | brightness() | contrast() | custom() | " + - "drop-shadow() | grayscale() | hue-rotate() | invert() | " + - "opacity() | saturate() | sepia()", - - "": "", - - "": "row | row-reverse | column | column-reverse", - - "": "", - - "": "", - - "": "nowrap | wrap | wrap-reverse", - - "": - " | | | ", - - "": - "normal | ultra-condensed | extra-condensed | condensed | " + - "semi-condensed | semi-expanded | expanded | extra-expanded | " + - "ultra-expanded", - - "": "normal | italic | oblique", - - "": - "small-caps | all-small-caps | petite-caps | all-petite-caps | " + - "unicase | titling-caps", - - "": "normal | small-caps", - - "": - "normal | bold | bolder | lighter | " + - "100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900", - - "": - "serif | sans-serif | cursive | fantasy | monospace", - - "": " | fill-box | stroke-box | view-box", - - "": function(part) { - return part.type === "angle" && part.units === "deg"; - }, - - "": function(part) { - return part.type === "function" && /^(?:-(?:ms|moz|o|webkit)-)?(?:repeating-)?(?:radial-|linear-)?gradient/i.test(part); - }, - - "": - "cielab() | cielch() | cielchab() | " + - "icc-color() | icc-named-color()", - "": function(part) { - return part.type === "identifier" || part.wasIdent; - }, - - "": function(part) { - return this[""](part) && !this[""](part); - }, - - "": "", - - "": function(part) { - return part.type === "integer"; - }, - - "": function(part) { - if (part.type === "function" && /^(?:-(?:ms|moz|o|webkit)-)?calc/i.test(part)) { - return true; - } else { - return part.type === "length" || part.type === "number" || part.type === "integer" || String(part) === "0"; - } - }, - - "": function(part) { - return part.type === "integer"; - }, - - "": " | | | normal", - - "": " | | auto", - - "": function(part) { - return this[""](part) && part.value >= 1; - }, - - "": function(part) { - return (this[""](part) || this[""](part)) && - (String(part) === "0" || part.type === "function" || (part.value) >= 0); - }, - - "": function(part) { - return (this[""](part) || this[""](part)) && - (String(part) === "0" || part.type === "function" || (part.value) >= 0); - }, - - "": function(part) { - return part.type === "number" || this[""](part); - }, - - "": function(part) { - return this[""](part) && part.value >= 0 && part.value <= 1; - }, - - "": "", - - "": function(part) { - return part.type === "percentage" || String(part) === "0"; - }, - - "": "smaller | larger", - - "": "rect() | inset-rect()", - - "": " | margin-box", - - "": - "normal | reverse | alternate | alternate-reverse", - - "": function(part) { - return this[""](part) && - /^-?[a-z_][-a-z0-9_]+$/i.test(part) && - !/^(none|unset|initial|inherit)$/i.test(part); - }, - - "": function(part) { - return part.type === "string"; - }, - - "": function(part) { - return part.type === "time"; - }, - - "": function(part) { - return part.type === "uri"; - }, - - "": "" - }, - - complex: { - __proto__: null, - - "": - "" + - " | " + - "[ [ left-side | far-left | left | center-left | center | " + - "center-right | right | far-right | right-side ] || behind ]" + - " | " + - "leftwards | rightwards", - - "": "#", - - "": - "[ | | auto ]{1,2} | cover | contain", - - "": - "normal | multiply | screen | overlay | darken | lighten | color-dodge | " + - "color-burn | hard-light | soft-light | difference | exclusion | hue | " + - "saturation | color | luminosity", - - "": - Matcher.many([true /* first element is required */], - Matcher.cast(""), - Matcher.cast(""), - Matcher.cast(""), - Matcher.cast(""), - "fill"), - - "": - "{1,4} " + - "[ / {1,4} ]?", - - "": "none | #", - - "": " || ", - - "": - Matcher.cast("") - .braces(1, Infinity, "#", Matcher.cast(",").question()), - - "": - " | *", - - "": "[ | ]+", - "": - "none | [ ? || ]", - - "": "[ | ]#", - - "": - "[ || || " + - " || ]? " + - "[ / ]? ", - - "": - "stylistic() || " + - "historical-forms || " + - "styleset() || " + - "character-variant() || " + - "swash() || " + - "ornaments() || " + - "annotation()", - - "": - "[ common-ligatures | no-common-ligatures ] || " + - "[ discretionary-ligatures | no-discretionary-ligatures ] || " + - "[ historical-ligatures | no-historical-ligatures ] || " + - "[ contextual | no-contextual ]", - - "": - "[ lining-nums | oldstyle-nums ] || " + - "[ proportional-nums | tabular-nums ] || " + - "[ diagonal-fractions | stacked-fractions ] || " + - "ordinal || slashed-zero", - - "": - "[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ] || " + - "[ full-width | proportional-width ] || " + - "ruby", - "": " | ?", - "": "none | currentColor | ?", - - "": - "[ center | [ left | right ] [ | ]? ] && " + - "[ center | [ top | bottom ] [ | ]? ]" + - " | " + - "[ left | center | right | | ] " + - "[ top | center | bottom | | ]" + - " | " + - "[ left | center | right | top | bottom | | ]", - - "": - "repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}", - - "": - Matcher.many([true /* length is required */], - Matcher.cast("").braces(2, 4), "inset", ""), - - "": - "", - - "": - "none | [ underline || overline || line-through || blink ]", - - "": - "solid | double | dotted | dashed | wavy", - - "": - "auto | #", - - "": - "[ | ]{1,2}" - } -}); - -Object.keys(ValidationTypes.simple).forEach(function(nt) { - var rule = ValidationTypes.simple[nt]; - if (typeof rule === "string") { - ValidationTypes.simple[nt] = function(part) { - return ValidationTypes.isLiteral(part, rule); - }; - } -}); - -Object.keys(ValidationTypes.complex).forEach(function(nt) { - var rule = ValidationTypes.complex[nt]; - if (typeof rule === "string") { - ValidationTypes.complex[nt] = Matcher.parse(rule); - } -}); -ValidationTypes.complex[""] = - Matcher.oror({ expand: "" }, - { expand: "" }, - "", - { expand: "" }, - { expand: "" }); - -},{"./Matcher":3}],22:[function(require,module,exports){ -"use strict"; - -module.exports = { - Colors : require("./Colors"), - Combinator : require("./Combinator"), - Parser : require("./Parser"), - PropertyName : require("./PropertyName"), - PropertyValue : require("./PropertyValue"), - PropertyValuePart : require("./PropertyValuePart"), - Matcher : require("./Matcher"), - MediaFeature : require("./MediaFeature"), - MediaQuery : require("./MediaQuery"), - Selector : require("./Selector"), - SelectorPart : require("./SelectorPart"), - SelectorSubPart : require("./SelectorSubPart"), - Specificity : require("./Specificity"), - TokenStream : require("./TokenStream"), - Tokens : require("./Tokens"), - ValidationError : require("./ValidationError") -}; - -},{"./Colors":1,"./Combinator":2,"./Matcher":3,"./MediaFeature":4,"./MediaQuery":5,"./Parser":6,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./Specificity":16,"./TokenStream":17,"./Tokens":18,"./ValidationError":20}],23:[function(require,module,exports){ -"use strict"; - -module.exports = EventTarget; -function EventTarget() { - this._listeners = Object.create(null); -} - -EventTarget.prototype = { - constructor: EventTarget, - addListener: function(type, listener) { - if (!this._listeners[type]) { - this._listeners[type] = []; - } - - this._listeners[type].push(listener); - }, - fire: function(event) { - if (typeof event === "string") { - event = { type: event }; - } - if (typeof event.target !== "undefined") { - event.target = this; - } - - if (typeof event.type === "undefined") { - throw new Error("Event object missing 'type' property."); - } - - if (this._listeners[event.type]) { - var listeners = this._listeners[event.type].concat(); - for (var i = 0, len = listeners.length; i < len; i++) { - listeners[i].call(this, event); - } - } - }, - removeListener: function(type, listener) { - if (this._listeners[type]) { - var listeners = this._listeners[type]; - for (var i = 0, len = listeners.length; i < len; i++) { - if (listeners[i] === listener) { - listeners.splice(i, 1); - break; - } - } - - - } - } -}; - -},{}],24:[function(require,module,exports){ -"use strict"; - -module.exports = StringReader; -function StringReader(text) { - this._input = text.replace(/(\r\n?|\n)/g, "\n"); - this._line = 1; - this._col = 1; - this._cursor = 0; -} - -StringReader.prototype = { - constructor: StringReader, - getCol: function() { - return this._col; - }, - getLine: function() { - return this._line; - }, - eof: function() { - return this._cursor === this._input.length; - }, - peek: function(count) { - var c = null; - count = typeof count === "undefined" ? 1 : count; - if (this._cursor < this._input.length) { - c = this._input.charAt(this._cursor + count - 1); - } - - return c; - }, - read: function() { - var c = null; - if (this._cursor < this._input.length) { - if (this._input.charAt(this._cursor) === "\n") { - this._line++; - this._col = 1; - } else { - this._col++; - } - c = this._input.charAt(this._cursor++); - } - - return c; - }, - mark: function() { - this._bookmark = { - cursor: this._cursor, - line: this._line, - col: this._col - }; - }, - - reset: function() { - if (this._bookmark) { - this._cursor = this._bookmark.cursor; - this._line = this._bookmark.line; - this._col = this._bookmark.col; - delete this._bookmark; - } - }, - peekCount: function(count) { - count = typeof count === "undefined" ? 1 : Math.max(count, 0); - return this._input.substring(this._cursor, this._cursor + count); - }, - readTo: function(pattern) { - - var buffer = "", - c; - while (buffer.length < pattern.length || buffer.lastIndexOf(pattern) !== buffer.length - pattern.length) { - c = this.read(); - if (c) { - buffer += c; - } else { - throw new Error("Expected \"" + pattern + "\" at line " + this._line + ", col " + this._col + "."); - } - } - - return buffer; - - }, - readWhile: function(filter) { - - var buffer = "", - c = this.peek(); - - while (c !== null && filter(c)) { - buffer += this.read(); - c = this.peek(); - } - - return buffer; - - }, - readMatch: function(matcher) { - - var source = this._input.substring(this._cursor), - value = null; - if (typeof matcher === "string") { - if (source.slice(0, matcher.length) === matcher) { - value = this.readCount(matcher.length); - } - } else if (matcher instanceof RegExp) { - if (matcher.test(source)) { - value = this.readCount(RegExp.lastMatch.length); - } - } - - return value; - }, - readCount: function(count) { - var buffer = ""; - - while (count--) { - buffer += this.read(); - } - - return buffer; - } - -}; - -},{}],25:[function(require,module,exports){ -"use strict"; - -module.exports = SyntaxError; -function SyntaxError(message, line, col) { - Error.call(this); - this.name = this.constructor.name; - this.col = col; - this.line = line; - this.message = message; - -} -SyntaxError.prototype = Object.create(Error.prototype); // jshint ignore:line -SyntaxError.prototype.constructor = SyntaxError; // jshint ignore:line - -},{}],26:[function(require,module,exports){ -"use strict"; - -module.exports = SyntaxUnit; -function SyntaxUnit(text, line, col, type) { - this.col = col; - this.line = line; - this.text = text; - this.type = type; -} -SyntaxUnit.fromToken = function(token) { - return new SyntaxUnit(token.value, token.startLine, token.startCol); -}; - -SyntaxUnit.prototype = { - constructor: SyntaxUnit, - valueOf: function() { - return this.toString(); - }, - toString: function() { - return this.text; - } - -}; - -},{}],27:[function(require,module,exports){ -"use strict"; - -module.exports = TokenStreamBase; - -var StringReader = require("./StringReader"); -var SyntaxError = require("./SyntaxError"); -function TokenStreamBase(input, tokenData) { - this._reader = new StringReader(input ? input.toString() : ""); - this._token = null; - this._tokenData = tokenData; - this._lt = []; - this._ltIndex = 0; - - this._ltIndexCache = []; -} -TokenStreamBase.createTokenData = function(tokens) { - - var nameMap = [], - typeMap = Object.create(null), - tokenData = tokens.concat([]), - i = 0, - len = tokenData.length + 1; - - tokenData.UNKNOWN = -1; - tokenData.unshift({ name:"EOF" }); - - for (; i < len; i++) { - nameMap.push(tokenData[i].name); - tokenData[tokenData[i].name] = i; - if (tokenData[i].text) { - typeMap[tokenData[i].text] = i; - } - } - - tokenData.name = function(tt) { - return nameMap[tt]; - }; - - tokenData.type = function(c) { - return typeMap[c]; - }; - - return tokenData; -}; - -TokenStreamBase.prototype = { - constructor: TokenStreamBase, - match: function(tokenTypes, channel) { - if (!(tokenTypes instanceof Array)) { - tokenTypes = [tokenTypes]; - } - - var tt = this.get(channel), - i = 0, - len = tokenTypes.length; - - while (i < len) { - if (tt === tokenTypes[i++]) { - return true; - } - } - this.unget(); - return false; - }, - mustMatch: function(tokenTypes) { - - var token; - if (!(tokenTypes instanceof Array)) { - tokenTypes = [tokenTypes]; - } - - if (!this.match.apply(this, arguments)) { - token = this.LT(1); - throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name + - " at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol); - } - }, - advance: function(tokenTypes, channel) { - - while (this.LA(0) !== 0 && !this.match(tokenTypes, channel)) { - this.get(); - } - - return this.LA(0); - }, - get: function(channel) { - - var tokenInfo = this._tokenData, - i = 0, - token, - info; - if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length) { - - i++; - this._token = this._lt[this._ltIndex++]; - info = tokenInfo[this._token.type]; - while ((typeof info.channel !== "undefined" && channel !== info.channel) && - this._ltIndex < this._lt.length) { - this._token = this._lt[this._ltIndex++]; - info = tokenInfo[this._token.type]; - i++; - } - if ((typeof info.channel === "undefined" || channel === info.channel) && - this._ltIndex <= this._lt.length) { - this._ltIndexCache.push(i); - return this._token.type; - } - } - token = this._getToken(); - if (token.type > -1 && !tokenInfo[token.type].hide) { - token.channel = tokenInfo[token.type].channel; - this._token = token; - this._lt.push(token); - this._ltIndexCache.push(this._lt.length - this._ltIndex + i); - if (this._lt.length > 5) { - this._lt.shift(); - } - if (this._ltIndexCache.length > 5) { - this._ltIndexCache.shift(); - } - this._ltIndex = this._lt.length; - } - info = tokenInfo[token.type]; - if (info && - (info.hide || - (typeof info.channel !== "undefined" && channel !== info.channel))) { - return this.get(channel); - } else { - return token.type; - } - }, - LA: function(index) { - var total = index, - tt; - if (index > 0) { - if (index > 5) { - throw new Error("Too much lookahead."); - } - while (total) { - tt = this.get(); - total--; - } - while (total < index) { - this.unget(); - total++; - } - } else if (index < 0) { - - if (this._lt[this._ltIndex + index]) { - tt = this._lt[this._ltIndex + index].type; - } else { - throw new Error("Too much lookbehind."); - } - - } else { - tt = this._token.type; - } - - return tt; - - }, - LT: function(index) { - this.LA(index); - return this._lt[this._ltIndex + index - 1]; - }, - peek: function() { - return this.LA(1); - }, - token: function() { - return this._token; - }, - tokenName: function(tokenType) { - if (tokenType < 0 || tokenType > this._tokenData.length) { - return "UNKNOWN_TOKEN"; - } else { - return this._tokenData[tokenType].name; - } - }, - tokenType: function(tokenName) { - return this._tokenData[tokenName] || -1; - }, - unget: function() { - if (this._ltIndexCache.length) { - this._ltIndex -= this._ltIndexCache.pop();//--; - this._token = this._lt[this._ltIndex - 1]; - } else { - throw new Error("Too much lookahead."); - } - } - -}; - - -},{"./StringReader":24,"./SyntaxError":25}],28:[function(require,module,exports){ -"use strict"; - -module.exports = { - StringReader : require("./StringReader"), - SyntaxError : require("./SyntaxError"), - SyntaxUnit : require("./SyntaxUnit"), - EventTarget : require("./EventTarget"), - TokenStreamBase : require("./TokenStreamBase") -}; - -},{"./EventTarget":23,"./StringReader":24,"./SyntaxError":25,"./SyntaxUnit":26,"./TokenStreamBase":27}],"parserlib":[function(require,module,exports){ -"use strict"; - -module.exports = { - css : require("./css"), - util : require("./util") -}; - -},{"./css":22,"./util":28}]},{},[]); - -return require('parserlib'); -})(); -var clone = (function() { -'use strict'; - -function _instanceof(obj, type) { - return type != null && obj instanceof type; -} - -var nativeMap; -try { - nativeMap = Map; -} catch(_) { - nativeMap = function() {}; -} - -var nativeSet; -try { - nativeSet = Set; -} catch(_) { - nativeSet = function() {}; -} - -var nativePromise; -try { - nativePromise = Promise; -} catch(_) { - nativePromise = function() {}; -} -function clone(parent, circular, depth, prototype, includeNonEnumerable) { - if (typeof circular === 'object') { - depth = circular.depth; - prototype = circular.prototype; - includeNonEnumerable = circular.includeNonEnumerable; - circular = circular.circular; - } - var allParents = []; - var allChildren = []; - - var useBuffer = typeof Buffer != 'undefined'; - - if (typeof circular == 'undefined') - circular = true; - - if (typeof depth == 'undefined') - depth = Infinity; - function _clone(parent, depth) { - if (parent === null) - return null; - - if (depth === 0) - return parent; - - var child; - var proto; - if (typeof parent != 'object') { - return parent; - } - - if (_instanceof(parent, nativeMap)) { - child = new nativeMap(); - } else if (_instanceof(parent, nativeSet)) { - child = new nativeSet(); - } else if (_instanceof(parent, nativePromise)) { - child = new nativePromise(function (resolve, reject) { - parent.then(function(value) { - resolve(_clone(value, depth - 1)); - }, function(err) { - reject(_clone(err, depth - 1)); - }); - }); - } else if (clone.__isArray(parent)) { - child = []; - } else if (clone.__isRegExp(parent)) { - child = new RegExp(parent.source, __getRegExpFlags(parent)); - if (parent.lastIndex) child.lastIndex = parent.lastIndex; - } else if (clone.__isDate(parent)) { - child = new Date(parent.getTime()); - } else if (useBuffer && Buffer.isBuffer(parent)) { - if (Buffer.allocUnsafe) { - child = Buffer.allocUnsafe(parent.length); - } else { - child = new Buffer(parent.length); - } - parent.copy(child); - return child; - } else if (_instanceof(parent, Error)) { - child = Object.create(parent); - } else { - if (typeof prototype == 'undefined') { - proto = Object.getPrototypeOf(parent); - child = Object.create(proto); - } - else { - child = Object.create(prototype); - proto = prototype; - } - } - - if (circular) { - var index = allParents.indexOf(parent); - - if (index != -1) { - return allChildren[index]; - } - allParents.push(parent); - allChildren.push(child); - } - - if (_instanceof(parent, nativeMap)) { - parent.forEach(function(value, key) { - var keyChild = _clone(key, depth - 1); - var valueChild = _clone(value, depth - 1); - child.set(keyChild, valueChild); - }); - } - if (_instanceof(parent, nativeSet)) { - parent.forEach(function(value) { - var entryChild = _clone(value, depth - 1); - child.add(entryChild); - }); - } - - for (var i in parent) { - var attrs; - if (proto) { - attrs = Object.getOwnPropertyDescriptor(proto, i); - } - - if (attrs && attrs.set == null) { - continue; - } - child[i] = _clone(parent[i], depth - 1); - } - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(parent); - for (var i = 0; i < symbols.length; i++) { - var symbol = symbols[i]; - var descriptor = Object.getOwnPropertyDescriptor(parent, symbol); - if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { - continue; - } - child[symbol] = _clone(parent[symbol], depth - 1); - if (!descriptor.enumerable) { - Object.defineProperty(child, symbol, { - enumerable: false - }); - } - } - } - - if (includeNonEnumerable) { - var allPropertyNames = Object.getOwnPropertyNames(parent); - for (var i = 0; i < allPropertyNames.length; i++) { - var propertyName = allPropertyNames[i]; - var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName); - if (descriptor && descriptor.enumerable) { - continue; - } - child[propertyName] = _clone(parent[propertyName], depth - 1); - Object.defineProperty(child, propertyName, { - enumerable: false - }); - } - } - - return child; - } - - return _clone(parent, depth); -} -clone.clonePrototype = function clonePrototype(parent) { - if (parent === null) - return null; - - var c = function () {}; - c.prototype = parent; - return new c(); -}; - -function __objToStr(o) { - return Object.prototype.toString.call(o); -} -clone.__objToStr = __objToStr; - -function __isDate(o) { - return typeof o === 'object' && __objToStr(o) === '[object Date]'; -} -clone.__isDate = __isDate; - -function __isArray(o) { - return typeof o === 'object' && __objToStr(o) === '[object Array]'; -} -clone.__isArray = __isArray; - -function __isRegExp(o) { - return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; -} -clone.__isRegExp = __isRegExp; - -function __getRegExpFlags(re) { - var flags = ''; - if (re.global) flags += 'g'; - if (re.ignoreCase) flags += 'i'; - if (re.multiline) flags += 'm'; - return flags; -} -clone.__getRegExpFlags = __getRegExpFlags; - -return clone; -})(); - -if (typeof module === 'object' && module.exports) { - module.exports = clone; -} - -var CSSLint = (function() { - "use strict"; - - var rules = [], - formatters = [], - embeddedRuleset = /\/\*\s*csslint([^\*]*)\*\//, - api = new parserlib.util.EventTarget(); - - api.version = "1.0.5"; - api.addRule = function(rule) { - rules.push(rule); - rules[rule.id] = rule; - }; - api.clearRules = function() { - rules = []; - }; - api.getRules = function() { - return [].concat(rules).sort(function(a, b) { - return a.id > b.id ? 1 : 0; - }); - }; - api.getRuleset = function() { - var ruleset = {}, - i = 0, - len = rules.length; - - while (i < len) { - ruleset[rules[i++].id] = 1; // by default, everything is a warning - } - - return ruleset; - }; - function applyEmbeddedRuleset(text, ruleset) { - var valueMap, - embedded = text && text.match(embeddedRuleset), - rules = embedded && embedded[1]; - - if (rules) { - valueMap = { - "true": 2, // true is error - "": 1, // blank is warning - "false": 0, // false is ignore - - "2": 2, // explicit error - "1": 1, // explicit warning - "0": 0 // explicit ignore - }; - - rules.toLowerCase().split(",").forEach(function(rule) { - var pair = rule.split(":"), - property = pair[0] || "", - value = pair[1] || ""; - - ruleset[property.trim()] = valueMap[value.trim()]; - }); - } - - return ruleset; - } - api.addFormatter = function(formatter) { - formatters[formatter.id] = formatter; - }; - api.getFormatter = function(formatId) { - return formatters[formatId]; - }; - api.format = function(results, filename, formatId, options) { - var formatter = api.getFormatter(formatId), - result = null; - - if (formatter) { - result = formatter.startFormat(); - result += formatter.formatResults(results, filename, options || {}); - result += formatter.endFormat(); - } - - return result; - }; - api.hasFormat = function(formatId) { - return formatters.hasOwnProperty(formatId); - }; - api.verify = function(text, ruleset) { - - var i = 0, - reporter, - lines, - allow = {}, - ignore = [], - report, - parser = new parserlib.css.Parser({ - starHack: true, - ieFilters: true, - underscoreHack: true, - strict: false - }); - lines = text.replace(/\n\r?/g, "$split$").split("$split$"); - CSSLint.Util.forEach(lines, function (line, lineno) { - var allowLine = line && line.match(/\/\*[ \t]*csslint[ \t]+allow:[ \t]*([^\*]*)\*\//i), - allowRules = allowLine && allowLine[1], - allowRuleset = {}; - - if (allowRules) { - allowRules.toLowerCase().split(",").forEach(function(allowRule) { - allowRuleset[allowRule.trim()] = true; - }); - if (Object.keys(allowRuleset).length > 0) { - allow[lineno + 1] = allowRuleset; - } - } - }); - - var ignoreStart = null, - ignoreEnd = null; - CSSLint.Util.forEach(lines, function (line, lineno) { - if (ignoreStart === null && line.match(/\/\*[ \t]*csslint[ \t]+ignore:start[ \t]*\*\//i)) { - ignoreStart = lineno; - } - - if (line.match(/\/\*[ \t]*csslint[ \t]+ignore:end[ \t]*\*\//i)) { - ignoreEnd = lineno; - } - - if (ignoreStart !== null && ignoreEnd !== null) { - ignore.push([ignoreStart, ignoreEnd]); - ignoreStart = ignoreEnd = null; - } - }); - if (ignoreStart !== null) { - ignore.push([ignoreStart, lines.length]); - } - - if (!ruleset) { - ruleset = api.getRuleset(); - } - - if (embeddedRuleset.test(text)) { - ruleset = clone(ruleset); - ruleset = applyEmbeddedRuleset(text, ruleset); - } - - reporter = new Reporter(lines, ruleset, allow, ignore); - - ruleset.errors = 2; // always report parsing errors as errors - for (i in ruleset) { - if (ruleset.hasOwnProperty(i) && ruleset[i]) { - if (rules[i]) { - rules[i].init(parser, reporter); - } - } - } - try { - parser.parse(text); - } catch (ex) { - reporter.error("Fatal error, cannot continue: " + ex.message, ex.line, ex.col, {}); - } - - report = { - messages : reporter.messages, - stats : reporter.stats, - ruleset : reporter.ruleset, - allow : reporter.allow, - ignore : reporter.ignore - }; - report.messages.sort(function (a, b) { - if (a.rollup && !b.rollup) { - return 1; - } else if (!a.rollup && b.rollup) { - return -1; - } else { - return a.line - b.line; - } - }); - - return report; - }; - - return api; - -})(); -function Reporter(lines, ruleset, allow, ignore) { - "use strict"; - this.messages = []; - this.stats = []; - this.lines = lines; - this.ruleset = ruleset; - this.allow = allow; - if (!this.allow) { - this.allow = {}; - } - this.ignore = ignore; - if (!this.ignore) { - this.ignore = []; - } -} - -Reporter.prototype = { - constructor: Reporter, - error: function(message, line, col, rule) { - "use strict"; - this.messages.push({ - type : "error", - line : line, - col : col, - message : message, - evidence: this.lines[line-1], - rule : rule || {} - }); - }, - warn: function(message, line, col, rule) { - "use strict"; - this.report(message, line, col, rule); - }, - report: function(message, line, col, rule) { - "use strict"; - if (this.allow.hasOwnProperty(line) && this.allow[line].hasOwnProperty(rule.id)) { - return; - } - - if (this.isIgnored(line)) { - return; - } - - this.messages.push({ - type : this.ruleset[rule.id] === 2 ? "error" : "warning", - line : line, - col : col, - message : message, - evidence: this.lines[line-1], - rule : rule - }); - }, - info: function(message, line, col, rule) { - "use strict"; - this.messages.push({ - type : "info", - line : line, - col : col, - message : message, - evidence: this.lines[line-1], - rule : rule - }); - }, - rollupError: function(message, rule) { - "use strict"; - this.messages.push({ - type : "error", - rollup : true, - message : message, - rule : rule - }); - }, - rollupWarn: function(message, rule) { - "use strict"; - this.messages.push({ - type : "warning", - rollup : true, - message : message, - rule : rule - }); - }, - stat: function(name, value) { - "use strict"; - this.stats[name] = value; - }, - isIgnored: function(line) { - "use strict"; - var ignore = false; - CSSLint.Util.forEach(this.ignore, function (range) { - if (range[0] <= line && line <= range[1]) { - ignore = true; - } - }); - return ignore; - } -}; -CSSLint._Reporter = Reporter; -CSSLint.Util = { - mix: function(receiver, supplier) { - "use strict"; - var prop; - - for (prop in supplier) { - if (supplier.hasOwnProperty(prop)) { - receiver[prop] = supplier[prop]; - } - } - - return prop; - }, - indexOf: function(values, value) { - "use strict"; - if (values.indexOf) { - return values.indexOf(value); - } else { - for (var i=0, len=values.length; i < len; i++) { - if (values[i] === value) { - return i; - } - } - return -1; - } - }, - forEach: function(values, func) { - "use strict"; - if (values.forEach) { - return values.forEach(func); - } else { - for (var i=0, len=values.length; i < len; i++) { - func(values[i], i, values); - } - } - } -}; -CSSLint.addRule({ - id: "box-model", - name: "Beware of broken box size", - desc: "Don't use width or height when using padding or border.", - url: "https://github.com/CSSLint/csslint/wiki/Beware-of-box-model-size", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - widthProperties = { - border: 1, - "border-left": 1, - "border-right": 1, - padding: 1, - "padding-left": 1, - "padding-right": 1 - }, - heightProperties = { - border: 1, - "border-bottom": 1, - "border-top": 1, - padding: 1, - "padding-bottom": 1, - "padding-top": 1 - }, - properties, - boxSizing = false; - - function startRule() { - properties = {}; - boxSizing = false; - } - - function endRule() { - var prop, value; - - if (!boxSizing) { - if (properties.height) { - for (prop in heightProperties) { - if (heightProperties.hasOwnProperty(prop) && properties[prop]) { - value = properties[prop].value; - if (!(prop === "padding" && value.parts.length === 2 && value.parts[0].value === 0)) { - reporter.report("Using height with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule); - } - } - } - } - - if (properties.width) { - for (prop in widthProperties) { - if (widthProperties.hasOwnProperty(prop) && properties[prop]) { - value = properties[prop].value; - - if (!(prop === "padding" && value.parts.length === 2 && value.parts[1].value === 0)) { - reporter.report("Using width with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule); - } - } - } - } - } - } - - parser.addListener("startrule", startRule); - parser.addListener("startfontface", startRule); - parser.addListener("startpage", startRule); - parser.addListener("startpagemargin", startRule); - parser.addListener("startkeyframerule", startRule); - parser.addListener("startviewport", startRule); - - parser.addListener("property", function(event) { - var name = event.property.text.toLowerCase(); - - if (heightProperties[name] || widthProperties[name]) { - if (!/^0\S*$/.test(event.value) && !(name === "border" && event.value.toString() === "none")) { - properties[name] = { - line: event.property.line, - col: event.property.col, - value: event.value - }; - } - } else { - if (/^(width|height)/i.test(name) && /^(length|percentage)/.test(event.value.parts[0].type)) { - properties[name] = 1; - } else if (name === "box-sizing") { - boxSizing = true; - } - } - - }); - - parser.addListener("endrule", endRule); - parser.addListener("endfontface", endRule); - parser.addListener("endpage", endRule); - parser.addListener("endpagemargin", endRule); - parser.addListener("endkeyframerule", endRule); - parser.addListener("endviewport", endRule); - } - -}); - -CSSLint.addRule({ - id: "bulletproof-font-face", - name: "Use the bulletproof @font-face syntax", - desc: "Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).", - url: "https://github.com/CSSLint/csslint/wiki/Bulletproof-font-face", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - fontFaceRule = false, - firstSrc = true, - ruleFailed = false, - line, col; - parser.addListener("startfontface", function() { - fontFaceRule = true; - }); - - parser.addListener("property", function(event) { - if (!fontFaceRule) { - return; - } - - var propertyName = event.property.toString().toLowerCase(), - value = event.value.toString(); - line = event.line; - col = event.col; - if (propertyName === "src") { - var regex = /^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i; - if (!value.match(regex) && firstSrc) { - ruleFailed = true; - firstSrc = false; - } else if (value.match(regex) && !firstSrc) { - ruleFailed = false; - } - } - - - }); - parser.addListener("endfontface", function() { - fontFaceRule = false; - - if (ruleFailed) { - reporter.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.", line, col, rule); - } - }); - } -}); - -CSSLint.addRule({ - id: "compatible-vendor-prefixes", - name: "Require compatible vendor prefixes", - desc: "Include all compatible vendor prefixes to reach a wider range of users.", - url: "https://github.com/CSSLint/csslint/wiki/Require-compatible-vendor-prefixes", - browsers: "All", - init: function (parser, reporter) { - "use strict"; - var rule = this, - compatiblePrefixes, - properties, - prop, - variations, - prefixed, - i, - len, - inKeyFrame = false, - arrayPush = Array.prototype.push, - applyTo = []; - compatiblePrefixes = { - "animation" : "webkit", - "animation-delay" : "webkit", - "animation-direction" : "webkit", - "animation-duration" : "webkit", - "animation-fill-mode" : "webkit", - "animation-iteration-count" : "webkit", - "animation-name" : "webkit", - "animation-play-state" : "webkit", - "animation-timing-function" : "webkit", - "appearance" : "webkit moz", - "border-end" : "webkit moz", - "border-end-color" : "webkit moz", - "border-end-style" : "webkit moz", - "border-end-width" : "webkit moz", - "border-image" : "webkit moz o", - "border-radius" : "webkit", - "border-start" : "webkit moz", - "border-start-color" : "webkit moz", - "border-start-style" : "webkit moz", - "border-start-width" : "webkit moz", - "box-align" : "webkit moz", - "box-direction" : "webkit moz", - "box-flex" : "webkit moz", - "box-lines" : "webkit", - "box-ordinal-group" : "webkit moz", - "box-orient" : "webkit moz", - "box-pack" : "webkit moz", - "box-sizing" : "", - "box-shadow" : "", - "column-count" : "webkit moz ms", - "column-gap" : "webkit moz ms", - "column-rule" : "webkit moz ms", - "column-rule-color" : "webkit moz ms", - "column-rule-style" : "webkit moz ms", - "column-rule-width" : "webkit moz ms", - "column-width" : "webkit moz ms", - "flex" : "webkit ms", - "flex-basis" : "webkit", - "flex-direction" : "webkit ms", - "flex-flow" : "webkit", - "flex-grow" : "webkit", - "flex-shrink" : "webkit", - "hyphens" : "epub moz", - "line-break" : "webkit ms", - "margin-end" : "webkit moz", - "margin-start" : "webkit moz", - "marquee-speed" : "webkit wap", - "marquee-style" : "webkit wap", - "padding-end" : "webkit moz", - "padding-start" : "webkit moz", - "tab-size" : "moz o", - "text-size-adjust" : "webkit ms", - "transform" : "webkit ms", - "transform-origin" : "webkit ms", - "transition" : "", - "transition-delay" : "", - "transition-duration" : "", - "transition-property" : "", - "transition-timing-function" : "", - "user-modify" : "webkit moz", - "user-select" : "webkit moz ms", - "word-break" : "epub ms", - "writing-mode" : "epub ms" - }; - - - for (prop in compatiblePrefixes) { - if (compatiblePrefixes.hasOwnProperty(prop)) { - variations = []; - prefixed = compatiblePrefixes[prop].split(" "); - for (i = 0, len = prefixed.length; i < len; i++) { - variations.push("-" + prefixed[i] + "-" + prop); - } - compatiblePrefixes[prop] = variations; - arrayPush.apply(applyTo, variations); - } - } - - parser.addListener("startrule", function () { - properties = []; - }); - - parser.addListener("startkeyframes", function (event) { - inKeyFrame = event.prefix || true; - }); - - parser.addListener("endkeyframes", function () { - inKeyFrame = false; - }); - - parser.addListener("property", function (event) { - var name = event.property; - if (CSSLint.Util.indexOf(applyTo, name.text) > -1) { - if (!inKeyFrame || typeof inKeyFrame !== "string" || - name.text.indexOf("-" + inKeyFrame + "-") !== 0) { - properties.push(name); - } - } - }); - - parser.addListener("endrule", function () { - if (!properties.length) { - return; - } - - var propertyGroups = {}, - i, - len, - name, - prop, - variations, - value, - full, - actual, - item, - propertiesSpecified; - - for (i = 0, len = properties.length; i < len; i++) { - name = properties[i]; - - for (prop in compatiblePrefixes) { - if (compatiblePrefixes.hasOwnProperty(prop)) { - variations = compatiblePrefixes[prop]; - if (CSSLint.Util.indexOf(variations, name.text) > -1) { - if (!propertyGroups[prop]) { - propertyGroups[prop] = { - full: variations.slice(0), - actual: [], - actualNodes: [] - }; - } - if (CSSLint.Util.indexOf(propertyGroups[prop].actual, name.text) === -1) { - propertyGroups[prop].actual.push(name.text); - propertyGroups[prop].actualNodes.push(name); - } - } - } - } - } - - for (prop in propertyGroups) { - if (propertyGroups.hasOwnProperty(prop)) { - value = propertyGroups[prop]; - full = value.full; - actual = value.actual; - - if (full.length > actual.length) { - for (i = 0, len = full.length; i < len; i++) { - item = full[i]; - if (CSSLint.Util.indexOf(actual, item) === -1) { - propertiesSpecified = (actual.length === 1) ? actual[0] : (actual.length === 2) ? actual.join(" and ") : actual.join(", "); - reporter.report("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", value.actualNodes[0].line, value.actualNodes[0].col, rule); - } - } - - } - } - } - }); - } -}); - -CSSLint.addRule({ - id: "display-property-grouping", - name: "Require properties appropriate for display", - desc: "Certain properties shouldn't be used with certain display property values.", - url: "https://github.com/CSSLint/csslint/wiki/Require-properties-appropriate-for-display", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - - var propertiesToCheck = { - display: 1, - "float": "none", - height: 1, - width: 1, - margin: 1, - "margin-left": 1, - "margin-right": 1, - "margin-bottom": 1, - "margin-top": 1, - padding: 1, - "padding-left": 1, - "padding-right": 1, - "padding-bottom": 1, - "padding-top": 1, - "vertical-align": 1 - }, - properties; - - function reportProperty(name, display, msg) { - if (properties[name]) { - if (typeof propertiesToCheck[name] !== "string" || properties[name].value.toLowerCase() !== propertiesToCheck[name]) { - reporter.report(msg || name + " can't be used with display: " + display + ".", properties[name].line, properties[name].col, rule); - } - } - } - - function startRule() { - properties = {}; - } - - function endRule() { - - var display = properties.display ? properties.display.value : null; - if (display) { - switch (display) { - - case "inline": - reportProperty("height", display); - reportProperty("width", display); - reportProperty("margin", display); - reportProperty("margin-top", display); - reportProperty("margin-bottom", display); - reportProperty("float", display, "display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug)."); - break; - - case "block": - reportProperty("vertical-align", display); - break; - - case "inline-block": - reportProperty("float", display); - break; - - default: - if (display.indexOf("table-") === 0) { - reportProperty("margin", display); - reportProperty("margin-left", display); - reportProperty("margin-right", display); - reportProperty("margin-top", display); - reportProperty("margin-bottom", display); - reportProperty("float", display); - } - } - } - - } - - parser.addListener("startrule", startRule); - parser.addListener("startfontface", startRule); - parser.addListener("startkeyframerule", startRule); - parser.addListener("startpagemargin", startRule); - parser.addListener("startpage", startRule); - parser.addListener("startviewport", startRule); - - parser.addListener("property", function(event) { - var name = event.property.text.toLowerCase(); - - if (propertiesToCheck[name]) { - properties[name] = { - value: event.value.text, - line: event.property.line, - col: event.property.col - }; - } - }); - - parser.addListener("endrule", endRule); - parser.addListener("endfontface", endRule); - parser.addListener("endkeyframerule", endRule); - parser.addListener("endpagemargin", endRule); - parser.addListener("endpage", endRule); - parser.addListener("endviewport", endRule); - - } - -}); - -CSSLint.addRule({ - id: "duplicate-background-images", - name: "Disallow duplicate background images", - desc: "Every background-image should be unique. Use a common class for e.g. sprites.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-background-images", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - stack = {}; - - parser.addListener("property", function(event) { - var name = event.property.text, - value = event.value, - i, len; - - if (name.match(/background/i)) { - for (i=0, len=value.parts.length; i < len; i++) { - if (value.parts[i].type === "uri") { - if (typeof stack[value.parts[i].uri] === "undefined") { - stack[value.parts[i].uri] = event; - } else { - reporter.report("Background image '" + value.parts[i].uri + "' was used multiple times, first declared at line " + stack[value.parts[i].uri].line + ", col " + stack[value.parts[i].uri].col + ".", event.line, event.col, rule); - } - } - } - } - }); - } -}); - -CSSLint.addRule({ - id: "duplicate-properties", - name: "Disallow duplicate properties", - desc: "Duplicate properties must appear one after the other.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-properties", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - properties, - lastProperty; - - function startRule() { - properties = {}; - } - - parser.addListener("startrule", startRule); - parser.addListener("startfontface", startRule); - parser.addListener("startpage", startRule); - parser.addListener("startpagemargin", startRule); - parser.addListener("startkeyframerule", startRule); - parser.addListener("startviewport", startRule); - - parser.addListener("property", function(event) { - var property = event.property, - name = property.text.toLowerCase(); - - if (properties[name] && (lastProperty !== name || properties[name] === event.value.text)) { - reporter.report("Duplicate property '" + event.property + "' found.", event.line, event.col, rule); - } - - properties[name] = event.value.text; - lastProperty = name; - - }); - - - } - -}); - -CSSLint.addRule({ - id: "empty-rules", - name: "Disallow empty rules", - desc: "Rules without any properties specified should be removed.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-empty-rules", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - count = 0; - - parser.addListener("startrule", function() { - count=0; - }); - - parser.addListener("property", function() { - count++; - }); - - parser.addListener("endrule", function(event) { - var selectors = event.selectors; - - if (count === 0) { - reporter.report("Rule is empty.", selectors[0].line, selectors[0].col, rule); - } - }); - } - -}); - -CSSLint.addRule({ - id: "errors", - name: "Parsing Errors", - desc: "This rule looks for recoverable syntax errors.", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - - parser.addListener("error", function(event) { - reporter.error(event.message, event.line, event.col, rule); - }); - - } - -}); - -CSSLint.addRule({ - id: "floats", - name: "Disallow too many floats", - desc: "This rule tests if the float property is used too many times", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-too-many-floats", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - var count = 0; - parser.addListener("property", function(event) { - if (!reporter.isIgnored(event.property.line)) { - if (event.property.text.toLowerCase() === "float" && - event.value.text.toLowerCase() !== "none") { - count++; - } - } - }); - parser.addListener("endstylesheet", function() { - reporter.stat("floats", count); - if (count >= 10) { - reporter.rollupWarn("Too many floats (" + count + "), you're probably using them for layout. Consider using a grid system instead.", rule); - } - }); - } - -}); - -CSSLint.addRule({ - id: "font-faces", - name: "Don't use too many web fonts", - desc: "Too many different web fonts in the same stylesheet.", - url: "https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-web-fonts", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - count = 0; - - - parser.addListener("startfontface", function(event) { - if (!reporter.isIgnored(event.line)) { - count++; - } - }); - - parser.addListener("endstylesheet", function() { - if (count > 5) { - reporter.rollupWarn("Too many @font-face declarations (" + count + ").", rule); - } - }); - } - -}); - -CSSLint.addRule({ - id: "font-sizes", - name: "Disallow too many font sizes", - desc: "Checks the number of font-size declarations.", - url: "https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-font-size-declarations", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - count = 0; - parser.addListener("property", function(event) { - if (!reporter.isIgnored(event.property.line)) { - if (event.property.toString() === "font-size") { - count++; - } - } - }); - parser.addListener("endstylesheet", function() { - reporter.stat("font-sizes", count); - if (count >= 10) { - reporter.rollupWarn("Too many font-size declarations (" + count + "), abstraction needed.", rule); - } - }); - } - -}); - -CSSLint.addRule({ - id: "gradients", - name: "Require all gradient definitions", - desc: "When using a vendor-prefixed gradient, make sure to use them all.", - url: "https://github.com/CSSLint/csslint/wiki/Require-all-gradient-definitions", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - gradients; - - parser.addListener("startrule", function() { - gradients = { - moz: 0, - webkit: 0, - oldWebkit: 0, - o: 0 - }; - }); - - parser.addListener("property", function(event) { - - if (/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(event.value)) { - gradients[RegExp.$1] = 1; - } else if (/\-webkit\-gradient/i.test(event.value)) { - gradients.oldWebkit = 1; - } - - }); - - parser.addListener("endrule", function(event) { - var missing = []; - - if (!gradients.moz) { - missing.push("Firefox 3.6+"); - } - - if (!gradients.webkit) { - missing.push("Webkit (Safari 5+, Chrome)"); - } - - if (!gradients.oldWebkit) { - missing.push("Old Webkit (Safari 4+, Chrome)"); - } - - if (!gradients.o) { - missing.push("Opera 11.1+"); - } - - if (missing.length && missing.length < 4) { - reporter.report("Missing vendor-prefixed CSS gradients for " + missing.join(", ") + ".", event.selectors[0].line, event.selectors[0].col, rule); - } - - }); - - } - -}); - -CSSLint.addRule({ - id: "ids", - name: "Disallow IDs in selectors", - desc: "Selectors should not contain IDs.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-IDs-in-selectors", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - parser.addListener("startrule", function(event) { - var selectors = event.selectors, - selector, - part, - modifier, - idCount, - i, j, k; - - for (i=0; i < selectors.length; i++) { - selector = selectors[i]; - idCount = 0; - - for (j=0; j < selector.parts.length; j++) { - part = selector.parts[j]; - if (part.type === parser.SELECTOR_PART_TYPE) { - for (k=0; k < part.modifiers.length; k++) { - modifier = part.modifiers[k]; - if (modifier.type === "id") { - idCount++; - } - } - } - } - - if (idCount === 1) { - reporter.report("Don't use IDs in selectors.", selector.line, selector.col, rule); - } else if (idCount > 1) { - reporter.report(idCount + " IDs in the selector, really?", selector.line, selector.col, rule); - } - } - - }); - } - -}); - -CSSLint.addRule({ - id: "import-ie-limit", - name: "@import limit on IE6-IE9", - desc: "IE6-9 supports up to 31 @import per stylesheet", - browsers: "IE6, IE7, IE8, IE9", - init: function(parser, reporter) { - "use strict"; - var rule = this, - MAX_IMPORT_COUNT = 31, - count = 0; - - function startPage() { - count = 0; - } - - parser.addListener("startpage", startPage); - - parser.addListener("import", function() { - count++; - }); - - parser.addListener("endstylesheet", function() { - if (count > MAX_IMPORT_COUNT) { - reporter.rollupError( - "Too many @import rules (" + count + "). IE6-9 supports up to 31 import per stylesheet.", - rule - ); - } - }); - } - -}); - -CSSLint.addRule({ - id: "import", - name: "Disallow @import", - desc: "Don't use @import, use instead.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-%40import", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - - parser.addListener("import", function(event) { - reporter.report("@import prevents parallel downloads, use instead.", event.line, event.col, rule); - }); - - } - -}); - -CSSLint.addRule({ - id: "important", - name: "Disallow !important", - desc: "Be careful when using !important declaration", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-%21important", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - count = 0; - parser.addListener("property", function(event) { - if (!reporter.isIgnored(event.line)) { - if (event.important === true) { - count++; - reporter.report("Use of !important", event.line, event.col, rule); - } - } - }); - parser.addListener("endstylesheet", function() { - reporter.stat("important", count); - if (count >= 10) { - reporter.rollupWarn("Too many !important declarations (" + count + "), try to use less than 10 to avoid specificity issues.", rule); - } - }); - } - -}); - -CSSLint.addRule({ - id: "known-properties", - name: "Require use of known properties", - desc: "Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.", - url: "https://github.com/CSSLint/csslint/wiki/Require-use-of-known-properties", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - - parser.addListener("property", function(event) { - if (event.invalid) { - reporter.report(event.invalid.message, event.line, event.col, rule); - } - - }); - } - -}); - -CSSLint.addRule({ - id: "order-alphabetical", - name: "Alphabetical order", - desc: "Assure properties are in alphabetical order", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - properties; - - var startRule = function () { - properties = []; - }; - - var endRule = function(event) { - var currentProperties = properties.join(","), - expectedProperties = properties.sort().join(","); - - if (currentProperties !== expectedProperties) { - reporter.report("Rule doesn't have all its properties in alphabetical order.", event.line, event.col, rule); - } - }; - - parser.addListener("startrule", startRule); - parser.addListener("startfontface", startRule); - parser.addListener("startpage", startRule); - parser.addListener("startpagemargin", startRule); - parser.addListener("startkeyframerule", startRule); - parser.addListener("startviewport", startRule); - - parser.addListener("property", function(event) { - var name = event.property.text, - lowerCasePrefixLessName = name.toLowerCase().replace(/^-.*?-/, ""); - - properties.push(lowerCasePrefixLessName); - }); - - parser.addListener("endrule", endRule); - parser.addListener("endfontface", endRule); - parser.addListener("endpage", endRule); - parser.addListener("endpagemargin", endRule); - parser.addListener("endkeyframerule", endRule); - parser.addListener("endviewport", endRule); - } - -}); - -CSSLint.addRule({ - id: "outline-none", - name: "Disallow outline: none", - desc: "Use of outline: none or outline: 0 should be limited to :focus rules.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-outline%3Anone", - browsers: "All", - tags: ["Accessibility"], - init: function(parser, reporter) { - "use strict"; - var rule = this, - lastRule; - - function startRule(event) { - if (event.selectors) { - lastRule = { - line: event.line, - col: event.col, - selectors: event.selectors, - propCount: 0, - outline: false - }; - } else { - lastRule = null; - } - } - - function endRule() { - if (lastRule) { - if (lastRule.outline) { - if (lastRule.selectors.toString().toLowerCase().indexOf(":focus") === -1) { - reporter.report("Outlines should only be modified using :focus.", lastRule.line, lastRule.col, rule); - } else if (lastRule.propCount === 1) { - reporter.report("Outlines shouldn't be hidden unless other visual changes are made.", lastRule.line, lastRule.col, rule); - } - } - } - } - - parser.addListener("startrule", startRule); - parser.addListener("startfontface", startRule); - parser.addListener("startpage", startRule); - parser.addListener("startpagemargin", startRule); - parser.addListener("startkeyframerule", startRule); - parser.addListener("startviewport", startRule); - - parser.addListener("property", function(event) { - var name = event.property.text.toLowerCase(), - value = event.value; - - if (lastRule) { - lastRule.propCount++; - if (name === "outline" && (value.toString() === "none" || value.toString() === "0")) { - lastRule.outline = true; - } - } - - }); - - parser.addListener("endrule", endRule); - parser.addListener("endfontface", endRule); - parser.addListener("endpage", endRule); - parser.addListener("endpagemargin", endRule); - parser.addListener("endkeyframerule", endRule); - parser.addListener("endviewport", endRule); - - } - -}); - -CSSLint.addRule({ - id: "overqualified-elements", - name: "Disallow overqualified elements", - desc: "Don't use classes or IDs with elements (a.foo or a#foo).", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-overqualified-elements", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - classes = {}; - - parser.addListener("startrule", function(event) { - var selectors = event.selectors, - selector, - part, - modifier, - i, j, k; - - for (i=0; i < selectors.length; i++) { - selector = selectors[i]; - - for (j=0; j < selector.parts.length; j++) { - part = selector.parts[j]; - if (part.type === parser.SELECTOR_PART_TYPE) { - for (k=0; k < part.modifiers.length; k++) { - modifier = part.modifiers[k]; - if (part.elementName && modifier.type === "id") { - reporter.report("Element (" + part + ") is overqualified, just use " + modifier + " without element name.", part.line, part.col, rule); - } else if (modifier.type === "class") { - - if (!classes[modifier]) { - classes[modifier] = []; - } - classes[modifier].push({ - modifier: modifier, - part: part - }); - } - } - } - } - } - }); - - parser.addListener("endstylesheet", function() { - - var prop; - for (prop in classes) { - if (classes.hasOwnProperty(prop)) { - if (classes[prop].length === 1 && classes[prop][0].part.elementName) { - reporter.report("Element (" + classes[prop][0].part + ") is overqualified, just use " + classes[prop][0].modifier + " without element name.", classes[prop][0].part.line, classes[prop][0].part.col, rule); - } - } - } - }); - } - -}); - -CSSLint.addRule({ - id: "regex-selectors", - name: "Disallow selectors that look like regexs", - desc: "Selectors that look like regular expressions are slow and should be avoided.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-selectors-that-look-like-regular-expressions", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - - parser.addListener("startrule", function(event) { - var selectors = event.selectors, - selector, - part, - modifier, - i, j, k; - - for (i=0; i < selectors.length; i++) { - selector = selectors[i]; - for (j=0; j < selector.parts.length; j++) { - part = selector.parts[j]; - if (part.type === parser.SELECTOR_PART_TYPE) { - for (k=0; k < part.modifiers.length; k++) { - modifier = part.modifiers[k]; - if (modifier.type === "attribute") { - if (/([~\|\^\$\*]=)/.test(modifier)) { - reporter.report("Attribute selectors with " + RegExp.$1 + " are slow!", modifier.line, modifier.col, rule); - } - } - - } - } - } - } - }); - } - -}); - -CSSLint.addRule({ - id: "rules-count", - name: "Rules Count", - desc: "Track how many rules there are.", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var count = 0; - parser.addListener("startrule", function() { - count++; - }); - - parser.addListener("endstylesheet", function() { - reporter.stat("rule-count", count); - }); - } - -}); - -CSSLint.addRule({ - id: "selector-max-approaching", - name: "Warn when approaching the 4095 selector limit for IE", - desc: "Will warn when selector count is >= 3800 selectors.", - browsers: "IE", - init: function(parser, reporter) { - "use strict"; - var rule = this, count = 0; - - parser.addListener("startrule", function(event) { - count += event.selectors.length; - }); - - parser.addListener("endstylesheet", function() { - if (count >= 3800) { - reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.", 0, 0, rule); - } - }); - } - -}); - -CSSLint.addRule({ - id: "selector-max", - name: "Error when past the 4095 selector limit for IE", - desc: "Will error when selector count is > 4095.", - browsers: "IE", - init: function(parser, reporter) { - "use strict"; - var rule = this, count = 0; - - parser.addListener("startrule", function(event) { - count += event.selectors.length; - }); - - parser.addListener("endstylesheet", function() { - if (count > 4095) { - reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.", 0, 0, rule); - } - }); - } - -}); - -CSSLint.addRule({ - id: "selector-newline", - name: "Disallow new-line characters in selectors", - desc: "New-line characters in selectors are usually a forgotten comma and not a descendant combinator.", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - - function startRule(event) { - var i, len, selector, p, n, pLen, part, part2, type, currentLine, nextLine, - selectors = event.selectors; - - for (i = 0, len = selectors.length; i < len; i++) { - selector = selectors[i]; - for (p = 0, pLen = selector.parts.length; p < pLen; p++) { - for (n = p + 1; n < pLen; n++) { - part = selector.parts[p]; - part2 = selector.parts[n]; - type = part.type; - currentLine = part.line; - nextLine = part2.line; - - if (type === "descendant" && nextLine > currentLine) { - reporter.report("newline character found in selector (forgot a comma?)", currentLine, selectors[i].parts[0].col, rule); - } - } - } - - } - } - - parser.addListener("startrule", startRule); - - } -}); - -CSSLint.addRule({ - id: "shorthand", - name: "Require shorthand properties", - desc: "Use shorthand properties where possible.", - url: "https://github.com/CSSLint/csslint/wiki/Require-shorthand-properties", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - prop, i, len, - propertiesToCheck = {}, - properties, - mapping = { - "margin": [ - "margin-top", - "margin-bottom", - "margin-left", - "margin-right" - ], - "padding": [ - "padding-top", - "padding-bottom", - "padding-left", - "padding-right" - ] - }; - for (prop in mapping) { - if (mapping.hasOwnProperty(prop)) { - for (i=0, len=mapping[prop].length; i < len; i++) { - propertiesToCheck[mapping[prop][i]] = prop; - } - } - } - - function startRule() { - properties = {}; - } - function endRule(event) { - - var prop, i, len, total; - for (prop in mapping) { - if (mapping.hasOwnProperty(prop)) { - total=0; - - for (i=0, len=mapping[prop].length; i < len; i++) { - total += properties[mapping[prop][i]] ? 1 : 0; - } - - if (total === mapping[prop].length) { - reporter.report("The properties " + mapping[prop].join(", ") + " can be replaced by " + prop + ".", event.line, event.col, rule); - } - } - } - } - - parser.addListener("startrule", startRule); - parser.addListener("startfontface", startRule); - parser.addListener("property", function(event) { - var name = event.property.toString().toLowerCase(); - - if (propertiesToCheck[name]) { - properties[name] = 1; - } - }); - - parser.addListener("endrule", endRule); - parser.addListener("endfontface", endRule); - - } - -}); - -CSSLint.addRule({ - id: "star-property-hack", - name: "Disallow properties with a star prefix", - desc: "Checks for the star property hack (targets IE6/7)", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-star-hack", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - parser.addListener("property", function(event) { - var property = event.property; - - if (property.hack === "*") { - reporter.report("Property with star prefix found.", event.property.line, event.property.col, rule); - } - }); - } -}); - -CSSLint.addRule({ - id: "text-indent", - name: "Disallow negative text-indent", - desc: "Checks for text indent less than -99px", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-negative-text-indent", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - textIndent, - direction; - - - function startRule() { - textIndent = false; - direction = "inherit"; - } - function endRule() { - if (textIndent && direction !== "ltr") { - reporter.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", textIndent.line, textIndent.col, rule); - } - } - - parser.addListener("startrule", startRule); - parser.addListener("startfontface", startRule); - parser.addListener("property", function(event) { - var name = event.property.toString().toLowerCase(), - value = event.value; - - if (name === "text-indent" && value.parts[0].value < -99) { - textIndent = event.property; - } else if (name === "direction" && value.toString() === "ltr") { - direction = "ltr"; - } - }); - - parser.addListener("endrule", endRule); - parser.addListener("endfontface", endRule); - - } - -}); - -CSSLint.addRule({ - id: "underscore-property-hack", - name: "Disallow properties with an underscore prefix", - desc: "Checks for the underscore property hack (targets IE6)", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-underscore-hack", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - parser.addListener("property", function(event) { - var property = event.property; - - if (property.hack === "_") { - reporter.report("Property with underscore prefix found.", event.property.line, event.property.col, rule); - } - }); - } -}); - -CSSLint.addRule({ - id: "universal-selector", - name: "Disallow universal selector", - desc: "The universal selector (*) is known to be slow.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-universal-selector", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - - parser.addListener("startrule", function(event) { - var selectors = event.selectors, - selector, - part, - i; - - for (i=0; i < selectors.length; i++) { - selector = selectors[i]; - - part = selector.parts[selector.parts.length-1]; - if (part.elementName === "*") { - reporter.report(rule.desc, part.line, part.col, rule); - } - } - }); - } - -}); - -CSSLint.addRule({ - id: "unqualified-attributes", - name: "Disallow unqualified attribute selectors", - desc: "Unqualified attribute selectors are known to be slow.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-unqualified-attribute-selectors", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - - var rule = this; - - parser.addListener("startrule", function(event) { - - var selectors = event.selectors, - selectorContainsClassOrId = false, - selector, - part, - modifier, - i, k; - - for (i=0; i < selectors.length; i++) { - selector = selectors[i]; - - part = selector.parts[selector.parts.length-1]; - if (part.type === parser.SELECTOR_PART_TYPE) { - for (k=0; k < part.modifiers.length; k++) { - modifier = part.modifiers[k]; - - if (modifier.type === "class" || modifier.type === "id") { - selectorContainsClassOrId = true; - break; - } - } - - if (!selectorContainsClassOrId) { - for (k=0; k < part.modifiers.length; k++) { - modifier = part.modifiers[k]; - if (modifier.type === "attribute" && (!part.elementName || part.elementName === "*")) { - reporter.report(rule.desc, part.line, part.col, rule); - } - } - } - } - - } - }); - } - -}); - -CSSLint.addRule({ - id: "vendor-prefix", - name: "Require standard property with vendor prefix", - desc: "When using a vendor-prefixed property, make sure to include the standard one.", - url: "https://github.com/CSSLint/csslint/wiki/Require-standard-property-with-vendor-prefix", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this, - properties, - num, - propertiesToCheck = { - "-webkit-border-radius": "border-radius", - "-webkit-border-top-left-radius": "border-top-left-radius", - "-webkit-border-top-right-radius": "border-top-right-radius", - "-webkit-border-bottom-left-radius": "border-bottom-left-radius", - "-webkit-border-bottom-right-radius": "border-bottom-right-radius", - - "-o-border-radius": "border-radius", - "-o-border-top-left-radius": "border-top-left-radius", - "-o-border-top-right-radius": "border-top-right-radius", - "-o-border-bottom-left-radius": "border-bottom-left-radius", - "-o-border-bottom-right-radius": "border-bottom-right-radius", - - "-moz-border-radius": "border-radius", - "-moz-border-radius-topleft": "border-top-left-radius", - "-moz-border-radius-topright": "border-top-right-radius", - "-moz-border-radius-bottomleft": "border-bottom-left-radius", - "-moz-border-radius-bottomright": "border-bottom-right-radius", - - "-moz-column-count": "column-count", - "-webkit-column-count": "column-count", - - "-moz-column-gap": "column-gap", - "-webkit-column-gap": "column-gap", - - "-moz-column-rule": "column-rule", - "-webkit-column-rule": "column-rule", - - "-moz-column-rule-style": "column-rule-style", - "-webkit-column-rule-style": "column-rule-style", - - "-moz-column-rule-color": "column-rule-color", - "-webkit-column-rule-color": "column-rule-color", - - "-moz-column-rule-width": "column-rule-width", - "-webkit-column-rule-width": "column-rule-width", - - "-moz-column-width": "column-width", - "-webkit-column-width": "column-width", - - "-webkit-column-span": "column-span", - "-webkit-columns": "columns", - - "-moz-box-shadow": "box-shadow", - "-webkit-box-shadow": "box-shadow", - - "-moz-transform": "transform", - "-webkit-transform": "transform", - "-o-transform": "transform", - "-ms-transform": "transform", - - "-moz-transform-origin": "transform-origin", - "-webkit-transform-origin": "transform-origin", - "-o-transform-origin": "transform-origin", - "-ms-transform-origin": "transform-origin", - - "-moz-box-sizing": "box-sizing", - "-webkit-box-sizing": "box-sizing" - }; - function startRule() { - properties = {}; - num = 1; - } - function endRule() { - var prop, - i, - len, - needed, - actual, - needsStandard = []; - - for (prop in properties) { - if (propertiesToCheck[prop]) { - needsStandard.push({ - actual: prop, - needed: propertiesToCheck[prop] - }); - } - } - - for (i=0, len=needsStandard.length; i < len; i++) { - needed = needsStandard[i].needed; - actual = needsStandard[i].actual; - - if (!properties[needed]) { - reporter.report("Missing standard property '" + needed + "' to go along with '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule); - } else { - if (properties[needed][0].pos < properties[actual][0].pos) { - reporter.report("Standard property '" + needed + "' should come after vendor-prefixed property '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule); - } - } - } - - } - - parser.addListener("startrule", startRule); - parser.addListener("startfontface", startRule); - parser.addListener("startpage", startRule); - parser.addListener("startpagemargin", startRule); - parser.addListener("startkeyframerule", startRule); - parser.addListener("startviewport", startRule); - - parser.addListener("property", function(event) { - var name = event.property.text.toLowerCase(); - - if (!properties[name]) { - properties[name] = []; - } - - properties[name].push({ - name: event.property, - value: event.value, - pos: num++ - }); - }); - - parser.addListener("endrule", endRule); - parser.addListener("endfontface", endRule); - parser.addListener("endpage", endRule); - parser.addListener("endpagemargin", endRule); - parser.addListener("endkeyframerule", endRule); - parser.addListener("endviewport", endRule); - } - -}); - -CSSLint.addRule({ - id: "zero-units", - name: "Disallow units for 0 values", - desc: "You don't need to specify units when a value is 0.", - url: "https://github.com/CSSLint/csslint/wiki/Disallow-units-for-zero-values", - browsers: "All", - init: function(parser, reporter) { - "use strict"; - var rule = this; - parser.addListener("property", function(event) { - var parts = event.value.parts, - i = 0, - len = parts.length; - - while (i < len) { - if ((parts[i].units || parts[i].type === "percentage") && parts[i].value === 0 && parts[i].type !== "time") { - reporter.report("Values of 0 shouldn't have units specified.", parts[i].line, parts[i].col, rule); - } - i++; - } - - }); - - } - -}); - -(function() { - "use strict"; - var xmlEscape = function(str) { - if (!str || str.constructor !== String) { - return ""; - } - - return str.replace(/["&><]/g, function(match) { - switch (match) { - case "\"": - return """; - case "&": - return "&"; - case "<": - return "<"; - case ">": - return ">"; - } - }); - }; - - CSSLint.addFormatter({ - id: "checkstyle-xml", - name: "Checkstyle XML format", - startFormat: function() { - return ""; - }, - endFormat: function() { - return ""; - }, - readError: function(filename, message) { - return ""; - }, - formatResults: function(results, filename/*, options*/) { - var messages = results.messages, - output = []; - var generateSource = function(rule) { - if (!rule || !("name" in rule)) { - return ""; - } - return "net.csslint." + rule.name.replace(/\s/g, ""); - }; - - - if (messages.length > 0) { - output.push(""); - CSSLint.Util.forEach(messages, function (message) { - if (!message.rollup) { - output.push(""); - } - }); - output.push(""); - } - - return output.join(""); - } - }); - -}()); - -CSSLint.addFormatter({ - id: "compact", - name: "Compact, 'porcelain' format", - startFormat: function() { - "use strict"; - return ""; - }, - endFormat: function() { - "use strict"; - return ""; - }, - formatResults: function(results, filename, options) { - "use strict"; - var messages = results.messages, - output = ""; - options = options || {}; - var capitalize = function(str) { - return str.charAt(0).toUpperCase() + str.slice(1); - }; - - if (messages.length === 0) { - return options.quiet ? "" : filename + ": Lint Free!"; - } - - CSSLint.Util.forEach(messages, function(message) { - if (message.rollup) { - output += filename + ": " + capitalize(message.type) + " - " + message.message + " (" + message.rule.id + ")\n"; - } else { - output += filename + ": line " + message.line + - ", col " + message.col + ", " + capitalize(message.type) + " - " + message.message + " (" + message.rule.id + ")\n"; - } - }); - - return output; - } -}); - -CSSLint.addFormatter({ - id: "csslint-xml", - name: "CSSLint XML format", - startFormat: function() { - "use strict"; - return ""; - }, - endFormat: function() { - "use strict"; - return ""; - }, - formatResults: function(results, filename/*, options*/) { - "use strict"; - var messages = results.messages, - output = []; - var escapeSpecialCharacters = function(str) { - if (!str || str.constructor !== String) { - return ""; - } - return str.replace(/"/g, "'").replace(/&/g, "&").replace(//g, ">"); - }; - - if (messages.length > 0) { - output.push(""); - CSSLint.Util.forEach(messages, function (message) { - if (message.rollup) { - output.push(""); - } else { - output.push(""); - } - }); - output.push(""); - } - - return output.join(""); - } -}); - -CSSLint.addFormatter({ - id: "json", - name: "JSON", - startFormat: function() { - "use strict"; - this.json = []; - return ""; - }, - endFormat: function() { - "use strict"; - var ret = ""; - if (this.json.length > 0) { - if (this.json.length === 1) { - ret = JSON.stringify(this.json[0]); - } else { - ret = JSON.stringify(this.json); - } - } - return ret; - }, - formatResults: function(results, filename, options) { - "use strict"; - if (results.messages.length > 0 || !options.quiet) { - this.json.push({ - filename: filename, - messages: results.messages, - stats: results.stats - }); - } - return ""; - } -}); - -CSSLint.addFormatter({ - id: "junit-xml", - name: "JUNIT XML format", - startFormat: function() { - "use strict"; - return ""; - }, - endFormat: function() { - "use strict"; - return ""; - }, - formatResults: function(results, filename/*, options*/) { - "use strict"; - - var messages = results.messages, - output = [], - tests = { - "error": 0, - "failure": 0 - }; - var generateSource = function(rule) { - if (!rule || !("name" in rule)) { - return ""; - } - return "net.csslint." + rule.name.replace(/\s/g, ""); - }; - var escapeSpecialCharacters = function(str) { - - if (!str || str.constructor !== String) { - return ""; - } - - return str.replace(/"/g, "'").replace(//g, ">"); - - }; - - if (messages.length > 0) { - - messages.forEach(function (message) { - var type = message.type === "warning" ? "error" : message.type; - if (!message.rollup) { - output.push(""); - output.push("<" + type + " message=\"" + escapeSpecialCharacters(message.message) + "\">"); - output.push(""); - - tests[type] += 1; - - } - - }); - - output.unshift(""); - output.push(""); - - } - - return output.join(""); - - } -}); - -CSSLint.addFormatter({ - id: "lint-xml", - name: "Lint XML format", - startFormat: function() { - "use strict"; - return ""; - }, - endFormat: function() { - "use strict"; - return ""; - }, - formatResults: function(results, filename/*, options*/) { - "use strict"; - var messages = results.messages, - output = []; - var escapeSpecialCharacters = function(str) { - if (!str || str.constructor !== String) { - return ""; - } - return str.replace(/"/g, "'").replace(/&/g, "&").replace(//g, ">"); - }; - - if (messages.length > 0) { - - output.push(""); - CSSLint.Util.forEach(messages, function (message) { - if (message.rollup) { - output.push(""); - } else { - var rule = ""; - if (message.rule && message.rule.id) { - rule = "rule=\"" + escapeSpecialCharacters(message.rule.id) + "\" "; - } - output.push(""); - } - }); - output.push(""); - } - - return output.join(""); - } -}); - -CSSLint.addFormatter({ - id: "text", - name: "Plain Text", - startFormat: function() { - "use strict"; - return ""; - }, - endFormat: function() { - "use strict"; - return ""; - }, - formatResults: function(results, filename, options) { - "use strict"; - var messages = results.messages, - output = ""; - options = options || {}; - - if (messages.length === 0) { - return options.quiet ? "" : "\n\ncsslint: No errors in " + filename + "."; - } - - output = "\n\ncsslint: There "; - if (messages.length === 1) { - output += "is 1 problem"; - } else { - output += "are " + messages.length + " problems"; - } - output += " in " + filename + "."; - - var pos = filename.lastIndexOf("/"), - shortFilename = filename; - - if (pos === -1) { - pos = filename.lastIndexOf("\\"); - } - if (pos > -1) { - shortFilename = filename.substring(pos+1); - } - - CSSLint.Util.forEach(messages, function (message, i) { - output = output + "\n\n" + shortFilename; - if (message.rollup) { - output += "\n" + (i+1) + ": " + message.type; - output += "\n" + message.message; - } else { - output += "\n" + (i+1) + ": " + message.type + " at line " + message.line + ", col " + message.col; - output += "\n" + message.message; - output += "\n" + message.evidence; - } - }); - - return output; - } -}); - -return CSSLint; -})(); - - -module.exports.CSSLint = CSSLint; - -}); - -define("ace/mode/css_worker",[], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var Mirror = require("../worker/mirror").Mirror; -var CSSLint = require("./css/csslint").CSSLint; - -var Worker = exports.Worker = function(sender) { - Mirror.call(this, sender); - this.setTimeout(400); - this.ruleset = null; - this.setDisabledRules("ids|order-alphabetical"); - this.setInfoRules( - "adjoining-classes|zero-units|gradients|box-model|" + - "import|outline-none|vendor-prefix" - ); -}; - -oop.inherits(Worker, Mirror); - -(function() { - this.setInfoRules = function(ruleNames) { - if (typeof ruleNames == "string") - ruleNames = ruleNames.split("|"); - this.infoRules = lang.arrayToMap(ruleNames); - this.doc.getValue() && this.deferredUpdate.schedule(100); - }; - - this.setDisabledRules = function(ruleNames) { - if (!ruleNames) { - this.ruleset = null; - } else { - if (typeof ruleNames == "string") - ruleNames = ruleNames.split("|"); - var all = {}; - - CSSLint.getRules().forEach(function(x){ - all[x.id] = true; - }); - ruleNames.forEach(function(x) { - delete all[x]; - }); - - this.ruleset = all; - } - this.doc.getValue() && this.deferredUpdate.schedule(100); - }; - - this.onUpdate = function() { - var value = this.doc.getValue(); - if (!value) - return this.sender.emit("annotate", []); - var infoRules = this.infoRules; - - var result = CSSLint.verify(value, this.ruleset); - this.sender.emit("annotate", result.messages.map(function(msg) { - return { - row: msg.line - 1, - column: msg.col - 1, - text: msg.message, - type: infoRules[msg.rule.id] ? "info" : msg.type, - rule: msg.rule.name - }; - })); - }; - -}).call(Worker.prototype); - -}); diff --git a/src/ace/worker-html.js b/src/ace/worker-html.js deleted file mode 100644 index 7344b4aac..000000000 --- a/src/ace/worker-html.js +++ /dev/null @@ -1,10922 +0,0 @@ -"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.data, - file: file, - line: line, - col: col, - stack: 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 = {}; -require.tlns = {}; -window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { - for (var i in topLevelNamespaces) - 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 = 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/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 [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.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; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.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; - } - }; - this.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; - } - }; - this.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; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.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; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.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); - } - }; - this.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); - }; - this.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); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.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); - }; - this.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 - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -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 this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - 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 - }; - } - this.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 - }); - }; - this.detach = function() { - this.document.off("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$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; - }; - -}).call(Anchor.prototype); - -}); - -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 = function(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); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.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); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.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; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.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); - }; - - this.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}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$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; - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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; - }; - this.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: ["", ""] - }); - } - }; - this.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; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.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); - } - }; - - this.$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); - } - }; - - this.$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); - }; - this.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() - }); - }; - this.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}; - }; - this.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; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -define("ace/worker/mirror",[], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; -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) { - if (Array.isArray(data[i+1])) { - var d = {action: "insert", start: data[i], lines: data[i+1]}; - } else { - var d = {action: "remove", start: data[i], end: data[i+1]}; - } - 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/html/saxparser",[], function(require, exports, module) { -module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0; i--) { - var node = this.elements[i]; - if (node.localName === localName) - return true; - if (isMarker(node)) - return false; - } -}; -ElementStack.prototype.push = function(item) { - this.elements.push(item); -}; -ElementStack.prototype.pushHtmlElement = function(item) { - this.rootNode = item.node; - this.push(item); -}; -ElementStack.prototype.pushHeadElement = function(item) { - this.headElement = item.node; - this.push(item); -}; -ElementStack.prototype.pushBodyElement = function(item) { - this.bodyElement = item.node; - this.push(item); -}; -ElementStack.prototype.pop = function() { - return this.elements.pop(); -}; -ElementStack.prototype.remove = function(item) { - this.elements.splice(this.elements.indexOf(item), 1); -}; -ElementStack.prototype.popUntilPopped = function(localName) { - var element; - do { - element = this.pop(); - } while (element.localName != localName); -}; - -ElementStack.prototype.popUntilTableScopeMarker = function() { - while (!isTableScopeMarker(this.top)) - this.pop(); -}; - -ElementStack.prototype.popUntilTableBodyScopeMarker = function() { - while (!isTableBodyScopeMarker(this.top)) - this.pop(); -}; - -ElementStack.prototype.popUntilTableRowScopeMarker = function() { - while (!isTableRowScopeMarker(this.top)) - this.pop(); -}; -ElementStack.prototype.item = function(index) { - return this.elements[index]; -}; -ElementStack.prototype.contains = function(element) { - return this.elements.indexOf(element) !== -1; -}; -ElementStack.prototype.inScope = function(localName) { - return this._inScope(localName, isScopeMarker); -}; -ElementStack.prototype.inListItemScope = function(localName) { - return this._inScope(localName, isListItemScopeMarker); -}; -ElementStack.prototype.inTableScope = function(localName) { - return this._inScope(localName, isTableScopeMarker); -}; -ElementStack.prototype.inButtonScope = function(localName) { - return this._inScope(localName, isButtonScopeMarker); -}; -ElementStack.prototype.inSelectScope = function(localName) { - return this._inScope(localName, isSelectScopeMarker); -}; -ElementStack.prototype.hasNumberedHeaderElementInScope = function() { - for (var i = this.elements.length - 1; i >= 0; i--) { - var node = this.elements[i]; - if (node.isNumberedHeader()) - return true; - if (isScopeMarker(node)) - return false; - } -}; -ElementStack.prototype.furthestBlockForFormattingElement = function(element) { - var furthestBlock = null; - for (var i = this.elements.length - 1; i >= 0; i--) { - var node = this.elements[i]; - if (node.node === element) - break; - if (node.isSpecial()) - furthestBlock = node; - } - return furthestBlock; -}; -ElementStack.prototype.findIndex = function(localName) { - for (var i = this.elements.length - 1; i >= 0; i--) { - if (this.elements[i].localName == localName) - return i; - } - return -1; -}; - -ElementStack.prototype.remove_openElements_until = function(callback) { - var finished = false; - var element; - while (!finished) { - element = this.elements.pop(); - finished = callback(element); - } - return element; -}; - -Object.defineProperty(ElementStack.prototype, 'top', { - get: function() { - return this.elements[this.elements.length - 1]; - } -}); - -Object.defineProperty(ElementStack.prototype, 'length', { - get: function() { - return this.elements.length; - } -}); - -exports.ElementStack = ElementStack; - -}, -{}], -2:[function(_dereq_,module,exports){ -var entities = _dereq_('html5-entities'); -var InputStream = _dereq_('./InputStream').InputStream; - -var namedEntityPrefixes = {}; -Object.keys(entities).forEach(function (entityKey) { - for (var i = 0; i < entityKey.length; i++) { - namedEntityPrefixes[entityKey.substring(0, i + 1)] = true; - } -}); - -function isAlphaNumeric(c) { - return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); -} - -function isHexDigit(c) { - return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); -} - -function isDecimalDigit(c) { - return (c >= '0' && c <= '9'); -} - -var EntityParser = {}; - -EntityParser.consumeEntity = function(buffer, tokenizer, additionalAllowedCharacter) { - var decodedCharacter = ''; - var consumedCharacters = ''; - var ch = buffer.char(); - if (ch === InputStream.EOF) - return false; - consumedCharacters += ch; - if (ch == '\t' || ch == '\n' || ch == '\v' || ch == ' ' || ch == '<' || ch == '&') { - buffer.unget(consumedCharacters); - return false; - } - if (additionalAllowedCharacter === ch) { - buffer.unget(consumedCharacters); - return false; - } - if (ch == '#') { - ch = buffer.shift(1); - if (ch === InputStream.EOF) { - tokenizer._parseError("expected-numeric-entity-but-got-eof"); - buffer.unget(consumedCharacters); - return false; - } - consumedCharacters += ch; - var radix = 10; - var isDigit = isDecimalDigit; - if (ch == 'x' || ch == 'X') { - radix = 16; - isDigit = isHexDigit; - ch = buffer.shift(1); - if (ch === InputStream.EOF) { - tokenizer._parseError("expected-numeric-entity-but-got-eof"); - buffer.unget(consumedCharacters); - return false; - } - consumedCharacters += ch; - } - if (isDigit(ch)) { - var code = ''; - while (ch !== InputStream.EOF && isDigit(ch)) { - code += ch; - ch = buffer.char(); - } - code = parseInt(code, radix); - var replacement = this.replaceEntityNumbers(code); - if (replacement) { - tokenizer._parseError("invalid-numeric-entity-replaced"); - code = replacement; - } - if (code > 0xFFFF && code <= 0x10FFFF) { - code -= 0x10000; - var first = ((0xffc00 & code) >> 10) + 0xD800; - var second = (0x3ff & code) + 0xDC00; - decodedCharacter = String.fromCharCode(first, second); - } else - decodedCharacter = String.fromCharCode(code); - if (ch !== ';') { - tokenizer._parseError("numeric-entity-without-semicolon"); - buffer.unget(ch); - } - return decodedCharacter; - } - buffer.unget(consumedCharacters); - tokenizer._parseError("expected-numeric-entity"); - return false; - } - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) { - var mostRecentMatch = ''; - while (namedEntityPrefixes[consumedCharacters]) { - if (entities[consumedCharacters]) { - mostRecentMatch = consumedCharacters; - } - if (ch == ';') - break; - ch = buffer.char(); - if (ch === InputStream.EOF) - break; - consumedCharacters += ch; - } - if (!mostRecentMatch) { - tokenizer._parseError("expected-named-entity"); - buffer.unget(consumedCharacters); - return false; - } - decodedCharacter = entities[mostRecentMatch]; - if (ch === ';' || !additionalAllowedCharacter || !(isAlphaNumeric(ch) || ch === '=')) { - if (consumedCharacters.length > mostRecentMatch.length) { - buffer.unget(consumedCharacters.substring(mostRecentMatch.length)); - } - if (ch !== ';') { - tokenizer._parseError("named-entity-without-semicolon"); - } - return decodedCharacter; - } - buffer.unget(consumedCharacters); - return false; - } -}; - -EntityParser.replaceEntityNumbers = function(c) { - switch(c) { - case 0x00: return 0xFFFD; // REPLACEMENT CHARACTER - case 0x13: return 0x0010; // Carriage return - case 0x80: return 0x20AC; // EURO SIGN - case 0x81: return 0x0081; // - case 0x82: return 0x201A; // SINGLE LOW-9 QUOTATION MARK - case 0x83: return 0x0192; // LATIN SMALL LETTER F WITH HOOK - case 0x84: return 0x201E; // DOUBLE LOW-9 QUOTATION MARK - case 0x85: return 0x2026; // HORIZONTAL ELLIPSIS - case 0x86: return 0x2020; // DAGGER - case 0x87: return 0x2021; // DOUBLE DAGGER - case 0x88: return 0x02C6; // MODIFIER LETTER CIRCUMFLEX ACCENT - case 0x89: return 0x2030; // PER MILLE SIGN - case 0x8A: return 0x0160; // LATIN CAPITAL LETTER S WITH CARON - case 0x8B: return 0x2039; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK - case 0x8C: return 0x0152; // LATIN CAPITAL LIGATURE OE - case 0x8D: return 0x008D; // - case 0x8E: return 0x017D; // LATIN CAPITAL LETTER Z WITH CARON - case 0x8F: return 0x008F; // - case 0x90: return 0x0090; // - case 0x91: return 0x2018; // LEFT SINGLE QUOTATION MARK - case 0x92: return 0x2019; // RIGHT SINGLE QUOTATION MARK - case 0x93: return 0x201C; // LEFT DOUBLE QUOTATION MARK - case 0x94: return 0x201D; // RIGHT DOUBLE QUOTATION MARK - case 0x95: return 0x2022; // BULLET - case 0x96: return 0x2013; // EN DASH - case 0x97: return 0x2014; // EM DASH - case 0x98: return 0x02DC; // SMALL TILDE - case 0x99: return 0x2122; // TRADE MARK SIGN - case 0x9A: return 0x0161; // LATIN SMALL LETTER S WITH CARON - case 0x9B: return 0x203A; // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - case 0x9C: return 0x0153; // LATIN SMALL LIGATURE OE - case 0x9D: return 0x009D; // - case 0x9E: return 0x017E; // LATIN SMALL LETTER Z WITH CARON - case 0x9F: return 0x0178; // LATIN CAPITAL LETTER Y WITH DIAERESIS - default: - if ((c >= 0xD800 && c <= 0xDFFF) || c > 0x10FFFF) { - return 0xFFFD; - } else if ((c >= 0x0001 && c <= 0x0008) || (c >= 0x000E && c <= 0x001F) || - (c >= 0x007F && c <= 0x009F) || (c >= 0xFDD0 && c <= 0xFDEF) || - c == 0x000B || c == 0xFFFE || c == 0x1FFFE || c == 0x2FFFFE || - c == 0x2FFFF || c == 0x3FFFE || c == 0x3FFFF || c == 0x4FFFE || - c == 0x4FFFF || c == 0x5FFFE || c == 0x5FFFF || c == 0x6FFFE || - c == 0x6FFFF || c == 0x7FFFE || c == 0x7FFFF || c == 0x8FFFE || - c == 0x8FFFF || c == 0x9FFFE || c == 0x9FFFF || c == 0xAFFFE || - c == 0xAFFFF || c == 0xBFFFE || c == 0xBFFFF || c == 0xCFFFE || - c == 0xCFFFF || c == 0xDFFFE || c == 0xDFFFF || c == 0xEFFFE || - c == 0xEFFFF || c == 0xFFFFE || c == 0xFFFFF || c == 0x10FFFE || - c == 0x10FFFF) { - return c; - } - } -}; - -exports.EntityParser = EntityParser; - -}, -{"./InputStream":3,"html5-entities":12}], -3:[function(_dereq_,module,exports){ -function InputStream() { - this.data = ''; - this.start = 0; - this.committed = 0; - this.eof = false; - this.lastLocation = {line: 0, column: 0}; -} - -InputStream.EOF = -1; - -InputStream.DRAIN = -2; - -InputStream.prototype = { - slice: function() { - if(this.start >= this.data.length) { - if(!this.eof) throw InputStream.DRAIN; - return InputStream.EOF; - } - return this.data.slice(this.start, this.data.length); - }, - char: function() { - if(!this.eof && this.start >= this.data.length - 1) throw InputStream.DRAIN; - if(this.start >= this.data.length) { - return InputStream.EOF; - } - var ch = this.data[this.start++]; - if (ch === '\r') - ch = '\n'; - return ch; - }, - advance: function(amount) { - this.start += amount; - if(this.start >= this.data.length) { - if(!this.eof) throw InputStream.DRAIN; - return InputStream.EOF; - } else { - if(this.committed > this.data.length / 2) { - this.lastLocation = this.location(); - this.data = this.data.slice(this.committed); - this.start = this.start - this.committed; - this.committed = 0; - } - } - }, - matchWhile: function(re) { - if(this.eof && this.start >= this.data.length ) return ''; - var r = new RegExp("^"+re+"+"); - var m = r.exec(this.slice()); - if(m) { - if(!this.eof && m[0].length == this.data.length - this.start) throw InputStream.DRAIN; - this.advance(m[0].length); - return m[0]; - } else { - return ''; - } - }, - matchUntil: function(re) { - var m, s; - s = this.slice(); - if(s === InputStream.EOF) { - return ''; - } else if(m = new RegExp(re + (this.eof ? "|$" : "")).exec(s)) { - var t = this.data.slice(this.start, this.start + m.index); - this.advance(m.index); - return t.replace(/\r/g, '\n').replace(/\n{2,}/g, '\n'); - } else { - throw InputStream.DRAIN; - } - }, - append: function(data) { - this.data += data; - }, - shift: function(n) { - if(!this.eof && this.start + n >= this.data.length) throw InputStream.DRAIN; - if(this.eof && this.start >= this.data.length) return InputStream.EOF; - var d = this.data.slice(this.start, this.start + n).toString(); - this.advance(Math.min(n, this.data.length - this.start)); - return d; - }, - peek: function(n) { - if(!this.eof && this.start + n >= this.data.length) throw InputStream.DRAIN; - if(this.eof && this.start >= this.data.length) return InputStream.EOF; - return this.data.slice(this.start, Math.min(this.start + n, this.data.length)).toString(); - }, - length: function() { - return this.data.length - this.start - 1; - }, - unget: function(d) { - if(d === InputStream.EOF) return; - this.start -= (d.length); - }, - undo: function() { - this.start = this.committed; - }, - commit: function() { - this.committed = this.start; - }, - location: function() { - var lastLine = this.lastLocation.line; - var lastColumn = this.lastLocation.column; - var read = this.data.slice(0, this.committed); - var newlines = read.match(/\n/g); - var line = newlines ? lastLine + newlines.length : lastLine; - var column = newlines ? read.length - read.lastIndexOf('\n') - 1 : lastColumn + read.length; - return {line: line, column: column}; - } -}; - -exports.InputStream = InputStream; - -}, -{}], -4:[function(_dereq_,module,exports){ -var SpecialElements = { - "http://www.w3.org/1999/xhtml": [ - 'address', - 'applet', - 'area', - 'article', - 'aside', - 'base', - 'basefont', - 'bgsound', - 'blockquote', - 'body', - 'br', - 'button', - 'caption', - 'center', - 'col', - 'colgroup', - 'dd', - 'details', - 'dir', - 'div', - 'dl', - 'dt', - 'embed', - 'fieldset', - 'figcaption', - 'figure', - 'footer', - 'form', - 'frame', - 'frameset', - 'h1', - 'h2', - 'h3', - 'h4', - 'h5', - 'h6', - 'head', - 'header', - 'hgroup', - 'hr', - 'html', - 'iframe', - 'img', - 'input', - 'isindex', - 'li', - 'link', - 'listing', - 'main', - 'marquee', - 'menu', - 'menuitem', - 'meta', - 'nav', - 'noembed', - 'noframes', - 'noscript', - 'object', - 'ol', - 'p', - 'param', - 'plaintext', - 'pre', - 'script', - 'section', - 'select', - 'source', - 'style', - 'summary', - 'table', - 'tbody', - 'td', - 'textarea', - 'tfoot', - 'th', - 'thead', - 'title', - 'tr', - 'track', - 'ul', - 'wbr', - 'xmp' - ], - "http://www.w3.org/1998/Math/MathML": [ - 'mi', - 'mo', - 'mn', - 'ms', - 'mtext', - 'annotation-xml' - ], - "http://www.w3.org/2000/svg": [ - 'foreignObject', - 'desc', - 'title' - ] -}; - - -function StackItem(namespaceURI, localName, attributes, node) { - this.localName = localName; - this.namespaceURI = namespaceURI; - this.attributes = attributes; - this.node = node; -} -StackItem.prototype.isSpecial = function() { - return this.namespaceURI in SpecialElements && - SpecialElements[this.namespaceURI].indexOf(this.localName) > -1; -}; - -StackItem.prototype.isFosterParenting = function() { - if (this.namespaceURI === "http://www.w3.org/1999/xhtml") { - return this.localName === 'table' || - this.localName === 'tbody' || - this.localName === 'tfoot' || - this.localName === 'thead' || - this.localName === 'tr'; - } - return false; -}; - -StackItem.prototype.isNumberedHeader = function() { - if (this.namespaceURI === "http://www.w3.org/1999/xhtml") { - return this.localName === 'h1' || - this.localName === 'h2' || - this.localName === 'h3' || - this.localName === 'h4' || - this.localName === 'h5' || - this.localName === 'h6'; - } - return false; -}; - -StackItem.prototype.isForeign = function() { - return this.namespaceURI != "http://www.w3.org/1999/xhtml"; -}; - -function getAttribute(item, name) { - for (var i = 0; i < item.attributes.length; i++) { - if (item.attributes[i].nodeName == name) - return item.attributes[i].nodeValue; - } - return null; -} - -StackItem.prototype.isHtmlIntegrationPoint = function() { - if (this.namespaceURI === "http://www.w3.org/1998/Math/MathML") { - if (this.localName !== "annotation-xml") - return false; - var encoding = getAttribute(this, 'encoding'); - if (!encoding) - return false; - encoding = encoding.toLowerCase(); - return encoding === "text/html" || encoding === "application/xhtml+xml"; - } - if (this.namespaceURI === "http://www.w3.org/2000/svg") { - return this.localName === "foreignObject" - || this.localName === "desc" - || this.localName === "title"; - } - return false; -}; - -StackItem.prototype.isMathMLTextIntegrationPoint = function() { - if (this.namespaceURI === "http://www.w3.org/1998/Math/MathML") { - return this.localName === "mi" - || this.localName === "mo" - || this.localName === "mn" - || this.localName === "ms" - || this.localName === "mtext"; - } - return false; -}; - -exports.StackItem = StackItem; - -}, -{}], -5:[function(_dereq_,module,exports){ -var InputStream = _dereq_('./InputStream').InputStream; -var EntityParser = _dereq_('./EntityParser').EntityParser; - -function isWhitespace(c){ - return c === " " || c === "\n" || c === "\t" || c === "\r" || c === "\f"; -} - -function isAlpha(c) { - return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); -} -function Tokenizer(tokenHandler) { - this._tokenHandler = tokenHandler; - this._state = Tokenizer.DATA; - this._inputStream = new InputStream(); - this._currentToken = null; - this._temporaryBuffer = ''; - this._additionalAllowedCharacter = ''; -} - -Tokenizer.prototype._parseError = function(code, args) { - this._tokenHandler.parseError(code, args); -}; - -Tokenizer.prototype._emitToken = function(token) { - if (token.type === 'StartTag') { - for (var i = 1; i < token.data.length; i++) { - if (!token.data[i].nodeName) - token.data.splice(i--, 1); - } - } else if (token.type === 'EndTag') { - if (token.selfClosing) { - this._parseError('self-closing-flag-on-end-tag'); - } - if (token.data.length !== 0) { - this._parseError('attributes-in-end-tag'); - } - } - this._tokenHandler.processToken(token); - if (token.type === 'StartTag' && token.selfClosing && !this._tokenHandler.isSelfClosingFlagAcknowledged()) { - this._parseError('non-void-element-with-trailing-solidus', {name: token.name}); - } -}; - -Tokenizer.prototype._emitCurrentToken = function() { - this._state = Tokenizer.DATA; - this._emitToken(this._currentToken); -}; - -Tokenizer.prototype._currentAttribute = function() { - return this._currentToken.data[this._currentToken.data.length - 1]; -}; - -Tokenizer.prototype.setState = function(state) { - this._state = state; -}; - -Tokenizer.prototype.tokenize = function(source) { - Tokenizer.DATA = data_state; - Tokenizer.RCDATA = rcdata_state; - Tokenizer.RAWTEXT = rawtext_state; - Tokenizer.SCRIPT_DATA = script_data_state; - Tokenizer.PLAINTEXT = plaintext_state; - - - this._state = Tokenizer.DATA; - - this._inputStream.append(source); - - this._tokenHandler.startTokenization(this); - - this._inputStream.eof = true; - - var tokenizer = this; - - while (this._state.call(this, this._inputStream)); - - - function data_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._emitToken({type: 'EOF', data: null}); - return false; - } else if (data === '&') { - tokenizer.setState(character_reference_in_data_state); - } else if (data === '<') { - tokenizer.setState(tag_open_state); - } else if (data === '\u0000') { - tokenizer._emitToken({type: 'Characters', data: data}); - buffer.commit(); - } else { - var chars = buffer.matchUntil("&|<|\u0000"); - tokenizer._emitToken({type: 'Characters', data: data + chars}); - buffer.commit(); - } - return true; - } - - function character_reference_in_data_state(buffer) { - var character = EntityParser.consumeEntity(buffer, tokenizer); - tokenizer.setState(data_state); - tokenizer._emitToken({type: 'Characters', data: character || '&'}); - return true; - } - - function rcdata_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._emitToken({type: 'EOF', data: null}); - return false; - } else if (data === '&') { - tokenizer.setState(character_reference_in_rcdata_state); - } else if (data === '<') { - tokenizer.setState(rcdata_less_than_sign_state); - } else if (data === "\u0000") { - tokenizer._parseError("invalid-codepoint"); - tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); - buffer.commit(); - } else { - var chars = buffer.matchUntil("&|<|\u0000"); - tokenizer._emitToken({type: 'Characters', data: data + chars}); - buffer.commit(); - } - return true; - } - - function character_reference_in_rcdata_state(buffer) { - var character = EntityParser.consumeEntity(buffer, tokenizer); - tokenizer.setState(rcdata_state); - tokenizer._emitToken({type: 'Characters', data: character || '&'}); - return true; - } - - function rawtext_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._emitToken({type: 'EOF', data: null}); - return false; - } else if (data === '<') { - tokenizer.setState(rawtext_less_than_sign_state); - } else if (data === "\u0000") { - tokenizer._parseError("invalid-codepoint"); - tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); - buffer.commit(); - } else { - var chars = buffer.matchUntil("<|\u0000"); - tokenizer._emitToken({type: 'Characters', data: data + chars}); - } - return true; - } - - function plaintext_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._emitToken({type: 'EOF', data: null}); - return false; - } else if (data === "\u0000") { - tokenizer._parseError("invalid-codepoint"); - tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); - buffer.commit(); - } else { - var chars = buffer.matchUntil("\u0000"); - tokenizer._emitToken({type: 'Characters', data: data + chars}); - } - return true; - } - - - function script_data_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._emitToken({type: 'EOF', data: null}); - return false; - } else if (data === '<') { - tokenizer.setState(script_data_less_than_sign_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); - buffer.commit(); - } else { - var chars = buffer.matchUntil("<|\u0000"); - tokenizer._emitToken({type: 'Characters', data: data + chars}); - } - return true; - } - - function rcdata_less_than_sign_state(buffer) { - var data = buffer.char(); - if (data === "/") { - this._temporaryBuffer = ''; - tokenizer.setState(rcdata_end_tag_open_state); - } else { - tokenizer._emitToken({type: 'Characters', data: '<'}); - buffer.unget(data); - tokenizer.setState(rcdata_state); - } - return true; - } - - function rcdata_end_tag_open_state(buffer) { - var data = buffer.char(); - if (isAlpha(data)) { - this._temporaryBuffer += data; - tokenizer.setState(rcdata_end_tag_name_state); - } else { - tokenizer._emitToken({type: 'Characters', data: '' && appropriate) { - tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false}; - tokenizer._emitCurrentToken(); - tokenizer.setState(data_state); - } else if (isAlpha(data)) { - this._temporaryBuffer += data; - buffer.commit(); - } else { - tokenizer._emitToken({type: 'Characters', data: '' && appropriate) { - tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false}; - tokenizer._emitCurrentToken(); - tokenizer.setState(data_state); - } else if (isAlpha(data)) { - this._temporaryBuffer += data; - buffer.commit(); - } else { - tokenizer._emitToken({type: 'Characters', data: '' && appropriate) { - tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false}; - tokenizer._emitCurrentToken(); - } else if (isAlpha(data)) { - this._temporaryBuffer += data; - buffer.commit(); - } else { - tokenizer._emitToken({type: 'Characters', data: '') { - tokenizer._emitToken({type: 'Characters', data: '>'}); - tokenizer.setState(script_data_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); - tokenizer.setState(script_data_escaped_state); - } else { - tokenizer._emitToken({type: 'Characters', data: data}); - tokenizer.setState(script_data_escaped_state); - } - return true; - } - - function script_data_escaped_less_then_sign_state(buffer) { - var data = buffer.char(); - if (data === '/') { - this._temporaryBuffer = ''; - tokenizer.setState(script_data_escaped_end_tag_open_state); - } else if (isAlpha(data)) { - tokenizer._emitToken({type: 'Characters', data: '<' + data}); - this._temporaryBuffer = data; - tokenizer.setState(script_data_double_escape_start_state); - } else { - tokenizer._emitToken({type: 'Characters', data: '<'}); - buffer.unget(data); - tokenizer.setState(script_data_escaped_state); - } - return true; - } - - function script_data_escaped_end_tag_open_state(buffer) { - var data = buffer.char(); - if (isAlpha(data)) { - this._temporaryBuffer = data; - tokenizer.setState(script_data_escaped_end_tag_name_state); - } else { - tokenizer._emitToken({type: 'Characters', data: '' && appropriate) { - tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false}; - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (isAlpha(data)) { - this._temporaryBuffer += data; - buffer.commit(); - } else { - tokenizer._emitToken({type: 'Characters', data: '') { - tokenizer._emitToken({type: 'Characters', data: data}); - if (this._temporaryBuffer.toLowerCase() === 'script') - tokenizer.setState(script_data_double_escaped_state); - else - tokenizer.setState(script_data_escaped_state); - } else if (isAlpha(data)) { - tokenizer._emitToken({type: 'Characters', data: data}); - this._temporaryBuffer += data; - buffer.commit(); - } else { - buffer.unget(data); - tokenizer.setState(script_data_escaped_state); - } - return true; - } - - function script_data_double_escaped_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError('eof-in-script'); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '-') { - tokenizer._emitToken({type: 'Characters', data: '-'}); - tokenizer.setState(script_data_double_escaped_dash_state); - } else if (data === '<') { - tokenizer._emitToken({type: 'Characters', data: '<'}); - tokenizer.setState(script_data_double_escaped_less_than_sign_state); - } else if (data === '\u0000') { - tokenizer._parseError('invalid-codepoint'); - tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); - buffer.commit(); - } else { - tokenizer._emitToken({type: 'Characters', data: data}); - buffer.commit(); - } - return true; - } - - function script_data_double_escaped_dash_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError('eof-in-script'); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '-') { - tokenizer._emitToken({type: 'Characters', data: '-'}); - tokenizer.setState(script_data_double_escaped_dash_dash_state); - } else if (data === '<') { - tokenizer._emitToken({type: 'Characters', data: '<'}); - tokenizer.setState(script_data_double_escaped_less_than_sign_state); - } else if (data === '\u0000') { - tokenizer._parseError('invalid-codepoint'); - tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); - tokenizer.setState(script_data_double_escaped_state); - } else { - tokenizer._emitToken({type: 'Characters', data: data}); - tokenizer.setState(script_data_double_escaped_state); - } - return true; - } - - function script_data_double_escaped_dash_dash_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError('eof-in-script'); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '-') { - tokenizer._emitToken({type: 'Characters', data: '-'}); - buffer.commit(); - } else if (data === '<') { - tokenizer._emitToken({type: 'Characters', data: '<'}); - tokenizer.setState(script_data_double_escaped_less_than_sign_state); - } else if (data === '>') { - tokenizer._emitToken({type: 'Characters', data: '>'}); - tokenizer.setState(script_data_state); - } else if (data === '\u0000') { - tokenizer._parseError('invalid-codepoint'); - tokenizer._emitToken({type: 'Characters', data: '\uFFFD'}); - tokenizer.setState(script_data_double_escaped_state); - } else { - tokenizer._emitToken({type: 'Characters', data: data}); - tokenizer.setState(script_data_double_escaped_state); - } - return true; - } - - function script_data_double_escaped_less_than_sign_state(buffer) { - var data = buffer.char(); - if (data === '/') { - tokenizer._emitToken({type: 'Characters', data: '/'}); - this._temporaryBuffer = ''; - tokenizer.setState(script_data_double_escape_end_state); - } else { - buffer.unget(data); - tokenizer.setState(script_data_double_escaped_state); - } - return true; - } - - function script_data_double_escape_end_state(buffer) { - var data = buffer.char(); - if (isWhitespace(data) || data === '/' || data === '>') { - tokenizer._emitToken({type: 'Characters', data: data}); - if (this._temporaryBuffer.toLowerCase() === 'script') - tokenizer.setState(script_data_escaped_state); - else - tokenizer.setState(script_data_double_escaped_state); - } else if (isAlpha(data)) { - tokenizer._emitToken({type: 'Characters', data: data}); - this._temporaryBuffer += data; - buffer.commit(); - } else { - buffer.unget(data); - tokenizer.setState(script_data_double_escaped_state); - } - return true; - } - - function tag_open_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("bare-less-than-sign-at-eof"); - tokenizer._emitToken({type: 'Characters', data: '<'}); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isAlpha(data)) { - tokenizer._currentToken = {type: 'StartTag', name: data.toLowerCase(), data: []}; - tokenizer.setState(tag_name_state); - } else if (data === '!') { - tokenizer.setState(markup_declaration_open_state); - } else if (data === '/') { - tokenizer.setState(close_tag_open_state); - } else if (data === '>') { - tokenizer._parseError("expected-tag-name-but-got-right-bracket"); - tokenizer._emitToken({type: 'Characters', data: "<>"}); - tokenizer.setState(data_state); - } else if (data === '?') { - tokenizer._parseError("expected-tag-name-but-got-question-mark"); - buffer.unget(data); - tokenizer.setState(bogus_comment_state); - } else { - tokenizer._parseError("expected-tag-name"); - tokenizer._emitToken({type: 'Characters', data: "<"}); - buffer.unget(data); - tokenizer.setState(data_state); - } - return true; - } - - function close_tag_open_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("expected-closing-tag-but-got-eof"); - tokenizer._emitToken({type: 'Characters', data: '') { - tokenizer._parseError("expected-closing-tag-but-got-right-bracket"); - tokenizer.setState(data_state); - } else { - tokenizer._parseError("expected-closing-tag-but-got-char", {data: data}); // param 1 is datavars: - buffer.unget(data); - tokenizer.setState(bogus_comment_state); - } - return true; - } - - function tag_name_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError('eof-in-tag-name'); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - tokenizer.setState(before_attribute_name_state); - } else if (isAlpha(data)) { - tokenizer._currentToken.name += data.toLowerCase(); - } else if (data === '>') { - tokenizer._emitCurrentToken(); - } else if (data === '/') { - tokenizer.setState(self_closing_tag_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentToken.name += "\uFFFD"; - } else { - tokenizer._currentToken.name += data; - } - buffer.commit(); - - return true; - } - - function before_attribute_name_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("expected-attribute-name-but-got-eof"); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - return true; - } else if (isAlpha(data)) { - tokenizer._currentToken.data.push({nodeName: data.toLowerCase(), nodeValue: ""}); - tokenizer.setState(attribute_name_state); - } else if (data === '>') { - tokenizer._emitCurrentToken(); - } else if (data === '/') { - tokenizer.setState(self_closing_tag_state); - } else if (data === "'" || data === '"' || data === '=' || data === '<') { - tokenizer._parseError("invalid-character-in-attribute-name"); - tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); - tokenizer.setState(attribute_name_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentToken.data.push({nodeName: "\uFFFD", nodeValue: ""}); - } else { - tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); - tokenizer.setState(attribute_name_state); - } - return true; - } - - function attribute_name_state(buffer) { - var data = buffer.char(); - var leavingThisState = true; - var shouldEmit = false; - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-attribute-name"); - buffer.unget(data); - tokenizer.setState(data_state); - shouldEmit = true; - } else if (data === '=') { - tokenizer.setState(before_attribute_value_state); - } else if (isAlpha(data)) { - tokenizer._currentAttribute().nodeName += data.toLowerCase(); - leavingThisState = false; - } else if (data === '>') { - shouldEmit = true; - } else if (isWhitespace(data)) { - tokenizer.setState(after_attribute_name_state); - } else if (data === '/') { - tokenizer.setState(self_closing_tag_state); - } else if (data === "'" || data === '"') { - tokenizer._parseError("invalid-character-in-attribute-name"); - tokenizer._currentAttribute().nodeName += data; - leavingThisState = false; - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentAttribute().nodeName += "\uFFFD"; - } else { - tokenizer._currentAttribute().nodeName += data; - leavingThisState = false; - } - - if (leavingThisState) { - var attributes = tokenizer._currentToken.data; - var currentAttribute = attributes[attributes.length - 1]; - for (var i = attributes.length - 2; i >= 0; i--) { - if (currentAttribute.nodeName === attributes[i].nodeName) { - tokenizer._parseError("duplicate-attribute", {name: currentAttribute.nodeName}); - currentAttribute.nodeName = null; - break; - } - } - if (shouldEmit) - tokenizer._emitCurrentToken(); - } else { - buffer.commit(); - } - return true; - } - - function after_attribute_name_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("expected-end-of-tag-but-got-eof"); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - return true; - } else if (data === '=') { - tokenizer.setState(before_attribute_value_state); - } else if (data === '>') { - tokenizer._emitCurrentToken(); - } else if (isAlpha(data)) { - tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); - tokenizer.setState(attribute_name_state); - } else if (data === '/') { - tokenizer.setState(self_closing_tag_state); - } else if (data === "'" || data === '"' || data === '<') { - tokenizer._parseError("invalid-character-after-attribute-name"); - tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); - tokenizer.setState(attribute_name_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentToken.data.push({nodeName: "\uFFFD", nodeValue: ""}); - } else { - tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""}); - tokenizer.setState(attribute_name_state); - } - return true; - } - - function before_attribute_value_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("expected-attribute-value-but-got-eof"); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - return true; - } else if (data === '"') { - tokenizer.setState(attribute_value_double_quoted_state); - } else if (data === '&') { - tokenizer.setState(attribute_value_unquoted_state); - buffer.unget(data); - } else if (data === "'") { - tokenizer.setState(attribute_value_single_quoted_state); - } else if (data === '>') { - tokenizer._parseError("expected-attribute-value-but-got-right-bracket"); - tokenizer._emitCurrentToken(); - } else if (data === '=' || data === '<' || data === '`') { - tokenizer._parseError("unexpected-character-in-unquoted-attribute-value"); - tokenizer._currentAttribute().nodeValue += data; - tokenizer.setState(attribute_value_unquoted_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentAttribute().nodeValue += "\uFFFD"; - } else { - tokenizer._currentAttribute().nodeValue += data; - tokenizer.setState(attribute_value_unquoted_state); - } - - return true; - } - - function attribute_value_double_quoted_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-attribute-value-double-quote"); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '"') { - tokenizer.setState(after_attribute_value_state); - } else if (data === '&') { - this._additionalAllowedCharacter = '"'; - tokenizer.setState(character_reference_in_attribute_value_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentAttribute().nodeValue += "\uFFFD"; - } else { - var s = buffer.matchUntil('[\0"&]'); - data = data + s; - tokenizer._currentAttribute().nodeValue += data; - } - return true; - } - - function attribute_value_single_quoted_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-attribute-value-single-quote"); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === "'") { - tokenizer.setState(after_attribute_value_state); - } else if (data === '&') { - this._additionalAllowedCharacter = "'"; - tokenizer.setState(character_reference_in_attribute_value_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentAttribute().nodeValue += "\uFFFD"; - } else { - tokenizer._currentAttribute().nodeValue += data + buffer.matchUntil("\u0000|['&]"); - } - return true; - } - - function attribute_value_unquoted_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-after-attribute-value"); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - tokenizer.setState(before_attribute_name_state); - } else if (data === '&') { - this._additionalAllowedCharacter = ">"; - tokenizer.setState(character_reference_in_attribute_value_state); - } else if (data === '>') { - tokenizer._emitCurrentToken(); - } else if (data === '"' || data === "'" || data === '=' || data === '`' || data === '<') { - tokenizer._parseError("unexpected-character-in-unquoted-attribute-value"); - tokenizer._currentAttribute().nodeValue += data; - buffer.commit(); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentAttribute().nodeValue += "\uFFFD"; - } else { - var o = buffer.matchUntil("\u0000|["+ "\t\n\v\f\x20\r" + "&<>\"'=`" +"]"); - if (o === InputStream.EOF) { - tokenizer._parseError("eof-in-attribute-value-no-quotes"); - tokenizer._emitCurrentToken(); - } - buffer.commit(); - tokenizer._currentAttribute().nodeValue += data + o; - } - return true; - } - - function character_reference_in_attribute_value_state(buffer) { - var character = EntityParser.consumeEntity(buffer, tokenizer, this._additionalAllowedCharacter); - this._currentAttribute().nodeValue += character || '&'; - if (this._additionalAllowedCharacter === '"') - tokenizer.setState(attribute_value_double_quoted_state); - else if (this._additionalAllowedCharacter === '\'') - tokenizer.setState(attribute_value_single_quoted_state); - else if (this._additionalAllowedCharacter === '>') - tokenizer.setState(attribute_value_unquoted_state); - return true; - } - - function after_attribute_value_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-after-attribute-value"); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - tokenizer.setState(before_attribute_name_state); - } else if (data === '>') { - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (data === '/') { - tokenizer.setState(self_closing_tag_state); - } else { - tokenizer._parseError("unexpected-character-after-attribute-value"); - buffer.unget(data); - tokenizer.setState(before_attribute_name_state); - } - return true; - } - - function self_closing_tag_state(buffer) { - var c = buffer.char(); - if (c === InputStream.EOF) { - tokenizer._parseError("unexpected-eof-after-solidus-in-tag"); - buffer.unget(c); - tokenizer.setState(data_state); - } else if (c === '>') { - tokenizer._currentToken.selfClosing = true; - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else { - tokenizer._parseError("unexpected-character-after-solidus-in-tag"); - buffer.unget(c); - tokenizer.setState(before_attribute_name_state); - } - return true; - } - - function bogus_comment_state(buffer) { - var data = buffer.matchUntil('>'); - data = data.replace(/\u0000/g, "\uFFFD"); - buffer.char(); - tokenizer._emitToken({type: 'Comment', data: data}); - tokenizer.setState(data_state); - return true; - } - - function markup_declaration_open_state(buffer) { - var chars = buffer.shift(2); - if (chars === '--') { - tokenizer._currentToken = {type: 'Comment', data: ''}; - tokenizer.setState(comment_start_state); - } else { - var newchars = buffer.shift(5); - if (newchars === InputStream.EOF || chars === InputStream.EOF) { - tokenizer._parseError("expected-dashes-or-doctype"); - tokenizer.setState(bogus_comment_state); - buffer.unget(chars); - return true; - } - - chars += newchars; - if (chars.toUpperCase() === 'DOCTYPE') { - tokenizer._currentToken = {type: 'Doctype', name: '', publicId: null, systemId: null, forceQuirks: false}; - tokenizer.setState(doctype_state); - } else if (tokenizer._tokenHandler.isCdataSectionAllowed() && chars === '[CDATA[') { - tokenizer.setState(cdata_section_state); - } else { - tokenizer._parseError("expected-dashes-or-doctype"); - buffer.unget(chars); - tokenizer.setState(bogus_comment_state); - } - } - return true; - } - - function cdata_section_state(buffer) { - var data = buffer.matchUntil(']]>'); - buffer.shift(3); - if (data) { - tokenizer._emitToken({type: 'Characters', data: data}); - } - tokenizer.setState(data_state); - return true; - } - - function comment_start_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-comment"); - tokenizer._emitToken(tokenizer._currentToken); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '-') { - tokenizer.setState(comment_start_dash_state); - } else if (data === '>') { - tokenizer._parseError("incorrect-comment"); - tokenizer._emitToken(tokenizer._currentToken); - tokenizer.setState(data_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentToken.data += "\uFFFD"; - } else { - tokenizer._currentToken.data += data; - tokenizer.setState(comment_state); - } - return true; - } - - function comment_start_dash_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-comment"); - tokenizer._emitToken(tokenizer._currentToken); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '-') { - tokenizer.setState(comment_end_state); - } else if (data === '>') { - tokenizer._parseError("incorrect-comment"); - tokenizer._emitToken(tokenizer._currentToken); - tokenizer.setState(data_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentToken.data += "\uFFFD"; - } else { - tokenizer._currentToken.data += '-' + data; - tokenizer.setState(comment_state); - } - return true; - } - - function comment_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-comment"); - tokenizer._emitToken(tokenizer._currentToken); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '-') { - tokenizer.setState(comment_end_dash_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentToken.data += "\uFFFD"; - } else { - tokenizer._currentToken.data += data; - buffer.commit(); - } - return true; - } - - function comment_end_dash_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-comment-end-dash"); - tokenizer._emitToken(tokenizer._currentToken); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '-') { - tokenizer.setState(comment_end_state); - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentToken.data += "-\uFFFD"; - tokenizer.setState(comment_state); - } else { - tokenizer._currentToken.data += '-' + data + buffer.matchUntil('\u0000|-'); - buffer.char(); - } - return true; - } - - function comment_end_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-comment-double-dash"); - tokenizer._emitToken(tokenizer._currentToken); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '>') { - tokenizer._emitToken(tokenizer._currentToken); - tokenizer.setState(data_state); - } else if (data === '!') { - tokenizer._parseError("unexpected-bang-after-double-dash-in-comment"); - tokenizer.setState(comment_end_bang_state); - } else if (data === '-') { - tokenizer._parseError("unexpected-dash-after-double-dash-in-comment"); - tokenizer._currentToken.data += data; - } else if (data === '\u0000') { - tokenizer._parseError("invalid-codepoint"); - tokenizer._currentToken.data += "--\uFFFD"; - tokenizer.setState(comment_state); - } else { - tokenizer._parseError("unexpected-char-in-comment"); - tokenizer._currentToken.data += '--' + data; - tokenizer.setState(comment_state); - } - return true; - } - - function comment_end_bang_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-comment-end-bang-state"); - tokenizer._emitToken(tokenizer._currentToken); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '>') { - tokenizer._emitToken(tokenizer._currentToken); - tokenizer.setState(data_state); - } else if (data === '-') { - tokenizer._currentToken.data += '--!'; - tokenizer.setState(comment_end_dash_state); - } else { - tokenizer._currentToken.data += '--!' + data; - tokenizer.setState(comment_state); - } - return true; - } - - function doctype_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("expected-doctype-name-but-got-eof"); - tokenizer._currentToken.forceQuirks = true; - buffer.unget(data); - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (isWhitespace(data)) { - tokenizer.setState(before_doctype_name_state); - } else { - tokenizer._parseError("need-space-after-doctype"); - buffer.unget(data); - tokenizer.setState(before_doctype_name_state); - } - return true; - } - - function before_doctype_name_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("expected-doctype-name-but-got-eof"); - tokenizer._currentToken.forceQuirks = true; - buffer.unget(data); - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (isWhitespace(data)) { - } else if (data === '>') { - tokenizer._parseError("expected-doctype-name-but-got-right-bracket"); - tokenizer._currentToken.forceQuirks = true; - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else { - if (isAlpha(data)) - data = data.toLowerCase(); - tokenizer._currentToken.name = data; - tokenizer.setState(doctype_name_state); - } - return true; - } - - function doctype_name_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._currentToken.forceQuirks = true; - buffer.unget(data); - tokenizer._parseError("eof-in-doctype-name"); - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (isWhitespace(data)) { - tokenizer.setState(after_doctype_name_state); - } else if (data === '>') { - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else { - if (isAlpha(data)) - data = data.toLowerCase(); - tokenizer._currentToken.name += data; - buffer.commit(); - } - return true; - } - - function after_doctype_name_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._currentToken.forceQuirks = true; - buffer.unget(data); - tokenizer._parseError("eof-in-doctype"); - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (isWhitespace(data)) { - } else if (data === '>') { - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else { - if (['p', 'P'].indexOf(data) > -1) { - var expected = [['u', 'U'], ['b', 'B'], ['l', 'L'], ['i', 'I'], ['c', 'C']]; - var matched = expected.every(function(expected){ - data = buffer.char(); - return expected.indexOf(data) > -1; - }); - if (matched) { - tokenizer.setState(after_doctype_public_keyword_state); - return true; - } - } else if (['s', 'S'].indexOf(data) > -1) { - var expected = [['y', 'Y'], ['s', 'S'], ['t', 'T'], ['e', 'E'], ['m', 'M']]; - var matched = expected.every(function(expected){ - data = buffer.char(); - return expected.indexOf(data) > -1; - }); - if (matched) { - tokenizer.setState(after_doctype_system_keyword_state); - return true; - } - } - buffer.unget(data); - tokenizer._currentToken.forceQuirks = true; - - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - buffer.unget(data); - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else { - tokenizer._parseError("expected-space-or-right-bracket-in-doctype", {data: data}); - tokenizer.setState(bogus_doctype_state); - } - } - return true; - } - - function after_doctype_public_keyword_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - buffer.unget(data); - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (isWhitespace(data)) { - tokenizer.setState(before_doctype_public_identifier_state); - } else if (data === "'" || data === '"') { - tokenizer._parseError("unexpected-char-in-doctype"); - buffer.unget(data); - tokenizer.setState(before_doctype_public_identifier_state); - } else { - buffer.unget(data); - tokenizer.setState(before_doctype_public_identifier_state); - } - return true; - } - - function before_doctype_public_identifier_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - buffer.unget(data); - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (isWhitespace(data)) { - } else if (data === '"') { - tokenizer._currentToken.publicId = ''; - tokenizer.setState(doctype_public_identifier_double_quoted_state); - } else if (data === "'") { - tokenizer._currentToken.publicId = ''; - tokenizer.setState(doctype_public_identifier_single_quoted_state); - } else if (data === '>') { - tokenizer._parseError("unexpected-end-of-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else { - tokenizer._parseError("unexpected-char-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer.setState(bogus_doctype_state); - } - return true; - } - - function doctype_public_identifier_double_quoted_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - buffer.unget(data); - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (data === '"') { - tokenizer.setState(after_doctype_public_identifier_state); - } else if (data === '>') { - tokenizer._parseError("unexpected-end-of-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else { - tokenizer._currentToken.publicId += data; - } - return true; - } - - function doctype_public_identifier_single_quoted_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - buffer.unget(data); - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (data === "'") { - tokenizer.setState(after_doctype_public_identifier_state); - } else if (data === '>') { - tokenizer._parseError("unexpected-end-of-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else { - tokenizer._currentToken.publicId += data; - } - return true; - } - - function after_doctype_public_identifier_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - tokenizer.setState(between_doctype_public_and_system_identifiers_state); - } else if (data === '>') { - tokenizer.setState(data_state); - tokenizer._emitCurrentToken(); - } else if (data === '"') { - tokenizer._parseError("unexpected-char-in-doctype"); - tokenizer._currentToken.systemId = ''; - tokenizer.setState(doctype_system_identifier_double_quoted_state); - } else if (data === "'") { - tokenizer._parseError("unexpected-char-in-doctype"); - tokenizer._currentToken.systemId = ''; - tokenizer.setState(doctype_system_identifier_single_quoted_state); - } else { - tokenizer._parseError("unexpected-char-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer.setState(bogus_doctype_state); - } - return true; - } - - function between_doctype_public_and_system_identifiers_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - } else if (data === '>') { - tokenizer._emitCurrentToken(); - tokenizer.setState(data_state); - } else if (data === '"') { - tokenizer._currentToken.systemId = ''; - tokenizer.setState(doctype_system_identifier_double_quoted_state); - } else if (data === "'") { - tokenizer._currentToken.systemId = ''; - tokenizer.setState(doctype_system_identifier_single_quoted_state); - } else { - tokenizer._parseError("unexpected-char-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer.setState(bogus_doctype_state); - } - return true; - } - - function after_doctype_system_keyword_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - tokenizer.setState(before_doctype_system_identifier_state); - } else if (data === "'" || data === '"') { - tokenizer._parseError("unexpected-char-in-doctype"); - buffer.unget(data); - tokenizer.setState(before_doctype_system_identifier_state); - } else { - buffer.unget(data); - tokenizer.setState(before_doctype_system_identifier_state); - } - return true; - } - - function before_doctype_system_identifier_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - } else if (data === '"') { - tokenizer._currentToken.systemId = ''; - tokenizer.setState(doctype_system_identifier_double_quoted_state); - } else if (data === "'") { - tokenizer._currentToken.systemId = ''; - tokenizer.setState(doctype_system_identifier_single_quoted_state); - } else if (data === '>') { - tokenizer._parseError("unexpected-end-of-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - tokenizer.setState(data_state); - } else { - tokenizer._parseError("unexpected-char-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer.setState(bogus_doctype_state); - } - return true; - } - - function doctype_system_identifier_double_quoted_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === '"') { - tokenizer.setState(after_doctype_system_identifier_state); - } else if (data === '>') { - tokenizer._parseError("unexpected-end-of-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - tokenizer.setState(data_state); - } else { - tokenizer._currentToken.systemId += data; - } - return true; - } - - function doctype_system_identifier_single_quoted_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (data === "'") { - tokenizer.setState(after_doctype_system_identifier_state); - } else if (data === '>') { - tokenizer._parseError("unexpected-end-of-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - tokenizer.setState(data_state); - } else { - tokenizer._currentToken.systemId += data; - } - return true; - } - - function after_doctype_system_identifier_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - tokenizer._parseError("eof-in-doctype"); - tokenizer._currentToken.forceQuirks = true; - tokenizer._emitCurrentToken(); - buffer.unget(data); - tokenizer.setState(data_state); - } else if (isWhitespace(data)) { - } else if (data === '>') { - tokenizer._emitCurrentToken(); - tokenizer.setState(data_state); - } else { - tokenizer._parseError("unexpected-char-in-doctype"); - tokenizer.setState(bogus_doctype_state); - } - return true; - } - - function bogus_doctype_state(buffer) { - var data = buffer.char(); - if (data === InputStream.EOF) { - buffer.unget(data); - tokenizer._emitCurrentToken(); - tokenizer.setState(data_state); - } else if (data === '>') { - tokenizer._emitCurrentToken(); - tokenizer.setState(data_state); - } - return true; - } -}; - -Object.defineProperty(Tokenizer.prototype, 'lineNumber', { - get: function() { - return this._inputStream.location().line; - } -}); - -Object.defineProperty(Tokenizer.prototype, 'columnNumber', { - get: function() { - return this._inputStream.location().column; - } -}); - -exports.Tokenizer = Tokenizer; - -}, -{"./EntityParser":2,"./InputStream":3}], -6:[function(_dereq_,module,exports){ -var assert = _dereq_('assert'); - -var messages = _dereq_('./messages.json'); -var constants = _dereq_('./constants'); - -var EventEmitter = _dereq_('events').EventEmitter; - -var Tokenizer = _dereq_('./Tokenizer').Tokenizer; -var ElementStack = _dereq_('./ElementStack').ElementStack; -var StackItem = _dereq_('./StackItem').StackItem; - -var Marker = {}; - -function isWhitespace(ch) { - return ch === " " || ch === "\n" || ch === "\t" || ch === "\r" || ch === "\f"; -} - -function isWhitespaceOrReplacementCharacter(ch) { - return isWhitespace(ch) || ch === '\uFFFD'; -} - -function isAllWhitespace(characters) { - for (var i = 0; i < characters.length; i++) { - var ch = characters[i]; - if (!isWhitespace(ch)) - return false; - } - return true; -} - -function isAllWhitespaceOrReplacementCharacters(characters) { - for (var i = 0; i < characters.length; i++) { - var ch = characters[i]; - if (!isWhitespaceOrReplacementCharacter(ch)) - return false; - } - return true; -} - -function getAttribute(node, name) { - for (var i = 0; i < node.attributes.length; i++) { - var attribute = node.attributes[i]; - if (attribute.nodeName === name) { - return attribute; - } - } - return null; -} - -function CharacterBuffer(characters) { - this.characters = characters; - this.current = 0; - this.end = this.characters.length; -} - -CharacterBuffer.prototype.skipAtMostOneLeadingNewline = function() { - if (this.characters[this.current] === '\n') - this.current++; -}; - -CharacterBuffer.prototype.skipLeadingWhitespace = function() { - while (isWhitespace(this.characters[this.current])) { - if (++this.current == this.end) - return; - } -}; - -CharacterBuffer.prototype.skipLeadingNonWhitespace = function() { - while (!isWhitespace(this.characters[this.current])) { - if (++this.current == this.end) - return; - } -}; - -CharacterBuffer.prototype.takeRemaining = function() { - return this.characters.substring(this.current); -}; - -CharacterBuffer.prototype.takeLeadingWhitespace = function() { - var start = this.current; - this.skipLeadingWhitespace(); - if (start === this.current) - return ""; - return this.characters.substring(start, this.current - start); -}; - -Object.defineProperty(CharacterBuffer.prototype, 'length', { - get: function(){ - return this.end - this.current; - } -}); -function TreeBuilder() { - this.tokenizer = null; - this.errorHandler = null; - this.scriptingEnabled = false; - this.document = null; - this.head = null; - this.form = null; - this.openElements = new ElementStack(); - this.activeFormattingElements = []; - this.insertionMode = null; - this.insertionModeName = ""; - this.originalInsertionMode = ""; - this.inQuirksMode = false; // TODO quirks mode - this.compatMode = "no quirks"; - this.framesetOk = true; - this.redirectAttachToFosterParent = false; - this.selfClosingFlagAcknowledged = false; - this.context = ""; - this.pendingTableCharacters = []; - this.shouldSkipLeadingNewline = false; - - var tree = this; - var modes = this.insertionModes = {}; - modes.base = { - end_tag_handlers: {"-default": 'endTagOther'}, - start_tag_handlers: {"-default": 'startTagOther'}, - processEOF: function() { - tree.generateImpliedEndTags(); - if (tree.openElements.length > 2) { - tree.parseError('expected-closing-tag-but-got-eof'); - } else if (tree.openElements.length == 2 && - tree.openElements.item(1).localName != 'body') { - tree.parseError('expected-closing-tag-but-got-eof'); - } else if (tree.context && tree.openElements.length > 1) { - } - }, - processComment: function(data) { - tree.insertComment(data, tree.currentStackItem().node); - }, - processDoctype: function(name, publicId, systemId, forceQuirks) { - tree.parseError('unexpected-doctype'); - }, - processStartTag: function(name, attributes, selfClosing) { - if (this[this.start_tag_handlers[name]]) { - this[this.start_tag_handlers[name]](name, attributes, selfClosing); - } else if (this[this.start_tag_handlers["-default"]]) { - this[this.start_tag_handlers["-default"]](name, attributes, selfClosing); - } else { - throw(new Error("No handler found for "+name)); - } - }, - processEndTag: function(name) { - if (this[this.end_tag_handlers[name]]) { - this[this.end_tag_handlers[name]](name); - } else if (this[this.end_tag_handlers["-default"]]) { - this[this.end_tag_handlers["-default"]](name); - } else { - throw(new Error("No handler found for "+name)); - } - }, - startTagHtml: function(name, attributes) { - modes.inBody.startTagHtml(name, attributes); - } - }; - - modes.initial = Object.create(modes.base); - - modes.initial.processEOF = function() { - tree.parseError("expected-doctype-but-got-eof"); - this.anythingElse(); - tree.insertionMode.processEOF(); - }; - - modes.initial.processComment = function(data) { - tree.insertComment(data, tree.document); - }; - - modes.initial.processDoctype = function(name, publicId, systemId, forceQuirks) { - tree.insertDoctype(name || '', publicId || '', systemId || ''); - - if (forceQuirks || name != 'html' || (publicId != null && ([ - "+//silmaril//dtd html pro v0r11 19970101//", - "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", - "-//as//dtd html 3.0 aswedit + extensions//", - "-//ietf//dtd html 2.0 level 1//", - "-//ietf//dtd html 2.0 level 2//", - "-//ietf//dtd html 2.0 strict level 1//", - "-//ietf//dtd html 2.0 strict level 2//", - "-//ietf//dtd html 2.0 strict//", - "-//ietf//dtd html 2.0//", - "-//ietf//dtd html 2.1e//", - "-//ietf//dtd html 3.0//", - "-//ietf//dtd html 3.0//", - "-//ietf//dtd html 3.2 final//", - "-//ietf//dtd html 3.2//", - "-//ietf//dtd html 3//", - "-//ietf//dtd html level 0//", - "-//ietf//dtd html level 0//", - "-//ietf//dtd html level 1//", - "-//ietf//dtd html level 1//", - "-//ietf//dtd html level 2//", - "-//ietf//dtd html level 2//", - "-//ietf//dtd html level 3//", - "-//ietf//dtd html level 3//", - "-//ietf//dtd html strict level 0//", - "-//ietf//dtd html strict level 0//", - "-//ietf//dtd html strict level 1//", - "-//ietf//dtd html strict level 1//", - "-//ietf//dtd html strict level 2//", - "-//ietf//dtd html strict level 2//", - "-//ietf//dtd html strict level 3//", - "-//ietf//dtd html strict level 3//", - "-//ietf//dtd html strict//", - "-//ietf//dtd html strict//", - "-//ietf//dtd html strict//", - "-//ietf//dtd html//", - "-//ietf//dtd html//", - "-//ietf//dtd html//", - "-//metrius//dtd metrius presentational//", - "-//microsoft//dtd internet explorer 2.0 html strict//", - "-//microsoft//dtd internet explorer 2.0 html//", - "-//microsoft//dtd internet explorer 2.0 tables//", - "-//microsoft//dtd internet explorer 3.0 html strict//", - "-//microsoft//dtd internet explorer 3.0 html//", - "-//microsoft//dtd internet explorer 3.0 tables//", - "-//netscape comm. corp.//dtd html//", - "-//netscape comm. corp.//dtd strict html//", - "-//o'reilly and associates//dtd html 2.0//", - "-//o'reilly and associates//dtd html extended 1.0//", - "-//spyglass//dtd html 2.0 extended//", - "-//sq//dtd html 2.0 hotmetal + extensions//", - "-//sun microsystems corp.//dtd hotjava html//", - "-//sun microsystems corp.//dtd hotjava strict html//", - "-//w3c//dtd html 3 1995-03-24//", - "-//w3c//dtd html 3.2 draft//", - "-//w3c//dtd html 3.2 final//", - "-//w3c//dtd html 3.2//", - "-//w3c//dtd html 3.2s draft//", - "-//w3c//dtd html 4.0 frameset//", - "-//w3c//dtd html 4.0 transitional//", - "-//w3c//dtd html experimental 19960712//", - "-//w3c//dtd html experimental 970421//", - "-//w3c//dtd w3 html//", - "-//w3o//dtd w3 html 3.0//", - "-//webtechs//dtd mozilla html 2.0//", - "-//webtechs//dtd mozilla html//", - "html" - ].some(publicIdStartsWith) - || [ - "-//w3o//dtd w3 html strict 3.0//en//", - "-/w3c/dtd html 4.0 transitional/en", - "html" - ].indexOf(publicId.toLowerCase()) > -1 - || (systemId == null && [ - "-//w3c//dtd html 4.01 transitional//", - "-//w3c//dtd html 4.01 frameset//" - ].some(publicIdStartsWith))) - ) - || (systemId != null && (systemId.toLowerCase() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd")) - ) { - tree.compatMode = "quirks"; - tree.parseError("quirky-doctype"); - } else if (publicId != null && ([ - "-//w3c//dtd xhtml 1.0 transitional//", - "-//w3c//dtd xhtml 1.0 frameset//" - ].some(publicIdStartsWith) - || (systemId != null && [ - "-//w3c//dtd html 4.01 transitional//", - "-//w3c//dtd html 4.01 frameset//" - ].indexOf(publicId.toLowerCase()) > -1)) - ) { - tree.compatMode = "limited quirks"; - tree.parseError("almost-standards-doctype"); - } else { - if ((publicId == "-//W3C//DTD HTML 4.0//EN" && (systemId == null || systemId == "http://www.w3.org/TR/REC-html40/strict.dtd")) - || (publicId == "-//W3C//DTD HTML 4.01//EN" && (systemId == null || systemId == "http://www.w3.org/TR/html4/strict.dtd")) - || (publicId == "-//W3C//DTD XHTML 1.0 Strict//EN" && (systemId == "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd")) - || (publicId == "-//W3C//DTD XHTML 1.1//EN" && (systemId == "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd")) - ) { - } else if (!((systemId == null || systemId == "about:legacy-compat") && publicId == null)) { - tree.parseError("unknown-doctype"); - } - } - tree.setInsertionMode('beforeHTML'); - function publicIdStartsWith(string) { - return publicId.toLowerCase().indexOf(string) === 0; - } - }; - - modes.initial.processCharacters = function(buffer) { - buffer.skipLeadingWhitespace(); - if (!buffer.length) - return; - tree.parseError('expected-doctype-but-got-chars'); - this.anythingElse(); - tree.insertionMode.processCharacters(buffer); - }; - - modes.initial.processStartTag = function(name, attributes, selfClosing) { - tree.parseError('expected-doctype-but-got-start-tag', {name: name}); - this.anythingElse(); - tree.insertionMode.processStartTag(name, attributes, selfClosing); - }; - - modes.initial.processEndTag = function(name) { - tree.parseError('expected-doctype-but-got-end-tag', {name: name}); - this.anythingElse(); - tree.insertionMode.processEndTag(name); - }; - - modes.initial.anythingElse = function() { - tree.compatMode = 'quirks'; - tree.setInsertionMode('beforeHTML'); - }; - - modes.beforeHTML = Object.create(modes.base); - - modes.beforeHTML.start_tag_handlers = { - html: 'startTagHtml', - '-default': 'startTagOther' - }; - - modes.beforeHTML.processEOF = function() { - this.anythingElse(); - tree.insertionMode.processEOF(); - }; - - modes.beforeHTML.processComment = function(data) { - tree.insertComment(data, tree.document); - }; - - modes.beforeHTML.processCharacters = function(buffer) { - buffer.skipLeadingWhitespace(); - if (!buffer.length) - return; - this.anythingElse(); - tree.insertionMode.processCharacters(buffer); - }; - - modes.beforeHTML.startTagHtml = function(name, attributes, selfClosing) { - tree.insertHtmlElement(attributes); - tree.setInsertionMode('beforeHead'); - }; - - modes.beforeHTML.startTagOther = function(name, attributes, selfClosing) { - this.anythingElse(); - tree.insertionMode.processStartTag(name, attributes, selfClosing); - }; - - modes.beforeHTML.processEndTag = function(name) { - this.anythingElse(); - tree.insertionMode.processEndTag(name); - }; - - modes.beforeHTML.anythingElse = function() { - tree.insertHtmlElement(); - tree.setInsertionMode('beforeHead'); - }; - - modes.afterAfterBody = Object.create(modes.base); - - modes.afterAfterBody.start_tag_handlers = { - html: 'startTagHtml', - '-default': 'startTagOther' - }; - - modes.afterAfterBody.processComment = function(data) { - tree.insertComment(data, tree.document); - }; - - modes.afterAfterBody.processDoctype = function(data) { - modes.inBody.processDoctype(data); - }; - - modes.afterAfterBody.startTagHtml = function(data, attributes) { - modes.inBody.startTagHtml(data, attributes); - }; - - modes.afterAfterBody.startTagOther = function(name, attributes, selfClosing) { - tree.parseError('unexpected-start-tag', {name: name}); - tree.setInsertionMode('inBody'); - tree.insertionMode.processStartTag(name, attributes, selfClosing); - }; - - modes.afterAfterBody.endTagOther = function(name) { - tree.parseError('unexpected-end-tag', {name: name}); - tree.setInsertionMode('inBody'); - tree.insertionMode.processEndTag(name); - }; - - modes.afterAfterBody.processCharacters = function(data) { - if (!isAllWhitespace(data.characters)) { - tree.parseError('unexpected-char-after-body'); - tree.setInsertionMode('inBody'); - return tree.insertionMode.processCharacters(data); - } - modes.inBody.processCharacters(data); - }; - - modes.afterBody = Object.create(modes.base); - - modes.afterBody.end_tag_handlers = { - html: 'endTagHtml', - '-default': 'endTagOther' - }; - - modes.afterBody.processComment = function(data) { - tree.insertComment(data, tree.openElements.rootNode); - }; - - modes.afterBody.processCharacters = function(data) { - if (!isAllWhitespace(data.characters)) { - tree.parseError('unexpected-char-after-body'); - tree.setInsertionMode('inBody'); - return tree.insertionMode.processCharacters(data); - } - modes.inBody.processCharacters(data); - }; - - modes.afterBody.processStartTag = function(name, attributes, selfClosing) { - tree.parseError('unexpected-start-tag-after-body', {name: name}); - tree.setInsertionMode('inBody'); - tree.insertionMode.processStartTag(name, attributes, selfClosing); - }; - - modes.afterBody.endTagHtml = function(name) { - if (tree.context) { - tree.parseError('end-html-in-innerhtml'); - } else { - tree.setInsertionMode('afterAfterBody'); - } - }; - - modes.afterBody.endTagOther = function(name) { - tree.parseError('unexpected-end-tag-after-body', {name: name}); - tree.setInsertionMode('inBody'); - tree.insertionMode.processEndTag(name); - }; - - modes.afterFrameset = Object.create(modes.base); - - modes.afterFrameset.start_tag_handlers = { - html: 'startTagHtml', - noframes: 'startTagNoframes', - '-default': 'startTagOther' - }; - - modes.afterFrameset.end_tag_handlers = { - html: 'endTagHtml', - '-default': 'endTagOther' - }; - - modes.afterFrameset.processCharacters = function(buffer) { - var characters = buffer.takeRemaining(); - var whitespace = ""; - for (var i = 0; i < characters.length; i++) { - var ch = characters[i]; - if (isWhitespace(ch)) - whitespace += ch; - } - if (whitespace) { - tree.insertText(whitespace); - } - if (whitespace.length < characters.length) - tree.parseError('expected-eof-but-got-char'); - }; - - modes.afterFrameset.startTagNoframes = function(name, attributes) { - modes.inHead.processStartTag(name, attributes); - }; - - modes.afterFrameset.startTagOther = function(name, attributes) { - tree.parseError("unexpected-start-tag-after-frameset", {name: name}); - }; - - modes.afterFrameset.endTagHtml = function(name) { - tree.setInsertionMode('afterAfterFrameset'); - }; - - modes.afterFrameset.endTagOther = function(name) { - tree.parseError("unexpected-end-tag-after-frameset", {name: name}); - }; - - modes.beforeHead = Object.create(modes.base); - - modes.beforeHead.start_tag_handlers = { - html: 'startTagHtml', - head: 'startTagHead', - '-default': 'startTagOther' - }; - - modes.beforeHead.end_tag_handlers = { - html: 'endTagImplyHead', - head: 'endTagImplyHead', - body: 'endTagImplyHead', - br: 'endTagImplyHead', - '-default': 'endTagOther' - }; - - modes.beforeHead.processEOF = function() { - this.startTagHead('head', []); - tree.insertionMode.processEOF(); - }; - - modes.beforeHead.processCharacters = function(buffer) { - buffer.skipLeadingWhitespace(); - if (!buffer.length) - return; - this.startTagHead('head', []); - tree.insertionMode.processCharacters(buffer); - }; - - modes.beforeHead.startTagHead = function(name, attributes) { - tree.insertHeadElement(attributes); - tree.setInsertionMode('inHead'); - }; - - modes.beforeHead.startTagOther = function(name, attributes, selfClosing) { - this.startTagHead('head', []); - tree.insertionMode.processStartTag(name, attributes, selfClosing); - }; - - modes.beforeHead.endTagImplyHead = function(name) { - this.startTagHead('head', []); - tree.insertionMode.processEndTag(name); - }; - - modes.beforeHead.endTagOther = function(name) { - tree.parseError('end-tag-after-implied-root', {name: name}); - }; - - modes.inHead = Object.create(modes.base); - - modes.inHead.start_tag_handlers = { - html: 'startTagHtml', - head: 'startTagHead', - title: 'startTagTitle', - script: 'startTagScript', - style: 'startTagNoFramesStyle', - noscript: 'startTagNoScript', - noframes: 'startTagNoFramesStyle', - base: 'startTagBaseBasefontBgsoundLink', - basefont: 'startTagBaseBasefontBgsoundLink', - bgsound: 'startTagBaseBasefontBgsoundLink', - link: 'startTagBaseBasefontBgsoundLink', - meta: 'startTagMeta', - "-default": 'startTagOther' - }; - - modes.inHead.end_tag_handlers = { - head: 'endTagHead', - html: 'endTagHtmlBodyBr', - body: 'endTagHtmlBodyBr', - br: 'endTagHtmlBodyBr', - "-default": 'endTagOther' - }; - - modes.inHead.processEOF = function() { - var name = tree.currentStackItem().localName; - if (['title', 'style', 'script'].indexOf(name) != -1) { - tree.parseError("expected-named-closing-tag-but-got-eof", {name: name}); - tree.popElement(); - } - - this.anythingElse(); - - tree.insertionMode.processEOF(); - }; - - modes.inHead.processCharacters = function(buffer) { - var leadingWhitespace = buffer.takeLeadingWhitespace(); - if (leadingWhitespace) - tree.insertText(leadingWhitespace); - if (!buffer.length) - return; - this.anythingElse(); - tree.insertionMode.processCharacters(buffer); - }; - - modes.inHead.startTagHtml = function(name, attributes) { - modes.inBody.processStartTag(name, attributes); - }; - - modes.inHead.startTagHead = function(name, attributes) { - tree.parseError('two-heads-are-not-better-than-one'); - }; - - modes.inHead.startTagTitle = function(name, attributes) { - tree.processGenericRCDATAStartTag(name, attributes); - }; - - modes.inHead.startTagNoScript = function(name, attributes) { - if (tree.scriptingEnabled) - return tree.processGenericRawTextStartTag(name, attributes); - tree.insertElement(name, attributes); - tree.setInsertionMode('inHeadNoscript'); - }; - - modes.inHead.startTagNoFramesStyle = function(name, attributes) { - tree.processGenericRawTextStartTag(name, attributes); - }; - - modes.inHead.startTagScript = function(name, attributes) { - tree.insertElement(name, attributes); - tree.tokenizer.setState(Tokenizer.SCRIPT_DATA); - tree.originalInsertionMode = tree.insertionModeName; - tree.setInsertionMode('text'); - }; - - modes.inHead.startTagBaseBasefontBgsoundLink = function(name, attributes) { - tree.insertSelfClosingElement(name, attributes); - }; - - modes.inHead.startTagMeta = function(name, attributes) { - tree.insertSelfClosingElement(name, attributes); - }; - - modes.inHead.startTagOther = function(name, attributes, selfClosing) { - this.anythingElse(); - tree.insertionMode.processStartTag(name, attributes, selfClosing); - }; - - modes.inHead.endTagHead = function(name) { - if (tree.openElements.item(tree.openElements.length - 1).localName == 'head') { - tree.openElements.pop(); - } else { - tree.parseError('unexpected-end-tag', {name: 'head'}); - } - tree.setInsertionMode('afterHead'); - }; - - modes.inHead.endTagHtmlBodyBr = function(name) { - this.anythingElse(); - tree.insertionMode.processEndTag(name); - }; - - modes.inHead.endTagOther = function(name) { - tree.parseError('unexpected-end-tag', {name: name}); - }; - - modes.inHead.anythingElse = function() { - this.endTagHead('head'); - }; - - modes.afterHead = Object.create(modes.base); - - modes.afterHead.start_tag_handlers = { - html: 'startTagHtml', - head: 'startTagHead', - body: 'startTagBody', - frameset: 'startTagFrameset', - base: 'startTagFromHead', - link: 'startTagFromHead', - meta: 'startTagFromHead', - script: 'startTagFromHead', - style: 'startTagFromHead', - title: 'startTagFromHead', - "-default": 'startTagOther' - }; - - modes.afterHead.end_tag_handlers = { - body: 'endTagBodyHtmlBr', - html: 'endTagBodyHtmlBr', - br: 'endTagBodyHtmlBr', - "-default": 'endTagOther' - }; - - modes.afterHead.processEOF = function() { - this.anythingElse(); - tree.insertionMode.processEOF(); - }; - - modes.afterHead.processCharacters = function(buffer) { - var leadingWhitespace = buffer.takeLeadingWhitespace(); - if (leadingWhitespace) - tree.insertText(leadingWhitespace); - if (!buffer.length) - return; - this.anythingElse(); - tree.insertionMode.processCharacters(buffer); - }; - - modes.afterHead.startTagHtml = function(name, attributes) { - modes.inBody.processStartTag(name, attributes); - }; - - modes.afterHead.startTagBody = function(name, attributes) { - tree.framesetOk = false; - tree.insertBodyElement(attributes); - tree.setInsertionMode('inBody'); - }; - - modes.afterHead.startTagFrameset = function(name, attributes) { - tree.insertElement(name, attributes); - tree.setInsertionMode('inFrameset'); - }; - - modes.afterHead.startTagFromHead = function(name, attributes, selfClosing) { - tree.parseError("unexpected-start-tag-out-of-my-head", {name: name}); - tree.openElements.push(tree.head); - modes.inHead.processStartTag(name, attributes, selfClosing); - tree.openElements.remove(tree.head); - }; - - modes.afterHead.startTagHead = function(name, attributes, selfClosing) { - tree.parseError('unexpected-start-tag', {name: name}); - }; - - modes.afterHead.startTagOther = function(name, attributes, selfClosing) { - this.anythingElse(); - tree.insertionMode.processStartTag(name, attributes, selfClosing); - }; - - modes.afterHead.endTagBodyHtmlBr = function(name) { - this.anythingElse(); - tree.insertionMode.processEndTag(name); - }; - - modes.afterHead.endTagOther = function(name) { - tree.parseError('unexpected-end-tag', {name: name}); - }; - - modes.afterHead.anythingElse = function() { - tree.insertBodyElement([]); - tree.setInsertionMode('inBody'); - tree.framesetOk = true; - } - - modes.inBody = Object.create(modes.base); - - modes.inBody.start_tag_handlers = { - html: 'startTagHtml', - head: 'startTagMisplaced', - base: 'startTagProcessInHead', - basefont: 'startTagProcessInHead', - bgsound: 'startTagProcessInHead', - link: 'startTagProcessInHead', - meta: 'startTagProcessInHead', - noframes: 'startTagProcessInHead', - script: 'startTagProcessInHead', - style: 'startTagProcessInHead', - title: 'startTagProcessInHead', - body: 'startTagBody', - form: 'startTagForm', - plaintext: 'startTagPlaintext', - a: 'startTagA', - button: 'startTagButton', - xmp: 'startTagXmp', - table: 'startTagTable', - hr: 'startTagHr', - image: 'startTagImage', - input: 'startTagInput', - textarea: 'startTagTextarea', - select: 'startTagSelect', - isindex: 'startTagIsindex', - applet: 'startTagAppletMarqueeObject', - marquee: 'startTagAppletMarqueeObject', - object: 'startTagAppletMarqueeObject', - li: 'startTagListItem', - dd: 'startTagListItem', - dt: 'startTagListItem', - address: 'startTagCloseP', - article: 'startTagCloseP', - aside: 'startTagCloseP', - blockquote: 'startTagCloseP', - center: 'startTagCloseP', - details: 'startTagCloseP', - dir: 'startTagCloseP', - div: 'startTagCloseP', - dl: 'startTagCloseP', - fieldset: 'startTagCloseP', - figcaption: 'startTagCloseP', - figure: 'startTagCloseP', - footer: 'startTagCloseP', - header: 'startTagCloseP', - hgroup: 'startTagCloseP', - main: 'startTagCloseP', - menu: 'startTagCloseP', - nav: 'startTagCloseP', - ol: 'startTagCloseP', - p: 'startTagCloseP', - section: 'startTagCloseP', - summary: 'startTagCloseP', - ul: 'startTagCloseP', - listing: 'startTagPreListing', - pre: 'startTagPreListing', - b: 'startTagFormatting', - big: 'startTagFormatting', - code: 'startTagFormatting', - em: 'startTagFormatting', - font: 'startTagFormatting', - i: 'startTagFormatting', - s: 'startTagFormatting', - small: 'startTagFormatting', - strike: 'startTagFormatting', - strong: 'startTagFormatting', - tt: 'startTagFormatting', - u: 'startTagFormatting', - nobr: 'startTagNobr', - area: 'startTagVoidFormatting', - br: 'startTagVoidFormatting', - embed: 'startTagVoidFormatting', - img: 'startTagVoidFormatting', - keygen: 'startTagVoidFormatting', - wbr: 'startTagVoidFormatting', - param: 'startTagParamSourceTrack', - source: 'startTagParamSourceTrack', - track: 'startTagParamSourceTrack', - iframe: 'startTagIFrame', - noembed: 'startTagRawText', - noscript: 'startTagRawText', - h1: 'startTagHeading', - h2: 'startTagHeading', - h3: 'startTagHeading', - h4: 'startTagHeading', - h5: 'startTagHeading', - h6: 'startTagHeading', - caption: 'startTagMisplaced', - col: 'startTagMisplaced', - colgroup: 'startTagMisplaced', - frame: 'startTagMisplaced', - frameset: 'startTagFrameset', - tbody: 'startTagMisplaced', - td: 'startTagMisplaced', - tfoot: 'startTagMisplaced', - th: 'startTagMisplaced', - thead: 'startTagMisplaced', - tr: 'startTagMisplaced', - option: 'startTagOptionOptgroup', - optgroup: 'startTagOptionOptgroup', - math: 'startTagMath', - svg: 'startTagSVG', - rt: 'startTagRpRt', - rp: 'startTagRpRt', - "-default": 'startTagOther' - }; - - modes.inBody.end_tag_handlers = { - p: 'endTagP', - body: 'endTagBody', - html: 'endTagHtml', - address: 'endTagBlock', - article: 'endTagBlock', - aside: 'endTagBlock', - blockquote: 'endTagBlock', - button: 'endTagBlock', - center: 'endTagBlock', - details: 'endTagBlock', - dir: 'endTagBlock', - div: 'endTagBlock', - dl: 'endTagBlock', - fieldset: 'endTagBlock', - figcaption: 'endTagBlock', - figure: 'endTagBlock', - footer: 'endTagBlock', - header: 'endTagBlock', - hgroup: 'endTagBlock', - listing: 'endTagBlock', - main: 'endTagBlock', - menu: 'endTagBlock', - nav: 'endTagBlock', - ol: 'endTagBlock', - pre: 'endTagBlock', - section: 'endTagBlock', - summary: 'endTagBlock', - ul: 'endTagBlock', - form: 'endTagForm', - applet: 'endTagAppletMarqueeObject', - marquee: 'endTagAppletMarqueeObject', - object: 'endTagAppletMarqueeObject', - dd: 'endTagListItem', - dt: 'endTagListItem', - li: 'endTagListItem', - h1: 'endTagHeading', - h2: 'endTagHeading', - h3: 'endTagHeading', - h4: 'endTagHeading', - h5: 'endTagHeading', - h6: 'endTagHeading', - a: 'endTagFormatting', - b: 'endTagFormatting', - big: 'endTagFormatting', - code: 'endTagFormatting', - em: 'endTagFormatting', - font: 'endTagFormatting', - i: 'endTagFormatting', - nobr: 'endTagFormatting', - s: 'endTagFormatting', - small: 'endTagFormatting', - strike: 'endTagFormatting', - strong: 'endTagFormatting', - tt: 'endTagFormatting', - u: 'endTagFormatting', - br: 'endTagBr', - "-default": 'endTagOther' - }; - - modes.inBody.processCharacters = function(buffer) { - if (tree.shouldSkipLeadingNewline) { - tree.shouldSkipLeadingNewline = false; - buffer.skipAtMostOneLeadingNewline(); - } - tree.reconstructActiveFormattingElements(); - var characters = buffer.takeRemaining(); - characters = characters.replace(/\u0000/g, function(match, index){ - tree.parseError("invalid-codepoint"); - return ''; - }); - if (!characters) - return; - tree.insertText(characters); - if (tree.framesetOk && !isAllWhitespaceOrReplacementCharacters(characters)) - tree.framesetOk = false; - }; - - modes.inBody.startTagHtml = function(name, attributes) { - tree.parseError('non-html-root'); - tree.addAttributesToElement(tree.openElements.rootNode, attributes); - }; - - modes.inBody.startTagProcessInHead = function(name, attributes) { - modes.inHead.processStartTag(name, attributes); - }; - - modes.inBody.startTagBody = function(name, attributes) { - tree.parseError('unexpected-start-tag', {name: 'body'}); - if (tree.openElements.length == 1 || - tree.openElements.item(1).localName != 'body') { - assert.ok(tree.context); - } else { - tree.framesetOk = false; - tree.addAttributesToElement(tree.openElements.bodyElement, attributes); - } - }; - - modes.inBody.startTagFrameset = function(name, attributes) { - tree.parseError('unexpected-start-tag', {name: 'frameset'}); - if (tree.openElements.length == 1 || - tree.openElements.item(1).localName != 'body') { - assert.ok(tree.context); - } else if (tree.framesetOk) { - tree.detachFromParent(tree.openElements.bodyElement); - while (tree.openElements.length > 1) - tree.openElements.pop(); - tree.insertElement(name, attributes); - tree.setInsertionMode('inFrameset'); - } - }; - - modes.inBody.startTagCloseP = function(name, attributes) { - if (tree.openElements.inButtonScope('p')) - this.endTagP('p'); - tree.insertElement(name, attributes); - }; - - modes.inBody.startTagPreListing = function(name, attributes) { - if (tree.openElements.inButtonScope('p')) - this.endTagP('p'); - tree.insertElement(name, attributes); - tree.framesetOk = false; - tree.shouldSkipLeadingNewline = true; - }; - - modes.inBody.startTagForm = function(name, attributes) { - if (tree.form) { - tree.parseError('unexpected-start-tag', {name: name}); - } else { - if (tree.openElements.inButtonScope('p')) - this.endTagP('p'); - tree.insertElement(name, attributes); - tree.form = tree.currentStackItem(); - } - }; - - modes.inBody.startTagRpRt = function(name, attributes) { - if (tree.openElements.inScope('ruby')) { - tree.generateImpliedEndTags(); - if (tree.currentStackItem().localName != 'ruby') { - tree.parseError('unexpected-start-tag', {name: name}); - } - } - tree.insertElement(name, attributes); - }; - - modes.inBody.startTagListItem = function(name, attributes) { - var stopNames = {li: ['li'], dd: ['dd', 'dt'], dt: ['dd', 'dt']}; - var stopName = stopNames[name]; - - var els = tree.openElements; - for (var i = els.length - 1; i >= 0; i--) { - var node = els.item(i); - if (stopName.indexOf(node.localName) != -1) { - tree.insertionMode.processEndTag(node.localName); - break; - } - if (node.isSpecial() && node.localName !== 'p' && node.localName !== 'address' && node.localName !== 'div') - break; - } - if (tree.openElements.inButtonScope('p')) - this.endTagP('p'); - tree.insertElement(name, attributes); - tree.framesetOk = false; - }; - - modes.inBody.startTagPlaintext = function(name, attributes) { - if (tree.openElements.inButtonScope('p')) - this.endTagP('p'); - tree.insertElement(name, attributes); - tree.tokenizer.setState(Tokenizer.PLAINTEXT); - }; - - modes.inBody.startTagHeading = function(name, attributes) { - if (tree.openElements.inButtonScope('p')) - this.endTagP('p'); - if (tree.currentStackItem().isNumberedHeader()) { - tree.parseError('unexpected-start-tag', {name: name}); - tree.popElement(); - } - tree.insertElement(name, attributes); - }; - - modes.inBody.startTagA = function(name, attributes) { - var activeA = tree.elementInActiveFormattingElements('a'); - if (activeA) { - tree.parseError("unexpected-start-tag-implies-end-tag", {startName: "a", endName: "a"}); - tree.adoptionAgencyEndTag('a'); - if (tree.openElements.contains(activeA)) - tree.openElements.remove(activeA); - tree.removeElementFromActiveFormattingElements(activeA); - } - tree.reconstructActiveFormattingElements(); - tree.insertFormattingElement(name, attributes); - }; - - modes.inBody.startTagFormatting = function(name, attributes) { - tree.reconstructActiveFormattingElements(); - tree.insertFormattingElement(name, attributes); - }; - - modes.inBody.startTagNobr = function(name, attributes) { - tree.reconstructActiveFormattingElements(); - if (tree.openElements.inScope('nobr')) { - tree.parseError("unexpected-start-tag-implies-end-tag", {startName: 'nobr', endName: 'nobr'}); - this.processEndTag('nobr'); - tree.reconstructActiveFormattingElements(); - } - tree.insertFormattingElement(name, attributes); - }; - - modes.inBody.startTagButton = function(name, attributes) { - if (tree.openElements.inScope('button')) { - tree.parseError('unexpected-start-tag-implies-end-tag', {startName: 'button', endName: 'button'}); - this.processEndTag('button'); - tree.insertionMode.processStartTag(name, attributes); - } else { - tree.framesetOk = false; - tree.reconstructActiveFormattingElements(); - tree.insertElement(name, attributes); - } - }; - - modes.inBody.startTagAppletMarqueeObject = function(name, attributes) { - tree.reconstructActiveFormattingElements(); - tree.insertElement(name, attributes); - tree.activeFormattingElements.push(Marker); - tree.framesetOk = false; - }; - - modes.inBody.endTagAppletMarqueeObject = function(name) { - if (!tree.openElements.inScope(name)) { - tree.parseError("unexpected-end-tag", {name: name}); - } else { - tree.generateImpliedEndTags(); - if (tree.currentStackItem().localName != name) { - tree.parseError('end-tag-too-early', {name: name}); - } - tree.openElements.popUntilPopped(name); - tree.clearActiveFormattingElements(); - } - }; - - modes.inBody.startTagXmp = function(name, attributes) { - if (tree.openElements.inButtonScope('p')) - this.processEndTag('p'); - tree.reconstructActiveFormattingElements(); - tree.processGenericRawTextStartTag(name, attributes); - tree.framesetOk = false; - }; - - modes.inBody.startTagTable = function(name, attributes) { - if (tree.compatMode !== "quirks") - if (tree.openElements.inButtonScope('p')) - this.processEndTag('p'); - tree.insertElement(name, attributes); - tree.setInsertionMode('inTable'); - tree.framesetOk = false; - }; - - modes.inBody.startTagVoidFormatting = function(name, attributes) { - tree.reconstructActiveFormattingElements(); - tree.insertSelfClosingElement(name, attributes); - tree.framesetOk = false; - }; - - modes.inBody.startTagParamSourceTrack = function(name, attributes) { - tree.insertSelfClosingElement(name, attributes); - }; - - modes.inBody.startTagHr = function(name, attributes) { - if (tree.openElements.inButtonScope('p')) - this.endTagP('p'); - tree.insertSelfClosingElement(name, attributes); - tree.framesetOk = false; - }; - - modes.inBody.startTagImage = function(name, attributes) { - tree.parseError('unexpected-start-tag-treated-as', {originalName: 'image', newName: 'img'}); - this.processStartTag('img', attributes); - }; - - modes.inBody.startTagInput = function(name, attributes) { - var currentFramesetOk = tree.framesetOk; - this.startTagVoidFormatting(name, attributes); - for (var key in attributes) { - if (attributes[key].nodeName == 'type') { - if (attributes[key].nodeValue.toLowerCase() == 'hidden') - tree.framesetOk = currentFramesetOk; - break; - } - } - }; - - modes.inBody.startTagIsindex = function(name, attributes) { - tree.parseError('deprecated-tag', {name: 'isindex'}); - tree.selfClosingFlagAcknowledged = true; - if (tree.form) - return; - var formAttributes = []; - var inputAttributes = []; - var prompt = "This is a searchable index. Enter search keywords: "; - for (var key in attributes) { - switch (attributes[key].nodeName) { - case 'action': - formAttributes.push({nodeName: 'action', - nodeValue: attributes[key].nodeValue}); - break; - case 'prompt': - prompt = attributes[key].nodeValue; - break; - case 'name': - break; - default: - inputAttributes.push({nodeName: attributes[key].nodeName, - nodeValue: attributes[key].nodeValue}); - } - } - inputAttributes.push({nodeName: 'name', nodeValue: 'isindex'}); - this.processStartTag('form', formAttributes); - this.processStartTag('hr'); - this.processStartTag('label'); - this.processCharacters(new CharacterBuffer(prompt)); - this.processStartTag('input', inputAttributes); - this.processEndTag('label'); - this.processStartTag('hr'); - this.processEndTag('form'); - }; - - modes.inBody.startTagTextarea = function(name, attributes) { - tree.insertElement(name, attributes); - tree.tokenizer.setState(Tokenizer.RCDATA); - tree.originalInsertionMode = tree.insertionModeName; - tree.shouldSkipLeadingNewline = true; - tree.framesetOk = false; - tree.setInsertionMode('text'); - }; - - modes.inBody.startTagIFrame = function(name, attributes) { - tree.framesetOk = false; - this.startTagRawText(name, attributes); - }; - - modes.inBody.startTagRawText = function(name, attributes) { - tree.processGenericRawTextStartTag(name, attributes); - }; - - modes.inBody.startTagSelect = function(name, attributes) { - tree.reconstructActiveFormattingElements(); - tree.insertElement(name, attributes); - tree.framesetOk = false; - var insertionModeName = tree.insertionModeName; - if (insertionModeName == 'inTable' || - insertionModeName == 'inCaption' || - insertionModeName == 'inColumnGroup' || - insertionModeName == 'inTableBody' || - insertionModeName == 'inRow' || - insertionModeName == 'inCell') { - tree.setInsertionMode('inSelectInTable'); - } else { - tree.setInsertionMode('inSelect'); - } - }; - - modes.inBody.startTagMisplaced = function(name, attributes) { - tree.parseError('unexpected-start-tag-ignored', {name: name}); - }; - - modes.inBody.endTagMisplaced = function(name) { - tree.parseError("unexpected-end-tag", {name: name}); - }; - - modes.inBody.endTagBr = function(name) { - tree.parseError("unexpected-end-tag-treated-as", {originalName: "br", newName: "br element"}); - tree.reconstructActiveFormattingElements(); - tree.insertElement(name, []); - tree.popElement(); - }; - - modes.inBody.startTagOptionOptgroup = function(name, attributes) { - if (tree.currentStackItem().localName == 'option') - tree.popElement(); - tree.reconstructActiveFormattingElements(); - tree.insertElement(name, attributes); - }; - - modes.inBody.startTagOther = function(name, attributes) { - tree.reconstructActiveFormattingElements(); - tree.insertElement(name, attributes); - }; - - modes.inBody.endTagOther = function(name) { - var node; - for (var i = tree.openElements.length - 1; i > 0; i--) { - node = tree.openElements.item(i); - if (node.localName == name) { - tree.generateImpliedEndTags(name); - if (tree.currentStackItem().localName != name) - tree.parseError('unexpected-end-tag', {name: name}); - tree.openElements.remove_openElements_until(function(x) {return x === node;}); - break; - } - if (node.isSpecial()) { - tree.parseError('unexpected-end-tag', {name: name}); - break; - } - } - }; - - modes.inBody.startTagMath = function(name, attributes, selfClosing) { - tree.reconstructActiveFormattingElements(); - attributes = tree.adjustMathMLAttributes(attributes); - attributes = tree.adjustForeignAttributes(attributes); - tree.insertForeignElement(name, attributes, "http://www.w3.org/1998/Math/MathML", selfClosing); - }; - - modes.inBody.startTagSVG = function(name, attributes, selfClosing) { - tree.reconstructActiveFormattingElements(); - attributes = tree.adjustSVGAttributes(attributes); - attributes = tree.adjustForeignAttributes(attributes); - tree.insertForeignElement(name, attributes, "http://www.w3.org/2000/svg", selfClosing); - }; - - modes.inBody.endTagP = function(name) { - if (!tree.openElements.inButtonScope('p')) { - tree.parseError('unexpected-end-tag', {name: 'p'}); - this.startTagCloseP('p', []); - this.endTagP('p'); - } else { - tree.generateImpliedEndTags('p'); - if (tree.currentStackItem().localName != 'p') - tree.parseError('unexpected-implied-end-tag', {name: 'p'}); - tree.openElements.popUntilPopped(name); - } - }; - - modes.inBody.endTagBody = function(name) { - if (!tree.openElements.inScope('body')) { - tree.parseError('unexpected-end-tag', {name: name}); - return; - } - if (tree.currentStackItem().localName != 'body') { - tree.parseError('expected-one-end-tag-but-got-another', { - expectedName: tree.currentStackItem().localName, - gotName: name - }); - } - tree.setInsertionMode('afterBody'); - }; - - modes.inBody.endTagHtml = function(name) { - if (!tree.openElements.inScope('body')) { - tree.parseError('unexpected-end-tag', {name: name}); - return; - } - if (tree.currentStackItem().localName != 'body') { - tree.parseError('expected-one-end-tag-but-got-another', { - expectedName: tree.currentStackItem().localName, - gotName: name - }); - } - tree.setInsertionMode('afterBody'); - tree.insertionMode.processEndTag(name); - }; - - modes.inBody.endTagBlock = function(name) { - if (!tree.openElements.inScope(name)) { - tree.parseError('unexpected-end-tag', {name: name}); - } else { - tree.generateImpliedEndTags(); - if (tree.currentStackItem().localName != name) { - tree.parseError('end-tag-too-early', {name: name}); - } - tree.openElements.popUntilPopped(name); - } - }; - - modes.inBody.endTagForm = function(name) { - var node = tree.form; - tree.form = null; - if (!node || !tree.openElements.inScope(name)) { - tree.parseError('unexpected-end-tag', {name: name}); - } else { - tree.generateImpliedEndTags(); - if (tree.currentStackItem() != node) { - tree.parseError('end-tag-too-early-ignored', {name: 'form'}); - } - tree.openElements.remove(node); - } - }; - - modes.inBody.endTagListItem = function(name) { - if (!tree.openElements.inListItemScope(name)) { - tree.parseError('unexpected-end-tag', {name: name}); - } else { - tree.generateImpliedEndTags(name); - if (tree.currentStackItem().localName != name) - tree.parseError('end-tag-too-early', {name: name}); - tree.openElements.popUntilPopped(name); - } - }; - - modes.inBody.endTagHeading = function(name) { - if (!tree.openElements.hasNumberedHeaderElementInScope()) { - tree.parseError('unexpected-end-tag', {name: name}); - return; - } - tree.generateImpliedEndTags(); - if (tree.currentStackItem().localName != name) - tree.parseError('end-tag-too-early', {name: name}); - - tree.openElements.remove_openElements_until(function(e) { - return e.isNumberedHeader(); - }); - }; - - modes.inBody.endTagFormatting = function(name, attributes) { - if (!tree.adoptionAgencyEndTag(name)) - this.endTagOther(name, attributes); - }; - - modes.inCaption = Object.create(modes.base); - - modes.inCaption.start_tag_handlers = { - html: 'startTagHtml', - caption: 'startTagTableElement', - col: 'startTagTableElement', - colgroup: 'startTagTableElement', - tbody: 'startTagTableElement', - td: 'startTagTableElement', - tfoot: 'startTagTableElement', - thead: 'startTagTableElement', - tr: 'startTagTableElement', - '-default': 'startTagOther' - }; - - modes.inCaption.end_tag_handlers = { - caption: 'endTagCaption', - table: 'endTagTable', - body: 'endTagIgnore', - col: 'endTagIgnore', - colgroup: 'endTagIgnore', - html: 'endTagIgnore', - tbody: 'endTagIgnore', - td: 'endTagIgnore', - tfood: 'endTagIgnore', - thead: 'endTagIgnore', - tr: 'endTagIgnore', - '-default': 'endTagOther' - }; - - modes.inCaption.processCharacters = function(data) { - modes.inBody.processCharacters(data); - }; - - modes.inCaption.startTagTableElement = function(name, attributes) { - tree.parseError('unexpected-end-tag', {name: name}); - var ignoreEndTag = !tree.openElements.inTableScope('caption'); - tree.insertionMode.processEndTag('caption'); - if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes); - }; - - modes.inCaption.startTagOther = function(name, attributes, selfClosing) { - modes.inBody.processStartTag(name, attributes, selfClosing); - }; - - modes.inCaption.endTagCaption = function(name) { - if (!tree.openElements.inTableScope('caption')) { - assert.ok(tree.context); - tree.parseError('unexpected-end-tag', {name: name}); - } else { - tree.generateImpliedEndTags(); - if (tree.currentStackItem().localName != 'caption') { - tree.parseError('expected-one-end-tag-but-got-another', { - gotName: "caption", - expectedName: tree.currentStackItem().localName - }); - } - tree.openElements.popUntilPopped('caption'); - tree.clearActiveFormattingElements(); - tree.setInsertionMode('inTable'); - } - }; - - modes.inCaption.endTagTable = function(name) { - tree.parseError("unexpected-end-table-in-caption"); - var ignoreEndTag = !tree.openElements.inTableScope('caption'); - tree.insertionMode.processEndTag('caption'); - if (!ignoreEndTag) tree.insertionMode.processEndTag(name); - }; - - modes.inCaption.endTagIgnore = function(name) { - tree.parseError('unexpected-end-tag', {name: name}); - }; - - modes.inCaption.endTagOther = function(name) { - modes.inBody.processEndTag(name); - }; - - modes.inCell = Object.create(modes.base); - - modes.inCell.start_tag_handlers = { - html: 'startTagHtml', - caption: 'startTagTableOther', - col: 'startTagTableOther', - colgroup: 'startTagTableOther', - tbody: 'startTagTableOther', - td: 'startTagTableOther', - tfoot: 'startTagTableOther', - th: 'startTagTableOther', - thead: 'startTagTableOther', - tr: 'startTagTableOther', - '-default': 'startTagOther' - }; - - modes.inCell.end_tag_handlers = { - td: 'endTagTableCell', - th: 'endTagTableCell', - body: 'endTagIgnore', - caption: 'endTagIgnore', - col: 'endTagIgnore', - colgroup: 'endTagIgnore', - html: 'endTagIgnore', - table: 'endTagImply', - tbody: 'endTagImply', - tfoot: 'endTagImply', - thead: 'endTagImply', - tr: 'endTagImply', - '-default': 'endTagOther' - }; - - modes.inCell.processCharacters = function(data) { - modes.inBody.processCharacters(data); - }; - - modes.inCell.startTagTableOther = function(name, attributes, selfClosing) { - if (tree.openElements.inTableScope('td') || tree.openElements.inTableScope('th')) { - this.closeCell(); - tree.insertionMode.processStartTag(name, attributes, selfClosing); - } else { - tree.parseError('unexpected-start-tag', {name: name}); - } - }; - - modes.inCell.startTagOther = function(name, attributes, selfClosing) { - modes.inBody.processStartTag(name, attributes, selfClosing); - }; - - modes.inCell.endTagTableCell = function(name) { - if (tree.openElements.inTableScope(name)) { - tree.generateImpliedEndTags(name); - if (tree.currentStackItem().localName != name.toLowerCase()) { - tree.parseError('unexpected-cell-end-tag', {name: name}); - tree.openElements.popUntilPopped(name); - } else { - tree.popElement(); - } - tree.clearActiveFormattingElements(); - tree.setInsertionMode('inRow'); - } else { - tree.parseError('unexpected-end-tag', {name: name}); - } - }; - - modes.inCell.endTagIgnore = function(name) { - tree.parseError('unexpected-end-tag', {name: name}); - }; - - modes.inCell.endTagImply = function(name) { - if (tree.openElements.inTableScope(name)) { - this.closeCell(); - tree.insertionMode.processEndTag(name); - } else { - tree.parseError('unexpected-end-tag', {name: name}); - } - }; - - modes.inCell.endTagOther = function(name) { - modes.inBody.processEndTag(name); - }; - - modes.inCell.closeCell = function() { - if (tree.openElements.inTableScope('td')) { - this.endTagTableCell('td'); - } else if (tree.openElements.inTableScope('th')) { - this.endTagTableCell('th'); - } - }; - - - modes.inColumnGroup = Object.create(modes.base); - - modes.inColumnGroup.start_tag_handlers = { - html: 'startTagHtml', - col: 'startTagCol', - '-default': 'startTagOther' - }; - - modes.inColumnGroup.end_tag_handlers = { - colgroup: 'endTagColgroup', - col: 'endTagCol', - '-default': 'endTagOther' - }; - - modes.inColumnGroup.ignoreEndTagColgroup = function() { - return tree.currentStackItem().localName == 'html'; - }; - - modes.inColumnGroup.processCharacters = function(buffer) { - var leadingWhitespace = buffer.takeLeadingWhitespace(); - if (leadingWhitespace) - tree.insertText(leadingWhitespace); - if (!buffer.length) - return; - var ignoreEndTag = this.ignoreEndTagColgroup(); - this.endTagColgroup('colgroup'); - if (!ignoreEndTag) tree.insertionMode.processCharacters(buffer); - }; - - modes.inColumnGroup.startTagCol = function(name, attributes) { - tree.insertSelfClosingElement(name, attributes); - }; - - modes.inColumnGroup.startTagOther = function(name, attributes, selfClosing) { - var ignoreEndTag = this.ignoreEndTagColgroup(); - this.endTagColgroup('colgroup'); - if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes, selfClosing); - }; - - modes.inColumnGroup.endTagColgroup = function(name) { - if (this.ignoreEndTagColgroup()) { - assert.ok(tree.context); - tree.parseError('unexpected-end-tag', {name: name}); - } else { - tree.popElement(); - tree.setInsertionMode('inTable'); - } - }; - - modes.inColumnGroup.endTagCol = function(name) { - tree.parseError("no-end-tag", {name: 'col'}); - }; - - modes.inColumnGroup.endTagOther = function(name) { - var ignoreEndTag = this.ignoreEndTagColgroup(); - this.endTagColgroup('colgroup'); - if (!ignoreEndTag) tree.insertionMode.processEndTag(name) ; - }; - - modes.inForeignContent = Object.create(modes.base); - - modes.inForeignContent.processStartTag = function(name, attributes, selfClosing) { - if (['b', 'big', 'blockquote', 'body', 'br', 'center', 'code', 'dd', 'div', 'dl', 'dt', 'em', 'embed', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'i', 'img', 'li', 'listing', 'menu', 'meta', 'nobr', 'ol', 'p', 'pre', 'ruby', 's', 'small', 'span', 'strong', 'strike', 'sub', 'sup', 'table', 'tt', 'u', 'ul', 'var'].indexOf(name) != -1 - || (name == 'font' && attributes.some(function(attr){ return ['color', 'face', 'size'].indexOf(attr.nodeName) >= 0 }))) { - tree.parseError('unexpected-html-element-in-foreign-content', {name: name}); - while (tree.currentStackItem().isForeign() - && !tree.currentStackItem().isHtmlIntegrationPoint() - && !tree.currentStackItem().isMathMLTextIntegrationPoint()) { - tree.openElements.pop(); - } - tree.insertionMode.processStartTag(name, attributes, selfClosing); - return; - } - if (tree.currentStackItem().namespaceURI == "http://www.w3.org/1998/Math/MathML") { - attributes = tree.adjustMathMLAttributes(attributes); - } - if (tree.currentStackItem().namespaceURI == "http://www.w3.org/2000/svg") { - name = tree.adjustSVGTagNameCase(name); - attributes = tree.adjustSVGAttributes(attributes); - } - attributes = tree.adjustForeignAttributes(attributes); - tree.insertForeignElement(name, attributes, tree.currentStackItem().namespaceURI, selfClosing); - }; - - modes.inForeignContent.processEndTag = function(name) { - var node = tree.currentStackItem(); - var index = tree.openElements.length - 1; - if (node.localName.toLowerCase() != name) - tree.parseError("unexpected-end-tag", {name: name}); - - while (true) { - if (index === 0) - break; - if (node.localName.toLowerCase() == name) { - while (tree.openElements.pop() != node); - break; - } - index -= 1; - node = tree.openElements.item(index); - if (node.isForeign()) { - continue; - } else { - tree.insertionMode.processEndTag(name); - break; - } - } - }; - - modes.inForeignContent.processCharacters = function(buffer) { - var characters = buffer.takeRemaining(); - characters = characters.replace(/\u0000/g, function(match, index){ - tree.parseError('invalid-codepoint'); - return '\uFFFD'; - }); - if (tree.framesetOk && !isAllWhitespaceOrReplacementCharacters(characters)) - tree.framesetOk = false; - tree.insertText(characters); - }; - - modes.inHeadNoscript = Object.create(modes.base); - - modes.inHeadNoscript.start_tag_handlers = { - html: 'startTagHtml', - basefont: 'startTagBasefontBgsoundLinkMetaNoframesStyle', - bgsound: 'startTagBasefontBgsoundLinkMetaNoframesStyle', - link: 'startTagBasefontBgsoundLinkMetaNoframesStyle', - meta: 'startTagBasefontBgsoundLinkMetaNoframesStyle', - noframes: 'startTagBasefontBgsoundLinkMetaNoframesStyle', - style: 'startTagBasefontBgsoundLinkMetaNoframesStyle', - head: 'startTagHeadNoscript', - noscript: 'startTagHeadNoscript', - "-default": 'startTagOther' - }; - - modes.inHeadNoscript.end_tag_handlers = { - noscript: 'endTagNoscript', - br: 'endTagBr', - '-default': 'endTagOther' - }; - - modes.inHeadNoscript.processCharacters = function(buffer) { - var leadingWhitespace = buffer.takeLeadingWhitespace(); - if (leadingWhitespace) - tree.insertText(leadingWhitespace); - if (!buffer.length) - return; - tree.parseError("unexpected-char-in-frameset"); - this.anythingElse(); - tree.insertionMode.processCharacters(buffer); - }; - - modes.inHeadNoscript.processComment = function(data) { - modes.inHead.processComment(data); - }; - - modes.inHeadNoscript.startTagBasefontBgsoundLinkMetaNoframesStyle = function(name, attributes) { - modes.inHead.processStartTag(name, attributes); - }; - - modes.inHeadNoscript.startTagHeadNoscript = function(name, attributes) { - tree.parseError("unexpected-start-tag-in-frameset", {name: name}); - }; - - modes.inHeadNoscript.startTagOther = function(name, attributes) { - tree.parseError("unexpected-start-tag-in-frameset", {name: name}); - this.anythingElse(); - tree.insertionMode.processStartTag(name, attributes); - }; - - modes.inHeadNoscript.endTagBr = function(name, attributes) { - tree.parseError("unexpected-end-tag-in-frameset", {name: name}); - this.anythingElse(); - tree.insertionMode.processEndTag(name, attributes); - }; - - modes.inHeadNoscript.endTagNoscript = function(name, attributes) { - tree.popElement(); - tree.setInsertionMode('inHead'); - }; - - modes.inHeadNoscript.endTagOther = function(name, attributes) { - tree.parseError("unexpected-end-tag-in-frameset", {name: name}); - }; - - modes.inHeadNoscript.anythingElse = function() { - tree.popElement(); - tree.setInsertionMode('inHead'); - }; - - - modes.inFrameset = Object.create(modes.base); - - modes.inFrameset.start_tag_handlers = { - html: 'startTagHtml', - frameset: 'startTagFrameset', - frame: 'startTagFrame', - noframes: 'startTagNoframes', - "-default": 'startTagOther' - }; - - modes.inFrameset.end_tag_handlers = { - frameset: 'endTagFrameset', - noframes: 'endTagNoframes', - '-default': 'endTagOther' - }; - - modes.inFrameset.processCharacters = function(data) { - tree.parseError("unexpected-char-in-frameset"); - }; - - modes.inFrameset.startTagFrameset = function(name, attributes) { - tree.insertElement(name, attributes); - }; - - modes.inFrameset.startTagFrame = function(name, attributes) { - tree.insertSelfClosingElement(name, attributes); - }; - - modes.inFrameset.startTagNoframes = function(name, attributes) { - modes.inBody.processStartTag(name, attributes); - }; - - modes.inFrameset.startTagOther = function(name, attributes) { - tree.parseError("unexpected-start-tag-in-frameset", {name: name}); - }; - - modes.inFrameset.endTagFrameset = function(name, attributes) { - if (tree.currentStackItem().localName == 'html') { - tree.parseError("unexpected-frameset-in-frameset-innerhtml"); - } else { - tree.popElement(); - } - - if (!tree.context && tree.currentStackItem().localName != 'frameset') { - tree.setInsertionMode('afterFrameset'); - } - }; - - modes.inFrameset.endTagNoframes = function(name) { - modes.inBody.processEndTag(name); - }; - - modes.inFrameset.endTagOther = function(name) { - tree.parseError("unexpected-end-tag-in-frameset", {name: name}); - }; - - modes.inTable = Object.create(modes.base); - - modes.inTable.start_tag_handlers = { - html: 'startTagHtml', - caption: 'startTagCaption', - colgroup: 'startTagColgroup', - col: 'startTagCol', - table: 'startTagTable', - tbody: 'startTagRowGroup', - tfoot: 'startTagRowGroup', - thead: 'startTagRowGroup', - td: 'startTagImplyTbody', - th: 'startTagImplyTbody', - tr: 'startTagImplyTbody', - style: 'startTagStyleScript', - script: 'startTagStyleScript', - input: 'startTagInput', - form: 'startTagForm', - '-default': 'startTagOther' - }; - - modes.inTable.end_tag_handlers = { - table: 'endTagTable', - body: 'endTagIgnore', - caption: 'endTagIgnore', - col: 'endTagIgnore', - colgroup: 'endTagIgnore', - html: 'endTagIgnore', - tbody: 'endTagIgnore', - td: 'endTagIgnore', - tfoot: 'endTagIgnore', - th: 'endTagIgnore', - thead: 'endTagIgnore', - tr: 'endTagIgnore', - '-default': 'endTagOther' - }; - - modes.inTable.processCharacters = function(data) { - if (tree.currentStackItem().isFosterParenting()) { - var originalInsertionMode = tree.insertionModeName; - tree.setInsertionMode('inTableText'); - tree.originalInsertionMode = originalInsertionMode; - tree.insertionMode.processCharacters(data); - } else { - tree.redirectAttachToFosterParent = true; - modes.inBody.processCharacters(data); - tree.redirectAttachToFosterParent = false; - } - }; - - modes.inTable.startTagCaption = function(name, attributes) { - tree.openElements.popUntilTableScopeMarker(); - tree.activeFormattingElements.push(Marker); - tree.insertElement(name, attributes); - tree.setInsertionMode('inCaption'); - }; - - modes.inTable.startTagColgroup = function(name, attributes) { - tree.openElements.popUntilTableScopeMarker(); - tree.insertElement(name, attributes); - tree.setInsertionMode('inColumnGroup'); - }; - - modes.inTable.startTagCol = function(name, attributes) { - this.startTagColgroup('colgroup', []); - tree.insertionMode.processStartTag(name, attributes); - }; - - modes.inTable.startTagRowGroup = function(name, attributes) { - tree.openElements.popUntilTableScopeMarker(); - tree.insertElement(name, attributes); - tree.setInsertionMode('inTableBody'); - }; - - modes.inTable.startTagImplyTbody = function(name, attributes) { - this.startTagRowGroup('tbody', []); - tree.insertionMode.processStartTag(name, attributes); - }; - - modes.inTable.startTagTable = function(name, attributes) { - tree.parseError("unexpected-start-tag-implies-end-tag", - {startName: "table", endName: "table"}); - tree.insertionMode.processEndTag('table'); - if (!tree.context) tree.insertionMode.processStartTag(name, attributes); - }; - - modes.inTable.startTagStyleScript = function(name, attributes) { - modes.inHead.processStartTag(name, attributes); - }; - - modes.inTable.startTagInput = function(name, attributes) { - for (var key in attributes) { - if (attributes[key].nodeName.toLowerCase() == 'type') { - if (attributes[key].nodeValue.toLowerCase() == 'hidden') { - tree.parseError("unexpected-hidden-input-in-table"); - tree.insertElement(name, attributes); - tree.openElements.pop(); - return; - } - break; - } - } - this.startTagOther(name, attributes); - }; - - modes.inTable.startTagForm = function(name, attributes) { - tree.parseError("unexpected-form-in-table"); - if (!tree.form) { - tree.insertElement(name, attributes); - tree.form = tree.currentStackItem(); - tree.openElements.pop(); - } - }; - - modes.inTable.startTagOther = function(name, attributes, selfClosing) { - tree.parseError("unexpected-start-tag-implies-table-voodoo", {name: name}); - tree.redirectAttachToFosterParent = true; - modes.inBody.processStartTag(name, attributes, selfClosing); - tree.redirectAttachToFosterParent = false; - }; - - modes.inTable.endTagTable = function(name) { - if (tree.openElements.inTableScope(name)) { - tree.generateImpliedEndTags(); - if (tree.currentStackItem().localName != name) { - tree.parseError("end-tag-too-early-named", {gotName: 'table', expectedName: tree.currentStackItem().localName}); - } - - tree.openElements.popUntilPopped('table'); - tree.resetInsertionMode(); - } else { - assert.ok(tree.context); - tree.parseError('unexpected-end-tag', {name: name}); - } - }; - - modes.inTable.endTagIgnore = function(name) { - tree.parseError("unexpected-end-tag", {name: name}); - }; - - modes.inTable.endTagOther = function(name) { - tree.parseError("unexpected-end-tag-implies-table-voodoo", {name: name}); - tree.redirectAttachToFosterParent = true; - modes.inBody.processEndTag(name); - tree.redirectAttachToFosterParent = false; - }; - - modes.inTableText = Object.create(modes.base); - - modes.inTableText.flushCharacters = function() { - var characters = tree.pendingTableCharacters.join(''); - if (!isAllWhitespace(characters)) { - tree.redirectAttachToFosterParent = true; - tree.reconstructActiveFormattingElements(); - tree.insertText(characters); - tree.framesetOk = false; - tree.redirectAttachToFosterParent = false; - } else { - tree.insertText(characters); - } - tree.pendingTableCharacters = []; - }; - - modes.inTableText.processComment = function(data) { - this.flushCharacters(); - tree.setInsertionMode(tree.originalInsertionMode); - tree.insertionMode.processComment(data); - }; - - modes.inTableText.processEOF = function(data) { - this.flushCharacters(); - tree.setInsertionMode(tree.originalInsertionMode); - tree.insertionMode.processEOF(); - }; - - modes.inTableText.processCharacters = function(buffer) { - var characters = buffer.takeRemaining(); - characters = characters.replace(/\u0000/g, function(match, index){ - tree.parseError("invalid-codepoint"); - return ''; - }); - if (!characters) - return; - tree.pendingTableCharacters.push(characters); - }; - - modes.inTableText.processStartTag = function(name, attributes, selfClosing) { - this.flushCharacters(); - tree.setInsertionMode(tree.originalInsertionMode); - tree.insertionMode.processStartTag(name, attributes, selfClosing); - }; - - modes.inTableText.processEndTag = function(name, attributes) { - this.flushCharacters(); - tree.setInsertionMode(tree.originalInsertionMode); - tree.insertionMode.processEndTag(name, attributes); - }; - - modes.inTableBody = Object.create(modes.base); - - modes.inTableBody.start_tag_handlers = { - html: 'startTagHtml', - tr: 'startTagTr', - td: 'startTagTableCell', - th: 'startTagTableCell', - caption: 'startTagTableOther', - col: 'startTagTableOther', - colgroup: 'startTagTableOther', - tbody: 'startTagTableOther', - tfoot: 'startTagTableOther', - thead: 'startTagTableOther', - '-default': 'startTagOther' - }; - - modes.inTableBody.end_tag_handlers = { - table: 'endTagTable', - tbody: 'endTagTableRowGroup', - tfoot: 'endTagTableRowGroup', - thead: 'endTagTableRowGroup', - body: 'endTagIgnore', - caption: 'endTagIgnore', - col: 'endTagIgnore', - colgroup: 'endTagIgnore', - html: 'endTagIgnore', - td: 'endTagIgnore', - th: 'endTagIgnore', - tr: 'endTagIgnore', - '-default': 'endTagOther' - }; - - modes.inTableBody.processCharacters = function(data) { - modes.inTable.processCharacters(data); - }; - - modes.inTableBody.startTagTr = function(name, attributes) { - tree.openElements.popUntilTableBodyScopeMarker(); - tree.insertElement(name, attributes); - tree.setInsertionMode('inRow'); - }; - - modes.inTableBody.startTagTableCell = function(name, attributes) { - tree.parseError("unexpected-cell-in-table-body", {name: name}); - this.startTagTr('tr', []); - tree.insertionMode.processStartTag(name, attributes); - }; - - modes.inTableBody.startTagTableOther = function(name, attributes) { - if (tree.openElements.inTableScope('tbody') || tree.openElements.inTableScope('thead') || tree.openElements.inTableScope('tfoot')) { - tree.openElements.popUntilTableBodyScopeMarker(); - this.endTagTableRowGroup(tree.currentStackItem().localName); - tree.insertionMode.processStartTag(name, attributes); - } else { - tree.parseError('unexpected-start-tag', {name: name}); - } - }; - - modes.inTableBody.startTagOther = function(name, attributes) { - modes.inTable.processStartTag(name, attributes); - }; - - modes.inTableBody.endTagTableRowGroup = function(name) { - if (tree.openElements.inTableScope(name)) { - tree.openElements.popUntilTableBodyScopeMarker(); - tree.popElement(); - tree.setInsertionMode('inTable'); - } else { - tree.parseError('unexpected-end-tag-in-table-body', {name: name}); - } - }; - - modes.inTableBody.endTagTable = function(name) { - if (tree.openElements.inTableScope('tbody') || tree.openElements.inTableScope('thead') || tree.openElements.inTableScope('tfoot')) { - tree.openElements.popUntilTableBodyScopeMarker(); - this.endTagTableRowGroup(tree.currentStackItem().localName); - tree.insertionMode.processEndTag(name); - } else { - tree.parseError('unexpected-end-tag', {name: name}); - } - }; - - modes.inTableBody.endTagIgnore = function(name) { - tree.parseError("unexpected-end-tag-in-table-body", {name: name}); - }; - - modes.inTableBody.endTagOther = function(name) { - modes.inTable.processEndTag(name); - }; - - modes.inSelect = Object.create(modes.base); - - modes.inSelect.start_tag_handlers = { - html: 'startTagHtml', - option: 'startTagOption', - optgroup: 'startTagOptgroup', - select: 'startTagSelect', - input: 'startTagInput', - keygen: 'startTagInput', - textarea: 'startTagInput', - script: 'startTagScript', - '-default': 'startTagOther' - }; - - modes.inSelect.end_tag_handlers = { - option: 'endTagOption', - optgroup: 'endTagOptgroup', - select: 'endTagSelect', - caption: 'endTagTableElements', - table: 'endTagTableElements', - tbody: 'endTagTableElements', - tfoot: 'endTagTableElements', - thead: 'endTagTableElements', - tr: 'endTagTableElements', - td: 'endTagTableElements', - th: 'endTagTableElements', - '-default': 'endTagOther' - }; - - modes.inSelect.processCharacters = function(buffer) { - var data = buffer.takeRemaining(); - data = data.replace(/\u0000/g, function(match, index){ - tree.parseError("invalid-codepoint"); - return ''; - }); - if (!data) - return; - tree.insertText(data); - }; - - modes.inSelect.startTagOption = function(name, attributes) { - if (tree.currentStackItem().localName == 'option') - tree.popElement(); - tree.insertElement(name, attributes); - }; - - modes.inSelect.startTagOptgroup = function(name, attributes) { - if (tree.currentStackItem().localName == 'option') - tree.popElement(); - if (tree.currentStackItem().localName == 'optgroup') - tree.popElement(); - tree.insertElement(name, attributes); - }; - - modes.inSelect.endTagOption = function(name) { - if (tree.currentStackItem().localName !== 'option') { - tree.parseError('unexpected-end-tag-in-select', {name: name}); - return; - } - tree.popElement(); - }; - - modes.inSelect.endTagOptgroup = function(name) { - if (tree.currentStackItem().localName == 'option' && tree.openElements.item(tree.openElements.length - 2).localName == 'optgroup') { - tree.popElement(); - } - if (tree.currentStackItem().localName == 'optgroup') { - tree.popElement(); - } else { - tree.parseError('unexpected-end-tag-in-select', {name: 'optgroup'}); - } - }; - - modes.inSelect.startTagSelect = function(name) { - tree.parseError("unexpected-select-in-select"); - this.endTagSelect('select'); - }; - - modes.inSelect.endTagSelect = function(name) { - if (tree.openElements.inTableScope('select')) { - tree.openElements.popUntilPopped('select'); - tree.resetInsertionMode(); - } else { - tree.parseError('unexpected-end-tag', {name: name}); - } - }; - - modes.inSelect.startTagInput = function(name, attributes) { - tree.parseError("unexpected-input-in-select"); - if (tree.openElements.inSelectScope('select')) { - this.endTagSelect('select'); - tree.insertionMode.processStartTag(name, attributes); - } - }; - - modes.inSelect.startTagScript = function(name, attributes) { - modes.inHead.processStartTag(name, attributes); - }; - - modes.inSelect.endTagTableElements = function(name) { - tree.parseError('unexpected-end-tag-in-select', {name: name}); - if (tree.openElements.inTableScope(name)) { - this.endTagSelect('select'); - tree.insertionMode.processEndTag(name); - } - }; - - modes.inSelect.startTagOther = function(name, attributes) { - tree.parseError("unexpected-start-tag-in-select", {name: name}); - }; - - modes.inSelect.endTagOther = function(name) { - tree.parseError('unexpected-end-tag-in-select', {name: name}); - }; - - modes.inSelectInTable = Object.create(modes.base); - - modes.inSelectInTable.start_tag_handlers = { - caption: 'startTagTable', - table: 'startTagTable', - tbody: 'startTagTable', - tfoot: 'startTagTable', - thead: 'startTagTable', - tr: 'startTagTable', - td: 'startTagTable', - th: 'startTagTable', - '-default': 'startTagOther' - }; - - modes.inSelectInTable.end_tag_handlers = { - caption: 'endTagTable', - table: 'endTagTable', - tbody: 'endTagTable', - tfoot: 'endTagTable', - thead: 'endTagTable', - tr: 'endTagTable', - td: 'endTagTable', - th: 'endTagTable', - '-default': 'endTagOther' - }; - - modes.inSelectInTable.processCharacters = function(data) { - modes.inSelect.processCharacters(data); - }; - - modes.inSelectInTable.startTagTable = function(name, attributes) { - tree.parseError("unexpected-table-element-start-tag-in-select-in-table", {name: name}); - this.endTagOther("select"); - tree.insertionMode.processStartTag(name, attributes); - }; - - modes.inSelectInTable.startTagOther = function(name, attributes, selfClosing) { - modes.inSelect.processStartTag(name, attributes, selfClosing); - }; - - modes.inSelectInTable.endTagTable = function(name) { - tree.parseError("unexpected-table-element-end-tag-in-select-in-table", {name: name}); - if (tree.openElements.inTableScope(name)) { - this.endTagOther("select"); - tree.insertionMode.processEndTag(name); - } - }; - - modes.inSelectInTable.endTagOther = function(name) { - modes.inSelect.processEndTag(name); - }; - - modes.inRow = Object.create(modes.base); - - modes.inRow.start_tag_handlers = { - html: 'startTagHtml', - td: 'startTagTableCell', - th: 'startTagTableCell', - caption: 'startTagTableOther', - col: 'startTagTableOther', - colgroup: 'startTagTableOther', - tbody: 'startTagTableOther', - tfoot: 'startTagTableOther', - thead: 'startTagTableOther', - tr: 'startTagTableOther', - '-default': 'startTagOther' - }; - - modes.inRow.end_tag_handlers = { - tr: 'endTagTr', - table: 'endTagTable', - tbody: 'endTagTableRowGroup', - tfoot: 'endTagTableRowGroup', - thead: 'endTagTableRowGroup', - body: 'endTagIgnore', - caption: 'endTagIgnore', - col: 'endTagIgnore', - colgroup: 'endTagIgnore', - html: 'endTagIgnore', - td: 'endTagIgnore', - th: 'endTagIgnore', - '-default': 'endTagOther' - }; - - modes.inRow.processCharacters = function(data) { - modes.inTable.processCharacters(data); - }; - - modes.inRow.startTagTableCell = function(name, attributes) { - tree.openElements.popUntilTableRowScopeMarker(); - tree.insertElement(name, attributes); - tree.setInsertionMode('inCell'); - tree.activeFormattingElements.push(Marker); - }; - - modes.inRow.startTagTableOther = function(name, attributes) { - var ignoreEndTag = this.ignoreEndTagTr(); - this.endTagTr('tr'); - if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes); - }; - - modes.inRow.startTagOther = function(name, attributes, selfClosing) { - modes.inTable.processStartTag(name, attributes, selfClosing); - }; - - modes.inRow.endTagTr = function(name) { - if (this.ignoreEndTagTr()) { - assert.ok(tree.context); - tree.parseError('unexpected-end-tag', {name: name}); - } else { - tree.openElements.popUntilTableRowScopeMarker(); - tree.popElement(); - tree.setInsertionMode('inTableBody'); - } - }; - - modes.inRow.endTagTable = function(name) { - var ignoreEndTag = this.ignoreEndTagTr(); - this.endTagTr('tr'); - if (!ignoreEndTag) tree.insertionMode.processEndTag(name); - }; - - modes.inRow.endTagTableRowGroup = function(name) { - if (tree.openElements.inTableScope(name)) { - this.endTagTr('tr'); - tree.insertionMode.processEndTag(name); - } else { - tree.parseError('unexpected-end-tag', {name: name}); - } - }; - - modes.inRow.endTagIgnore = function(name) { - tree.parseError("unexpected-end-tag-in-table-row", {name: name}); - }; - - modes.inRow.endTagOther = function(name) { - modes.inTable.processEndTag(name); - }; - - modes.inRow.ignoreEndTagTr = function() { - return !tree.openElements.inTableScope('tr'); - }; - - modes.afterAfterFrameset = Object.create(modes.base); - - modes.afterAfterFrameset.start_tag_handlers = { - html: 'startTagHtml', - noframes: 'startTagNoFrames', - '-default': 'startTagOther' - }; - - modes.afterAfterFrameset.processEOF = function() {}; - - modes.afterAfterFrameset.processComment = function(data) { - tree.insertComment(data, tree.document); - }; - - modes.afterAfterFrameset.processCharacters = function(buffer) { - var characters = buffer.takeRemaining(); - var whitespace = ""; - for (var i = 0; i < characters.length; i++) { - var ch = characters[i]; - if (isWhitespace(ch)) - whitespace += ch; - } - if (whitespace) { - tree.reconstructActiveFormattingElements(); - tree.insertText(whitespace); - } - if (whitespace.length < characters.length) - tree.parseError('expected-eof-but-got-char'); - }; - - modes.afterAfterFrameset.startTagNoFrames = function(name, attributes) { - modes.inHead.processStartTag(name, attributes); - }; - - modes.afterAfterFrameset.startTagOther = function(name, attributes, selfClosing) { - tree.parseError('expected-eof-but-got-start-tag', {name: name}); - }; - - modes.afterAfterFrameset.processEndTag = function(name, attributes) { - tree.parseError('expected-eof-but-got-end-tag', {name: name}); - }; - - modes.text = Object.create(modes.base); - - modes.text.start_tag_handlers = { - '-default': 'startTagOther' - }; - - modes.text.end_tag_handlers = { - script: 'endTagScript', - '-default': 'endTagOther' - }; - - modes.text.processCharacters = function(buffer) { - if (tree.shouldSkipLeadingNewline) { - tree.shouldSkipLeadingNewline = false; - buffer.skipAtMostOneLeadingNewline(); - } - var data = buffer.takeRemaining(); - if (!data) - return; - tree.insertText(data); - }; - - modes.text.processEOF = function() { - tree.parseError("expected-named-closing-tag-but-got-eof", - {name: tree.currentStackItem().localName}); - tree.openElements.pop(); - tree.setInsertionMode(tree.originalInsertionMode); - tree.insertionMode.processEOF(); - }; - - modes.text.startTagOther = function(name) { - throw "Tried to process start tag " + name + " in RCDATA/RAWTEXT mode"; - }; - - modes.text.endTagScript = function(name) { - var node = tree.openElements.pop(); - assert.ok(node.localName == 'script'); - tree.setInsertionMode(tree.originalInsertionMode); - }; - - modes.text.endTagOther = function(name) { - tree.openElements.pop(); - tree.setInsertionMode(tree.originalInsertionMode); - }; -} - -TreeBuilder.prototype.setInsertionMode = function(name) { - this.insertionMode = this.insertionModes[name]; - this.insertionModeName = name; -}; -TreeBuilder.prototype.adoptionAgencyEndTag = function(name) { - var outerIterationLimit = 8; - var innerIterationLimit = 3; - var formattingElement; - - function isActiveFormattingElement(el) { - return el === formattingElement; - } - - var outerLoopCounter = 0; - - while (outerLoopCounter++ < outerIterationLimit) { - formattingElement = this.elementInActiveFormattingElements(name); - - if (!formattingElement || (this.openElements.contains(formattingElement) && !this.openElements.inScope(formattingElement.localName))) { - this.parseError('adoption-agency-1.1', {name: name}); - return false; - } - if (!this.openElements.contains(formattingElement)) { - this.parseError('adoption-agency-1.2', {name: name}); - this.removeElementFromActiveFormattingElements(formattingElement); - return true; - } - if (!this.openElements.inScope(formattingElement.localName)) { - this.parseError('adoption-agency-4.4', {name: name}); - } - - if (formattingElement != this.currentStackItem()) { - this.parseError('adoption-agency-1.3', {name: name}); - } - var furthestBlock = this.openElements.furthestBlockForFormattingElement(formattingElement.node); - - if (!furthestBlock) { - this.openElements.remove_openElements_until(isActiveFormattingElement); - this.removeElementFromActiveFormattingElements(formattingElement); - return true; - } - - var afeIndex = this.openElements.elements.indexOf(formattingElement); - var commonAncestor = this.openElements.item(afeIndex - 1); - - var bookmark = this.activeFormattingElements.indexOf(formattingElement); - - var node = furthestBlock; - var lastNode = furthestBlock; - var index = this.openElements.elements.indexOf(node); - - var innerLoopCounter = 0; - while (innerLoopCounter++ < innerIterationLimit) { - index -= 1; - node = this.openElements.item(index); - if (this.activeFormattingElements.indexOf(node) < 0) { - this.openElements.elements.splice(index, 1); - continue; - } - if (node == formattingElement) - break; - - if (lastNode == furthestBlock) - bookmark = this.activeFormattingElements.indexOf(node) + 1; - - var clone = this.createElement(node.namespaceURI, node.localName, node.attributes); - var newNode = new StackItem(node.namespaceURI, node.localName, node.attributes, clone); - - this.activeFormattingElements[this.activeFormattingElements.indexOf(node)] = newNode; - this.openElements.elements[this.openElements.elements.indexOf(node)] = newNode; - - node = newNode; - this.detachFromParent(lastNode.node); - this.attachNode(lastNode.node, node.node); - lastNode = node; - } - - this.detachFromParent(lastNode.node); - if (commonAncestor.isFosterParenting()) { - this.insertIntoFosterParent(lastNode.node); - } else { - this.attachNode(lastNode.node, commonAncestor.node); - } - - var clone = this.createElement("http://www.w3.org/1999/xhtml", formattingElement.localName, formattingElement.attributes); - var formattingClone = new StackItem(formattingElement.namespaceURI, formattingElement.localName, formattingElement.attributes, clone); - - this.reparentChildren(furthestBlock.node, clone); - this.attachNode(clone, furthestBlock.node); - - this.removeElementFromActiveFormattingElements(formattingElement); - this.activeFormattingElements.splice(Math.min(bookmark, this.activeFormattingElements.length), 0, formattingClone); - - this.openElements.remove(formattingElement); - this.openElements.elements.splice(this.openElements.elements.indexOf(furthestBlock) + 1, 0, formattingClone); - } - - return true; -}; - -TreeBuilder.prototype.start = function() { - throw "Not mplemented"; -}; - -TreeBuilder.prototype.startTokenization = function(tokenizer) { - this.tokenizer = tokenizer; - this.compatMode = "no quirks"; - this.originalInsertionMode = "initial"; - this.framesetOk = true; - this.openElements = new ElementStack(); - this.activeFormattingElements = []; - this.start(); - if (this.context) { - switch(this.context) { - case 'title': - case 'textarea': - this.tokenizer.setState(Tokenizer.RCDATA); - break; - case 'style': - case 'xmp': - case 'iframe': - case 'noembed': - case 'noframes': - this.tokenizer.setState(Tokenizer.RAWTEXT); - break; - case 'script': - this.tokenizer.setState(Tokenizer.SCRIPT_DATA); - break; - case 'noscript': - if (this.scriptingEnabled) - this.tokenizer.setState(Tokenizer.RAWTEXT); - break; - case 'plaintext': - this.tokenizer.setState(Tokenizer.PLAINTEXT); - break; - } - this.insertHtmlElement(); - this.resetInsertionMode(); - } else { - this.setInsertionMode('initial'); - } -}; - -TreeBuilder.prototype.processToken = function(token) { - this.selfClosingFlagAcknowledged = false; - - var currentNode = this.openElements.top || null; - var insertionMode; - if (!currentNode || !currentNode.isForeign() || - (currentNode.isMathMLTextIntegrationPoint() && - ((token.type == 'StartTag' && - !(token.name in {mglyph:0, malignmark:0})) || - (token.type === 'Characters')) - ) || - (currentNode.namespaceURI == "http://www.w3.org/1998/Math/MathML" && - currentNode.localName == 'annotation-xml' && - token.type == 'StartTag' && token.name == 'svg' - ) || - (currentNode.isHtmlIntegrationPoint() && - token.type in {StartTag:0, Characters:0} - ) || - token.type == 'EOF' - ) { - insertionMode = this.insertionMode; - } else { - insertionMode = this.insertionModes.inForeignContent; - } - switch(token.type) { - case 'Characters': - var buffer = new CharacterBuffer(token.data); - insertionMode.processCharacters(buffer); - break; - case 'Comment': - insertionMode.processComment(token.data); - break; - case 'StartTag': - insertionMode.processStartTag(token.name, token.data, token.selfClosing); - break; - case 'EndTag': - insertionMode.processEndTag(token.name); - break; - case 'Doctype': - insertionMode.processDoctype(token.name, token.publicId, token.systemId, token.forceQuirks); - break; - case 'EOF': - insertionMode.processEOF(); - break; - } -}; -TreeBuilder.prototype.isCdataSectionAllowed = function() { - return this.openElements.length > 0 && this.currentStackItem().isForeign(); -}; -TreeBuilder.prototype.isSelfClosingFlagAcknowledged = function() { - return this.selfClosingFlagAcknowledged; -}; - -TreeBuilder.prototype.createElement = function(namespaceURI, localName, attributes) { - throw new Error("Not implemented"); -}; - -TreeBuilder.prototype.attachNode = function(child, parent) { - throw new Error("Not implemented"); -}; - -TreeBuilder.prototype.attachNodeToFosterParent = function(child, table, stackParent) { - throw new Error("Not implemented"); -}; - -TreeBuilder.prototype.detachFromParent = function(node) { - throw new Error("Not implemented"); -}; - -TreeBuilder.prototype.addAttributesToElement = function(element, attributes) { - throw new Error("Not implemented"); -}; - -TreeBuilder.prototype.insertHtmlElement = function(attributes) { - var root = this.createElement("http://www.w3.org/1999/xhtml", 'html', attributes); - this.attachNode(root, this.document); - this.openElements.pushHtmlElement(new StackItem("http://www.w3.org/1999/xhtml", 'html', attributes, root)); - return root; -}; - -TreeBuilder.prototype.insertHeadElement = function(attributes) { - var element = this.createElement("http://www.w3.org/1999/xhtml", "head", attributes); - this.head = new StackItem("http://www.w3.org/1999/xhtml", "head", attributes, element); - this.attachNode(element, this.openElements.top.node); - this.openElements.pushHeadElement(this.head); - return element; -}; - -TreeBuilder.prototype.insertBodyElement = function(attributes) { - var element = this.createElement("http://www.w3.org/1999/xhtml", "body", attributes); - this.attachNode(element, this.openElements.top.node); - this.openElements.pushBodyElement(new StackItem("http://www.w3.org/1999/xhtml", "body", attributes, element)); - return element; -}; - -TreeBuilder.prototype.insertIntoFosterParent = function(node) { - var tableIndex = this.openElements.findIndex('table'); - var tableElement = this.openElements.item(tableIndex).node; - if (tableIndex === 0) - return this.attachNode(node, tableElement); - this.attachNodeToFosterParent(node, tableElement, this.openElements.item(tableIndex - 1).node); -}; - -TreeBuilder.prototype.insertElement = function(name, attributes, namespaceURI, selfClosing) { - if (!namespaceURI) - namespaceURI = "http://www.w3.org/1999/xhtml"; - var element = this.createElement(namespaceURI, name, attributes); - if (this.shouldFosterParent()) - this.insertIntoFosterParent(element); - else - this.attachNode(element, this.openElements.top.node); - if (!selfClosing) - this.openElements.push(new StackItem(namespaceURI, name, attributes, element)); -}; - -TreeBuilder.prototype.insertFormattingElement = function(name, attributes) { - this.insertElement(name, attributes, "http://www.w3.org/1999/xhtml"); - this.appendElementToActiveFormattingElements(this.currentStackItem()); -}; - -TreeBuilder.prototype.insertSelfClosingElement = function(name, attributes) { - this.selfClosingFlagAcknowledged = true; - this.insertElement(name, attributes, "http://www.w3.org/1999/xhtml", true); -}; - -TreeBuilder.prototype.insertForeignElement = function(name, attributes, namespaceURI, selfClosing) { - if (selfClosing) - this.selfClosingFlagAcknowledged = true; - this.insertElement(name, attributes, namespaceURI, selfClosing); -}; - -TreeBuilder.prototype.insertComment = function(data, parent) { - throw new Error("Not implemented"); -}; - -TreeBuilder.prototype.insertDoctype = function(name, publicId, systemId) { - throw new Error("Not implemented"); -}; - -TreeBuilder.prototype.insertText = function(data) { - throw new Error("Not implemented"); -}; -TreeBuilder.prototype.currentStackItem = function() { - return this.openElements.top; -}; -TreeBuilder.prototype.popElement = function() { - return this.openElements.pop(); -}; -TreeBuilder.prototype.shouldFosterParent = function() { - return this.redirectAttachToFosterParent && this.currentStackItem().isFosterParenting(); -}; -TreeBuilder.prototype.generateImpliedEndTags = function(exclude) { - var name = this.openElements.top.localName; - if (['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'].indexOf(name) != -1 && name != exclude) { - this.popElement(); - this.generateImpliedEndTags(exclude); - } -}; -TreeBuilder.prototype.reconstructActiveFormattingElements = function() { - if (this.activeFormattingElements.length === 0) - return; - var i = this.activeFormattingElements.length - 1; - var entry = this.activeFormattingElements[i]; - if (entry == Marker || this.openElements.contains(entry)) - return; - - while (entry != Marker && !this.openElements.contains(entry)) { - i -= 1; - entry = this.activeFormattingElements[i]; - if (!entry) - break; - } - - while (true) { - i += 1; - entry = this.activeFormattingElements[i]; - this.insertElement(entry.localName, entry.attributes); - var element = this.currentStackItem(); - this.activeFormattingElements[i] = element; - if (element == this.activeFormattingElements[this.activeFormattingElements.length -1]) - break; - } - -}; -TreeBuilder.prototype.ensureNoahsArkCondition = function(item) { - var kNoahsArkCapacity = 3; - if (this.activeFormattingElements.length < kNoahsArkCapacity) - return; - var candidates = []; - var newItemAttributeCount = item.attributes.length; - for (var i = this.activeFormattingElements.length - 1; i >= 0; i--) { - var candidate = this.activeFormattingElements[i]; - if (candidate === Marker) - break; - if (item.localName !== candidate.localName || item.namespaceURI !== candidate.namespaceURI) - continue; - if (candidate.attributes.length != newItemAttributeCount) - continue; - candidates.push(candidate); - } - if (candidates.length < kNoahsArkCapacity) - return; - - var remainingCandidates = []; - var attributes = item.attributes; - for (var i = 0; i < attributes.length; i++) { - var attribute = attributes[i]; - - for (var j = 0; j < candidates.length; j++) { - var candidate = candidates[j]; - var candidateAttribute = getAttribute(candidate, attribute.nodeName); - if (candidateAttribute && candidateAttribute.nodeValue === attribute.nodeValue) - remainingCandidates.push(candidate); - } - if (remainingCandidates.length < kNoahsArkCapacity) - return; - candidates = remainingCandidates; - remainingCandidates = []; - } - for (var i = kNoahsArkCapacity - 1; i < candidates.length; i++) - this.removeElementFromActiveFormattingElements(candidates[i]); -}; -TreeBuilder.prototype.appendElementToActiveFormattingElements = function(item) { - this.ensureNoahsArkCondition(item); - this.activeFormattingElements.push(item); -}; -TreeBuilder.prototype.removeElementFromActiveFormattingElements = function(item) { - var index = this.activeFormattingElements.indexOf(item); - if (index >= 0) - this.activeFormattingElements.splice(index, 1); -}; - -TreeBuilder.prototype.elementInActiveFormattingElements = function(name) { - var els = this.activeFormattingElements; - for (var i = els.length - 1; i >= 0; i--) { - if (els[i] == Marker) break; - if (els[i].localName == name) return els[i]; - } - return false; -}; - -TreeBuilder.prototype.clearActiveFormattingElements = function() { - while (!(this.activeFormattingElements.length === 0 || this.activeFormattingElements.pop() == Marker)); -}; - -TreeBuilder.prototype.reparentChildren = function(oldParent, newParent) { - throw new Error("Not implemented"); -}; -TreeBuilder.prototype.setFragmentContext = function(context) { - this.context = context; -}; -TreeBuilder.prototype.parseError = function(code, args) { - if (!this.errorHandler) - return; - var message = formatMessage(messages[code], args); - this.errorHandler.error(message, this.tokenizer._inputStream.location(), code); -}; -TreeBuilder.prototype.resetInsertionMode = function() { - var last = false; - var node = null; - for (var i = this.openElements.length - 1; i >= 0; i--) { - node = this.openElements.item(i); - if (i === 0) { - assert.ok(this.context); - last = true; - node = new StackItem("http://www.w3.org/1999/xhtml", this.context, [], null); - } - - if (node.namespaceURI === "http://www.w3.org/1999/xhtml") { - if (node.localName === 'select') - return this.setInsertionMode('inSelect'); - if (node.localName === 'td' || node.localName === 'th') - return this.setInsertionMode('inCell'); - if (node.localName === 'tr') - return this.setInsertionMode('inRow'); - if (node.localName === 'tbody' || node.localName === 'thead' || node.localName === 'tfoot') - return this.setInsertionMode('inTableBody'); - if (node.localName === 'caption') - return this.setInsertionMode('inCaption'); - if (node.localName === 'colgroup') - return this.setInsertionMode('inColumnGroup'); - if (node.localName === 'table') - return this.setInsertionMode('inTable'); - if (node.localName === 'head' && !last) - return this.setInsertionMode('inHead'); - if (node.localName === 'body') - return this.setInsertionMode('inBody'); - if (node.localName === 'frameset') - return this.setInsertionMode('inFrameset'); - if (node.localName === 'html') - if (!this.openElements.headElement) - return this.setInsertionMode('beforeHead'); - else - return this.setInsertionMode('afterHead'); - } - - if (last) - return this.setInsertionMode('inBody'); - } -}; - -TreeBuilder.prototype.processGenericRCDATAStartTag = function(name, attributes) { - this.insertElement(name, attributes); - this.tokenizer.setState(Tokenizer.RCDATA); - this.originalInsertionMode = this.insertionModeName; - this.setInsertionMode('text'); -}; - -TreeBuilder.prototype.processGenericRawTextStartTag = function(name, attributes) { - this.insertElement(name, attributes); - this.tokenizer.setState(Tokenizer.RAWTEXT); - this.originalInsertionMode = this.insertionModeName; - this.setInsertionMode('text'); -}; - -TreeBuilder.prototype.adjustMathMLAttributes = function(attributes) { - attributes.forEach(function(a) { - a.namespaceURI = "http://www.w3.org/1998/Math/MathML"; - if (constants.MATHMLAttributeMap[a.nodeName]) - a.nodeName = constants.MATHMLAttributeMap[a.nodeName]; - }); - return attributes; -}; - -TreeBuilder.prototype.adjustSVGTagNameCase = function(name) { - return constants.SVGTagMap[name] || name; -}; - -TreeBuilder.prototype.adjustSVGAttributes = function(attributes) { - attributes.forEach(function(a) { - a.namespaceURI = "http://www.w3.org/2000/svg"; - if (constants.SVGAttributeMap[a.nodeName]) - a.nodeName = constants.SVGAttributeMap[a.nodeName]; - }); - return attributes; -}; - -TreeBuilder.prototype.adjustForeignAttributes = function(attributes) { - for (var i = 0; i < attributes.length; i++) { - var attribute = attributes[i]; - var adjusted = constants.ForeignAttributeMap[attribute.nodeName]; - if (adjusted) { - attribute.nodeName = adjusted.localName; - attribute.prefix = adjusted.prefix; - attribute.namespaceURI = adjusted.namespaceURI; - } - } - return attributes; -}; - -function formatMessage(format, args) { - return format.replace(new RegExp('{[0-9a-z-]+}', 'gi'), function(match) { - return args[match.slice(1, -1)] || match; - }); -} - -exports.TreeBuilder = TreeBuilder; - -}, -{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,"assert":13,"events":16}], -7:[function(_dereq_,module,exports){ -exports.SVGTagMap = { - "altglyph": "altGlyph", - "altglyphdef": "altGlyphDef", - "altglyphitem": "altGlyphItem", - "animatecolor": "animateColor", - "animatemotion": "animateMotion", - "animatetransform": "animateTransform", - "clippath": "clipPath", - "feblend": "feBlend", - "fecolormatrix": "feColorMatrix", - "fecomponenttransfer": "feComponentTransfer", - "fecomposite": "feComposite", - "feconvolvematrix": "feConvolveMatrix", - "fediffuselighting": "feDiffuseLighting", - "fedisplacementmap": "feDisplacementMap", - "fedistantlight": "feDistantLight", - "feflood": "feFlood", - "fefunca": "feFuncA", - "fefuncb": "feFuncB", - "fefuncg": "feFuncG", - "fefuncr": "feFuncR", - "fegaussianblur": "feGaussianBlur", - "feimage": "feImage", - "femerge": "feMerge", - "femergenode": "feMergeNode", - "femorphology": "feMorphology", - "feoffset": "feOffset", - "fepointlight": "fePointLight", - "fespecularlighting": "feSpecularLighting", - "fespotlight": "feSpotLight", - "fetile": "feTile", - "feturbulence": "feTurbulence", - "foreignobject": "foreignObject", - "glyphref": "glyphRef", - "lineargradient": "linearGradient", - "radialgradient": "radialGradient", - "textpath": "textPath" -}; - -exports.MATHMLAttributeMap = { - definitionurl: 'definitionURL' -}; - -exports.SVGAttributeMap = { - attributename: 'attributeName', - attributetype: 'attributeType', - basefrequency: 'baseFrequency', - baseprofile: 'baseProfile', - calcmode: 'calcMode', - clippathunits: 'clipPathUnits', - contentscripttype: 'contentScriptType', - contentstyletype: 'contentStyleType', - diffuseconstant: 'diffuseConstant', - edgemode: 'edgeMode', - externalresourcesrequired: 'externalResourcesRequired', - filterres: 'filterRes', - filterunits: 'filterUnits', - glyphref: 'glyphRef', - gradienttransform: 'gradientTransform', - gradientunits: 'gradientUnits', - kernelmatrix: 'kernelMatrix', - kernelunitlength: 'kernelUnitLength', - keypoints: 'keyPoints', - keysplines: 'keySplines', - keytimes: 'keyTimes', - lengthadjust: 'lengthAdjust', - limitingconeangle: 'limitingConeAngle', - markerheight: 'markerHeight', - markerunits: 'markerUnits', - markerwidth: 'markerWidth', - maskcontentunits: 'maskContentUnits', - maskunits: 'maskUnits', - numoctaves: 'numOctaves', - pathlength: 'pathLength', - patterncontentunits: 'patternContentUnits', - patterntransform: 'patternTransform', - patternunits: 'patternUnits', - pointsatx: 'pointsAtX', - pointsaty: 'pointsAtY', - pointsatz: 'pointsAtZ', - preservealpha: 'preserveAlpha', - preserveaspectratio: 'preserveAspectRatio', - primitiveunits: 'primitiveUnits', - refx: 'refX', - refy: 'refY', - repeatcount: 'repeatCount', - repeatdur: 'repeatDur', - requiredextensions: 'requiredExtensions', - requiredfeatures: 'requiredFeatures', - specularconstant: 'specularConstant', - specularexponent: 'specularExponent', - spreadmethod: 'spreadMethod', - startoffset: 'startOffset', - stddeviation: 'stdDeviation', - stitchtiles: 'stitchTiles', - surfacescale: 'surfaceScale', - systemlanguage: 'systemLanguage', - tablevalues: 'tableValues', - targetx: 'targetX', - targety: 'targetY', - textlength: 'textLength', - viewbox: 'viewBox', - viewtarget: 'viewTarget', - xchannelselector: 'xChannelSelector', - ychannelselector: 'yChannelSelector', - zoomandpan: 'zoomAndPan' -}; - -exports.ForeignAttributeMap = { - "xlink:actuate": {prefix: "xlink", localName: "actuate", namespaceURI: "http://www.w3.org/1999/xlink"}, - "xlink:arcrole": {prefix: "xlink", localName: "arcrole", namespaceURI: "http://www.w3.org/1999/xlink"}, - "xlink:href": {prefix: "xlink", localName: "href", namespaceURI: "http://www.w3.org/1999/xlink"}, - "xlink:role": {prefix: "xlink", localName: "role", namespaceURI: "http://www.w3.org/1999/xlink"}, - "xlink:show": {prefix: "xlink", localName: "show", namespaceURI: "http://www.w3.org/1999/xlink"}, - "xlink:title": {prefix: "xlink", localName: "title", namespaceURI: "http://www.w3.org/1999/xlink"}, - "xlink:type": {prefix: "xlink", localName: "title", namespaceURI: "http://www.w3.org/1999/xlink"}, - "xml:base": {prefix: "xml", localName: "base", namespaceURI: "http://www.w3.org/XML/1998/namespace"}, - "xml:lang": {prefix: "xml", localName: "lang", namespaceURI: "http://www.w3.org/XML/1998/namespace"}, - "xml:space": {prefix: "xml", localName: "space", namespaceURI: "http://www.w3.org/XML/1998/namespace"}, - "xmlns": {prefix: null, localName: "xmlns", namespaceURI: "http://www.w3.org/2000/xmlns/"}, - "xmlns:xlink": {prefix: "xmlns", localName: "xlink", namespaceURI: "http://www.w3.org/2000/xmlns/"}, -}; -}, -{}], -8:[function(_dereq_,module,exports){ -module.exports={ - "null-character": - "Null character in input stream, replaced with U+FFFD.", - "invalid-codepoint": - "Invalid codepoint in stream", - "incorrectly-placed-solidus": - "Solidus (/) incorrectly placed in tag.", - "incorrect-cr-newline-entity": - "Incorrect CR newline entity, replaced with LF.", - "illegal-windows-1252-entity": - "Entity used with illegal number (windows-1252 reference).", - "cant-convert-numeric-entity": - "Numeric entity couldn't be converted to character (codepoint U+{charAsInt}).", - "invalid-numeric-entity-replaced": - "Numeric entity represents an illegal codepoint. Expanded to the C1 controls range.", - "numeric-entity-without-semicolon": - "Numeric entity didn't end with ';'.", - "expected-numeric-entity-but-got-eof": - "Numeric entity expected. Got end of file instead.", - "expected-numeric-entity": - "Numeric entity expected but none found.", - "named-entity-without-semicolon": - "Named entity didn't end with ';'.", - "expected-named-entity": - "Named entity expected. Got none.", - "attributes-in-end-tag": - "End tag contains unexpected attributes.", - "self-closing-flag-on-end-tag": - "End tag contains unexpected self-closing flag.", - "bare-less-than-sign-at-eof": - "End of file after <.", - "expected-tag-name-but-got-right-bracket": - "Expected tag name. Got '>' instead.", - "expected-tag-name-but-got-question-mark": - "Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)", - "expected-tag-name": - "Expected tag name. Got something else instead.", - "expected-closing-tag-but-got-right-bracket": - "Expected closing tag. Got '>' instead. Ignoring ''.", - "expected-closing-tag-but-got-eof": - "Expected closing tag. Unexpected end of file.", - "expected-closing-tag-but-got-char": - "Expected closing tag. Unexpected character '{data}' found.", - "eof-in-tag-name": - "Unexpected end of file in the tag name.", - "expected-attribute-name-but-got-eof": - "Unexpected end of file. Expected attribute name instead.", - "eof-in-attribute-name": - "Unexpected end of file in attribute name.", - "invalid-character-in-attribute-name": - "Invalid character in attribute name.", - "duplicate-attribute": - "Dropped duplicate attribute '{name}' on tag.", - "expected-end-of-tag-but-got-eof": - "Unexpected end of file. Expected = or end of tag.", - "expected-attribute-value-but-got-eof": - "Unexpected end of file. Expected attribute value.", - "expected-attribute-value-but-got-right-bracket": - "Expected attribute value. Got '>' instead.", - "unexpected-character-in-unquoted-attribute-value": - "Unexpected character in unquoted attribute", - "invalid-character-after-attribute-name": - "Unexpected character after attribute name.", - "unexpected-character-after-attribute-value": - "Unexpected character after attribute value.", - "eof-in-attribute-value-double-quote": - "Unexpected end of file in attribute value (\").", - "eof-in-attribute-value-single-quote": - "Unexpected end of file in attribute value (').", - "eof-in-attribute-value-no-quotes": - "Unexpected end of file in attribute value.", - "eof-after-attribute-value": - "Unexpected end of file after attribute value.", - "unexpected-eof-after-solidus-in-tag": - "Unexpected end of file in tag. Expected >.", - "unexpected-character-after-solidus-in-tag": - "Unexpected character after / in tag. Expected >.", - "expected-dashes-or-doctype": - "Expected '--' or 'DOCTYPE'. Not found.", - "unexpected-bang-after-double-dash-in-comment": - "Unexpected ! after -- in comment.", - "incorrect-comment": - "Incorrect comment.", - "eof-in-comment": - "Unexpected end of file in comment.", - "eof-in-comment-end-dash": - "Unexpected end of file in comment (-).", - "unexpected-dash-after-double-dash-in-comment": - "Unexpected '-' after '--' found in comment.", - "eof-in-comment-double-dash": - "Unexpected end of file in comment (--).", - "eof-in-comment-end-bang-state": - "Unexpected end of file in comment.", - "unexpected-char-in-comment": - "Unexpected character in comment found.", - "need-space-after-doctype": - "No space after literal string 'DOCTYPE'.", - "expected-doctype-name-but-got-right-bracket": - "Unexpected > character. Expected DOCTYPE name.", - "expected-doctype-name-but-got-eof": - "Unexpected end of file. Expected DOCTYPE name.", - "eof-in-doctype-name": - "Unexpected end of file in DOCTYPE name.", - "eof-in-doctype": - "Unexpected end of file in DOCTYPE.", - "expected-space-or-right-bracket-in-doctype": - "Expected space or '>'. Got '{data}'.", - "unexpected-end-of-doctype": - "Unexpected end of DOCTYPE.", - "unexpected-char-in-doctype": - "Unexpected character in DOCTYPE.", - "eof-in-bogus-doctype": - "Unexpected end of file in bogus doctype.", - "eof-in-innerhtml": - "Unexpected EOF in inner html mode.", - "unexpected-doctype": - "Unexpected DOCTYPE. Ignored.", - "non-html-root": - "html needs to be the first start tag.", - "expected-doctype-but-got-eof": - "Unexpected End of file. Expected DOCTYPE.", - "unknown-doctype": - "Erroneous DOCTYPE. Expected .", - "quirky-doctype": - "Quirky doctype. Expected .", - "almost-standards-doctype": - "Almost standards mode doctype. Expected .", - "obsolete-doctype": - "Obsolete doctype. Expected .", - "expected-doctype-but-got-chars": - "Non-space characters found without seeing a doctype first. Expected e.g. .", - "expected-doctype-but-got-start-tag": - "Start tag seen without seeing a doctype first. Expected e.g. .", - "expected-doctype-but-got-end-tag": - "End tag seen without seeing a doctype first. Expected e.g. .", - "end-tag-after-implied-root": - "Unexpected end tag ({name}) after the (implied) root element.", - "expected-named-closing-tag-but-got-eof": - "Unexpected end of file. Expected end tag ({name}).", - "two-heads-are-not-better-than-one": - "Unexpected start tag head in existing head. Ignored.", - "unexpected-end-tag": - "Unexpected end tag ({name}). Ignored.", - "unexpected-implied-end-tag": - "End tag {name} implied, but there were open elements.", - "unexpected-start-tag-out-of-my-head": - "Unexpected start tag ({name}) that can be in head. Moved.", - "unexpected-start-tag": - "Unexpected start tag ({name}).", - "missing-end-tag": - "Missing end tag ({name}).", - "missing-end-tags": - "Missing end tags ({name}).", - "unexpected-start-tag-implies-end-tag": - "Unexpected start tag ({startName}) implies end tag ({endName}).", - "unexpected-start-tag-treated-as": - "Unexpected start tag ({originalName}). Treated as {newName}.", - "deprecated-tag": - "Unexpected start tag {name}. Don't use it!", - "unexpected-start-tag-ignored": - "Unexpected start tag {name}. Ignored.", - "expected-one-end-tag-but-got-another": - "Unexpected end tag ({gotName}). Missing end tag ({expectedName}).", - "end-tag-too-early": - "End tag ({name}) seen too early. Expected other end tag.", - "end-tag-too-early-named": - "Unexpected end tag ({gotName}). Expected end tag ({expectedName}.", - "end-tag-too-early-ignored": - "End tag ({name}) seen too early. Ignored.", - "adoption-agency-1.1": - "End tag ({name}) violates step 1, paragraph 1 of the adoption agency algorithm.", - "adoption-agency-1.2": - "End tag ({name}) violates step 1, paragraph 2 of the adoption agency algorithm.", - "adoption-agency-1.3": - "End tag ({name}) violates step 1, paragraph 3 of the adoption agency algorithm.", - "adoption-agency-4.4": - "End tag ({name}) violates step 4, paragraph 4 of the adoption agency algorithm.", - "unexpected-end-tag-treated-as": - "Unexpected end tag ({originalName}). Treated as {newName}.", - "no-end-tag": - "This element ({name}) has no end tag.", - "unexpected-implied-end-tag-in-table": - "Unexpected implied end tag ({name}) in the table phase.", - "unexpected-implied-end-tag-in-table-body": - "Unexpected implied end tag ({name}) in the table body phase.", - "unexpected-char-implies-table-voodoo": - "Unexpected non-space characters in table context caused voodoo mode.", - "unexpected-hidden-input-in-table": - "Unexpected input with type hidden in table context.", - "unexpected-form-in-table": - "Unexpected form in table context.", - "unexpected-start-tag-implies-table-voodoo": - "Unexpected start tag ({name}) in table context caused voodoo mode.", - "unexpected-end-tag-implies-table-voodoo": - "Unexpected end tag ({name}) in table context caused voodoo mode.", - "unexpected-cell-in-table-body": - "Unexpected table cell start tag ({name}) in the table body phase.", - "unexpected-cell-end-tag": - "Got table cell end tag ({name}) while required end tags are missing.", - "unexpected-end-tag-in-table-body": - "Unexpected end tag ({name}) in the table body phase. Ignored.", - "unexpected-implied-end-tag-in-table-row": - "Unexpected implied end tag ({name}) in the table row phase.", - "unexpected-end-tag-in-table-row": - "Unexpected end tag ({name}) in the table row phase. Ignored.", - "unexpected-select-in-select": - "Unexpected select start tag in the select phase treated as select end tag.", - "unexpected-input-in-select": - "Unexpected input start tag in the select phase.", - "unexpected-start-tag-in-select": - "Unexpected start tag token ({name}) in the select phase. Ignored.", - "unexpected-end-tag-in-select": - "Unexpected end tag ({name}) in the select phase. Ignored.", - "unexpected-table-element-start-tag-in-select-in-table": - "Unexpected table element start tag ({name}) in the select in table phase.", - "unexpected-table-element-end-tag-in-select-in-table": - "Unexpected table element end tag ({name}) in the select in table phase.", - "unexpected-char-after-body": - "Unexpected non-space characters in the after body phase.", - "unexpected-start-tag-after-body": - "Unexpected start tag token ({name}) in the after body phase.", - "unexpected-end-tag-after-body": - "Unexpected end tag token ({name}) in the after body phase.", - "unexpected-char-in-frameset": - "Unepxected characters in the frameset phase. Characters ignored.", - "unexpected-start-tag-in-frameset": - "Unexpected start tag token ({name}) in the frameset phase. Ignored.", - "unexpected-frameset-in-frameset-innerhtml": - "Unexpected end tag token (frameset in the frameset phase (innerHTML).", - "unexpected-end-tag-in-frameset": - "Unexpected end tag token ({name}) in the frameset phase. Ignored.", - "unexpected-char-after-frameset": - "Unexpected non-space characters in the after frameset phase. Ignored.", - "unexpected-start-tag-after-frameset": - "Unexpected start tag ({name}) in the after frameset phase. Ignored.", - "unexpected-end-tag-after-frameset": - "Unexpected end tag ({name}) in the after frameset phase. Ignored.", - "expected-eof-but-got-char": - "Unexpected non-space characters. Expected end of file.", - "expected-eof-but-got-start-tag": - "Unexpected start tag ({name}). Expected end of file.", - "expected-eof-but-got-end-tag": - "Unexpected end tag ({name}). Expected end of file.", - "unexpected-end-table-in-caption": - "Unexpected end table tag in caption. Generates implied end caption.", - "end-html-in-innerhtml": - "Unexpected html end tag in inner html mode.", - "eof-in-table": - "Unexpected end of file. Expected table content.", - "eof-in-script": - "Unexpected end of file. Expected script content.", - "non-void-element-with-trailing-solidus": - "Trailing solidus not allowed on element {name}.", - "unexpected-html-element-in-foreign-content": - "HTML start tag \"{name}\" in a foreign namespace context.", - "unexpected-start-tag-in-table": - "Unexpected {name}. Expected table content." -} -}, -{}], -9:[function(_dereq_,module,exports){ -var SAXTreeBuilder = _dereq_('./SAXTreeBuilder').SAXTreeBuilder; -var Tokenizer = _dereq_('../Tokenizer').Tokenizer; -var TreeParser = _dereq_('./TreeParser').TreeParser; - -function SAXParser() { - this.contentHandler = null; - this._errorHandler = null; - this._treeBuilder = new SAXTreeBuilder(); - this._tokenizer = new Tokenizer(this._treeBuilder); - this._scriptingEnabled = false; -} - -SAXParser.prototype.parse = function(source) { - this._tokenizer.tokenize(source); - var document = this._treeBuilder.document; - if (document) { - new TreeParser(this.contentHandler).parse(document); - } -}; - -SAXParser.prototype.parseFragment = function(source, context) { - this._treeBuilder.setFragmentContext(context); - this._tokenizer.tokenize(source); - var fragment = this._treeBuilder.getFragment(); - if (fragment) { - new TreeParser(this.contentHandler).parse(fragment); - } -}; - -Object.defineProperty(SAXParser.prototype, 'scriptingEnabled', { - get: function() { - return this._scriptingEnabled; - }, - set: function(value) { - this._scriptingEnabled = value; - this._treeBuilder.scriptingEnabled = value; - } -}); - -Object.defineProperty(SAXParser.prototype, 'errorHandler', { - get: function() { - return this._errorHandler; - }, - set: function(value) { - this._errorHandler = value; - this._treeBuilder.errorHandler = value; - } -}); - -exports.SAXParser = SAXParser; - -}, -{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}], -10:[function(_dereq_,module,exports){ -var util = _dereq_('util'); -var TreeBuilder = _dereq_('../TreeBuilder').TreeBuilder; - -function SAXTreeBuilder() { - TreeBuilder.call(this); -} - -util.inherits(SAXTreeBuilder, TreeBuilder); - -SAXTreeBuilder.prototype.start = function(tokenizer) { - this.document = new Document(this.tokenizer); -}; - -SAXTreeBuilder.prototype.end = function() { - this.document.endLocator = this.tokenizer; -}; - -SAXTreeBuilder.prototype.insertDoctype = function(name, publicId, systemId) { - var doctype = new DTD(this.tokenizer, name, publicId, systemId); - doctype.endLocator = this.tokenizer; - this.document.appendChild(doctype); -}; - -SAXTreeBuilder.prototype.createElement = function(namespaceURI, localName, attributes) { - var element = new Element(this.tokenizer, namespaceURI, localName, localName, attributes || []); - return element; -}; - -SAXTreeBuilder.prototype.insertComment = function(data, parent) { - if (!parent) - parent = this.currentStackItem(); - var comment = new Comment(this.tokenizer, data); - parent.appendChild(comment); -}; - -SAXTreeBuilder.prototype.appendCharacters = function(parent, data) { - var text = new Characters(this.tokenizer, data); - parent.appendChild(text); -}; - -SAXTreeBuilder.prototype.insertText = function(data) { - if (this.redirectAttachToFosterParent && this.openElements.top.isFosterParenting()) { - var tableIndex = this.openElements.findIndex('table'); - var tableItem = this.openElements.item(tableIndex); - var table = tableItem.node; - if (tableIndex === 0) { - return this.appendCharacters(table, data); - } - var text = new Characters(this.tokenizer, data); - var parent = table.parentNode; - if (parent) { - parent.insertBetween(text, table.previousSibling, table); - return; - } - var stackParent = this.openElements.item(tableIndex - 1).node; - stackParent.appendChild(text); - return; - } - this.appendCharacters(this.currentStackItem().node, data); -}; - -SAXTreeBuilder.prototype.attachNode = function(node, parent) { - parent.appendChild(node); -}; - -SAXTreeBuilder.prototype.attachNodeToFosterParent = function(child, table, stackParent) { - var parent = table.parentNode; - if (parent) - parent.insertBetween(child, table.previousSibling, table); - else - stackParent.appendChild(child); -}; - -SAXTreeBuilder.prototype.detachFromParent = function(element) { - element.detach(); -}; - -SAXTreeBuilder.prototype.reparentChildren = function(oldParent, newParent) { - newParent.appendChildren(oldParent.firstChild); -}; - -SAXTreeBuilder.prototype.getFragment = function() { - var fragment = new DocumentFragment(); - this.reparentChildren(this.openElements.rootNode, fragment); - return fragment; -}; - -function getAttribute(node, name) { - for (var i = 0; i < node.attributes.length; i++) { - var attribute = node.attributes[i]; - if (attribute.nodeName === name) - return attribute.nodeValue; - } -} - -SAXTreeBuilder.prototype.addAttributesToElement = function(element, attributes) { - for (var i = 0; i < attributes.length; i++) { - var attribute = attributes[i]; - if (!getAttribute(element, attribute.nodeName)) - element.attributes.push(attribute); - } -}; - -var NodeType = { - CDATA: 1, - CHARACTERS: 2, - COMMENT: 3, - DOCUMENT: 4, - DOCUMENT_FRAGMENT: 5, - DTD: 6, - ELEMENT: 7, - ENTITY: 8, - IGNORABLE_WHITESPACE: 9, - PROCESSING_INSTRUCTION: 10, - SKIPPED_ENTITY: 11 -}; -function Node(locator) { - if (!locator) { - this.columnNumber = -1; - this.lineNumber = -1; - } else { - this.columnNumber = locator.columnNumber; - this.lineNumber = locator.lineNumber; - } - this.parentNode = null; - this.nextSibling = null; - this.firstChild = null; -} -Node.prototype.visit = function(treeParser) { - throw new Error("Not Implemented"); -}; -Node.prototype.revisit = function(treeParser) { - return; -}; -Node.prototype.detach = function() { - if (this.parentNode !== null) { - this.parentNode.removeChild(this); - this.parentNode = null; - } -}; - -Object.defineProperty(Node.prototype, 'previousSibling', { - get: function() { - var prev = null; - var next = this.parentNode.firstChild; - for(;;) { - if (this == next) { - return prev; - } - prev = next; - next = next.nextSibling; - } - } -}); - - -function ParentNode(locator) { - Node.call(this, locator); - this.lastChild = null; - this._endLocator = null; -} - -ParentNode.prototype = Object.create(Node.prototype); -ParentNode.prototype.insertBefore = function(child, sibling) { - if (!sibling) { - return this.appendChild(child); - } - child.detach(); - child.parentNode = this; - if (this.firstChild == sibling) { - child.nextSibling = sibling; - this.firstChild = child; - } else { - var prev = this.firstChild; - var next = this.firstChild.nextSibling; - while (next != sibling) { - prev = next; - next = next.nextSibling; - } - prev.nextSibling = child; - child.nextSibling = next; - } - return child; -}; - -ParentNode.prototype.insertBetween = function(child, prev, next) { - if (!next) { - return this.appendChild(child); - } - child.detach(); - child.parentNode = this; - child.nextSibling = next; - if (!prev) { - firstChild = child; - } else { - prev.nextSibling = child; - } - return child; -}; -ParentNode.prototype.appendChild = function(child) { - child.detach(); - child.parentNode = this; - if (!this.firstChild) { - this.firstChild = child; - } else { - this.lastChild.nextSibling = child; - } - this.lastChild = child; - return child; -}; -ParentNode.prototype.appendChildren = function(parent) { - var child = parent.firstChild; - if (!child) { - return; - } - var another = parent; - if (!this.firstChild) { - this.firstChild = child; - } else { - this.lastChild.nextSibling = child; - } - this.lastChild = another.lastChild; - do { - child.parentNode = this; - } while ((child = child.nextSibling)); - another.firstChild = null; - another.lastChild = null; -}; -ParentNode.prototype.removeChild = function(node) { - if (this.firstChild == node) { - this.firstChild = node.nextSibling; - if (this.lastChild == node) { - this.lastChild = null; - } - } else { - var prev = this.firstChild; - var next = this.firstChild.nextSibling; - while (next != node) { - prev = next; - next = next.nextSibling; - } - prev.nextSibling = node.nextSibling; - if (this.lastChild == node) { - this.lastChild = prev; - } - } - node.parentNode = null; - return node; -}; - -Object.defineProperty(ParentNode.prototype, 'endLocator', { - get: function() { - return this._endLocator; - }, - set: function(endLocator) { - this._endLocator = { - lineNumber: endLocator.lineNumber, - columnNumber: endLocator.columnNumber - }; - } -}); -function Document (locator) { - ParentNode.call(this, locator); - this.nodeType = NodeType.DOCUMENT; -} - -Document.prototype = Object.create(ParentNode.prototype); -Document.prototype.visit = function(treeParser) { - treeParser.startDocument(this); -}; -Document.prototype.revisit = function(treeParser) { - treeParser.endDocument(this.endLocator); -}; -function DocumentFragment() { - ParentNode.call(this, new Locator()); - this.nodeType = NodeType.DOCUMENT_FRAGMENT; -} - -DocumentFragment.prototype = Object.create(ParentNode.prototype); -DocumentFragment.prototype.visit = function(treeParser) { -}; -function Element(locator, uri, localName, qName, atts, prefixMappings) { - ParentNode.call(this, locator); - this.uri = uri; - this.localName = localName; - this.qName = qName; - this.attributes = atts; - this.prefixMappings = prefixMappings; - this.nodeType = NodeType.ELEMENT; -} - -Element.prototype = Object.create(ParentNode.prototype); -Element.prototype.visit = function(treeParser) { - if (this.prefixMappings) { - for (var key in prefixMappings) { - var mapping = prefixMappings[key]; - treeParser.startPrefixMapping(mapping.getPrefix(), - mapping.getUri(), this); - } - } - treeParser.startElement(this.uri, this.localName, this.qName, this.attributes, this); -}; -Element.prototype.revisit = function(treeParser) { - treeParser.endElement(this.uri, this.localName, this.qName, this.endLocator); - if (this.prefixMappings) { - for (var key in prefixMappings) { - var mapping = prefixMappings[key]; - treeParser.endPrefixMapping(mapping.getPrefix(), this.endLocator); - } - } -}; -function Characters(locator, data){ - Node.call(this, locator); - this.data = data; - this.nodeType = NodeType.CHARACTERS; -} - -Characters.prototype = Object.create(Node.prototype); -Characters.prototype.visit = function (treeParser) { - treeParser.characters(this.data, 0, this.data.length, this); -}; -function IgnorableWhitespace(locator, data) { - Node.call(this, locator); - this.data = data; - this.nodeType = NodeType.IGNORABLE_WHITESPACE; -} - -IgnorableWhitespace.prototype = Object.create(Node.prototype); -IgnorableWhitespace.prototype.visit = function(treeParser) { - treeParser.ignorableWhitespace(this.data, 0, this.data.length, this); -}; -function Comment(locator, data) { - Node.call(this, locator); - this.data = data; - this.nodeType = NodeType.COMMENT; -} - -Comment.prototype = Object.create(Node.prototype); -Comment.prototype.visit = function(treeParser) { - treeParser.comment(this.data, 0, this.data.length, this); -}; -function CDATA(locator) { - ParentNode.call(this, locator); - this.nodeType = NodeType.CDATA; -} - -CDATA.prototype = Object.create(ParentNode.prototype); -CDATA.prototype.visit = function(treeParser) { - treeParser.startCDATA(this); -}; -CDATA.prototype.revisit = function(treeParser) { - treeParser.endCDATA(this.endLocator); -}; -function Entity(name) { - ParentNode.call(this); - this.name = name; - this.nodeType = NodeType.ENTITY; -} - -Entity.prototype = Object.create(ParentNode.prototype); -Entity.prototype.visit = function(treeParser) { - treeParser.startEntity(this.name, this); -}; -Entity.prototype.revisit = function(treeParser) { - treeParser.endEntity(this.name); -}; - -function SkippedEntity(name) { - Node.call(this); - this.name = name; - this.nodeType = NodeType.SKIPPED_ENTITY; -} - -SkippedEntity.prototype = Object.create(Node.prototype); -SkippedEntity.prototype.visit = function(treeParser) { - treeParser.skippedEntity(this.name, this); -}; -function ProcessingInstruction(target, data) { - Node.call(this); - this.target = target; - this.data = data; -} - -ProcessingInstruction.prototype = Object.create(Node.prototype); -ProcessingInstruction.prototype.visit = function(treeParser) { - treeParser.processingInstruction(this.target, this.data, this); -}; -ProcessingInstruction.prototype.getNodeType = function() { - return NodeType.PROCESSING_INSTRUCTION; -}; -function DTD(name, publicIdentifier, systemIdentifier) { - ParentNode.call(this); - this.name = name; - this.publicIdentifier = publicIdentifier; - this.systemIdentifier = systemIdentifier; - this.nodeType = NodeType.DTD; -} - -DTD.prototype = Object.create(ParentNode.prototype); -DTD.prototype.visit = function(treeParser) { - treeParser.startDTD(this.name, this.publicIdentifier, this.systemIdentifier, this); -}; -DTD.prototype.revisit = function(treeParser) { - treeParser.endDTD(); -}; - -exports.SAXTreeBuilder = SAXTreeBuilder; - -}, -{"../TreeBuilder":6,"util":20}], -11:[function(_dereq_,module,exports){ -function TreeParser(contentHandler, lexicalHandler){ - this.contentHandler; - this.lexicalHandler; - this.locatorDelegate; - - if (!contentHandler) { - throw new IllegalArgumentException("contentHandler was null."); - } - this.contentHandler = contentHandler; - if (!lexicalHandler) { - this.lexicalHandler = new NullLexicalHandler(); - } else { - this.lexicalHandler = lexicalHandler; - } -} -TreeParser.prototype.parse = function(node) { - this.contentHandler.documentLocator = this; - var current = node; - var next; - for (;;) { - current.visit(this); - if (next = current.firstChild) { - current = next; - continue; - } - for (;;) { - current.revisit(this); - if (current == node) { - return; - } - if (next = current.nextSibling) { - current = next; - break; - } - current = current.parentNode; - } - } -}; -TreeParser.prototype.characters = function(ch, start, length, locator) { - this.locatorDelegate = locator; - this.contentHandler.characters(ch, start, length); -}; -TreeParser.prototype.endDocument = function(locator) { - this.locatorDelegate = locator; - this.contentHandler.endDocument(); -}; -TreeParser.prototype.endElement = function(uri, localName, qName, locator) { - this.locatorDelegate = locator; - this.contentHandler.endElement(uri, localName, qName); -}; -TreeParser.prototype.endPrefixMapping = function(prefix, locator) { - this.locatorDelegate = locator; - this.contentHandler.endPrefixMapping(prefix); -}; -TreeParser.prototype.ignorableWhitespace = function(ch, start, length, locator) { - this.locatorDelegate = locator; - this.contentHandler.ignorableWhitespace(ch, start, length); -}; -TreeParser.prototype.processingInstruction = function(target, data, locator) { - this.locatorDelegate = locator; - this.contentHandler.processingInstruction(target, data); -}; -TreeParser.prototype.skippedEntity = function(name, locator) { - this.locatorDelegate = locator; - this.contentHandler.skippedEntity(name); -}; -TreeParser.prototype.startDocument = function(locator) { - this.locatorDelegate = locator; - this.contentHandler.startDocument(); -}; -TreeParser.prototype.startElement = function(uri, localName, qName, atts, locator) { - this.locatorDelegate = locator; - this.contentHandler.startElement(uri, localName, qName, atts); -}; -TreeParser.prototype.startPrefixMapping = function(prefix, uri, locator) { - this.locatorDelegate = locator; - this.contentHandler.startPrefixMapping(prefix, uri); -}; -TreeParser.prototype.comment = function(ch, start, length, locator) { - this.locatorDelegate = locator; - this.lexicalHandler.comment(ch, start, length); -}; -TreeParser.prototype.endCDATA = function(locator) { - this.locatorDelegate = locator; - this.lexicalHandler.endCDATA(); -}; -TreeParser.prototype.endDTD = function(locator) { - this.locatorDelegate = locator; - this.lexicalHandler.endDTD(); -}; -TreeParser.prototype.endEntity = function(name, locator) { - this.locatorDelegate = locator; - this.lexicalHandler.endEntity(name); -}; -TreeParser.prototype.startCDATA = function(locator) { - this.locatorDelegate = locator; - this.lexicalHandler.startCDATA(); -}; -TreeParser.prototype.startDTD = function(name, publicId, systemId, locator) { - this.locatorDelegate = locator; - this.lexicalHandler.startDTD(name, publicId, systemId); -}; -TreeParser.prototype.startEntity = function(name, locator) { - this.locatorDelegate = locator; - this.lexicalHandler.startEntity(name); -}; - -Object.defineProperty(TreeParser.prototype, 'columnNumber', { - get: function() { - if (!this.locatorDelegate) - return -1; - else - return this.locatorDelegate.columnNumber; - } -}); - -Object.defineProperty(TreeParser.prototype, 'lineNumber', { - get: function() { - if (!this.locatorDelegate) - return -1; - else - return this.locatorDelegate.lineNumber; - } -}); -function NullLexicalHandler() { - -} - -NullLexicalHandler.prototype.comment = function() {}; -NullLexicalHandler.prototype.endCDATA = function() {}; -NullLexicalHandler.prototype.endDTD = function() {}; -NullLexicalHandler.prototype.endEntity = function() {}; -NullLexicalHandler.prototype.startCDATA = function() {}; -NullLexicalHandler.prototype.startDTD = function() {}; -NullLexicalHandler.prototype.startEntity = function() {}; - -exports.TreeParser = TreeParser; - -}, -{}], -12:[function(_dereq_,module,exports){ -module.exports = { - "Aacute;": "\u00C1", - "Aacute": "\u00C1", - "aacute;": "\u00E1", - "aacute": "\u00E1", - "Abreve;": "\u0102", - "abreve;": "\u0103", - "ac;": "\u223E", - "acd;": "\u223F", - "acE;": "\u223E\u0333", - "Acirc;": "\u00C2", - "Acirc": "\u00C2", - "acirc;": "\u00E2", - "acirc": "\u00E2", - "acute;": "\u00B4", - "acute": "\u00B4", - "Acy;": "\u0410", - "acy;": "\u0430", - "AElig;": "\u00C6", - "AElig": "\u00C6", - "aelig;": "\u00E6", - "aelig": "\u00E6", - "af;": "\u2061", - "Afr;": "\uD835\uDD04", - "afr;": "\uD835\uDD1E", - "Agrave;": "\u00C0", - "Agrave": "\u00C0", - "agrave;": "\u00E0", - "agrave": "\u00E0", - "alefsym;": "\u2135", - "aleph;": "\u2135", - "Alpha;": "\u0391", - "alpha;": "\u03B1", - "Amacr;": "\u0100", - "amacr;": "\u0101", - "amalg;": "\u2A3F", - "amp;": "\u0026", - "amp": "\u0026", - "AMP;": "\u0026", - "AMP": "\u0026", - "andand;": "\u2A55", - "And;": "\u2A53", - "and;": "\u2227", - "andd;": "\u2A5C", - "andslope;": "\u2A58", - "andv;": "\u2A5A", - "ang;": "\u2220", - "ange;": "\u29A4", - "angle;": "\u2220", - "angmsdaa;": "\u29A8", - "angmsdab;": "\u29A9", - "angmsdac;": "\u29AA", - "angmsdad;": "\u29AB", - "angmsdae;": "\u29AC", - "angmsdaf;": "\u29AD", - "angmsdag;": "\u29AE", - "angmsdah;": "\u29AF", - "angmsd;": "\u2221", - "angrt;": "\u221F", - "angrtvb;": "\u22BE", - "angrtvbd;": "\u299D", - "angsph;": "\u2222", - "angst;": "\u00C5", - "angzarr;": "\u237C", - "Aogon;": "\u0104", - "aogon;": "\u0105", - "Aopf;": "\uD835\uDD38", - "aopf;": "\uD835\uDD52", - "apacir;": "\u2A6F", - "ap;": "\u2248", - "apE;": "\u2A70", - "ape;": "\u224A", - "apid;": "\u224B", - "apos;": "\u0027", - "ApplyFunction;": "\u2061", - "approx;": "\u2248", - "approxeq;": "\u224A", - "Aring;": "\u00C5", - "Aring": "\u00C5", - "aring;": "\u00E5", - "aring": "\u00E5", - "Ascr;": "\uD835\uDC9C", - "ascr;": "\uD835\uDCB6", - "Assign;": "\u2254", - "ast;": "\u002A", - "asymp;": "\u2248", - "asympeq;": "\u224D", - "Atilde;": "\u00C3", - "Atilde": "\u00C3", - "atilde;": "\u00E3", - "atilde": "\u00E3", - "Auml;": "\u00C4", - "Auml": "\u00C4", - "auml;": "\u00E4", - "auml": "\u00E4", - "awconint;": "\u2233", - "awint;": "\u2A11", - "backcong;": "\u224C", - "backepsilon;": "\u03F6", - "backprime;": "\u2035", - "backsim;": "\u223D", - "backsimeq;": "\u22CD", - "Backslash;": "\u2216", - "Barv;": "\u2AE7", - "barvee;": "\u22BD", - "barwed;": "\u2305", - "Barwed;": "\u2306", - "barwedge;": "\u2305", - "bbrk;": "\u23B5", - "bbrktbrk;": "\u23B6", - "bcong;": "\u224C", - "Bcy;": "\u0411", - "bcy;": "\u0431", - "bdquo;": "\u201E", - "becaus;": "\u2235", - "because;": "\u2235", - "Because;": "\u2235", - "bemptyv;": "\u29B0", - "bepsi;": "\u03F6", - "bernou;": "\u212C", - "Bernoullis;": "\u212C", - "Beta;": "\u0392", - "beta;": "\u03B2", - "beth;": "\u2136", - "between;": "\u226C", - "Bfr;": "\uD835\uDD05", - "bfr;": "\uD835\uDD1F", - "bigcap;": "\u22C2", - "bigcirc;": "\u25EF", - "bigcup;": "\u22C3", - "bigodot;": "\u2A00", - "bigoplus;": "\u2A01", - "bigotimes;": "\u2A02", - "bigsqcup;": "\u2A06", - "bigstar;": "\u2605", - "bigtriangledown;": "\u25BD", - "bigtriangleup;": "\u25B3", - "biguplus;": "\u2A04", - "bigvee;": "\u22C1", - "bigwedge;": "\u22C0", - "bkarow;": "\u290D", - "blacklozenge;": "\u29EB", - "blacksquare;": "\u25AA", - "blacktriangle;": "\u25B4", - "blacktriangledown;": "\u25BE", - "blacktriangleleft;": "\u25C2", - "blacktriangleright;": "\u25B8", - "blank;": "\u2423", - "blk12;": "\u2592", - "blk14;": "\u2591", - "blk34;": "\u2593", - "block;": "\u2588", - "bne;": "\u003D\u20E5", - "bnequiv;": "\u2261\u20E5", - "bNot;": "\u2AED", - "bnot;": "\u2310", - "Bopf;": "\uD835\uDD39", - "bopf;": "\uD835\uDD53", - "bot;": "\u22A5", - "bottom;": "\u22A5", - "bowtie;": "\u22C8", - "boxbox;": "\u29C9", - "boxdl;": "\u2510", - "boxdL;": "\u2555", - "boxDl;": "\u2556", - "boxDL;": "\u2557", - "boxdr;": "\u250C", - "boxdR;": "\u2552", - "boxDr;": "\u2553", - "boxDR;": "\u2554", - "boxh;": "\u2500", - "boxH;": "\u2550", - "boxhd;": "\u252C", - "boxHd;": "\u2564", - "boxhD;": "\u2565", - "boxHD;": "\u2566", - "boxhu;": "\u2534", - "boxHu;": "\u2567", - "boxhU;": "\u2568", - "boxHU;": "\u2569", - "boxminus;": "\u229F", - "boxplus;": "\u229E", - "boxtimes;": "\u22A0", - "boxul;": "\u2518", - "boxuL;": "\u255B", - "boxUl;": "\u255C", - "boxUL;": "\u255D", - "boxur;": "\u2514", - "boxuR;": "\u2558", - "boxUr;": "\u2559", - "boxUR;": "\u255A", - "boxv;": "\u2502", - "boxV;": "\u2551", - "boxvh;": "\u253C", - "boxvH;": "\u256A", - "boxVh;": "\u256B", - "boxVH;": "\u256C", - "boxvl;": "\u2524", - "boxvL;": "\u2561", - "boxVl;": "\u2562", - "boxVL;": "\u2563", - "boxvr;": "\u251C", - "boxvR;": "\u255E", - "boxVr;": "\u255F", - "boxVR;": "\u2560", - "bprime;": "\u2035", - "breve;": "\u02D8", - "Breve;": "\u02D8", - "brvbar;": "\u00A6", - "brvbar": "\u00A6", - "bscr;": "\uD835\uDCB7", - "Bscr;": "\u212C", - "bsemi;": "\u204F", - "bsim;": "\u223D", - "bsime;": "\u22CD", - "bsolb;": "\u29C5", - "bsol;": "\u005C", - "bsolhsub;": "\u27C8", - "bull;": "\u2022", - "bullet;": "\u2022", - "bump;": "\u224E", - "bumpE;": "\u2AAE", - "bumpe;": "\u224F", - "Bumpeq;": "\u224E", - "bumpeq;": "\u224F", - "Cacute;": "\u0106", - "cacute;": "\u0107", - "capand;": "\u2A44", - "capbrcup;": "\u2A49", - "capcap;": "\u2A4B", - "cap;": "\u2229", - "Cap;": "\u22D2", - "capcup;": "\u2A47", - "capdot;": "\u2A40", - "CapitalDifferentialD;": "\u2145", - "caps;": "\u2229\uFE00", - "caret;": "\u2041", - "caron;": "\u02C7", - "Cayleys;": "\u212D", - "ccaps;": "\u2A4D", - "Ccaron;": "\u010C", - "ccaron;": "\u010D", - "Ccedil;": "\u00C7", - "Ccedil": "\u00C7", - "ccedil;": "\u00E7", - "ccedil": "\u00E7", - "Ccirc;": "\u0108", - "ccirc;": "\u0109", - "Cconint;": "\u2230", - "ccups;": "\u2A4C", - "ccupssm;": "\u2A50", - "Cdot;": "\u010A", - "cdot;": "\u010B", - "cedil;": "\u00B8", - "cedil": "\u00B8", - "Cedilla;": "\u00B8", - "cemptyv;": "\u29B2", - "cent;": "\u00A2", - "cent": "\u00A2", - "centerdot;": "\u00B7", - "CenterDot;": "\u00B7", - "cfr;": "\uD835\uDD20", - "Cfr;": "\u212D", - "CHcy;": "\u0427", - "chcy;": "\u0447", - "check;": "\u2713", - "checkmark;": "\u2713", - "Chi;": "\u03A7", - "chi;": "\u03C7", - "circ;": "\u02C6", - "circeq;": "\u2257", - "circlearrowleft;": "\u21BA", - "circlearrowright;": "\u21BB", - "circledast;": "\u229B", - "circledcirc;": "\u229A", - "circleddash;": "\u229D", - "CircleDot;": "\u2299", - "circledR;": "\u00AE", - "circledS;": "\u24C8", - "CircleMinus;": "\u2296", - "CirclePlus;": "\u2295", - "CircleTimes;": "\u2297", - "cir;": "\u25CB", - "cirE;": "\u29C3", - "cire;": "\u2257", - "cirfnint;": "\u2A10", - "cirmid;": "\u2AEF", - "cirscir;": "\u29C2", - "ClockwiseContourIntegral;": "\u2232", - "CloseCurlyDoubleQuote;": "\u201D", - "CloseCurlyQuote;": "\u2019", - "clubs;": "\u2663", - "clubsuit;": "\u2663", - "colon;": "\u003A", - "Colon;": "\u2237", - "Colone;": "\u2A74", - "colone;": "\u2254", - "coloneq;": "\u2254", - "comma;": "\u002C", - "commat;": "\u0040", - "comp;": "\u2201", - "compfn;": "\u2218", - "complement;": "\u2201", - "complexes;": "\u2102", - "cong;": "\u2245", - "congdot;": "\u2A6D", - "Congruent;": "\u2261", - "conint;": "\u222E", - "Conint;": "\u222F", - "ContourIntegral;": "\u222E", - "copf;": "\uD835\uDD54", - "Copf;": "\u2102", - "coprod;": "\u2210", - "Coproduct;": "\u2210", - "copy;": "\u00A9", - "copy": "\u00A9", - "COPY;": "\u00A9", - "COPY": "\u00A9", - "copysr;": "\u2117", - "CounterClockwiseContourIntegral;": "\u2233", - "crarr;": "\u21B5", - "cross;": "\u2717", - "Cross;": "\u2A2F", - "Cscr;": "\uD835\uDC9E", - "cscr;": "\uD835\uDCB8", - "csub;": "\u2ACF", - "csube;": "\u2AD1", - "csup;": "\u2AD0", - "csupe;": "\u2AD2", - "ctdot;": "\u22EF", - "cudarrl;": "\u2938", - "cudarrr;": "\u2935", - "cuepr;": "\u22DE", - "cuesc;": "\u22DF", - "cularr;": "\u21B6", - "cularrp;": "\u293D", - "cupbrcap;": "\u2A48", - "cupcap;": "\u2A46", - "CupCap;": "\u224D", - "cup;": "\u222A", - "Cup;": "\u22D3", - "cupcup;": "\u2A4A", - "cupdot;": "\u228D", - "cupor;": "\u2A45", - "cups;": "\u222A\uFE00", - "curarr;": "\u21B7", - "curarrm;": "\u293C", - "curlyeqprec;": "\u22DE", - "curlyeqsucc;": "\u22DF", - "curlyvee;": "\u22CE", - "curlywedge;": "\u22CF", - "curren;": "\u00A4", - "curren": "\u00A4", - "curvearrowleft;": "\u21B6", - "curvearrowright;": "\u21B7", - "cuvee;": "\u22CE", - "cuwed;": "\u22CF", - "cwconint;": "\u2232", - "cwint;": "\u2231", - "cylcty;": "\u232D", - "dagger;": "\u2020", - "Dagger;": "\u2021", - "daleth;": "\u2138", - "darr;": "\u2193", - "Darr;": "\u21A1", - "dArr;": "\u21D3", - "dash;": "\u2010", - "Dashv;": "\u2AE4", - "dashv;": "\u22A3", - "dbkarow;": "\u290F", - "dblac;": "\u02DD", - "Dcaron;": "\u010E", - "dcaron;": "\u010F", - "Dcy;": "\u0414", - "dcy;": "\u0434", - "ddagger;": "\u2021", - "ddarr;": "\u21CA", - "DD;": "\u2145", - "dd;": "\u2146", - "DDotrahd;": "\u2911", - "ddotseq;": "\u2A77", - "deg;": "\u00B0", - "deg": "\u00B0", - "Del;": "\u2207", - "Delta;": "\u0394", - "delta;": "\u03B4", - "demptyv;": "\u29B1", - "dfisht;": "\u297F", - "Dfr;": "\uD835\uDD07", - "dfr;": "\uD835\uDD21", - "dHar;": "\u2965", - "dharl;": "\u21C3", - "dharr;": "\u21C2", - "DiacriticalAcute;": "\u00B4", - "DiacriticalDot;": "\u02D9", - "DiacriticalDoubleAcute;": "\u02DD", - "DiacriticalGrave;": "\u0060", - "DiacriticalTilde;": "\u02DC", - "diam;": "\u22C4", - "diamond;": "\u22C4", - "Diamond;": "\u22C4", - "diamondsuit;": "\u2666", - "diams;": "\u2666", - "die;": "\u00A8", - "DifferentialD;": "\u2146", - "digamma;": "\u03DD", - "disin;": "\u22F2", - "div;": "\u00F7", - "divide;": "\u00F7", - "divide": "\u00F7", - "divideontimes;": "\u22C7", - "divonx;": "\u22C7", - "DJcy;": "\u0402", - "djcy;": "\u0452", - "dlcorn;": "\u231E", - "dlcrop;": "\u230D", - "dollar;": "\u0024", - "Dopf;": "\uD835\uDD3B", - "dopf;": "\uD835\uDD55", - "Dot;": "\u00A8", - "dot;": "\u02D9", - "DotDot;": "\u20DC", - "doteq;": "\u2250", - "doteqdot;": "\u2251", - "DotEqual;": "\u2250", - "dotminus;": "\u2238", - "dotplus;": "\u2214", - "dotsquare;": "\u22A1", - "doublebarwedge;": "\u2306", - "DoubleContourIntegral;": "\u222F", - "DoubleDot;": "\u00A8", - "DoubleDownArrow;": "\u21D3", - "DoubleLeftArrow;": "\u21D0", - "DoubleLeftRightArrow;": "\u21D4", - "DoubleLeftTee;": "\u2AE4", - "DoubleLongLeftArrow;": "\u27F8", - "DoubleLongLeftRightArrow;": "\u27FA", - "DoubleLongRightArrow;": "\u27F9", - "DoubleRightArrow;": "\u21D2", - "DoubleRightTee;": "\u22A8", - "DoubleUpArrow;": "\u21D1", - "DoubleUpDownArrow;": "\u21D5", - "DoubleVerticalBar;": "\u2225", - "DownArrowBar;": "\u2913", - "downarrow;": "\u2193", - "DownArrow;": "\u2193", - "Downarrow;": "\u21D3", - "DownArrowUpArrow;": "\u21F5", - "DownBreve;": "\u0311", - "downdownarrows;": "\u21CA", - "downharpoonleft;": "\u21C3", - "downharpoonright;": "\u21C2", - "DownLeftRightVector;": "\u2950", - "DownLeftTeeVector;": "\u295E", - "DownLeftVectorBar;": "\u2956", - "DownLeftVector;": "\u21BD", - "DownRightTeeVector;": "\u295F", - "DownRightVectorBar;": "\u2957", - "DownRightVector;": "\u21C1", - "DownTeeArrow;": "\u21A7", - "DownTee;": "\u22A4", - "drbkarow;": "\u2910", - "drcorn;": "\u231F", - "drcrop;": "\u230C", - "Dscr;": "\uD835\uDC9F", - "dscr;": "\uD835\uDCB9", - "DScy;": "\u0405", - "dscy;": "\u0455", - "dsol;": "\u29F6", - "Dstrok;": "\u0110", - "dstrok;": "\u0111", - "dtdot;": "\u22F1", - "dtri;": "\u25BF", - "dtrif;": "\u25BE", - "duarr;": "\u21F5", - "duhar;": "\u296F", - "dwangle;": "\u29A6", - "DZcy;": "\u040F", - "dzcy;": "\u045F", - "dzigrarr;": "\u27FF", - "Eacute;": "\u00C9", - "Eacute": "\u00C9", - "eacute;": "\u00E9", - "eacute": "\u00E9", - "easter;": "\u2A6E", - "Ecaron;": "\u011A", - "ecaron;": "\u011B", - "Ecirc;": "\u00CA", - "Ecirc": "\u00CA", - "ecirc;": "\u00EA", - "ecirc": "\u00EA", - "ecir;": "\u2256", - "ecolon;": "\u2255", - "Ecy;": "\u042D", - "ecy;": "\u044D", - "eDDot;": "\u2A77", - "Edot;": "\u0116", - "edot;": "\u0117", - "eDot;": "\u2251", - "ee;": "\u2147", - "efDot;": "\u2252", - "Efr;": "\uD835\uDD08", - "efr;": "\uD835\uDD22", - "eg;": "\u2A9A", - "Egrave;": "\u00C8", - "Egrave": "\u00C8", - "egrave;": "\u00E8", - "egrave": "\u00E8", - "egs;": "\u2A96", - "egsdot;": "\u2A98", - "el;": "\u2A99", - "Element;": "\u2208", - "elinters;": "\u23E7", - "ell;": "\u2113", - "els;": "\u2A95", - "elsdot;": "\u2A97", - "Emacr;": "\u0112", - "emacr;": "\u0113", - "empty;": "\u2205", - "emptyset;": "\u2205", - "EmptySmallSquare;": "\u25FB", - "emptyv;": "\u2205", - "EmptyVerySmallSquare;": "\u25AB", - "emsp13;": "\u2004", - "emsp14;": "\u2005", - "emsp;": "\u2003", - "ENG;": "\u014A", - "eng;": "\u014B", - "ensp;": "\u2002", - "Eogon;": "\u0118", - "eogon;": "\u0119", - "Eopf;": "\uD835\uDD3C", - "eopf;": "\uD835\uDD56", - "epar;": "\u22D5", - "eparsl;": "\u29E3", - "eplus;": "\u2A71", - "epsi;": "\u03B5", - "Epsilon;": "\u0395", - "epsilon;": "\u03B5", - "epsiv;": "\u03F5", - "eqcirc;": "\u2256", - "eqcolon;": "\u2255", - "eqsim;": "\u2242", - "eqslantgtr;": "\u2A96", - "eqslantless;": "\u2A95", - "Equal;": "\u2A75", - "equals;": "\u003D", - "EqualTilde;": "\u2242", - "equest;": "\u225F", - "Equilibrium;": "\u21CC", - "equiv;": "\u2261", - "equivDD;": "\u2A78", - "eqvparsl;": "\u29E5", - "erarr;": "\u2971", - "erDot;": "\u2253", - "escr;": "\u212F", - "Escr;": "\u2130", - "esdot;": "\u2250", - "Esim;": "\u2A73", - "esim;": "\u2242", - "Eta;": "\u0397", - "eta;": "\u03B7", - "ETH;": "\u00D0", - "ETH": "\u00D0", - "eth;": "\u00F0", - "eth": "\u00F0", - "Euml;": "\u00CB", - "Euml": "\u00CB", - "euml;": "\u00EB", - "euml": "\u00EB", - "euro;": "\u20AC", - "excl;": "\u0021", - "exist;": "\u2203", - "Exists;": "\u2203", - "expectation;": "\u2130", - "exponentiale;": "\u2147", - "ExponentialE;": "\u2147", - "fallingdotseq;": "\u2252", - "Fcy;": "\u0424", - "fcy;": "\u0444", - "female;": "\u2640", - "ffilig;": "\uFB03", - "fflig;": "\uFB00", - "ffllig;": "\uFB04", - "Ffr;": "\uD835\uDD09", - "ffr;": "\uD835\uDD23", - "filig;": "\uFB01", - "FilledSmallSquare;": "\u25FC", - "FilledVerySmallSquare;": "\u25AA", - "fjlig;": "\u0066\u006A", - "flat;": "\u266D", - "fllig;": "\uFB02", - "fltns;": "\u25B1", - "fnof;": "\u0192", - "Fopf;": "\uD835\uDD3D", - "fopf;": "\uD835\uDD57", - "forall;": "\u2200", - "ForAll;": "\u2200", - "fork;": "\u22D4", - "forkv;": "\u2AD9", - "Fouriertrf;": "\u2131", - "fpartint;": "\u2A0D", - "frac12;": "\u00BD", - "frac12": "\u00BD", - "frac13;": "\u2153", - "frac14;": "\u00BC", - "frac14": "\u00BC", - "frac15;": "\u2155", - "frac16;": "\u2159", - "frac18;": "\u215B", - "frac23;": "\u2154", - "frac25;": "\u2156", - "frac34;": "\u00BE", - "frac34": "\u00BE", - "frac35;": "\u2157", - "frac38;": "\u215C", - "frac45;": "\u2158", - "frac56;": "\u215A", - "frac58;": "\u215D", - "frac78;": "\u215E", - "frasl;": "\u2044", - "frown;": "\u2322", - "fscr;": "\uD835\uDCBB", - "Fscr;": "\u2131", - "gacute;": "\u01F5", - "Gamma;": "\u0393", - "gamma;": "\u03B3", - "Gammad;": "\u03DC", - "gammad;": "\u03DD", - "gap;": "\u2A86", - "Gbreve;": "\u011E", - "gbreve;": "\u011F", - "Gcedil;": "\u0122", - "Gcirc;": "\u011C", - "gcirc;": "\u011D", - "Gcy;": "\u0413", - "gcy;": "\u0433", - "Gdot;": "\u0120", - "gdot;": "\u0121", - "ge;": "\u2265", - "gE;": "\u2267", - "gEl;": "\u2A8C", - "gel;": "\u22DB", - "geq;": "\u2265", - "geqq;": "\u2267", - "geqslant;": "\u2A7E", - "gescc;": "\u2AA9", - "ges;": "\u2A7E", - "gesdot;": "\u2A80", - "gesdoto;": "\u2A82", - "gesdotol;": "\u2A84", - "gesl;": "\u22DB\uFE00", - "gesles;": "\u2A94", - "Gfr;": "\uD835\uDD0A", - "gfr;": "\uD835\uDD24", - "gg;": "\u226B", - "Gg;": "\u22D9", - "ggg;": "\u22D9", - "gimel;": "\u2137", - "GJcy;": "\u0403", - "gjcy;": "\u0453", - "gla;": "\u2AA5", - "gl;": "\u2277", - "glE;": "\u2A92", - "glj;": "\u2AA4", - "gnap;": "\u2A8A", - "gnapprox;": "\u2A8A", - "gne;": "\u2A88", - "gnE;": "\u2269", - "gneq;": "\u2A88", - "gneqq;": "\u2269", - "gnsim;": "\u22E7", - "Gopf;": "\uD835\uDD3E", - "gopf;": "\uD835\uDD58", - "grave;": "\u0060", - "GreaterEqual;": "\u2265", - "GreaterEqualLess;": "\u22DB", - "GreaterFullEqual;": "\u2267", - "GreaterGreater;": "\u2AA2", - "GreaterLess;": "\u2277", - "GreaterSlantEqual;": "\u2A7E", - "GreaterTilde;": "\u2273", - "Gscr;": "\uD835\uDCA2", - "gscr;": "\u210A", - "gsim;": "\u2273", - "gsime;": "\u2A8E", - "gsiml;": "\u2A90", - "gtcc;": "\u2AA7", - "gtcir;": "\u2A7A", - "gt;": "\u003E", - "gt": "\u003E", - "GT;": "\u003E", - "GT": "\u003E", - "Gt;": "\u226B", - "gtdot;": "\u22D7", - "gtlPar;": "\u2995", - "gtquest;": "\u2A7C", - "gtrapprox;": "\u2A86", - "gtrarr;": "\u2978", - "gtrdot;": "\u22D7", - "gtreqless;": "\u22DB", - "gtreqqless;": "\u2A8C", - "gtrless;": "\u2277", - "gtrsim;": "\u2273", - "gvertneqq;": "\u2269\uFE00", - "gvnE;": "\u2269\uFE00", - "Hacek;": "\u02C7", - "hairsp;": "\u200A", - "half;": "\u00BD", - "hamilt;": "\u210B", - "HARDcy;": "\u042A", - "hardcy;": "\u044A", - "harrcir;": "\u2948", - "harr;": "\u2194", - "hArr;": "\u21D4", - "harrw;": "\u21AD", - "Hat;": "\u005E", - "hbar;": "\u210F", - "Hcirc;": "\u0124", - "hcirc;": "\u0125", - "hearts;": "\u2665", - "heartsuit;": "\u2665", - "hellip;": "\u2026", - "hercon;": "\u22B9", - "hfr;": "\uD835\uDD25", - "Hfr;": "\u210C", - "HilbertSpace;": "\u210B", - "hksearow;": "\u2925", - "hkswarow;": "\u2926", - "hoarr;": "\u21FF", - "homtht;": "\u223B", - "hookleftarrow;": "\u21A9", - "hookrightarrow;": "\u21AA", - "hopf;": "\uD835\uDD59", - "Hopf;": "\u210D", - "horbar;": "\u2015", - "HorizontalLine;": "\u2500", - "hscr;": "\uD835\uDCBD", - "Hscr;": "\u210B", - "hslash;": "\u210F", - "Hstrok;": "\u0126", - "hstrok;": "\u0127", - "HumpDownHump;": "\u224E", - "HumpEqual;": "\u224F", - "hybull;": "\u2043", - "hyphen;": "\u2010", - "Iacute;": "\u00CD", - "Iacute": "\u00CD", - "iacute;": "\u00ED", - "iacute": "\u00ED", - "ic;": "\u2063", - "Icirc;": "\u00CE", - "Icirc": "\u00CE", - "icirc;": "\u00EE", - "icirc": "\u00EE", - "Icy;": "\u0418", - "icy;": "\u0438", - "Idot;": "\u0130", - "IEcy;": "\u0415", - "iecy;": "\u0435", - "iexcl;": "\u00A1", - "iexcl": "\u00A1", - "iff;": "\u21D4", - "ifr;": "\uD835\uDD26", - "Ifr;": "\u2111", - "Igrave;": "\u00CC", - "Igrave": "\u00CC", - "igrave;": "\u00EC", - "igrave": "\u00EC", - "ii;": "\u2148", - "iiiint;": "\u2A0C", - "iiint;": "\u222D", - "iinfin;": "\u29DC", - "iiota;": "\u2129", - "IJlig;": "\u0132", - "ijlig;": "\u0133", - "Imacr;": "\u012A", - "imacr;": "\u012B", - "image;": "\u2111", - "ImaginaryI;": "\u2148", - "imagline;": "\u2110", - "imagpart;": "\u2111", - "imath;": "\u0131", - "Im;": "\u2111", - "imof;": "\u22B7", - "imped;": "\u01B5", - "Implies;": "\u21D2", - "incare;": "\u2105", - "in;": "\u2208", - "infin;": "\u221E", - "infintie;": "\u29DD", - "inodot;": "\u0131", - "intcal;": "\u22BA", - "int;": "\u222B", - "Int;": "\u222C", - "integers;": "\u2124", - "Integral;": "\u222B", - "intercal;": "\u22BA", - "Intersection;": "\u22C2", - "intlarhk;": "\u2A17", - "intprod;": "\u2A3C", - "InvisibleComma;": "\u2063", - "InvisibleTimes;": "\u2062", - "IOcy;": "\u0401", - "iocy;": "\u0451", - "Iogon;": "\u012E", - "iogon;": "\u012F", - "Iopf;": "\uD835\uDD40", - "iopf;": "\uD835\uDD5A", - "Iota;": "\u0399", - "iota;": "\u03B9", - "iprod;": "\u2A3C", - "iquest;": "\u00BF", - "iquest": "\u00BF", - "iscr;": "\uD835\uDCBE", - "Iscr;": "\u2110", - "isin;": "\u2208", - "isindot;": "\u22F5", - "isinE;": "\u22F9", - "isins;": "\u22F4", - "isinsv;": "\u22F3", - "isinv;": "\u2208", - "it;": "\u2062", - "Itilde;": "\u0128", - "itilde;": "\u0129", - "Iukcy;": "\u0406", - "iukcy;": "\u0456", - "Iuml;": "\u00CF", - "Iuml": "\u00CF", - "iuml;": "\u00EF", - "iuml": "\u00EF", - "Jcirc;": "\u0134", - "jcirc;": "\u0135", - "Jcy;": "\u0419", - "jcy;": "\u0439", - "Jfr;": "\uD835\uDD0D", - "jfr;": "\uD835\uDD27", - "jmath;": "\u0237", - "Jopf;": "\uD835\uDD41", - "jopf;": "\uD835\uDD5B", - "Jscr;": "\uD835\uDCA5", - "jscr;": "\uD835\uDCBF", - "Jsercy;": "\u0408", - "jsercy;": "\u0458", - "Jukcy;": "\u0404", - "jukcy;": "\u0454", - "Kappa;": "\u039A", - "kappa;": "\u03BA", - "kappav;": "\u03F0", - "Kcedil;": "\u0136", - "kcedil;": "\u0137", - "Kcy;": "\u041A", - "kcy;": "\u043A", - "Kfr;": "\uD835\uDD0E", - "kfr;": "\uD835\uDD28", - "kgreen;": "\u0138", - "KHcy;": "\u0425", - "khcy;": "\u0445", - "KJcy;": "\u040C", - "kjcy;": "\u045C", - "Kopf;": "\uD835\uDD42", - "kopf;": "\uD835\uDD5C", - "Kscr;": "\uD835\uDCA6", - "kscr;": "\uD835\uDCC0", - "lAarr;": "\u21DA", - "Lacute;": "\u0139", - "lacute;": "\u013A", - "laemptyv;": "\u29B4", - "lagran;": "\u2112", - "Lambda;": "\u039B", - "lambda;": "\u03BB", - "lang;": "\u27E8", - "Lang;": "\u27EA", - "langd;": "\u2991", - "langle;": "\u27E8", - "lap;": "\u2A85", - "Laplacetrf;": "\u2112", - "laquo;": "\u00AB", - "laquo": "\u00AB", - "larrb;": "\u21E4", - "larrbfs;": "\u291F", - "larr;": "\u2190", - "Larr;": "\u219E", - "lArr;": "\u21D0", - "larrfs;": "\u291D", - "larrhk;": "\u21A9", - "larrlp;": "\u21AB", - "larrpl;": "\u2939", - "larrsim;": "\u2973", - "larrtl;": "\u21A2", - "latail;": "\u2919", - "lAtail;": "\u291B", - "lat;": "\u2AAB", - "late;": "\u2AAD", - "lates;": "\u2AAD\uFE00", - "lbarr;": "\u290C", - "lBarr;": "\u290E", - "lbbrk;": "\u2772", - "lbrace;": "\u007B", - "lbrack;": "\u005B", - "lbrke;": "\u298B", - "lbrksld;": "\u298F", - "lbrkslu;": "\u298D", - "Lcaron;": "\u013D", - "lcaron;": "\u013E", - "Lcedil;": "\u013B", - "lcedil;": "\u013C", - "lceil;": "\u2308", - "lcub;": "\u007B", - "Lcy;": "\u041B", - "lcy;": "\u043B", - "ldca;": "\u2936", - "ldquo;": "\u201C", - "ldquor;": "\u201E", - "ldrdhar;": "\u2967", - "ldrushar;": "\u294B", - "ldsh;": "\u21B2", - "le;": "\u2264", - "lE;": "\u2266", - "LeftAngleBracket;": "\u27E8", - "LeftArrowBar;": "\u21E4", - "leftarrow;": "\u2190", - "LeftArrow;": "\u2190", - "Leftarrow;": "\u21D0", - "LeftArrowRightArrow;": "\u21C6", - "leftarrowtail;": "\u21A2", - "LeftCeiling;": "\u2308", - "LeftDoubleBracket;": "\u27E6", - "LeftDownTeeVector;": "\u2961", - "LeftDownVectorBar;": "\u2959", - "LeftDownVector;": "\u21C3", - "LeftFloor;": "\u230A", - "leftharpoondown;": "\u21BD", - "leftharpoonup;": "\u21BC", - "leftleftarrows;": "\u21C7", - "leftrightarrow;": "\u2194", - "LeftRightArrow;": "\u2194", - "Leftrightarrow;": "\u21D4", - "leftrightarrows;": "\u21C6", - "leftrightharpoons;": "\u21CB", - "leftrightsquigarrow;": "\u21AD", - "LeftRightVector;": "\u294E", - "LeftTeeArrow;": "\u21A4", - "LeftTee;": "\u22A3", - "LeftTeeVector;": "\u295A", - "leftthreetimes;": "\u22CB", - "LeftTriangleBar;": "\u29CF", - "LeftTriangle;": "\u22B2", - "LeftTriangleEqual;": "\u22B4", - "LeftUpDownVector;": "\u2951", - "LeftUpTeeVector;": "\u2960", - "LeftUpVectorBar;": "\u2958", - "LeftUpVector;": "\u21BF", - "LeftVectorBar;": "\u2952", - "LeftVector;": "\u21BC", - "lEg;": "\u2A8B", - "leg;": "\u22DA", - "leq;": "\u2264", - "leqq;": "\u2266", - "leqslant;": "\u2A7D", - "lescc;": "\u2AA8", - "les;": "\u2A7D", - "lesdot;": "\u2A7F", - "lesdoto;": "\u2A81", - "lesdotor;": "\u2A83", - "lesg;": "\u22DA\uFE00", - "lesges;": "\u2A93", - "lessapprox;": "\u2A85", - "lessdot;": "\u22D6", - "lesseqgtr;": "\u22DA", - "lesseqqgtr;": "\u2A8B", - "LessEqualGreater;": "\u22DA", - "LessFullEqual;": "\u2266", - "LessGreater;": "\u2276", - "lessgtr;": "\u2276", - "LessLess;": "\u2AA1", - "lesssim;": "\u2272", - "LessSlantEqual;": "\u2A7D", - "LessTilde;": "\u2272", - "lfisht;": "\u297C", - "lfloor;": "\u230A", - "Lfr;": "\uD835\uDD0F", - "lfr;": "\uD835\uDD29", - "lg;": "\u2276", - "lgE;": "\u2A91", - "lHar;": "\u2962", - "lhard;": "\u21BD", - "lharu;": "\u21BC", - "lharul;": "\u296A", - "lhblk;": "\u2584", - "LJcy;": "\u0409", - "ljcy;": "\u0459", - "llarr;": "\u21C7", - "ll;": "\u226A", - "Ll;": "\u22D8", - "llcorner;": "\u231E", - "Lleftarrow;": "\u21DA", - "llhard;": "\u296B", - "lltri;": "\u25FA", - "Lmidot;": "\u013F", - "lmidot;": "\u0140", - "lmoustache;": "\u23B0", - "lmoust;": "\u23B0", - "lnap;": "\u2A89", - "lnapprox;": "\u2A89", - "lne;": "\u2A87", - "lnE;": "\u2268", - "lneq;": "\u2A87", - "lneqq;": "\u2268", - "lnsim;": "\u22E6", - "loang;": "\u27EC", - "loarr;": "\u21FD", - "lobrk;": "\u27E6", - "longleftarrow;": "\u27F5", - "LongLeftArrow;": "\u27F5", - "Longleftarrow;": "\u27F8", - "longleftrightarrow;": "\u27F7", - "LongLeftRightArrow;": "\u27F7", - "Longleftrightarrow;": "\u27FA", - "longmapsto;": "\u27FC", - "longrightarrow;": "\u27F6", - "LongRightArrow;": "\u27F6", - "Longrightarrow;": "\u27F9", - "looparrowleft;": "\u21AB", - "looparrowright;": "\u21AC", - "lopar;": "\u2985", - "Lopf;": "\uD835\uDD43", - "lopf;": "\uD835\uDD5D", - "loplus;": "\u2A2D", - "lotimes;": "\u2A34", - "lowast;": "\u2217", - "lowbar;": "\u005F", - "LowerLeftArrow;": "\u2199", - "LowerRightArrow;": "\u2198", - "loz;": "\u25CA", - "lozenge;": "\u25CA", - "lozf;": "\u29EB", - "lpar;": "\u0028", - "lparlt;": "\u2993", - "lrarr;": "\u21C6", - "lrcorner;": "\u231F", - "lrhar;": "\u21CB", - "lrhard;": "\u296D", - "lrm;": "\u200E", - "lrtri;": "\u22BF", - "lsaquo;": "\u2039", - "lscr;": "\uD835\uDCC1", - "Lscr;": "\u2112", - "lsh;": "\u21B0", - "Lsh;": "\u21B0", - "lsim;": "\u2272", - "lsime;": "\u2A8D", - "lsimg;": "\u2A8F", - "lsqb;": "\u005B", - "lsquo;": "\u2018", - "lsquor;": "\u201A", - "Lstrok;": "\u0141", - "lstrok;": "\u0142", - "ltcc;": "\u2AA6", - "ltcir;": "\u2A79", - "lt;": "\u003C", - "lt": "\u003C", - "LT;": "\u003C", - "LT": "\u003C", - "Lt;": "\u226A", - "ltdot;": "\u22D6", - "lthree;": "\u22CB", - "ltimes;": "\u22C9", - "ltlarr;": "\u2976", - "ltquest;": "\u2A7B", - "ltri;": "\u25C3", - "ltrie;": "\u22B4", - "ltrif;": "\u25C2", - "ltrPar;": "\u2996", - "lurdshar;": "\u294A", - "luruhar;": "\u2966", - "lvertneqq;": "\u2268\uFE00", - "lvnE;": "\u2268\uFE00", - "macr;": "\u00AF", - "macr": "\u00AF", - "male;": "\u2642", - "malt;": "\u2720", - "maltese;": "\u2720", - "Map;": "\u2905", - "map;": "\u21A6", - "mapsto;": "\u21A6", - "mapstodown;": "\u21A7", - "mapstoleft;": "\u21A4", - "mapstoup;": "\u21A5", - "marker;": "\u25AE", - "mcomma;": "\u2A29", - "Mcy;": "\u041C", - "mcy;": "\u043C", - "mdash;": "\u2014", - "mDDot;": "\u223A", - "measuredangle;": "\u2221", - "MediumSpace;": "\u205F", - "Mellintrf;": "\u2133", - "Mfr;": "\uD835\uDD10", - "mfr;": "\uD835\uDD2A", - "mho;": "\u2127", - "micro;": "\u00B5", - "micro": "\u00B5", - "midast;": "\u002A", - "midcir;": "\u2AF0", - "mid;": "\u2223", - "middot;": "\u00B7", - "middot": "\u00B7", - "minusb;": "\u229F", - "minus;": "\u2212", - "minusd;": "\u2238", - "minusdu;": "\u2A2A", - "MinusPlus;": "\u2213", - "mlcp;": "\u2ADB", - "mldr;": "\u2026", - "mnplus;": "\u2213", - "models;": "\u22A7", - "Mopf;": "\uD835\uDD44", - "mopf;": "\uD835\uDD5E", - "mp;": "\u2213", - "mscr;": "\uD835\uDCC2", - "Mscr;": "\u2133", - "mstpos;": "\u223E", - "Mu;": "\u039C", - "mu;": "\u03BC", - "multimap;": "\u22B8", - "mumap;": "\u22B8", - "nabla;": "\u2207", - "Nacute;": "\u0143", - "nacute;": "\u0144", - "nang;": "\u2220\u20D2", - "nap;": "\u2249", - "napE;": "\u2A70\u0338", - "napid;": "\u224B\u0338", - "napos;": "\u0149", - "napprox;": "\u2249", - "natural;": "\u266E", - "naturals;": "\u2115", - "natur;": "\u266E", - "nbsp;": "\u00A0", - "nbsp": "\u00A0", - "nbump;": "\u224E\u0338", - "nbumpe;": "\u224F\u0338", - "ncap;": "\u2A43", - "Ncaron;": "\u0147", - "ncaron;": "\u0148", - "Ncedil;": "\u0145", - "ncedil;": "\u0146", - "ncong;": "\u2247", - "ncongdot;": "\u2A6D\u0338", - "ncup;": "\u2A42", - "Ncy;": "\u041D", - "ncy;": "\u043D", - "ndash;": "\u2013", - "nearhk;": "\u2924", - "nearr;": "\u2197", - "neArr;": "\u21D7", - "nearrow;": "\u2197", - "ne;": "\u2260", - "nedot;": "\u2250\u0338", - "NegativeMediumSpace;": "\u200B", - "NegativeThickSpace;": "\u200B", - "NegativeThinSpace;": "\u200B", - "NegativeVeryThinSpace;": "\u200B", - "nequiv;": "\u2262", - "nesear;": "\u2928", - "nesim;": "\u2242\u0338", - "NestedGreaterGreater;": "\u226B", - "NestedLessLess;": "\u226A", - "NewLine;": "\u000A", - "nexist;": "\u2204", - "nexists;": "\u2204", - "Nfr;": "\uD835\uDD11", - "nfr;": "\uD835\uDD2B", - "ngE;": "\u2267\u0338", - "nge;": "\u2271", - "ngeq;": "\u2271", - "ngeqq;": "\u2267\u0338", - "ngeqslant;": "\u2A7E\u0338", - "nges;": "\u2A7E\u0338", - "nGg;": "\u22D9\u0338", - "ngsim;": "\u2275", - "nGt;": "\u226B\u20D2", - "ngt;": "\u226F", - "ngtr;": "\u226F", - "nGtv;": "\u226B\u0338", - "nharr;": "\u21AE", - "nhArr;": "\u21CE", - "nhpar;": "\u2AF2", - "ni;": "\u220B", - "nis;": "\u22FC", - "nisd;": "\u22FA", - "niv;": "\u220B", - "NJcy;": "\u040A", - "njcy;": "\u045A", - "nlarr;": "\u219A", - "nlArr;": "\u21CD", - "nldr;": "\u2025", - "nlE;": "\u2266\u0338", - "nle;": "\u2270", - "nleftarrow;": "\u219A", - "nLeftarrow;": "\u21CD", - "nleftrightarrow;": "\u21AE", - "nLeftrightarrow;": "\u21CE", - "nleq;": "\u2270", - "nleqq;": "\u2266\u0338", - "nleqslant;": "\u2A7D\u0338", - "nles;": "\u2A7D\u0338", - "nless;": "\u226E", - "nLl;": "\u22D8\u0338", - "nlsim;": "\u2274", - "nLt;": "\u226A\u20D2", - "nlt;": "\u226E", - "nltri;": "\u22EA", - "nltrie;": "\u22EC", - "nLtv;": "\u226A\u0338", - "nmid;": "\u2224", - "NoBreak;": "\u2060", - "NonBreakingSpace;": "\u00A0", - "nopf;": "\uD835\uDD5F", - "Nopf;": "\u2115", - "Not;": "\u2AEC", - "not;": "\u00AC", - "not": "\u00AC", - "NotCongruent;": "\u2262", - "NotCupCap;": "\u226D", - "NotDoubleVerticalBar;": "\u2226", - "NotElement;": "\u2209", - "NotEqual;": "\u2260", - "NotEqualTilde;": "\u2242\u0338", - "NotExists;": "\u2204", - "NotGreater;": "\u226F", - "NotGreaterEqual;": "\u2271", - "NotGreaterFullEqual;": "\u2267\u0338", - "NotGreaterGreater;": "\u226B\u0338", - "NotGreaterLess;": "\u2279", - "NotGreaterSlantEqual;": "\u2A7E\u0338", - "NotGreaterTilde;": "\u2275", - "NotHumpDownHump;": "\u224E\u0338", - "NotHumpEqual;": "\u224F\u0338", - "notin;": "\u2209", - "notindot;": "\u22F5\u0338", - "notinE;": "\u22F9\u0338", - "notinva;": "\u2209", - "notinvb;": "\u22F7", - "notinvc;": "\u22F6", - "NotLeftTriangleBar;": "\u29CF\u0338", - "NotLeftTriangle;": "\u22EA", - "NotLeftTriangleEqual;": "\u22EC", - "NotLess;": "\u226E", - "NotLessEqual;": "\u2270", - "NotLessGreater;": "\u2278", - "NotLessLess;": "\u226A\u0338", - "NotLessSlantEqual;": "\u2A7D\u0338", - "NotLessTilde;": "\u2274", - "NotNestedGreaterGreater;": "\u2AA2\u0338", - "NotNestedLessLess;": "\u2AA1\u0338", - "notni;": "\u220C", - "notniva;": "\u220C", - "notnivb;": "\u22FE", - "notnivc;": "\u22FD", - "NotPrecedes;": "\u2280", - "NotPrecedesEqual;": "\u2AAF\u0338", - "NotPrecedesSlantEqual;": "\u22E0", - "NotReverseElement;": "\u220C", - "NotRightTriangleBar;": "\u29D0\u0338", - "NotRightTriangle;": "\u22EB", - "NotRightTriangleEqual;": "\u22ED", - "NotSquareSubset;": "\u228F\u0338", - "NotSquareSubsetEqual;": "\u22E2", - "NotSquareSuperset;": "\u2290\u0338", - "NotSquareSupersetEqual;": "\u22E3", - "NotSubset;": "\u2282\u20D2", - "NotSubsetEqual;": "\u2288", - "NotSucceeds;": "\u2281", - "NotSucceedsEqual;": "\u2AB0\u0338", - "NotSucceedsSlantEqual;": "\u22E1", - "NotSucceedsTilde;": "\u227F\u0338", - "NotSuperset;": "\u2283\u20D2", - "NotSupersetEqual;": "\u2289", - "NotTilde;": "\u2241", - "NotTildeEqual;": "\u2244", - "NotTildeFullEqual;": "\u2247", - "NotTildeTilde;": "\u2249", - "NotVerticalBar;": "\u2224", - "nparallel;": "\u2226", - "npar;": "\u2226", - "nparsl;": "\u2AFD\u20E5", - "npart;": "\u2202\u0338", - "npolint;": "\u2A14", - "npr;": "\u2280", - "nprcue;": "\u22E0", - "nprec;": "\u2280", - "npreceq;": "\u2AAF\u0338", - "npre;": "\u2AAF\u0338", - "nrarrc;": "\u2933\u0338", - "nrarr;": "\u219B", - "nrArr;": "\u21CF", - "nrarrw;": "\u219D\u0338", - "nrightarrow;": "\u219B", - "nRightarrow;": "\u21CF", - "nrtri;": "\u22EB", - "nrtrie;": "\u22ED", - "nsc;": "\u2281", - "nsccue;": "\u22E1", - "nsce;": "\u2AB0\u0338", - "Nscr;": "\uD835\uDCA9", - "nscr;": "\uD835\uDCC3", - "nshortmid;": "\u2224", - "nshortparallel;": "\u2226", - "nsim;": "\u2241", - "nsime;": "\u2244", - "nsimeq;": "\u2244", - "nsmid;": "\u2224", - "nspar;": "\u2226", - "nsqsube;": "\u22E2", - "nsqsupe;": "\u22E3", - "nsub;": "\u2284", - "nsubE;": "\u2AC5\u0338", - "nsube;": "\u2288", - "nsubset;": "\u2282\u20D2", - "nsubseteq;": "\u2288", - "nsubseteqq;": "\u2AC5\u0338", - "nsucc;": "\u2281", - "nsucceq;": "\u2AB0\u0338", - "nsup;": "\u2285", - "nsupE;": "\u2AC6\u0338", - "nsupe;": "\u2289", - "nsupset;": "\u2283\u20D2", - "nsupseteq;": "\u2289", - "nsupseteqq;": "\u2AC6\u0338", - "ntgl;": "\u2279", - "Ntilde;": "\u00D1", - "Ntilde": "\u00D1", - "ntilde;": "\u00F1", - "ntilde": "\u00F1", - "ntlg;": "\u2278", - "ntriangleleft;": "\u22EA", - "ntrianglelefteq;": "\u22EC", - "ntriangleright;": "\u22EB", - "ntrianglerighteq;": "\u22ED", - "Nu;": "\u039D", - "nu;": "\u03BD", - "num;": "\u0023", - "numero;": "\u2116", - "numsp;": "\u2007", - "nvap;": "\u224D\u20D2", - "nvdash;": "\u22AC", - "nvDash;": "\u22AD", - "nVdash;": "\u22AE", - "nVDash;": "\u22AF", - "nvge;": "\u2265\u20D2", - "nvgt;": "\u003E\u20D2", - "nvHarr;": "\u2904", - "nvinfin;": "\u29DE", - "nvlArr;": "\u2902", - "nvle;": "\u2264\u20D2", - "nvlt;": "\u003C\u20D2", - "nvltrie;": "\u22B4\u20D2", - "nvrArr;": "\u2903", - "nvrtrie;": "\u22B5\u20D2", - "nvsim;": "\u223C\u20D2", - "nwarhk;": "\u2923", - "nwarr;": "\u2196", - "nwArr;": "\u21D6", - "nwarrow;": "\u2196", - "nwnear;": "\u2927", - "Oacute;": "\u00D3", - "Oacute": "\u00D3", - "oacute;": "\u00F3", - "oacute": "\u00F3", - "oast;": "\u229B", - "Ocirc;": "\u00D4", - "Ocirc": "\u00D4", - "ocirc;": "\u00F4", - "ocirc": "\u00F4", - "ocir;": "\u229A", - "Ocy;": "\u041E", - "ocy;": "\u043E", - "odash;": "\u229D", - "Odblac;": "\u0150", - "odblac;": "\u0151", - "odiv;": "\u2A38", - "odot;": "\u2299", - "odsold;": "\u29BC", - "OElig;": "\u0152", - "oelig;": "\u0153", - "ofcir;": "\u29BF", - "Ofr;": "\uD835\uDD12", - "ofr;": "\uD835\uDD2C", - "ogon;": "\u02DB", - "Ograve;": "\u00D2", - "Ograve": "\u00D2", - "ograve;": "\u00F2", - "ograve": "\u00F2", - "ogt;": "\u29C1", - "ohbar;": "\u29B5", - "ohm;": "\u03A9", - "oint;": "\u222E", - "olarr;": "\u21BA", - "olcir;": "\u29BE", - "olcross;": "\u29BB", - "oline;": "\u203E", - "olt;": "\u29C0", - "Omacr;": "\u014C", - "omacr;": "\u014D", - "Omega;": "\u03A9", - "omega;": "\u03C9", - "Omicron;": "\u039F", - "omicron;": "\u03BF", - "omid;": "\u29B6", - "ominus;": "\u2296", - "Oopf;": "\uD835\uDD46", - "oopf;": "\uD835\uDD60", - "opar;": "\u29B7", - "OpenCurlyDoubleQuote;": "\u201C", - "OpenCurlyQuote;": "\u2018", - "operp;": "\u29B9", - "oplus;": "\u2295", - "orarr;": "\u21BB", - "Or;": "\u2A54", - "or;": "\u2228", - "ord;": "\u2A5D", - "order;": "\u2134", - "orderof;": "\u2134", - "ordf;": "\u00AA", - "ordf": "\u00AA", - "ordm;": "\u00BA", - "ordm": "\u00BA", - "origof;": "\u22B6", - "oror;": "\u2A56", - "orslope;": "\u2A57", - "orv;": "\u2A5B", - "oS;": "\u24C8", - "Oscr;": "\uD835\uDCAA", - "oscr;": "\u2134", - "Oslash;": "\u00D8", - "Oslash": "\u00D8", - "oslash;": "\u00F8", - "oslash": "\u00F8", - "osol;": "\u2298", - "Otilde;": "\u00D5", - "Otilde": "\u00D5", - "otilde;": "\u00F5", - "otilde": "\u00F5", - "otimesas;": "\u2A36", - "Otimes;": "\u2A37", - "otimes;": "\u2297", - "Ouml;": "\u00D6", - "Ouml": "\u00D6", - "ouml;": "\u00F6", - "ouml": "\u00F6", - "ovbar;": "\u233D", - "OverBar;": "\u203E", - "OverBrace;": "\u23DE", - "OverBracket;": "\u23B4", - "OverParenthesis;": "\u23DC", - "para;": "\u00B6", - "para": "\u00B6", - "parallel;": "\u2225", - "par;": "\u2225", - "parsim;": "\u2AF3", - "parsl;": "\u2AFD", - "part;": "\u2202", - "PartialD;": "\u2202", - "Pcy;": "\u041F", - "pcy;": "\u043F", - "percnt;": "\u0025", - "period;": "\u002E", - "permil;": "\u2030", - "perp;": "\u22A5", - "pertenk;": "\u2031", - "Pfr;": "\uD835\uDD13", - "pfr;": "\uD835\uDD2D", - "Phi;": "\u03A6", - "phi;": "\u03C6", - "phiv;": "\u03D5", - "phmmat;": "\u2133", - "phone;": "\u260E", - "Pi;": "\u03A0", - "pi;": "\u03C0", - "pitchfork;": "\u22D4", - "piv;": "\u03D6", - "planck;": "\u210F", - "planckh;": "\u210E", - "plankv;": "\u210F", - "plusacir;": "\u2A23", - "plusb;": "\u229E", - "pluscir;": "\u2A22", - "plus;": "\u002B", - "plusdo;": "\u2214", - "plusdu;": "\u2A25", - "pluse;": "\u2A72", - "PlusMinus;": "\u00B1", - "plusmn;": "\u00B1", - "plusmn": "\u00B1", - "plussim;": "\u2A26", - "plustwo;": "\u2A27", - "pm;": "\u00B1", - "Poincareplane;": "\u210C", - "pointint;": "\u2A15", - "popf;": "\uD835\uDD61", - "Popf;": "\u2119", - "pound;": "\u00A3", - "pound": "\u00A3", - "prap;": "\u2AB7", - "Pr;": "\u2ABB", - "pr;": "\u227A", - "prcue;": "\u227C", - "precapprox;": "\u2AB7", - "prec;": "\u227A", - "preccurlyeq;": "\u227C", - "Precedes;": "\u227A", - "PrecedesEqual;": "\u2AAF", - "PrecedesSlantEqual;": "\u227C", - "PrecedesTilde;": "\u227E", - "preceq;": "\u2AAF", - "precnapprox;": "\u2AB9", - "precneqq;": "\u2AB5", - "precnsim;": "\u22E8", - "pre;": "\u2AAF", - "prE;": "\u2AB3", - "precsim;": "\u227E", - "prime;": "\u2032", - "Prime;": "\u2033", - "primes;": "\u2119", - "prnap;": "\u2AB9", - "prnE;": "\u2AB5", - "prnsim;": "\u22E8", - "prod;": "\u220F", - "Product;": "\u220F", - "profalar;": "\u232E", - "profline;": "\u2312", - "profsurf;": "\u2313", - "prop;": "\u221D", - "Proportional;": "\u221D", - "Proportion;": "\u2237", - "propto;": "\u221D", - "prsim;": "\u227E", - "prurel;": "\u22B0", - "Pscr;": "\uD835\uDCAB", - "pscr;": "\uD835\uDCC5", - "Psi;": "\u03A8", - "psi;": "\u03C8", - "puncsp;": "\u2008", - "Qfr;": "\uD835\uDD14", - "qfr;": "\uD835\uDD2E", - "qint;": "\u2A0C", - "qopf;": "\uD835\uDD62", - "Qopf;": "\u211A", - "qprime;": "\u2057", - "Qscr;": "\uD835\uDCAC", - "qscr;": "\uD835\uDCC6", - "quaternions;": "\u210D", - "quatint;": "\u2A16", - "quest;": "\u003F", - "questeq;": "\u225F", - "quot;": "\u0022", - "quot": "\u0022", - "QUOT;": "\u0022", - "QUOT": "\u0022", - "rAarr;": "\u21DB", - "race;": "\u223D\u0331", - "Racute;": "\u0154", - "racute;": "\u0155", - "radic;": "\u221A", - "raemptyv;": "\u29B3", - "rang;": "\u27E9", - "Rang;": "\u27EB", - "rangd;": "\u2992", - "range;": "\u29A5", - "rangle;": "\u27E9", - "raquo;": "\u00BB", - "raquo": "\u00BB", - "rarrap;": "\u2975", - "rarrb;": "\u21E5", - "rarrbfs;": "\u2920", - "rarrc;": "\u2933", - "rarr;": "\u2192", - "Rarr;": "\u21A0", - "rArr;": "\u21D2", - "rarrfs;": "\u291E", - "rarrhk;": "\u21AA", - "rarrlp;": "\u21AC", - "rarrpl;": "\u2945", - "rarrsim;": "\u2974", - "Rarrtl;": "\u2916", - "rarrtl;": "\u21A3", - "rarrw;": "\u219D", - "ratail;": "\u291A", - "rAtail;": "\u291C", - "ratio;": "\u2236", - "rationals;": "\u211A", - "rbarr;": "\u290D", - "rBarr;": "\u290F", - "RBarr;": "\u2910", - "rbbrk;": "\u2773", - "rbrace;": "\u007D", - "rbrack;": "\u005D", - "rbrke;": "\u298C", - "rbrksld;": "\u298E", - "rbrkslu;": "\u2990", - "Rcaron;": "\u0158", - "rcaron;": "\u0159", - "Rcedil;": "\u0156", - "rcedil;": "\u0157", - "rceil;": "\u2309", - "rcub;": "\u007D", - "Rcy;": "\u0420", - "rcy;": "\u0440", - "rdca;": "\u2937", - "rdldhar;": "\u2969", - "rdquo;": "\u201D", - "rdquor;": "\u201D", - "rdsh;": "\u21B3", - "real;": "\u211C", - "realine;": "\u211B", - "realpart;": "\u211C", - "reals;": "\u211D", - "Re;": "\u211C", - "rect;": "\u25AD", - "reg;": "\u00AE", - "reg": "\u00AE", - "REG;": "\u00AE", - "REG": "\u00AE", - "ReverseElement;": "\u220B", - "ReverseEquilibrium;": "\u21CB", - "ReverseUpEquilibrium;": "\u296F", - "rfisht;": "\u297D", - "rfloor;": "\u230B", - "rfr;": "\uD835\uDD2F", - "Rfr;": "\u211C", - "rHar;": "\u2964", - "rhard;": "\u21C1", - "rharu;": "\u21C0", - "rharul;": "\u296C", - "Rho;": "\u03A1", - "rho;": "\u03C1", - "rhov;": "\u03F1", - "RightAngleBracket;": "\u27E9", - "RightArrowBar;": "\u21E5", - "rightarrow;": "\u2192", - "RightArrow;": "\u2192", - "Rightarrow;": "\u21D2", - "RightArrowLeftArrow;": "\u21C4", - "rightarrowtail;": "\u21A3", - "RightCeiling;": "\u2309", - "RightDoubleBracket;": "\u27E7", - "RightDownTeeVector;": "\u295D", - "RightDownVectorBar;": "\u2955", - "RightDownVector;": "\u21C2", - "RightFloor;": "\u230B", - "rightharpoondown;": "\u21C1", - "rightharpoonup;": "\u21C0", - "rightleftarrows;": "\u21C4", - "rightleftharpoons;": "\u21CC", - "rightrightarrows;": "\u21C9", - "rightsquigarrow;": "\u219D", - "RightTeeArrow;": "\u21A6", - "RightTee;": "\u22A2", - "RightTeeVector;": "\u295B", - "rightthreetimes;": "\u22CC", - "RightTriangleBar;": "\u29D0", - "RightTriangle;": "\u22B3", - "RightTriangleEqual;": "\u22B5", - "RightUpDownVector;": "\u294F", - "RightUpTeeVector;": "\u295C", - "RightUpVectorBar;": "\u2954", - "RightUpVector;": "\u21BE", - "RightVectorBar;": "\u2953", - "RightVector;": "\u21C0", - "ring;": "\u02DA", - "risingdotseq;": "\u2253", - "rlarr;": "\u21C4", - "rlhar;": "\u21CC", - "rlm;": "\u200F", - "rmoustache;": "\u23B1", - "rmoust;": "\u23B1", - "rnmid;": "\u2AEE", - "roang;": "\u27ED", - "roarr;": "\u21FE", - "robrk;": "\u27E7", - "ropar;": "\u2986", - "ropf;": "\uD835\uDD63", - "Ropf;": "\u211D", - "roplus;": "\u2A2E", - "rotimes;": "\u2A35", - "RoundImplies;": "\u2970", - "rpar;": "\u0029", - "rpargt;": "\u2994", - "rppolint;": "\u2A12", - "rrarr;": "\u21C9", - "Rrightarrow;": "\u21DB", - "rsaquo;": "\u203A", - "rscr;": "\uD835\uDCC7", - "Rscr;": "\u211B", - "rsh;": "\u21B1", - "Rsh;": "\u21B1", - "rsqb;": "\u005D", - "rsquo;": "\u2019", - "rsquor;": "\u2019", - "rthree;": "\u22CC", - "rtimes;": "\u22CA", - "rtri;": "\u25B9", - "rtrie;": "\u22B5", - "rtrif;": "\u25B8", - "rtriltri;": "\u29CE", - "RuleDelayed;": "\u29F4", - "ruluhar;": "\u2968", - "rx;": "\u211E", - "Sacute;": "\u015A", - "sacute;": "\u015B", - "sbquo;": "\u201A", - "scap;": "\u2AB8", - "Scaron;": "\u0160", - "scaron;": "\u0161", - "Sc;": "\u2ABC", - "sc;": "\u227B", - "sccue;": "\u227D", - "sce;": "\u2AB0", - "scE;": "\u2AB4", - "Scedil;": "\u015E", - "scedil;": "\u015F", - "Scirc;": "\u015C", - "scirc;": "\u015D", - "scnap;": "\u2ABA", - "scnE;": "\u2AB6", - "scnsim;": "\u22E9", - "scpolint;": "\u2A13", - "scsim;": "\u227F", - "Scy;": "\u0421", - "scy;": "\u0441", - "sdotb;": "\u22A1", - "sdot;": "\u22C5", - "sdote;": "\u2A66", - "searhk;": "\u2925", - "searr;": "\u2198", - "seArr;": "\u21D8", - "searrow;": "\u2198", - "sect;": "\u00A7", - "sect": "\u00A7", - "semi;": "\u003B", - "seswar;": "\u2929", - "setminus;": "\u2216", - "setmn;": "\u2216", - "sext;": "\u2736", - "Sfr;": "\uD835\uDD16", - "sfr;": "\uD835\uDD30", - "sfrown;": "\u2322", - "sharp;": "\u266F", - "SHCHcy;": "\u0429", - "shchcy;": "\u0449", - "SHcy;": "\u0428", - "shcy;": "\u0448", - "ShortDownArrow;": "\u2193", - "ShortLeftArrow;": "\u2190", - "shortmid;": "\u2223", - "shortparallel;": "\u2225", - "ShortRightArrow;": "\u2192", - "ShortUpArrow;": "\u2191", - "shy;": "\u00AD", - "shy": "\u00AD", - "Sigma;": "\u03A3", - "sigma;": "\u03C3", - "sigmaf;": "\u03C2", - "sigmav;": "\u03C2", - "sim;": "\u223C", - "simdot;": "\u2A6A", - "sime;": "\u2243", - "simeq;": "\u2243", - "simg;": "\u2A9E", - "simgE;": "\u2AA0", - "siml;": "\u2A9D", - "simlE;": "\u2A9F", - "simne;": "\u2246", - "simplus;": "\u2A24", - "simrarr;": "\u2972", - "slarr;": "\u2190", - "SmallCircle;": "\u2218", - "smallsetminus;": "\u2216", - "smashp;": "\u2A33", - "smeparsl;": "\u29E4", - "smid;": "\u2223", - "smile;": "\u2323", - "smt;": "\u2AAA", - "smte;": "\u2AAC", - "smtes;": "\u2AAC\uFE00", - "SOFTcy;": "\u042C", - "softcy;": "\u044C", - "solbar;": "\u233F", - "solb;": "\u29C4", - "sol;": "\u002F", - "Sopf;": "\uD835\uDD4A", - "sopf;": "\uD835\uDD64", - "spades;": "\u2660", - "spadesuit;": "\u2660", - "spar;": "\u2225", - "sqcap;": "\u2293", - "sqcaps;": "\u2293\uFE00", - "sqcup;": "\u2294", - "sqcups;": "\u2294\uFE00", - "Sqrt;": "\u221A", - "sqsub;": "\u228F", - "sqsube;": "\u2291", - "sqsubset;": "\u228F", - "sqsubseteq;": "\u2291", - "sqsup;": "\u2290", - "sqsupe;": "\u2292", - "sqsupset;": "\u2290", - "sqsupseteq;": "\u2292", - "square;": "\u25A1", - "Square;": "\u25A1", - "SquareIntersection;": "\u2293", - "SquareSubset;": "\u228F", - "SquareSubsetEqual;": "\u2291", - "SquareSuperset;": "\u2290", - "SquareSupersetEqual;": "\u2292", - "SquareUnion;": "\u2294", - "squarf;": "\u25AA", - "squ;": "\u25A1", - "squf;": "\u25AA", - "srarr;": "\u2192", - "Sscr;": "\uD835\uDCAE", - "sscr;": "\uD835\uDCC8", - "ssetmn;": "\u2216", - "ssmile;": "\u2323", - "sstarf;": "\u22C6", - "Star;": "\u22C6", - "star;": "\u2606", - "starf;": "\u2605", - "straightepsilon;": "\u03F5", - "straightphi;": "\u03D5", - "strns;": "\u00AF", - "sub;": "\u2282", - "Sub;": "\u22D0", - "subdot;": "\u2ABD", - "subE;": "\u2AC5", - "sube;": "\u2286", - "subedot;": "\u2AC3", - "submult;": "\u2AC1", - "subnE;": "\u2ACB", - "subne;": "\u228A", - "subplus;": "\u2ABF", - "subrarr;": "\u2979", - "subset;": "\u2282", - "Subset;": "\u22D0", - "subseteq;": "\u2286", - "subseteqq;": "\u2AC5", - "SubsetEqual;": "\u2286", - "subsetneq;": "\u228A", - "subsetneqq;": "\u2ACB", - "subsim;": "\u2AC7", - "subsub;": "\u2AD5", - "subsup;": "\u2AD3", - "succapprox;": "\u2AB8", - "succ;": "\u227B", - "succcurlyeq;": "\u227D", - "Succeeds;": "\u227B", - "SucceedsEqual;": "\u2AB0", - "SucceedsSlantEqual;": "\u227D", - "SucceedsTilde;": "\u227F", - "succeq;": "\u2AB0", - "succnapprox;": "\u2ABA", - "succneqq;": "\u2AB6", - "succnsim;": "\u22E9", - "succsim;": "\u227F", - "SuchThat;": "\u220B", - "sum;": "\u2211", - "Sum;": "\u2211", - "sung;": "\u266A", - "sup1;": "\u00B9", - "sup1": "\u00B9", - "sup2;": "\u00B2", - "sup2": "\u00B2", - "sup3;": "\u00B3", - "sup3": "\u00B3", - "sup;": "\u2283", - "Sup;": "\u22D1", - "supdot;": "\u2ABE", - "supdsub;": "\u2AD8", - "supE;": "\u2AC6", - "supe;": "\u2287", - "supedot;": "\u2AC4", - "Superset;": "\u2283", - "SupersetEqual;": "\u2287", - "suphsol;": "\u27C9", - "suphsub;": "\u2AD7", - "suplarr;": "\u297B", - "supmult;": "\u2AC2", - "supnE;": "\u2ACC", - "supne;": "\u228B", - "supplus;": "\u2AC0", - "supset;": "\u2283", - "Supset;": "\u22D1", - "supseteq;": "\u2287", - "supseteqq;": "\u2AC6", - "supsetneq;": "\u228B", - "supsetneqq;": "\u2ACC", - "supsim;": "\u2AC8", - "supsub;": "\u2AD4", - "supsup;": "\u2AD6", - "swarhk;": "\u2926", - "swarr;": "\u2199", - "swArr;": "\u21D9", - "swarrow;": "\u2199", - "swnwar;": "\u292A", - "szlig;": "\u00DF", - "szlig": "\u00DF", - "Tab;": "\u0009", - "target;": "\u2316", - "Tau;": "\u03A4", - "tau;": "\u03C4", - "tbrk;": "\u23B4", - "Tcaron;": "\u0164", - "tcaron;": "\u0165", - "Tcedil;": "\u0162", - "tcedil;": "\u0163", - "Tcy;": "\u0422", - "tcy;": "\u0442", - "tdot;": "\u20DB", - "telrec;": "\u2315", - "Tfr;": "\uD835\uDD17", - "tfr;": "\uD835\uDD31", - "there4;": "\u2234", - "therefore;": "\u2234", - "Therefore;": "\u2234", - "Theta;": "\u0398", - "theta;": "\u03B8", - "thetasym;": "\u03D1", - "thetav;": "\u03D1", - "thickapprox;": "\u2248", - "thicksim;": "\u223C", - "ThickSpace;": "\u205F\u200A", - "ThinSpace;": "\u2009", - "thinsp;": "\u2009", - "thkap;": "\u2248", - "thksim;": "\u223C", - "THORN;": "\u00DE", - "THORN": "\u00DE", - "thorn;": "\u00FE", - "thorn": "\u00FE", - "tilde;": "\u02DC", - "Tilde;": "\u223C", - "TildeEqual;": "\u2243", - "TildeFullEqual;": "\u2245", - "TildeTilde;": "\u2248", - "timesbar;": "\u2A31", - "timesb;": "\u22A0", - "times;": "\u00D7", - "times": "\u00D7", - "timesd;": "\u2A30", - "tint;": "\u222D", - "toea;": "\u2928", - "topbot;": "\u2336", - "topcir;": "\u2AF1", - "top;": "\u22A4", - "Topf;": "\uD835\uDD4B", - "topf;": "\uD835\uDD65", - "topfork;": "\u2ADA", - "tosa;": "\u2929", - "tprime;": "\u2034", - "trade;": "\u2122", - "TRADE;": "\u2122", - "triangle;": "\u25B5", - "triangledown;": "\u25BF", - "triangleleft;": "\u25C3", - "trianglelefteq;": "\u22B4", - "triangleq;": "\u225C", - "triangleright;": "\u25B9", - "trianglerighteq;": "\u22B5", - "tridot;": "\u25EC", - "trie;": "\u225C", - "triminus;": "\u2A3A", - "TripleDot;": "\u20DB", - "triplus;": "\u2A39", - "trisb;": "\u29CD", - "tritime;": "\u2A3B", - "trpezium;": "\u23E2", - "Tscr;": "\uD835\uDCAF", - "tscr;": "\uD835\uDCC9", - "TScy;": "\u0426", - "tscy;": "\u0446", - "TSHcy;": "\u040B", - "tshcy;": "\u045B", - "Tstrok;": "\u0166", - "tstrok;": "\u0167", - "twixt;": "\u226C", - "twoheadleftarrow;": "\u219E", - "twoheadrightarrow;": "\u21A0", - "Uacute;": "\u00DA", - "Uacute": "\u00DA", - "uacute;": "\u00FA", - "uacute": "\u00FA", - "uarr;": "\u2191", - "Uarr;": "\u219F", - "uArr;": "\u21D1", - "Uarrocir;": "\u2949", - "Ubrcy;": "\u040E", - "ubrcy;": "\u045E", - "Ubreve;": "\u016C", - "ubreve;": "\u016D", - "Ucirc;": "\u00DB", - "Ucirc": "\u00DB", - "ucirc;": "\u00FB", - "ucirc": "\u00FB", - "Ucy;": "\u0423", - "ucy;": "\u0443", - "udarr;": "\u21C5", - "Udblac;": "\u0170", - "udblac;": "\u0171", - "udhar;": "\u296E", - "ufisht;": "\u297E", - "Ufr;": "\uD835\uDD18", - "ufr;": "\uD835\uDD32", - "Ugrave;": "\u00D9", - "Ugrave": "\u00D9", - "ugrave;": "\u00F9", - "ugrave": "\u00F9", - "uHar;": "\u2963", - "uharl;": "\u21BF", - "uharr;": "\u21BE", - "uhblk;": "\u2580", - "ulcorn;": "\u231C", - "ulcorner;": "\u231C", - "ulcrop;": "\u230F", - "ultri;": "\u25F8", - "Umacr;": "\u016A", - "umacr;": "\u016B", - "uml;": "\u00A8", - "uml": "\u00A8", - "UnderBar;": "\u005F", - "UnderBrace;": "\u23DF", - "UnderBracket;": "\u23B5", - "UnderParenthesis;": "\u23DD", - "Union;": "\u22C3", - "UnionPlus;": "\u228E", - "Uogon;": "\u0172", - "uogon;": "\u0173", - "Uopf;": "\uD835\uDD4C", - "uopf;": "\uD835\uDD66", - "UpArrowBar;": "\u2912", - "uparrow;": "\u2191", - "UpArrow;": "\u2191", - "Uparrow;": "\u21D1", - "UpArrowDownArrow;": "\u21C5", - "updownarrow;": "\u2195", - "UpDownArrow;": "\u2195", - "Updownarrow;": "\u21D5", - "UpEquilibrium;": "\u296E", - "upharpoonleft;": "\u21BF", - "upharpoonright;": "\u21BE", - "uplus;": "\u228E", - "UpperLeftArrow;": "\u2196", - "UpperRightArrow;": "\u2197", - "upsi;": "\u03C5", - "Upsi;": "\u03D2", - "upsih;": "\u03D2", - "Upsilon;": "\u03A5", - "upsilon;": "\u03C5", - "UpTeeArrow;": "\u21A5", - "UpTee;": "\u22A5", - "upuparrows;": "\u21C8", - "urcorn;": "\u231D", - "urcorner;": "\u231D", - "urcrop;": "\u230E", - "Uring;": "\u016E", - "uring;": "\u016F", - "urtri;": "\u25F9", - "Uscr;": "\uD835\uDCB0", - "uscr;": "\uD835\uDCCA", - "utdot;": "\u22F0", - "Utilde;": "\u0168", - "utilde;": "\u0169", - "utri;": "\u25B5", - "utrif;": "\u25B4", - "uuarr;": "\u21C8", - "Uuml;": "\u00DC", - "Uuml": "\u00DC", - "uuml;": "\u00FC", - "uuml": "\u00FC", - "uwangle;": "\u29A7", - "vangrt;": "\u299C", - "varepsilon;": "\u03F5", - "varkappa;": "\u03F0", - "varnothing;": "\u2205", - "varphi;": "\u03D5", - "varpi;": "\u03D6", - "varpropto;": "\u221D", - "varr;": "\u2195", - "vArr;": "\u21D5", - "varrho;": "\u03F1", - "varsigma;": "\u03C2", - "varsubsetneq;": "\u228A\uFE00", - "varsubsetneqq;": "\u2ACB\uFE00", - "varsupsetneq;": "\u228B\uFE00", - "varsupsetneqq;": "\u2ACC\uFE00", - "vartheta;": "\u03D1", - "vartriangleleft;": "\u22B2", - "vartriangleright;": "\u22B3", - "vBar;": "\u2AE8", - "Vbar;": "\u2AEB", - "vBarv;": "\u2AE9", - "Vcy;": "\u0412", - "vcy;": "\u0432", - "vdash;": "\u22A2", - "vDash;": "\u22A8", - "Vdash;": "\u22A9", - "VDash;": "\u22AB", - "Vdashl;": "\u2AE6", - "veebar;": "\u22BB", - "vee;": "\u2228", - "Vee;": "\u22C1", - "veeeq;": "\u225A", - "vellip;": "\u22EE", - "verbar;": "\u007C", - "Verbar;": "\u2016", - "vert;": "\u007C", - "Vert;": "\u2016", - "VerticalBar;": "\u2223", - "VerticalLine;": "\u007C", - "VerticalSeparator;": "\u2758", - "VerticalTilde;": "\u2240", - "VeryThinSpace;": "\u200A", - "Vfr;": "\uD835\uDD19", - "vfr;": "\uD835\uDD33", - "vltri;": "\u22B2", - "vnsub;": "\u2282\u20D2", - "vnsup;": "\u2283\u20D2", - "Vopf;": "\uD835\uDD4D", - "vopf;": "\uD835\uDD67", - "vprop;": "\u221D", - "vrtri;": "\u22B3", - "Vscr;": "\uD835\uDCB1", - "vscr;": "\uD835\uDCCB", - "vsubnE;": "\u2ACB\uFE00", - "vsubne;": "\u228A\uFE00", - "vsupnE;": "\u2ACC\uFE00", - "vsupne;": "\u228B\uFE00", - "Vvdash;": "\u22AA", - "vzigzag;": "\u299A", - "Wcirc;": "\u0174", - "wcirc;": "\u0175", - "wedbar;": "\u2A5F", - "wedge;": "\u2227", - "Wedge;": "\u22C0", - "wedgeq;": "\u2259", - "weierp;": "\u2118", - "Wfr;": "\uD835\uDD1A", - "wfr;": "\uD835\uDD34", - "Wopf;": "\uD835\uDD4E", - "wopf;": "\uD835\uDD68", - "wp;": "\u2118", - "wr;": "\u2240", - "wreath;": "\u2240", - "Wscr;": "\uD835\uDCB2", - "wscr;": "\uD835\uDCCC", - "xcap;": "\u22C2", - "xcirc;": "\u25EF", - "xcup;": "\u22C3", - "xdtri;": "\u25BD", - "Xfr;": "\uD835\uDD1B", - "xfr;": "\uD835\uDD35", - "xharr;": "\u27F7", - "xhArr;": "\u27FA", - "Xi;": "\u039E", - "xi;": "\u03BE", - "xlarr;": "\u27F5", - "xlArr;": "\u27F8", - "xmap;": "\u27FC", - "xnis;": "\u22FB", - "xodot;": "\u2A00", - "Xopf;": "\uD835\uDD4F", - "xopf;": "\uD835\uDD69", - "xoplus;": "\u2A01", - "xotime;": "\u2A02", - "xrarr;": "\u27F6", - "xrArr;": "\u27F9", - "Xscr;": "\uD835\uDCB3", - "xscr;": "\uD835\uDCCD", - "xsqcup;": "\u2A06", - "xuplus;": "\u2A04", - "xutri;": "\u25B3", - "xvee;": "\u22C1", - "xwedge;": "\u22C0", - "Yacute;": "\u00DD", - "Yacute": "\u00DD", - "yacute;": "\u00FD", - "yacute": "\u00FD", - "YAcy;": "\u042F", - "yacy;": "\u044F", - "Ycirc;": "\u0176", - "ycirc;": "\u0177", - "Ycy;": "\u042B", - "ycy;": "\u044B", - "yen;": "\u00A5", - "yen": "\u00A5", - "Yfr;": "\uD835\uDD1C", - "yfr;": "\uD835\uDD36", - "YIcy;": "\u0407", - "yicy;": "\u0457", - "Yopf;": "\uD835\uDD50", - "yopf;": "\uD835\uDD6A", - "Yscr;": "\uD835\uDCB4", - "yscr;": "\uD835\uDCCE", - "YUcy;": "\u042E", - "yucy;": "\u044E", - "yuml;": "\u00FF", - "yuml": "\u00FF", - "Yuml;": "\u0178", - "Zacute;": "\u0179", - "zacute;": "\u017A", - "Zcaron;": "\u017D", - "zcaron;": "\u017E", - "Zcy;": "\u0417", - "zcy;": "\u0437", - "Zdot;": "\u017B", - "zdot;": "\u017C", - "zeetrf;": "\u2128", - "ZeroWidthSpace;": "\u200B", - "Zeta;": "\u0396", - "zeta;": "\u03B6", - "zfr;": "\uD835\uDD37", - "Zfr;": "\u2128", - "ZHcy;": "\u0416", - "zhcy;": "\u0436", - "zigrarr;": "\u21DD", - "zopf;": "\uD835\uDD6B", - "Zopf;": "\u2124", - "Zscr;": "\uD835\uDCB5", - "zscr;": "\uD835\uDCCF", - "zwj;": "\u200D", - "zwnj;": "\u200C" -}; - -}, -{}], -13:[function(_dereq_,module,exports){ -var util = _dereq_('util/'); - -var pSlice = Array.prototype.slice; -var hasOwn = Object.prototype.hasOwnProperty; - -var assert = module.exports = ok; - -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - if (options.message) { - this.message = options.message; - this.generatedMessage = false; - } else { - this.message = getMessage(this); - this.generatedMessage = true; - } - var stackStartFunction = options.stackStartFunction || fail; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } - else { - var err = new Error(); - if (err.stack) { - var out = err.stack; - var fn_name = stackStartFunction.name; - var idx = out.indexOf('\n' + fn_name); - if (idx >= 0) { - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - - this.stack = out; - } - } -}; -util.inherits(assert.AssertionError, Error); - -function replacer(key, value) { - if (util.isUndefined(value)) { - return '' + value; - } - if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) { - return value.toString(); - } - if (util.isFunction(value) || util.isRegExp(value)) { - return value.toString(); - } - return value; -} - -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} - -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} -assert.fail = fail; - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - } else { - return objEquiv(actual, expected); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - if (a.prototype !== b.prototype) return false; - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try { - var ka = objectKeys(a), - kb = objectKeys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - if (ka.length != kb.length) - return false; - ka.sort(); - kb.sort(); - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if (actual instanceof expected) { - return true; - } else if (expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (util.isString(expected)) { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function(err) { if (err) {throw err;}}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if (hasOwn.call(obj, key)) keys.push(key); - } - return keys; -}; - -}, -{"util/":15}], -14:[function(_dereq_,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} -}, -{}], -15:[function(_dereq_,module,exports){ -(function (process,global){ - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; -exports.deprecate = function(fn, msg) { - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; -function inspect(obj, opts) { - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - ctx.showHidden = opts; - } else if (opts) { - exports._extend(ctx, opts); - } - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - if (ctx.customInspect && - value && - isFunction(value.inspect) && - value.inspect !== exports.inspect && - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = _dereq_('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; -exports.inherits = _dereq_('inherits'); - -exports._extend = function(origin, add) { - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -}).call(this,_dereq_("/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -}, -{"./support/isBuffer":14,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,"inherits":17}], -16:[function(_dereq_,module,exports){ - -function EventEmitter() { - this._events = this._events || {}; - this._maxListeners = this._maxListeners || undefined; -} -module.exports = EventEmitter; -EventEmitter.EventEmitter = EventEmitter; - -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; -EventEmitter.defaultMaxListeners = 10; -EventEmitter.prototype.setMaxListeners = function(n) { - if (!isNumber(n) || n < 0 || isNaN(n)) - throw TypeError('n must be a positive number'); - this._maxListeners = n; - return this; -}; - -EventEmitter.prototype.emit = function(type) { - var er, handler, len, args, i, listeners; - - if (!this._events) - this._events = {}; - if (type === 'error') { - if (!this._events.error || - (isObject(this._events.error) && !this._events.error.length)) { - er = arguments[1]; - if (er instanceof Error) { - throw er; // Unhandled 'error' event - } else { - throw TypeError('Uncaught, unspecified "error" event.'); - } - return false; - } - } - - handler = this._events[type]; - - if (isUndefined(handler)) - return false; - - if (isFunction(handler)) { - switch (arguments.length) { - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - default: - len = arguments.length; - args = new Array(len - 1); - for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; - handler.apply(this, args); - } - } else if (isObject(handler)) { - len = arguments.length; - args = new Array(len - 1); - for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; - - listeners = handler.slice(); - len = listeners.length; - for (i = 0; i < len; i++) - listeners[i].apply(this, args); - } - - return true; -}; - -EventEmitter.prototype.addListener = function(type, listener) { - var m; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events) - this._events = {}; - if (this._events.newListener) - this.emit('newListener', type, - isFunction(listener.listener) ? - listener.listener : listener); - - if (!this._events[type]) - this._events[type] = listener; - else if (isObject(this._events[type])) - this._events[type].push(listener); - else - this._events[type] = [this._events[type], listener]; - if (isObject(this._events[type]) && !this._events[type].warned) { - var m; - if (!isUndefined(this._maxListeners)) { - m = this._maxListeners; - } else { - m = EventEmitter.defaultMaxListeners; - } - - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - console.trace(); - } - } - - return this; -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.once = function(type, listener) { - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - var fired = false; - - function g() { - this.removeListener(type, g); - - if (!fired) { - fired = true; - listener.apply(this, arguments); - } - } - - g.listener = listener; - this.on(type, g); - - return this; -}; -EventEmitter.prototype.removeListener = function(type, listener) { - var list, position, length, i; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events || !this._events[type]) - return this; - - list = this._events[type]; - length = list.length; - position = -1; - - if (list === listener || - (isFunction(list.listener) && list.listener === listener)) { - delete this._events[type]; - if (this._events.removeListener) - this.emit('removeListener', type, listener); - - } else if (isObject(list)) { - for (i = length; i-- > 0;) { - if (list[i] === listener || - (list[i].listener && list[i].listener === listener)) { - position = i; - break; - } - } - - if (position < 0) - return this; - - if (list.length === 1) { - list.length = 0; - delete this._events[type]; - } else { - list.splice(position, 1); - } - - if (this._events.removeListener) - this.emit('removeListener', type, listener); - } - - return this; -}; - -EventEmitter.prototype.removeAllListeners = function(type) { - var key, listeners; - - if (!this._events) - return this; - if (!this._events.removeListener) { - if (arguments.length === 0) - this._events = {}; - else if (this._events[type]) - delete this._events[type]; - return this; - } - if (arguments.length === 0) { - for (key in this._events) { - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = {}; - return this; - } - - listeners = this._events[type]; - - if (isFunction(listeners)) { - this.removeListener(type, listeners); - } else { - while (listeners.length) - this.removeListener(type, listeners[listeners.length - 1]); - } - delete this._events[type]; - - return this; -}; - -EventEmitter.prototype.listeners = function(type) { - var ret; - if (!this._events || !this._events[type]) - ret = []; - else if (isFunction(this._events[type])) - ret = [this._events[type]]; - else - ret = this._events[type].slice(); - return ret; -}; - -EventEmitter.listenerCount = function(emitter, type) { - var ret; - if (!emitter._events || !emitter._events[type]) - ret = 0; - else if (isFunction(emitter._events[type])) - ret = 1; - else - ret = emitter._events[type].length; - return ret; -}; - -function isFunction(arg) { - return typeof arg === 'function'; -} - -function isNumber(arg) { - return typeof arg === 'number'; -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -function isUndefined(arg) { - return arg === void 0; -} - -}, -{}], -17:[function(_dereq_,module,exports){ -if (typeof Object.create === 'function') { - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -}, -{}], -18:[function(_dereq_,module,exports){ - -var process = module.exports = {}; - -process.nextTick = (function () { - var canSetImmediate = typeof window !== 'undefined' - && window.setImmediate; - var canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canSetImmediate) { - return function (f) { return window.setImmediate(f) }; - } - - if (canPost) { - var queue = []; - window.addEventListener('message', function (ev) { - var source = ev.source; - if ((source === window || source === null) && ev.data === 'process-tick') { - ev.stopPropagation(); - if (queue.length > 0) { - var fn = queue.shift(); - fn(); - } - } - }, true); - - return function nextTick(fn) { - queue.push(fn); - window.postMessage('process-tick', '*'); - }; - } - - return function nextTick(fn) { - setTimeout(fn, 0); - }; -})(); - -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; - -function noop() {} - -process.on = noop; -process.once = noop; -process.off = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -} -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; - -}, -{}], -19:[function(_dereq_,module,exports){ -module.exports=_dereq_(14) -}, -{}], -20:[function(_dereq_,module,exports){ -module.exports=_dereq_(15) -}, -{"./support/isBuffer":19,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,"inherits":17}]},{},[9]) -(9) - -}); - -define("ace/mode/html_worker",[], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var Mirror = require("../worker/mirror").Mirror; -var SAXParser = require("./html/saxparser").SAXParser; - -var errorTypes = { - "expected-doctype-but-got-start-tag": "info", - "expected-doctype-but-got-chars": "info", - "non-html-root": "info" -}; - -var Worker = exports.Worker = function(sender) { - Mirror.call(this, sender); - this.setTimeout(400); - this.context = null; -}; - -oop.inherits(Worker, Mirror); - -(function() { - - this.setOptions = function(options) { - this.context = options.context; - }; - - this.onUpdate = function() { - var value = this.doc.getValue(); - if (!value) - return; - var parser = new SAXParser(); - var errors = []; - var noop = function(){}; - parser.contentHandler = { - startDocument: noop, - endDocument: noop, - startElement: noop, - endElement: noop, - characters: noop - }; - parser.errorHandler = { - error: function(message, location, code) { - errors.push({ - row: location.line, - column: location.column, - text: message, - type: errorTypes[code] || "error" - }); - } - }; - if (this.context) - parser.parseFragment(value, this.context); - else - parser.parse(value); - this.sender.emit("error", errors); - }; - -}).call(Worker.prototype); - -}); diff --git a/src/ace/worker-javascript.js b/src/ace/worker-javascript.js deleted file mode 100644 index c45f4e050..000000000 --- a/src/ace/worker-javascript.js +++ /dev/null @@ -1,15001 +0,0 @@ -"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.data, - file: file, - line: line, - col: col, - stack: 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 = {}; -require.tlns = {}; -window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { - for (var i in topLevelNamespaces) - 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 = 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/range",[], function(require, exports, module) { -"use strict"; -var comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; -var Range = function(startRow, startColumn, endRow, endColumn) { - this.start = { - row: startRow, - column: startColumn - }; - - this.end = { - row: endRow, - column: endColumn - }; -}; - -(function() { - this.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; - }; - this.toString = function() { - return ("Range: [" + this.start.row + "/" + this.start.column + - "] -> [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.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; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.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; - } - }; - this.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; - } - }; - this.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; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.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; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.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); - } - }; - this.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); - }; - this.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); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.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); - }; - this.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 - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -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 this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - 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 - }; - } - this.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 - }); - }; - this.detach = function() { - this.document.off("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$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; - }; - -}).call(Anchor.prototype); - -}); - -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 = function(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); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.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); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.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; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.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); - }; - - this.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}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$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; - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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; - }; - this.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: ["", ""] - }); - } - }; - this.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; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.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); - } - }; - - this.$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); - } - }; - - this.$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); - }; - this.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() - }); - }; - this.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}; - }; - this.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; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -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= 65 && i <= 90 || // A-Z - i === 95 || // _ - i >= 97 && i <= 122; // a-z -} - -var identifierPartTable = []; - -for (var i = 0; i < 128; i++) { - identifierPartTable[i] = - identifierStartTable[i] || // $, _, A-Z, a-z - i >= 48 && i <= 57; // 0-9 -} - -module.exports = { - asciiIdentifierStartTable: identifierStartTable, - asciiIdentifierPartTable: identifierPartTable -}; - -},{}],"/../../jshint/data/es5-identifier-names.js":[function(_dereq_,module,exports){ -module.exports = /^(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0525\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0621-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971\u0972\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D3D\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC\u0EDD\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8B\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10D0-\u10FA\u10FC\u1100-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u2094\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2D00-\u2D25\u2D30-\u2D65\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31B7\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCB\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA65F\uA662-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B\uA78C\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA2D\uFA30-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC])(?:[\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0525\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0621-\u065E\u0660-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0900-\u0939\u093C-\u094E\u0950-\u0955\u0958-\u0963\u0966-\u096F\u0971\u0972\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC\u0EDD\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F8B\u0F90-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10D0-\u10FA\u10FC\u1100-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17B3\u17B6-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BAA\u1BAE-\u1BB9\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF2\u1D00-\u1DE6\u1DFD-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u2094\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF1\u2D00-\u2D25\u2D30-\u2D65\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31B7\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCB\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA65F\uA662-\uA66F\uA67C\uA67D\uA67F-\uA697\uA6A0-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B\uA78C\uA7FB-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA2D\uFA30-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC])*$/; -},{}],"/../../jshint/data/non-ascii-identifier-part-only.js":[function(_dereq_,module,exports){ -var str = '183,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,903,1155,1156,1157,1158,1159,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437,1438,1439,1440,1441,1442,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452,1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1471,1473,1474,1476,1477,1479,1552,1553,1554,1555,1556,1557,1558,1559,1560,1561,1562,1611,1612,1613,1614,1615,1616,1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1640,1641,1648,1750,1751,1752,1753,1754,1755,1756,1759,1760,1761,1762,1763,1764,1767,1768,1770,1771,1772,1773,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1809,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1860,1861,1862,1863,1864,1865,1866,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,2027,2028,2029,2030,2031,2032,2033,2034,2035,2045,2070,2071,2072,2073,2075,2076,2077,2078,2079,2080,2081,2082,2083,2085,2086,2087,2089,2090,2091,2092,2093,2137,2138,2139,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2293,2294,2295,2296,2297,2298,2299,2300,2301,2302,2303,2304,2305,2306,2307,2362,2363,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2385,2386,2387,2388,2389,2390,2391,2402,2403,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2433,2434,2435,2492,2494,2495,2496,2497,2498,2499,2500,2503,2504,2507,2508,2509,2519,2530,2531,2534,2535,2536,2537,2538,2539,2540,2541,2542,2543,2558,2561,2562,2563,2620,2622,2623,2624,2625,2626,2631,2632,2635,2636,2637,2641,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2677,2689,2690,2691,2748,2750,2751,2752,2753,2754,2755,2756,2757,2759,2760,2761,2763,2764,2765,2786,2787,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2810,2811,2812,2813,2814,2815,2817,2818,2819,2876,2878,2879,2880,2881,2882,2883,2884,2887,2888,2891,2892,2893,2902,2903,2914,2915,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2946,3006,3007,3008,3009,3010,3014,3015,3016,3018,3019,3020,3021,3031,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3072,3073,3074,3075,3076,3134,3135,3136,3137,3138,3139,3140,3142,3143,3144,3146,3147,3148,3149,3157,3158,3170,3171,3174,3175,3176,3177,3178,3179,3180,3181,3182,3183,3201,3202,3203,3260,3262,3263,3264,3265,3266,3267,3268,3270,3271,3272,3274,3275,3276,3277,3285,3286,3298,3299,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3328,3329,3330,3331,3387,3388,3390,3391,3392,3393,3394,3395,3396,3398,3399,3400,3402,3403,3404,3405,3415,3426,3427,3430,3431,3432,3433,3434,3435,3436,3437,3438,3439,3458,3459,3530,3535,3536,3537,3538,3539,3540,3542,3544,3545,3546,3547,3548,3549,3550,3551,3558,3559,3560,3561,3562,3563,3564,3565,3566,3567,3570,3571,3633,3636,3637,3638,3639,3640,3641,3642,3655,3656,3657,3658,3659,3660,3661,3662,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3761,3764,3765,3766,3767,3768,3769,3771,3772,3784,3785,3786,3787,3788,3789,3792,3793,3794,3795,3796,3797,3798,3799,3800,3801,3864,3865,3872,3873,3874,3875,3876,3877,3878,3879,3880,3881,3893,3895,3897,3902,3903,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,3965,3966,3967,3968,3969,3970,3971,3972,3974,3975,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,3993,3994,3995,3996,3997,3998,3999,4000,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,4024,4025,4026,4027,4028,4038,4139,4140,4141,4142,4143,4144,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,4158,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4182,4183,4184,4185,4190,4191,4192,4194,4195,4196,4199,4200,4201,4202,4203,4204,4205,4209,4210,4211,4212,4226,4227,4228,4229,4230,4231,4232,4233,4234,4235,4236,4237,4239,4240,4241,4242,4243,4244,4245,4246,4247,4248,4249,4250,4251,4252,4253,4957,4958,4959,4969,4970,4971,4972,4973,4974,4975,4976,4977,5906,5907,5908,5938,5939,5940,5970,5971,6002,6003,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6109,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121,6155,6156,6157,6160,6161,6162,6163,6164,6165,6166,6167,6168,6169,6313,6432,6433,6434,6435,6436,6437,6438,6439,6440,6441,6442,6443,6448,6449,6450,6451,6452,6453,6454,6455,6456,6457,6458,6459,6470,6471,6472,6473,6474,6475,6476,6477,6478,6479,6608,6609,6610,6611,6612,6613,6614,6615,6616,6617,6618,6679,6680,6681,6682,6683,6741,6742,6743,6744,6745,6746,6747,6748,6749,6750,6752,6753,6754,6755,6756,6757,6758,6759,6760,6761,6762,6763,6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777,6778,6779,6780,6783,6784,6785,6786,6787,6788,6789,6790,6791,6792,6793,6800,6801,6802,6803,6804,6805,6806,6807,6808,6809,6832,6833,6834,6835,6836,6837,6838,6839,6840,6841,6842,6843,6844,6845,6912,6913,6914,6915,6916,6964,6965,6966,6967,6968,6969,6970,6971,6972,6973,6974,6975,6976,6977,6978,6979,6980,6992,6993,6994,6995,6996,6997,6998,6999,7000,7001,7019,7020,7021,7022,7023,7024,7025,7026,7027,7040,7041,7042,7073,7074,7075,7076,7077,7078,7079,7080,7081,7082,7083,7084,7085,7088,7089,7090,7091,7092,7093,7094,7095,7096,7097,7142,7143,7144,7145,7146,7147,7148,7149,7150,7151,7152,7153,7154,7155,7204,7205,7206,7207,7208,7209,7210,7211,7212,7213,7214,7215,7216,7217,7218,7219,7220,7221,7222,7223,7232,7233,7234,7235,7236,7237,7238,7239,7240,7241,7248,7249,7250,7251,7252,7253,7254,7255,7256,7257,7376,7377,7378,7380,7381,7382,7383,7384,7385,7386,7387,7388,7389,7390,7391,7392,7393,7394,7395,7396,7397,7398,7399,7400,7405,7410,7411,7412,7415,7416,7417,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659,7660,7661,7662,7663,7664,7665,7666,7667,7668,7669,7670,7671,7672,7673,7675,7676,7677,7678,7679,8204,8205,8255,8256,8276,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8417,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,11503,11504,11505,11647,11744,11745,11746,11747,11748,11749,11750,11751,11752,11753,11754,11755,11756,11757,11758,11759,11760,11761,11762,11763,11764,11765,11766,11767,11768,11769,11770,11771,11772,11773,11774,11775,12330,12331,12332,12333,12334,12335,12441,12442,42528,42529,42530,42531,42532,42533,42534,42535,42536,42537,42607,42612,42613,42614,42615,42616,42617,42618,42619,42620,42621,42654,42655,42736,42737,43010,43014,43019,43043,43044,43045,43046,43047,43136,43137,43188,43189,43190,43191,43192,43193,43194,43195,43196,43197,43198,43199,43200,43201,43202,43203,43204,43205,43216,43217,43218,43219,43220,43221,43222,43223,43224,43225,43232,43233,43234,43235,43236,43237,43238,43239,43240,43241,43242,43243,43244,43245,43246,43247,43248,43249,43263,43264,43265,43266,43267,43268,43269,43270,43271,43272,43273,43302,43303,43304,43305,43306,43307,43308,43309,43335,43336,43337,43338,43339,43340,43341,43342,43343,43344,43345,43346,43347,43392,43393,43394,43395,43443,43444,43445,43446,43447,43448,43449,43450,43451,43452,43453,43454,43455,43456,43472,43473,43474,43475,43476,43477,43478,43479,43480,43481,43493,43504,43505,43506,43507,43508,43509,43510,43511,43512,43513,43561,43562,43563,43564,43565,43566,43567,43568,43569,43570,43571,43572,43573,43574,43587,43596,43597,43600,43601,43602,43603,43604,43605,43606,43607,43608,43609,43643,43644,43645,43696,43698,43699,43700,43703,43704,43710,43711,43713,43755,43756,43757,43758,43759,43765,43766,44003,44004,44005,44006,44007,44008,44009,44010,44012,44013,44016,44017,44018,44019,44020,44021,44022,44023,44024,44025,64286,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65056,65057,65058,65059,65060,65061,65062,65063,65064,65065,65066,65067,65068,65069,65070,65071,65075,65076,65101,65102,65103,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65343'; -var arr = str.split(',').map(function(code) { - return parseInt(code, 10); -}); -module.exports = arr; -},{}],"/../../jshint/data/non-ascii-identifier-start.js":[function(_dereq_,module,exports){ -var str = '170,181,186,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,710,711,712,713,714,715,716,717,718,719,720,721,736,737,738,739,740,748,750,880,881,882,883,884,886,887,890,891,892,893,895,902,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131,1132,1133,1134,1135,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,1147,1148,1149,1150,1151,1152,1153,1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1364,1365,1366,1369,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1403,1404,1405,1406,1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1519,1520,1521,1522,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1749,1765,1766,1774,1775,1786,1787,1788,1791,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2144,2145,2146,2147,2148,2149,2150,2151,2152,2153,2154,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2230,2231,2232,2233,2234,2235,2236,2237,2308,2309,2310,2311,2312,2313,2314,2315,2316,2317,2318,2319,2320,2321,2322,2323,2324,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2365,2384,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2437,2438,2439,2440,2441,2442,2443,2444,2447,2448,2451,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462,2463,2464,2465,2466,2467,2468,2469,2470,2471,2472,2474,2475,2476,2477,2478,2479,2480,2482,2486,2487,2488,2489,2493,2510,2524,2525,2527,2528,2529,2544,2545,2556,2565,2566,2567,2568,2569,2570,2575,2576,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,2591,2592,2593,2594,2595,2596,2597,2598,2599,2600,2602,2603,2604,2605,2606,2607,2608,2610,2611,2613,2614,2616,2617,2649,2650,2651,2652,2654,2674,2675,2676,2693,2694,2695,2696,2697,2698,2699,2700,2701,2703,2704,2705,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2730,2731,2732,2733,2734,2735,2736,2738,2739,2741,2742,2743,2744,2745,2749,2768,2784,2785,2809,2821,2822,2823,2824,2825,2826,2827,2828,2831,2832,2835,2836,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,2858,2859,2860,2861,2862,2863,2864,2866,2867,2869,2870,2871,2872,2873,2877,2908,2909,2911,2912,2913,2929,2947,2949,2950,2951,2952,2953,2954,2958,2959,2960,2962,2963,2964,2965,2969,2970,2972,2974,2975,2979,2980,2984,2985,2986,2990,2991,2992,2993,2994,2995,2996,2997,2998,2999,3000,3001,3024,3077,3078,3079,3080,3081,3082,3083,3084,3086,3087,3088,3090,3091,3092,3093,3094,3095,3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,3109,3110,3111,3112,3114,3115,3116,3117,3118,3119,3120,3121,3122,3123,3124,3125,3126,3127,3128,3129,3133,3160,3161,3162,3168,3169,3200,3205,3206,3207,3208,3209,3210,3211,3212,3214,3215,3216,3218,3219,3220,3221,3222,3223,3224,3225,3226,3227,3228,3229,3230,3231,3232,3233,3234,3235,3236,3237,3238,3239,3240,3242,3243,3244,3245,3246,3247,3248,3249,3250,3251,3253,3254,3255,3256,3257,3261,3294,3296,3297,3313,3314,3333,3334,3335,3336,3337,3338,3339,3340,3342,3343,3344,3346,3347,3348,3349,3350,3351,3352,3353,3354,3355,3356,3357,3358,3359,3360,3361,3362,3363,3364,3365,3366,3367,3368,3369,3370,3371,3372,3373,3374,3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3389,3406,3412,3413,3414,3423,3424,3425,3450,3451,3452,3453,3454,3455,3461,3462,3463,3464,3465,3466,3467,3468,3469,3470,3471,3472,3473,3474,3475,3476,3477,3478,3482,3483,3484,3485,3486,3487,3488,3489,3490,3491,3492,3493,3494,3495,3496,3497,3498,3499,3500,3501,3502,3503,3504,3505,3507,3508,3509,3510,3511,3512,3513,3514,3515,3517,3520,3521,3522,3523,3524,3525,3526,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3634,3635,3648,3649,3650,3651,3652,3653,3654,3713,3714,3716,3719,3720,3722,3725,3732,3733,3734,3735,3737,3738,3739,3740,3741,3742,3743,3745,3746,3747,3749,3751,3754,3755,3757,3758,3759,3760,3762,3763,3773,3776,3777,3778,3779,3780,3782,3804,3805,3806,3807,3840,3904,3905,3906,3907,3908,3909,3910,3911,3913,3914,3915,3916,3917,3918,3919,3920,3921,3922,3923,3924,3925,3926,3927,3928,3929,3930,3931,3932,3933,3934,3935,3936,3937,3938,3939,3940,3941,3942,3943,3944,3945,3946,3947,3948,3976,3977,3978,3979,3980,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4115,4116,4117,4118,4119,4120,4121,4122,4123,4124,4125,4126,4127,4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,4138,4159,4176,4177,4178,4179,4180,4181,4186,4187,4188,4189,4193,4197,4198,4206,4207,4208,4213,4214,4215,4216,4217,4218,4219,4220,4221,4222,4223,4224,4225,4238,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,4266,4267,4268,4269,4270,4271,4272,4273,4274,4275,4276,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,4288,4289,4290,4291,4292,4293,4295,4301,4304,4305,4306,4307,4308,4309,4310,4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,4327,4328,4329,4330,4331,4332,4333,4334,4335,4336,4337,4338,4339,4340,4341,4342,4343,4344,4345,4346,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,4358,4359,4360,4361,4362,4363,4364,4365,4366,4367,4368,4369,4370,4371,4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,4417,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,4443,4444,4445,4446,4447,4448,4449,4450,4451,4452,4453,4454,4455,4456,4457,4458,4459,4460,4461,4462,4463,4464,4465,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475,4476,4477,4478,4479,4480,4481,4482,4483,4484,4485,4486,4487,4488,4489,4490,4491,4492,4493,4494,4495,4496,4497,4498,4499,4500,4501,4502,4503,4504,4505,4506,4507,4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,4519,4520,4521,4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,4536,4537,4538,4539,4540,4541,4542,4543,4544,4545,4546,4547,4548,4549,4550,4551,4552,4553,4554,4555,4556,4557,4558,4559,4560,4561,4562,4563,4564,4565,4566,4567,4568,4569,4570,4571,4572,4573,4574,4575,4576,4577,4578,4579,4580,4581,4582,4583,4584,4585,4586,4587,4588,4589,4590,4591,4592,4593,4594,4595,4596,4597,4598,4599,4600,4601,4602,4603,4604,4605,4606,4607,4608,4609,4610,4611,4612,4613,4614,4615,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4626,4627,4628,4629,4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,4643,4644,4645,4646,4647,4648,4649,4650,4651,4652,4653,4654,4655,4656,4657,4658,4659,4660,4661,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4682,4683,4684,4685,4688,4689,4690,4691,4692,4693,4694,4696,4698,4699,4700,4701,4704,4705,4706,4707,4708,4709,4710,4711,4712,4713,4714,4715,4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,4732,4733,4734,4735,4736,4737,4738,4739,4740,4741,4742,4743,4744,4746,4747,4748,4749,4752,4753,4754,4755,4756,4757,4758,4759,4760,4761,4762,4763,4764,4765,4766,4767,4768,4769,4770,4771,4772,4773,4774,4775,4776,4777,4778,4779,4780,4781,4782,4783,4784,4786,4787,4788,4789,4792,4793,4794,4795,4796,4797,4798,4800,4802,4803,4804,4805,4808,4809,4810,4811,4812,4813,4814,4815,4816,4817,4818,4819,4820,4821,4822,4824,4825,4826,4827,4828,4829,4830,4831,4832,4833,4834,4835,4836,4837,4838,4839,4840,4841,4842,4843,4844,4845,4846,4847,4848,4849,4850,4851,4852,4853,4854,4855,4856,4857,4858,4859,4860,4861,4862,4863,4864,4865,4866,4867,4868,4869,4870,4871,4872,4873,4874,4875,4876,4877,4878,4879,4880,4882,4883,4884,4885,4888,4889,4890,4891,4892,4893,4894,4895,4896,4897,4898,4899,4900,4901,4902,4903,4904,4905,4906,4907,4908,4909,4910,4911,4912,4913,4914,4915,4916,4917,4918,4919,4920,4921,4922,4923,4924,4925,4926,4927,4928,4929,4930,4931,4932,4933,4934,4935,4936,4937,4938,4939,4940,4941,4942,4943,4944,4945,4946,4947,4948,4949,4950,4951,4952,4953,4954,4992,4993,4994,4995,4996,4997,4998,4999,5000,5001,5002,5003,5004,5005,5006,5007,5024,5025,5026,5027,5028,5029,5030,5031,5032,5033,5034,5035,5036,5037,5038,5039,5040,5041,5042,5043,5044,5045,5046,5047,5048,5049,5050,5051,5052,5053,5054,5055,5056,5057,5058,5059,5060,5061,5062,5063,5064,5065,5066,5067,5068,5069,5070,5071,5072,5073,5074,5075,5076,5077,5078,5079,5080,5081,5082,5083,5084,5085,5086,5087,5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102,5103,5104,5105,5106,5107,5108,5109,5112,5113,5114,5115,5116,5117,5121,5122,5123,5124,5125,5126,5127,5128,5129,5130,5131,5132,5133,5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,5149,5150,5151,5152,5153,5154,5155,5156,5157,5158,5159,5160,5161,5162,5163,5164,5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,5176,5177,5178,5179,5180,5181,5182,5183,5184,5185,5186,5187,5188,5189,5190,5191,5192,5193,5194,5195,5196,5197,5198,5199,5200,5201,5202,5203,5204,5205,5206,5207,5208,5209,5210,5211,5212,5213,5214,5215,5216,5217,5218,5219,5220,5221,5222,5223,5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,5235,5236,5237,5238,5239,5240,5241,5242,5243,5244,5245,5246,5247,5248,5249,5250,5251,5252,5253,5254,5255,5256,5257,5258,5259,5260,5261,5262,5263,5264,5265,5266,5267,5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,5279,5280,5281,5282,5283,5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,5294,5295,5296,5297,5298,5299,5300,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315,5316,5317,5318,5319,5320,5321,5322,5323,5324,5325,5326,5327,5328,5329,5330,5331,5332,5333,5334,5335,5336,5337,5338,5339,5340,5341,5342,5343,5344,5345,5346,5347,5348,5349,5350,5351,5352,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363,5364,5365,5366,5367,5368,5369,5370,5371,5372,5373,5374,5375,5376,5377,5378,5379,5380,5381,5382,5383,5384,5385,5386,5387,5388,5389,5390,5391,5392,5393,5394,5395,5396,5397,5398,5399,5400,5401,5402,5403,5404,5405,5406,5407,5408,5409,5410,5411,5412,5413,5414,5415,5416,5417,5418,5419,5420,5421,5422,5423,5424,5425,5426,5427,5428,5429,5430,5431,5432,5433,5434,5435,5436,5437,5438,5439,5440,5441,5442,5443,5444,5445,5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456,5457,5458,5459,5460,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472,5473,5474,5475,5476,5477,5478,5479,5480,5481,5482,5483,5484,5485,5486,5487,5488,5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504,5505,5506,5507,5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520,5521,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536,5537,5538,5539,5540,5541,5542,5543,5544,5545,5546,5547,5548,5549,5550,5551,5552,5553,5554,5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568,5569,5570,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584,5585,5586,5587,5588,5589,5590,5591,5592,5593,5594,5595,5596,5597,5598,5599,5600,5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,5615,5616,5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632,5633,5634,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,5647,5648,5649,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,5661,5662,5663,5664,5665,5666,5667,5668,5669,5670,5671,5672,5673,5674,5675,5676,5677,5678,5679,5680,5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712,5713,5714,5715,5716,5717,5718,5719,5720,5721,5722,5723,5724,5725,5726,5727,5728,5729,5730,5731,5732,5733,5734,5735,5736,5737,5738,5739,5740,5743,5744,5745,5746,5747,5748,5749,5750,5751,5752,5753,5754,5755,5756,5757,5758,5759,5761,5762,5763,5764,5765,5766,5767,5768,5769,5770,5771,5772,5773,5774,5775,5776,5777,5778,5779,5780,5781,5782,5783,5784,5785,5786,5792,5793,5794,5795,5796,5797,5798,5799,5800,5801,5802,5803,5804,5805,5806,5807,5808,5809,5810,5811,5812,5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828,5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844,5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,5856,5857,5858,5859,5860,5861,5862,5863,5864,5865,5866,5870,5871,5872,5873,5874,5875,5876,5877,5878,5879,5880,5888,5889,5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5902,5903,5904,5905,5920,5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,5936,5937,5952,5953,5954,5955,5956,5957,5958,5959,5960,5961,5962,5963,5964,5965,5966,5967,5968,5969,5984,5985,5986,5987,5988,5989,5990,5991,5992,5993,5994,5995,5996,5998,5999,6000,6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6103,6108,6176,6177,6178,6179,6180,6181,6182,6183,6184,6185,6186,6187,6188,6189,6190,6191,6192,6193,6194,6195,6196,6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,6211,6212,6213,6214,6215,6216,6217,6218,6219,6220,6221,6222,6223,6224,6225,6226,6227,6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,6242,6243,6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,6254,6255,6256,6257,6258,6259,6260,6261,6262,6263,6264,6272,6273,6274,6275,6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,6286,6287,6288,6289,6290,6291,6292,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,6303,6304,6305,6306,6307,6308,6309,6310,6311,6312,6314,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,6334,6335,6336,6337,6338,6339,6340,6341,6342,6343,6344,6345,6346,6347,6348,6349,6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,6364,6365,6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,6380,6381,6382,6383,6384,6385,6386,6387,6388,6389,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,6412,6413,6414,6415,6416,6417,6418,6419,6420,6421,6422,6423,6424,6425,6426,6427,6428,6429,6430,6480,6481,6482,6483,6484,6485,6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,6504,6505,6506,6507,6508,6509,6512,6513,6514,6515,6516,6528,6529,6530,6531,6532,6533,6534,6535,6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548,6549,6550,6551,6552,6553,6554,6555,6556,6557,6558,6559,6560,6561,6562,6563,6564,6565,6566,6567,6568,6569,6570,6571,6576,6577,6578,6579,6580,6581,6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6656,6657,6658,6659,6660,6661,6662,6663,6664,6665,6666,6667,6668,6669,6670,6671,6672,6673,6674,6675,6676,6677,6678,6688,6689,6690,6691,6692,6693,6694,6695,6696,6697,6698,6699,6700,6701,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6712,6713,6714,6715,6716,6717,6718,6719,6720,6721,6722,6723,6724,6725,6726,6727,6728,6729,6730,6731,6732,6733,6734,6735,6736,6737,6738,6739,6740,6823,6917,6918,6919,6920,6921,6922,6923,6924,6925,6926,6927,6928,6929,6930,6931,6932,6933,6934,6935,6936,6937,6938,6939,6940,6941,6942,6943,6944,6945,6946,6947,6948,6949,6950,6951,6952,6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6981,6982,6983,6984,6985,6986,6987,7043,7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7071,7072,7086,7087,7098,7099,7100,7101,7102,7103,7104,7105,7106,7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136,7137,7138,7139,7140,7141,7168,7169,7170,7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183,7184,7185,7186,7187,7188,7189,7190,7191,7192,7193,7194,7195,7196,7197,7198,7199,7200,7201,7202,7203,7245,7246,7247,7258,7259,7260,7261,7262,7263,7264,7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277,7278,7279,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7296,7297,7298,7299,7300,7301,7302,7303,7304,7312,7313,7314,7315,7316,7317,7318,7319,7320,7321,7322,7323,7324,7325,7326,7327,7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339,7340,7341,7342,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,7354,7357,7358,7359,7401,7402,7403,7404,7406,7407,7408,7409,7413,7414,7424,7425,7426,7427,7428,7429,7430,7431,7432,7433,7434,7435,7436,7437,7438,7439,7440,7441,7442,7443,7444,7445,7446,7447,7448,7449,7450,7451,7452,7453,7454,7455,7456,7457,7458,7459,7460,7461,7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,7472,7473,7474,7475,7476,7477,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,7488,7489,7490,7491,7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,7503,7504,7505,7506,7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,7520,7521,7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,7536,7537,7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,7550,7551,7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567,7568,7569,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582,7583,7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690,7691,7692,7693,7694,7695,7696,7697,7698,7699,7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,7712,7713,7714,7715,7716,7717,7718,7719,7720,7721,7722,7723,7724,7725,7726,7727,7728,7729,7730,7731,7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7750,7751,7752,7753,7754,7755,7756,7757,7758,7759,7760,7761,7762,7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,7777,7778,7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,7792,7793,7794,7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,7806,7807,7808,7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840,7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,7856,7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,7888,7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,7904,7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,7920,7921,7922,7923,7924,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935,7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951,7952,7953,7954,7955,7956,7957,7960,7961,7962,7963,7964,7965,7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983,7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999,8000,8001,8002,8003,8004,8005,8008,8009,8010,8011,8012,8013,8016,8017,8018,8019,8020,8021,8022,8023,8025,8027,8029,8031,8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047,8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111,8112,8113,8114,8115,8116,8118,8119,8120,8121,8122,8123,8124,8126,8130,8131,8132,8134,8135,8136,8137,8138,8139,8140,8144,8145,8146,8147,8150,8151,8152,8153,8154,8155,8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8178,8179,8180,8182,8183,8184,8185,8186,8187,8188,8305,8319,8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8450,8455,8458,8459,8460,8461,8462,8463,8464,8465,8466,8467,8469,8472,8473,8474,8475,8476,8477,8484,8486,8488,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8508,8509,8510,8511,8517,8518,8519,8520,8521,8526,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584,11264,11265,11266,11267,11268,11269,11270,11271,11272,11273,11274,11275,11276,11277,11278,11279,11280,11281,11282,11283,11284,11285,11286,11287,11288,11289,11290,11291,11292,11293,11294,11295,11296,11297,11298,11299,11300,11301,11302,11303,11304,11305,11306,11307,11308,11309,11310,11312,11313,11314,11315,11316,11317,11318,11319,11320,11321,11322,11323,11324,11325,11326,11327,11328,11329,11330,11331,11332,11333,11334,11335,11336,11337,11338,11339,11340,11341,11342,11343,11344,11345,11346,11347,11348,11349,11350,11351,11352,11353,11354,11355,11356,11357,11358,11360,11361,11362,11363,11364,11365,11366,11367,11368,11369,11370,11371,11372,11373,11374,11375,11376,11377,11378,11379,11380,11381,11382,11383,11384,11385,11386,11387,11388,11389,11390,11391,11392,11393,11394,11395,11396,11397,11398,11399,11400,11401,11402,11403,11404,11405,11406,11407,11408,11409,11410,11411,11412,11413,11414,11415,11416,11417,11418,11419,11420,11421,11422,11423,11424,11425,11426,11427,11428,11429,11430,11431,11432,11433,11434,11435,11436,11437,11438,11439,11440,11441,11442,11443,11444,11445,11446,11447,11448,11449,11450,11451,11452,11453,11454,11455,11456,11457,11458,11459,11460,11461,11462,11463,11464,11465,11466,11467,11468,11469,11470,11471,11472,11473,11474,11475,11476,11477,11478,11479,11480,11481,11482,11483,11484,11485,11486,11487,11488,11489,11490,11491,11492,11499,11500,11501,11502,11506,11507,11520,11521,11522,11523,11524,11525,11526,11527,11528,11529,11530,11531,11532,11533,11534,11535,11536,11537,11538,11539,11540,11541,11542,11543,11544,11545,11546,11547,11548,11549,11550,11551,11552,11553,11554,11555,11556,11557,11559,11565,11568,11569,11570,11571,11572,11573,11574,11575,11576,11577,11578,11579,11580,11581,11582,11583,11584,11585,11586,11587,11588,11589,11590,11591,11592,11593,11594,11595,11596,11597,11598,11599,11600,11601,11602,11603,11604,11605,11606,11607,11608,11609,11610,11611,11612,11613,11614,11615,11616,11617,11618,11619,11620,11621,11622,11623,11631,11648,11649,11650,11651,11652,11653,11654,11655,11656,11657,11658,11659,11660,11661,11662,11663,11664,11665,11666,11667,11668,11669,11670,11680,11681,11682,11683,11684,11685,11686,11688,11689,11690,11691,11692,11693,11694,11696,11697,11698,11699,11700,11701,11702,11704,11705,11706,11707,11708,11709,11710,11712,11713,11714,11715,11716,11717,11718,11720,11721,11722,11723,11724,11725,11726,11728,11729,11730,11731,11732,11733,11734,11736,11737,11738,11739,11740,11741,11742,12293,12294,12295,12321,12322,12323,12324,12325,12326,12327,12328,12329,12337,12338,12339,12340,12341,12344,12345,12346,12347,12348,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,12436,12437,12438,12443,12444,12445,12446,12447,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,12535,12536,12537,12538,12540,12541,12542,12543,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,12586,12587,12588,12589,12590,12591,12593,12594,12595,12596,12597,12598,12599,12600,12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616,12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632,12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,12647,12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663,12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679,12680,12681,12682,12683,12684,12685,12686,12704,12705,12706,12707,12708,12709,12710,12711,12712,12713,12714,12715,12716,12717,12718,12719,12720,12721,12722,12723,12724,12725,12726,12727,12728,12729,12730,12784,12785,12786,12787,12788,12789,12790,12791,12792,12793,12794,12795,12796,12797,12798,12799,13312,13313,13314,13315,13316,13317,13318,13319,13320,13321,13322,13323,13324,13325,13326,13327,13328,13329,13330,13331,13332,13333,13334,13335,13336,13337,13338,13339,13340,13341,13342,13343,13344,13345,13346,13347,13348,13349,13350,13351,13352,13353,13354,13355,13356,13357,13358,13359,13360,13361,13362,13363,13364,13365,13366,13367,13368,13369,13370,13371,13372,13373,13374,13375,13376,13377,13378,13379,13380,13381,13382,13383,13384,13385,13386,13387,13388,13389,13390,13391,13392,13393,13394,13395,13396,13397,13398,13399,13400,13401,13402,13403,13404,13405,13406,13407,13408,13409,13410,13411,13412,13413,13414,13415,13416,13417,13418,13419,13420,13421,13422,13423,13424,13425,13426,13427,13428,13429,13430,13431,13432,13433,13434,13435,13436,13437,13438,13439,13440,13441,13442,13443,13444,13445,13446,13447,13448,13449,13450,13451,13452,13453,13454,13455,13456,13457,13458,13459,13460,13461,13462,13463,13464,13465,13466,13467,13468,13469,13470,13471,13472,13473,13474,13475,13476,13477,13478,13479,13480,13481,13482,13483,13484,13485,13486,13487,13488,13489,13490,13491,13492,13493,13494,13495,13496,13497,13498,13499,13500,13501,13502,13503,13504,13505,13506,13507,13508,13509,13510,13511,13512,13513,13514,13515,13516,13517,13518,13519,13520,13521,13522,13523,13524,13525,13526,13527,13528,13529,13530,13531,13532,13533,13534,13535,13536,13537,13538,13539,13540,13541,13542,13543,13544,13545,13546,13547,13548,13549,13550,13551,13552,13553,13554,13555,13556,13557,13558,13559,13560,13561,13562,13563,13564,13565,13566,13567,13568,13569,13570,13571,13572,13573,13574,13575,13576,13577,13578,13579,13580,13581,13582,13583,13584,13585,13586,13587,13588,13589,13590,13591,13592,13593,13594,13595,13596,13597,13598,13599,13600,13601,13602,13603,13604,13605,13606,13607,13608,13609,13610,13611,13612,13613,13614,13615,13616,13617,13618,13619,13620,13621,13622,13623,13624,13625,13626,13627,13628,13629,13630,13631,13632,13633,13634,13635,13636,13637,13638,13639,13640,13641,13642,13643,13644,13645,13646,13647,13648,13649,13650,13651,13652,13653,13654,13655,13656,13657,13658,13659,13660,13661,13662,13663,13664,13665,13666,13667,13668,13669,13670,13671,13672,13673,13674,13675,13676,13677,13678,13679,13680,13681,13682,13683,13684,13685,13686,13687,13688,13689,13690,13691,13692,13693,13694,13695,13696,13697,13698,13699,13700,13701,13702,13703,13704,13705,13706,13707,13708,13709,13710,13711,13712,13713,13714,13715,13716,13717,13718,13719,13720,13721,13722,13723,13724,13725,13726,13727,13728,13729,13730,13731,13732,13733,13734,13735,13736,13737,13738,13739,13740,13741,13742,13743,13744,13745,13746,13747,13748,13749,13750,13751,13752,13753,13754,13755,13756,13757,13758,13759,13760,13761,13762,13763,13764,13765,13766,13767,13768,13769,13770,13771,13772,13773,13774,13775,13776,13777,13778,13779,13780,13781,13782,13783,13784,13785,13786,13787,13788,13789,13790,13791,13792,13793,13794,13795,13796,13797,13798,13799,13800,13801,13802,13803,13804,13805,13806,13807,13808,13809,13810,13811,13812,13813,13814,13815,13816,13817,13818,13819,13820,13821,13822,13823,13824,13825,13826,13827,13828,13829,13830,13831,13832,13833,13834,13835,13836,13837,13838,13839,13840,13841,13842,13843,13844,13845,13846,13847,13848,13849,13850,13851,13852,13853,13854,13855,13856,13857,13858,13859,13860,13861,13862,13863,13864,13865,13866,13867,13868,13869,13870,13871,13872,13873,13874,13875,13876,13877,13878,13879,13880,13881,13882,13883,13884,13885,13886,13887,13888,13889,13890,13891,13892,13893,13894,13895,13896,13897,13898,13899,13900,13901,13902,13903,13904,13905,13906,13907,13908,13909,13910,13911,13912,13913,13914,13915,13916,13917,13918,13919,13920,13921,13922,13923,13924,13925,13926,13927,13928,13929,13930,13931,13932,13933,13934,13935,13936,13937,13938,13939,13940,13941,13942,13943,13944,13945,13946,13947,13948,13949,13950,13951,13952,13953,13954,13955,13956,13957,13958,13959,13960,13961,13962,13963,13964,13965,13966,13967,13968,13969,13970,13971,13972,13973,13974,13975,13976,13977,13978,13979,13980,13981,13982,13983,13984,13985,13986,13987,13988,13989,13990,13991,13992,13993,13994,13995,13996,13997,13998,13999,14000,14001,14002,14003,14004,14005,14006,14007,14008,14009,14010,14011,14012,14013,14014,14015,14016,14017,14018,14019,14020,14021,14022,14023,14024,14025,14026,14027,14028,14029,14030,14031,14032,14033,14034,14035,14036,14037,14038,14039,14040,14041,14042,14043,14044,14045,14046,14047,14048,14049,14050,14051,14052,14053,14054,14055,14056,14057,14058,14059,14060,14061,14062,14063,14064,14065,14066,14067,14068,14069,14070,14071,14072,14073,14074,14075,14076,14077,14078,14079,14080,14081,14082,14083,14084,14085,14086,14087,14088,14089,14090,14091,14092,14093,14094,14095,14096,14097,14098,14099,14100,14101,14102,14103,14104,14105,14106,14107,14108,14109,14110,14111,14112,14113,14114,14115,14116,14117,14118,14119,14120,14121,14122,14123,14124,14125,14126,14127,14128,14129,14130,14131,14132,14133,14134,14135,14136,14137,14138,14139,14140,14141,14142,14143,14144,14145,14146,14147,14148,14149,14150,14151,14152,14153,14154,14155,14156,14157,14158,14159,14160,14161,14162,14163,14164,14165,14166,14167,14168,14169,14170,14171,14172,14173,14174,14175,14176,14177,14178,14179,14180,14181,14182,14183,14184,14185,14186,14187,14188,14189,14190,14191,14192,14193,14194,14195,14196,14197,14198,14199,14200,14201,14202,14203,14204,14205,14206,14207,14208,14209,14210,14211,14212,14213,14214,14215,14216,14217,14218,14219,14220,14221,14222,14223,14224,14225,14226,14227,14228,14229,14230,14231,14232,14233,14234,14235,14236,14237,14238,14239,14240,14241,14242,14243,14244,14245,14246,14247,14248,14249,14250,14251,14252,14253,14254,14255,14256,14257,14258,14259,14260,14261,14262,14263,14264,14265,14266,14267,14268,14269,14270,14271,14272,14273,14274,14275,14276,14277,14278,14279,14280,14281,14282,14283,14284,14285,14286,14287,14288,14289,14290,14291,14292,14293,14294,14295,14296,14297,14298,14299,14300,14301,14302,14303,14304,14305,14306,14307,14308,14309,14310,14311,14312,14313,14314,14315,14316,14317,14318,14319,14320,14321,14322,14323,14324,14325,14326,14327,14328,14329,14330,14331,14332,14333,14334,14335,14336,14337,14338,14339,14340,14341,14342,14343,14344,14345,14346,14347,14348,14349,14350,14351,14352,14353,14354,14355,14356,14357,14358,14359,14360,14361,14362,14363,14364,14365,14366,14367,14368,14369,14370,14371,14372,14373,14374,14375,14376,14377,14378,14379,14380,14381,14382,14383,14384,14385,14386,14387,14388,14389,14390,14391,14392,14393,14394,14395,14396,14397,14398,14399,14400,14401,14402,14403,14404,14405,14406,14407,14408,14409,14410,14411,14412,14413,14414,14415,14416,14417,14418,14419,14420,14421,14422,14423,14424,14425,14426,14427,14428,14429,14430,14431,14432,14433,14434,14435,14436,14437,14438,14439,14440,14441,14442,14443,14444,14445,14446,14447,14448,14449,14450,14451,14452,14453,14454,14455,14456,14457,14458,14459,14460,14461,14462,14463,14464,14465,14466,14467,14468,14469,14470,14471,14472,14473,14474,14475,14476,14477,14478,14479,14480,14481,14482,14483,14484,14485,14486,14487,14488,14489,14490,14491,14492,14493,14494,14495,14496,14497,14498,14499,14500,14501,14502,14503,14504,14505,14506,14507,14508,14509,14510,14511,14512,14513,14514,14515,14516,14517,14518,14519,14520,14521,14522,14523,14524,14525,14526,14527,14528,14529,14530,14531,14532,14533,14534,14535,14536,14537,14538,14539,14540,14541,14542,14543,14544,14545,14546,14547,14548,14549,14550,14551,14552,14553,14554,14555,14556,14557,14558,14559,14560,14561,14562,14563,14564,14565,14566,14567,14568,14569,14570,14571,14572,14573,14574,14575,14576,14577,14578,14579,14580,14581,14582,14583,14584,14585,14586,14587,14588,14589,14590,14591,14592,14593,14594,14595,14596,14597,14598,14599,14600,14601,14602,14603,14604,14605,14606,14607,14608,14609,14610,14611,14612,14613,14614,14615,14616,14617,14618,14619,14620,14621,14622,14623,14624,14625,14626,14627,14628,14629,14630,14631,14632,14633,14634,14635,14636,14637,14638,14639,14640,14641,14642,14643,14644,14645,14646,14647,14648,14649,14650,14651,14652,14653,14654,14655,14656,14657,14658,14659,14660,14661,14662,14663,14664,14665,14666,14667,14668,14669,14670,14671,14672,14673,14674,14675,14676,14677,14678,14679,14680,14681,14682,14683,14684,14685,14686,14687,14688,14689,14690,14691,14692,14693,14694,14695,14696,14697,14698,14699,14700,14701,14702,14703,14704,14705,14706,14707,14708,14709,14710,14711,14712,14713,14714,14715,14716,14717,14718,14719,14720,14721,14722,14723,14724,14725,14726,14727,14728,14729,14730,14731,14732,14733,14734,14735,14736,14737,14738,14739,14740,14741,14742,14743,14744,14745,14746,14747,14748,14749,14750,14751,14752,14753,14754,14755,14756,14757,14758,14759,14760,14761,14762,14763,14764,14765,14766,14767,14768,14769,14770,14771,14772,14773,14774,14775,14776,14777,14778,14779,14780,14781,14782,14783,14784,14785,14786,14787,14788,14789,14790,14791,14792,14793,14794,14795,14796,14797,14798,14799,14800,14801,14802,14803,14804,14805,14806,14807,14808,14809,14810,14811,14812,14813,14814,14815,14816,14817,14818,14819,14820,14821,14822,14823,14824,14825,14826,14827,14828,14829,14830,14831,14832,14833,14834,14835,14836,14837,14838,14839,14840,14841,14842,14843,14844,14845,14846,14847,14848,14849,14850,14851,14852,14853,14854,14855,14856,14857,14858,14859,14860,14861,14862,14863,14864,14865,14866,14867,14868,14869,14870,14871,14872,14873,14874,14875,14876,14877,14878,14879,14880,14881,14882,14883,14884,14885,14886,14887,14888,14889,14890,14891,14892,14893,14894,14895,14896,14897,14898,14899,14900,14901,14902,14903,14904,14905,14906,14907,14908,14909,14910,14911,14912,14913,14914,14915,14916,14917,14918,14919,14920,14921,14922,14923,14924,14925,14926,14927,14928,14929,14930,14931,14932,14933,14934,14935,14936,14937,14938,14939,14940,14941,14942,14943,14944,14945,14946,14947,14948,14949,14950,14951,14952,14953,14954,14955,14956,14957,14958,14959,14960,14961,14962,14963,14964,14965,14966,14967,14968,14969,14970,14971,14972,14973,14974,14975,14976,14977,14978,14979,14980,14981,14982,14983,14984,14985,14986,14987,14988,14989,14990,14991,14992,14993,14994,14995,14996,14997,14998,14999,15000,15001,15002,15003,15004,15005,15006,15007,15008,15009,15010,15011,15012,15013,15014,15015,15016,15017,15018,15019,15020,15021,15022,15023,15024,15025,15026,15027,15028,15029,15030,15031,15032,15033,15034,15035,15036,15037,15038,15039,15040,15041,15042,15043,15044,15045,15046,15047,15048,15049,15050,15051,15052,15053,15054,15055,15056,15057,15058,15059,15060,15061,15062,15063,15064,15065,15066,15067,15068,15069,15070,15071,15072,15073,15074,15075,15076,15077,15078,15079,15080,15081,15082,15083,15084,15085,15086,15087,15088,15089,15090,15091,15092,15093,15094,15095,15096,15097,15098,15099,15100,15101,15102,15103,15104,15105,15106,15107,15108,15109,15110,15111,15112,15113,15114,15115,15116,15117,15118,15119,15120,15121,15122,15123,15124,15125,15126,15127,15128,15129,15130,15131,15132,15133,15134,15135,15136,15137,15138,15139,15140,15141,15142,15143,15144,15145,15146,15147,15148,15149,15150,15151,15152,15153,15154,15155,15156,15157,15158,15159,15160,15161,15162,15163,15164,15165,15166,15167,15168,15169,15170,15171,15172,15173,15174,15175,15176,15177,15178,15179,15180,15181,15182,15183,15184,15185,15186,15187,15188,15189,15190,15191,15192,15193,15194,15195,15196,15197,15198,15199,15200,15201,15202,15203,15204,15205,15206,15207,15208,15209,15210,15211,15212,15213,15214,15215,15216,15217,15218,15219,15220,15221,15222,15223,15224,15225,15226,15227,15228,15229,15230,15231,15232,15233,15234,15235,15236,15237,15238,15239,15240,15241,15242,15243,15244,15245,15246,15247,15248,15249,15250,15251,15252,15253,15254,15255,15256,15257,15258,15259,15260,15261,15262,15263,15264,15265,15266,15267,15268,15269,15270,15271,15272,15273,15274,15275,15276,15277,15278,15279,15280,15281,15282,15283,15284,15285,15286,15287,15288,15289,15290,15291,15292,15293,15294,15295,15296,15297,15298,15299,15300,15301,15302,15303,15304,15305,15306,15307,15308,15309,15310,15311,15312,15313,15314,15315,15316,15317,15318,15319,15320,15321,15322,15323,15324,15325,15326,15327,15328,15329,15330,15331,15332,15333,15334,15335,15336,15337,15338,15339,15340,15341,15342,15343,15344,15345,15346,15347,15348,15349,15350,15351,15352,15353,15354,15355,15356,15357,15358,15359,15360,15361,15362,15363,15364,15365,15366,15367,15368,15369,15370,15371,15372,15373,15374,15375,15376,15377,15378,15379,15380,15381,15382,15383,15384,15385,15386,15387,15388,15389,15390,15391,15392,15393,15394,15395,15396,15397,15398,15399,15400,15401,15402,15403,15404,15405,15406,15407,15408,15409,15410,15411,15412,15413,15414,15415,15416,15417,15418,15419,15420,15421,15422,15423,15424,15425,15426,15427,15428,15429,15430,15431,15432,15433,15434,15435,15436,15437,15438,15439,15440,15441,15442,15443,15444,15445,15446,15447,15448,15449,15450,15451,15452,15453,15454,15455,15456,15457,15458,15459,15460,15461,15462,15463,15464,15465,15466,15467,15468,15469,15470,15471,15472,15473,15474,15475,15476,15477,15478,15479,15480,15481,15482,15483,15484,15485,15486,15487,15488,15489,15490,15491,15492,15493,15494,15495,15496,15497,15498,15499,15500,15501,15502,15503,15504,15505,15506,15507,15508,15509,15510,15511,15512,15513,15514,15515,15516,15517,15518,15519,15520,15521,15522,15523,15524,15525,15526,15527,15528,15529,15530,15531,15532,15533,15534,15535,15536,15537,15538,15539,15540,15541,15542,15543,15544,15545,15546,15547,15548,15549,15550,15551,15552,15553,15554,15555,15556,15557,15558,15559,15560,15561,15562,15563,15564,15565,15566,15567,15568,15569,15570,15571,15572,15573,15574,15575,15576,15577,15578,15579,15580,15581,15582,15583,15584,15585,15586,15587,15588,15589,15590,15591,15592,15593,15594,15595,15596,15597,15598,15599,15600,15601,15602,15603,15604,15605,15606,15607,15608,15609,15610,15611,15612,15613,15614,15615,15616,15617,15618,15619,15620,15621,15622,15623,15624,15625,15626,15627,15628,15629,15630,15631,15632,15633,15634,15635,15636,15637,15638,15639,15640,15641,15642,15643,15644,15645,15646,15647,15648,15649,15650,15651,15652,15653,15654,15655,15656,15657,15658,15659,15660,15661,15662,15663,15664,15665,15666,15667,15668,15669,15670,15671,15672,15673,15674,15675,15676,15677,15678,15679,15680,15681,15682,15683,15684,15685,15686,15687,15688,15689,15690,15691,15692,15693,15694,15695,15696,15697,15698,15699,15700,15701,15702,15703,15704,15705,15706,15707,15708,15709,15710,15711,15712,15713,15714,15715,15716,15717,15718,15719,15720,15721,15722,15723,15724,15725,15726,15727,15728,15729,15730,15731,15732,15733,15734,15735,15736,15737,15738,15739,15740,15741,15742,15743,15744,15745,15746,15747,15748,15749,15750,15751,15752,15753,15754,15755,15756,15757,15758,15759,15760,15761,15762,15763,15764,15765,15766,15767,15768,15769,15770,15771,15772,15773,15774,15775,15776,15777,15778,15779,15780,15781,15782,15783,15784,15785,15786,15787,15788,15789,15790,15791,15792,15793,15794,15795,15796,15797,15798,15799,15800,15801,15802,15803,15804,15805,15806,15807,15808,15809,15810,15811,15812,15813,15814,15815,15816,15817,15818,15819,15820,15821,15822,15823,15824,15825,15826,15827,15828,15829,15830,15831,15832,15833,15834,15835,15836,15837,15838,15839,15840,15841,15842,15843,15844,15845,15846,15847,15848,15849,15850,15851,15852,15853,15854,15855,15856,15857,15858,15859,15860,15861,15862,15863,15864,15865,15866,15867,15868,15869,15870,15871,15872,15873,15874,15875,15876,15877,15878,15879,15880,15881,15882,15883,15884,15885,15886,15887,15888,15889,15890,15891,15892,15893,15894,15895,15896,15897,15898,15899,15900,15901,15902,15903,15904,15905,15906,15907,15908,15909,15910,15911,15912,15913,15914,15915,15916,15917,15918,15919,15920,15921,15922,15923,15924,15925,15926,15927,15928,15929,15930,15931,15932,15933,15934,15935,15936,15937,15938,15939,15940,15941,15942,15943,15944,15945,15946,15947,15948,15949,15950,15951,15952,15953,15954,15955,15956,15957,15958,15959,15960,15961,15962,15963,15964,15965,15966,15967,15968,15969,15970,15971,15972,15973,15974,15975,15976,15977,15978,15979,15980,15981,15982,15983,15984,15985,15986,15987,15988,15989,15990,15991,15992,15993,15994,15995,15996,15997,15998,15999,16000,16001,16002,16003,16004,16005,16006,16007,16008,16009,16010,16011,16012,16013,16014,16015,16016,16017,16018,16019,16020,16021,16022,16023,16024,16025,16026,16027,16028,16029,16030,16031,16032,16033,16034,16035,16036,16037,16038,16039,16040,16041,16042,16043,16044,16045,16046,16047,16048,16049,16050,16051,16052,16053,16054,16055,16056,16057,16058,16059,16060,16061,16062,16063,16064,16065,16066,16067,16068,16069,16070,16071,16072,16073,16074,16075,16076,16077,16078,16079,16080,16081,16082,16083,16084,16085,16086,16087,16088,16089,16090,16091,16092,16093,16094,16095,16096,16097,16098,16099,16100,16101,16102,16103,16104,16105,16106,16107,16108,16109,16110,16111,16112,16113,16114,16115,16116,16117,16118,16119,16120,16121,16122,16123,16124,16125,16126,16127,16128,16129,16130,16131,16132,16133,16134,16135,16136,16137,16138,16139,16140,16141,16142,16143,16144,16145,16146,16147,16148,16149,16150,16151,16152,16153,16154,16155,16156,16157,16158,16159,16160,16161,16162,16163,16164,16165,16166,16167,16168,16169,16170,16171,16172,16173,16174,16175,16176,16177,16178,16179,16180,16181,16182,16183,16184,16185,16186,16187,16188,16189,16190,16191,16192,16193,16194,16195,16196,16197,16198,16199,16200,16201,16202,16203,16204,16205,16206,16207,16208,16209,16210,16211,16212,16213,16214,16215,16216,16217,16218,16219,16220,16221,16222,16223,16224,16225,16226,16227,16228,16229,16230,16231,16232,16233,16234,16235,16236,16237,16238,16239,16240,16241,16242,16243,16244,16245,16246,16247,16248,16249,16250,16251,16252,16253,16254,16255,16256,16257,16258,16259,16260,16261,16262,16263,16264,16265,16266,16267,16268,16269,16270,16271,16272,16273,16274,16275,16276,16277,16278,16279,16280,16281,16282,16283,16284,16285,16286,16287,16288,16289,16290,16291,16292,16293,16294,16295,16296,16297,16298,16299,16300,16301,16302,16303,16304,16305,16306,16307,16308,16309,16310,16311,16312,16313,16314,16315,16316,16317,16318,16319,16320,16321,16322,16323,16324,16325,16326,16327,16328,16329,16330,16331,16332,16333,16334,16335,16336,16337,16338,16339,16340,16341,16342,16343,16344,16345,16346,16347,16348,16349,16350,16351,16352,16353,16354,16355,16356,16357,16358,16359,16360,16361,16362,16363,16364,16365,16366,16367,16368,16369,16370,16371,16372,16373,16374,16375,16376,16377,16378,16379,16380,16381,16382,16383,16384,16385,16386,16387,16388,16389,16390,16391,16392,16393,16394,16395,16396,16397,16398,16399,16400,16401,16402,16403,16404,16405,16406,16407,16408,16409,16410,16411,16412,16413,16414,16415,16416,16417,16418,16419,16420,16421,16422,16423,16424,16425,16426,16427,16428,16429,16430,16431,16432,16433,16434,16435,16436,16437,16438,16439,16440,16441,16442,16443,16444,16445,16446,16447,16448,16449,16450,16451,16452,16453,16454,16455,16456,16457,16458,16459,16460,16461,16462,16463,16464,16465,16466,16467,16468,16469,16470,16471,16472,16473,16474,16475,16476,16477,16478,16479,16480,16481,16482,16483,16484,16485,16486,16487,16488,16489,16490,16491,16492,16493,16494,16495,16496,16497,16498,16499,16500,16501,16502,16503,16504,16505,16506,16507,16508,16509,16510,16511,16512,16513,16514,16515,16516,16517,16518,16519,16520,16521,16522,16523,16524,16525,16526,16527,16528,16529,16530,16531,16532,16533,16534,16535,16536,16537,16538,16539,16540,16541,16542,16543,16544,16545,16546,16547,16548,16549,16550,16551,16552,16553,16554,16555,16556,16557,16558,16559,16560,16561,16562,16563,16564,16565,16566,16567,16568,16569,16570,16571,16572,16573,16574,16575,16576,16577,16578,16579,16580,16581,16582,16583,16584,16585,16586,16587,16588,16589,16590,16591,16592,16593,16594,16595,16596,16597,16598,16599,16600,16601,16602,16603,16604,16605,16606,16607,16608,16609,16610,16611,16612,16613,16614,16615,16616,16617,16618,16619,16620,16621,16622,16623,16624,16625,16626,16627,16628,16629,16630,16631,16632,16633,16634,16635,16636,16637,16638,16639,16640,16641,16642,16643,16644,16645,16646,16647,16648,16649,16650,16651,16652,16653,16654,16655,16656,16657,16658,16659,16660,16661,16662,16663,16664,16665,16666,16667,16668,16669,16670,16671,16672,16673,16674,16675,16676,16677,16678,16679,16680,16681,16682,16683,16684,16685,16686,16687,16688,16689,16690,16691,16692,16693,16694,16695,16696,16697,16698,16699,16700,16701,16702,16703,16704,16705,16706,16707,16708,16709,16710,16711,16712,16713,16714,16715,16716,16717,16718,16719,16720,16721,16722,16723,16724,16725,16726,16727,16728,16729,16730,16731,16732,16733,16734,16735,16736,16737,16738,16739,16740,16741,16742,16743,16744,16745,16746,16747,16748,16749,16750,16751,16752,16753,16754,16755,16756,16757,16758,16759,16760,16761,16762,16763,16764,16765,16766,16767,16768,16769,16770,16771,16772,16773,16774,16775,16776,16777,16778,16779,16780,16781,16782,16783,16784,16785,16786,16787,16788,16789,16790,16791,16792,16793,16794,16795,16796,16797,16798,16799,16800,16801,16802,16803,16804,16805,16806,16807,16808,16809,16810,16811,16812,16813,16814,16815,16816,16817,16818,16819,16820,16821,16822,16823,16824,16825,16826,16827,16828,16829,16830,16831,16832,16833,16834,16835,16836,16837,16838,16839,16840,16841,16842,16843,16844,16845,16846,16847,16848,16849,16850,16851,16852,16853,16854,16855,16856,16857,16858,16859,16860,16861,16862,16863,16864,16865,16866,16867,16868,16869,16870,16871,16872,16873,16874,16875,16876,16877,16878,16879,16880,16881,16882,16883,16884,16885,16886,16887,16888,16889,16890,16891,16892,16893,16894,16895,16896,16897,16898,16899,16900,16901,16902,16903,16904,16905,16906,16907,16908,16909,16910,16911,16912,16913,16914,16915,16916,16917,16918,16919,16920,16921,16922,16923,16924,16925,16926,16927,16928,16929,16930,16931,16932,16933,16934,16935,16936,16937,16938,16939,16940,16941,16942,16943,16944,16945,16946,16947,16948,16949,16950,16951,16952,16953,16954,16955,16956,16957,16958,16959,16960,16961,16962,16963,16964,16965,16966,16967,16968,16969,16970,16971,16972,16973,16974,16975,16976,16977,16978,16979,16980,16981,16982,16983,16984,16985,16986,16987,16988,16989,16990,16991,16992,16993,16994,16995,16996,16997,16998,16999,17000,17001,17002,17003,17004,17005,17006,17007,17008,17009,17010,17011,17012,17013,17014,17015,17016,17017,17018,17019,17020,17021,17022,17023,17024,17025,17026,17027,17028,17029,17030,17031,17032,17033,17034,17035,17036,17037,17038,17039,17040,17041,17042,17043,17044,17045,17046,17047,17048,17049,17050,17051,17052,17053,17054,17055,17056,17057,17058,17059,17060,17061,17062,17063,17064,17065,17066,17067,17068,17069,17070,17071,17072,17073,17074,17075,17076,17077,17078,17079,17080,17081,17082,17083,17084,17085,17086,17087,17088,17089,17090,17091,17092,17093,17094,17095,17096,17097,17098,17099,17100,17101,17102,17103,17104,17105,17106,17107,17108,17109,17110,17111,17112,17113,17114,17115,17116,17117,17118,17119,17120,17121,17122,17123,17124,17125,17126,17127,17128,17129,17130,17131,17132,17133,17134,17135,17136,17137,17138,17139,17140,17141,17142,17143,17144,17145,17146,17147,17148,17149,17150,17151,17152,17153,17154,17155,17156,17157,17158,17159,17160,17161,17162,17163,17164,17165,17166,17167,17168,17169,17170,17171,17172,17173,17174,17175,17176,17177,17178,17179,17180,17181,17182,17183,17184,17185,17186,17187,17188,17189,17190,17191,17192,17193,17194,17195,17196,17197,17198,17199,17200,17201,17202,17203,17204,17205,17206,17207,17208,17209,17210,17211,17212,17213,17214,17215,17216,17217,17218,17219,17220,17221,17222,17223,17224,17225,17226,17227,17228,17229,17230,17231,17232,17233,17234,17235,17236,17237,17238,17239,17240,17241,17242,17243,17244,17245,17246,17247,17248,17249,17250,17251,17252,17253,17254,17255,17256,17257,17258,17259,17260,17261,17262,17263,17264,17265,17266,17267,17268,17269,17270,17271,17272,17273,17274,17275,17276,17277,17278,17279,17280,17281,17282,17283,17284,17285,17286,17287,17288,17289,17290,17291,17292,17293,17294,17295,17296,17297,17298,17299,17300,17301,17302,17303,17304,17305,17306,17307,17308,17309,17310,17311,17312,17313,17314,17315,17316,17317,17318,17319,17320,17321,17322,17323,17324,17325,17326,17327,17328,17329,17330,17331,17332,17333,17334,17335,17336,17337,17338,17339,17340,17341,17342,17343,17344,17345,17346,17347,17348,17349,17350,17351,17352,17353,17354,17355,17356,17357,17358,17359,17360,17361,17362,17363,17364,17365,17366,17367,17368,17369,17370,17371,17372,17373,17374,17375,17376,17377,17378,17379,17380,17381,17382,17383,17384,17385,17386,17387,17388,17389,17390,17391,17392,17393,17394,17395,17396,17397,17398,17399,17400,17401,17402,17403,17404,17405,17406,17407,17408,17409,17410,17411,17412,17413,17414,17415,17416,17417,17418,17419,17420,17421,17422,17423,17424,17425,17426,17427,17428,17429,17430,17431,17432,17433,17434,17435,17436,17437,17438,17439,17440,17441,17442,17443,17444,17445,17446,17447,17448,17449,17450,17451,17452,17453,17454,17455,17456,17457,17458,17459,17460,17461,17462,17463,17464,17465,17466,17467,17468,17469,17470,17471,17472,17473,17474,17475,17476,17477,17478,17479,17480,17481,17482,17483,17484,17485,17486,17487,17488,17489,17490,17491,17492,17493,17494,17495,17496,17497,17498,17499,17500,17501,17502,17503,17504,17505,17506,17507,17508,17509,17510,17511,17512,17513,17514,17515,17516,17517,17518,17519,17520,17521,17522,17523,17524,17525,17526,17527,17528,17529,17530,17531,17532,17533,17534,17535,17536,17537,17538,17539,17540,17541,17542,17543,17544,17545,17546,17547,17548,17549,17550,17551,17552,17553,17554,17555,17556,17557,17558,17559,17560,17561,17562,17563,17564,17565,17566,17567,17568,17569,17570,17571,17572,17573,17574,17575,17576,17577,17578,17579,17580,17581,17582,17583,17584,17585,17586,17587,17588,17589,17590,17591,17592,17593,17594,17595,17596,17597,17598,17599,17600,17601,17602,17603,17604,17605,17606,17607,17608,17609,17610,17611,17612,17613,17614,17615,17616,17617,17618,17619,17620,17621,17622,17623,17624,17625,17626,17627,17628,17629,17630,17631,17632,17633,17634,17635,17636,17637,17638,17639,17640,17641,17642,17643,17644,17645,17646,17647,17648,17649,17650,17651,17652,17653,17654,17655,17656,17657,17658,17659,17660,17661,17662,17663,17664,17665,17666,17667,17668,17669,17670,17671,17672,17673,17674,17675,17676,17677,17678,17679,17680,17681,17682,17683,17684,17685,17686,17687,17688,17689,17690,17691,17692,17693,17694,17695,17696,17697,17698,17699,17700,17701,17702,17703,17704,17705,17706,17707,17708,17709,17710,17711,17712,17713,17714,17715,17716,17717,17718,17719,17720,17721,17722,17723,17724,17725,17726,17727,17728,17729,17730,17731,17732,17733,17734,17735,17736,17737,17738,17739,17740,17741,17742,17743,17744,17745,17746,17747,17748,17749,17750,17751,17752,17753,17754,17755,17756,17757,17758,17759,17760,17761,17762,17763,17764,17765,17766,17767,17768,17769,17770,17771,17772,17773,17774,17775,17776,17777,17778,17779,17780,17781,17782,17783,17784,17785,17786,17787,17788,17789,17790,17791,17792,17793,17794,17795,17796,17797,17798,17799,17800,17801,17802,17803,17804,17805,17806,17807,17808,17809,17810,17811,17812,17813,17814,17815,17816,17817,17818,17819,17820,17821,17822,17823,17824,17825,17826,17827,17828,17829,17830,17831,17832,17833,17834,17835,17836,17837,17838,17839,17840,17841,17842,17843,17844,17845,17846,17847,17848,17849,17850,17851,17852,17853,17854,17855,17856,17857,17858,17859,17860,17861,17862,17863,17864,17865,17866,17867,17868,17869,17870,17871,17872,17873,17874,17875,17876,17877,17878,17879,17880,17881,17882,17883,17884,17885,17886,17887,17888,17889,17890,17891,17892,17893,17894,17895,17896,17897,17898,17899,17900,17901,17902,17903,17904,17905,17906,17907,17908,17909,17910,17911,17912,17913,17914,17915,17916,17917,17918,17919,17920,17921,17922,17923,17924,17925,17926,17927,17928,17929,17930,17931,17932,17933,17934,17935,17936,17937,17938,17939,17940,17941,17942,17943,17944,17945,17946,17947,17948,17949,17950,17951,17952,17953,17954,17955,17956,17957,17958,17959,17960,17961,17962,17963,17964,17965,17966,17967,17968,17969,17970,17971,17972,17973,17974,17975,17976,17977,17978,17979,17980,17981,17982,17983,17984,17985,17986,17987,17988,17989,17990,17991,17992,17993,17994,17995,17996,17997,17998,17999,18000,18001,18002,18003,18004,18005,18006,18007,18008,18009,18010,18011,18012,18013,18014,18015,18016,18017,18018,18019,18020,18021,18022,18023,18024,18025,18026,18027,18028,18029,18030,18031,18032,18033,18034,18035,18036,18037,18038,18039,18040,18041,18042,18043,18044,18045,18046,18047,18048,18049,18050,18051,18052,18053,18054,18055,18056,18057,18058,18059,18060,18061,18062,18063,18064,18065,18066,18067,18068,18069,18070,18071,18072,18073,18074,18075,18076,18077,18078,18079,18080,18081,18082,18083,18084,18085,18086,18087,18088,18089,18090,18091,18092,18093,18094,18095,18096,18097,18098,18099,18100,18101,18102,18103,18104,18105,18106,18107,18108,18109,18110,18111,18112,18113,18114,18115,18116,18117,18118,18119,18120,18121,18122,18123,18124,18125,18126,18127,18128,18129,18130,18131,18132,18133,18134,18135,18136,18137,18138,18139,18140,18141,18142,18143,18144,18145,18146,18147,18148,18149,18150,18151,18152,18153,18154,18155,18156,18157,18158,18159,18160,18161,18162,18163,18164,18165,18166,18167,18168,18169,18170,18171,18172,18173,18174,18175,18176,18177,18178,18179,18180,18181,18182,18183,18184,18185,18186,18187,18188,18189,18190,18191,18192,18193,18194,18195,18196,18197,18198,18199,18200,18201,18202,18203,18204,18205,18206,18207,18208,18209,18210,18211,18212,18213,18214,18215,18216,18217,18218,18219,18220,18221,18222,18223,18224,18225,18226,18227,18228,18229,18230,18231,18232,18233,18234,18235,18236,18237,18238,18239,18240,18241,18242,18243,18244,18245,18246,18247,18248,18249,18250,18251,18252,18253,18254,18255,18256,18257,18258,18259,18260,18261,18262,18263,18264,18265,18266,18267,18268,18269,18270,18271,18272,18273,18274,18275,18276,18277,18278,18279,18280,18281,18282,18283,18284,18285,18286,18287,18288,18289,18290,18291,18292,18293,18294,18295,18296,18297,18298,18299,18300,18301,18302,18303,18304,18305,18306,18307,18308,18309,18310,18311,18312,18313,18314,18315,18316,18317,18318,18319,18320,18321,18322,18323,18324,18325,18326,18327,18328,18329,18330,18331,18332,18333,18334,18335,18336,18337,18338,18339,18340,18341,18342,18343,18344,18345,18346,18347,18348,18349,18350,18351,18352,18353,18354,18355,18356,18357,18358,18359,18360,18361,18362,18363,18364,18365,18366,18367,18368,18369,18370,18371,18372,18373,18374,18375,18376,18377,18378,18379,18380,18381,18382,18383,18384,18385,18386,18387,18388,18389,18390,18391,18392,18393,18394,18395,18396,18397,18398,18399,18400,18401,18402,18403,18404,18405,18406,18407,18408,18409,18410,18411,18412,18413,18414,18415,18416,18417,18418,18419,18420,18421,18422,18423,18424,18425,18426,18427,18428,18429,18430,18431,18432,18433,18434,18435,18436,18437,18438,18439,18440,18441,18442,18443,18444,18445,18446,18447,18448,18449,18450,18451,18452,18453,18454,18455,18456,18457,18458,18459,18460,18461,18462,18463,18464,18465,18466,18467,18468,18469,18470,18471,18472,18473,18474,18475,18476,18477,18478,18479,18480,18481,18482,18483,18484,18485,18486,18487,18488,18489,18490,18491,18492,18493,18494,18495,18496,18497,18498,18499,18500,18501,18502,18503,18504,18505,18506,18507,18508,18509,18510,18511,18512,18513,18514,18515,18516,18517,18518,18519,18520,18521,18522,18523,18524,18525,18526,18527,18528,18529,18530,18531,18532,18533,18534,18535,18536,18537,18538,18539,18540,18541,18542,18543,18544,18545,18546,18547,18548,18549,18550,18551,18552,18553,18554,18555,18556,18557,18558,18559,18560,18561,18562,18563,18564,18565,18566,18567,18568,18569,18570,18571,18572,18573,18574,18575,18576,18577,18578,18579,18580,18581,18582,18583,18584,18585,18586,18587,18588,18589,18590,18591,18592,18593,18594,18595,18596,18597,18598,18599,18600,18601,18602,18603,18604,18605,18606,18607,18608,18609,18610,18611,18612,18613,18614,18615,18616,18617,18618,18619,18620,18621,18622,18623,18624,18625,18626,18627,18628,18629,18630,18631,18632,18633,18634,18635,18636,18637,18638,18639,18640,18641,18642,18643,18644,18645,18646,18647,18648,18649,18650,18651,18652,18653,18654,18655,18656,18657,18658,18659,18660,18661,18662,18663,18664,18665,18666,18667,18668,18669,18670,18671,18672,18673,18674,18675,18676,18677,18678,18679,18680,18681,18682,18683,18684,18685,18686,18687,18688,18689,18690,18691,18692,18693,18694,18695,18696,18697,18698,18699,18700,18701,18702,18703,18704,18705,18706,18707,18708,18709,18710,18711,18712,18713,18714,18715,18716,18717,18718,18719,18720,18721,18722,18723,18724,18725,18726,18727,18728,18729,18730,18731,18732,18733,18734,18735,18736,18737,18738,18739,18740,18741,18742,18743,18744,18745,18746,18747,18748,18749,18750,18751,18752,18753,18754,18755,18756,18757,18758,18759,18760,18761,18762,18763,18764,18765,18766,18767,18768,18769,18770,18771,18772,18773,18774,18775,18776,18777,18778,18779,18780,18781,18782,18783,18784,18785,18786,18787,18788,18789,18790,18791,18792,18793,18794,18795,18796,18797,18798,18799,18800,18801,18802,18803,18804,18805,18806,18807,18808,18809,18810,18811,18812,18813,18814,18815,18816,18817,18818,18819,18820,18821,18822,18823,18824,18825,18826,18827,18828,18829,18830,18831,18832,18833,18834,18835,18836,18837,18838,18839,18840,18841,18842,18843,18844,18845,18846,18847,18848,18849,18850,18851,18852,18853,18854,18855,18856,18857,18858,18859,18860,18861,18862,18863,18864,18865,18866,18867,18868,18869,18870,18871,18872,18873,18874,18875,18876,18877,18878,18879,18880,18881,18882,18883,18884,18885,18886,18887,18888,18889,18890,18891,18892,18893,18894,18895,18896,18897,18898,18899,18900,18901,18902,18903,18904,18905,18906,18907,18908,18909,18910,18911,18912,18913,18914,18915,18916,18917,18918,18919,18920,18921,18922,18923,18924,18925,18926,18927,18928,18929,18930,18931,18932,18933,18934,18935,18936,18937,18938,18939,18940,18941,18942,18943,18944,18945,18946,18947,18948,18949,18950,18951,18952,18953,18954,18955,18956,18957,18958,18959,18960,18961,18962,18963,18964,18965,18966,18967,18968,18969,18970,18971,18972,18973,18974,18975,18976,18977,18978,18979,18980,18981,18982,18983,18984,18985,18986,18987,18988,18989,18990,18991,18992,18993,18994,18995,18996,18997,18998,18999,19000,19001,19002,19003,19004,19005,19006,19007,19008,19009,19010,19011,19012,19013,19014,19015,19016,19017,19018,19019,19020,19021,19022,19023,19024,19025,19026,19027,19028,19029,19030,19031,19032,19033,19034,19035,19036,19037,19038,19039,19040,19041,19042,19043,19044,19045,19046,19047,19048,19049,19050,19051,19052,19053,19054,19055,19056,19057,19058,19059,19060,19061,19062,19063,19064,19065,19066,19067,19068,19069,19070,19071,19072,19073,19074,19075,19076,19077,19078,19079,19080,19081,19082,19083,19084,19085,19086,19087,19088,19089,19090,19091,19092,19093,19094,19095,19096,19097,19098,19099,19100,19101,19102,19103,19104,19105,19106,19107,19108,19109,19110,19111,19112,19113,19114,19115,19116,19117,19118,19119,19120,19121,19122,19123,19124,19125,19126,19127,19128,19129,19130,19131,19132,19133,19134,19135,19136,19137,19138,19139,19140,19141,19142,19143,19144,19145,19146,19147,19148,19149,19150,19151,19152,19153,19154,19155,19156,19157,19158,19159,19160,19161,19162,19163,19164,19165,19166,19167,19168,19169,19170,19171,19172,19173,19174,19175,19176,19177,19178,19179,19180,19181,19182,19183,19184,19185,19186,19187,19188,19189,19190,19191,19192,19193,19194,19195,19196,19197,19198,19199,19200,19201,19202,19203,19204,19205,19206,19207,19208,19209,19210,19211,19212,19213,19214,19215,19216,19217,19218,19219,19220,19221,19222,19223,19224,19225,19226,19227,19228,19229,19230,19231,19232,19233,19234,19235,19236,19237,19238,19239,19240,19241,19242,19243,19244,19245,19246,19247,19248,19249,19250,19251,19252,19253,19254,19255,19256,19257,19258,19259,19260,19261,19262,19263,19264,19265,19266,19267,19268,19269,19270,19271,19272,19273,19274,19275,19276,19277,19278,19279,19280,19281,19282,19283,19284,19285,19286,19287,19288,19289,19290,19291,19292,19293,19294,19295,19296,19297,19298,19299,19300,19301,19302,19303,19304,19305,19306,19307,19308,19309,19310,19311,19312,19313,19314,19315,19316,19317,19318,19319,19320,19321,19322,19323,19324,19325,19326,19327,19328,19329,19330,19331,19332,19333,19334,19335,19336,19337,19338,19339,19340,19341,19342,19343,19344,19345,19346,19347,19348,19349,19350,19351,19352,19353,19354,19355,19356,19357,19358,19359,19360,19361,19362,19363,19364,19365,19366,19367,19368,19369,19370,19371,19372,19373,19374,19375,19376,19377,19378,19379,19380,19381,19382,19383,19384,19385,19386,19387,19388,19389,19390,19391,19392,19393,19394,19395,19396,19397,19398,19399,19400,19401,19402,19403,19404,19405,19406,19407,19408,19409,19410,19411,19412,19413,19414,19415,19416,19417,19418,19419,19420,19421,19422,19423,19424,19425,19426,19427,19428,19429,19430,19431,19432,19433,19434,19435,19436,19437,19438,19439,19440,19441,19442,19443,19444,19445,19446,19447,19448,19449,19450,19451,19452,19453,19454,19455,19456,19457,19458,19459,19460,19461,19462,19463,19464,19465,19466,19467,19468,19469,19470,19471,19472,19473,19474,19475,19476,19477,19478,19479,19480,19481,19482,19483,19484,19485,19486,19487,19488,19489,19490,19491,19492,19493,19494,19495,19496,19497,19498,19499,19500,19501,19502,19503,19504,19505,19506,19507,19508,19509,19510,19511,19512,19513,19514,19515,19516,19517,19518,19519,19520,19521,19522,19523,19524,19525,19526,19527,19528,19529,19530,19531,19532,19533,19534,19535,19536,19537,19538,19539,19540,19541,19542,19543,19544,19545,19546,19547,19548,19549,19550,19551,19552,19553,19554,19555,19556,19557,19558,19559,19560,19561,19562,19563,19564,19565,19566,19567,19568,19569,19570,19571,19572,19573,19574,19575,19576,19577,19578,19579,19580,19581,19582,19583,19584,19585,19586,19587,19588,19589,19590,19591,19592,19593,19594,19595,19596,19597,19598,19599,19600,19601,19602,19603,19604,19605,19606,19607,19608,19609,19610,19611,19612,19613,19614,19615,19616,19617,19618,19619,19620,19621,19622,19623,19624,19625,19626,19627,19628,19629,19630,19631,19632,19633,19634,19635,19636,19637,19638,19639,19640,19641,19642,19643,19644,19645,19646,19647,19648,19649,19650,19651,19652,19653,19654,19655,19656,19657,19658,19659,19660,19661,19662,19663,19664,19665,19666,19667,19668,19669,19670,19671,19672,19673,19674,19675,19676,19677,19678,19679,19680,19681,19682,19683,19684,19685,19686,19687,19688,19689,19690,19691,19692,19693,19694,19695,19696,19697,19698,19699,19700,19701,19702,19703,19704,19705,19706,19707,19708,19709,19710,19711,19712,19713,19714,19715,19716,19717,19718,19719,19720,19721,19722,19723,19724,19725,19726,19727,19728,19729,19730,19731,19732,19733,19734,19735,19736,19737,19738,19739,19740,19741,19742,19743,19744,19745,19746,19747,19748,19749,19750,19751,19752,19753,19754,19755,19756,19757,19758,19759,19760,19761,19762,19763,19764,19765,19766,19767,19768,19769,19770,19771,19772,19773,19774,19775,19776,19777,19778,19779,19780,19781,19782,19783,19784,19785,19786,19787,19788,19789,19790,19791,19792,19793,19794,19795,19796,19797,19798,19799,19800,19801,19802,19803,19804,19805,19806,19807,19808,19809,19810,19811,19812,19813,19814,19815,19816,19817,19818,19819,19820,19821,19822,19823,19824,19825,19826,19827,19828,19829,19830,19831,19832,19833,19834,19835,19836,19837,19838,19839,19840,19841,19842,19843,19844,19845,19846,19847,19848,19849,19850,19851,19852,19853,19854,19855,19856,19857,19858,19859,19860,19861,19862,19863,19864,19865,19866,19867,19868,19869,19870,19871,19872,19873,19874,19875,19876,19877,19878,19879,19880,19881,19882,19883,19884,19885,19886,19887,19888,19889,19890,19891,19892,19893,19968,19969,19970,19971,19972,19973,19974,19975,19976,19977,19978,19979,19980,19981,19982,19983,19984,19985,19986,19987,19988,19989,19990,19991,19992,19993,19994,19995,19996,19997,19998,19999,20000,20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20013,20014,20015,20016,20017,20018,20019,20020,20021,20022,20023,20024,20025,20026,20027,20028,20029,20030,20031,20032,20033,20034,20035,20036,20037,20038,20039,20040,20041,20042,20043,20044,20045,20046,20047,20048,20049,20050,20051,20052,20053,20054,20055,20056,20057,20058,20059,20060,20061,20062,20063,20064,20065,20066,20067,20068,20069,20070,20071,20072,20073,20074,20075,20076,20077,20078,20079,20080,20081,20082,20083,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20094,20095,20096,20097,20098,20099,20100,20101,20102,20103,20104,20105,20106,20107,20108,20109,20110,20111,20112,20113,20114,20115,20116,20117,20118,20119,20120,20121,20122,20123,20124,20125,20126,20127,20128,20129,20130,20131,20132,20133,20134,20135,20136,20137,20138,20139,20140,20141,20142,20143,20144,20145,20146,20147,20148,20149,20150,20151,20152,20153,20154,20155,20156,20157,20158,20159,20160,20161,20162,20163,20164,20165,20166,20167,20168,20169,20170,20171,20172,20173,20174,20175,20176,20177,20178,20179,20180,20181,20182,20183,20184,20185,20186,20187,20188,20189,20190,20191,20192,20193,20194,20195,20196,20197,20198,20199,20200,20201,20202,20203,20204,20205,20206,20207,20208,20209,20210,20211,20212,20213,20214,20215,20216,20217,20218,20219,20220,20221,20222,20223,20224,20225,20226,20227,20228,20229,20230,20231,20232,20233,20234,20235,20236,20237,20238,20239,20240,20241,20242,20243,20244,20245,20246,20247,20248,20249,20250,20251,20252,20253,20254,20255,20256,20257,20258,20259,20260,20261,20262,20263,20264,20265,20266,20267,20268,20269,20270,20271,20272,20273,20274,20275,20276,20277,20278,20279,20280,20281,20282,20283,20284,20285,20286,20287,20288,20289,20290,20291,20292,20293,20294,20295,20296,20297,20298,20299,20300,20301,20302,20303,20304,20305,20306,20307,20308,20309,20310,20311,20312,20313,20314,20315,20316,20317,20318,20319,20320,20321,20322,20323,20324,20325,20326,20327,20328,20329,20330,20331,20332,20333,20334,20335,20336,20337,20338,20339,20340,20341,20342,20343,20344,20345,20346,20347,20348,20349,20350,20351,20352,20353,20354,20355,20356,20357,20358,20359,20360,20361,20362,20363,20364,20365,20366,20367,20368,20369,20370,20371,20372,20373,20374,20375,20376,20377,20378,20379,20380,20381,20382,20383,20384,20385,20386,20387,20388,20389,20390,20391,20392,20393,20394,20395,20396,20397,20398,20399,20400,20401,20402,20403,20404,20405,20406,20407,20408,20409,20410,20411,20412,20413,20414,20415,20416,20417,20418,20419,20420,20421,20422,20423,20424,20425,20426,20427,20428,20429,20430,20431,20432,20433,20434,20435,20436,20437,20438,20439,20440,20441,20442,20443,20444,20445,20446,20447,20448,20449,20450,20451,20452,20453,20454,20455,20456,20457,20458,20459,20460,20461,20462,20463,20464,20465,20466,20467,20468,20469,20470,20471,20472,20473,20474,20475,20476,20477,20478,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,20491,20492,20493,20494,20495,20496,20497,20498,20499,20500,20501,20502,20503,20504,20505,20506,20507,20508,20509,20510,20511,20512,20513,20514,20515,20516,20517,20518,20519,20520,20521,20522,20523,20524,20525,20526,20527,20528,20529,20530,20531,20532,20533,20534,20535,20536,20537,20538,20539,20540,20541,20542,20543,20544,20545,20546,20547,20548,20549,20550,20551,20552,20553,20554,20555,20556,20557,20558,20559,20560,20561,20562,20563,20564,20565,20566,20567,20568,20569,20570,20571,20572,20573,20574,20575,20576,20577,20578,20579,20580,20581,20582,20583,20584,20585,20586,20587,20588,20589,20590,20591,20592,20593,20594,20595,20596,20597,20598,20599,20600,20601,20602,20603,20604,20605,20606,20607,20608,20609,20610,20611,20612,20613,20614,20615,20616,20617,20618,20619,20620,20621,20622,20623,20624,20625,20626,20627,20628,20629,20630,20631,20632,20633,20634,20635,20636,20637,20638,20639,20640,20641,20642,20643,20644,20645,20646,20647,20648,20649,20650,20651,20652,20653,20654,20655,20656,20657,20658,20659,20660,20661,20662,20663,20664,20665,20666,20667,20668,20669,20670,20671,20672,20673,20674,20675,20676,20677,20678,20679,20680,20681,20682,20683,20684,20685,20686,20687,20688,20689,20690,20691,20692,20693,20694,20695,20696,20697,20698,20699,20700,20701,20702,20703,20704,20705,20706,20707,20708,20709,20710,20711,20712,20713,20714,20715,20716,20717,20718,20719,20720,20721,20722,20723,20724,20725,20726,20727,20728,20729,20730,20731,20732,20733,20734,20735,20736,20737,20738,20739,20740,20741,20742,20743,20744,20745,20746,20747,20748,20749,20750,20751,20752,20753,20754,20755,20756,20757,20758,20759,20760,20761,20762,20763,20764,20765,20766,20767,20768,20769,20770,20771,20772,20773,20774,20775,20776,20777,20778,20779,20780,20781,20782,20783,20784,20785,20786,20787,20788,20789,20790,20791,20792,20793,20794,20795,20796,20797,20798,20799,20800,20801,20802,20803,20804,20805,20806,20807,20808,20809,20810,20811,20812,20813,20814,20815,20816,20817,20818,20819,20820,20821,20822,20823,20824,20825,20826,20827,20828,20829,20830,20831,20832,20833,20834,20835,20836,20837,20838,20839,20840,20841,20842,20843,20844,20845,20846,20847,20848,20849,20850,20851,20852,20853,20854,20855,20856,20857,20858,20859,20860,20861,20862,20863,20864,20865,20866,20867,20868,20869,20870,20871,20872,20873,20874,20875,20876,20877,20878,20879,20880,20881,20882,20883,20884,20885,20886,20887,20888,20889,20890,20891,20892,20893,20894,20895,20896,20897,20898,20899,20900,20901,20902,20903,20904,20905,20906,20907,20908,20909,20910,20911,20912,20913,20914,20915,20916,20917,20918,20919,20920,20921,20922,20923,20924,20925,20926,20927,20928,20929,20930,20931,20932,20933,20934,20935,20936,20937,20938,20939,20940,20941,20942,20943,20944,20945,20946,20947,20948,20949,20950,20951,20952,20953,20954,20955,20956,20957,20958,20959,20960,20961,20962,20963,20964,20965,20966,20967,20968,20969,20970,20971,20972,20973,20974,20975,20976,20977,20978,20979,20980,20981,20982,20983,20984,20985,20986,20987,20988,20989,20990,20991,20992,20993,20994,20995,20996,20997,20998,20999,21000,21001,21002,21003,21004,21005,21006,21007,21008,21009,21010,21011,21012,21013,21014,21015,21016,21017,21018,21019,21020,21021,21022,21023,21024,21025,21026,21027,21028,21029,21030,21031,21032,21033,21034,21035,21036,21037,21038,21039,21040,21041,21042,21043,21044,21045,21046,21047,21048,21049,21050,21051,21052,21053,21054,21055,21056,21057,21058,21059,21060,21061,21062,21063,21064,21065,21066,21067,21068,21069,21070,21071,21072,21073,21074,21075,21076,21077,21078,21079,21080,21081,21082,21083,21084,21085,21086,21087,21088,21089,21090,21091,21092,21093,21094,21095,21096,21097,21098,21099,21100,21101,21102,21103,21104,21105,21106,21107,21108,21109,21110,21111,21112,21113,21114,21115,21116,21117,21118,21119,21120,21121,21122,21123,21124,21125,21126,21127,21128,21129,21130,21131,21132,21133,21134,21135,21136,21137,21138,21139,21140,21141,21142,21143,21144,21145,21146,21147,21148,21149,21150,21151,21152,21153,21154,21155,21156,21157,21158,21159,21160,21161,21162,21163,21164,21165,21166,21167,21168,21169,21170,21171,21172,21173,21174,21175,21176,21177,21178,21179,21180,21181,21182,21183,21184,21185,21186,21187,21188,21189,21190,21191,21192,21193,21194,21195,21196,21197,21198,21199,21200,21201,21202,21203,21204,21205,21206,21207,21208,21209,21210,21211,21212,21213,21214,21215,21216,21217,21218,21219,21220,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21232,21233,21234,21235,21236,21237,21238,21239,21240,21241,21242,21243,21244,21245,21246,21247,21248,21249,21250,21251,21252,21253,21254,21255,21256,21257,21258,21259,21260,21261,21262,21263,21264,21265,21266,21267,21268,21269,21270,21271,21272,21273,21274,21275,21276,21277,21278,21279,21280,21281,21282,21283,21284,21285,21286,21287,21288,21289,21290,21291,21292,21293,21294,21295,21296,21297,21298,21299,21300,21301,21302,21303,21304,21305,21306,21307,21308,21309,21310,21311,21312,21313,21314,21315,21316,21317,21318,21319,21320,21321,21322,21323,21324,21325,21326,21327,21328,21329,21330,21331,21332,21333,21334,21335,21336,21337,21338,21339,21340,21341,21342,21343,21344,21345,21346,21347,21348,21349,21350,21351,21352,21353,21354,21355,21356,21357,21358,21359,21360,21361,21362,21363,21364,21365,21366,21367,21368,21369,21370,21371,21372,21373,21374,21375,21376,21377,21378,21379,21380,21381,21382,21383,21384,21385,21386,21387,21388,21389,21390,21391,21392,21393,21394,21395,21396,21397,21398,21399,21400,21401,21402,21403,21404,21405,21406,21407,21408,21409,21410,21411,21412,21413,21414,21415,21416,21417,21418,21419,21420,21421,21422,21423,21424,21425,21426,21427,21428,21429,21430,21431,21432,21433,21434,21435,21436,21437,21438,21439,21440,21441,21442,21443,21444,21445,21446,21447,21448,21449,21450,21451,21452,21453,21454,21455,21456,21457,21458,21459,21460,21461,21462,21463,21464,21465,21466,21467,21468,21469,21470,21471,21472,21473,21474,21475,21476,21477,21478,21479,21480,21481,21482,21483,21484,21485,21486,21487,21488,21489,21490,21491,21492,21493,21494,21495,21496,21497,21498,21499,21500,21501,21502,21503,21504,21505,21506,21507,21508,21509,21510,21511,21512,21513,21514,21515,21516,21517,21518,21519,21520,21521,21522,21523,21524,21525,21526,21527,21528,21529,21530,21531,21532,21533,21534,21535,21536,21537,21538,21539,21540,21541,21542,21543,21544,21545,21546,21547,21548,21549,21550,21551,21552,21553,21554,21555,21556,21557,21558,21559,21560,21561,21562,21563,21564,21565,21566,21567,21568,21569,21570,21571,21572,21573,21574,21575,21576,21577,21578,21579,21580,21581,21582,21583,21584,21585,21586,21587,21588,21589,21590,21591,21592,21593,21594,21595,21596,21597,21598,21599,21600,21601,21602,21603,21604,21605,21606,21607,21608,21609,21610,21611,21612,21613,21614,21615,21616,21617,21618,21619,21620,21621,21622,21623,21624,21625,21626,21627,21628,21629,21630,21631,21632,21633,21634,21635,21636,21637,21638,21639,21640,21641,21642,21643,21644,21645,21646,21647,21648,21649,21650,21651,21652,21653,21654,21655,21656,21657,21658,21659,21660,21661,21662,21663,21664,21665,21666,21667,21668,21669,21670,21671,21672,21673,21674,21675,21676,21677,21678,21679,21680,21681,21682,21683,21684,21685,21686,21687,21688,21689,21690,21691,21692,21693,21694,21695,21696,21697,21698,21699,21700,21701,21702,21703,21704,21705,21706,21707,21708,21709,21710,21711,21712,21713,21714,21715,21716,21717,21718,21719,21720,21721,21722,21723,21724,21725,21726,21727,21728,21729,21730,21731,21732,21733,21734,21735,21736,21737,21738,21739,21740,21741,21742,21743,21744,21745,21746,21747,21748,21749,21750,21751,21752,21753,21754,21755,21756,21757,21758,21759,21760,21761,21762,21763,21764,21765,21766,21767,21768,21769,21770,21771,21772,21773,21774,21775,21776,21777,21778,21779,21780,21781,21782,21783,21784,21785,21786,21787,21788,21789,21790,21791,21792,21793,21794,21795,21796,21797,21798,21799,21800,21801,21802,21803,21804,21805,21806,21807,21808,21809,21810,21811,21812,21813,21814,21815,21816,21817,21818,21819,21820,21821,21822,21823,21824,21825,21826,21827,21828,21829,21830,21831,21832,21833,21834,21835,21836,21837,21838,21839,21840,21841,21842,21843,21844,21845,21846,21847,21848,21849,21850,21851,21852,21853,21854,21855,21856,21857,21858,21859,21860,21861,21862,21863,21864,21865,21866,21867,21868,21869,21870,21871,21872,21873,21874,21875,21876,21877,21878,21879,21880,21881,21882,21883,21884,21885,21886,21887,21888,21889,21890,21891,21892,21893,21894,21895,21896,21897,21898,21899,21900,21901,21902,21903,21904,21905,21906,21907,21908,21909,21910,21911,21912,21913,21914,21915,21916,21917,21918,21919,21920,21921,21922,21923,21924,21925,21926,21927,21928,21929,21930,21931,21932,21933,21934,21935,21936,21937,21938,21939,21940,21941,21942,21943,21944,21945,21946,21947,21948,21949,21950,21951,21952,21953,21954,21955,21956,21957,21958,21959,21960,21961,21962,21963,21964,21965,21966,21967,21968,21969,21970,21971,21972,21973,21974,21975,21976,21977,21978,21979,21980,21981,21982,21983,21984,21985,21986,21987,21988,21989,21990,21991,21992,21993,21994,21995,21996,21997,21998,21999,22000,22001,22002,22003,22004,22005,22006,22007,22008,22009,22010,22011,22012,22013,22014,22015,22016,22017,22018,22019,22020,22021,22022,22023,22024,22025,22026,22027,22028,22029,22030,22031,22032,22033,22034,22035,22036,22037,22038,22039,22040,22041,22042,22043,22044,22045,22046,22047,22048,22049,22050,22051,22052,22053,22054,22055,22056,22057,22058,22059,22060,22061,22062,22063,22064,22065,22066,22067,22068,22069,22070,22071,22072,22073,22074,22075,22076,22077,22078,22079,22080,22081,22082,22083,22084,22085,22086,22087,22088,22089,22090,22091,22092,22093,22094,22095,22096,22097,22098,22099,22100,22101,22102,22103,22104,22105,22106,22107,22108,22109,22110,22111,22112,22113,22114,22115,22116,22117,22118,22119,22120,22121,22122,22123,22124,22125,22126,22127,22128,22129,22130,22131,22132,22133,22134,22135,22136,22137,22138,22139,22140,22141,22142,22143,22144,22145,22146,22147,22148,22149,22150,22151,22152,22153,22154,22155,22156,22157,22158,22159,22160,22161,22162,22163,22164,22165,22166,22167,22168,22169,22170,22171,22172,22173,22174,22175,22176,22177,22178,22179,22180,22181,22182,22183,22184,22185,22186,22187,22188,22189,22190,22191,22192,22193,22194,22195,22196,22197,22198,22199,22200,22201,22202,22203,22204,22205,22206,22207,22208,22209,22210,22211,22212,22213,22214,22215,22216,22217,22218,22219,22220,22221,22222,22223,22224,22225,22226,22227,22228,22229,22230,22231,22232,22233,22234,22235,22236,22237,22238,22239,22240,22241,22242,22243,22244,22245,22246,22247,22248,22249,22250,22251,22252,22253,22254,22255,22256,22257,22258,22259,22260,22261,22262,22263,22264,22265,22266,22267,22268,22269,22270,22271,22272,22273,22274,22275,22276,22277,22278,22279,22280,22281,22282,22283,22284,22285,22286,22287,22288,22289,22290,22291,22292,22293,22294,22295,22296,22297,22298,22299,22300,22301,22302,22303,22304,22305,22306,22307,22308,22309,22310,22311,22312,22313,22314,22315,22316,22317,22318,22319,22320,22321,22322,22323,22324,22325,22326,22327,22328,22329,22330,22331,22332,22333,22334,22335,22336,22337,22338,22339,22340,22341,22342,22343,22344,22345,22346,22347,22348,22349,22350,22351,22352,22353,22354,22355,22356,22357,22358,22359,22360,22361,22362,22363,22364,22365,22366,22367,22368,22369,22370,22371,22372,22373,22374,22375,22376,22377,22378,22379,22380,22381,22382,22383,22384,22385,22386,22387,22388,22389,22390,22391,22392,22393,22394,22395,22396,22397,22398,22399,22400,22401,22402,22403,22404,22405,22406,22407,22408,22409,22410,22411,22412,22413,22414,22415,22416,22417,22418,22419,22420,22421,22422,22423,22424,22425,22426,22427,22428,22429,22430,22431,22432,22433,22434,22435,22436,22437,22438,22439,22440,22441,22442,22443,22444,22445,22446,22447,22448,22449,22450,22451,22452,22453,22454,22455,22456,22457,22458,22459,22460,22461,22462,22463,22464,22465,22466,22467,22468,22469,22470,22471,22472,22473,22474,22475,22476,22477,22478,22479,22480,22481,22482,22483,22484,22485,22486,22487,22488,22489,22490,22491,22492,22493,22494,22495,22496,22497,22498,22499,22500,22501,22502,22503,22504,22505,22506,22507,22508,22509,22510,22511,22512,22513,22514,22515,22516,22517,22518,22519,22520,22521,22522,22523,22524,22525,22526,22527,22528,22529,22530,22531,22532,22533,22534,22535,22536,22537,22538,22539,22540,22541,22542,22543,22544,22545,22546,22547,22548,22549,22550,22551,22552,22553,22554,22555,22556,22557,22558,22559,22560,22561,22562,22563,22564,22565,22566,22567,22568,22569,22570,22571,22572,22573,22574,22575,22576,22577,22578,22579,22580,22581,22582,22583,22584,22585,22586,22587,22588,22589,22590,22591,22592,22593,22594,22595,22596,22597,22598,22599,22600,22601,22602,22603,22604,22605,22606,22607,22608,22609,22610,22611,22612,22613,22614,22615,22616,22617,22618,22619,22620,22621,22622,22623,22624,22625,22626,22627,22628,22629,22630,22631,22632,22633,22634,22635,22636,22637,22638,22639,22640,22641,22642,22643,22644,22645,22646,22647,22648,22649,22650,22651,22652,22653,22654,22655,22656,22657,22658,22659,22660,22661,22662,22663,22664,22665,22666,22667,22668,22669,22670,22671,22672,22673,22674,22675,22676,22677,22678,22679,22680,22681,22682,22683,22684,22685,22686,22687,22688,22689,22690,22691,22692,22693,22694,22695,22696,22697,22698,22699,22700,22701,22702,22703,22704,22705,22706,22707,22708,22709,22710,22711,22712,22713,22714,22715,22716,22717,22718,22719,22720,22721,22722,22723,22724,22725,22726,22727,22728,22729,22730,22731,22732,22733,22734,22735,22736,22737,22738,22739,22740,22741,22742,22743,22744,22745,22746,22747,22748,22749,22750,22751,22752,22753,22754,22755,22756,22757,22758,22759,22760,22761,22762,22763,22764,22765,22766,22767,22768,22769,22770,22771,22772,22773,22774,22775,22776,22777,22778,22779,22780,22781,22782,22783,22784,22785,22786,22787,22788,22789,22790,22791,22792,22793,22794,22795,22796,22797,22798,22799,22800,22801,22802,22803,22804,22805,22806,22807,22808,22809,22810,22811,22812,22813,22814,22815,22816,22817,22818,22819,22820,22821,22822,22823,22824,22825,22826,22827,22828,22829,22830,22831,22832,22833,22834,22835,22836,22837,22838,22839,22840,22841,22842,22843,22844,22845,22846,22847,22848,22849,22850,22851,22852,22853,22854,22855,22856,22857,22858,22859,22860,22861,22862,22863,22864,22865,22866,22867,22868,22869,22870,22871,22872,22873,22874,22875,22876,22877,22878,22879,22880,22881,22882,22883,22884,22885,22886,22887,22888,22889,22890,22891,22892,22893,22894,22895,22896,22897,22898,22899,22900,22901,22902,22903,22904,22905,22906,22907,22908,22909,22910,22911,22912,22913,22914,22915,22916,22917,22918,22919,22920,22921,22922,22923,22924,22925,22926,22927,22928,22929,22930,22931,22932,22933,22934,22935,22936,22937,22938,22939,22940,22941,22942,22943,22944,22945,22946,22947,22948,22949,22950,22951,22952,22953,22954,22955,22956,22957,22958,22959,22960,22961,22962,22963,22964,22965,22966,22967,22968,22969,22970,22971,22972,22973,22974,22975,22976,22977,22978,22979,22980,22981,22982,22983,22984,22985,22986,22987,22988,22989,22990,22991,22992,22993,22994,22995,22996,22997,22998,22999,23000,23001,23002,23003,23004,23005,23006,23007,23008,23009,23010,23011,23012,23013,23014,23015,23016,23017,23018,23019,23020,23021,23022,23023,23024,23025,23026,23027,23028,23029,23030,23031,23032,23033,23034,23035,23036,23037,23038,23039,23040,23041,23042,23043,23044,23045,23046,23047,23048,23049,23050,23051,23052,23053,23054,23055,23056,23057,23058,23059,23060,23061,23062,23063,23064,23065,23066,23067,23068,23069,23070,23071,23072,23073,23074,23075,23076,23077,23078,23079,23080,23081,23082,23083,23084,23085,23086,23087,23088,23089,23090,23091,23092,23093,23094,23095,23096,23097,23098,23099,23100,23101,23102,23103,23104,23105,23106,23107,23108,23109,23110,23111,23112,23113,23114,23115,23116,23117,23118,23119,23120,23121,23122,23123,23124,23125,23126,23127,23128,23129,23130,23131,23132,23133,23134,23135,23136,23137,23138,23139,23140,23141,23142,23143,23144,23145,23146,23147,23148,23149,23150,23151,23152,23153,23154,23155,23156,23157,23158,23159,23160,23161,23162,23163,23164,23165,23166,23167,23168,23169,23170,23171,23172,23173,23174,23175,23176,23177,23178,23179,23180,23181,23182,23183,23184,23185,23186,23187,23188,23189,23190,23191,23192,23193,23194,23195,23196,23197,23198,23199,23200,23201,23202,23203,23204,23205,23206,23207,23208,23209,23210,23211,23212,23213,23214,23215,23216,23217,23218,23219,23220,23221,23222,23223,23224,23225,23226,23227,23228,23229,23230,23231,23232,23233,23234,23235,23236,23237,23238,23239,23240,23241,23242,23243,23244,23245,23246,23247,23248,23249,23250,23251,23252,23253,23254,23255,23256,23257,23258,23259,23260,23261,23262,23263,23264,23265,23266,23267,23268,23269,23270,23271,23272,23273,23274,23275,23276,23277,23278,23279,23280,23281,23282,23283,23284,23285,23286,23287,23288,23289,23290,23291,23292,23293,23294,23295,23296,23297,23298,23299,23300,23301,23302,23303,23304,23305,23306,23307,23308,23309,23310,23311,23312,23313,23314,23315,23316,23317,23318,23319,23320,23321,23322,23323,23324,23325,23326,23327,23328,23329,23330,23331,23332,23333,23334,23335,23336,23337,23338,23339,23340,23341,23342,23343,23344,23345,23346,23347,23348,23349,23350,23351,23352,23353,23354,23355,23356,23357,23358,23359,23360,23361,23362,23363,23364,23365,23366,23367,23368,23369,23370,23371,23372,23373,23374,23375,23376,23377,23378,23379,23380,23381,23382,23383,23384,23385,23386,23387,23388,23389,23390,23391,23392,23393,23394,23395,23396,23397,23398,23399,23400,23401,23402,23403,23404,23405,23406,23407,23408,23409,23410,23411,23412,23413,23414,23415,23416,23417,23418,23419,23420,23421,23422,23423,23424,23425,23426,23427,23428,23429,23430,23431,23432,23433,23434,23435,23436,23437,23438,23439,23440,23441,23442,23443,23444,23445,23446,23447,23448,23449,23450,23451,23452,23453,23454,23455,23456,23457,23458,23459,23460,23461,23462,23463,23464,23465,23466,23467,23468,23469,23470,23471,23472,23473,23474,23475,23476,23477,23478,23479,23480,23481,23482,23483,23484,23485,23486,23487,23488,23489,23490,23491,23492,23493,23494,23495,23496,23497,23498,23499,23500,23501,23502,23503,23504,23505,23506,23507,23508,23509,23510,23511,23512,23513,23514,23515,23516,23517,23518,23519,23520,23521,23522,23523,23524,23525,23526,23527,23528,23529,23530,23531,23532,23533,23534,23535,23536,23537,23538,23539,23540,23541,23542,23543,23544,23545,23546,23547,23548,23549,23550,23551,23552,23553,23554,23555,23556,23557,23558,23559,23560,23561,23562,23563,23564,23565,23566,23567,23568,23569,23570,23571,23572,23573,23574,23575,23576,23577,23578,23579,23580,23581,23582,23583,23584,23585,23586,23587,23588,23589,23590,23591,23592,23593,23594,23595,23596,23597,23598,23599,23600,23601,23602,23603,23604,23605,23606,23607,23608,23609,23610,23611,23612,23613,23614,23615,23616,23617,23618,23619,23620,23621,23622,23623,23624,23625,23626,23627,23628,23629,23630,23631,23632,23633,23634,23635,23636,23637,23638,23639,23640,23641,23642,23643,23644,23645,23646,23647,23648,23649,23650,23651,23652,23653,23654,23655,23656,23657,23658,23659,23660,23661,23662,23663,23664,23665,23666,23667,23668,23669,23670,23671,23672,23673,23674,23675,23676,23677,23678,23679,23680,23681,23682,23683,23684,23685,23686,23687,23688,23689,23690,23691,23692,23693,23694,23695,23696,23697,23698,23699,23700,23701,23702,23703,23704,23705,23706,23707,23708,23709,23710,23711,23712,23713,23714,23715,23716,23717,23718,23719,23720,23721,23722,23723,23724,23725,23726,23727,23728,23729,23730,23731,23732,23733,23734,23735,23736,23737,23738,23739,23740,23741,23742,23743,23744,23745,23746,23747,23748,23749,23750,23751,23752,23753,23754,23755,23756,23757,23758,23759,23760,23761,23762,23763,23764,23765,23766,23767,23768,23769,23770,23771,23772,23773,23774,23775,23776,23777,23778,23779,23780,23781,23782,23783,23784,23785,23786,23787,23788,23789,23790,23791,23792,23793,23794,23795,23796,23797,23798,23799,23800,23801,23802,23803,23804,23805,23806,23807,23808,23809,23810,23811,23812,23813,23814,23815,23816,23817,23818,23819,23820,23821,23822,23823,23824,23825,23826,23827,23828,23829,23830,23831,23832,23833,23834,23835,23836,23837,23838,23839,23840,23841,23842,23843,23844,23845,23846,23847,23848,23849,23850,23851,23852,23853,23854,23855,23856,23857,23858,23859,23860,23861,23862,23863,23864,23865,23866,23867,23868,23869,23870,23871,23872,23873,23874,23875,23876,23877,23878,23879,23880,23881,23882,23883,23884,23885,23886,23887,23888,23889,23890,23891,23892,23893,23894,23895,23896,23897,23898,23899,23900,23901,23902,23903,23904,23905,23906,23907,23908,23909,23910,23911,23912,23913,23914,23915,23916,23917,23918,23919,23920,23921,23922,23923,23924,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23938,23939,23940,23941,23942,23943,23944,23945,23946,23947,23948,23949,23950,23951,23952,23953,23954,23955,23956,23957,23958,23959,23960,23961,23962,23963,23964,23965,23966,23967,23968,23969,23970,23971,23972,23973,23974,23975,23976,23977,23978,23979,23980,23981,23982,23983,23984,23985,23986,23987,23988,23989,23990,23991,23992,23993,23994,23995,23996,23997,23998,23999,24000,24001,24002,24003,24004,24005,24006,24007,24008,24009,24010,24011,24012,24013,24014,24015,24016,24017,24018,24019,24020,24021,24022,24023,24024,24025,24026,24027,24028,24029,24030,24031,24032,24033,24034,24035,24036,24037,24038,24039,24040,24041,24042,24043,24044,24045,24046,24047,24048,24049,24050,24051,24052,24053,24054,24055,24056,24057,24058,24059,24060,24061,24062,24063,24064,24065,24066,24067,24068,24069,24070,24071,24072,24073,24074,24075,24076,24077,24078,24079,24080,24081,24082,24083,24084,24085,24086,24087,24088,24089,24090,24091,24092,24093,24094,24095,24096,24097,24098,24099,24100,24101,24102,24103,24104,24105,24106,24107,24108,24109,24110,24111,24112,24113,24114,24115,24116,24117,24118,24119,24120,24121,24122,24123,24124,24125,24126,24127,24128,24129,24130,24131,24132,24133,24134,24135,24136,24137,24138,24139,24140,24141,24142,24143,24144,24145,24146,24147,24148,24149,24150,24151,24152,24153,24154,24155,24156,24157,24158,24159,24160,24161,24162,24163,24164,24165,24166,24167,24168,24169,24170,24171,24172,24173,24174,24175,24176,24177,24178,24179,24180,24181,24182,24183,24184,24185,24186,24187,24188,24189,24190,24191,24192,24193,24194,24195,24196,24197,24198,24199,24200,24201,24202,24203,24204,24205,24206,24207,24208,24209,24210,24211,24212,24213,24214,24215,24216,24217,24218,24219,24220,24221,24222,24223,24224,24225,24226,24227,24228,24229,24230,24231,24232,24233,24234,24235,24236,24237,24238,24239,24240,24241,24242,24243,24244,24245,24246,24247,24248,24249,24250,24251,24252,24253,24254,24255,24256,24257,24258,24259,24260,24261,24262,24263,24264,24265,24266,24267,24268,24269,24270,24271,24272,24273,24274,24275,24276,24277,24278,24279,24280,24281,24282,24283,24284,24285,24286,24287,24288,24289,24290,24291,24292,24293,24294,24295,24296,24297,24298,24299,24300,24301,24302,24303,24304,24305,24306,24307,24308,24309,24310,24311,24312,24313,24314,24315,24316,24317,24318,24319,24320,24321,24322,24323,24324,24325,24326,24327,24328,24329,24330,24331,24332,24333,24334,24335,24336,24337,24338,24339,24340,24341,24342,24343,24344,24345,24346,24347,24348,24349,24350,24351,24352,24353,24354,24355,24356,24357,24358,24359,24360,24361,24362,24363,24364,24365,24366,24367,24368,24369,24370,24371,24372,24373,24374,24375,24376,24377,24378,24379,24380,24381,24382,24383,24384,24385,24386,24387,24388,24389,24390,24391,24392,24393,24394,24395,24396,24397,24398,24399,24400,24401,24402,24403,24404,24405,24406,24407,24408,24409,24410,24411,24412,24413,24414,24415,24416,24417,24418,24419,24420,24421,24422,24423,24424,24425,24426,24427,24428,24429,24430,24431,24432,24433,24434,24435,24436,24437,24438,24439,24440,24441,24442,24443,24444,24445,24446,24447,24448,24449,24450,24451,24452,24453,24454,24455,24456,24457,24458,24459,24460,24461,24462,24463,24464,24465,24466,24467,24468,24469,24470,24471,24472,24473,24474,24475,24476,24477,24478,24479,24480,24481,24482,24483,24484,24485,24486,24487,24488,24489,24490,24491,24492,24493,24494,24495,24496,24497,24498,24499,24500,24501,24502,24503,24504,24505,24506,24507,24508,24509,24510,24511,24512,24513,24514,24515,24516,24517,24518,24519,24520,24521,24522,24523,24524,24525,24526,24527,24528,24529,24530,24531,24532,24533,24534,24535,24536,24537,24538,24539,24540,24541,24542,24543,24544,24545,24546,24547,24548,24549,24550,24551,24552,24553,24554,24555,24556,24557,24558,24559,24560,24561,24562,24563,24564,24565,24566,24567,24568,24569,24570,24571,24572,24573,24574,24575,24576,24577,24578,24579,24580,24581,24582,24583,24584,24585,24586,24587,24588,24589,24590,24591,24592,24593,24594,24595,24596,24597,24598,24599,24600,24601,24602,24603,24604,24605,24606,24607,24608,24609,24610,24611,24612,24613,24614,24615,24616,24617,24618,24619,24620,24621,24622,24623,24624,24625,24626,24627,24628,24629,24630,24631,24632,24633,24634,24635,24636,24637,24638,24639,24640,24641,24642,24643,24644,24645,24646,24647,24648,24649,24650,24651,24652,24653,24654,24655,24656,24657,24658,24659,24660,24661,24662,24663,24664,24665,24666,24667,24668,24669,24670,24671,24672,24673,24674,24675,24676,24677,24678,24679,24680,24681,24682,24683,24684,24685,24686,24687,24688,24689,24690,24691,24692,24693,24694,24695,24696,24697,24698,24699,24700,24701,24702,24703,24704,24705,24706,24707,24708,24709,24710,24711,24712,24713,24714,24715,24716,24717,24718,24719,24720,24721,24722,24723,24724,24725,24726,24727,24728,24729,24730,24731,24732,24733,24734,24735,24736,24737,24738,24739,24740,24741,24742,24743,24744,24745,24746,24747,24748,24749,24750,24751,24752,24753,24754,24755,24756,24757,24758,24759,24760,24761,24762,24763,24764,24765,24766,24767,24768,24769,24770,24771,24772,24773,24774,24775,24776,24777,24778,24779,24780,24781,24782,24783,24784,24785,24786,24787,24788,24789,24790,24791,24792,24793,24794,24795,24796,24797,24798,24799,24800,24801,24802,24803,24804,24805,24806,24807,24808,24809,24810,24811,24812,24813,24814,24815,24816,24817,24818,24819,24820,24821,24822,24823,24824,24825,24826,24827,24828,24829,24830,24831,24832,24833,24834,24835,24836,24837,24838,24839,24840,24841,24842,24843,24844,24845,24846,24847,24848,24849,24850,24851,24852,24853,24854,24855,24856,24857,24858,24859,24860,24861,24862,24863,24864,24865,24866,24867,24868,24869,24870,24871,24872,24873,24874,24875,24876,24877,24878,24879,24880,24881,24882,24883,24884,24885,24886,24887,24888,24889,24890,24891,24892,24893,24894,24895,24896,24897,24898,24899,24900,24901,24902,24903,24904,24905,24906,24907,24908,24909,24910,24911,24912,24913,24914,24915,24916,24917,24918,24919,24920,24921,24922,24923,24924,24925,24926,24927,24928,24929,24930,24931,24932,24933,24934,24935,24936,24937,24938,24939,24940,24941,24942,24943,24944,24945,24946,24947,24948,24949,24950,24951,24952,24953,24954,24955,24956,24957,24958,24959,24960,24961,24962,24963,24964,24965,24966,24967,24968,24969,24970,24971,24972,24973,24974,24975,24976,24977,24978,24979,24980,24981,24982,24983,24984,24985,24986,24987,24988,24989,24990,24991,24992,24993,24994,24995,24996,24997,24998,24999,25000,25001,25002,25003,25004,25005,25006,25007,25008,25009,25010,25011,25012,25013,25014,25015,25016,25017,25018,25019,25020,25021,25022,25023,25024,25025,25026,25027,25028,25029,25030,25031,25032,25033,25034,25035,25036,25037,25038,25039,25040,25041,25042,25043,25044,25045,25046,25047,25048,25049,25050,25051,25052,25053,25054,25055,25056,25057,25058,25059,25060,25061,25062,25063,25064,25065,25066,25067,25068,25069,25070,25071,25072,25073,25074,25075,25076,25077,25078,25079,25080,25081,25082,25083,25084,25085,25086,25087,25088,25089,25090,25091,25092,25093,25094,25095,25096,25097,25098,25099,25100,25101,25102,25103,25104,25105,25106,25107,25108,25109,25110,25111,25112,25113,25114,25115,25116,25117,25118,25119,25120,25121,25122,25123,25124,25125,25126,25127,25128,25129,25130,25131,25132,25133,25134,25135,25136,25137,25138,25139,25140,25141,25142,25143,25144,25145,25146,25147,25148,25149,25150,25151,25152,25153,25154,25155,25156,25157,25158,25159,25160,25161,25162,25163,25164,25165,25166,25167,25168,25169,25170,25171,25172,25173,25174,25175,25176,25177,25178,25179,25180,25181,25182,25183,25184,25185,25186,25187,25188,25189,25190,25191,25192,25193,25194,25195,25196,25197,25198,25199,25200,25201,25202,25203,25204,25205,25206,25207,25208,25209,25210,25211,25212,25213,25214,25215,25216,25217,25218,25219,25220,25221,25222,25223,25224,25225,25226,25227,25228,25229,25230,25231,25232,25233,25234,25235,25236,25237,25238,25239,25240,25241,25242,25243,25244,25245,25246,25247,25248,25249,25250,25251,25252,25253,25254,25255,25256,25257,25258,25259,25260,25261,25262,25263,25264,25265,25266,25267,25268,25269,25270,25271,25272,25273,25274,25275,25276,25277,25278,25279,25280,25281,25282,25283,25284,25285,25286,25287,25288,25289,25290,25291,25292,25293,25294,25295,25296,25297,25298,25299,25300,25301,25302,25303,25304,25305,25306,25307,25308,25309,25310,25311,25312,25313,25314,25315,25316,25317,25318,25319,25320,25321,25322,25323,25324,25325,25326,25327,25328,25329,25330,25331,25332,25333,25334,25335,25336,25337,25338,25339,25340,25341,25342,25343,25344,25345,25346,25347,25348,25349,25350,25351,25352,25353,25354,25355,25356,25357,25358,25359,25360,25361,25362,25363,25364,25365,25366,25367,25368,25369,25370,25371,25372,25373,25374,25375,25376,25377,25378,25379,25380,25381,25382,25383,25384,25385,25386,25387,25388,25389,25390,25391,25392,25393,25394,25395,25396,25397,25398,25399,25400,25401,25402,25403,25404,25405,25406,25407,25408,25409,25410,25411,25412,25413,25414,25415,25416,25417,25418,25419,25420,25421,25422,25423,25424,25425,25426,25427,25428,25429,25430,25431,25432,25433,25434,25435,25436,25437,25438,25439,25440,25441,25442,25443,25444,25445,25446,25447,25448,25449,25450,25451,25452,25453,25454,25455,25456,25457,25458,25459,25460,25461,25462,25463,25464,25465,25466,25467,25468,25469,25470,25471,25472,25473,25474,25475,25476,25477,25478,25479,25480,25481,25482,25483,25484,25485,25486,25487,25488,25489,25490,25491,25492,25493,25494,25495,25496,25497,25498,25499,25500,25501,25502,25503,25504,25505,25506,25507,25508,25509,25510,25511,25512,25513,25514,25515,25516,25517,25518,25519,25520,25521,25522,25523,25524,25525,25526,25527,25528,25529,25530,25531,25532,25533,25534,25535,25536,25537,25538,25539,25540,25541,25542,25543,25544,25545,25546,25547,25548,25549,25550,25551,25552,25553,25554,25555,25556,25557,25558,25559,25560,25561,25562,25563,25564,25565,25566,25567,25568,25569,25570,25571,25572,25573,25574,25575,25576,25577,25578,25579,25580,25581,25582,25583,25584,25585,25586,25587,25588,25589,25590,25591,25592,25593,25594,25595,25596,25597,25598,25599,25600,25601,25602,25603,25604,25605,25606,25607,25608,25609,25610,25611,25612,25613,25614,25615,25616,25617,25618,25619,25620,25621,25622,25623,25624,25625,25626,25627,25628,25629,25630,25631,25632,25633,25634,25635,25636,25637,25638,25639,25640,25641,25642,25643,25644,25645,25646,25647,25648,25649,25650,25651,25652,25653,25654,25655,25656,25657,25658,25659,25660,25661,25662,25663,25664,25665,25666,25667,25668,25669,25670,25671,25672,25673,25674,25675,25676,25677,25678,25679,25680,25681,25682,25683,25684,25685,25686,25687,25688,25689,25690,25691,25692,25693,25694,25695,25696,25697,25698,25699,25700,25701,25702,25703,25704,25705,25706,25707,25708,25709,25710,25711,25712,25713,25714,25715,25716,25717,25718,25719,25720,25721,25722,25723,25724,25725,25726,25727,25728,25729,25730,25731,25732,25733,25734,25735,25736,25737,25738,25739,25740,25741,25742,25743,25744,25745,25746,25747,25748,25749,25750,25751,25752,25753,25754,25755,25756,25757,25758,25759,25760,25761,25762,25763,25764,25765,25766,25767,25768,25769,25770,25771,25772,25773,25774,25775,25776,25777,25778,25779,25780,25781,25782,25783,25784,25785,25786,25787,25788,25789,25790,25791,25792,25793,25794,25795,25796,25797,25798,25799,25800,25801,25802,25803,25804,25805,25806,25807,25808,25809,25810,25811,25812,25813,25814,25815,25816,25817,25818,25819,25820,25821,25822,25823,25824,25825,25826,25827,25828,25829,25830,25831,25832,25833,25834,25835,25836,25837,25838,25839,25840,25841,25842,25843,25844,25845,25846,25847,25848,25849,25850,25851,25852,25853,25854,25855,25856,25857,25858,25859,25860,25861,25862,25863,25864,25865,25866,25867,25868,25869,25870,25871,25872,25873,25874,25875,25876,25877,25878,25879,25880,25881,25882,25883,25884,25885,25886,25887,25888,25889,25890,25891,25892,25893,25894,25895,25896,25897,25898,25899,25900,25901,25902,25903,25904,25905,25906,25907,25908,25909,25910,25911,25912,25913,25914,25915,25916,25917,25918,25919,25920,25921,25922,25923,25924,25925,25926,25927,25928,25929,25930,25931,25932,25933,25934,25935,25936,25937,25938,25939,25940,25941,25942,25943,25944,25945,25946,25947,25948,25949,25950,25951,25952,25953,25954,25955,25956,25957,25958,25959,25960,25961,25962,25963,25964,25965,25966,25967,25968,25969,25970,25971,25972,25973,25974,25975,25976,25977,25978,25979,25980,25981,25982,25983,25984,25985,25986,25987,25988,25989,25990,25991,25992,25993,25994,25995,25996,25997,25998,25999,26000,26001,26002,26003,26004,26005,26006,26007,26008,26009,26010,26011,26012,26013,26014,26015,26016,26017,26018,26019,26020,26021,26022,26023,26024,26025,26026,26027,26028,26029,26030,26031,26032,26033,26034,26035,26036,26037,26038,26039,26040,26041,26042,26043,26044,26045,26046,26047,26048,26049,26050,26051,26052,26053,26054,26055,26056,26057,26058,26059,26060,26061,26062,26063,26064,26065,26066,26067,26068,26069,26070,26071,26072,26073,26074,26075,26076,26077,26078,26079,26080,26081,26082,26083,26084,26085,26086,26087,26088,26089,26090,26091,26092,26093,26094,26095,26096,26097,26098,26099,26100,26101,26102,26103,26104,26105,26106,26107,26108,26109,26110,26111,26112,26113,26114,26115,26116,26117,26118,26119,26120,26121,26122,26123,26124,26125,26126,26127,26128,26129,26130,26131,26132,26133,26134,26135,26136,26137,26138,26139,26140,26141,26142,26143,26144,26145,26146,26147,26148,26149,26150,26151,26152,26153,26154,26155,26156,26157,26158,26159,26160,26161,26162,26163,26164,26165,26166,26167,26168,26169,26170,26171,26172,26173,26174,26175,26176,26177,26178,26179,26180,26181,26182,26183,26184,26185,26186,26187,26188,26189,26190,26191,26192,26193,26194,26195,26196,26197,26198,26199,26200,26201,26202,26203,26204,26205,26206,26207,26208,26209,26210,26211,26212,26213,26214,26215,26216,26217,26218,26219,26220,26221,26222,26223,26224,26225,26226,26227,26228,26229,26230,26231,26232,26233,26234,26235,26236,26237,26238,26239,26240,26241,26242,26243,26244,26245,26246,26247,26248,26249,26250,26251,26252,26253,26254,26255,26256,26257,26258,26259,26260,26261,26262,26263,26264,26265,26266,26267,26268,26269,26270,26271,26272,26273,26274,26275,26276,26277,26278,26279,26280,26281,26282,26283,26284,26285,26286,26287,26288,26289,26290,26291,26292,26293,26294,26295,26296,26297,26298,26299,26300,26301,26302,26303,26304,26305,26306,26307,26308,26309,26310,26311,26312,26313,26314,26315,26316,26317,26318,26319,26320,26321,26322,26323,26324,26325,26326,26327,26328,26329,26330,26331,26332,26333,26334,26335,26336,26337,26338,26339,26340,26341,26342,26343,26344,26345,26346,26347,26348,26349,26350,26351,26352,26353,26354,26355,26356,26357,26358,26359,26360,26361,26362,26363,26364,26365,26366,26367,26368,26369,26370,26371,26372,26373,26374,26375,26376,26377,26378,26379,26380,26381,26382,26383,26384,26385,26386,26387,26388,26389,26390,26391,26392,26393,26394,26395,26396,26397,26398,26399,26400,26401,26402,26403,26404,26405,26406,26407,26408,26409,26410,26411,26412,26413,26414,26415,26416,26417,26418,26419,26420,26421,26422,26423,26424,26425,26426,26427,26428,26429,26430,26431,26432,26433,26434,26435,26436,26437,26438,26439,26440,26441,26442,26443,26444,26445,26446,26447,26448,26449,26450,26451,26452,26453,26454,26455,26456,26457,26458,26459,26460,26461,26462,26463,26464,26465,26466,26467,26468,26469,26470,26471,26472,26473,26474,26475,26476,26477,26478,26479,26480,26481,26482,26483,26484,26485,26486,26487,26488,26489,26490,26491,26492,26493,26494,26495,26496,26497,26498,26499,26500,26501,26502,26503,26504,26505,26506,26507,26508,26509,26510,26511,26512,26513,26514,26515,26516,26517,26518,26519,26520,26521,26522,26523,26524,26525,26526,26527,26528,26529,26530,26531,26532,26533,26534,26535,26536,26537,26538,26539,26540,26541,26542,26543,26544,26545,26546,26547,26548,26549,26550,26551,26552,26553,26554,26555,26556,26557,26558,26559,26560,26561,26562,26563,26564,26565,26566,26567,26568,26569,26570,26571,26572,26573,26574,26575,26576,26577,26578,26579,26580,26581,26582,26583,26584,26585,26586,26587,26588,26589,26590,26591,26592,26593,26594,26595,26596,26597,26598,26599,26600,26601,26602,26603,26604,26605,26606,26607,26608,26609,26610,26611,26612,26613,26614,26615,26616,26617,26618,26619,26620,26621,26622,26623,26624,26625,26626,26627,26628,26629,26630,26631,26632,26633,26634,26635,26636,26637,26638,26639,26640,26641,26642,26643,26644,26645,26646,26647,26648,26649,26650,26651,26652,26653,26654,26655,26656,26657,26658,26659,26660,26661,26662,26663,26664,26665,26666,26667,26668,26669,26670,26671,26672,26673,26674,26675,26676,26677,26678,26679,26680,26681,26682,26683,26684,26685,26686,26687,26688,26689,26690,26691,26692,26693,26694,26695,26696,26697,26698,26699,26700,26701,26702,26703,26704,26705,26706,26707,26708,26709,26710,26711,26712,26713,26714,26715,26716,26717,26718,26719,26720,26721,26722,26723,26724,26725,26726,26727,26728,26729,26730,26731,26732,26733,26734,26735,26736,26737,26738,26739,26740,26741,26742,26743,26744,26745,26746,26747,26748,26749,26750,26751,26752,26753,26754,26755,26756,26757,26758,26759,26760,26761,26762,26763,26764,26765,26766,26767,26768,26769,26770,26771,26772,26773,26774,26775,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26786,26787,26788,26789,26790,26791,26792,26793,26794,26795,26796,26797,26798,26799,26800,26801,26802,26803,26804,26805,26806,26807,26808,26809,26810,26811,26812,26813,26814,26815,26816,26817,26818,26819,26820,26821,26822,26823,26824,26825,26826,26827,26828,26829,26830,26831,26832,26833,26834,26835,26836,26837,26838,26839,26840,26841,26842,26843,26844,26845,26846,26847,26848,26849,26850,26851,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26862,26863,26864,26865,26866,26867,26868,26869,26870,26871,26872,26873,26874,26875,26876,26877,26878,26879,26880,26881,26882,26883,26884,26885,26886,26887,26888,26889,26890,26891,26892,26893,26894,26895,26896,26897,26898,26899,26900,26901,26902,26903,26904,26905,26906,26907,26908,26909,26910,26911,26912,26913,26914,26915,26916,26917,26918,26919,26920,26921,26922,26923,26924,26925,26926,26927,26928,26929,26930,26931,26932,26933,26934,26935,26936,26937,26938,26939,26940,26941,26942,26943,26944,26945,26946,26947,26948,26949,26950,26951,26952,26953,26954,26955,26956,26957,26958,26959,26960,26961,26962,26963,26964,26965,26966,26967,26968,26969,26970,26971,26972,26973,26974,26975,26976,26977,26978,26979,26980,26981,26982,26983,26984,26985,26986,26987,26988,26989,26990,26991,26992,26993,26994,26995,26996,26997,26998,26999,27000,27001,27002,27003,27004,27005,27006,27007,27008,27009,27010,27011,27012,27013,27014,27015,27016,27017,27018,27019,27020,27021,27022,27023,27024,27025,27026,27027,27028,27029,27030,27031,27032,27033,27034,27035,27036,27037,27038,27039,27040,27041,27042,27043,27044,27045,27046,27047,27048,27049,27050,27051,27052,27053,27054,27055,27056,27057,27058,27059,27060,27061,27062,27063,27064,27065,27066,27067,27068,27069,27070,27071,27072,27073,27074,27075,27076,27077,27078,27079,27080,27081,27082,27083,27084,27085,27086,27087,27088,27089,27090,27091,27092,27093,27094,27095,27096,27097,27098,27099,27100,27101,27102,27103,27104,27105,27106,27107,27108,27109,27110,27111,27112,27113,27114,27115,27116,27117,27118,27119,27120,27121,27122,27123,27124,27125,27126,27127,27128,27129,27130,27131,27132,27133,27134,27135,27136,27137,27138,27139,27140,27141,27142,27143,27144,27145,27146,27147,27148,27149,27150,27151,27152,27153,27154,27155,27156,27157,27158,27159,27160,27161,27162,27163,27164,27165,27166,27167,27168,27169,27170,27171,27172,27173,27174,27175,27176,27177,27178,27179,27180,27181,27182,27183,27184,27185,27186,27187,27188,27189,27190,27191,27192,27193,27194,27195,27196,27197,27198,27199,27200,27201,27202,27203,27204,27205,27206,27207,27208,27209,27210,27211,27212,27213,27214,27215,27216,27217,27218,27219,27220,27221,27222,27223,27224,27225,27226,27227,27228,27229,27230,27231,27232,27233,27234,27235,27236,27237,27238,27239,27240,27241,27242,27243,27244,27245,27246,27247,27248,27249,27250,27251,27252,27253,27254,27255,27256,27257,27258,27259,27260,27261,27262,27263,27264,27265,27266,27267,27268,27269,27270,27271,27272,27273,27274,27275,27276,27277,27278,27279,27280,27281,27282,27283,27284,27285,27286,27287,27288,27289,27290,27291,27292,27293,27294,27295,27296,27297,27298,27299,27300,27301,27302,27303,27304,27305,27306,27307,27308,27309,27310,27311,27312,27313,27314,27315,27316,27317,27318,27319,27320,27321,27322,27323,27324,27325,27326,27327,27328,27329,27330,27331,27332,27333,27334,27335,27336,27337,27338,27339,27340,27341,27342,27343,27344,27345,27346,27347,27348,27349,27350,27351,27352,27353,27354,27355,27356,27357,27358,27359,27360,27361,27362,27363,27364,27365,27366,27367,27368,27369,27370,27371,27372,27373,27374,27375,27376,27377,27378,27379,27380,27381,27382,27383,27384,27385,27386,27387,27388,27389,27390,27391,27392,27393,27394,27395,27396,27397,27398,27399,27400,27401,27402,27403,27404,27405,27406,27407,27408,27409,27410,27411,27412,27413,27414,27415,27416,27417,27418,27419,27420,27421,27422,27423,27424,27425,27426,27427,27428,27429,27430,27431,27432,27433,27434,27435,27436,27437,27438,27439,27440,27441,27442,27443,27444,27445,27446,27447,27448,27449,27450,27451,27452,27453,27454,27455,27456,27457,27458,27459,27460,27461,27462,27463,27464,27465,27466,27467,27468,27469,27470,27471,27472,27473,27474,27475,27476,27477,27478,27479,27480,27481,27482,27483,27484,27485,27486,27487,27488,27489,27490,27491,27492,27493,27494,27495,27496,27497,27498,27499,27500,27501,27502,27503,27504,27505,27506,27507,27508,27509,27510,27511,27512,27513,27514,27515,27516,27517,27518,27519,27520,27521,27522,27523,27524,27525,27526,27527,27528,27529,27530,27531,27532,27533,27534,27535,27536,27537,27538,27539,27540,27541,27542,27543,27544,27545,27546,27547,27548,27549,27550,27551,27552,27553,27554,27555,27556,27557,27558,27559,27560,27561,27562,27563,27564,27565,27566,27567,27568,27569,27570,27571,27572,27573,27574,27575,27576,27577,27578,27579,27580,27581,27582,27583,27584,27585,27586,27587,27588,27589,27590,27591,27592,27593,27594,27595,27596,27597,27598,27599,27600,27601,27602,27603,27604,27605,27606,27607,27608,27609,27610,27611,27612,27613,27614,27615,27616,27617,27618,27619,27620,27621,27622,27623,27624,27625,27626,27627,27628,27629,27630,27631,27632,27633,27634,27635,27636,27637,27638,27639,27640,27641,27642,27643,27644,27645,27646,27647,27648,27649,27650,27651,27652,27653,27654,27655,27656,27657,27658,27659,27660,27661,27662,27663,27664,27665,27666,27667,27668,27669,27670,27671,27672,27673,27674,27675,27676,27677,27678,27679,27680,27681,27682,27683,27684,27685,27686,27687,27688,27689,27690,27691,27692,27693,27694,27695,27696,27697,27698,27699,27700,27701,27702,27703,27704,27705,27706,27707,27708,27709,27710,27711,27712,27713,27714,27715,27716,27717,27718,27719,27720,27721,27722,27723,27724,27725,27726,27727,27728,27729,27730,27731,27732,27733,27734,27735,27736,27737,27738,27739,27740,27741,27742,27743,27744,27745,27746,27747,27748,27749,27750,27751,27752,27753,27754,27755,27756,27757,27758,27759,27760,27761,27762,27763,27764,27765,27766,27767,27768,27769,27770,27771,27772,27773,27774,27775,27776,27777,27778,27779,27780,27781,27782,27783,27784,27785,27786,27787,27788,27789,27790,27791,27792,27793,27794,27795,27796,27797,27798,27799,27800,27801,27802,27803,27804,27805,27806,27807,27808,27809,27810,27811,27812,27813,27814,27815,27816,27817,27818,27819,27820,27821,27822,27823,27824,27825,27826,27827,27828,27829,27830,27831,27832,27833,27834,27835,27836,27837,27838,27839,27840,27841,27842,27843,27844,27845,27846,27847,27848,27849,27850,27851,27852,27853,27854,27855,27856,27857,27858,27859,27860,27861,27862,27863,27864,27865,27866,27867,27868,27869,27870,27871,27872,27873,27874,27875,27876,27877,27878,27879,27880,27881,27882,27883,27884,27885,27886,27887,27888,27889,27890,27891,27892,27893,27894,27895,27896,27897,27898,27899,27900,27901,27902,27903,27904,27905,27906,27907,27908,27909,27910,27911,27912,27913,27914,27915,27916,27917,27918,27919,27920,27921,27922,27923,27924,27925,27926,27927,27928,27929,27930,27931,27932,27933,27934,27935,27936,27937,27938,27939,27940,27941,27942,27943,27944,27945,27946,27947,27948,27949,27950,27951,27952,27953,27954,27955,27956,27957,27958,27959,27960,27961,27962,27963,27964,27965,27966,27967,27968,27969,27970,27971,27972,27973,27974,27975,27976,27977,27978,27979,27980,27981,27982,27983,27984,27985,27986,27987,27988,27989,27990,27991,27992,27993,27994,27995,27996,27997,27998,27999,28000,28001,28002,28003,28004,28005,28006,28007,28008,28009,28010,28011,28012,28013,28014,28015,28016,28017,28018,28019,28020,28021,28022,28023,28024,28025,28026,28027,28028,28029,28030,28031,28032,28033,28034,28035,28036,28037,28038,28039,28040,28041,28042,28043,28044,28045,28046,28047,28048,28049,28050,28051,28052,28053,28054,28055,28056,28057,28058,28059,28060,28061,28062,28063,28064,28065,28066,28067,28068,28069,28070,28071,28072,28073,28074,28075,28076,28077,28078,28079,28080,28081,28082,28083,28084,28085,28086,28087,28088,28089,28090,28091,28092,28093,28094,28095,28096,28097,28098,28099,28100,28101,28102,28103,28104,28105,28106,28107,28108,28109,28110,28111,28112,28113,28114,28115,28116,28117,28118,28119,28120,28121,28122,28123,28124,28125,28126,28127,28128,28129,28130,28131,28132,28133,28134,28135,28136,28137,28138,28139,28140,28141,28142,28143,28144,28145,28146,28147,28148,28149,28150,28151,28152,28153,28154,28155,28156,28157,28158,28159,28160,28161,28162,28163,28164,28165,28166,28167,28168,28169,28170,28171,28172,28173,28174,28175,28176,28177,28178,28179,28180,28181,28182,28183,28184,28185,28186,28187,28188,28189,28190,28191,28192,28193,28194,28195,28196,28197,28198,28199,28200,28201,28202,28203,28204,28205,28206,28207,28208,28209,28210,28211,28212,28213,28214,28215,28216,28217,28218,28219,28220,28221,28222,28223,28224,28225,28226,28227,28228,28229,28230,28231,28232,28233,28234,28235,28236,28237,28238,28239,28240,28241,28242,28243,28244,28245,28246,28247,28248,28249,28250,28251,28252,28253,28254,28255,28256,28257,28258,28259,28260,28261,28262,28263,28264,28265,28266,28267,28268,28269,28270,28271,28272,28273,28274,28275,28276,28277,28278,28279,28280,28281,28282,28283,28284,28285,28286,28287,28288,28289,28290,28291,28292,28293,28294,28295,28296,28297,28298,28299,28300,28301,28302,28303,28304,28305,28306,28307,28308,28309,28310,28311,28312,28313,28314,28315,28316,28317,28318,28319,28320,28321,28322,28323,28324,28325,28326,28327,28328,28329,28330,28331,28332,28333,28334,28335,28336,28337,28338,28339,28340,28341,28342,28343,28344,28345,28346,28347,28348,28349,28350,28351,28352,28353,28354,28355,28356,28357,28358,28359,28360,28361,28362,28363,28364,28365,28366,28367,28368,28369,28370,28371,28372,28373,28374,28375,28376,28377,28378,28379,28380,28381,28382,28383,28384,28385,28386,28387,28388,28389,28390,28391,28392,28393,28394,28395,28396,28397,28398,28399,28400,28401,28402,28403,28404,28405,28406,28407,28408,28409,28410,28411,28412,28413,28414,28415,28416,28417,28418,28419,28420,28421,28422,28423,28424,28425,28426,28427,28428,28429,28430,28431,28432,28433,28434,28435,28436,28437,28438,28439,28440,28441,28442,28443,28444,28445,28446,28447,28448,28449,28450,28451,28452,28453,28454,28455,28456,28457,28458,28459,28460,28461,28462,28463,28464,28465,28466,28467,28468,28469,28470,28471,28472,28473,28474,28475,28476,28477,28478,28479,28480,28481,28482,28483,28484,28485,28486,28487,28488,28489,28490,28491,28492,28493,28494,28495,28496,28497,28498,28499,28500,28501,28502,28503,28504,28505,28506,28507,28508,28509,28510,28511,28512,28513,28514,28515,28516,28517,28518,28519,28520,28521,28522,28523,28524,28525,28526,28527,28528,28529,28530,28531,28532,28533,28534,28535,28536,28537,28538,28539,28540,28541,28542,28543,28544,28545,28546,28547,28548,28549,28550,28551,28552,28553,28554,28555,28556,28557,28558,28559,28560,28561,28562,28563,28564,28565,28566,28567,28568,28569,28570,28571,28572,28573,28574,28575,28576,28577,28578,28579,28580,28581,28582,28583,28584,28585,28586,28587,28588,28589,28590,28591,28592,28593,28594,28595,28596,28597,28598,28599,28600,28601,28602,28603,28604,28605,28606,28607,28608,28609,28610,28611,28612,28613,28614,28615,28616,28617,28618,28619,28620,28621,28622,28623,28624,28625,28626,28627,28628,28629,28630,28631,28632,28633,28634,28635,28636,28637,28638,28639,28640,28641,28642,28643,28644,28645,28646,28647,28648,28649,28650,28651,28652,28653,28654,28655,28656,28657,28658,28659,28660,28661,28662,28663,28664,28665,28666,28667,28668,28669,28670,28671,28672,28673,28674,28675,28676,28677,28678,28679,28680,28681,28682,28683,28684,28685,28686,28687,28688,28689,28690,28691,28692,28693,28694,28695,28696,28697,28698,28699,28700,28701,28702,28703,28704,28705,28706,28707,28708,28709,28710,28711,28712,28713,28714,28715,28716,28717,28718,28719,28720,28721,28722,28723,28724,28725,28726,28727,28728,28729,28730,28731,28732,28733,28734,28735,28736,28737,28738,28739,28740,28741,28742,28743,28744,28745,28746,28747,28748,28749,28750,28751,28752,28753,28754,28755,28756,28757,28758,28759,28760,28761,28762,28763,28764,28765,28766,28767,28768,28769,28770,28771,28772,28773,28774,28775,28776,28777,28778,28779,28780,28781,28782,28783,28784,28785,28786,28787,28788,28789,28790,28791,28792,28793,28794,28795,28796,28797,28798,28799,28800,28801,28802,28803,28804,28805,28806,28807,28808,28809,28810,28811,28812,28813,28814,28815,28816,28817,28818,28819,28820,28821,28822,28823,28824,28825,28826,28827,28828,28829,28830,28831,28832,28833,28834,28835,28836,28837,28838,28839,28840,28841,28842,28843,28844,28845,28846,28847,28848,28849,28850,28851,28852,28853,28854,28855,28856,28857,28858,28859,28860,28861,28862,28863,28864,28865,28866,28867,28868,28869,28870,28871,28872,28873,28874,28875,28876,28877,28878,28879,28880,28881,28882,28883,28884,28885,28886,28887,28888,28889,28890,28891,28892,28893,28894,28895,28896,28897,28898,28899,28900,28901,28902,28903,28904,28905,28906,28907,28908,28909,28910,28911,28912,28913,28914,28915,28916,28917,28918,28919,28920,28921,28922,28923,28924,28925,28926,28927,28928,28929,28930,28931,28932,28933,28934,28935,28936,28937,28938,28939,28940,28941,28942,28943,28944,28945,28946,28947,28948,28949,28950,28951,28952,28953,28954,28955,28956,28957,28958,28959,28960,28961,28962,28963,28964,28965,28966,28967,28968,28969,28970,28971,28972,28973,28974,28975,28976,28977,28978,28979,28980,28981,28982,28983,28984,28985,28986,28987,28988,28989,28990,28991,28992,28993,28994,28995,28996,28997,28998,28999,29000,29001,29002,29003,29004,29005,29006,29007,29008,29009,29010,29011,29012,29013,29014,29015,29016,29017,29018,29019,29020,29021,29022,29023,29024,29025,29026,29027,29028,29029,29030,29031,29032,29033,29034,29035,29036,29037,29038,29039,29040,29041,29042,29043,29044,29045,29046,29047,29048,29049,29050,29051,29052,29053,29054,29055,29056,29057,29058,29059,29060,29061,29062,29063,29064,29065,29066,29067,29068,29069,29070,29071,29072,29073,29074,29075,29076,29077,29078,29079,29080,29081,29082,29083,29084,29085,29086,29087,29088,29089,29090,29091,29092,29093,29094,29095,29096,29097,29098,29099,29100,29101,29102,29103,29104,29105,29106,29107,29108,29109,29110,29111,29112,29113,29114,29115,29116,29117,29118,29119,29120,29121,29122,29123,29124,29125,29126,29127,29128,29129,29130,29131,29132,29133,29134,29135,29136,29137,29138,29139,29140,29141,29142,29143,29144,29145,29146,29147,29148,29149,29150,29151,29152,29153,29154,29155,29156,29157,29158,29159,29160,29161,29162,29163,29164,29165,29166,29167,29168,29169,29170,29171,29172,29173,29174,29175,29176,29177,29178,29179,29180,29181,29182,29183,29184,29185,29186,29187,29188,29189,29190,29191,29192,29193,29194,29195,29196,29197,29198,29199,29200,29201,29202,29203,29204,29205,29206,29207,29208,29209,29210,29211,29212,29213,29214,29215,29216,29217,29218,29219,29220,29221,29222,29223,29224,29225,29226,29227,29228,29229,29230,29231,29232,29233,29234,29235,29236,29237,29238,29239,29240,29241,29242,29243,29244,29245,29246,29247,29248,29249,29250,29251,29252,29253,29254,29255,29256,29257,29258,29259,29260,29261,29262,29263,29264,29265,29266,29267,29268,29269,29270,29271,29272,29273,29274,29275,29276,29277,29278,29279,29280,29281,29282,29283,29284,29285,29286,29287,29288,29289,29290,29291,29292,29293,29294,29295,29296,29297,29298,29299,29300,29301,29302,29303,29304,29305,29306,29307,29308,29309,29310,29311,29312,29313,29314,29315,29316,29317,29318,29319,29320,29321,29322,29323,29324,29325,29326,29327,29328,29329,29330,29331,29332,29333,29334,29335,29336,29337,29338,29339,29340,29341,29342,29343,29344,29345,29346,29347,29348,29349,29350,29351,29352,29353,29354,29355,29356,29357,29358,29359,29360,29361,29362,29363,29364,29365,29366,29367,29368,29369,29370,29371,29372,29373,29374,29375,29376,29377,29378,29379,29380,29381,29382,29383,29384,29385,29386,29387,29388,29389,29390,29391,29392,29393,29394,29395,29396,29397,29398,29399,29400,29401,29402,29403,29404,29405,29406,29407,29408,29409,29410,29411,29412,29413,29414,29415,29416,29417,29418,29419,29420,29421,29422,29423,29424,29425,29426,29427,29428,29429,29430,29431,29432,29433,29434,29435,29436,29437,29438,29439,29440,29441,29442,29443,29444,29445,29446,29447,29448,29449,29450,29451,29452,29453,29454,29455,29456,29457,29458,29459,29460,29461,29462,29463,29464,29465,29466,29467,29468,29469,29470,29471,29472,29473,29474,29475,29476,29477,29478,29479,29480,29481,29482,29483,29484,29485,29486,29487,29488,29489,29490,29491,29492,29493,29494,29495,29496,29497,29498,29499,29500,29501,29502,29503,29504,29505,29506,29507,29508,29509,29510,29511,29512,29513,29514,29515,29516,29517,29518,29519,29520,29521,29522,29523,29524,29525,29526,29527,29528,29529,29530,29531,29532,29533,29534,29535,29536,29537,29538,29539,29540,29541,29542,29543,29544,29545,29546,29547,29548,29549,29550,29551,29552,29553,29554,29555,29556,29557,29558,29559,29560,29561,29562,29563,29564,29565,29566,29567,29568,29569,29570,29571,29572,29573,29574,29575,29576,29577,29578,29579,29580,29581,29582,29583,29584,29585,29586,29587,29588,29589,29590,29591,29592,29593,29594,29595,29596,29597,29598,29599,29600,29601,29602,29603,29604,29605,29606,29607,29608,29609,29610,29611,29612,29613,29614,29615,29616,29617,29618,29619,29620,29621,29622,29623,29624,29625,29626,29627,29628,29629,29630,29631,29632,29633,29634,29635,29636,29637,29638,29639,29640,29641,29642,29643,29644,29645,29646,29647,29648,29649,29650,29651,29652,29653,29654,29655,29656,29657,29658,29659,29660,29661,29662,29663,29664,29665,29666,29667,29668,29669,29670,29671,29672,29673,29674,29675,29676,29677,29678,29679,29680,29681,29682,29683,29684,29685,29686,29687,29688,29689,29690,29691,29692,29693,29694,29695,29696,29697,29698,29699,29700,29701,29702,29703,29704,29705,29706,29707,29708,29709,29710,29711,29712,29713,29714,29715,29716,29717,29718,29719,29720,29721,29722,29723,29724,29725,29726,29727,29728,29729,29730,29731,29732,29733,29734,29735,29736,29737,29738,29739,29740,29741,29742,29743,29744,29745,29746,29747,29748,29749,29750,29751,29752,29753,29754,29755,29756,29757,29758,29759,29760,29761,29762,29763,29764,29765,29766,29767,29768,29769,29770,29771,29772,29773,29774,29775,29776,29777,29778,29779,29780,29781,29782,29783,29784,29785,29786,29787,29788,29789,29790,29791,29792,29793,29794,29795,29796,29797,29798,29799,29800,29801,29802,29803,29804,29805,29806,29807,29808,29809,29810,29811,29812,29813,29814,29815,29816,29817,29818,29819,29820,29821,29822,29823,29824,29825,29826,29827,29828,29829,29830,29831,29832,29833,29834,29835,29836,29837,29838,29839,29840,29841,29842,29843,29844,29845,29846,29847,29848,29849,29850,29851,29852,29853,29854,29855,29856,29857,29858,29859,29860,29861,29862,29863,29864,29865,29866,29867,29868,29869,29870,29871,29872,29873,29874,29875,29876,29877,29878,29879,29880,29881,29882,29883,29884,29885,29886,29887,29888,29889,29890,29891,29892,29893,29894,29895,29896,29897,29898,29899,29900,29901,29902,29903,29904,29905,29906,29907,29908,29909,29910,29911,29912,29913,29914,29915,29916,29917,29918,29919,29920,29921,29922,29923,29924,29925,29926,29927,29928,29929,29930,29931,29932,29933,29934,29935,29936,29937,29938,29939,29940,29941,29942,29943,29944,29945,29946,29947,29948,29949,29950,29951,29952,29953,29954,29955,29956,29957,29958,29959,29960,29961,29962,29963,29964,29965,29966,29967,29968,29969,29970,29971,29972,29973,29974,29975,29976,29977,29978,29979,29980,29981,29982,29983,29984,29985,29986,29987,29988,29989,29990,29991,29992,29993,29994,29995,29996,29997,29998,29999,30000,30001,30002,30003,30004,30005,30006,30007,30008,30009,30010,30011,30012,30013,30014,30015,30016,30017,30018,30019,30020,30021,30022,30023,30024,30025,30026,30027,30028,30029,30030,30031,30032,30033,30034,30035,30036,30037,30038,30039,30040,30041,30042,30043,30044,30045,30046,30047,30048,30049,30050,30051,30052,30053,30054,30055,30056,30057,30058,30059,30060,30061,30062,30063,30064,30065,30066,30067,30068,30069,30070,30071,30072,30073,30074,30075,30076,30077,30078,30079,30080,30081,30082,30083,30084,30085,30086,30087,30088,30089,30090,30091,30092,30093,30094,30095,30096,30097,30098,30099,30100,30101,30102,30103,30104,30105,30106,30107,30108,30109,30110,30111,30112,30113,30114,30115,30116,30117,30118,30119,30120,30121,30122,30123,30124,30125,30126,30127,30128,30129,30130,30131,30132,30133,30134,30135,30136,30137,30138,30139,30140,30141,30142,30143,30144,30145,30146,30147,30148,30149,30150,30151,30152,30153,30154,30155,30156,30157,30158,30159,30160,30161,30162,30163,30164,30165,30166,30167,30168,30169,30170,30171,30172,30173,30174,30175,30176,30177,30178,30179,30180,30181,30182,30183,30184,30185,30186,30187,30188,30189,30190,30191,30192,30193,30194,30195,30196,30197,30198,30199,30200,30201,30202,30203,30204,30205,30206,30207,30208,30209,30210,30211,30212,30213,30214,30215,30216,30217,30218,30219,30220,30221,30222,30223,30224,30225,30226,30227,30228,30229,30230,30231,30232,30233,30234,30235,30236,30237,30238,30239,30240,30241,30242,30243,30244,30245,30246,30247,30248,30249,30250,30251,30252,30253,30254,30255,30256,30257,30258,30259,30260,30261,30262,30263,30264,30265,30266,30267,30268,30269,30270,30271,30272,30273,30274,30275,30276,30277,30278,30279,30280,30281,30282,30283,30284,30285,30286,30287,30288,30289,30290,30291,30292,30293,30294,30295,30296,30297,30298,30299,30300,30301,30302,30303,30304,30305,30306,30307,30308,30309,30310,30311,30312,30313,30314,30315,30316,30317,30318,30319,30320,30321,30322,30323,30324,30325,30326,30327,30328,30329,30330,30331,30332,30333,30334,30335,30336,30337,30338,30339,30340,30341,30342,30343,30344,30345,30346,30347,30348,30349,30350,30351,30352,30353,30354,30355,30356,30357,30358,30359,30360,30361,30362,30363,30364,30365,30366,30367,30368,30369,30370,30371,30372,30373,30374,30375,30376,30377,30378,30379,30380,30381,30382,30383,30384,30385,30386,30387,30388,30389,30390,30391,30392,30393,30394,30395,30396,30397,30398,30399,30400,30401,30402,30403,30404,30405,30406,30407,30408,30409,30410,30411,30412,30413,30414,30415,30416,30417,30418,30419,30420,30421,30422,30423,30424,30425,30426,30427,30428,30429,30430,30431,30432,30433,30434,30435,30436,30437,30438,30439,30440,30441,30442,30443,30444,30445,30446,30447,30448,30449,30450,30451,30452,30453,30454,30455,30456,30457,30458,30459,30460,30461,30462,30463,30464,30465,30466,30467,30468,30469,30470,30471,30472,30473,30474,30475,30476,30477,30478,30479,30480,30481,30482,30483,30484,30485,30486,30487,30488,30489,30490,30491,30492,30493,30494,30495,30496,30497,30498,30499,30500,30501,30502,30503,30504,30505,30506,30507,30508,30509,30510,30511,30512,30513,30514,30515,30516,30517,30518,30519,30520,30521,30522,30523,30524,30525,30526,30527,30528,30529,30530,30531,30532,30533,30534,30535,30536,30537,30538,30539,30540,30541,30542,30543,30544,30545,30546,30547,30548,30549,30550,30551,30552,30553,30554,30555,30556,30557,30558,30559,30560,30561,30562,30563,30564,30565,30566,30567,30568,30569,30570,30571,30572,30573,30574,30575,30576,30577,30578,30579,30580,30581,30582,30583,30584,30585,30586,30587,30588,30589,30590,30591,30592,30593,30594,30595,30596,30597,30598,30599,30600,30601,30602,30603,30604,30605,30606,30607,30608,30609,30610,30611,30612,30613,30614,30615,30616,30617,30618,30619,30620,30621,30622,30623,30624,30625,30626,30627,30628,30629,30630,30631,30632,30633,30634,30635,30636,30637,30638,30639,30640,30641,30642,30643,30644,30645,30646,30647,30648,30649,30650,30651,30652,30653,30654,30655,30656,30657,30658,30659,30660,30661,30662,30663,30664,30665,30666,30667,30668,30669,30670,30671,30672,30673,30674,30675,30676,30677,30678,30679,30680,30681,30682,30683,30684,30685,30686,30687,30688,30689,30690,30691,30692,30693,30694,30695,30696,30697,30698,30699,30700,30701,30702,30703,30704,30705,30706,30707,30708,30709,30710,30711,30712,30713,30714,30715,30716,30717,30718,30719,30720,30721,30722,30723,30724,30725,30726,30727,30728,30729,30730,30731,30732,30733,30734,30735,30736,30737,30738,30739,30740,30741,30742,30743,30744,30745,30746,30747,30748,30749,30750,30751,30752,30753,30754,30755,30756,30757,30758,30759,30760,30761,30762,30763,30764,30765,30766,30767,30768,30769,30770,30771,30772,30773,30774,30775,30776,30777,30778,30779,30780,30781,30782,30783,30784,30785,30786,30787,30788,30789,30790,30791,30792,30793,30794,30795,30796,30797,30798,30799,30800,30801,30802,30803,30804,30805,30806,30807,30808,30809,30810,30811,30812,30813,30814,30815,30816,30817,30818,30819,30820,30821,30822,30823,30824,30825,30826,30827,30828,30829,30830,30831,30832,30833,30834,30835,30836,30837,30838,30839,30840,30841,30842,30843,30844,30845,30846,30847,30848,30849,30850,30851,30852,30853,30854,30855,30856,30857,30858,30859,30860,30861,30862,30863,30864,30865,30866,30867,30868,30869,30870,30871,30872,30873,30874,30875,30876,30877,30878,30879,30880,30881,30882,30883,30884,30885,30886,30887,30888,30889,30890,30891,30892,30893,30894,30895,30896,30897,30898,30899,30900,30901,30902,30903,30904,30905,30906,30907,30908,30909,30910,30911,30912,30913,30914,30915,30916,30917,30918,30919,30920,30921,30922,30923,30924,30925,30926,30927,30928,30929,30930,30931,30932,30933,30934,30935,30936,30937,30938,30939,30940,30941,30942,30943,30944,30945,30946,30947,30948,30949,30950,30951,30952,30953,30954,30955,30956,30957,30958,30959,30960,30961,30962,30963,30964,30965,30966,30967,30968,30969,30970,30971,30972,30973,30974,30975,30976,30977,30978,30979,30980,30981,30982,30983,30984,30985,30986,30987,30988,30989,30990,30991,30992,30993,30994,30995,30996,30997,30998,30999,31000,31001,31002,31003,31004,31005,31006,31007,31008,31009,31010,31011,31012,31013,31014,31015,31016,31017,31018,31019,31020,31021,31022,31023,31024,31025,31026,31027,31028,31029,31030,31031,31032,31033,31034,31035,31036,31037,31038,31039,31040,31041,31042,31043,31044,31045,31046,31047,31048,31049,31050,31051,31052,31053,31054,31055,31056,31057,31058,31059,31060,31061,31062,31063,31064,31065,31066,31067,31068,31069,31070,31071,31072,31073,31074,31075,31076,31077,31078,31079,31080,31081,31082,31083,31084,31085,31086,31087,31088,31089,31090,31091,31092,31093,31094,31095,31096,31097,31098,31099,31100,31101,31102,31103,31104,31105,31106,31107,31108,31109,31110,31111,31112,31113,31114,31115,31116,31117,31118,31119,31120,31121,31122,31123,31124,31125,31126,31127,31128,31129,31130,31131,31132,31133,31134,31135,31136,31137,31138,31139,31140,31141,31142,31143,31144,31145,31146,31147,31148,31149,31150,31151,31152,31153,31154,31155,31156,31157,31158,31159,31160,31161,31162,31163,31164,31165,31166,31167,31168,31169,31170,31171,31172,31173,31174,31175,31176,31177,31178,31179,31180,31181,31182,31183,31184,31185,31186,31187,31188,31189,31190,31191,31192,31193,31194,31195,31196,31197,31198,31199,31200,31201,31202,31203,31204,31205,31206,31207,31208,31209,31210,31211,31212,31213,31214,31215,31216,31217,31218,31219,31220,31221,31222,31223,31224,31225,31226,31227,31228,31229,31230,31231,31232,31233,31234,31235,31236,31237,31238,31239,31240,31241,31242,31243,31244,31245,31246,31247,31248,31249,31250,31251,31252,31253,31254,31255,31256,31257,31258,31259,31260,31261,31262,31263,31264,31265,31266,31267,31268,31269,31270,31271,31272,31273,31274,31275,31276,31277,31278,31279,31280,31281,31282,31283,31284,31285,31286,31287,31288,31289,31290,31291,31292,31293,31294,31295,31296,31297,31298,31299,31300,31301,31302,31303,31304,31305,31306,31307,31308,31309,31310,31311,31312,31313,31314,31315,31316,31317,31318,31319,31320,31321,31322,31323,31324,31325,31326,31327,31328,31329,31330,31331,31332,31333,31334,31335,31336,31337,31338,31339,31340,31341,31342,31343,31344,31345,31346,31347,31348,31349,31350,31351,31352,31353,31354,31355,31356,31357,31358,31359,31360,31361,31362,31363,31364,31365,31366,31367,31368,31369,31370,31371,31372,31373,31374,31375,31376,31377,31378,31379,31380,31381,31382,31383,31384,31385,31386,31387,31388,31389,31390,31391,31392,31393,31394,31395,31396,31397,31398,31399,31400,31401,31402,31403,31404,31405,31406,31407,31408,31409,31410,31411,31412,31413,31414,31415,31416,31417,31418,31419,31420,31421,31422,31423,31424,31425,31426,31427,31428,31429,31430,31431,31432,31433,31434,31435,31436,31437,31438,31439,31440,31441,31442,31443,31444,31445,31446,31447,31448,31449,31450,31451,31452,31453,31454,31455,31456,31457,31458,31459,31460,31461,31462,31463,31464,31465,31466,31467,31468,31469,31470,31471,31472,31473,31474,31475,31476,31477,31478,31479,31480,31481,31482,31483,31484,31485,31486,31487,31488,31489,31490,31491,31492,31493,31494,31495,31496,31497,31498,31499,31500,31501,31502,31503,31504,31505,31506,31507,31508,31509,31510,31511,31512,31513,31514,31515,31516,31517,31518,31519,31520,31521,31522,31523,31524,31525,31526,31527,31528,31529,31530,31531,31532,31533,31534,31535,31536,31537,31538,31539,31540,31541,31542,31543,31544,31545,31546,31547,31548,31549,31550,31551,31552,31553,31554,31555,31556,31557,31558,31559,31560,31561,31562,31563,31564,31565,31566,31567,31568,31569,31570,31571,31572,31573,31574,31575,31576,31577,31578,31579,31580,31581,31582,31583,31584,31585,31586,31587,31588,31589,31590,31591,31592,31593,31594,31595,31596,31597,31598,31599,31600,31601,31602,31603,31604,31605,31606,31607,31608,31609,31610,31611,31612,31613,31614,31615,31616,31617,31618,31619,31620,31621,31622,31623,31624,31625,31626,31627,31628,31629,31630,31631,31632,31633,31634,31635,31636,31637,31638,31639,31640,31641,31642,31643,31644,31645,31646,31647,31648,31649,31650,31651,31652,31653,31654,31655,31656,31657,31658,31659,31660,31661,31662,31663,31664,31665,31666,31667,31668,31669,31670,31671,31672,31673,31674,31675,31676,31677,31678,31679,31680,31681,31682,31683,31684,31685,31686,31687,31688,31689,31690,31691,31692,31693,31694,31695,31696,31697,31698,31699,31700,31701,31702,31703,31704,31705,31706,31707,31708,31709,31710,31711,31712,31713,31714,31715,31716,31717,31718,31719,31720,31721,31722,31723,31724,31725,31726,31727,31728,31729,31730,31731,31732,31733,31734,31735,31736,31737,31738,31739,31740,31741,31742,31743,31744,31745,31746,31747,31748,31749,31750,31751,31752,31753,31754,31755,31756,31757,31758,31759,31760,31761,31762,31763,31764,31765,31766,31767,31768,31769,31770,31771,31772,31773,31774,31775,31776,31777,31778,31779,31780,31781,31782,31783,31784,31785,31786,31787,31788,31789,31790,31791,31792,31793,31794,31795,31796,31797,31798,31799,31800,31801,31802,31803,31804,31805,31806,31807,31808,31809,31810,31811,31812,31813,31814,31815,31816,31817,31818,31819,31820,31821,31822,31823,31824,31825,31826,31827,31828,31829,31830,31831,31832,31833,31834,31835,31836,31837,31838,31839,31840,31841,31842,31843,31844,31845,31846,31847,31848,31849,31850,31851,31852,31853,31854,31855,31856,31857,31858,31859,31860,31861,31862,31863,31864,31865,31866,31867,31868,31869,31870,31871,31872,31873,31874,31875,31876,31877,31878,31879,31880,31881,31882,31883,31884,31885,31886,31887,31888,31889,31890,31891,31892,31893,31894,31895,31896,31897,31898,31899,31900,31901,31902,31903,31904,31905,31906,31907,31908,31909,31910,31911,31912,31913,31914,31915,31916,31917,31918,31919,31920,31921,31922,31923,31924,31925,31926,31927,31928,31929,31930,31931,31932,31933,31934,31935,31936,31937,31938,31939,31940,31941,31942,31943,31944,31945,31946,31947,31948,31949,31950,31951,31952,31953,31954,31955,31956,31957,31958,31959,31960,31961,31962,31963,31964,31965,31966,31967,31968,31969,31970,31971,31972,31973,31974,31975,31976,31977,31978,31979,31980,31981,31982,31983,31984,31985,31986,31987,31988,31989,31990,31991,31992,31993,31994,31995,31996,31997,31998,31999,32000,32001,32002,32003,32004,32005,32006,32007,32008,32009,32010,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32032,32033,32034,32035,32036,32037,32038,32039,32040,32041,32042,32043,32044,32045,32046,32047,32048,32049,32050,32051,32052,32053,32054,32055,32056,32057,32058,32059,32060,32061,32062,32063,32064,32065,32066,32067,32068,32069,32070,32071,32072,32073,32074,32075,32076,32077,32078,32079,32080,32081,32082,32083,32084,32085,32086,32087,32088,32089,32090,32091,32092,32093,32094,32095,32096,32097,32098,32099,32100,32101,32102,32103,32104,32105,32106,32107,32108,32109,32110,32111,32112,32113,32114,32115,32116,32117,32118,32119,32120,32121,32122,32123,32124,32125,32126,32127,32128,32129,32130,32131,32132,32133,32134,32135,32136,32137,32138,32139,32140,32141,32142,32143,32144,32145,32146,32147,32148,32149,32150,32151,32152,32153,32154,32155,32156,32157,32158,32159,32160,32161,32162,32163,32164,32165,32166,32167,32168,32169,32170,32171,32172,32173,32174,32175,32176,32177,32178,32179,32180,32181,32182,32183,32184,32185,32186,32187,32188,32189,32190,32191,32192,32193,32194,32195,32196,32197,32198,32199,32200,32201,32202,32203,32204,32205,32206,32207,32208,32209,32210,32211,32212,32213,32214,32215,32216,32217,32218,32219,32220,32221,32222,32223,32224,32225,32226,32227,32228,32229,32230,32231,32232,32233,32234,32235,32236,32237,32238,32239,32240,32241,32242,32243,32244,32245,32246,32247,32248,32249,32250,32251,32252,32253,32254,32255,32256,32257,32258,32259,32260,32261,32262,32263,32264,32265,32266,32267,32268,32269,32270,32271,32272,32273,32274,32275,32276,32277,32278,32279,32280,32281,32282,32283,32284,32285,32286,32287,32288,32289,32290,32291,32292,32293,32294,32295,32296,32297,32298,32299,32300,32301,32302,32303,32304,32305,32306,32307,32308,32309,32310,32311,32312,32313,32314,32315,32316,32317,32318,32319,32320,32321,32322,32323,32324,32325,32326,32327,32328,32329,32330,32331,32332,32333,32334,32335,32336,32337,32338,32339,32340,32341,32342,32343,32344,32345,32346,32347,32348,32349,32350,32351,32352,32353,32354,32355,32356,32357,32358,32359,32360,32361,32362,32363,32364,32365,32366,32367,32368,32369,32370,32371,32372,32373,32374,32375,32376,32377,32378,32379,32380,32381,32382,32383,32384,32385,32386,32387,32388,32389,32390,32391,32392,32393,32394,32395,32396,32397,32398,32399,32400,32401,32402,32403,32404,32405,32406,32407,32408,32409,32410,32411,32412,32413,32414,32415,32416,32417,32418,32419,32420,32421,32422,32423,32424,32425,32426,32427,32428,32429,32430,32431,32432,32433,32434,32435,32436,32437,32438,32439,32440,32441,32442,32443,32444,32445,32446,32447,32448,32449,32450,32451,32452,32453,32454,32455,32456,32457,32458,32459,32460,32461,32462,32463,32464,32465,32466,32467,32468,32469,32470,32471,32472,32473,32474,32475,32476,32477,32478,32479,32480,32481,32482,32483,32484,32485,32486,32487,32488,32489,32490,32491,32492,32493,32494,32495,32496,32497,32498,32499,32500,32501,32502,32503,32504,32505,32506,32507,32508,32509,32510,32511,32512,32513,32514,32515,32516,32517,32518,32519,32520,32521,32522,32523,32524,32525,32526,32527,32528,32529,32530,32531,32532,32533,32534,32535,32536,32537,32538,32539,32540,32541,32542,32543,32544,32545,32546,32547,32548,32549,32550,32551,32552,32553,32554,32555,32556,32557,32558,32559,32560,32561,32562,32563,32564,32565,32566,32567,32568,32569,32570,32571,32572,32573,32574,32575,32576,32577,32578,32579,32580,32581,32582,32583,32584,32585,32586,32587,32588,32589,32590,32591,32592,32593,32594,32595,32596,32597,32598,32599,32600,32601,32602,32603,32604,32605,32606,32607,32608,32609,32610,32611,32612,32613,32614,32615,32616,32617,32618,32619,32620,32621,32622,32623,32624,32625,32626,32627,32628,32629,32630,32631,32632,32633,32634,32635,32636,32637,32638,32639,32640,32641,32642,32643,32644,32645,32646,32647,32648,32649,32650,32651,32652,32653,32654,32655,32656,32657,32658,32659,32660,32661,32662,32663,32664,32665,32666,32667,32668,32669,32670,32671,32672,32673,32674,32675,32676,32677,32678,32679,32680,32681,32682,32683,32684,32685,32686,32687,32688,32689,32690,32691,32692,32693,32694,32695,32696,32697,32698,32699,32700,32701,32702,32703,32704,32705,32706,32707,32708,32709,32710,32711,32712,32713,32714,32715,32716,32717,32718,32719,32720,32721,32722,32723,32724,32725,32726,32727,32728,32729,32730,32731,32732,32733,32734,32735,32736,32737,32738,32739,32740,32741,32742,32743,32744,32745,32746,32747,32748,32749,32750,32751,32752,32753,32754,32755,32756,32757,32758,32759,32760,32761,32762,32763,32764,32765,32766,32767,32768,32769,32770,32771,32772,32773,32774,32775,32776,32777,32778,32779,32780,32781,32782,32783,32784,32785,32786,32787,32788,32789,32790,32791,32792,32793,32794,32795,32796,32797,32798,32799,32800,32801,32802,32803,32804,32805,32806,32807,32808,32809,32810,32811,32812,32813,32814,32815,32816,32817,32818,32819,32820,32821,32822,32823,32824,32825,32826,32827,32828,32829,32830,32831,32832,32833,32834,32835,32836,32837,32838,32839,32840,32841,32842,32843,32844,32845,32846,32847,32848,32849,32850,32851,32852,32853,32854,32855,32856,32857,32858,32859,32860,32861,32862,32863,32864,32865,32866,32867,32868,32869,32870,32871,32872,32873,32874,32875,32876,32877,32878,32879,32880,32881,32882,32883,32884,32885,32886,32887,32888,32889,32890,32891,32892,32893,32894,32895,32896,32897,32898,32899,32900,32901,32902,32903,32904,32905,32906,32907,32908,32909,32910,32911,32912,32913,32914,32915,32916,32917,32918,32919,32920,32921,32922,32923,32924,32925,32926,32927,32928,32929,32930,32931,32932,32933,32934,32935,32936,32937,32938,32939,32940,32941,32942,32943,32944,32945,32946,32947,32948,32949,32950,32951,32952,32953,32954,32955,32956,32957,32958,32959,32960,32961,32962,32963,32964,32965,32966,32967,32968,32969,32970,32971,32972,32973,32974,32975,32976,32977,32978,32979,32980,32981,32982,32983,32984,32985,32986,32987,32988,32989,32990,32991,32992,32993,32994,32995,32996,32997,32998,32999,33000,33001,33002,33003,33004,33005,33006,33007,33008,33009,33010,33011,33012,33013,33014,33015,33016,33017,33018,33019,33020,33021,33022,33023,33024,33025,33026,33027,33028,33029,33030,33031,33032,33033,33034,33035,33036,33037,33038,33039,33040,33041,33042,33043,33044,33045,33046,33047,33048,33049,33050,33051,33052,33053,33054,33055,33056,33057,33058,33059,33060,33061,33062,33063,33064,33065,33066,33067,33068,33069,33070,33071,33072,33073,33074,33075,33076,33077,33078,33079,33080,33081,33082,33083,33084,33085,33086,33087,33088,33089,33090,33091,33092,33093,33094,33095,33096,33097,33098,33099,33100,33101,33102,33103,33104,33105,33106,33107,33108,33109,33110,33111,33112,33113,33114,33115,33116,33117,33118,33119,33120,33121,33122,33123,33124,33125,33126,33127,33128,33129,33130,33131,33132,33133,33134,33135,33136,33137,33138,33139,33140,33141,33142,33143,33144,33145,33146,33147,33148,33149,33150,33151,33152,33153,33154,33155,33156,33157,33158,33159,33160,33161,33162,33163,33164,33165,33166,33167,33168,33169,33170,33171,33172,33173,33174,33175,33176,33177,33178,33179,33180,33181,33182,33183,33184,33185,33186,33187,33188,33189,33190,33191,33192,33193,33194,33195,33196,33197,33198,33199,33200,33201,33202,33203,33204,33205,33206,33207,33208,33209,33210,33211,33212,33213,33214,33215,33216,33217,33218,33219,33220,33221,33222,33223,33224,33225,33226,33227,33228,33229,33230,33231,33232,33233,33234,33235,33236,33237,33238,33239,33240,33241,33242,33243,33244,33245,33246,33247,33248,33249,33250,33251,33252,33253,33254,33255,33256,33257,33258,33259,33260,33261,33262,33263,33264,33265,33266,33267,33268,33269,33270,33271,33272,33273,33274,33275,33276,33277,33278,33279,33280,33281,33282,33283,33284,33285,33286,33287,33288,33289,33290,33291,33292,33293,33294,33295,33296,33297,33298,33299,33300,33301,33302,33303,33304,33305,33306,33307,33308,33309,33310,33311,33312,33313,33314,33315,33316,33317,33318,33319,33320,33321,33322,33323,33324,33325,33326,33327,33328,33329,33330,33331,33332,33333,33334,33335,33336,33337,33338,33339,33340,33341,33342,33343,33344,33345,33346,33347,33348,33349,33350,33351,33352,33353,33354,33355,33356,33357,33358,33359,33360,33361,33362,33363,33364,33365,33366,33367,33368,33369,33370,33371,33372,33373,33374,33375,33376,33377,33378,33379,33380,33381,33382,33383,33384,33385,33386,33387,33388,33389,33390,33391,33392,33393,33394,33395,33396,33397,33398,33399,33400,33401,33402,33403,33404,33405,33406,33407,33408,33409,33410,33411,33412,33413,33414,33415,33416,33417,33418,33419,33420,33421,33422,33423,33424,33425,33426,33427,33428,33429,33430,33431,33432,33433,33434,33435,33436,33437,33438,33439,33440,33441,33442,33443,33444,33445,33446,33447,33448,33449,33450,33451,33452,33453,33454,33455,33456,33457,33458,33459,33460,33461,33462,33463,33464,33465,33466,33467,33468,33469,33470,33471,33472,33473,33474,33475,33476,33477,33478,33479,33480,33481,33482,33483,33484,33485,33486,33487,33488,33489,33490,33491,33492,33493,33494,33495,33496,33497,33498,33499,33500,33501,33502,33503,33504,33505,33506,33507,33508,33509,33510,33511,33512,33513,33514,33515,33516,33517,33518,33519,33520,33521,33522,33523,33524,33525,33526,33527,33528,33529,33530,33531,33532,33533,33534,33535,33536,33537,33538,33539,33540,33541,33542,33543,33544,33545,33546,33547,33548,33549,33550,33551,33552,33553,33554,33555,33556,33557,33558,33559,33560,33561,33562,33563,33564,33565,33566,33567,33568,33569,33570,33571,33572,33573,33574,33575,33576,33577,33578,33579,33580,33581,33582,33583,33584,33585,33586,33587,33588,33589,33590,33591,33592,33593,33594,33595,33596,33597,33598,33599,33600,33601,33602,33603,33604,33605,33606,33607,33608,33609,33610,33611,33612,33613,33614,33615,33616,33617,33618,33619,33620,33621,33622,33623,33624,33625,33626,33627,33628,33629,33630,33631,33632,33633,33634,33635,33636,33637,33638,33639,33640,33641,33642,33643,33644,33645,33646,33647,33648,33649,33650,33651,33652,33653,33654,33655,33656,33657,33658,33659,33660,33661,33662,33663,33664,33665,33666,33667,33668,33669,33670,33671,33672,33673,33674,33675,33676,33677,33678,33679,33680,33681,33682,33683,33684,33685,33686,33687,33688,33689,33690,33691,33692,33693,33694,33695,33696,33697,33698,33699,33700,33701,33702,33703,33704,33705,33706,33707,33708,33709,33710,33711,33712,33713,33714,33715,33716,33717,33718,33719,33720,33721,33722,33723,33724,33725,33726,33727,33728,33729,33730,33731,33732,33733,33734,33735,33736,33737,33738,33739,33740,33741,33742,33743,33744,33745,33746,33747,33748,33749,33750,33751,33752,33753,33754,33755,33756,33757,33758,33759,33760,33761,33762,33763,33764,33765,33766,33767,33768,33769,33770,33771,33772,33773,33774,33775,33776,33777,33778,33779,33780,33781,33782,33783,33784,33785,33786,33787,33788,33789,33790,33791,33792,33793,33794,33795,33796,33797,33798,33799,33800,33801,33802,33803,33804,33805,33806,33807,33808,33809,33810,33811,33812,33813,33814,33815,33816,33817,33818,33819,33820,33821,33822,33823,33824,33825,33826,33827,33828,33829,33830,33831,33832,33833,33834,33835,33836,33837,33838,33839,33840,33841,33842,33843,33844,33845,33846,33847,33848,33849,33850,33851,33852,33853,33854,33855,33856,33857,33858,33859,33860,33861,33862,33863,33864,33865,33866,33867,33868,33869,33870,33871,33872,33873,33874,33875,33876,33877,33878,33879,33880,33881,33882,33883,33884,33885,33886,33887,33888,33889,33890,33891,33892,33893,33894,33895,33896,33897,33898,33899,33900,33901,33902,33903,33904,33905,33906,33907,33908,33909,33910,33911,33912,33913,33914,33915,33916,33917,33918,33919,33920,33921,33922,33923,33924,33925,33926,33927,33928,33929,33930,33931,33932,33933,33934,33935,33936,33937,33938,33939,33940,33941,33942,33943,33944,33945,33946,33947,33948,33949,33950,33951,33952,33953,33954,33955,33956,33957,33958,33959,33960,33961,33962,33963,33964,33965,33966,33967,33968,33969,33970,33971,33972,33973,33974,33975,33976,33977,33978,33979,33980,33981,33982,33983,33984,33985,33986,33987,33988,33989,33990,33991,33992,33993,33994,33995,33996,33997,33998,33999,34000,34001,34002,34003,34004,34005,34006,34007,34008,34009,34010,34011,34012,34013,34014,34015,34016,34017,34018,34019,34020,34021,34022,34023,34024,34025,34026,34027,34028,34029,34030,34031,34032,34033,34034,34035,34036,34037,34038,34039,34040,34041,34042,34043,34044,34045,34046,34047,34048,34049,34050,34051,34052,34053,34054,34055,34056,34057,34058,34059,34060,34061,34062,34063,34064,34065,34066,34067,34068,34069,34070,34071,34072,34073,34074,34075,34076,34077,34078,34079,34080,34081,34082,34083,34084,34085,34086,34087,34088,34089,34090,34091,34092,34093,34094,34095,34096,34097,34098,34099,34100,34101,34102,34103,34104,34105,34106,34107,34108,34109,34110,34111,34112,34113,34114,34115,34116,34117,34118,34119,34120,34121,34122,34123,34124,34125,34126,34127,34128,34129,34130,34131,34132,34133,34134,34135,34136,34137,34138,34139,34140,34141,34142,34143,34144,34145,34146,34147,34148,34149,34150,34151,34152,34153,34154,34155,34156,34157,34158,34159,34160,34161,34162,34163,34164,34165,34166,34167,34168,34169,34170,34171,34172,34173,34174,34175,34176,34177,34178,34179,34180,34181,34182,34183,34184,34185,34186,34187,34188,34189,34190,34191,34192,34193,34194,34195,34196,34197,34198,34199,34200,34201,34202,34203,34204,34205,34206,34207,34208,34209,34210,34211,34212,34213,34214,34215,34216,34217,34218,34219,34220,34221,34222,34223,34224,34225,34226,34227,34228,34229,34230,34231,34232,34233,34234,34235,34236,34237,34238,34239,34240,34241,34242,34243,34244,34245,34246,34247,34248,34249,34250,34251,34252,34253,34254,34255,34256,34257,34258,34259,34260,34261,34262,34263,34264,34265,34266,34267,34268,34269,34270,34271,34272,34273,34274,34275,34276,34277,34278,34279,34280,34281,34282,34283,34284,34285,34286,34287,34288,34289,34290,34291,34292,34293,34294,34295,34296,34297,34298,34299,34300,34301,34302,34303,34304,34305,34306,34307,34308,34309,34310,34311,34312,34313,34314,34315,34316,34317,34318,34319,34320,34321,34322,34323,34324,34325,34326,34327,34328,34329,34330,34331,34332,34333,34334,34335,34336,34337,34338,34339,34340,34341,34342,34343,34344,34345,34346,34347,34348,34349,34350,34351,34352,34353,34354,34355,34356,34357,34358,34359,34360,34361,34362,34363,34364,34365,34366,34367,34368,34369,34370,34371,34372,34373,34374,34375,34376,34377,34378,34379,34380,34381,34382,34383,34384,34385,34386,34387,34388,34389,34390,34391,34392,34393,34394,34395,34396,34397,34398,34399,34400,34401,34402,34403,34404,34405,34406,34407,34408,34409,34410,34411,34412,34413,34414,34415,34416,34417,34418,34419,34420,34421,34422,34423,34424,34425,34426,34427,34428,34429,34430,34431,34432,34433,34434,34435,34436,34437,34438,34439,34440,34441,34442,34443,34444,34445,34446,34447,34448,34449,34450,34451,34452,34453,34454,34455,34456,34457,34458,34459,34460,34461,34462,34463,34464,34465,34466,34467,34468,34469,34470,34471,34472,34473,34474,34475,34476,34477,34478,34479,34480,34481,34482,34483,34484,34485,34486,34487,34488,34489,34490,34491,34492,34493,34494,34495,34496,34497,34498,34499,34500,34501,34502,34503,34504,34505,34506,34507,34508,34509,34510,34511,34512,34513,34514,34515,34516,34517,34518,34519,34520,34521,34522,34523,34524,34525,34526,34527,34528,34529,34530,34531,34532,34533,34534,34535,34536,34537,34538,34539,34540,34541,34542,34543,34544,34545,34546,34547,34548,34549,34550,34551,34552,34553,34554,34555,34556,34557,34558,34559,34560,34561,34562,34563,34564,34565,34566,34567,34568,34569,34570,34571,34572,34573,34574,34575,34576,34577,34578,34579,34580,34581,34582,34583,34584,34585,34586,34587,34588,34589,34590,34591,34592,34593,34594,34595,34596,34597,34598,34599,34600,34601,34602,34603,34604,34605,34606,34607,34608,34609,34610,34611,34612,34613,34614,34615,34616,34617,34618,34619,34620,34621,34622,34623,34624,34625,34626,34627,34628,34629,34630,34631,34632,34633,34634,34635,34636,34637,34638,34639,34640,34641,34642,34643,34644,34645,34646,34647,34648,34649,34650,34651,34652,34653,34654,34655,34656,34657,34658,34659,34660,34661,34662,34663,34664,34665,34666,34667,34668,34669,34670,34671,34672,34673,34674,34675,34676,34677,34678,34679,34680,34681,34682,34683,34684,34685,34686,34687,34688,34689,34690,34691,34692,34693,34694,34695,34696,34697,34698,34699,34700,34701,34702,34703,34704,34705,34706,34707,34708,34709,34710,34711,34712,34713,34714,34715,34716,34717,34718,34719,34720,34721,34722,34723,34724,34725,34726,34727,34728,34729,34730,34731,34732,34733,34734,34735,34736,34737,34738,34739,34740,34741,34742,34743,34744,34745,34746,34747,34748,34749,34750,34751,34752,34753,34754,34755,34756,34757,34758,34759,34760,34761,34762,34763,34764,34765,34766,34767,34768,34769,34770,34771,34772,34773,34774,34775,34776,34777,34778,34779,34780,34781,34782,34783,34784,34785,34786,34787,34788,34789,34790,34791,34792,34793,34794,34795,34796,34797,34798,34799,34800,34801,34802,34803,34804,34805,34806,34807,34808,34809,34810,34811,34812,34813,34814,34815,34816,34817,34818,34819,34820,34821,34822,34823,34824,34825,34826,34827,34828,34829,34830,34831,34832,34833,34834,34835,34836,34837,34838,34839,34840,34841,34842,34843,34844,34845,34846,34847,34848,34849,34850,34851,34852,34853,34854,34855,34856,34857,34858,34859,34860,34861,34862,34863,34864,34865,34866,34867,34868,34869,34870,34871,34872,34873,34874,34875,34876,34877,34878,34879,34880,34881,34882,34883,34884,34885,34886,34887,34888,34889,34890,34891,34892,34893,34894,34895,34896,34897,34898,34899,34900,34901,34902,34903,34904,34905,34906,34907,34908,34909,34910,34911,34912,34913,34914,34915,34916,34917,34918,34919,34920,34921,34922,34923,34924,34925,34926,34927,34928,34929,34930,34931,34932,34933,34934,34935,34936,34937,34938,34939,34940,34941,34942,34943,34944,34945,34946,34947,34948,34949,34950,34951,34952,34953,34954,34955,34956,34957,34958,34959,34960,34961,34962,34963,34964,34965,34966,34967,34968,34969,34970,34971,34972,34973,34974,34975,34976,34977,34978,34979,34980,34981,34982,34983,34984,34985,34986,34987,34988,34989,34990,34991,34992,34993,34994,34995,34996,34997,34998,34999,35000,35001,35002,35003,35004,35005,35006,35007,35008,35009,35010,35011,35012,35013,35014,35015,35016,35017,35018,35019,35020,35021,35022,35023,35024,35025,35026,35027,35028,35029,35030,35031,35032,35033,35034,35035,35036,35037,35038,35039,35040,35041,35042,35043,35044,35045,35046,35047,35048,35049,35050,35051,35052,35053,35054,35055,35056,35057,35058,35059,35060,35061,35062,35063,35064,35065,35066,35067,35068,35069,35070,35071,35072,35073,35074,35075,35076,35077,35078,35079,35080,35081,35082,35083,35084,35085,35086,35087,35088,35089,35090,35091,35092,35093,35094,35095,35096,35097,35098,35099,35100,35101,35102,35103,35104,35105,35106,35107,35108,35109,35110,35111,35112,35113,35114,35115,35116,35117,35118,35119,35120,35121,35122,35123,35124,35125,35126,35127,35128,35129,35130,35131,35132,35133,35134,35135,35136,35137,35138,35139,35140,35141,35142,35143,35144,35145,35146,35147,35148,35149,35150,35151,35152,35153,35154,35155,35156,35157,35158,35159,35160,35161,35162,35163,35164,35165,35166,35167,35168,35169,35170,35171,35172,35173,35174,35175,35176,35177,35178,35179,35180,35181,35182,35183,35184,35185,35186,35187,35188,35189,35190,35191,35192,35193,35194,35195,35196,35197,35198,35199,35200,35201,35202,35203,35204,35205,35206,35207,35208,35209,35210,35211,35212,35213,35214,35215,35216,35217,35218,35219,35220,35221,35222,35223,35224,35225,35226,35227,35228,35229,35230,35231,35232,35233,35234,35235,35236,35237,35238,35239,35240,35241,35242,35243,35244,35245,35246,35247,35248,35249,35250,35251,35252,35253,35254,35255,35256,35257,35258,35259,35260,35261,35262,35263,35264,35265,35266,35267,35268,35269,35270,35271,35272,35273,35274,35275,35276,35277,35278,35279,35280,35281,35282,35283,35284,35285,35286,35287,35288,35289,35290,35291,35292,35293,35294,35295,35296,35297,35298,35299,35300,35301,35302,35303,35304,35305,35306,35307,35308,35309,35310,35311,35312,35313,35314,35315,35316,35317,35318,35319,35320,35321,35322,35323,35324,35325,35326,35327,35328,35329,35330,35331,35332,35333,35334,35335,35336,35337,35338,35339,35340,35341,35342,35343,35344,35345,35346,35347,35348,35349,35350,35351,35352,35353,35354,35355,35356,35357,35358,35359,35360,35361,35362,35363,35364,35365,35366,35367,35368,35369,35370,35371,35372,35373,35374,35375,35376,35377,35378,35379,35380,35381,35382,35383,35384,35385,35386,35387,35388,35389,35390,35391,35392,35393,35394,35395,35396,35397,35398,35399,35400,35401,35402,35403,35404,35405,35406,35407,35408,35409,35410,35411,35412,35413,35414,35415,35416,35417,35418,35419,35420,35421,35422,35423,35424,35425,35426,35427,35428,35429,35430,35431,35432,35433,35434,35435,35436,35437,35438,35439,35440,35441,35442,35443,35444,35445,35446,35447,35448,35449,35450,35451,35452,35453,35454,35455,35456,35457,35458,35459,35460,35461,35462,35463,35464,35465,35466,35467,35468,35469,35470,35471,35472,35473,35474,35475,35476,35477,35478,35479,35480,35481,35482,35483,35484,35485,35486,35487,35488,35489,35490,35491,35492,35493,35494,35495,35496,35497,35498,35499,35500,35501,35502,35503,35504,35505,35506,35507,35508,35509,35510,35511,35512,35513,35514,35515,35516,35517,35518,35519,35520,35521,35522,35523,35524,35525,35526,35527,35528,35529,35530,35531,35532,35533,35534,35535,35536,35537,35538,35539,35540,35541,35542,35543,35544,35545,35546,35547,35548,35549,35550,35551,35552,35553,35554,35555,35556,35557,35558,35559,35560,35561,35562,35563,35564,35565,35566,35567,35568,35569,35570,35571,35572,35573,35574,35575,35576,35577,35578,35579,35580,35581,35582,35583,35584,35585,35586,35587,35588,35589,35590,35591,35592,35593,35594,35595,35596,35597,35598,35599,35600,35601,35602,35603,35604,35605,35606,35607,35608,35609,35610,35611,35612,35613,35614,35615,35616,35617,35618,35619,35620,35621,35622,35623,35624,35625,35626,35627,35628,35629,35630,35631,35632,35633,35634,35635,35636,35637,35638,35639,35640,35641,35642,35643,35644,35645,35646,35647,35648,35649,35650,35651,35652,35653,35654,35655,35656,35657,35658,35659,35660,35661,35662,35663,35664,35665,35666,35667,35668,35669,35670,35671,35672,35673,35674,35675,35676,35677,35678,35679,35680,35681,35682,35683,35684,35685,35686,35687,35688,35689,35690,35691,35692,35693,35694,35695,35696,35697,35698,35699,35700,35701,35702,35703,35704,35705,35706,35707,35708,35709,35710,35711,35712,35713,35714,35715,35716,35717,35718,35719,35720,35721,35722,35723,35724,35725,35726,35727,35728,35729,35730,35731,35732,35733,35734,35735,35736,35737,35738,35739,35740,35741,35742,35743,35744,35745,35746,35747,35748,35749,35750,35751,35752,35753,35754,35755,35756,35757,35758,35759,35760,35761,35762,35763,35764,35765,35766,35767,35768,35769,35770,35771,35772,35773,35774,35775,35776,35777,35778,35779,35780,35781,35782,35783,35784,35785,35786,35787,35788,35789,35790,35791,35792,35793,35794,35795,35796,35797,35798,35799,35800,35801,35802,35803,35804,35805,35806,35807,35808,35809,35810,35811,35812,35813,35814,35815,35816,35817,35818,35819,35820,35821,35822,35823,35824,35825,35826,35827,35828,35829,35830,35831,35832,35833,35834,35835,35836,35837,35838,35839,35840,35841,35842,35843,35844,35845,35846,35847,35848,35849,35850,35851,35852,35853,35854,35855,35856,35857,35858,35859,35860,35861,35862,35863,35864,35865,35866,35867,35868,35869,35870,35871,35872,35873,35874,35875,35876,35877,35878,35879,35880,35881,35882,35883,35884,35885,35886,35887,35888,35889,35890,35891,35892,35893,35894,35895,35896,35897,35898,35899,35900,35901,35902,35903,35904,35905,35906,35907,35908,35909,35910,35911,35912,35913,35914,35915,35916,35917,35918,35919,35920,35921,35922,35923,35924,35925,35926,35927,35928,35929,35930,35931,35932,35933,35934,35935,35936,35937,35938,35939,35940,35941,35942,35943,35944,35945,35946,35947,35948,35949,35950,35951,35952,35953,35954,35955,35956,35957,35958,35959,35960,35961,35962,35963,35964,35965,35966,35967,35968,35969,35970,35971,35972,35973,35974,35975,35976,35977,35978,35979,35980,35981,35982,35983,35984,35985,35986,35987,35988,35989,35990,35991,35992,35993,35994,35995,35996,35997,35998,35999,36000,36001,36002,36003,36004,36005,36006,36007,36008,36009,36010,36011,36012,36013,36014,36015,36016,36017,36018,36019,36020,36021,36022,36023,36024,36025,36026,36027,36028,36029,36030,36031,36032,36033,36034,36035,36036,36037,36038,36039,36040,36041,36042,36043,36044,36045,36046,36047,36048,36049,36050,36051,36052,36053,36054,36055,36056,36057,36058,36059,36060,36061,36062,36063,36064,36065,36066,36067,36068,36069,36070,36071,36072,36073,36074,36075,36076,36077,36078,36079,36080,36081,36082,36083,36084,36085,36086,36087,36088,36089,36090,36091,36092,36093,36094,36095,36096,36097,36098,36099,36100,36101,36102,36103,36104,36105,36106,36107,36108,36109,36110,36111,36112,36113,36114,36115,36116,36117,36118,36119,36120,36121,36122,36123,36124,36125,36126,36127,36128,36129,36130,36131,36132,36133,36134,36135,36136,36137,36138,36139,36140,36141,36142,36143,36144,36145,36146,36147,36148,36149,36150,36151,36152,36153,36154,36155,36156,36157,36158,36159,36160,36161,36162,36163,36164,36165,36166,36167,36168,36169,36170,36171,36172,36173,36174,36175,36176,36177,36178,36179,36180,36181,36182,36183,36184,36185,36186,36187,36188,36189,36190,36191,36192,36193,36194,36195,36196,36197,36198,36199,36200,36201,36202,36203,36204,36205,36206,36207,36208,36209,36210,36211,36212,36213,36214,36215,36216,36217,36218,36219,36220,36221,36222,36223,36224,36225,36226,36227,36228,36229,36230,36231,36232,36233,36234,36235,36236,36237,36238,36239,36240,36241,36242,36243,36244,36245,36246,36247,36248,36249,36250,36251,36252,36253,36254,36255,36256,36257,36258,36259,36260,36261,36262,36263,36264,36265,36266,36267,36268,36269,36270,36271,36272,36273,36274,36275,36276,36277,36278,36279,36280,36281,36282,36283,36284,36285,36286,36287,36288,36289,36290,36291,36292,36293,36294,36295,36296,36297,36298,36299,36300,36301,36302,36303,36304,36305,36306,36307,36308,36309,36310,36311,36312,36313,36314,36315,36316,36317,36318,36319,36320,36321,36322,36323,36324,36325,36326,36327,36328,36329,36330,36331,36332,36333,36334,36335,36336,36337,36338,36339,36340,36341,36342,36343,36344,36345,36346,36347,36348,36349,36350,36351,36352,36353,36354,36355,36356,36357,36358,36359,36360,36361,36362,36363,36364,36365,36366,36367,36368,36369,36370,36371,36372,36373,36374,36375,36376,36377,36378,36379,36380,36381,36382,36383,36384,36385,36386,36387,36388,36389,36390,36391,36392,36393,36394,36395,36396,36397,36398,36399,36400,36401,36402,36403,36404,36405,36406,36407,36408,36409,36410,36411,36412,36413,36414,36415,36416,36417,36418,36419,36420,36421,36422,36423,36424,36425,36426,36427,36428,36429,36430,36431,36432,36433,36434,36435,36436,36437,36438,36439,36440,36441,36442,36443,36444,36445,36446,36447,36448,36449,36450,36451,36452,36453,36454,36455,36456,36457,36458,36459,36460,36461,36462,36463,36464,36465,36466,36467,36468,36469,36470,36471,36472,36473,36474,36475,36476,36477,36478,36479,36480,36481,36482,36483,36484,36485,36486,36487,36488,36489,36490,36491,36492,36493,36494,36495,36496,36497,36498,36499,36500,36501,36502,36503,36504,36505,36506,36507,36508,36509,36510,36511,36512,36513,36514,36515,36516,36517,36518,36519,36520,36521,36522,36523,36524,36525,36526,36527,36528,36529,36530,36531,36532,36533,36534,36535,36536,36537,36538,36539,36540,36541,36542,36543,36544,36545,36546,36547,36548,36549,36550,36551,36552,36553,36554,36555,36556,36557,36558,36559,36560,36561,36562,36563,36564,36565,36566,36567,36568,36569,36570,36571,36572,36573,36574,36575,36576,36577,36578,36579,36580,36581,36582,36583,36584,36585,36586,36587,36588,36589,36590,36591,36592,36593,36594,36595,36596,36597,36598,36599,36600,36601,36602,36603,36604,36605,36606,36607,36608,36609,36610,36611,36612,36613,36614,36615,36616,36617,36618,36619,36620,36621,36622,36623,36624,36625,36626,36627,36628,36629,36630,36631,36632,36633,36634,36635,36636,36637,36638,36639,36640,36641,36642,36643,36644,36645,36646,36647,36648,36649,36650,36651,36652,36653,36654,36655,36656,36657,36658,36659,36660,36661,36662,36663,36664,36665,36666,36667,36668,36669,36670,36671,36672,36673,36674,36675,36676,36677,36678,36679,36680,36681,36682,36683,36684,36685,36686,36687,36688,36689,36690,36691,36692,36693,36694,36695,36696,36697,36698,36699,36700,36701,36702,36703,36704,36705,36706,36707,36708,36709,36710,36711,36712,36713,36714,36715,36716,36717,36718,36719,36720,36721,36722,36723,36724,36725,36726,36727,36728,36729,36730,36731,36732,36733,36734,36735,36736,36737,36738,36739,36740,36741,36742,36743,36744,36745,36746,36747,36748,36749,36750,36751,36752,36753,36754,36755,36756,36757,36758,36759,36760,36761,36762,36763,36764,36765,36766,36767,36768,36769,36770,36771,36772,36773,36774,36775,36776,36777,36778,36779,36780,36781,36782,36783,36784,36785,36786,36787,36788,36789,36790,36791,36792,36793,36794,36795,36796,36797,36798,36799,36800,36801,36802,36803,36804,36805,36806,36807,36808,36809,36810,36811,36812,36813,36814,36815,36816,36817,36818,36819,36820,36821,36822,36823,36824,36825,36826,36827,36828,36829,36830,36831,36832,36833,36834,36835,36836,36837,36838,36839,36840,36841,36842,36843,36844,36845,36846,36847,36848,36849,36850,36851,36852,36853,36854,36855,36856,36857,36858,36859,36860,36861,36862,36863,36864,36865,36866,36867,36868,36869,36870,36871,36872,36873,36874,36875,36876,36877,36878,36879,36880,36881,36882,36883,36884,36885,36886,36887,36888,36889,36890,36891,36892,36893,36894,36895,36896,36897,36898,36899,36900,36901,36902,36903,36904,36905,36906,36907,36908,36909,36910,36911,36912,36913,36914,36915,36916,36917,36918,36919,36920,36921,36922,36923,36924,36925,36926,36927,36928,36929,36930,36931,36932,36933,36934,36935,36936,36937,36938,36939,36940,36941,36942,36943,36944,36945,36946,36947,36948,36949,36950,36951,36952,36953,36954,36955,36956,36957,36958,36959,36960,36961,36962,36963,36964,36965,36966,36967,36968,36969,36970,36971,36972,36973,36974,36975,36976,36977,36978,36979,36980,36981,36982,36983,36984,36985,36986,36987,36988,36989,36990,36991,36992,36993,36994,36995,36996,36997,36998,36999,37000,37001,37002,37003,37004,37005,37006,37007,37008,37009,37010,37011,37012,37013,37014,37015,37016,37017,37018,37019,37020,37021,37022,37023,37024,37025,37026,37027,37028,37029,37030,37031,37032,37033,37034,37035,37036,37037,37038,37039,37040,37041,37042,37043,37044,37045,37046,37047,37048,37049,37050,37051,37052,37053,37054,37055,37056,37057,37058,37059,37060,37061,37062,37063,37064,37065,37066,37067,37068,37069,37070,37071,37072,37073,37074,37075,37076,37077,37078,37079,37080,37081,37082,37083,37084,37085,37086,37087,37088,37089,37090,37091,37092,37093,37094,37095,37096,37097,37098,37099,37100,37101,37102,37103,37104,37105,37106,37107,37108,37109,37110,37111,37112,37113,37114,37115,37116,37117,37118,37119,37120,37121,37122,37123,37124,37125,37126,37127,37128,37129,37130,37131,37132,37133,37134,37135,37136,37137,37138,37139,37140,37141,37142,37143,37144,37145,37146,37147,37148,37149,37150,37151,37152,37153,37154,37155,37156,37157,37158,37159,37160,37161,37162,37163,37164,37165,37166,37167,37168,37169,37170,37171,37172,37173,37174,37175,37176,37177,37178,37179,37180,37181,37182,37183,37184,37185,37186,37187,37188,37189,37190,37191,37192,37193,37194,37195,37196,37197,37198,37199,37200,37201,37202,37203,37204,37205,37206,37207,37208,37209,37210,37211,37212,37213,37214,37215,37216,37217,37218,37219,37220,37221,37222,37223,37224,37225,37226,37227,37228,37229,37230,37231,37232,37233,37234,37235,37236,37237,37238,37239,37240,37241,37242,37243,37244,37245,37246,37247,37248,37249,37250,37251,37252,37253,37254,37255,37256,37257,37258,37259,37260,37261,37262,37263,37264,37265,37266,37267,37268,37269,37270,37271,37272,37273,37274,37275,37276,37277,37278,37279,37280,37281,37282,37283,37284,37285,37286,37287,37288,37289,37290,37291,37292,37293,37294,37295,37296,37297,37298,37299,37300,37301,37302,37303,37304,37305,37306,37307,37308,37309,37310,37311,37312,37313,37314,37315,37316,37317,37318,37319,37320,37321,37322,37323,37324,37325,37326,37327,37328,37329,37330,37331,37332,37333,37334,37335,37336,37337,37338,37339,37340,37341,37342,37343,37344,37345,37346,37347,37348,37349,37350,37351,37352,37353,37354,37355,37356,37357,37358,37359,37360,37361,37362,37363,37364,37365,37366,37367,37368,37369,37370,37371,37372,37373,37374,37375,37376,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37387,37388,37389,37390,37391,37392,37393,37394,37395,37396,37397,37398,37399,37400,37401,37402,37403,37404,37405,37406,37407,37408,37409,37410,37411,37412,37413,37414,37415,37416,37417,37418,37419,37420,37421,37422,37423,37424,37425,37426,37427,37428,37429,37430,37431,37432,37433,37434,37435,37436,37437,37438,37439,37440,37441,37442,37443,37444,37445,37446,37447,37448,37449,37450,37451,37452,37453,37454,37455,37456,37457,37458,37459,37460,37461,37462,37463,37464,37465,37466,37467,37468,37469,37470,37471,37472,37473,37474,37475,37476,37477,37478,37479,37480,37481,37482,37483,37484,37485,37486,37487,37488,37489,37490,37491,37492,37493,37494,37495,37496,37497,37498,37499,37500,37501,37502,37503,37504,37505,37506,37507,37508,37509,37510,37511,37512,37513,37514,37515,37516,37517,37518,37519,37520,37521,37522,37523,37524,37525,37526,37527,37528,37529,37530,37531,37532,37533,37534,37535,37536,37537,37538,37539,37540,37541,37542,37543,37544,37545,37546,37547,37548,37549,37550,37551,37552,37553,37554,37555,37556,37557,37558,37559,37560,37561,37562,37563,37564,37565,37566,37567,37568,37569,37570,37571,37572,37573,37574,37575,37576,37577,37578,37579,37580,37581,37582,37583,37584,37585,37586,37587,37588,37589,37590,37591,37592,37593,37594,37595,37596,37597,37598,37599,37600,37601,37602,37603,37604,37605,37606,37607,37608,37609,37610,37611,37612,37613,37614,37615,37616,37617,37618,37619,37620,37621,37622,37623,37624,37625,37626,37627,37628,37629,37630,37631,37632,37633,37634,37635,37636,37637,37638,37639,37640,37641,37642,37643,37644,37645,37646,37647,37648,37649,37650,37651,37652,37653,37654,37655,37656,37657,37658,37659,37660,37661,37662,37663,37664,37665,37666,37667,37668,37669,37670,37671,37672,37673,37674,37675,37676,37677,37678,37679,37680,37681,37682,37683,37684,37685,37686,37687,37688,37689,37690,37691,37692,37693,37694,37695,37696,37697,37698,37699,37700,37701,37702,37703,37704,37705,37706,37707,37708,37709,37710,37711,37712,37713,37714,37715,37716,37717,37718,37719,37720,37721,37722,37723,37724,37725,37726,37727,37728,37729,37730,37731,37732,37733,37734,37735,37736,37737,37738,37739,37740,37741,37742,37743,37744,37745,37746,37747,37748,37749,37750,37751,37752,37753,37754,37755,37756,37757,37758,37759,37760,37761,37762,37763,37764,37765,37766,37767,37768,37769,37770,37771,37772,37773,37774,37775,37776,37777,37778,37779,37780,37781,37782,37783,37784,37785,37786,37787,37788,37789,37790,37791,37792,37793,37794,37795,37796,37797,37798,37799,37800,37801,37802,37803,37804,37805,37806,37807,37808,37809,37810,37811,37812,37813,37814,37815,37816,37817,37818,37819,37820,37821,37822,37823,37824,37825,37826,37827,37828,37829,37830,37831,37832,37833,37834,37835,37836,37837,37838,37839,37840,37841,37842,37843,37844,37845,37846,37847,37848,37849,37850,37851,37852,37853,37854,37855,37856,37857,37858,37859,37860,37861,37862,37863,37864,37865,37866,37867,37868,37869,37870,37871,37872,37873,37874,37875,37876,37877,37878,37879,37880,37881,37882,37883,37884,37885,37886,37887,37888,37889,37890,37891,37892,37893,37894,37895,37896,37897,37898,37899,37900,37901,37902,37903,37904,37905,37906,37907,37908,37909,37910,37911,37912,37913,37914,37915,37916,37917,37918,37919,37920,37921,37922,37923,37924,37925,37926,37927,37928,37929,37930,37931,37932,37933,37934,37935,37936,37937,37938,37939,37940,37941,37942,37943,37944,37945,37946,37947,37948,37949,37950,37951,37952,37953,37954,37955,37956,37957,37958,37959,37960,37961,37962,37963,37964,37965,37966,37967,37968,37969,37970,37971,37972,37973,37974,37975,37976,37977,37978,37979,37980,37981,37982,37983,37984,37985,37986,37987,37988,37989,37990,37991,37992,37993,37994,37995,37996,37997,37998,37999,38000,38001,38002,38003,38004,38005,38006,38007,38008,38009,38010,38011,38012,38013,38014,38015,38016,38017,38018,38019,38020,38021,38022,38023,38024,38025,38026,38027,38028,38029,38030,38031,38032,38033,38034,38035,38036,38037,38038,38039,38040,38041,38042,38043,38044,38045,38046,38047,38048,38049,38050,38051,38052,38053,38054,38055,38056,38057,38058,38059,38060,38061,38062,38063,38064,38065,38066,38067,38068,38069,38070,38071,38072,38073,38074,38075,38076,38077,38078,38079,38080,38081,38082,38083,38084,38085,38086,38087,38088,38089,38090,38091,38092,38093,38094,38095,38096,38097,38098,38099,38100,38101,38102,38103,38104,38105,38106,38107,38108,38109,38110,38111,38112,38113,38114,38115,38116,38117,38118,38119,38120,38121,38122,38123,38124,38125,38126,38127,38128,38129,38130,38131,38132,38133,38134,38135,38136,38137,38138,38139,38140,38141,38142,38143,38144,38145,38146,38147,38148,38149,38150,38151,38152,38153,38154,38155,38156,38157,38158,38159,38160,38161,38162,38163,38164,38165,38166,38167,38168,38169,38170,38171,38172,38173,38174,38175,38176,38177,38178,38179,38180,38181,38182,38183,38184,38185,38186,38187,38188,38189,38190,38191,38192,38193,38194,38195,38196,38197,38198,38199,38200,38201,38202,38203,38204,38205,38206,38207,38208,38209,38210,38211,38212,38213,38214,38215,38216,38217,38218,38219,38220,38221,38222,38223,38224,38225,38226,38227,38228,38229,38230,38231,38232,38233,38234,38235,38236,38237,38238,38239,38240,38241,38242,38243,38244,38245,38246,38247,38248,38249,38250,38251,38252,38253,38254,38255,38256,38257,38258,38259,38260,38261,38262,38263,38264,38265,38266,38267,38268,38269,38270,38271,38272,38273,38274,38275,38276,38277,38278,38279,38280,38281,38282,38283,38284,38285,38286,38287,38288,38289,38290,38291,38292,38293,38294,38295,38296,38297,38298,38299,38300,38301,38302,38303,38304,38305,38306,38307,38308,38309,38310,38311,38312,38313,38314,38315,38316,38317,38318,38319,38320,38321,38322,38323,38324,38325,38326,38327,38328,38329,38330,38331,38332,38333,38334,38335,38336,38337,38338,38339,38340,38341,38342,38343,38344,38345,38346,38347,38348,38349,38350,38351,38352,38353,38354,38355,38356,38357,38358,38359,38360,38361,38362,38363,38364,38365,38366,38367,38368,38369,38370,38371,38372,38373,38374,38375,38376,38377,38378,38379,38380,38381,38382,38383,38384,38385,38386,38387,38388,38389,38390,38391,38392,38393,38394,38395,38396,38397,38398,38399,38400,38401,38402,38403,38404,38405,38406,38407,38408,38409,38410,38411,38412,38413,38414,38415,38416,38417,38418,38419,38420,38421,38422,38423,38424,38425,38426,38427,38428,38429,38430,38431,38432,38433,38434,38435,38436,38437,38438,38439,38440,38441,38442,38443,38444,38445,38446,38447,38448,38449,38450,38451,38452,38453,38454,38455,38456,38457,38458,38459,38460,38461,38462,38463,38464,38465,38466,38467,38468,38469,38470,38471,38472,38473,38474,38475,38476,38477,38478,38479,38480,38481,38482,38483,38484,38485,38486,38487,38488,38489,38490,38491,38492,38493,38494,38495,38496,38497,38498,38499,38500,38501,38502,38503,38504,38505,38506,38507,38508,38509,38510,38511,38512,38513,38514,38515,38516,38517,38518,38519,38520,38521,38522,38523,38524,38525,38526,38527,38528,38529,38530,38531,38532,38533,38534,38535,38536,38537,38538,38539,38540,38541,38542,38543,38544,38545,38546,38547,38548,38549,38550,38551,38552,38553,38554,38555,38556,38557,38558,38559,38560,38561,38562,38563,38564,38565,38566,38567,38568,38569,38570,38571,38572,38573,38574,38575,38576,38577,38578,38579,38580,38581,38582,38583,38584,38585,38586,38587,38588,38589,38590,38591,38592,38593,38594,38595,38596,38597,38598,38599,38600,38601,38602,38603,38604,38605,38606,38607,38608,38609,38610,38611,38612,38613,38614,38615,38616,38617,38618,38619,38620,38621,38622,38623,38624,38625,38626,38627,38628,38629,38630,38631,38632,38633,38634,38635,38636,38637,38638,38639,38640,38641,38642,38643,38644,38645,38646,38647,38648,38649,38650,38651,38652,38653,38654,38655,38656,38657,38658,38659,38660,38661,38662,38663,38664,38665,38666,38667,38668,38669,38670,38671,38672,38673,38674,38675,38676,38677,38678,38679,38680,38681,38682,38683,38684,38685,38686,38687,38688,38689,38690,38691,38692,38693,38694,38695,38696,38697,38698,38699,38700,38701,38702,38703,38704,38705,38706,38707,38708,38709,38710,38711,38712,38713,38714,38715,38716,38717,38718,38719,38720,38721,38722,38723,38724,38725,38726,38727,38728,38729,38730,38731,38732,38733,38734,38735,38736,38737,38738,38739,38740,38741,38742,38743,38744,38745,38746,38747,38748,38749,38750,38751,38752,38753,38754,38755,38756,38757,38758,38759,38760,38761,38762,38763,38764,38765,38766,38767,38768,38769,38770,38771,38772,38773,38774,38775,38776,38777,38778,38779,38780,38781,38782,38783,38784,38785,38786,38787,38788,38789,38790,38791,38792,38793,38794,38795,38796,38797,38798,38799,38800,38801,38802,38803,38804,38805,38806,38807,38808,38809,38810,38811,38812,38813,38814,38815,38816,38817,38818,38819,38820,38821,38822,38823,38824,38825,38826,38827,38828,38829,38830,38831,38832,38833,38834,38835,38836,38837,38838,38839,38840,38841,38842,38843,38844,38845,38846,38847,38848,38849,38850,38851,38852,38853,38854,38855,38856,38857,38858,38859,38860,38861,38862,38863,38864,38865,38866,38867,38868,38869,38870,38871,38872,38873,38874,38875,38876,38877,38878,38879,38880,38881,38882,38883,38884,38885,38886,38887,38888,38889,38890,38891,38892,38893,38894,38895,38896,38897,38898,38899,38900,38901,38902,38903,38904,38905,38906,38907,38908,38909,38910,38911,38912,38913,38914,38915,38916,38917,38918,38919,38920,38921,38922,38923,38924,38925,38926,38927,38928,38929,38930,38931,38932,38933,38934,38935,38936,38937,38938,38939,38940,38941,38942,38943,38944,38945,38946,38947,38948,38949,38950,38951,38952,38953,38954,38955,38956,38957,38958,38959,38960,38961,38962,38963,38964,38965,38966,38967,38968,38969,38970,38971,38972,38973,38974,38975,38976,38977,38978,38979,38980,38981,38982,38983,38984,38985,38986,38987,38988,38989,38990,38991,38992,38993,38994,38995,38996,38997,38998,38999,39000,39001,39002,39003,39004,39005,39006,39007,39008,39009,39010,39011,39012,39013,39014,39015,39016,39017,39018,39019,39020,39021,39022,39023,39024,39025,39026,39027,39028,39029,39030,39031,39032,39033,39034,39035,39036,39037,39038,39039,39040,39041,39042,39043,39044,39045,39046,39047,39048,39049,39050,39051,39052,39053,39054,39055,39056,39057,39058,39059,39060,39061,39062,39063,39064,39065,39066,39067,39068,39069,39070,39071,39072,39073,39074,39075,39076,39077,39078,39079,39080,39081,39082,39083,39084,39085,39086,39087,39088,39089,39090,39091,39092,39093,39094,39095,39096,39097,39098,39099,39100,39101,39102,39103,39104,39105,39106,39107,39108,39109,39110,39111,39112,39113,39114,39115,39116,39117,39118,39119,39120,39121,39122,39123,39124,39125,39126,39127,39128,39129,39130,39131,39132,39133,39134,39135,39136,39137,39138,39139,39140,39141,39142,39143,39144,39145,39146,39147,39148,39149,39150,39151,39152,39153,39154,39155,39156,39157,39158,39159,39160,39161,39162,39163,39164,39165,39166,39167,39168,39169,39170,39171,39172,39173,39174,39175,39176,39177,39178,39179,39180,39181,39182,39183,39184,39185,39186,39187,39188,39189,39190,39191,39192,39193,39194,39195,39196,39197,39198,39199,39200,39201,39202,39203,39204,39205,39206,39207,39208,39209,39210,39211,39212,39213,39214,39215,39216,39217,39218,39219,39220,39221,39222,39223,39224,39225,39226,39227,39228,39229,39230,39231,39232,39233,39234,39235,39236,39237,39238,39239,39240,39241,39242,39243,39244,39245,39246,39247,39248,39249,39250,39251,39252,39253,39254,39255,39256,39257,39258,39259,39260,39261,39262,39263,39264,39265,39266,39267,39268,39269,39270,39271,39272,39273,39274,39275,39276,39277,39278,39279,39280,39281,39282,39283,39284,39285,39286,39287,39288,39289,39290,39291,39292,39293,39294,39295,39296,39297,39298,39299,39300,39301,39302,39303,39304,39305,39306,39307,39308,39309,39310,39311,39312,39313,39314,39315,39316,39317,39318,39319,39320,39321,39322,39323,39324,39325,39326,39327,39328,39329,39330,39331,39332,39333,39334,39335,39336,39337,39338,39339,39340,39341,39342,39343,39344,39345,39346,39347,39348,39349,39350,39351,39352,39353,39354,39355,39356,39357,39358,39359,39360,39361,39362,39363,39364,39365,39366,39367,39368,39369,39370,39371,39372,39373,39374,39375,39376,39377,39378,39379,39380,39381,39382,39383,39384,39385,39386,39387,39388,39389,39390,39391,39392,39393,39394,39395,39396,39397,39398,39399,39400,39401,39402,39403,39404,39405,39406,39407,39408,39409,39410,39411,39412,39413,39414,39415,39416,39417,39418,39419,39420,39421,39422,39423,39424,39425,39426,39427,39428,39429,39430,39431,39432,39433,39434,39435,39436,39437,39438,39439,39440,39441,39442,39443,39444,39445,39446,39447,39448,39449,39450,39451,39452,39453,39454,39455,39456,39457,39458,39459,39460,39461,39462,39463,39464,39465,39466,39467,39468,39469,39470,39471,39472,39473,39474,39475,39476,39477,39478,39479,39480,39481,39482,39483,39484,39485,39486,39487,39488,39489,39490,39491,39492,39493,39494,39495,39496,39497,39498,39499,39500,39501,39502,39503,39504,39505,39506,39507,39508,39509,39510,39511,39512,39513,39514,39515,39516,39517,39518,39519,39520,39521,39522,39523,39524,39525,39526,39527,39528,39529,39530,39531,39532,39533,39534,39535,39536,39537,39538,39539,39540,39541,39542,39543,39544,39545,39546,39547,39548,39549,39550,39551,39552,39553,39554,39555,39556,39557,39558,39559,39560,39561,39562,39563,39564,39565,39566,39567,39568,39569,39570,39571,39572,39573,39574,39575,39576,39577,39578,39579,39580,39581,39582,39583,39584,39585,39586,39587,39588,39589,39590,39591,39592,39593,39594,39595,39596,39597,39598,39599,39600,39601,39602,39603,39604,39605,39606,39607,39608,39609,39610,39611,39612,39613,39614,39615,39616,39617,39618,39619,39620,39621,39622,39623,39624,39625,39626,39627,39628,39629,39630,39631,39632,39633,39634,39635,39636,39637,39638,39639,39640,39641,39642,39643,39644,39645,39646,39647,39648,39649,39650,39651,39652,39653,39654,39655,39656,39657,39658,39659,39660,39661,39662,39663,39664,39665,39666,39667,39668,39669,39670,39671,39672,39673,39674,39675,39676,39677,39678,39679,39680,39681,39682,39683,39684,39685,39686,39687,39688,39689,39690,39691,39692,39693,39694,39695,39696,39697,39698,39699,39700,39701,39702,39703,39704,39705,39706,39707,39708,39709,39710,39711,39712,39713,39714,39715,39716,39717,39718,39719,39720,39721,39722,39723,39724,39725,39726,39727,39728,39729,39730,39731,39732,39733,39734,39735,39736,39737,39738,39739,39740,39741,39742,39743,39744,39745,39746,39747,39748,39749,39750,39751,39752,39753,39754,39755,39756,39757,39758,39759,39760,39761,39762,39763,39764,39765,39766,39767,39768,39769,39770,39771,39772,39773,39774,39775,39776,39777,39778,39779,39780,39781,39782,39783,39784,39785,39786,39787,39788,39789,39790,39791,39792,39793,39794,39795,39796,39797,39798,39799,39800,39801,39802,39803,39804,39805,39806,39807,39808,39809,39810,39811,39812,39813,39814,39815,39816,39817,39818,39819,39820,39821,39822,39823,39824,39825,39826,39827,39828,39829,39830,39831,39832,39833,39834,39835,39836,39837,39838,39839,39840,39841,39842,39843,39844,39845,39846,39847,39848,39849,39850,39851,39852,39853,39854,39855,39856,39857,39858,39859,39860,39861,39862,39863,39864,39865,39866,39867,39868,39869,39870,39871,39872,39873,39874,39875,39876,39877,39878,39879,39880,39881,39882,39883,39884,39885,39886,39887,39888,39889,39890,39891,39892,39893,39894,39895,39896,39897,39898,39899,39900,39901,39902,39903,39904,39905,39906,39907,39908,39909,39910,39911,39912,39913,39914,39915,39916,39917,39918,39919,39920,39921,39922,39923,39924,39925,39926,39927,39928,39929,39930,39931,39932,39933,39934,39935,39936,39937,39938,39939,39940,39941,39942,39943,39944,39945,39946,39947,39948,39949,39950,39951,39952,39953,39954,39955,39956,39957,39958,39959,39960,39961,39962,39963,39964,39965,39966,39967,39968,39969,39970,39971,39972,39973,39974,39975,39976,39977,39978,39979,39980,39981,39982,39983,39984,39985,39986,39987,39988,39989,39990,39991,39992,39993,39994,39995,39996,39997,39998,39999,40000,40001,40002,40003,40004,40005,40006,40007,40008,40009,40010,40011,40012,40013,40014,40015,40016,40017,40018,40019,40020,40021,40022,40023,40024,40025,40026,40027,40028,40029,40030,40031,40032,40033,40034,40035,40036,40037,40038,40039,40040,40041,40042,40043,40044,40045,40046,40047,40048,40049,40050,40051,40052,40053,40054,40055,40056,40057,40058,40059,40060,40061,40062,40063,40064,40065,40066,40067,40068,40069,40070,40071,40072,40073,40074,40075,40076,40077,40078,40079,40080,40081,40082,40083,40084,40085,40086,40087,40088,40089,40090,40091,40092,40093,40094,40095,40096,40097,40098,40099,40100,40101,40102,40103,40104,40105,40106,40107,40108,40109,40110,40111,40112,40113,40114,40115,40116,40117,40118,40119,40120,40121,40122,40123,40124,40125,40126,40127,40128,40129,40130,40131,40132,40133,40134,40135,40136,40137,40138,40139,40140,40141,40142,40143,40144,40145,40146,40147,40148,40149,40150,40151,40152,40153,40154,40155,40156,40157,40158,40159,40160,40161,40162,40163,40164,40165,40166,40167,40168,40169,40170,40171,40172,40173,40174,40175,40176,40177,40178,40179,40180,40181,40182,40183,40184,40185,40186,40187,40188,40189,40190,40191,40192,40193,40194,40195,40196,40197,40198,40199,40200,40201,40202,40203,40204,40205,40206,40207,40208,40209,40210,40211,40212,40213,40214,40215,40216,40217,40218,40219,40220,40221,40222,40223,40224,40225,40226,40227,40228,40229,40230,40231,40232,40233,40234,40235,40236,40237,40238,40239,40240,40241,40242,40243,40244,40245,40246,40247,40248,40249,40250,40251,40252,40253,40254,40255,40256,40257,40258,40259,40260,40261,40262,40263,40264,40265,40266,40267,40268,40269,40270,40271,40272,40273,40274,40275,40276,40277,40278,40279,40280,40281,40282,40283,40284,40285,40286,40287,40288,40289,40290,40291,40292,40293,40294,40295,40296,40297,40298,40299,40300,40301,40302,40303,40304,40305,40306,40307,40308,40309,40310,40311,40312,40313,40314,40315,40316,40317,40318,40319,40320,40321,40322,40323,40324,40325,40326,40327,40328,40329,40330,40331,40332,40333,40334,40335,40336,40337,40338,40339,40340,40341,40342,40343,40344,40345,40346,40347,40348,40349,40350,40351,40352,40353,40354,40355,40356,40357,40358,40359,40360,40361,40362,40363,40364,40365,40366,40367,40368,40369,40370,40371,40372,40373,40374,40375,40376,40377,40378,40379,40380,40381,40382,40383,40384,40385,40386,40387,40388,40389,40390,40391,40392,40393,40394,40395,40396,40397,40398,40399,40400,40401,40402,40403,40404,40405,40406,40407,40408,40409,40410,40411,40412,40413,40414,40415,40416,40417,40418,40419,40420,40421,40422,40423,40424,40425,40426,40427,40428,40429,40430,40431,40432,40433,40434,40435,40436,40437,40438,40439,40440,40441,40442,40443,40444,40445,40446,40447,40448,40449,40450,40451,40452,40453,40454,40455,40456,40457,40458,40459,40460,40461,40462,40463,40464,40465,40466,40467,40468,40469,40470,40471,40472,40473,40474,40475,40476,40477,40478,40479,40480,40481,40482,40483,40484,40485,40486,40487,40488,40489,40490,40491,40492,40493,40494,40495,40496,40497,40498,40499,40500,40501,40502,40503,40504,40505,40506,40507,40508,40509,40510,40511,40512,40513,40514,40515,40516,40517,40518,40519,40520,40521,40522,40523,40524,40525,40526,40527,40528,40529,40530,40531,40532,40533,40534,40535,40536,40537,40538,40539,40540,40541,40542,40543,40544,40545,40546,40547,40548,40549,40550,40551,40552,40553,40554,40555,40556,40557,40558,40559,40560,40561,40562,40563,40564,40565,40566,40567,40568,40569,40570,40571,40572,40573,40574,40575,40576,40577,40578,40579,40580,40581,40582,40583,40584,40585,40586,40587,40588,40589,40590,40591,40592,40593,40594,40595,40596,40597,40598,40599,40600,40601,40602,40603,40604,40605,40606,40607,40608,40609,40610,40611,40612,40613,40614,40615,40616,40617,40618,40619,40620,40621,40622,40623,40624,40625,40626,40627,40628,40629,40630,40631,40632,40633,40634,40635,40636,40637,40638,40639,40640,40641,40642,40643,40644,40645,40646,40647,40648,40649,40650,40651,40652,40653,40654,40655,40656,40657,40658,40659,40660,40661,40662,40663,40664,40665,40666,40667,40668,40669,40670,40671,40672,40673,40674,40675,40676,40677,40678,40679,40680,40681,40682,40683,40684,40685,40686,40687,40688,40689,40690,40691,40692,40693,40694,40695,40696,40697,40698,40699,40700,40701,40702,40703,40704,40705,40706,40707,40708,40709,40710,40711,40712,40713,40714,40715,40716,40717,40718,40719,40720,40721,40722,40723,40724,40725,40726,40727,40728,40729,40730,40731,40732,40733,40734,40735,40736,40737,40738,40739,40740,40741,40742,40743,40744,40745,40746,40747,40748,40749,40750,40751,40752,40753,40754,40755,40756,40757,40758,40759,40760,40761,40762,40763,40764,40765,40766,40767,40768,40769,40770,40771,40772,40773,40774,40775,40776,40777,40778,40779,40780,40781,40782,40783,40784,40785,40786,40787,40788,40789,40790,40791,40792,40793,40794,40795,40796,40797,40798,40799,40800,40801,40802,40803,40804,40805,40806,40807,40808,40809,40810,40811,40812,40813,40814,40815,40816,40817,40818,40819,40820,40821,40822,40823,40824,40825,40826,40827,40828,40829,40830,40831,40832,40833,40834,40835,40836,40837,40838,40839,40840,40841,40842,40843,40844,40845,40846,40847,40848,40849,40850,40851,40852,40853,40854,40855,40856,40857,40858,40859,40860,40861,40862,40863,40864,40865,40866,40867,40868,40869,40870,40871,40872,40873,40874,40875,40876,40877,40878,40879,40880,40881,40882,40883,40884,40885,40886,40887,40888,40889,40890,40891,40892,40893,40894,40895,40896,40897,40898,40899,40900,40901,40902,40903,40904,40905,40906,40907,40908,40909,40910,40911,40912,40913,40914,40915,40916,40917,40918,40919,40920,40921,40922,40923,40924,40925,40926,40927,40928,40929,40930,40931,40932,40933,40934,40935,40936,40937,40938,40939,40940,40941,40942,40943,40960,40961,40962,40963,40964,40965,40966,40967,40968,40969,40970,40971,40972,40973,40974,40975,40976,40977,40978,40979,40980,40981,40982,40983,40984,40985,40986,40987,40988,40989,40990,40991,40992,40993,40994,40995,40996,40997,40998,40999,41000,41001,41002,41003,41004,41005,41006,41007,41008,41009,41010,41011,41012,41013,41014,41015,41016,41017,41018,41019,41020,41021,41022,41023,41024,41025,41026,41027,41028,41029,41030,41031,41032,41033,41034,41035,41036,41037,41038,41039,41040,41041,41042,41043,41044,41045,41046,41047,41048,41049,41050,41051,41052,41053,41054,41055,41056,41057,41058,41059,41060,41061,41062,41063,41064,41065,41066,41067,41068,41069,41070,41071,41072,41073,41074,41075,41076,41077,41078,41079,41080,41081,41082,41083,41084,41085,41086,41087,41088,41089,41090,41091,41092,41093,41094,41095,41096,41097,41098,41099,41100,41101,41102,41103,41104,41105,41106,41107,41108,41109,41110,41111,41112,41113,41114,41115,41116,41117,41118,41119,41120,41121,41122,41123,41124,41125,41126,41127,41128,41129,41130,41131,41132,41133,41134,41135,41136,41137,41138,41139,41140,41141,41142,41143,41144,41145,41146,41147,41148,41149,41150,41151,41152,41153,41154,41155,41156,41157,41158,41159,41160,41161,41162,41163,41164,41165,41166,41167,41168,41169,41170,41171,41172,41173,41174,41175,41176,41177,41178,41179,41180,41181,41182,41183,41184,41185,41186,41187,41188,41189,41190,41191,41192,41193,41194,41195,41196,41197,41198,41199,41200,41201,41202,41203,41204,41205,41206,41207,41208,41209,41210,41211,41212,41213,41214,41215,41216,41217,41218,41219,41220,41221,41222,41223,41224,41225,41226,41227,41228,41229,41230,41231,41232,41233,41234,41235,41236,41237,41238,41239,41240,41241,41242,41243,41244,41245,41246,41247,41248,41249,41250,41251,41252,41253,41254,41255,41256,41257,41258,41259,41260,41261,41262,41263,41264,41265,41266,41267,41268,41269,41270,41271,41272,41273,41274,41275,41276,41277,41278,41279,41280,41281,41282,41283,41284,41285,41286,41287,41288,41289,41290,41291,41292,41293,41294,41295,41296,41297,41298,41299,41300,41301,41302,41303,41304,41305,41306,41307,41308,41309,41310,41311,41312,41313,41314,41315,41316,41317,41318,41319,41320,41321,41322,41323,41324,41325,41326,41327,41328,41329,41330,41331,41332,41333,41334,41335,41336,41337,41338,41339,41340,41341,41342,41343,41344,41345,41346,41347,41348,41349,41350,41351,41352,41353,41354,41355,41356,41357,41358,41359,41360,41361,41362,41363,41364,41365,41366,41367,41368,41369,41370,41371,41372,41373,41374,41375,41376,41377,41378,41379,41380,41381,41382,41383,41384,41385,41386,41387,41388,41389,41390,41391,41392,41393,41394,41395,41396,41397,41398,41399,41400,41401,41402,41403,41404,41405,41406,41407,41408,41409,41410,41411,41412,41413,41414,41415,41416,41417,41418,41419,41420,41421,41422,41423,41424,41425,41426,41427,41428,41429,41430,41431,41432,41433,41434,41435,41436,41437,41438,41439,41440,41441,41442,41443,41444,41445,41446,41447,41448,41449,41450,41451,41452,41453,41454,41455,41456,41457,41458,41459,41460,41461,41462,41463,41464,41465,41466,41467,41468,41469,41470,41471,41472,41473,41474,41475,41476,41477,41478,41479,41480,41481,41482,41483,41484,41485,41486,41487,41488,41489,41490,41491,41492,41493,41494,41495,41496,41497,41498,41499,41500,41501,41502,41503,41504,41505,41506,41507,41508,41509,41510,41511,41512,41513,41514,41515,41516,41517,41518,41519,41520,41521,41522,41523,41524,41525,41526,41527,41528,41529,41530,41531,41532,41533,41534,41535,41536,41537,41538,41539,41540,41541,41542,41543,41544,41545,41546,41547,41548,41549,41550,41551,41552,41553,41554,41555,41556,41557,41558,41559,41560,41561,41562,41563,41564,41565,41566,41567,41568,41569,41570,41571,41572,41573,41574,41575,41576,41577,41578,41579,41580,41581,41582,41583,41584,41585,41586,41587,41588,41589,41590,41591,41592,41593,41594,41595,41596,41597,41598,41599,41600,41601,41602,41603,41604,41605,41606,41607,41608,41609,41610,41611,41612,41613,41614,41615,41616,41617,41618,41619,41620,41621,41622,41623,41624,41625,41626,41627,41628,41629,41630,41631,41632,41633,41634,41635,41636,41637,41638,41639,41640,41641,41642,41643,41644,41645,41646,41647,41648,41649,41650,41651,41652,41653,41654,41655,41656,41657,41658,41659,41660,41661,41662,41663,41664,41665,41666,41667,41668,41669,41670,41671,41672,41673,41674,41675,41676,41677,41678,41679,41680,41681,41682,41683,41684,41685,41686,41687,41688,41689,41690,41691,41692,41693,41694,41695,41696,41697,41698,41699,41700,41701,41702,41703,41704,41705,41706,41707,41708,41709,41710,41711,41712,41713,41714,41715,41716,41717,41718,41719,41720,41721,41722,41723,41724,41725,41726,41727,41728,41729,41730,41731,41732,41733,41734,41735,41736,41737,41738,41739,41740,41741,41742,41743,41744,41745,41746,41747,41748,41749,41750,41751,41752,41753,41754,41755,41756,41757,41758,41759,41760,41761,41762,41763,41764,41765,41766,41767,41768,41769,41770,41771,41772,41773,41774,41775,41776,41777,41778,41779,41780,41781,41782,41783,41784,41785,41786,41787,41788,41789,41790,41791,41792,41793,41794,41795,41796,41797,41798,41799,41800,41801,41802,41803,41804,41805,41806,41807,41808,41809,41810,41811,41812,41813,41814,41815,41816,41817,41818,41819,41820,41821,41822,41823,41824,41825,41826,41827,41828,41829,41830,41831,41832,41833,41834,41835,41836,41837,41838,41839,41840,41841,41842,41843,41844,41845,41846,41847,41848,41849,41850,41851,41852,41853,41854,41855,41856,41857,41858,41859,41860,41861,41862,41863,41864,41865,41866,41867,41868,41869,41870,41871,41872,41873,41874,41875,41876,41877,41878,41879,41880,41881,41882,41883,41884,41885,41886,41887,41888,41889,41890,41891,41892,41893,41894,41895,41896,41897,41898,41899,41900,41901,41902,41903,41904,41905,41906,41907,41908,41909,41910,41911,41912,41913,41914,41915,41916,41917,41918,41919,41920,41921,41922,41923,41924,41925,41926,41927,41928,41929,41930,41931,41932,41933,41934,41935,41936,41937,41938,41939,41940,41941,41942,41943,41944,41945,41946,41947,41948,41949,41950,41951,41952,41953,41954,41955,41956,41957,41958,41959,41960,41961,41962,41963,41964,41965,41966,41967,41968,41969,41970,41971,41972,41973,41974,41975,41976,41977,41978,41979,41980,41981,41982,41983,41984,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,41997,41998,41999,42000,42001,42002,42003,42004,42005,42006,42007,42008,42009,42010,42011,42012,42013,42014,42015,42016,42017,42018,42019,42020,42021,42022,42023,42024,42025,42026,42027,42028,42029,42030,42031,42032,42033,42034,42035,42036,42037,42038,42039,42040,42041,42042,42043,42044,42045,42046,42047,42048,42049,42050,42051,42052,42053,42054,42055,42056,42057,42058,42059,42060,42061,42062,42063,42064,42065,42066,42067,42068,42069,42070,42071,42072,42073,42074,42075,42076,42077,42078,42079,42080,42081,42082,42083,42084,42085,42086,42087,42088,42089,42090,42091,42092,42093,42094,42095,42096,42097,42098,42099,42100,42101,42102,42103,42104,42105,42106,42107,42108,42109,42110,42111,42112,42113,42114,42115,42116,42117,42118,42119,42120,42121,42122,42123,42124,42192,42193,42194,42195,42196,42197,42198,42199,42200,42201,42202,42203,42204,42205,42206,42207,42208,42209,42210,42211,42212,42213,42214,42215,42216,42217,42218,42219,42220,42221,42222,42223,42224,42225,42226,42227,42228,42229,42230,42231,42232,42233,42234,42235,42236,42237,42240,42241,42242,42243,42244,42245,42246,42247,42248,42249,42250,42251,42252,42253,42254,42255,42256,42257,42258,42259,42260,42261,42262,42263,42264,42265,42266,42267,42268,42269,42270,42271,42272,42273,42274,42275,42276,42277,42278,42279,42280,42281,42282,42283,42284,42285,42286,42287,42288,42289,42290,42291,42292,42293,42294,42295,42296,42297,42298,42299,42300,42301,42302,42303,42304,42305,42306,42307,42308,42309,42310,42311,42312,42313,42314,42315,42316,42317,42318,42319,42320,42321,42322,42323,42324,42325,42326,42327,42328,42329,42330,42331,42332,42333,42334,42335,42336,42337,42338,42339,42340,42341,42342,42343,42344,42345,42346,42347,42348,42349,42350,42351,42352,42353,42354,42355,42356,42357,42358,42359,42360,42361,42362,42363,42364,42365,42366,42367,42368,42369,42370,42371,42372,42373,42374,42375,42376,42377,42378,42379,42380,42381,42382,42383,42384,42385,42386,42387,42388,42389,42390,42391,42392,42393,42394,42395,42396,42397,42398,42399,42400,42401,42402,42403,42404,42405,42406,42407,42408,42409,42410,42411,42412,42413,42414,42415,42416,42417,42418,42419,42420,42421,42422,42423,42424,42425,42426,42427,42428,42429,42430,42431,42432,42433,42434,42435,42436,42437,42438,42439,42440,42441,42442,42443,42444,42445,42446,42447,42448,42449,42450,42451,42452,42453,42454,42455,42456,42457,42458,42459,42460,42461,42462,42463,42464,42465,42466,42467,42468,42469,42470,42471,42472,42473,42474,42475,42476,42477,42478,42479,42480,42481,42482,42483,42484,42485,42486,42487,42488,42489,42490,42491,42492,42493,42494,42495,42496,42497,42498,42499,42500,42501,42502,42503,42504,42505,42506,42507,42508,42512,42513,42514,42515,42516,42517,42518,42519,42520,42521,42522,42523,42524,42525,42526,42527,42538,42539,42560,42561,42562,42563,42564,42565,42566,42567,42568,42569,42570,42571,42572,42573,42574,42575,42576,42577,42578,42579,42580,42581,42582,42583,42584,42585,42586,42587,42588,42589,42590,42591,42592,42593,42594,42595,42596,42597,42598,42599,42600,42601,42602,42603,42604,42605,42606,42623,42624,42625,42626,42627,42628,42629,42630,42631,42632,42633,42634,42635,42636,42637,42638,42639,42640,42641,42642,42643,42644,42645,42646,42647,42648,42649,42650,42651,42652,42653,42656,42657,42658,42659,42660,42661,42662,42663,42664,42665,42666,42667,42668,42669,42670,42671,42672,42673,42674,42675,42676,42677,42678,42679,42680,42681,42682,42683,42684,42685,42686,42687,42688,42689,42690,42691,42692,42693,42694,42695,42696,42697,42698,42699,42700,42701,42702,42703,42704,42705,42706,42707,42708,42709,42710,42711,42712,42713,42714,42715,42716,42717,42718,42719,42720,42721,42722,42723,42724,42725,42726,42727,42728,42729,42730,42731,42732,42733,42734,42735,42775,42776,42777,42778,42779,42780,42781,42782,42783,42786,42787,42788,42789,42790,42791,42792,42793,42794,42795,42796,42797,42798,42799,42800,42801,42802,42803,42804,42805,42806,42807,42808,42809,42810,42811,42812,42813,42814,42815,42816,42817,42818,42819,42820,42821,42822,42823,42824,42825,42826,42827,42828,42829,42830,42831,42832,42833,42834,42835,42836,42837,42838,42839,42840,42841,42842,42843,42844,42845,42846,42847,42848,42849,42850,42851,42852,42853,42854,42855,42856,42857,42858,42859,42860,42861,42862,42863,42864,42865,42866,42867,42868,42869,42870,42871,42872,42873,42874,42875,42876,42877,42878,42879,42880,42881,42882,42883,42884,42885,42886,42887,42888,42891,42892,42893,42894,42895,42896,42897,42898,42899,42900,42901,42902,42903,42904,42905,42906,42907,42908,42909,42910,42911,42912,42913,42914,42915,42916,42917,42918,42919,42920,42921,42922,42923,42924,42925,42926,42927,42928,42929,42930,42931,42932,42933,42934,42935,42936,42937,42999,43000,43001,43002,43003,43004,43005,43006,43007,43008,43009,43011,43012,43013,43015,43016,43017,43018,43020,43021,43022,43023,43024,43025,43026,43027,43028,43029,43030,43031,43032,43033,43034,43035,43036,43037,43038,43039,43040,43041,43042,43072,43073,43074,43075,43076,43077,43078,43079,43080,43081,43082,43083,43084,43085,43086,43087,43088,43089,43090,43091,43092,43093,43094,43095,43096,43097,43098,43099,43100,43101,43102,43103,43104,43105,43106,43107,43108,43109,43110,43111,43112,43113,43114,43115,43116,43117,43118,43119,43120,43121,43122,43123,43138,43139,43140,43141,43142,43143,43144,43145,43146,43147,43148,43149,43150,43151,43152,43153,43154,43155,43156,43157,43158,43159,43160,43161,43162,43163,43164,43165,43166,43167,43168,43169,43170,43171,43172,43173,43174,43175,43176,43177,43178,43179,43180,43181,43182,43183,43184,43185,43186,43187,43250,43251,43252,43253,43254,43255,43259,43261,43262,43274,43275,43276,43277,43278,43279,43280,43281,43282,43283,43284,43285,43286,43287,43288,43289,43290,43291,43292,43293,43294,43295,43296,43297,43298,43299,43300,43301,43312,43313,43314,43315,43316,43317,43318,43319,43320,43321,43322,43323,43324,43325,43326,43327,43328,43329,43330,43331,43332,43333,43334,43360,43361,43362,43363,43364,43365,43366,43367,43368,43369,43370,43371,43372,43373,43374,43375,43376,43377,43378,43379,43380,43381,43382,43383,43384,43385,43386,43387,43388,43396,43397,43398,43399,43400,43401,43402,43403,43404,43405,43406,43407,43408,43409,43410,43411,43412,43413,43414,43415,43416,43417,43418,43419,43420,43421,43422,43423,43424,43425,43426,43427,43428,43429,43430,43431,43432,43433,43434,43435,43436,43437,43438,43439,43440,43441,43442,43471,43488,43489,43490,43491,43492,43494,43495,43496,43497,43498,43499,43500,43501,43502,43503,43514,43515,43516,43517,43518,43520,43521,43522,43523,43524,43525,43526,43527,43528,43529,43530,43531,43532,43533,43534,43535,43536,43537,43538,43539,43540,43541,43542,43543,43544,43545,43546,43547,43548,43549,43550,43551,43552,43553,43554,43555,43556,43557,43558,43559,43560,43584,43585,43586,43588,43589,43590,43591,43592,43593,43594,43595,43616,43617,43618,43619,43620,43621,43622,43623,43624,43625,43626,43627,43628,43629,43630,43631,43632,43633,43634,43635,43636,43637,43638,43642,43646,43647,43648,43649,43650,43651,43652,43653,43654,43655,43656,43657,43658,43659,43660,43661,43662,43663,43664,43665,43666,43667,43668,43669,43670,43671,43672,43673,43674,43675,43676,43677,43678,43679,43680,43681,43682,43683,43684,43685,43686,43687,43688,43689,43690,43691,43692,43693,43694,43695,43697,43701,43702,43705,43706,43707,43708,43709,43712,43714,43739,43740,43741,43744,43745,43746,43747,43748,43749,43750,43751,43752,43753,43754,43762,43763,43764,43777,43778,43779,43780,43781,43782,43785,43786,43787,43788,43789,43790,43793,43794,43795,43796,43797,43798,43808,43809,43810,43811,43812,43813,43814,43816,43817,43818,43819,43820,43821,43822,43824,43825,43826,43827,43828,43829,43830,43831,43832,43833,43834,43835,43836,43837,43838,43839,43840,43841,43842,43843,43844,43845,43846,43847,43848,43849,43850,43851,43852,43853,43854,43855,43856,43857,43858,43859,43860,43861,43862,43863,43864,43865,43866,43868,43869,43870,43871,43872,43873,43874,43875,43876,43877,43888,43889,43890,43891,43892,43893,43894,43895,43896,43897,43898,43899,43900,43901,43902,43903,43904,43905,43906,43907,43908,43909,43910,43911,43912,43913,43914,43915,43916,43917,43918,43919,43920,43921,43922,43923,43924,43925,43926,43927,43928,43929,43930,43931,43932,43933,43934,43935,43936,43937,43938,43939,43940,43941,43942,43943,43944,43945,43946,43947,43948,43949,43950,43951,43952,43953,43954,43955,43956,43957,43958,43959,43960,43961,43962,43963,43964,43965,43966,43967,43968,43969,43970,43971,43972,43973,43974,43975,43976,43977,43978,43979,43980,43981,43982,43983,43984,43985,43986,43987,43988,43989,43990,43991,43992,43993,43994,43995,43996,43997,43998,43999,44000,44001,44002,44032,44033,44034,44035,44036,44037,44038,44039,44040,44041,44042,44043,44044,44045,44046,44047,44048,44049,44050,44051,44052,44053,44054,44055,44056,44057,44058,44059,44060,44061,44062,44063,44064,44065,44066,44067,44068,44069,44070,44071,44072,44073,44074,44075,44076,44077,44078,44079,44080,44081,44082,44083,44084,44085,44086,44087,44088,44089,44090,44091,44092,44093,44094,44095,44096,44097,44098,44099,44100,44101,44102,44103,44104,44105,44106,44107,44108,44109,44110,44111,44112,44113,44114,44115,44116,44117,44118,44119,44120,44121,44122,44123,44124,44125,44126,44127,44128,44129,44130,44131,44132,44133,44134,44135,44136,44137,44138,44139,44140,44141,44142,44143,44144,44145,44146,44147,44148,44149,44150,44151,44152,44153,44154,44155,44156,44157,44158,44159,44160,44161,44162,44163,44164,44165,44166,44167,44168,44169,44170,44171,44172,44173,44174,44175,44176,44177,44178,44179,44180,44181,44182,44183,44184,44185,44186,44187,44188,44189,44190,44191,44192,44193,44194,44195,44196,44197,44198,44199,44200,44201,44202,44203,44204,44205,44206,44207,44208,44209,44210,44211,44212,44213,44214,44215,44216,44217,44218,44219,44220,44221,44222,44223,44224,44225,44226,44227,44228,44229,44230,44231,44232,44233,44234,44235,44236,44237,44238,44239,44240,44241,44242,44243,44244,44245,44246,44247,44248,44249,44250,44251,44252,44253,44254,44255,44256,44257,44258,44259,44260,44261,44262,44263,44264,44265,44266,44267,44268,44269,44270,44271,44272,44273,44274,44275,44276,44277,44278,44279,44280,44281,44282,44283,44284,44285,44286,44287,44288,44289,44290,44291,44292,44293,44294,44295,44296,44297,44298,44299,44300,44301,44302,44303,44304,44305,44306,44307,44308,44309,44310,44311,44312,44313,44314,44315,44316,44317,44318,44319,44320,44321,44322,44323,44324,44325,44326,44327,44328,44329,44330,44331,44332,44333,44334,44335,44336,44337,44338,44339,44340,44341,44342,44343,44344,44345,44346,44347,44348,44349,44350,44351,44352,44353,44354,44355,44356,44357,44358,44359,44360,44361,44362,44363,44364,44365,44366,44367,44368,44369,44370,44371,44372,44373,44374,44375,44376,44377,44378,44379,44380,44381,44382,44383,44384,44385,44386,44387,44388,44389,44390,44391,44392,44393,44394,44395,44396,44397,44398,44399,44400,44401,44402,44403,44404,44405,44406,44407,44408,44409,44410,44411,44412,44413,44414,44415,44416,44417,44418,44419,44420,44421,44422,44423,44424,44425,44426,44427,44428,44429,44430,44431,44432,44433,44434,44435,44436,44437,44438,44439,44440,44441,44442,44443,44444,44445,44446,44447,44448,44449,44450,44451,44452,44453,44454,44455,44456,44457,44458,44459,44460,44461,44462,44463,44464,44465,44466,44467,44468,44469,44470,44471,44472,44473,44474,44475,44476,44477,44478,44479,44480,44481,44482,44483,44484,44485,44486,44487,44488,44489,44490,44491,44492,44493,44494,44495,44496,44497,44498,44499,44500,44501,44502,44503,44504,44505,44506,44507,44508,44509,44510,44511,44512,44513,44514,44515,44516,44517,44518,44519,44520,44521,44522,44523,44524,44525,44526,44527,44528,44529,44530,44531,44532,44533,44534,44535,44536,44537,44538,44539,44540,44541,44542,44543,44544,44545,44546,44547,44548,44549,44550,44551,44552,44553,44554,44555,44556,44557,44558,44559,44560,44561,44562,44563,44564,44565,44566,44567,44568,44569,44570,44571,44572,44573,44574,44575,44576,44577,44578,44579,44580,44581,44582,44583,44584,44585,44586,44587,44588,44589,44590,44591,44592,44593,44594,44595,44596,44597,44598,44599,44600,44601,44602,44603,44604,44605,44606,44607,44608,44609,44610,44611,44612,44613,44614,44615,44616,44617,44618,44619,44620,44621,44622,44623,44624,44625,44626,44627,44628,44629,44630,44631,44632,44633,44634,44635,44636,44637,44638,44639,44640,44641,44642,44643,44644,44645,44646,44647,44648,44649,44650,44651,44652,44653,44654,44655,44656,44657,44658,44659,44660,44661,44662,44663,44664,44665,44666,44667,44668,44669,44670,44671,44672,44673,44674,44675,44676,44677,44678,44679,44680,44681,44682,44683,44684,44685,44686,44687,44688,44689,44690,44691,44692,44693,44694,44695,44696,44697,44698,44699,44700,44701,44702,44703,44704,44705,44706,44707,44708,44709,44710,44711,44712,44713,44714,44715,44716,44717,44718,44719,44720,44721,44722,44723,44724,44725,44726,44727,44728,44729,44730,44731,44732,44733,44734,44735,44736,44737,44738,44739,44740,44741,44742,44743,44744,44745,44746,44747,44748,44749,44750,44751,44752,44753,44754,44755,44756,44757,44758,44759,44760,44761,44762,44763,44764,44765,44766,44767,44768,44769,44770,44771,44772,44773,44774,44775,44776,44777,44778,44779,44780,44781,44782,44783,44784,44785,44786,44787,44788,44789,44790,44791,44792,44793,44794,44795,44796,44797,44798,44799,44800,44801,44802,44803,44804,44805,44806,44807,44808,44809,44810,44811,44812,44813,44814,44815,44816,44817,44818,44819,44820,44821,44822,44823,44824,44825,44826,44827,44828,44829,44830,44831,44832,44833,44834,44835,44836,44837,44838,44839,44840,44841,44842,44843,44844,44845,44846,44847,44848,44849,44850,44851,44852,44853,44854,44855,44856,44857,44858,44859,44860,44861,44862,44863,44864,44865,44866,44867,44868,44869,44870,44871,44872,44873,44874,44875,44876,44877,44878,44879,44880,44881,44882,44883,44884,44885,44886,44887,44888,44889,44890,44891,44892,44893,44894,44895,44896,44897,44898,44899,44900,44901,44902,44903,44904,44905,44906,44907,44908,44909,44910,44911,44912,44913,44914,44915,44916,44917,44918,44919,44920,44921,44922,44923,44924,44925,44926,44927,44928,44929,44930,44931,44932,44933,44934,44935,44936,44937,44938,44939,44940,44941,44942,44943,44944,44945,44946,44947,44948,44949,44950,44951,44952,44953,44954,44955,44956,44957,44958,44959,44960,44961,44962,44963,44964,44965,44966,44967,44968,44969,44970,44971,44972,44973,44974,44975,44976,44977,44978,44979,44980,44981,44982,44983,44984,44985,44986,44987,44988,44989,44990,44991,44992,44993,44994,44995,44996,44997,44998,44999,45000,45001,45002,45003,45004,45005,45006,45007,45008,45009,45010,45011,45012,45013,45014,45015,45016,45017,45018,45019,45020,45021,45022,45023,45024,45025,45026,45027,45028,45029,45030,45031,45032,45033,45034,45035,45036,45037,45038,45039,45040,45041,45042,45043,45044,45045,45046,45047,45048,45049,45050,45051,45052,45053,45054,45055,45056,45057,45058,45059,45060,45061,45062,45063,45064,45065,45066,45067,45068,45069,45070,45071,45072,45073,45074,45075,45076,45077,45078,45079,45080,45081,45082,45083,45084,45085,45086,45087,45088,45089,45090,45091,45092,45093,45094,45095,45096,45097,45098,45099,45100,45101,45102,45103,45104,45105,45106,45107,45108,45109,45110,45111,45112,45113,45114,45115,45116,45117,45118,45119,45120,45121,45122,45123,45124,45125,45126,45127,45128,45129,45130,45131,45132,45133,45134,45135,45136,45137,45138,45139,45140,45141,45142,45143,45144,45145,45146,45147,45148,45149,45150,45151,45152,45153,45154,45155,45156,45157,45158,45159,45160,45161,45162,45163,45164,45165,45166,45167,45168,45169,45170,45171,45172,45173,45174,45175,45176,45177,45178,45179,45180,45181,45182,45183,45184,45185,45186,45187,45188,45189,45190,45191,45192,45193,45194,45195,45196,45197,45198,45199,45200,45201,45202,45203,45204,45205,45206,45207,45208,45209,45210,45211,45212,45213,45214,45215,45216,45217,45218,45219,45220,45221,45222,45223,45224,45225,45226,45227,45228,45229,45230,45231,45232,45233,45234,45235,45236,45237,45238,45239,45240,45241,45242,45243,45244,45245,45246,45247,45248,45249,45250,45251,45252,45253,45254,45255,45256,45257,45258,45259,45260,45261,45262,45263,45264,45265,45266,45267,45268,45269,45270,45271,45272,45273,45274,45275,45276,45277,45278,45279,45280,45281,45282,45283,45284,45285,45286,45287,45288,45289,45290,45291,45292,45293,45294,45295,45296,45297,45298,45299,45300,45301,45302,45303,45304,45305,45306,45307,45308,45309,45310,45311,45312,45313,45314,45315,45316,45317,45318,45319,45320,45321,45322,45323,45324,45325,45326,45327,45328,45329,45330,45331,45332,45333,45334,45335,45336,45337,45338,45339,45340,45341,45342,45343,45344,45345,45346,45347,45348,45349,45350,45351,45352,45353,45354,45355,45356,45357,45358,45359,45360,45361,45362,45363,45364,45365,45366,45367,45368,45369,45370,45371,45372,45373,45374,45375,45376,45377,45378,45379,45380,45381,45382,45383,45384,45385,45386,45387,45388,45389,45390,45391,45392,45393,45394,45395,45396,45397,45398,45399,45400,45401,45402,45403,45404,45405,45406,45407,45408,45409,45410,45411,45412,45413,45414,45415,45416,45417,45418,45419,45420,45421,45422,45423,45424,45425,45426,45427,45428,45429,45430,45431,45432,45433,45434,45435,45436,45437,45438,45439,45440,45441,45442,45443,45444,45445,45446,45447,45448,45449,45450,45451,45452,45453,45454,45455,45456,45457,45458,45459,45460,45461,45462,45463,45464,45465,45466,45467,45468,45469,45470,45471,45472,45473,45474,45475,45476,45477,45478,45479,45480,45481,45482,45483,45484,45485,45486,45487,45488,45489,45490,45491,45492,45493,45494,45495,45496,45497,45498,45499,45500,45501,45502,45503,45504,45505,45506,45507,45508,45509,45510,45511,45512,45513,45514,45515,45516,45517,45518,45519,45520,45521,45522,45523,45524,45525,45526,45527,45528,45529,45530,45531,45532,45533,45534,45535,45536,45537,45538,45539,45540,45541,45542,45543,45544,45545,45546,45547,45548,45549,45550,45551,45552,45553,45554,45555,45556,45557,45558,45559,45560,45561,45562,45563,45564,45565,45566,45567,45568,45569,45570,45571,45572,45573,45574,45575,45576,45577,45578,45579,45580,45581,45582,45583,45584,45585,45586,45587,45588,45589,45590,45591,45592,45593,45594,45595,45596,45597,45598,45599,45600,45601,45602,45603,45604,45605,45606,45607,45608,45609,45610,45611,45612,45613,45614,45615,45616,45617,45618,45619,45620,45621,45622,45623,45624,45625,45626,45627,45628,45629,45630,45631,45632,45633,45634,45635,45636,45637,45638,45639,45640,45641,45642,45643,45644,45645,45646,45647,45648,45649,45650,45651,45652,45653,45654,45655,45656,45657,45658,45659,45660,45661,45662,45663,45664,45665,45666,45667,45668,45669,45670,45671,45672,45673,45674,45675,45676,45677,45678,45679,45680,45681,45682,45683,45684,45685,45686,45687,45688,45689,45690,45691,45692,45693,45694,45695,45696,45697,45698,45699,45700,45701,45702,45703,45704,45705,45706,45707,45708,45709,45710,45711,45712,45713,45714,45715,45716,45717,45718,45719,45720,45721,45722,45723,45724,45725,45726,45727,45728,45729,45730,45731,45732,45733,45734,45735,45736,45737,45738,45739,45740,45741,45742,45743,45744,45745,45746,45747,45748,45749,45750,45751,45752,45753,45754,45755,45756,45757,45758,45759,45760,45761,45762,45763,45764,45765,45766,45767,45768,45769,45770,45771,45772,45773,45774,45775,45776,45777,45778,45779,45780,45781,45782,45783,45784,45785,45786,45787,45788,45789,45790,45791,45792,45793,45794,45795,45796,45797,45798,45799,45800,45801,45802,45803,45804,45805,45806,45807,45808,45809,45810,45811,45812,45813,45814,45815,45816,45817,45818,45819,45820,45821,45822,45823,45824,45825,45826,45827,45828,45829,45830,45831,45832,45833,45834,45835,45836,45837,45838,45839,45840,45841,45842,45843,45844,45845,45846,45847,45848,45849,45850,45851,45852,45853,45854,45855,45856,45857,45858,45859,45860,45861,45862,45863,45864,45865,45866,45867,45868,45869,45870,45871,45872,45873,45874,45875,45876,45877,45878,45879,45880,45881,45882,45883,45884,45885,45886,45887,45888,45889,45890,45891,45892,45893,45894,45895,45896,45897,45898,45899,45900,45901,45902,45903,45904,45905,45906,45907,45908,45909,45910,45911,45912,45913,45914,45915,45916,45917,45918,45919,45920,45921,45922,45923,45924,45925,45926,45927,45928,45929,45930,45931,45932,45933,45934,45935,45936,45937,45938,45939,45940,45941,45942,45943,45944,45945,45946,45947,45948,45949,45950,45951,45952,45953,45954,45955,45956,45957,45958,45959,45960,45961,45962,45963,45964,45965,45966,45967,45968,45969,45970,45971,45972,45973,45974,45975,45976,45977,45978,45979,45980,45981,45982,45983,45984,45985,45986,45987,45988,45989,45990,45991,45992,45993,45994,45995,45996,45997,45998,45999,46000,46001,46002,46003,46004,46005,46006,46007,46008,46009,46010,46011,46012,46013,46014,46015,46016,46017,46018,46019,46020,46021,46022,46023,46024,46025,46026,46027,46028,46029,46030,46031,46032,46033,46034,46035,46036,46037,46038,46039,46040,46041,46042,46043,46044,46045,46046,46047,46048,46049,46050,46051,46052,46053,46054,46055,46056,46057,46058,46059,46060,46061,46062,46063,46064,46065,46066,46067,46068,46069,46070,46071,46072,46073,46074,46075,46076,46077,46078,46079,46080,46081,46082,46083,46084,46085,46086,46087,46088,46089,46090,46091,46092,46093,46094,46095,46096,46097,46098,46099,46100,46101,46102,46103,46104,46105,46106,46107,46108,46109,46110,46111,46112,46113,46114,46115,46116,46117,46118,46119,46120,46121,46122,46123,46124,46125,46126,46127,46128,46129,46130,46131,46132,46133,46134,46135,46136,46137,46138,46139,46140,46141,46142,46143,46144,46145,46146,46147,46148,46149,46150,46151,46152,46153,46154,46155,46156,46157,46158,46159,46160,46161,46162,46163,46164,46165,46166,46167,46168,46169,46170,46171,46172,46173,46174,46175,46176,46177,46178,46179,46180,46181,46182,46183,46184,46185,46186,46187,46188,46189,46190,46191,46192,46193,46194,46195,46196,46197,46198,46199,46200,46201,46202,46203,46204,46205,46206,46207,46208,46209,46210,46211,46212,46213,46214,46215,46216,46217,46218,46219,46220,46221,46222,46223,46224,46225,46226,46227,46228,46229,46230,46231,46232,46233,46234,46235,46236,46237,46238,46239,46240,46241,46242,46243,46244,46245,46246,46247,46248,46249,46250,46251,46252,46253,46254,46255,46256,46257,46258,46259,46260,46261,46262,46263,46264,46265,46266,46267,46268,46269,46270,46271,46272,46273,46274,46275,46276,46277,46278,46279,46280,46281,46282,46283,46284,46285,46286,46287,46288,46289,46290,46291,46292,46293,46294,46295,46296,46297,46298,46299,46300,46301,46302,46303,46304,46305,46306,46307,46308,46309,46310,46311,46312,46313,46314,46315,46316,46317,46318,46319,46320,46321,46322,46323,46324,46325,46326,46327,46328,46329,46330,46331,46332,46333,46334,46335,46336,46337,46338,46339,46340,46341,46342,46343,46344,46345,46346,46347,46348,46349,46350,46351,46352,46353,46354,46355,46356,46357,46358,46359,46360,46361,46362,46363,46364,46365,46366,46367,46368,46369,46370,46371,46372,46373,46374,46375,46376,46377,46378,46379,46380,46381,46382,46383,46384,46385,46386,46387,46388,46389,46390,46391,46392,46393,46394,46395,46396,46397,46398,46399,46400,46401,46402,46403,46404,46405,46406,46407,46408,46409,46410,46411,46412,46413,46414,46415,46416,46417,46418,46419,46420,46421,46422,46423,46424,46425,46426,46427,46428,46429,46430,46431,46432,46433,46434,46435,46436,46437,46438,46439,46440,46441,46442,46443,46444,46445,46446,46447,46448,46449,46450,46451,46452,46453,46454,46455,46456,46457,46458,46459,46460,46461,46462,46463,46464,46465,46466,46467,46468,46469,46470,46471,46472,46473,46474,46475,46476,46477,46478,46479,46480,46481,46482,46483,46484,46485,46486,46487,46488,46489,46490,46491,46492,46493,46494,46495,46496,46497,46498,46499,46500,46501,46502,46503,46504,46505,46506,46507,46508,46509,46510,46511,46512,46513,46514,46515,46516,46517,46518,46519,46520,46521,46522,46523,46524,46525,46526,46527,46528,46529,46530,46531,46532,46533,46534,46535,46536,46537,46538,46539,46540,46541,46542,46543,46544,46545,46546,46547,46548,46549,46550,46551,46552,46553,46554,46555,46556,46557,46558,46559,46560,46561,46562,46563,46564,46565,46566,46567,46568,46569,46570,46571,46572,46573,46574,46575,46576,46577,46578,46579,46580,46581,46582,46583,46584,46585,46586,46587,46588,46589,46590,46591,46592,46593,46594,46595,46596,46597,46598,46599,46600,46601,46602,46603,46604,46605,46606,46607,46608,46609,46610,46611,46612,46613,46614,46615,46616,46617,46618,46619,46620,46621,46622,46623,46624,46625,46626,46627,46628,46629,46630,46631,46632,46633,46634,46635,46636,46637,46638,46639,46640,46641,46642,46643,46644,46645,46646,46647,46648,46649,46650,46651,46652,46653,46654,46655,46656,46657,46658,46659,46660,46661,46662,46663,46664,46665,46666,46667,46668,46669,46670,46671,46672,46673,46674,46675,46676,46677,46678,46679,46680,46681,46682,46683,46684,46685,46686,46687,46688,46689,46690,46691,46692,46693,46694,46695,46696,46697,46698,46699,46700,46701,46702,46703,46704,46705,46706,46707,46708,46709,46710,46711,46712,46713,46714,46715,46716,46717,46718,46719,46720,46721,46722,46723,46724,46725,46726,46727,46728,46729,46730,46731,46732,46733,46734,46735,46736,46737,46738,46739,46740,46741,46742,46743,46744,46745,46746,46747,46748,46749,46750,46751,46752,46753,46754,46755,46756,46757,46758,46759,46760,46761,46762,46763,46764,46765,46766,46767,46768,46769,46770,46771,46772,46773,46774,46775,46776,46777,46778,46779,46780,46781,46782,46783,46784,46785,46786,46787,46788,46789,46790,46791,46792,46793,46794,46795,46796,46797,46798,46799,46800,46801,46802,46803,46804,46805,46806,46807,46808,46809,46810,46811,46812,46813,46814,46815,46816,46817,46818,46819,46820,46821,46822,46823,46824,46825,46826,46827,46828,46829,46830,46831,46832,46833,46834,46835,46836,46837,46838,46839,46840,46841,46842,46843,46844,46845,46846,46847,46848,46849,46850,46851,46852,46853,46854,46855,46856,46857,46858,46859,46860,46861,46862,46863,46864,46865,46866,46867,46868,46869,46870,46871,46872,46873,46874,46875,46876,46877,46878,46879,46880,46881,46882,46883,46884,46885,46886,46887,46888,46889,46890,46891,46892,46893,46894,46895,46896,46897,46898,46899,46900,46901,46902,46903,46904,46905,46906,46907,46908,46909,46910,46911,46912,46913,46914,46915,46916,46917,46918,46919,46920,46921,46922,46923,46924,46925,46926,46927,46928,46929,46930,46931,46932,46933,46934,46935,46936,46937,46938,46939,46940,46941,46942,46943,46944,46945,46946,46947,46948,46949,46950,46951,46952,46953,46954,46955,46956,46957,46958,46959,46960,46961,46962,46963,46964,46965,46966,46967,46968,46969,46970,46971,46972,46973,46974,46975,46976,46977,46978,46979,46980,46981,46982,46983,46984,46985,46986,46987,46988,46989,46990,46991,46992,46993,46994,46995,46996,46997,46998,46999,47000,47001,47002,47003,47004,47005,47006,47007,47008,47009,47010,47011,47012,47013,47014,47015,47016,47017,47018,47019,47020,47021,47022,47023,47024,47025,47026,47027,47028,47029,47030,47031,47032,47033,47034,47035,47036,47037,47038,47039,47040,47041,47042,47043,47044,47045,47046,47047,47048,47049,47050,47051,47052,47053,47054,47055,47056,47057,47058,47059,47060,47061,47062,47063,47064,47065,47066,47067,47068,47069,47070,47071,47072,47073,47074,47075,47076,47077,47078,47079,47080,47081,47082,47083,47084,47085,47086,47087,47088,47089,47090,47091,47092,47093,47094,47095,47096,47097,47098,47099,47100,47101,47102,47103,47104,47105,47106,47107,47108,47109,47110,47111,47112,47113,47114,47115,47116,47117,47118,47119,47120,47121,47122,47123,47124,47125,47126,47127,47128,47129,47130,47131,47132,47133,47134,47135,47136,47137,47138,47139,47140,47141,47142,47143,47144,47145,47146,47147,47148,47149,47150,47151,47152,47153,47154,47155,47156,47157,47158,47159,47160,47161,47162,47163,47164,47165,47166,47167,47168,47169,47170,47171,47172,47173,47174,47175,47176,47177,47178,47179,47180,47181,47182,47183,47184,47185,47186,47187,47188,47189,47190,47191,47192,47193,47194,47195,47196,47197,47198,47199,47200,47201,47202,47203,47204,47205,47206,47207,47208,47209,47210,47211,47212,47213,47214,47215,47216,47217,47218,47219,47220,47221,47222,47223,47224,47225,47226,47227,47228,47229,47230,47231,47232,47233,47234,47235,47236,47237,47238,47239,47240,47241,47242,47243,47244,47245,47246,47247,47248,47249,47250,47251,47252,47253,47254,47255,47256,47257,47258,47259,47260,47261,47262,47263,47264,47265,47266,47267,47268,47269,47270,47271,47272,47273,47274,47275,47276,47277,47278,47279,47280,47281,47282,47283,47284,47285,47286,47287,47288,47289,47290,47291,47292,47293,47294,47295,47296,47297,47298,47299,47300,47301,47302,47303,47304,47305,47306,47307,47308,47309,47310,47311,47312,47313,47314,47315,47316,47317,47318,47319,47320,47321,47322,47323,47324,47325,47326,47327,47328,47329,47330,47331,47332,47333,47334,47335,47336,47337,47338,47339,47340,47341,47342,47343,47344,47345,47346,47347,47348,47349,47350,47351,47352,47353,47354,47355,47356,47357,47358,47359,47360,47361,47362,47363,47364,47365,47366,47367,47368,47369,47370,47371,47372,47373,47374,47375,47376,47377,47378,47379,47380,47381,47382,47383,47384,47385,47386,47387,47388,47389,47390,47391,47392,47393,47394,47395,47396,47397,47398,47399,47400,47401,47402,47403,47404,47405,47406,47407,47408,47409,47410,47411,47412,47413,47414,47415,47416,47417,47418,47419,47420,47421,47422,47423,47424,47425,47426,47427,47428,47429,47430,47431,47432,47433,47434,47435,47436,47437,47438,47439,47440,47441,47442,47443,47444,47445,47446,47447,47448,47449,47450,47451,47452,47453,47454,47455,47456,47457,47458,47459,47460,47461,47462,47463,47464,47465,47466,47467,47468,47469,47470,47471,47472,47473,47474,47475,47476,47477,47478,47479,47480,47481,47482,47483,47484,47485,47486,47487,47488,47489,47490,47491,47492,47493,47494,47495,47496,47497,47498,47499,47500,47501,47502,47503,47504,47505,47506,47507,47508,47509,47510,47511,47512,47513,47514,47515,47516,47517,47518,47519,47520,47521,47522,47523,47524,47525,47526,47527,47528,47529,47530,47531,47532,47533,47534,47535,47536,47537,47538,47539,47540,47541,47542,47543,47544,47545,47546,47547,47548,47549,47550,47551,47552,47553,47554,47555,47556,47557,47558,47559,47560,47561,47562,47563,47564,47565,47566,47567,47568,47569,47570,47571,47572,47573,47574,47575,47576,47577,47578,47579,47580,47581,47582,47583,47584,47585,47586,47587,47588,47589,47590,47591,47592,47593,47594,47595,47596,47597,47598,47599,47600,47601,47602,47603,47604,47605,47606,47607,47608,47609,47610,47611,47612,47613,47614,47615,47616,47617,47618,47619,47620,47621,47622,47623,47624,47625,47626,47627,47628,47629,47630,47631,47632,47633,47634,47635,47636,47637,47638,47639,47640,47641,47642,47643,47644,47645,47646,47647,47648,47649,47650,47651,47652,47653,47654,47655,47656,47657,47658,47659,47660,47661,47662,47663,47664,47665,47666,47667,47668,47669,47670,47671,47672,47673,47674,47675,47676,47677,47678,47679,47680,47681,47682,47683,47684,47685,47686,47687,47688,47689,47690,47691,47692,47693,47694,47695,47696,47697,47698,47699,47700,47701,47702,47703,47704,47705,47706,47707,47708,47709,47710,47711,47712,47713,47714,47715,47716,47717,47718,47719,47720,47721,47722,47723,47724,47725,47726,47727,47728,47729,47730,47731,47732,47733,47734,47735,47736,47737,47738,47739,47740,47741,47742,47743,47744,47745,47746,47747,47748,47749,47750,47751,47752,47753,47754,47755,47756,47757,47758,47759,47760,47761,47762,47763,47764,47765,47766,47767,47768,47769,47770,47771,47772,47773,47774,47775,47776,47777,47778,47779,47780,47781,47782,47783,47784,47785,47786,47787,47788,47789,47790,47791,47792,47793,47794,47795,47796,47797,47798,47799,47800,47801,47802,47803,47804,47805,47806,47807,47808,47809,47810,47811,47812,47813,47814,47815,47816,47817,47818,47819,47820,47821,47822,47823,47824,47825,47826,47827,47828,47829,47830,47831,47832,47833,47834,47835,47836,47837,47838,47839,47840,47841,47842,47843,47844,47845,47846,47847,47848,47849,47850,47851,47852,47853,47854,47855,47856,47857,47858,47859,47860,47861,47862,47863,47864,47865,47866,47867,47868,47869,47870,47871,47872,47873,47874,47875,47876,47877,47878,47879,47880,47881,47882,47883,47884,47885,47886,47887,47888,47889,47890,47891,47892,47893,47894,47895,47896,47897,47898,47899,47900,47901,47902,47903,47904,47905,47906,47907,47908,47909,47910,47911,47912,47913,47914,47915,47916,47917,47918,47919,47920,47921,47922,47923,47924,47925,47926,47927,47928,47929,47930,47931,47932,47933,47934,47935,47936,47937,47938,47939,47940,47941,47942,47943,47944,47945,47946,47947,47948,47949,47950,47951,47952,47953,47954,47955,47956,47957,47958,47959,47960,47961,47962,47963,47964,47965,47966,47967,47968,47969,47970,47971,47972,47973,47974,47975,47976,47977,47978,47979,47980,47981,47982,47983,47984,47985,47986,47987,47988,47989,47990,47991,47992,47993,47994,47995,47996,47997,47998,47999,48000,48001,48002,48003,48004,48005,48006,48007,48008,48009,48010,48011,48012,48013,48014,48015,48016,48017,48018,48019,48020,48021,48022,48023,48024,48025,48026,48027,48028,48029,48030,48031,48032,48033,48034,48035,48036,48037,48038,48039,48040,48041,48042,48043,48044,48045,48046,48047,48048,48049,48050,48051,48052,48053,48054,48055,48056,48057,48058,48059,48060,48061,48062,48063,48064,48065,48066,48067,48068,48069,48070,48071,48072,48073,48074,48075,48076,48077,48078,48079,48080,48081,48082,48083,48084,48085,48086,48087,48088,48089,48090,48091,48092,48093,48094,48095,48096,48097,48098,48099,48100,48101,48102,48103,48104,48105,48106,48107,48108,48109,48110,48111,48112,48113,48114,48115,48116,48117,48118,48119,48120,48121,48122,48123,48124,48125,48126,48127,48128,48129,48130,48131,48132,48133,48134,48135,48136,48137,48138,48139,48140,48141,48142,48143,48144,48145,48146,48147,48148,48149,48150,48151,48152,48153,48154,48155,48156,48157,48158,48159,48160,48161,48162,48163,48164,48165,48166,48167,48168,48169,48170,48171,48172,48173,48174,48175,48176,48177,48178,48179,48180,48181,48182,48183,48184,48185,48186,48187,48188,48189,48190,48191,48192,48193,48194,48195,48196,48197,48198,48199,48200,48201,48202,48203,48204,48205,48206,48207,48208,48209,48210,48211,48212,48213,48214,48215,48216,48217,48218,48219,48220,48221,48222,48223,48224,48225,48226,48227,48228,48229,48230,48231,48232,48233,48234,48235,48236,48237,48238,48239,48240,48241,48242,48243,48244,48245,48246,48247,48248,48249,48250,48251,48252,48253,48254,48255,48256,48257,48258,48259,48260,48261,48262,48263,48264,48265,48266,48267,48268,48269,48270,48271,48272,48273,48274,48275,48276,48277,48278,48279,48280,48281,48282,48283,48284,48285,48286,48287,48288,48289,48290,48291,48292,48293,48294,48295,48296,48297,48298,48299,48300,48301,48302,48303,48304,48305,48306,48307,48308,48309,48310,48311,48312,48313,48314,48315,48316,48317,48318,48319,48320,48321,48322,48323,48324,48325,48326,48327,48328,48329,48330,48331,48332,48333,48334,48335,48336,48337,48338,48339,48340,48341,48342,48343,48344,48345,48346,48347,48348,48349,48350,48351,48352,48353,48354,48355,48356,48357,48358,48359,48360,48361,48362,48363,48364,48365,48366,48367,48368,48369,48370,48371,48372,48373,48374,48375,48376,48377,48378,48379,48380,48381,48382,48383,48384,48385,48386,48387,48388,48389,48390,48391,48392,48393,48394,48395,48396,48397,48398,48399,48400,48401,48402,48403,48404,48405,48406,48407,48408,48409,48410,48411,48412,48413,48414,48415,48416,48417,48418,48419,48420,48421,48422,48423,48424,48425,48426,48427,48428,48429,48430,48431,48432,48433,48434,48435,48436,48437,48438,48439,48440,48441,48442,48443,48444,48445,48446,48447,48448,48449,48450,48451,48452,48453,48454,48455,48456,48457,48458,48459,48460,48461,48462,48463,48464,48465,48466,48467,48468,48469,48470,48471,48472,48473,48474,48475,48476,48477,48478,48479,48480,48481,48482,48483,48484,48485,48486,48487,48488,48489,48490,48491,48492,48493,48494,48495,48496,48497,48498,48499,48500,48501,48502,48503,48504,48505,48506,48507,48508,48509,48510,48511,48512,48513,48514,48515,48516,48517,48518,48519,48520,48521,48522,48523,48524,48525,48526,48527,48528,48529,48530,48531,48532,48533,48534,48535,48536,48537,48538,48539,48540,48541,48542,48543,48544,48545,48546,48547,48548,48549,48550,48551,48552,48553,48554,48555,48556,48557,48558,48559,48560,48561,48562,48563,48564,48565,48566,48567,48568,48569,48570,48571,48572,48573,48574,48575,48576,48577,48578,48579,48580,48581,48582,48583,48584,48585,48586,48587,48588,48589,48590,48591,48592,48593,48594,48595,48596,48597,48598,48599,48600,48601,48602,48603,48604,48605,48606,48607,48608,48609,48610,48611,48612,48613,48614,48615,48616,48617,48618,48619,48620,48621,48622,48623,48624,48625,48626,48627,48628,48629,48630,48631,48632,48633,48634,48635,48636,48637,48638,48639,48640,48641,48642,48643,48644,48645,48646,48647,48648,48649,48650,48651,48652,48653,48654,48655,48656,48657,48658,48659,48660,48661,48662,48663,48664,48665,48666,48667,48668,48669,48670,48671,48672,48673,48674,48675,48676,48677,48678,48679,48680,48681,48682,48683,48684,48685,48686,48687,48688,48689,48690,48691,48692,48693,48694,48695,48696,48697,48698,48699,48700,48701,48702,48703,48704,48705,48706,48707,48708,48709,48710,48711,48712,48713,48714,48715,48716,48717,48718,48719,48720,48721,48722,48723,48724,48725,48726,48727,48728,48729,48730,48731,48732,48733,48734,48735,48736,48737,48738,48739,48740,48741,48742,48743,48744,48745,48746,48747,48748,48749,48750,48751,48752,48753,48754,48755,48756,48757,48758,48759,48760,48761,48762,48763,48764,48765,48766,48767,48768,48769,48770,48771,48772,48773,48774,48775,48776,48777,48778,48779,48780,48781,48782,48783,48784,48785,48786,48787,48788,48789,48790,48791,48792,48793,48794,48795,48796,48797,48798,48799,48800,48801,48802,48803,48804,48805,48806,48807,48808,48809,48810,48811,48812,48813,48814,48815,48816,48817,48818,48819,48820,48821,48822,48823,48824,48825,48826,48827,48828,48829,48830,48831,48832,48833,48834,48835,48836,48837,48838,48839,48840,48841,48842,48843,48844,48845,48846,48847,48848,48849,48850,48851,48852,48853,48854,48855,48856,48857,48858,48859,48860,48861,48862,48863,48864,48865,48866,48867,48868,48869,48870,48871,48872,48873,48874,48875,48876,48877,48878,48879,48880,48881,48882,48883,48884,48885,48886,48887,48888,48889,48890,48891,48892,48893,48894,48895,48896,48897,48898,48899,48900,48901,48902,48903,48904,48905,48906,48907,48908,48909,48910,48911,48912,48913,48914,48915,48916,48917,48918,48919,48920,48921,48922,48923,48924,48925,48926,48927,48928,48929,48930,48931,48932,48933,48934,48935,48936,48937,48938,48939,48940,48941,48942,48943,48944,48945,48946,48947,48948,48949,48950,48951,48952,48953,48954,48955,48956,48957,48958,48959,48960,48961,48962,48963,48964,48965,48966,48967,48968,48969,48970,48971,48972,48973,48974,48975,48976,48977,48978,48979,48980,48981,48982,48983,48984,48985,48986,48987,48988,48989,48990,48991,48992,48993,48994,48995,48996,48997,48998,48999,49000,49001,49002,49003,49004,49005,49006,49007,49008,49009,49010,49011,49012,49013,49014,49015,49016,49017,49018,49019,49020,49021,49022,49023,49024,49025,49026,49027,49028,49029,49030,49031,49032,49033,49034,49035,49036,49037,49038,49039,49040,49041,49042,49043,49044,49045,49046,49047,49048,49049,49050,49051,49052,49053,49054,49055,49056,49057,49058,49059,49060,49061,49062,49063,49064,49065,49066,49067,49068,49069,49070,49071,49072,49073,49074,49075,49076,49077,49078,49079,49080,49081,49082,49083,49084,49085,49086,49087,49088,49089,49090,49091,49092,49093,49094,49095,49096,49097,49098,49099,49100,49101,49102,49103,49104,49105,49106,49107,49108,49109,49110,49111,49112,49113,49114,49115,49116,49117,49118,49119,49120,49121,49122,49123,49124,49125,49126,49127,49128,49129,49130,49131,49132,49133,49134,49135,49136,49137,49138,49139,49140,49141,49142,49143,49144,49145,49146,49147,49148,49149,49150,49151,49152,49153,49154,49155,49156,49157,49158,49159,49160,49161,49162,49163,49164,49165,49166,49167,49168,49169,49170,49171,49172,49173,49174,49175,49176,49177,49178,49179,49180,49181,49182,49183,49184,49185,49186,49187,49188,49189,49190,49191,49192,49193,49194,49195,49196,49197,49198,49199,49200,49201,49202,49203,49204,49205,49206,49207,49208,49209,49210,49211,49212,49213,49214,49215,49216,49217,49218,49219,49220,49221,49222,49223,49224,49225,49226,49227,49228,49229,49230,49231,49232,49233,49234,49235,49236,49237,49238,49239,49240,49241,49242,49243,49244,49245,49246,49247,49248,49249,49250,49251,49252,49253,49254,49255,49256,49257,49258,49259,49260,49261,49262,49263,49264,49265,49266,49267,49268,49269,49270,49271,49272,49273,49274,49275,49276,49277,49278,49279,49280,49281,49282,49283,49284,49285,49286,49287,49288,49289,49290,49291,49292,49293,49294,49295,49296,49297,49298,49299,49300,49301,49302,49303,49304,49305,49306,49307,49308,49309,49310,49311,49312,49313,49314,49315,49316,49317,49318,49319,49320,49321,49322,49323,49324,49325,49326,49327,49328,49329,49330,49331,49332,49333,49334,49335,49336,49337,49338,49339,49340,49341,49342,49343,49344,49345,49346,49347,49348,49349,49350,49351,49352,49353,49354,49355,49356,49357,49358,49359,49360,49361,49362,49363,49364,49365,49366,49367,49368,49369,49370,49371,49372,49373,49374,49375,49376,49377,49378,49379,49380,49381,49382,49383,49384,49385,49386,49387,49388,49389,49390,49391,49392,49393,49394,49395,49396,49397,49398,49399,49400,49401,49402,49403,49404,49405,49406,49407,49408,49409,49410,49411,49412,49413,49414,49415,49416,49417,49418,49419,49420,49421,49422,49423,49424,49425,49426,49427,49428,49429,49430,49431,49432,49433,49434,49435,49436,49437,49438,49439,49440,49441,49442,49443,49444,49445,49446,49447,49448,49449,49450,49451,49452,49453,49454,49455,49456,49457,49458,49459,49460,49461,49462,49463,49464,49465,49466,49467,49468,49469,49470,49471,49472,49473,49474,49475,49476,49477,49478,49479,49480,49481,49482,49483,49484,49485,49486,49487,49488,49489,49490,49491,49492,49493,49494,49495,49496,49497,49498,49499,49500,49501,49502,49503,49504,49505,49506,49507,49508,49509,49510,49511,49512,49513,49514,49515,49516,49517,49518,49519,49520,49521,49522,49523,49524,49525,49526,49527,49528,49529,49530,49531,49532,49533,49534,49535,49536,49537,49538,49539,49540,49541,49542,49543,49544,49545,49546,49547,49548,49549,49550,49551,49552,49553,49554,49555,49556,49557,49558,49559,49560,49561,49562,49563,49564,49565,49566,49567,49568,49569,49570,49571,49572,49573,49574,49575,49576,49577,49578,49579,49580,49581,49582,49583,49584,49585,49586,49587,49588,49589,49590,49591,49592,49593,49594,49595,49596,49597,49598,49599,49600,49601,49602,49603,49604,49605,49606,49607,49608,49609,49610,49611,49612,49613,49614,49615,49616,49617,49618,49619,49620,49621,49622,49623,49624,49625,49626,49627,49628,49629,49630,49631,49632,49633,49634,49635,49636,49637,49638,49639,49640,49641,49642,49643,49644,49645,49646,49647,49648,49649,49650,49651,49652,49653,49654,49655,49656,49657,49658,49659,49660,49661,49662,49663,49664,49665,49666,49667,49668,49669,49670,49671,49672,49673,49674,49675,49676,49677,49678,49679,49680,49681,49682,49683,49684,49685,49686,49687,49688,49689,49690,49691,49692,49693,49694,49695,49696,49697,49698,49699,49700,49701,49702,49703,49704,49705,49706,49707,49708,49709,49710,49711,49712,49713,49714,49715,49716,49717,49718,49719,49720,49721,49722,49723,49724,49725,49726,49727,49728,49729,49730,49731,49732,49733,49734,49735,49736,49737,49738,49739,49740,49741,49742,49743,49744,49745,49746,49747,49748,49749,49750,49751,49752,49753,49754,49755,49756,49757,49758,49759,49760,49761,49762,49763,49764,49765,49766,49767,49768,49769,49770,49771,49772,49773,49774,49775,49776,49777,49778,49779,49780,49781,49782,49783,49784,49785,49786,49787,49788,49789,49790,49791,49792,49793,49794,49795,49796,49797,49798,49799,49800,49801,49802,49803,49804,49805,49806,49807,49808,49809,49810,49811,49812,49813,49814,49815,49816,49817,49818,49819,49820,49821,49822,49823,49824,49825,49826,49827,49828,49829,49830,49831,49832,49833,49834,49835,49836,49837,49838,49839,49840,49841,49842,49843,49844,49845,49846,49847,49848,49849,49850,49851,49852,49853,49854,49855,49856,49857,49858,49859,49860,49861,49862,49863,49864,49865,49866,49867,49868,49869,49870,49871,49872,49873,49874,49875,49876,49877,49878,49879,49880,49881,49882,49883,49884,49885,49886,49887,49888,49889,49890,49891,49892,49893,49894,49895,49896,49897,49898,49899,49900,49901,49902,49903,49904,49905,49906,49907,49908,49909,49910,49911,49912,49913,49914,49915,49916,49917,49918,49919,49920,49921,49922,49923,49924,49925,49926,49927,49928,49929,49930,49931,49932,49933,49934,49935,49936,49937,49938,49939,49940,49941,49942,49943,49944,49945,49946,49947,49948,49949,49950,49951,49952,49953,49954,49955,49956,49957,49958,49959,49960,49961,49962,49963,49964,49965,49966,49967,49968,49969,49970,49971,49972,49973,49974,49975,49976,49977,49978,49979,49980,49981,49982,49983,49984,49985,49986,49987,49988,49989,49990,49991,49992,49993,49994,49995,49996,49997,49998,49999,50000,50001,50002,50003,50004,50005,50006,50007,50008,50009,50010,50011,50012,50013,50014,50015,50016,50017,50018,50019,50020,50021,50022,50023,50024,50025,50026,50027,50028,50029,50030,50031,50032,50033,50034,50035,50036,50037,50038,50039,50040,50041,50042,50043,50044,50045,50046,50047,50048,50049,50050,50051,50052,50053,50054,50055,50056,50057,50058,50059,50060,50061,50062,50063,50064,50065,50066,50067,50068,50069,50070,50071,50072,50073,50074,50075,50076,50077,50078,50079,50080,50081,50082,50083,50084,50085,50086,50087,50088,50089,50090,50091,50092,50093,50094,50095,50096,50097,50098,50099,50100,50101,50102,50103,50104,50105,50106,50107,50108,50109,50110,50111,50112,50113,50114,50115,50116,50117,50118,50119,50120,50121,50122,50123,50124,50125,50126,50127,50128,50129,50130,50131,50132,50133,50134,50135,50136,50137,50138,50139,50140,50141,50142,50143,50144,50145,50146,50147,50148,50149,50150,50151,50152,50153,50154,50155,50156,50157,50158,50159,50160,50161,50162,50163,50164,50165,50166,50167,50168,50169,50170,50171,50172,50173,50174,50175,50176,50177,50178,50179,50180,50181,50182,50183,50184,50185,50186,50187,50188,50189,50190,50191,50192,50193,50194,50195,50196,50197,50198,50199,50200,50201,50202,50203,50204,50205,50206,50207,50208,50209,50210,50211,50212,50213,50214,50215,50216,50217,50218,50219,50220,50221,50222,50223,50224,50225,50226,50227,50228,50229,50230,50231,50232,50233,50234,50235,50236,50237,50238,50239,50240,50241,50242,50243,50244,50245,50246,50247,50248,50249,50250,50251,50252,50253,50254,50255,50256,50257,50258,50259,50260,50261,50262,50263,50264,50265,50266,50267,50268,50269,50270,50271,50272,50273,50274,50275,50276,50277,50278,50279,50280,50281,50282,50283,50284,50285,50286,50287,50288,50289,50290,50291,50292,50293,50294,50295,50296,50297,50298,50299,50300,50301,50302,50303,50304,50305,50306,50307,50308,50309,50310,50311,50312,50313,50314,50315,50316,50317,50318,50319,50320,50321,50322,50323,50324,50325,50326,50327,50328,50329,50330,50331,50332,50333,50334,50335,50336,50337,50338,50339,50340,50341,50342,50343,50344,50345,50346,50347,50348,50349,50350,50351,50352,50353,50354,50355,50356,50357,50358,50359,50360,50361,50362,50363,50364,50365,50366,50367,50368,50369,50370,50371,50372,50373,50374,50375,50376,50377,50378,50379,50380,50381,50382,50383,50384,50385,50386,50387,50388,50389,50390,50391,50392,50393,50394,50395,50396,50397,50398,50399,50400,50401,50402,50403,50404,50405,50406,50407,50408,50409,50410,50411,50412,50413,50414,50415,50416,50417,50418,50419,50420,50421,50422,50423,50424,50425,50426,50427,50428,50429,50430,50431,50432,50433,50434,50435,50436,50437,50438,50439,50440,50441,50442,50443,50444,50445,50446,50447,50448,50449,50450,50451,50452,50453,50454,50455,50456,50457,50458,50459,50460,50461,50462,50463,50464,50465,50466,50467,50468,50469,50470,50471,50472,50473,50474,50475,50476,50477,50478,50479,50480,50481,50482,50483,50484,50485,50486,50487,50488,50489,50490,50491,50492,50493,50494,50495,50496,50497,50498,50499,50500,50501,50502,50503,50504,50505,50506,50507,50508,50509,50510,50511,50512,50513,50514,50515,50516,50517,50518,50519,50520,50521,50522,50523,50524,50525,50526,50527,50528,50529,50530,50531,50532,50533,50534,50535,50536,50537,50538,50539,50540,50541,50542,50543,50544,50545,50546,50547,50548,50549,50550,50551,50552,50553,50554,50555,50556,50557,50558,50559,50560,50561,50562,50563,50564,50565,50566,50567,50568,50569,50570,50571,50572,50573,50574,50575,50576,50577,50578,50579,50580,50581,50582,50583,50584,50585,50586,50587,50588,50589,50590,50591,50592,50593,50594,50595,50596,50597,50598,50599,50600,50601,50602,50603,50604,50605,50606,50607,50608,50609,50610,50611,50612,50613,50614,50615,50616,50617,50618,50619,50620,50621,50622,50623,50624,50625,50626,50627,50628,50629,50630,50631,50632,50633,50634,50635,50636,50637,50638,50639,50640,50641,50642,50643,50644,50645,50646,50647,50648,50649,50650,50651,50652,50653,50654,50655,50656,50657,50658,50659,50660,50661,50662,50663,50664,50665,50666,50667,50668,50669,50670,50671,50672,50673,50674,50675,50676,50677,50678,50679,50680,50681,50682,50683,50684,50685,50686,50687,50688,50689,50690,50691,50692,50693,50694,50695,50696,50697,50698,50699,50700,50701,50702,50703,50704,50705,50706,50707,50708,50709,50710,50711,50712,50713,50714,50715,50716,50717,50718,50719,50720,50721,50722,50723,50724,50725,50726,50727,50728,50729,50730,50731,50732,50733,50734,50735,50736,50737,50738,50739,50740,50741,50742,50743,50744,50745,50746,50747,50748,50749,50750,50751,50752,50753,50754,50755,50756,50757,50758,50759,50760,50761,50762,50763,50764,50765,50766,50767,50768,50769,50770,50771,50772,50773,50774,50775,50776,50777,50778,50779,50780,50781,50782,50783,50784,50785,50786,50787,50788,50789,50790,50791,50792,50793,50794,50795,50796,50797,50798,50799,50800,50801,50802,50803,50804,50805,50806,50807,50808,50809,50810,50811,50812,50813,50814,50815,50816,50817,50818,50819,50820,50821,50822,50823,50824,50825,50826,50827,50828,50829,50830,50831,50832,50833,50834,50835,50836,50837,50838,50839,50840,50841,50842,50843,50844,50845,50846,50847,50848,50849,50850,50851,50852,50853,50854,50855,50856,50857,50858,50859,50860,50861,50862,50863,50864,50865,50866,50867,50868,50869,50870,50871,50872,50873,50874,50875,50876,50877,50878,50879,50880,50881,50882,50883,50884,50885,50886,50887,50888,50889,50890,50891,50892,50893,50894,50895,50896,50897,50898,50899,50900,50901,50902,50903,50904,50905,50906,50907,50908,50909,50910,50911,50912,50913,50914,50915,50916,50917,50918,50919,50920,50921,50922,50923,50924,50925,50926,50927,50928,50929,50930,50931,50932,50933,50934,50935,50936,50937,50938,50939,50940,50941,50942,50943,50944,50945,50946,50947,50948,50949,50950,50951,50952,50953,50954,50955,50956,50957,50958,50959,50960,50961,50962,50963,50964,50965,50966,50967,50968,50969,50970,50971,50972,50973,50974,50975,50976,50977,50978,50979,50980,50981,50982,50983,50984,50985,50986,50987,50988,50989,50990,50991,50992,50993,50994,50995,50996,50997,50998,50999,51000,51001,51002,51003,51004,51005,51006,51007,51008,51009,51010,51011,51012,51013,51014,51015,51016,51017,51018,51019,51020,51021,51022,51023,51024,51025,51026,51027,51028,51029,51030,51031,51032,51033,51034,51035,51036,51037,51038,51039,51040,51041,51042,51043,51044,51045,51046,51047,51048,51049,51050,51051,51052,51053,51054,51055,51056,51057,51058,51059,51060,51061,51062,51063,51064,51065,51066,51067,51068,51069,51070,51071,51072,51073,51074,51075,51076,51077,51078,51079,51080,51081,51082,51083,51084,51085,51086,51087,51088,51089,51090,51091,51092,51093,51094,51095,51096,51097,51098,51099,51100,51101,51102,51103,51104,51105,51106,51107,51108,51109,51110,51111,51112,51113,51114,51115,51116,51117,51118,51119,51120,51121,51122,51123,51124,51125,51126,51127,51128,51129,51130,51131,51132,51133,51134,51135,51136,51137,51138,51139,51140,51141,51142,51143,51144,51145,51146,51147,51148,51149,51150,51151,51152,51153,51154,51155,51156,51157,51158,51159,51160,51161,51162,51163,51164,51165,51166,51167,51168,51169,51170,51171,51172,51173,51174,51175,51176,51177,51178,51179,51180,51181,51182,51183,51184,51185,51186,51187,51188,51189,51190,51191,51192,51193,51194,51195,51196,51197,51198,51199,51200,51201,51202,51203,51204,51205,51206,51207,51208,51209,51210,51211,51212,51213,51214,51215,51216,51217,51218,51219,51220,51221,51222,51223,51224,51225,51226,51227,51228,51229,51230,51231,51232,51233,51234,51235,51236,51237,51238,51239,51240,51241,51242,51243,51244,51245,51246,51247,51248,51249,51250,51251,51252,51253,51254,51255,51256,51257,51258,51259,51260,51261,51262,51263,51264,51265,51266,51267,51268,51269,51270,51271,51272,51273,51274,51275,51276,51277,51278,51279,51280,51281,51282,51283,51284,51285,51286,51287,51288,51289,51290,51291,51292,51293,51294,51295,51296,51297,51298,51299,51300,51301,51302,51303,51304,51305,51306,51307,51308,51309,51310,51311,51312,51313,51314,51315,51316,51317,51318,51319,51320,51321,51322,51323,51324,51325,51326,51327,51328,51329,51330,51331,51332,51333,51334,51335,51336,51337,51338,51339,51340,51341,51342,51343,51344,51345,51346,51347,51348,51349,51350,51351,51352,51353,51354,51355,51356,51357,51358,51359,51360,51361,51362,51363,51364,51365,51366,51367,51368,51369,51370,51371,51372,51373,51374,51375,51376,51377,51378,51379,51380,51381,51382,51383,51384,51385,51386,51387,51388,51389,51390,51391,51392,51393,51394,51395,51396,51397,51398,51399,51400,51401,51402,51403,51404,51405,51406,51407,51408,51409,51410,51411,51412,51413,51414,51415,51416,51417,51418,51419,51420,51421,51422,51423,51424,51425,51426,51427,51428,51429,51430,51431,51432,51433,51434,51435,51436,51437,51438,51439,51440,51441,51442,51443,51444,51445,51446,51447,51448,51449,51450,51451,51452,51453,51454,51455,51456,51457,51458,51459,51460,51461,51462,51463,51464,51465,51466,51467,51468,51469,51470,51471,51472,51473,51474,51475,51476,51477,51478,51479,51480,51481,51482,51483,51484,51485,51486,51487,51488,51489,51490,51491,51492,51493,51494,51495,51496,51497,51498,51499,51500,51501,51502,51503,51504,51505,51506,51507,51508,51509,51510,51511,51512,51513,51514,51515,51516,51517,51518,51519,51520,51521,51522,51523,51524,51525,51526,51527,51528,51529,51530,51531,51532,51533,51534,51535,51536,51537,51538,51539,51540,51541,51542,51543,51544,51545,51546,51547,51548,51549,51550,51551,51552,51553,51554,51555,51556,51557,51558,51559,51560,51561,51562,51563,51564,51565,51566,51567,51568,51569,51570,51571,51572,51573,51574,51575,51576,51577,51578,51579,51580,51581,51582,51583,51584,51585,51586,51587,51588,51589,51590,51591,51592,51593,51594,51595,51596,51597,51598,51599,51600,51601,51602,51603,51604,51605,51606,51607,51608,51609,51610,51611,51612,51613,51614,51615,51616,51617,51618,51619,51620,51621,51622,51623,51624,51625,51626,51627,51628,51629,51630,51631,51632,51633,51634,51635,51636,51637,51638,51639,51640,51641,51642,51643,51644,51645,51646,51647,51648,51649,51650,51651,51652,51653,51654,51655,51656,51657,51658,51659,51660,51661,51662,51663,51664,51665,51666,51667,51668,51669,51670,51671,51672,51673,51674,51675,51676,51677,51678,51679,51680,51681,51682,51683,51684,51685,51686,51687,51688,51689,51690,51691,51692,51693,51694,51695,51696,51697,51698,51699,51700,51701,51702,51703,51704,51705,51706,51707,51708,51709,51710,51711,51712,51713,51714,51715,51716,51717,51718,51719,51720,51721,51722,51723,51724,51725,51726,51727,51728,51729,51730,51731,51732,51733,51734,51735,51736,51737,51738,51739,51740,51741,51742,51743,51744,51745,51746,51747,51748,51749,51750,51751,51752,51753,51754,51755,51756,51757,51758,51759,51760,51761,51762,51763,51764,51765,51766,51767,51768,51769,51770,51771,51772,51773,51774,51775,51776,51777,51778,51779,51780,51781,51782,51783,51784,51785,51786,51787,51788,51789,51790,51791,51792,51793,51794,51795,51796,51797,51798,51799,51800,51801,51802,51803,51804,51805,51806,51807,51808,51809,51810,51811,51812,51813,51814,51815,51816,51817,51818,51819,51820,51821,51822,51823,51824,51825,51826,51827,51828,51829,51830,51831,51832,51833,51834,51835,51836,51837,51838,51839,51840,51841,51842,51843,51844,51845,51846,51847,51848,51849,51850,51851,51852,51853,51854,51855,51856,51857,51858,51859,51860,51861,51862,51863,51864,51865,51866,51867,51868,51869,51870,51871,51872,51873,51874,51875,51876,51877,51878,51879,51880,51881,51882,51883,51884,51885,51886,51887,51888,51889,51890,51891,51892,51893,51894,51895,51896,51897,51898,51899,51900,51901,51902,51903,51904,51905,51906,51907,51908,51909,51910,51911,51912,51913,51914,51915,51916,51917,51918,51919,51920,51921,51922,51923,51924,51925,51926,51927,51928,51929,51930,51931,51932,51933,51934,51935,51936,51937,51938,51939,51940,51941,51942,51943,51944,51945,51946,51947,51948,51949,51950,51951,51952,51953,51954,51955,51956,51957,51958,51959,51960,51961,51962,51963,51964,51965,51966,51967,51968,51969,51970,51971,51972,51973,51974,51975,51976,51977,51978,51979,51980,51981,51982,51983,51984,51985,51986,51987,51988,51989,51990,51991,51992,51993,51994,51995,51996,51997,51998,51999,52000,52001,52002,52003,52004,52005,52006,52007,52008,52009,52010,52011,52012,52013,52014,52015,52016,52017,52018,52019,52020,52021,52022,52023,52024,52025,52026,52027,52028,52029,52030,52031,52032,52033,52034,52035,52036,52037,52038,52039,52040,52041,52042,52043,52044,52045,52046,52047,52048,52049,52050,52051,52052,52053,52054,52055,52056,52057,52058,52059,52060,52061,52062,52063,52064,52065,52066,52067,52068,52069,52070,52071,52072,52073,52074,52075,52076,52077,52078,52079,52080,52081,52082,52083,52084,52085,52086,52087,52088,52089,52090,52091,52092,52093,52094,52095,52096,52097,52098,52099,52100,52101,52102,52103,52104,52105,52106,52107,52108,52109,52110,52111,52112,52113,52114,52115,52116,52117,52118,52119,52120,52121,52122,52123,52124,52125,52126,52127,52128,52129,52130,52131,52132,52133,52134,52135,52136,52137,52138,52139,52140,52141,52142,52143,52144,52145,52146,52147,52148,52149,52150,52151,52152,52153,52154,52155,52156,52157,52158,52159,52160,52161,52162,52163,52164,52165,52166,52167,52168,52169,52170,52171,52172,52173,52174,52175,52176,52177,52178,52179,52180,52181,52182,52183,52184,52185,52186,52187,52188,52189,52190,52191,52192,52193,52194,52195,52196,52197,52198,52199,52200,52201,52202,52203,52204,52205,52206,52207,52208,52209,52210,52211,52212,52213,52214,52215,52216,52217,52218,52219,52220,52221,52222,52223,52224,52225,52226,52227,52228,52229,52230,52231,52232,52233,52234,52235,52236,52237,52238,52239,52240,52241,52242,52243,52244,52245,52246,52247,52248,52249,52250,52251,52252,52253,52254,52255,52256,52257,52258,52259,52260,52261,52262,52263,52264,52265,52266,52267,52268,52269,52270,52271,52272,52273,52274,52275,52276,52277,52278,52279,52280,52281,52282,52283,52284,52285,52286,52287,52288,52289,52290,52291,52292,52293,52294,52295,52296,52297,52298,52299,52300,52301,52302,52303,52304,52305,52306,52307,52308,52309,52310,52311,52312,52313,52314,52315,52316,52317,52318,52319,52320,52321,52322,52323,52324,52325,52326,52327,52328,52329,52330,52331,52332,52333,52334,52335,52336,52337,52338,52339,52340,52341,52342,52343,52344,52345,52346,52347,52348,52349,52350,52351,52352,52353,52354,52355,52356,52357,52358,52359,52360,52361,52362,52363,52364,52365,52366,52367,52368,52369,52370,52371,52372,52373,52374,52375,52376,52377,52378,52379,52380,52381,52382,52383,52384,52385,52386,52387,52388,52389,52390,52391,52392,52393,52394,52395,52396,52397,52398,52399,52400,52401,52402,52403,52404,52405,52406,52407,52408,52409,52410,52411,52412,52413,52414,52415,52416,52417,52418,52419,52420,52421,52422,52423,52424,52425,52426,52427,52428,52429,52430,52431,52432,52433,52434,52435,52436,52437,52438,52439,52440,52441,52442,52443,52444,52445,52446,52447,52448,52449,52450,52451,52452,52453,52454,52455,52456,52457,52458,52459,52460,52461,52462,52463,52464,52465,52466,52467,52468,52469,52470,52471,52472,52473,52474,52475,52476,52477,52478,52479,52480,52481,52482,52483,52484,52485,52486,52487,52488,52489,52490,52491,52492,52493,52494,52495,52496,52497,52498,52499,52500,52501,52502,52503,52504,52505,52506,52507,52508,52509,52510,52511,52512,52513,52514,52515,52516,52517,52518,52519,52520,52521,52522,52523,52524,52525,52526,52527,52528,52529,52530,52531,52532,52533,52534,52535,52536,52537,52538,52539,52540,52541,52542,52543,52544,52545,52546,52547,52548,52549,52550,52551,52552,52553,52554,52555,52556,52557,52558,52559,52560,52561,52562,52563,52564,52565,52566,52567,52568,52569,52570,52571,52572,52573,52574,52575,52576,52577,52578,52579,52580,52581,52582,52583,52584,52585,52586,52587,52588,52589,52590,52591,52592,52593,52594,52595,52596,52597,52598,52599,52600,52601,52602,52603,52604,52605,52606,52607,52608,52609,52610,52611,52612,52613,52614,52615,52616,52617,52618,52619,52620,52621,52622,52623,52624,52625,52626,52627,52628,52629,52630,52631,52632,52633,52634,52635,52636,52637,52638,52639,52640,52641,52642,52643,52644,52645,52646,52647,52648,52649,52650,52651,52652,52653,52654,52655,52656,52657,52658,52659,52660,52661,52662,52663,52664,52665,52666,52667,52668,52669,52670,52671,52672,52673,52674,52675,52676,52677,52678,52679,52680,52681,52682,52683,52684,52685,52686,52687,52688,52689,52690,52691,52692,52693,52694,52695,52696,52697,52698,52699,52700,52701,52702,52703,52704,52705,52706,52707,52708,52709,52710,52711,52712,52713,52714,52715,52716,52717,52718,52719,52720,52721,52722,52723,52724,52725,52726,52727,52728,52729,52730,52731,52732,52733,52734,52735,52736,52737,52738,52739,52740,52741,52742,52743,52744,52745,52746,52747,52748,52749,52750,52751,52752,52753,52754,52755,52756,52757,52758,52759,52760,52761,52762,52763,52764,52765,52766,52767,52768,52769,52770,52771,52772,52773,52774,52775,52776,52777,52778,52779,52780,52781,52782,52783,52784,52785,52786,52787,52788,52789,52790,52791,52792,52793,52794,52795,52796,52797,52798,52799,52800,52801,52802,52803,52804,52805,52806,52807,52808,52809,52810,52811,52812,52813,52814,52815,52816,52817,52818,52819,52820,52821,52822,52823,52824,52825,52826,52827,52828,52829,52830,52831,52832,52833,52834,52835,52836,52837,52838,52839,52840,52841,52842,52843,52844,52845,52846,52847,52848,52849,52850,52851,52852,52853,52854,52855,52856,52857,52858,52859,52860,52861,52862,52863,52864,52865,52866,52867,52868,52869,52870,52871,52872,52873,52874,52875,52876,52877,52878,52879,52880,52881,52882,52883,52884,52885,52886,52887,52888,52889,52890,52891,52892,52893,52894,52895,52896,52897,52898,52899,52900,52901,52902,52903,52904,52905,52906,52907,52908,52909,52910,52911,52912,52913,52914,52915,52916,52917,52918,52919,52920,52921,52922,52923,52924,52925,52926,52927,52928,52929,52930,52931,52932,52933,52934,52935,52936,52937,52938,52939,52940,52941,52942,52943,52944,52945,52946,52947,52948,52949,52950,52951,52952,52953,52954,52955,52956,52957,52958,52959,52960,52961,52962,52963,52964,52965,52966,52967,52968,52969,52970,52971,52972,52973,52974,52975,52976,52977,52978,52979,52980,52981,52982,52983,52984,52985,52986,52987,52988,52989,52990,52991,52992,52993,52994,52995,52996,52997,52998,52999,53000,53001,53002,53003,53004,53005,53006,53007,53008,53009,53010,53011,53012,53013,53014,53015,53016,53017,53018,53019,53020,53021,53022,53023,53024,53025,53026,53027,53028,53029,53030,53031,53032,53033,53034,53035,53036,53037,53038,53039,53040,53041,53042,53043,53044,53045,53046,53047,53048,53049,53050,53051,53052,53053,53054,53055,53056,53057,53058,53059,53060,53061,53062,53063,53064,53065,53066,53067,53068,53069,53070,53071,53072,53073,53074,53075,53076,53077,53078,53079,53080,53081,53082,53083,53084,53085,53086,53087,53088,53089,53090,53091,53092,53093,53094,53095,53096,53097,53098,53099,53100,53101,53102,53103,53104,53105,53106,53107,53108,53109,53110,53111,53112,53113,53114,53115,53116,53117,53118,53119,53120,53121,53122,53123,53124,53125,53126,53127,53128,53129,53130,53131,53132,53133,53134,53135,53136,53137,53138,53139,53140,53141,53142,53143,53144,53145,53146,53147,53148,53149,53150,53151,53152,53153,53154,53155,53156,53157,53158,53159,53160,53161,53162,53163,53164,53165,53166,53167,53168,53169,53170,53171,53172,53173,53174,53175,53176,53177,53178,53179,53180,53181,53182,53183,53184,53185,53186,53187,53188,53189,53190,53191,53192,53193,53194,53195,53196,53197,53198,53199,53200,53201,53202,53203,53204,53205,53206,53207,53208,53209,53210,53211,53212,53213,53214,53215,53216,53217,53218,53219,53220,53221,53222,53223,53224,53225,53226,53227,53228,53229,53230,53231,53232,53233,53234,53235,53236,53237,53238,53239,53240,53241,53242,53243,53244,53245,53246,53247,53248,53249,53250,53251,53252,53253,53254,53255,53256,53257,53258,53259,53260,53261,53262,53263,53264,53265,53266,53267,53268,53269,53270,53271,53272,53273,53274,53275,53276,53277,53278,53279,53280,53281,53282,53283,53284,53285,53286,53287,53288,53289,53290,53291,53292,53293,53294,53295,53296,53297,53298,53299,53300,53301,53302,53303,53304,53305,53306,53307,53308,53309,53310,53311,53312,53313,53314,53315,53316,53317,53318,53319,53320,53321,53322,53323,53324,53325,53326,53327,53328,53329,53330,53331,53332,53333,53334,53335,53336,53337,53338,53339,53340,53341,53342,53343,53344,53345,53346,53347,53348,53349,53350,53351,53352,53353,53354,53355,53356,53357,53358,53359,53360,53361,53362,53363,53364,53365,53366,53367,53368,53369,53370,53371,53372,53373,53374,53375,53376,53377,53378,53379,53380,53381,53382,53383,53384,53385,53386,53387,53388,53389,53390,53391,53392,53393,53394,53395,53396,53397,53398,53399,53400,53401,53402,53403,53404,53405,53406,53407,53408,53409,53410,53411,53412,53413,53414,53415,53416,53417,53418,53419,53420,53421,53422,53423,53424,53425,53426,53427,53428,53429,53430,53431,53432,53433,53434,53435,53436,53437,53438,53439,53440,53441,53442,53443,53444,53445,53446,53447,53448,53449,53450,53451,53452,53453,53454,53455,53456,53457,53458,53459,53460,53461,53462,53463,53464,53465,53466,53467,53468,53469,53470,53471,53472,53473,53474,53475,53476,53477,53478,53479,53480,53481,53482,53483,53484,53485,53486,53487,53488,53489,53490,53491,53492,53493,53494,53495,53496,53497,53498,53499,53500,53501,53502,53503,53504,53505,53506,53507,53508,53509,53510,53511,53512,53513,53514,53515,53516,53517,53518,53519,53520,53521,53522,53523,53524,53525,53526,53527,53528,53529,53530,53531,53532,53533,53534,53535,53536,53537,53538,53539,53540,53541,53542,53543,53544,53545,53546,53547,53548,53549,53550,53551,53552,53553,53554,53555,53556,53557,53558,53559,53560,53561,53562,53563,53564,53565,53566,53567,53568,53569,53570,53571,53572,53573,53574,53575,53576,53577,53578,53579,53580,53581,53582,53583,53584,53585,53586,53587,53588,53589,53590,53591,53592,53593,53594,53595,53596,53597,53598,53599,53600,53601,53602,53603,53604,53605,53606,53607,53608,53609,53610,53611,53612,53613,53614,53615,53616,53617,53618,53619,53620,53621,53622,53623,53624,53625,53626,53627,53628,53629,53630,53631,53632,53633,53634,53635,53636,53637,53638,53639,53640,53641,53642,53643,53644,53645,53646,53647,53648,53649,53650,53651,53652,53653,53654,53655,53656,53657,53658,53659,53660,53661,53662,53663,53664,53665,53666,53667,53668,53669,53670,53671,53672,53673,53674,53675,53676,53677,53678,53679,53680,53681,53682,53683,53684,53685,53686,53687,53688,53689,53690,53691,53692,53693,53694,53695,53696,53697,53698,53699,53700,53701,53702,53703,53704,53705,53706,53707,53708,53709,53710,53711,53712,53713,53714,53715,53716,53717,53718,53719,53720,53721,53722,53723,53724,53725,53726,53727,53728,53729,53730,53731,53732,53733,53734,53735,53736,53737,53738,53739,53740,53741,53742,53743,53744,53745,53746,53747,53748,53749,53750,53751,53752,53753,53754,53755,53756,53757,53758,53759,53760,53761,53762,53763,53764,53765,53766,53767,53768,53769,53770,53771,53772,53773,53774,53775,53776,53777,53778,53779,53780,53781,53782,53783,53784,53785,53786,53787,53788,53789,53790,53791,53792,53793,53794,53795,53796,53797,53798,53799,53800,53801,53802,53803,53804,53805,53806,53807,53808,53809,53810,53811,53812,53813,53814,53815,53816,53817,53818,53819,53820,53821,53822,53823,53824,53825,53826,53827,53828,53829,53830,53831,53832,53833,53834,53835,53836,53837,53838,53839,53840,53841,53842,53843,53844,53845,53846,53847,53848,53849,53850,53851,53852,53853,53854,53855,53856,53857,53858,53859,53860,53861,53862,53863,53864,53865,53866,53867,53868,53869,53870,53871,53872,53873,53874,53875,53876,53877,53878,53879,53880,53881,53882,53883,53884,53885,53886,53887,53888,53889,53890,53891,53892,53893,53894,53895,53896,53897,53898,53899,53900,53901,53902,53903,53904,53905,53906,53907,53908,53909,53910,53911,53912,53913,53914,53915,53916,53917,53918,53919,53920,53921,53922,53923,53924,53925,53926,53927,53928,53929,53930,53931,53932,53933,53934,53935,53936,53937,53938,53939,53940,53941,53942,53943,53944,53945,53946,53947,53948,53949,53950,53951,53952,53953,53954,53955,53956,53957,53958,53959,53960,53961,53962,53963,53964,53965,53966,53967,53968,53969,53970,53971,53972,53973,53974,53975,53976,53977,53978,53979,53980,53981,53982,53983,53984,53985,53986,53987,53988,53989,53990,53991,53992,53993,53994,53995,53996,53997,53998,53999,54000,54001,54002,54003,54004,54005,54006,54007,54008,54009,54010,54011,54012,54013,54014,54015,54016,54017,54018,54019,54020,54021,54022,54023,54024,54025,54026,54027,54028,54029,54030,54031,54032,54033,54034,54035,54036,54037,54038,54039,54040,54041,54042,54043,54044,54045,54046,54047,54048,54049,54050,54051,54052,54053,54054,54055,54056,54057,54058,54059,54060,54061,54062,54063,54064,54065,54066,54067,54068,54069,54070,54071,54072,54073,54074,54075,54076,54077,54078,54079,54080,54081,54082,54083,54084,54085,54086,54087,54088,54089,54090,54091,54092,54093,54094,54095,54096,54097,54098,54099,54100,54101,54102,54103,54104,54105,54106,54107,54108,54109,54110,54111,54112,54113,54114,54115,54116,54117,54118,54119,54120,54121,54122,54123,54124,54125,54126,54127,54128,54129,54130,54131,54132,54133,54134,54135,54136,54137,54138,54139,54140,54141,54142,54143,54144,54145,54146,54147,54148,54149,54150,54151,54152,54153,54154,54155,54156,54157,54158,54159,54160,54161,54162,54163,54164,54165,54166,54167,54168,54169,54170,54171,54172,54173,54174,54175,54176,54177,54178,54179,54180,54181,54182,54183,54184,54185,54186,54187,54188,54189,54190,54191,54192,54193,54194,54195,54196,54197,54198,54199,54200,54201,54202,54203,54204,54205,54206,54207,54208,54209,54210,54211,54212,54213,54214,54215,54216,54217,54218,54219,54220,54221,54222,54223,54224,54225,54226,54227,54228,54229,54230,54231,54232,54233,54234,54235,54236,54237,54238,54239,54240,54241,54242,54243,54244,54245,54246,54247,54248,54249,54250,54251,54252,54253,54254,54255,54256,54257,54258,54259,54260,54261,54262,54263,54264,54265,54266,54267,54268,54269,54270,54271,54272,54273,54274,54275,54276,54277,54278,54279,54280,54281,54282,54283,54284,54285,54286,54287,54288,54289,54290,54291,54292,54293,54294,54295,54296,54297,54298,54299,54300,54301,54302,54303,54304,54305,54306,54307,54308,54309,54310,54311,54312,54313,54314,54315,54316,54317,54318,54319,54320,54321,54322,54323,54324,54325,54326,54327,54328,54329,54330,54331,54332,54333,54334,54335,54336,54337,54338,54339,54340,54341,54342,54343,54344,54345,54346,54347,54348,54349,54350,54351,54352,54353,54354,54355,54356,54357,54358,54359,54360,54361,54362,54363,54364,54365,54366,54367,54368,54369,54370,54371,54372,54373,54374,54375,54376,54377,54378,54379,54380,54381,54382,54383,54384,54385,54386,54387,54388,54389,54390,54391,54392,54393,54394,54395,54396,54397,54398,54399,54400,54401,54402,54403,54404,54405,54406,54407,54408,54409,54410,54411,54412,54413,54414,54415,54416,54417,54418,54419,54420,54421,54422,54423,54424,54425,54426,54427,54428,54429,54430,54431,54432,54433,54434,54435,54436,54437,54438,54439,54440,54441,54442,54443,54444,54445,54446,54447,54448,54449,54450,54451,54452,54453,54454,54455,54456,54457,54458,54459,54460,54461,54462,54463,54464,54465,54466,54467,54468,54469,54470,54471,54472,54473,54474,54475,54476,54477,54478,54479,54480,54481,54482,54483,54484,54485,54486,54487,54488,54489,54490,54491,54492,54493,54494,54495,54496,54497,54498,54499,54500,54501,54502,54503,54504,54505,54506,54507,54508,54509,54510,54511,54512,54513,54514,54515,54516,54517,54518,54519,54520,54521,54522,54523,54524,54525,54526,54527,54528,54529,54530,54531,54532,54533,54534,54535,54536,54537,54538,54539,54540,54541,54542,54543,54544,54545,54546,54547,54548,54549,54550,54551,54552,54553,54554,54555,54556,54557,54558,54559,54560,54561,54562,54563,54564,54565,54566,54567,54568,54569,54570,54571,54572,54573,54574,54575,54576,54577,54578,54579,54580,54581,54582,54583,54584,54585,54586,54587,54588,54589,54590,54591,54592,54593,54594,54595,54596,54597,54598,54599,54600,54601,54602,54603,54604,54605,54606,54607,54608,54609,54610,54611,54612,54613,54614,54615,54616,54617,54618,54619,54620,54621,54622,54623,54624,54625,54626,54627,54628,54629,54630,54631,54632,54633,54634,54635,54636,54637,54638,54639,54640,54641,54642,54643,54644,54645,54646,54647,54648,54649,54650,54651,54652,54653,54654,54655,54656,54657,54658,54659,54660,54661,54662,54663,54664,54665,54666,54667,54668,54669,54670,54671,54672,54673,54674,54675,54676,54677,54678,54679,54680,54681,54682,54683,54684,54685,54686,54687,54688,54689,54690,54691,54692,54693,54694,54695,54696,54697,54698,54699,54700,54701,54702,54703,54704,54705,54706,54707,54708,54709,54710,54711,54712,54713,54714,54715,54716,54717,54718,54719,54720,54721,54722,54723,54724,54725,54726,54727,54728,54729,54730,54731,54732,54733,54734,54735,54736,54737,54738,54739,54740,54741,54742,54743,54744,54745,54746,54747,54748,54749,54750,54751,54752,54753,54754,54755,54756,54757,54758,54759,54760,54761,54762,54763,54764,54765,54766,54767,54768,54769,54770,54771,54772,54773,54774,54775,54776,54777,54778,54779,54780,54781,54782,54783,54784,54785,54786,54787,54788,54789,54790,54791,54792,54793,54794,54795,54796,54797,54798,54799,54800,54801,54802,54803,54804,54805,54806,54807,54808,54809,54810,54811,54812,54813,54814,54815,54816,54817,54818,54819,54820,54821,54822,54823,54824,54825,54826,54827,54828,54829,54830,54831,54832,54833,54834,54835,54836,54837,54838,54839,54840,54841,54842,54843,54844,54845,54846,54847,54848,54849,54850,54851,54852,54853,54854,54855,54856,54857,54858,54859,54860,54861,54862,54863,54864,54865,54866,54867,54868,54869,54870,54871,54872,54873,54874,54875,54876,54877,54878,54879,54880,54881,54882,54883,54884,54885,54886,54887,54888,54889,54890,54891,54892,54893,54894,54895,54896,54897,54898,54899,54900,54901,54902,54903,54904,54905,54906,54907,54908,54909,54910,54911,54912,54913,54914,54915,54916,54917,54918,54919,54920,54921,54922,54923,54924,54925,54926,54927,54928,54929,54930,54931,54932,54933,54934,54935,54936,54937,54938,54939,54940,54941,54942,54943,54944,54945,54946,54947,54948,54949,54950,54951,54952,54953,54954,54955,54956,54957,54958,54959,54960,54961,54962,54963,54964,54965,54966,54967,54968,54969,54970,54971,54972,54973,54974,54975,54976,54977,54978,54979,54980,54981,54982,54983,54984,54985,54986,54987,54988,54989,54990,54991,54992,54993,54994,54995,54996,54997,54998,54999,55000,55001,55002,55003,55004,55005,55006,55007,55008,55009,55010,55011,55012,55013,55014,55015,55016,55017,55018,55019,55020,55021,55022,55023,55024,55025,55026,55027,55028,55029,55030,55031,55032,55033,55034,55035,55036,55037,55038,55039,55040,55041,55042,55043,55044,55045,55046,55047,55048,55049,55050,55051,55052,55053,55054,55055,55056,55057,55058,55059,55060,55061,55062,55063,55064,55065,55066,55067,55068,55069,55070,55071,55072,55073,55074,55075,55076,55077,55078,55079,55080,55081,55082,55083,55084,55085,55086,55087,55088,55089,55090,55091,55092,55093,55094,55095,55096,55097,55098,55099,55100,55101,55102,55103,55104,55105,55106,55107,55108,55109,55110,55111,55112,55113,55114,55115,55116,55117,55118,55119,55120,55121,55122,55123,55124,55125,55126,55127,55128,55129,55130,55131,55132,55133,55134,55135,55136,55137,55138,55139,55140,55141,55142,55143,55144,55145,55146,55147,55148,55149,55150,55151,55152,55153,55154,55155,55156,55157,55158,55159,55160,55161,55162,55163,55164,55165,55166,55167,55168,55169,55170,55171,55172,55173,55174,55175,55176,55177,55178,55179,55180,55181,55182,55183,55184,55185,55186,55187,55188,55189,55190,55191,55192,55193,55194,55195,55196,55197,55198,55199,55200,55201,55202,55203,55216,55217,55218,55219,55220,55221,55222,55223,55224,55225,55226,55227,55228,55229,55230,55231,55232,55233,55234,55235,55236,55237,55238,55243,55244,55245,55246,55247,55248,55249,55250,55251,55252,55253,55254,55255,55256,55257,55258,55259,55260,55261,55262,55263,55264,55265,55266,55267,55268,55269,55270,55271,55272,55273,55274,55275,55276,55277,55278,55279,55280,55281,55282,55283,55284,55285,55286,55287,55288,55289,55290,55291,63744,63745,63746,63747,63748,63749,63750,63751,63752,63753,63754,63755,63756,63757,63758,63759,63760,63761,63762,63763,63764,63765,63766,63767,63768,63769,63770,63771,63772,63773,63774,63775,63776,63777,63778,63779,63780,63781,63782,63783,63784,63785,63786,63787,63788,63789,63790,63791,63792,63793,63794,63795,63796,63797,63798,63799,63800,63801,63802,63803,63804,63805,63806,63807,63808,63809,63810,63811,63812,63813,63814,63815,63816,63817,63818,63819,63820,63821,63822,63823,63824,63825,63826,63827,63828,63829,63830,63831,63832,63833,63834,63835,63836,63837,63838,63839,63840,63841,63842,63843,63844,63845,63846,63847,63848,63849,63850,63851,63852,63853,63854,63855,63856,63857,63858,63859,63860,63861,63862,63863,63864,63865,63866,63867,63868,63869,63870,63871,63872,63873,63874,63875,63876,63877,63878,63879,63880,63881,63882,63883,63884,63885,63886,63887,63888,63889,63890,63891,63892,63893,63894,63895,63896,63897,63898,63899,63900,63901,63902,63903,63904,63905,63906,63907,63908,63909,63910,63911,63912,63913,63914,63915,63916,63917,63918,63919,63920,63921,63922,63923,63924,63925,63926,63927,63928,63929,63930,63931,63932,63933,63934,63935,63936,63937,63938,63939,63940,63941,63942,63943,63944,63945,63946,63947,63948,63949,63950,63951,63952,63953,63954,63955,63956,63957,63958,63959,63960,63961,63962,63963,63964,63965,63966,63967,63968,63969,63970,63971,63972,63973,63974,63975,63976,63977,63978,63979,63980,63981,63982,63983,63984,63985,63986,63987,63988,63989,63990,63991,63992,63993,63994,63995,63996,63997,63998,63999,64000,64001,64002,64003,64004,64005,64006,64007,64008,64009,64010,64011,64012,64013,64014,64015,64016,64017,64018,64019,64020,64021,64022,64023,64024,64025,64026,64027,64028,64029,64030,64031,64032,64033,64034,64035,64036,64037,64038,64039,64040,64041,64042,64043,64044,64045,64046,64047,64048,64049,64050,64051,64052,64053,64054,64055,64056,64057,64058,64059,64060,64061,64062,64063,64064,64065,64066,64067,64068,64069,64070,64071,64072,64073,64074,64075,64076,64077,64078,64079,64080,64081,64082,64083,64084,64085,64086,64087,64088,64089,64090,64091,64092,64093,64094,64095,64096,64097,64098,64099,64100,64101,64102,64103,64104,64105,64106,64107,64108,64109,64112,64113,64114,64115,64116,64117,64118,64119,64120,64121,64122,64123,64124,64125,64126,64127,64128,64129,64130,64131,64132,64133,64134,64135,64136,64137,64138,64139,64140,64141,64142,64143,64144,64145,64146,64147,64148,64149,64150,64151,64152,64153,64154,64155,64156,64157,64158,64159,64160,64161,64162,64163,64164,64165,64166,64167,64168,64169,64170,64171,64172,64173,64174,64175,64176,64177,64178,64179,64180,64181,64182,64183,64184,64185,64186,64187,64188,64189,64190,64191,64192,64193,64194,64195,64196,64197,64198,64199,64200,64201,64202,64203,64204,64205,64206,64207,64208,64209,64210,64211,64212,64213,64214,64215,64216,64217,64256,64257,64258,64259,64260,64261,64262,64275,64276,64277,64278,64279,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65382,65383,65384,65385,65386,65387,65388,65389,65390,65391,65392,65393,65394,65395,65396,65397,65398,65399,65400,65401,65402,65403,65404,65405,65406,65407,65408,65409,65410,65411,65412,65413,65414,65415,65416,65417,65418,65419,65420,65421,65422,65423,65424,65425,65426,65427,65428,65429,65430,65431,65432,65433,65434,65435,65436,65437,65438,65439,65440,65441,65442,65443,65444,65445,65446,65447,65448,65449,65450,65451,65452,65453,65454,65455,65456,65457,65458,65459,65460,65461,65462,65463,65464,65465,65466,65467,65468,65469,65470,65474,65475,65476,65477,65478,65479,65482,65483,65484,65485,65486,65487,65490,65491,65492,65493,65494,65495,65498,65499,65500'; -var arr = str.split(',').map(function(code) { - return parseInt(code, 10); -}); -module.exports = arr; -},{}],"/../../jshint/node_modules/console-browserify/index.js":[function(_dereq_,module,exports){ -(function (global){ -var util = _dereq_("util") -var assert = _dereq_("assert") -var now = _dereq_("date-now") - -var slice = Array.prototype.slice -var console -var times = {} - -if (typeof global !== "undefined" && global.console) { - console = global.console -} else if (typeof window !== "undefined" && window.console) { - console = window.console -} else { - console = {} -} - -var functions = [ - [log, "log"], - [info, "info"], - [warn, "warn"], - [error, "error"], - [time, "time"], - [timeEnd, "timeEnd"], - [trace, "trace"], - [dir, "dir"], - [consoleAssert, "assert"] -] - -for (var i = 0; i < functions.length; i++) { - var tuple = functions[i] - var f = tuple[0] - var name = tuple[1] - - if (!console[name]) { - console[name] = f - } -} - -module.exports = console - -function log() {} - -function info() { - console.log.apply(console, arguments) -} - -function warn() { - console.log.apply(console, arguments) -} - -function error() { - console.warn.apply(console, arguments) -} - -function time(label) { - times[label] = now() -} - -function timeEnd(label) { - var time = times[label] - if (!time) { - throw new Error("No such label: " + label) - } - - var duration = now() - time - console.log(label + ": " + duration + "ms") -} - -function trace() { - var err = new Error() - err.name = "Trace" - err.message = util.format.apply(null, arguments) - console.error(err.stack) -} - -function dir(object) { - console.log(util.inspect(object) + "\n") -} - -function consoleAssert(expression) { - if (!expression) { - var arr = slice.call(arguments, 1) - assert.ok(false, util.format.apply(null, arr)) - } -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"assert":"/../node_modules/assert/assert.js","date-now":"/../../jshint/node_modules/date-now/index.js","util":"/../node_modules/util/util.js"}],"/../../jshint/node_modules/date-now/index.js":[function(_dereq_,module,exports){ -module.exports = now - -function now() { - return new Date().getTime() -} - -},{}],"/../../jshint/node_modules/lodash.clone/index.js":[function(_dereq_,module,exports){ -(function (global){ -var LARGE_ARRAY_SIZE = 200; -var HASH_UNDEFINED = '__lodash_hash_undefined__'; -var MAX_SAFE_INTEGER = 9007199254740991; -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; -var reFlags = /\w*$/; -var reIsHostCtor = /^\[object .+?Constructor\]$/; -var reIsUint = /^(?:0|[1-9]\d*)$/; -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; -var root = freeGlobal || freeSelf || Function('return this')(); -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; -var moduleExports = freeModule && freeModule.exports === freeExports; -function addMapEntry(map, pair) { - map.set(pair[0], pair[1]); - return map; -} -function addSetEntry(set, value) { - set.add(value); - return set; -} -function arrayEach(array, iteratee) { - var index = -1, - length = array ? array.length : 0; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array ? array.length : 0; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} -function getValue(object, key) { - return object == null ? undefined : object[key]; -} -function isHostObject(value) { - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} -var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; -var coreJsData = root['__core-js_shared__']; -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); -var funcToString = funcProto.toString; -var hasOwnProperty = objectProto.hasOwnProperty; -var objectToString = objectProto.toString; -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); -var Buffer = moduleExports ? root.Buffer : undefined, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - getPrototype = overArg(Object.getPrototypeOf, Object), - objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; -var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); -var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; -function Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; -} -function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; -} -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); -} -function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; -function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} -function listCacheClear() { - this.__data__ = []; -} -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; -} -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; -function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} -function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} -function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); -} -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} -function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; -} -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; -function Stack(entries) { - this.__data__ = new ListCache(entries); -} -function stackClear() { - this.__data__ = new ListCache; -} -function stackDelete(key) { - return this.__data__['delete'](key); -} -function stackGet(key) { - return this.__data__.get(key); -} -function stackHas(key) { - return this.__data__.has(key); -} -function stackSet(key, value) { - var cache = this.__data__; - if (cache instanceof ListCache) { - var pairs = cache.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - return this; - } - cache = this.__data__ = new MapCache(pairs); - } - cache.set(key, value); - return this; -} -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; -function arrayLikeKeys(value, inherited) { - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; - - var length = result.length, - skipIndexes = !!length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && (key == 'length' || isIndex(key, length)))) { - result.push(key); - } - } - return result; -} -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - object[key] = value; - } -} -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} -function baseClone(value, isDeep, isFull, customizer, key, object, stack) { - var result; - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, baseClone, isDeep); - } - } - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); - } - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); - }); - return result; -} -function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; -} -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} -function baseGetTag(value) { - return objectToString.call(value); -} -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var result = new buffer.constructor(buffer.length); - buffer.copy(result); - return result; -} -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} -function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); -} -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} -function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); -} -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} -function copyObject(source, props, object, customizer) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - assignValue(object, key, newValue === undefined ? source[key] : newValue); - } - return object; -} -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} -var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; -var getTag = baseGetTag; -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} -function initCloneArray(array) { - var length = array.length, - result = array.constructor(length); - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} -function initCloneByTag(object, tag, cloneFunc, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return cloneMap(object, isDeep, cloneFunc); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return cloneSet(object, isDeep, cloneFunc); - - case symbolTag: - return cloneSymbol(object); - } -} -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} -function clone(value) { - return baseClone(value, false, true); -} -function eq(value, other) { - return value === other || (value !== value && other !== other); -} -function isArguments(value) { - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} -var isArray = Array.isArray; -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} -var isBuffer = nativeIsBuffer || stubFalse; -function isFunction(value) { - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} -function stubArray() { - return []; -} -function stubFalse() { - return false; -} - -module.exports = clone; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],"/../../jshint/node_modules/lodash.slice/index.js":[function(_dereq_,module,exports){ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - symbolTag = '[object Symbol]'; -var reTrim = /^\s+|\s+$/g; -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; -var reIsBinary = /^0b[01]+$/i; -var reIsOctal = /^0o[0-7]+$/i; -var reIsUint = /^(?:0|[1-9]\d*)$/; -var freeParseInt = parseInt; -var objectProto = Object.prototype; -var objectToString = objectProto.toString; -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} -function slice(array, start, end) { - var length = array ? array.length : 0; - if (!length) { - return []; - } - if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } - else { - start = start == null ? 0 : toInteger(start); - end = end === undefined ? length : toInteger(end); - } - return baseSlice(array, start, end); -} -function eq(value, other) { - return value === other || (value !== value && other !== other); -} -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} -function isFunction(value) { - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = slice; - -},{}],"/../../jshint/node_modules/underscore/underscore.js":[function(_dereq_,module,exports){ -(function (global){ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('underscore', factory) : - (function() { - var current = global._; - var exports = factory(); - global._ = exports; - exports.noConflict = function() { global._ = current; return exports; }; - })(); -}(this, (function () { - var root = typeof self == 'object' && self.self === self && self || - typeof global == 'object' && global.global === global && global || - Function('return this')() || - {}; - var ArrayProto = Array.prototype, ObjProto = Object.prototype; - var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; - var push = ArrayProto.push, - slice = ArrayProto.slice, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - var nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeCreate = Object.create; - var _isNaN = root.isNaN, - _isFinite = root.isFinite; - var Ctor = function(){}; - function _(obj) { - if (obj instanceof _) return obj; - if (!(this instanceof _)) return new _(obj); - this._wrapped = obj; - } - var VERSION = _.VERSION = '1.10.2'; - function optimizeCb(func, context, argCount) { - if (context === void 0) return func; - switch (argCount == null ? 3 : argCount) { - case 1: return function(value) { - return func.call(context, value); - }; - case 3: return function(value, index, collection) { - return func.call(context, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(context, accumulator, value, index, collection); - }; - } - return function() { - return func.apply(context, arguments); - }; - } - function baseIteratee(value, context, argCount) { - if (value == null) return identity; - if (isFunction(value)) return optimizeCb(value, context, argCount); - if (isObject(value) && !isArray(value)) return matcher(value); - return property(value); - } - _.iteratee = iteratee; - function iteratee(value, context) { - return baseIteratee(value, context, Infinity); - } - function cb(value, context, argCount) { - if (_.iteratee !== iteratee) return _.iteratee(value, context); - return baseIteratee(value, context, argCount); - } - function restArguments(func, startIndex) { - startIndex = startIndex == null ? func.length - 1 : +startIndex; - return function() { - var length = Math.max(arguments.length - startIndex, 0), - rest = Array(length), - index = 0; - for (; index < length; index++) { - rest[index] = arguments[index + startIndex]; - } - switch (startIndex) { - case 0: return func.call(this, rest); - case 1: return func.call(this, arguments[0], rest); - case 2: return func.call(this, arguments[0], arguments[1], rest); - } - var args = Array(startIndex + 1); - for (index = 0; index < startIndex; index++) { - args[index] = arguments[index]; - } - args[startIndex] = rest; - return func.apply(this, args); - }; - } - function baseCreate(prototype) { - if (!isObject(prototype)) return {}; - if (nativeCreate) return nativeCreate(prototype); - Ctor.prototype = prototype; - var result = new Ctor; - Ctor.prototype = null; - return result; - } - - function shallowProperty(key) { - return function(obj) { - return obj == null ? void 0 : obj[key]; - }; - } - - function _has(obj, path) { - return obj != null && hasOwnProperty.call(obj, path); - } - - function deepGet(obj, path) { - var length = path.length; - for (var i = 0; i < length; i++) { - if (obj == null) return void 0; - obj = obj[path[i]]; - } - return length ? obj : void 0; - } - var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; - var getLength = shallowProperty('length'); - function isArrayLike(collection) { - var length = getLength(collection); - return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; - } - function each(obj, iteratee, context) { - iteratee = optimizeCb(iteratee, context); - var i, length; - if (isArrayLike(obj)) { - for (i = 0, length = obj.length; i < length; i++) { - iteratee(obj[i], i, obj); - } - } else { - var _keys = keys(obj); - for (i = 0, length = _keys.length; i < length; i++) { - iteratee(obj[_keys[i]], _keys[i], obj); - } - } - return obj; - } - function map(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length, - results = Array(length); - for (var index = 0; index < length; index++) { - var currentKey = _keys ? _keys[index] : index; - results[index] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - } - function createReduce(dir) { - var reducer = function(obj, iteratee, memo, initial) { - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length, - index = dir > 0 ? 0 : length - 1; - if (!initial) { - memo = obj[_keys ? _keys[index] : index]; - index += dir; - } - for (; index >= 0 && index < length; index += dir) { - var currentKey = _keys ? _keys[index] : index; - memo = iteratee(memo, obj[currentKey], currentKey, obj); - } - return memo; - }; - - return function(obj, iteratee, memo, context) { - var initial = arguments.length >= 3; - return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); - }; - } - var reduce = createReduce(1); - var reduceRight = createReduce(-1); - function find(obj, predicate, context) { - var keyFinder = isArrayLike(obj) ? findIndex : findKey; - var key = keyFinder(obj, predicate, context); - if (key !== void 0 && key !== -1) return obj[key]; - } - function filter(obj, predicate, context) { - var results = []; - predicate = cb(predicate, context); - each(obj, function(value, index, list) { - if (predicate(value, index, list)) results.push(value); - }); - return results; - } - function reject(obj, predicate, context) { - return filter(obj, negate(cb(predicate)), context); - } - function every(obj, predicate, context) { - predicate = cb(predicate, context); - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = _keys ? _keys[index] : index; - if (!predicate(obj[currentKey], currentKey, obj)) return false; - } - return true; - } - function some(obj, predicate, context) { - predicate = cb(predicate, context); - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = _keys ? _keys[index] : index; - if (predicate(obj[currentKey], currentKey, obj)) return true; - } - return false; - } - function contains(obj, item, fromIndex, guard) { - if (!isArrayLike(obj)) obj = values(obj); - if (typeof fromIndex != 'number' || guard) fromIndex = 0; - return indexOf(obj, item, fromIndex) >= 0; - } - var invoke = restArguments(function(obj, path, args) { - var contextPath, func; - if (isFunction(path)) { - func = path; - } else if (isArray(path)) { - contextPath = path.slice(0, -1); - path = path[path.length - 1]; - } - return map(obj, function(context) { - var method = func; - if (!method) { - if (contextPath && contextPath.length) { - context = deepGet(context, contextPath); - } - if (context == null) return void 0; - method = context[path]; - } - return method == null ? method : method.apply(context, args); - }); - }); - function pluck(obj, key) { - return map(obj, property(key)); - } - function where(obj, attrs) { - return filter(obj, matcher(attrs)); - } - function findWhere(obj, attrs) { - return find(obj, matcher(attrs)); - } - function max(obj, iteratee, context) { - var result = -Infinity, lastComputed = -Infinity, - value, computed; - if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { - obj = isArrayLike(obj) ? obj : values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value > result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed > lastComputed || computed === -Infinity && result === -Infinity) { - result = v; - lastComputed = computed; - } - }); - } - return result; - } - function min(obj, iteratee, context) { - var result = Infinity, lastComputed = Infinity, - value, computed; - if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { - obj = isArrayLike(obj) ? obj : values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value < result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed < lastComputed || computed === Infinity && result === Infinity) { - result = v; - lastComputed = computed; - } - }); - } - return result; - } - function shuffle(obj) { - return sample(obj, Infinity); - } - function sample(obj, n, guard) { - if (n == null || guard) { - if (!isArrayLike(obj)) obj = values(obj); - return obj[random(obj.length - 1)]; - } - var sample = isArrayLike(obj) ? clone(obj) : values(obj); - var length = getLength(sample); - n = Math.max(Math.min(n, length), 0); - var last = length - 1; - for (var index = 0; index < n; index++) { - var rand = random(index, last); - var temp = sample[index]; - sample[index] = sample[rand]; - sample[rand] = temp; - } - return sample.slice(0, n); - } - function sortBy(obj, iteratee, context) { - var index = 0; - iteratee = cb(iteratee, context); - return pluck(map(obj, function(value, key, list) { - return { - value: value, - index: index++, - criteria: iteratee(value, key, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index - right.index; - }), 'value'); - } - function group(behavior, partition) { - return function(obj, iteratee, context) { - var result = partition ? [[], []] : {}; - iteratee = cb(iteratee, context); - each(obj, function(value, index) { - var key = iteratee(value, index, obj); - behavior(result, value, key); - }); - return result; - }; - } - var groupBy = group(function(result, value, key) { - if (_has(result, key)) result[key].push(value); else result[key] = [value]; - }); - var indexBy = group(function(result, value, key) { - result[key] = value; - }); - var countBy = group(function(result, value, key) { - if (_has(result, key)) result[key]++; else result[key] = 1; - }); - - var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; - function toArray(obj) { - if (!obj) return []; - if (isArray(obj)) return slice.call(obj); - if (isString(obj)) { - return obj.match(reStrSymbol); - } - if (isArrayLike(obj)) return map(obj, identity); - return values(obj); - } - function size(obj) { - if (obj == null) return 0; - return isArrayLike(obj) ? obj.length : keys(obj).length; - } - var partition = group(function(result, value, pass) { - result[pass ? 0 : 1].push(value); - }, true); - function first(array, n, guard) { - if (array == null || array.length < 1) return n == null ? void 0 : []; - if (n == null || guard) return array[0]; - return initial(array, array.length - n); - } - function initial(array, n, guard) { - return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); - } - function last(array, n, guard) { - if (array == null || array.length < 1) return n == null ? void 0 : []; - if (n == null || guard) return array[array.length - 1]; - return rest(array, Math.max(0, array.length - n)); - } - function rest(array, n, guard) { - return slice.call(array, n == null || guard ? 1 : n); - } - function compact(array) { - return filter(array, Boolean); - } - function _flatten(input, shallow, strict, output) { - output = output || []; - var idx = output.length; - for (var i = 0, length = getLength(input); i < length; i++) { - var value = input[i]; - if (isArrayLike(value) && (isArray(value) || isArguments(value))) { - if (shallow) { - var j = 0, len = value.length; - while (j < len) output[idx++] = value[j++]; - } else { - _flatten(value, shallow, strict, output); - idx = output.length; - } - } else if (!strict) { - output[idx++] = value; - } - } - return output; - } - function flatten(array, shallow) { - return _flatten(array, shallow, false); - } - var without = restArguments(function(array, otherArrays) { - return difference(array, otherArrays); - }); - function uniq(array, isSorted, iteratee, context) { - if (!isBoolean(isSorted)) { - context = iteratee; - iteratee = isSorted; - isSorted = false; - } - if (iteratee != null) iteratee = cb(iteratee, context); - var result = []; - var seen = []; - for (var i = 0, length = getLength(array); i < length; i++) { - var value = array[i], - computed = iteratee ? iteratee(value, i, array) : value; - if (isSorted && !iteratee) { - if (!i || seen !== computed) result.push(value); - seen = computed; - } else if (iteratee) { - if (!contains(seen, computed)) { - seen.push(computed); - result.push(value); - } - } else if (!contains(result, value)) { - result.push(value); - } - } - return result; - } - var union = restArguments(function(arrays) { - return uniq(_flatten(arrays, true, true)); - }); - function intersection(array) { - var result = []; - var argsLength = arguments.length; - for (var i = 0, length = getLength(array); i < length; i++) { - var item = array[i]; - if (contains(result, item)) continue; - var j; - for (j = 1; j < argsLength; j++) { - if (!contains(arguments[j], item)) break; - } - if (j === argsLength) result.push(item); - } - return result; - } - var difference = restArguments(function(array, rest) { - rest = _flatten(rest, true, true); - return filter(array, function(value){ - return !contains(rest, value); - }); - }); - function unzip(array) { - var length = array && max(array, getLength).length || 0; - var result = Array(length); - - for (var index = 0; index < length; index++) { - result[index] = pluck(array, index); - } - return result; - } - var zip = restArguments(unzip); - function object(list, values) { - var result = {}; - for (var i = 0, length = getLength(list); i < length; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; - } - function createPredicateIndexFinder(dir) { - return function(array, predicate, context) { - predicate = cb(predicate, context); - var length = getLength(array); - var index = dir > 0 ? 0 : length - 1; - for (; index >= 0 && index < length; index += dir) { - if (predicate(array[index], index, array)) return index; - } - return -1; - }; - } - var findIndex = createPredicateIndexFinder(1); - var findLastIndex = createPredicateIndexFinder(-1); - function sortedIndex(array, obj, iteratee, context) { - iteratee = cb(iteratee, context, 1); - var value = iteratee(obj); - var low = 0, high = getLength(array); - while (low < high) { - var mid = Math.floor((low + high) / 2); - if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; - } - return low; - } - function createIndexFinder(dir, predicateFind, sortedIndex) { - return function(array, item, idx) { - var i = 0, length = getLength(array); - if (typeof idx == 'number') { - if (dir > 0) { - i = idx >= 0 ? idx : Math.max(idx + length, i); - } else { - length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; - } - } else if (sortedIndex && idx && length) { - idx = sortedIndex(array, item); - return array[idx] === item ? idx : -1; - } - if (item !== item) { - idx = predicateFind(slice.call(array, i, length), isNaN); - return idx >= 0 ? idx + i : -1; - } - for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { - if (array[idx] === item) return idx; - } - return -1; - }; - } - var indexOf = createIndexFinder(1, findIndex, sortedIndex); - var lastIndexOf = createIndexFinder(-1, findLastIndex); - function range(start, stop, step) { - if (stop == null) { - stop = start || 0; - start = 0; - } - if (!step) { - step = stop < start ? -1 : 1; - } - - var length = Math.max(Math.ceil((stop - start) / step), 0); - var range = Array(length); - - for (var idx = 0; idx < length; idx++, start += step) { - range[idx] = start; - } - - return range; - } - function chunk(array, count) { - if (count == null || count < 1) return []; - var result = []; - var i = 0, length = array.length; - while (i < length) { - result.push(slice.call(array, i, i += count)); - } - return result; - } - function executeBound(sourceFunc, boundFunc, context, callingContext, args) { - if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); - var self = baseCreate(sourceFunc.prototype); - var result = sourceFunc.apply(self, args); - if (isObject(result)) return result; - return self; - } - var bind = restArguments(function(func, context, args) { - if (!isFunction(func)) throw new TypeError('Bind must be called on a function'); - var bound = restArguments(function(callArgs) { - return executeBound(func, bound, context, this, args.concat(callArgs)); - }); - return bound; - }); - var partial = restArguments(function(func, boundArgs) { - var placeholder = partial.placeholder; - var bound = function() { - var position = 0, length = boundArgs.length; - var args = Array(length); - for (var i = 0; i < length; i++) { - args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; - } - while (position < arguments.length) args.push(arguments[position++]); - return executeBound(func, bound, this, this, args); - }; - return bound; - }); - - partial.placeholder = _; - var bindAll = restArguments(function(obj, _keys) { - _keys = _flatten(_keys, false, false); - var index = _keys.length; - if (index < 1) throw new Error('bindAll must be passed function names'); - while (index--) { - var key = _keys[index]; - obj[key] = bind(obj[key], obj); - } - }); - function memoize(func, hasher) { - var memoize = function(key) { - var cache = memoize.cache; - var address = '' + (hasher ? hasher.apply(this, arguments) : key); - if (!_has(cache, address)) cache[address] = func.apply(this, arguments); - return cache[address]; - }; - memoize.cache = {}; - return memoize; - } - var delay = restArguments(function(func, wait, args) { - return setTimeout(function() { - return func.apply(null, args); - }, wait); - }); - var defer = partial(delay, _, 1); - function throttle(func, wait, options) { - var timeout, context, args, result; - var previous = 0; - if (!options) options = {}; - - var later = function() { - previous = options.leading === false ? 0 : now(); - timeout = null; - result = func.apply(context, args); - if (!timeout) context = args = null; - }; - - var throttled = function() { - var _now = now(); - if (!previous && options.leading === false) previous = _now; - var remaining = wait - (_now - previous); - context = this; - args = arguments; - if (remaining <= 0 || remaining > wait) { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - previous = _now; - result = func.apply(context, args); - if (!timeout) context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - - throttled.cancel = function() { - clearTimeout(timeout); - previous = 0; - timeout = context = args = null; - }; - - return throttled; - } - function debounce(func, wait, immediate) { - var timeout, result; - - var later = function(context, args) { - timeout = null; - if (args) result = func.apply(context, args); - }; - - var debounced = restArguments(function(args) { - if (timeout) clearTimeout(timeout); - if (immediate) { - var callNow = !timeout; - timeout = setTimeout(later, wait); - if (callNow) result = func.apply(this, args); - } else { - timeout = delay(later, wait, this, args); - } - - return result; - }); - - debounced.cancel = function() { - clearTimeout(timeout); - timeout = null; - }; - - return debounced; - } - function wrap(func, wrapper) { - return partial(wrapper, func); - } - function negate(predicate) { - return function() { - return !predicate.apply(this, arguments); - }; - } - function compose() { - var args = arguments; - var start = args.length - 1; - return function() { - var i = start; - var result = args[start].apply(this, arguments); - while (i--) result = args[i].call(this, result); - return result; - }; - } - function after(times, func) { - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; - } - function before(times, func) { - var memo; - return function() { - if (--times > 0) { - memo = func.apply(this, arguments); - } - if (times <= 1) func = null; - return memo; - }; - } - var once = partial(before, 2); - var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); - var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', - 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; - - function collectNonEnumProps(obj, _keys) { - var nonEnumIdx = nonEnumerableProps.length; - var constructor = obj.constructor; - var proto = isFunction(constructor) && constructor.prototype || ObjProto; - var prop = 'constructor'; - if (_has(obj, prop) && !contains(_keys, prop)) _keys.push(prop); - - while (nonEnumIdx--) { - prop = nonEnumerableProps[nonEnumIdx]; - if (prop in obj && obj[prop] !== proto[prop] && !contains(_keys, prop)) { - _keys.push(prop); - } - } - } - function keys(obj) { - if (!isObject(obj)) return []; - if (nativeKeys) return nativeKeys(obj); - var _keys = []; - for (var key in obj) if (_has(obj, key)) _keys.push(key); - if (hasEnumBug) collectNonEnumProps(obj, _keys); - return _keys; - } - function allKeys(obj) { - if (!isObject(obj)) return []; - var _keys = []; - for (var key in obj) _keys.push(key); - if (hasEnumBug) collectNonEnumProps(obj, _keys); - return _keys; - } - function values(obj) { - var _keys = keys(obj); - var length = _keys.length; - var values = Array(length); - for (var i = 0; i < length; i++) { - values[i] = obj[_keys[i]]; - } - return values; - } - function mapObject(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var _keys = keys(obj), - length = _keys.length, - results = {}; - for (var index = 0; index < length; index++) { - var currentKey = _keys[index]; - results[currentKey] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - } - function pairs(obj) { - var _keys = keys(obj); - var length = _keys.length; - var pairs = Array(length); - for (var i = 0; i < length; i++) { - pairs[i] = [_keys[i], obj[_keys[i]]]; - } - return pairs; - } - function invert(obj) { - var result = {}; - var _keys = keys(obj); - for (var i = 0, length = _keys.length; i < length; i++) { - result[obj[_keys[i]]] = _keys[i]; - } - return result; - } - function functions(obj) { - var names = []; - for (var key in obj) { - if (isFunction(obj[key])) names.push(key); - } - return names.sort(); - } - function createAssigner(keysFunc, defaults) { - return function(obj) { - var length = arguments.length; - if (defaults) obj = Object(obj); - if (length < 2 || obj == null) return obj; - for (var index = 1; index < length; index++) { - var source = arguments[index], - _keys = keysFunc(source), - l = _keys.length; - for (var i = 0; i < l; i++) { - var key = _keys[i]; - if (!defaults || obj[key] === void 0) obj[key] = source[key]; - } - } - return obj; - }; - } - var extend = createAssigner(allKeys); - var extendOwn = createAssigner(keys); - function findKey(obj, predicate, context) { - predicate = cb(predicate, context); - var _keys = keys(obj), key; - for (var i = 0, length = _keys.length; i < length; i++) { - key = _keys[i]; - if (predicate(obj[key], key, obj)) return key; - } - } - function keyInObj(value, key, obj) { - return key in obj; - } - var pick = restArguments(function(obj, _keys) { - var result = {}, iteratee = _keys[0]; - if (obj == null) return result; - if (isFunction(iteratee)) { - if (_keys.length > 1) iteratee = optimizeCb(iteratee, _keys[1]); - _keys = allKeys(obj); - } else { - iteratee = keyInObj; - _keys = _flatten(_keys, false, false); - obj = Object(obj); - } - for (var i = 0, length = _keys.length; i < length; i++) { - var key = _keys[i]; - var value = obj[key]; - if (iteratee(value, key, obj)) result[key] = value; - } - return result; - }); - var omit = restArguments(function(obj, _keys) { - var iteratee = _keys[0], context; - if (isFunction(iteratee)) { - iteratee = negate(iteratee); - if (_keys.length > 1) context = _keys[1]; - } else { - _keys = map(_flatten(_keys, false, false), String); - iteratee = function(value, key) { - return !contains(_keys, key); - }; - } - return pick(obj, iteratee, context); - }); - var defaults = createAssigner(allKeys, true); - function create(prototype, props) { - var result = baseCreate(prototype); - if (props) extendOwn(result, props); - return result; - } - function clone(obj) { - if (!isObject(obj)) return obj; - return isArray(obj) ? obj.slice() : extend({}, obj); - } - function tap(obj, interceptor) { - interceptor(obj); - return obj; - } - function isMatch(object, attrs) { - var _keys = keys(attrs), length = _keys.length; - if (object == null) return !length; - var obj = Object(object); - for (var i = 0; i < length; i++) { - var key = _keys[i]; - if (attrs[key] !== obj[key] || !(key in obj)) return false; - } - return true; - } - function eq(a, b, aStack, bStack) { - if (a === b) return a !== 0 || 1 / a === 1 / b; - if (a == null || b == null) return false; - if (a !== a) return b !== b; - var type = typeof a; - if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; - return deepEq(a, b, aStack, bStack); - } - function deepEq(a, b, aStack, bStack) { - if (a instanceof _) a = a._wrapped; - if (b instanceof _) b = b._wrapped; - var className = toString.call(a); - if (className !== toString.call(b)) return false; - switch (className) { - case '[object RegExp]': - case '[object String]': - return '' + a === '' + b; - case '[object Number]': - if (+a !== +a) return +b !== +b; - return +a === 0 ? 1 / +a === 1 / b : +a === +b; - case '[object Date]': - case '[object Boolean]': - return +a === +b; - case '[object Symbol]': - return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); - } - - var areArrays = className === '[object Array]'; - if (!areArrays) { - if (typeof a != 'object' || typeof b != 'object') return false; - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor && - isFunction(bCtor) && bCtor instanceof bCtor) - && ('constructor' in a && 'constructor' in b)) { - return false; - } - } - aStack = aStack || []; - bStack = bStack || []; - var length = aStack.length; - while (length--) { - if (aStack[length] === a) return bStack[length] === b; - } - aStack.push(a); - bStack.push(b); - if (areArrays) { - length = a.length; - if (length !== b.length) return false; - while (length--) { - if (!eq(a[length], b[length], aStack, bStack)) return false; - } - } else { - var _keys = keys(a), key; - length = _keys.length; - if (keys(b).length !== length) return false; - while (length--) { - key = _keys[length]; - if (!(_has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; - } - } - aStack.pop(); - bStack.pop(); - return true; - } - function isEqual(a, b) { - return eq(a, b); - } - function isEmpty(obj) { - if (obj == null) return true; - if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments(obj))) return obj.length === 0; - return keys(obj).length === 0; - } - function isElement(obj) { - return !!(obj && obj.nodeType === 1); - } - function tagTester(name) { - return function(obj) { - return toString.call(obj) === '[object ' + name + ']'; - }; - } - var isArray = nativeIsArray || tagTester('Array'); - function isObject(obj) { - var type = typeof obj; - return type === 'function' || type === 'object' && !!obj; - } - var isArguments = tagTester('Arguments'); - var isFunction = tagTester('Function'); - var isString = tagTester('String'); - var isNumber = tagTester('Number'); - var isDate = tagTester('Date'); - var isRegExp = tagTester('RegExp'); - var isError = tagTester('Error'); - var isSymbol = tagTester('Symbol'); - var isMap = tagTester('Map'); - var isWeakMap = tagTester('WeakMap'); - var isSet = tagTester('Set'); - var isWeakSet = tagTester('WeakSet'); - (function() { - if (!isArguments(arguments)) { - isArguments = function(obj) { - return _has(obj, 'callee'); - }; - } - }()); - var nodelist = root.document && root.document.childNodes; - if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') { - isFunction = function(obj) { - return typeof obj == 'function' || false; - }; - } - function isFinite(obj) { - return !isSymbol(obj) && _isFinite(obj) && !_isNaN(parseFloat(obj)); - } - function isNaN(obj) { - return isNumber(obj) && _isNaN(obj); - } - function isBoolean(obj) { - return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; - } - function isNull(obj) { - return obj === null; - } - function isUndefined(obj) { - return obj === void 0; - } - function has(obj, path) { - if (!isArray(path)) { - return _has(obj, path); - } - var length = path.length; - for (var i = 0; i < length; i++) { - var key = path[i]; - if (obj == null || !hasOwnProperty.call(obj, key)) { - return false; - } - obj = obj[key]; - } - return !!length; - } - function identity(value) { - return value; - } - function constant(value) { - return function() { - return value; - }; - } - - function noop(){} - function property(path) { - if (!isArray(path)) { - return shallowProperty(path); - } - return function(obj) { - return deepGet(obj, path); - }; - } - function propertyOf(obj) { - if (obj == null) { - return function(){}; - } - return function(path) { - return !isArray(path) ? obj[path] : deepGet(obj, path); - }; - } - function matcher(attrs) { - attrs = extendOwn({}, attrs); - return function(obj) { - return isMatch(obj, attrs); - }; - } - function times(n, iteratee, context) { - var accum = Array(Math.max(0, n)); - iteratee = optimizeCb(iteratee, context, 1); - for (var i = 0; i < n; i++) accum[i] = iteratee(i); - return accum; - } - function random(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); - } - var now = Date.now || function() { - return new Date().getTime(); - }; - var escapeMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' - }; - var unescapeMap = invert(escapeMap); - function createEscaper(map) { - var escaper = function(match) { - return map[match]; - }; - var source = '(?:' + keys(map).join('|') + ')'; - var testRegexp = RegExp(source); - var replaceRegexp = RegExp(source, 'g'); - return function(string) { - string = string == null ? '' : '' + string; - return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; - }; - } - var escape = createEscaper(escapeMap); - var unescape = createEscaper(unescapeMap); - function result(obj, path, fallback) { - if (!isArray(path)) path = [path]; - var length = path.length; - if (!length) { - return isFunction(fallback) ? fallback.call(obj) : fallback; - } - for (var i = 0; i < length; i++) { - var prop = obj == null ? void 0 : obj[path[i]]; - if (prop === void 0) { - prop = fallback; - i = length; // Ensure we don't continue iterating. - } - obj = isFunction(prop) ? prop.call(obj) : prop; - } - return obj; - } - var idCounter = 0; - function uniqueId(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - } - var templateSettings = _.templateSettings = { - evaluate: /<%([\s\S]+?)%>/g, - interpolate: /<%=([\s\S]+?)%>/g, - escape: /<%-([\s\S]+?)%>/g - }; - var noMatch = /(.)^/; - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; - - var escapeChar = function(match) { - return '\\' + escapes[match]; - }; - function template(text, settings, oldSettings) { - if (!settings && oldSettings) settings = oldSettings; - settings = defaults({}, settings, _.templateSettings); - var matcher = RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset).replace(escapeRegExp, escapeChar); - index = offset + match.length; - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } else if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } else if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - return match; - }); - source += "';\n"; - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + 'return __p;\n'; - - var render; - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - var template = function(data) { - return render.call(this, data, _); - }; - var argument = settings.variable || 'obj'; - template.source = 'function(' + argument + '){\n' + source + '}'; - - return template; - } - function chain(obj) { - var instance = _(obj); - instance._chain = true; - return instance; - } - function chainResult(instance, obj) { - return instance._chain ? _(obj).chain() : obj; - } - function mixin(obj) { - each(functions(obj), function(name) { - var func = _[name] = obj[name]; - _.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return chainResult(this, func.apply(_, args)); - }; - }); - return _; - } - each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - var obj = this._wrapped; - method.apply(obj, arguments); - if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; - return chainResult(this, obj); - }; - }); - each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - return chainResult(this, method.apply(this._wrapped, arguments)); - }; - }); - _.prototype.value = function() { - return this._wrapped; - }; - _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; - - _.prototype.toString = function() { - return String(this._wrapped); - }; - - var allExports = ({ - 'default': _, - VERSION: VERSION, - iteratee: iteratee, - restArguments: restArguments, - each: each, - forEach: each, - map: map, - collect: map, - reduce: reduce, - foldl: reduce, - inject: reduce, - reduceRight: reduceRight, - foldr: reduceRight, - find: find, - detect: find, - filter: filter, - select: filter, - reject: reject, - every: every, - all: every, - some: some, - any: some, - contains: contains, - includes: contains, - include: contains, - invoke: invoke, - pluck: pluck, - where: where, - findWhere: findWhere, - max: max, - min: min, - shuffle: shuffle, - sample: sample, - sortBy: sortBy, - groupBy: groupBy, - indexBy: indexBy, - countBy: countBy, - toArray: toArray, - size: size, - partition: partition, - first: first, - head: first, - take: first, - initial: initial, - last: last, - rest: rest, - tail: rest, - drop: rest, - compact: compact, - flatten: flatten, - without: without, - uniq: uniq, - unique: uniq, - union: union, - intersection: intersection, - difference: difference, - unzip: unzip, - zip: zip, - object: object, - findIndex: findIndex, - findLastIndex: findLastIndex, - sortedIndex: sortedIndex, - indexOf: indexOf, - lastIndexOf: lastIndexOf, - range: range, - chunk: chunk, - bind: bind, - partial: partial, - bindAll: bindAll, - memoize: memoize, - delay: delay, - defer: defer, - throttle: throttle, - debounce: debounce, - wrap: wrap, - negate: negate, - compose: compose, - after: after, - before: before, - once: once, - keys: keys, - allKeys: allKeys, - values: values, - mapObject: mapObject, - pairs: pairs, - invert: invert, - functions: functions, - methods: functions, - extend: extend, - extendOwn: extendOwn, - assign: extendOwn, - findKey: findKey, - pick: pick, - omit: omit, - defaults: defaults, - create: create, - clone: clone, - tap: tap, - isMatch: isMatch, - isEqual: isEqual, - isEmpty: isEmpty, - isElement: isElement, - isArray: isArray, - isObject: isObject, - isArguments: isArguments, - isFunction: isFunction, - isString: isString, - isNumber: isNumber, - isDate: isDate, - isRegExp: isRegExp, - isError: isError, - isSymbol: isSymbol, - isMap: isMap, - isWeakMap: isWeakMap, - isSet: isSet, - isWeakSet: isWeakSet, - isFinite: isFinite, - isNaN: isNaN, - isBoolean: isBoolean, - isNull: isNull, - isUndefined: isUndefined, - has: has, - identity: identity, - constant: constant, - noop: noop, - property: property, - propertyOf: propertyOf, - matcher: matcher, - matches: matcher, - times: times, - random: random, - now: now, - escape: escape, - unescape: unescape, - result: result, - uniqueId: uniqueId, - templateSettings: templateSettings, - template: template, - chain: chain, - mixin: mixin - }); - var _$1 = mixin(allExports); - _$1._ = _$1; - - return _$1; - -}))); - - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],"/../../jshint/src/jshint.js":[function(_dereq_,module,exports){ - -var _ = _dereq_("underscore"); -_.clone = _dereq_("lodash.clone"); -var events = _dereq_("events"); -var vars = _dereq_("./vars.js"); -var messages = _dereq_("./messages.js"); -var Lexer = _dereq_("./lex.js").Lexer; -var reg = _dereq_("./reg.js"); -var state = _dereq_("./state.js").state; -var style = _dereq_("./style.js"); -var options = _dereq_("./options.js"); -var scopeManager = _dereq_("./scope-manager.js"); -var prodParams = _dereq_("./prod-params.js"); -var console = _dereq_("console-browserify"); - -var JSHINT = (function() { - "use strict"; - - var api, // Extension API - bang = { - "<" : true, - "<=" : true, - "==" : true, - "===": true, - "!==": true, - "!=" : true, - ">" : true, - ">=" : true, - "+" : true, - "-" : true, - "*" : true, - "/" : true, - "%" : true - }, - - declared, // Globals that were declared using /*global ... */ syntax. - - functions, // All of the functions - - inblock, - indent, - lookahead, - lex, - member, - membersOnly, - predefined, // Global variables defined by option - - extraModules = [], - emitter = new events.EventEmitter(); - - function checkOption(name, isStable, t) { - var type, validNames; - - if (isStable) { - type = ""; - validNames = options.validNames; - } else { - type = "unstable "; - validNames = options.unstableNames; - } - - name = name.trim(); - - if (/^[+-]W\d{3}$/g.test(name)) { - return true; - } - - if (validNames.indexOf(name) === -1) { - if (t.type !== "jslint" && !_.has(options.removed, name)) { - error("E001", t, type, name); - return false; - } - } - - return true; - } - - function isString(obj) { - return Object.prototype.toString.call(obj) === "[object String]"; - } - - function isIdentifier(tkn, value) { - if (!tkn) - return false; - - if (!tkn.identifier || tkn.value !== value) - return false; - - return true; - } - function isReserved(context, token) { - if (!token.reserved) { - return false; - } - var meta = token.meta; - - if (meta && meta.isFutureReservedWord) { - if (state.inES5()) { - if (!meta.es5) { - return false; - } - - if (token.isProperty) { - return false; - } - } - } else if (meta && meta.es5 && !state.inES5()) { - return false; - } - if (meta && meta.strictOnly && state.inES5()) { - if (!state.option.strict && !state.isStrict()) { - return false; - } - } - - if (token.id === "await" && (!(context & prodParams.async) && !state.option.module)) { - return false; - } - - if (token.id === "yield" && (!(context & prodParams.yield))) { - return state.isStrict(); - } - - return true; - } - - function supplant(str, data) { - return str.replace(/\{([^{}]*)\}/g, function(a, b) { - var r = data[b]; - return typeof r === "string" || typeof r === "number" ? r : a; - }); - } - - function combine(dest, src) { - Object.keys(src).forEach(function(name) { - if (_.has(JSHINT.blacklist, name)) return; - dest[name] = src[name]; - }); - } - - function processenforceall() { - if (state.option.enforceall) { - for (var enforceopt in options.bool.enforcing) { - if (state.option[enforceopt] === undefined && - !options.noenforceall[enforceopt]) { - state.option[enforceopt] = true; - } - } - for (var relaxopt in options.bool.relaxing) { - if (state.option[relaxopt] === undefined) { - state.option[relaxopt] = false; - } - } - } - } - function applyOptions() { - var badESOpt = null; - processenforceall(); - badESOpt = state.inferEsVersion(); - if (badESOpt) { - quit("E059", state.tokens.next, "esversion", badESOpt); - } - - if (state.inES5()) { - combine(predefined, vars.ecmaIdentifiers[5]); - } - - if (state.inES6()) { - combine(predefined, vars.ecmaIdentifiers[6]); - } - - if (state.inES8()) { - combine(predefined, vars.ecmaIdentifiers[8]); - } - if (state.option.strict === "global" && "globalstrict" in state.option) { - quit("E059", state.tokens.next, "strict", "globalstrict"); - } - - if (state.option.module) { - if (!state.inES6()) { - warning("W134", state.tokens.next, "module", 6); - } - } - - if (state.option.regexpu) { - if (!state.inES6()) { - warning("W134", state.tokens.next, "regexpu", 6); - } - } - - if (state.option.couch) { - combine(predefined, vars.couch); - } - - if (state.option.qunit) { - combine(predefined, vars.qunit); - } - - if (state.option.rhino) { - combine(predefined, vars.rhino); - } - - if (state.option.shelljs) { - combine(predefined, vars.shelljs); - combine(predefined, vars.node); - } - if (state.option.typed) { - combine(predefined, vars.typed); - } - - if (state.option.phantom) { - combine(predefined, vars.phantom); - } - - if (state.option.prototypejs) { - combine(predefined, vars.prototypejs); - } - - if (state.option.node) { - combine(predefined, vars.node); - combine(predefined, vars.typed); - } - - if (state.option.devel) { - combine(predefined, vars.devel); - } - - if (state.option.dojo) { - combine(predefined, vars.dojo); - } - - if (state.option.browser) { - combine(predefined, vars.browser); - combine(predefined, vars.typed); - } - - if (state.option.browserify) { - combine(predefined, vars.browser); - combine(predefined, vars.typed); - combine(predefined, vars.browserify); - } - - if (state.option.nonstandard) { - combine(predefined, vars.nonstandard); - } - - if (state.option.jasmine) { - combine(predefined, vars.jasmine); - } - - if (state.option.jquery) { - combine(predefined, vars.jquery); - } - - if (state.option.mootools) { - combine(predefined, vars.mootools); - } - - if (state.option.worker) { - combine(predefined, vars.worker); - } - - if (state.option.wsh) { - combine(predefined, vars.wsh); - } - - if (state.option.yui) { - combine(predefined, vars.yui); - } - - if (state.option.mocha) { - combine(predefined, vars.mocha); - } - } - function quit(code, token, a, b) { - var percentage = Math.floor((token.line / state.lines.length) * 100); - var message = messages.errors[code].desc; - - var exception = { - name: "JSHintError", - line: token.line, - character: token.from, - message: message + " (" + percentage + "% scanned).", - raw: message, - code: code, - a: a, - b: b - }; - - exception.reason = supplant(message, exception) + " (" + percentage + - "% scanned)."; - - throw exception; - } - - function removeIgnoredMessages() { - var ignored = state.ignoredLines; - - if (_.isEmpty(ignored)) return; - JSHINT.errors = _.reject(JSHINT.errors, function(err) { return ignored[err.line] }); - } - - function warning(code, t, a, b, c, d) { - var ch, l, w, msg; - - if (/^W\d{3}$/.test(code)) { - if (state.ignored[code]) - return; - - msg = messages.warnings[code]; - } else if (/E\d{3}/.test(code)) { - msg = messages.errors[code]; - } else if (/I\d{3}/.test(code)) { - msg = messages.info[code]; - } - - t = t || state.tokens.next || {}; - if (t.id === "(end)") { // `~ - t = state.tokens.curr; - } - - l = t.line; - ch = t.from; - - w = { - id: "(error)", - raw: msg.desc, - code: msg.code, - evidence: state.lines[l - 1] || "", - line: l, - character: ch, - scope: JSHINT.scope, - a: a, - b: b, - c: c, - d: d - }; - - w.reason = supplant(msg.desc, w); - JSHINT.errors.push(w); - - removeIgnoredMessages(); - - if (JSHINT.errors.length >= state.option.maxerr) - quit("E043", t); - - return w; - } - - function warningAt(m, l, ch, a, b, c, d) { - return warning(m, { - line: l, - from: ch - }, a, b, c, d); - } - - function error(m, t, a, b, c, d) { - warning(m, t, a, b, c, d); - } - - function errorAt(m, l, ch, a, b, c, d) { - return error(m, { - line: l, - from: ch - }, a, b, c, d); - } - function addEvalCode(elem, token) { - JSHINT.internals.push({ - id: "(internal)", - elem: elem, - token: token, - code: token.value.replace(/([^\\])(\\*)\2\\n/g, "$1\n") - }); - } - function lintingDirective(directiveToken, previous) { - var body = directiveToken.body.split(",") - .map(function(s) { return s.trim(); }); - var predef = {}; - - if (directiveToken.type === "falls through") { - previous.caseFallsThrough = true; - return; - } - - if (directiveToken.type === "globals") { - body.forEach(function(item, idx) { - var parts = item.split(":"); - var key = parts[0].trim(); - - if (key === "-" || !key.length) { - if (idx > 0 && idx === body.length - 1) { - return; - } - error("E002", directiveToken); - return; - } - - if (key.charAt(0) === "-") { - key = key.slice(1); - - JSHINT.blacklist[key] = key; - delete predefined[key]; - } else { - predef[key] = parts.length > 1 && parts[1].trim() === "true"; - } - }); - - combine(predefined, predef); - - for (var key in predef) { - if (_.has(predef, key)) { - declared[key] = directiveToken; - } - } - } - - if (directiveToken.type === "exported") { - body.forEach(function(e, idx) { - if (!e.length) { - if (idx > 0 && idx === body.length - 1) { - return; - } - error("E002", directiveToken); - return; - } - - state.funct["(scope)"].addExported(e); - }); - } - - if (directiveToken.type === "members") { - membersOnly = membersOnly || {}; - - body.forEach(function(m) { - var ch1 = m.charAt(0); - var ch2 = m.charAt(m.length - 1); - - if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) { - m = m - .substr(1, m.length - 2) - .replace("\\\"", "\""); - } - - membersOnly[m] = false; - }); - } - - var numvals = [ - "maxstatements", - "maxparams", - "maxdepth", - "maxcomplexity", - "maxerr", - "maxlen", - "indent" - ]; - - if (directiveToken.type === "jshint" || directiveToken.type === "jslint" || - directiveToken.type === "jshint.unstable") { - body.forEach(function(item) { - var parts = item.split(":"); - var key = parts[0].trim(); - var val = parts.length > 1 ? parts[1].trim() : ""; - var numberVal; - - if (!checkOption(key, directiveToken.type !== "jshint.unstable", directiveToken)) { - return; - } - - if (numvals.indexOf(key) >= 0) { - if (val !== "false") { - numberVal = +val; - - if (typeof numberVal !== "number" || !isFinite(numberVal) || - numberVal <= 0 || Math.floor(numberVal) !== numberVal) { - error("E032", directiveToken, val); - return; - } - - state.option[key] = numberVal; - } else { - state.option[key] = key === "indent" ? 4 : false; - } - - return; - } - - if (key === "validthis") { - - if (state.funct["(global)"]) - return void error("E009"); - - if (val !== "true" && val !== "false") - return void error("E002", directiveToken); - - state.option.validthis = (val === "true"); - return; - } - - if (key === "quotmark") { - switch (val) { - case "true": - case "false": - state.option.quotmark = (val === "true"); - break; - case "double": - case "single": - state.option.quotmark = val; - break; - default: - error("E002", directiveToken); - } - return; - } - - if (key === "shadow") { - switch (val) { - case "true": - state.option.shadow = true; - break; - case "outer": - state.option.shadow = "outer"; - break; - case "false": - case "inner": - state.option.shadow = "inner"; - break; - default: - error("E002", directiveToken); - } - return; - } - - if (key === "unused") { - switch (val) { - case "true": - state.option.unused = true; - break; - case "false": - state.option.unused = false; - break; - case "vars": - case "strict": - state.option.unused = val; - break; - default: - error("E002", directiveToken); - } - return; - } - - if (key === "latedef") { - switch (val) { - case "true": - state.option.latedef = true; - break; - case "false": - state.option.latedef = false; - break; - case "nofunc": - state.option.latedef = "nofunc"; - break; - default: - error("E002", directiveToken); - } - return; - } - - if (key === "ignore") { - switch (val) { - case "line": - state.ignoredLines[directiveToken.line] = true; - removeIgnoredMessages(); - break; - default: - error("E002", directiveToken); - } - return; - } - - if (key === "strict") { - switch (val) { - case "true": - state.option.strict = true; - break; - case "false": - state.option.strict = false; - break; - case "global": - case "implied": - state.option.strict = val; - break; - default: - error("E002", directiveToken); - } - return; - } - - if (key === "module") { - if (!hasParsedCode(state.funct)) { - error("E055", directiveToken, "module"); - } - } - - if (key === "esversion") { - switch (val) { - case "3": - case "5": - case "6": - case "7": - case "8": - case "9": - case "10": - state.option.moz = false; - state.option.esversion = +val; - break; - case "2015": - case "2016": - case "2017": - case "2018": - case "2019": - state.option.moz = false; - state.option.esversion = +val - 2009; - break; - default: - error("E002", directiveToken); - } - if (!hasParsedCode(state.funct)) { - error("E055", directiveToken, "esversion"); - } - return; - } - - var match = /^([+-])(W\d{3})$/g.exec(key); - if (match) { - state.ignored[match[2]] = (match[1] === "-"); - return; - } - - var tn; - if (val === "true" || val === "false") { - if (directiveToken.type === "jslint") { - tn = options.renamed[key] || key; - state.option[tn] = (val === "true"); - - if (options.inverted[tn] !== undefined) { - state.option[tn] = !state.option[tn]; - } - } else if (directiveToken.type === "jshint.unstable") { - state.option.unstable[key] = (val === "true"); - } else { - state.option[key] = (val === "true"); - } - - return; - } - - error("E002", directiveToken); - }); - - applyOptions(); - } - } - function peek(p) { - var i = p || 0, j = lookahead.length, t; - - if (i < j) { - return lookahead[i]; - } - - while (j <= i) { - t = lex.token(); - if (!t) { - if (!lookahead.length) { - return state.tokens.next; - } - - return lookahead[j - 1]; - } - - lookahead[j] = t; - j += 1; - } - - return t; - } - - function peekIgnoreEOL() { - var i = 0; - var t; - do { - t = peek(i++); - } while (t.id === "(endline)"); - return t; - } - function advance(expected, relatedToken) { - var nextToken = state.tokens.next; - - if (expected && nextToken.id !== expected) { - if (relatedToken) { - if (nextToken.id === "(end)") { - error("E019", relatedToken, relatedToken.id); - } else { - error("E020", nextToken, expected, relatedToken.id, - relatedToken.line, nextToken.value); - } - } else if (nextToken.type !== "(identifier)" || nextToken.value !== expected) { - error("E021", nextToken, expected, nextToken.value); - } - } - - state.tokens.prev = state.tokens.curr; - state.tokens.curr = state.tokens.next; - for (;;) { - state.tokens.next = lookahead.shift() || lex.token(); - - if (!state.tokens.next) { // No more tokens left, give up - quit("E041", state.tokens.curr); - } - - if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") { - return; - } - - if (state.tokens.next.check) { - state.tokens.next.check(); - } - - if (state.tokens.next.isSpecial) { - lintingDirective(state.tokens.next, state.tokens.curr); - } else { - if (state.tokens.next.id !== "(endline)") { - break; - } - } - } - } - function isOperator(token) { - return token.first || token.right || token.left || token.id === "yield" || token.id === "await"; - } - - function isEndOfExpr(context, curr, next) { - if (arguments.length <= 1) { - curr = state.tokens.curr; - next = state.tokens.next; - } - - if (next.id === "in" && context & prodParams.noin) { - return true; - } - - if (next.id === ";" || next.id === "}" || next.id === ":") { - return true; - } - - if (next.infix === curr.infix || - (curr.id === "yield" && curr.rbp < next.rbp)) { - return !sameLine(curr, next); - } - - return false; - } - function expression(context, rbp) { - var left, isArray = false, isObject = false; - var initial = context & prodParams.initial; - var curr; - - context &= ~prodParams.initial; - - state.nameStack.push(); - - if (state.tokens.next.id === "(end)") - error("E006", state.tokens.curr); - - advance(); - - if (initial) { - state.funct["(verb)"] = state.tokens.curr.value; - state.tokens.curr.beginsStmt = true; - } - - curr = state.tokens.curr; - - if (initial && curr.fud && (!curr.useFud || curr.useFud(context))) { - left = state.tokens.curr.fud(context); - } else { - if (state.tokens.curr.nud) { - left = state.tokens.curr.nud(context, rbp); - } else { - error("E030", state.tokens.curr, state.tokens.curr.id); - } - - while (rbp < state.tokens.next.lbp && !isEndOfExpr(context)) { - isArray = state.tokens.curr.value === "Array"; - isObject = state.tokens.curr.value === "Object"; - if (left && (left.value || (left.first && left.first.value))) { - if (left.value !== "new" || - (left.first && left.first.value && left.first.value === ".")) { - isArray = false; - if (left.value !== state.tokens.curr.value) { - isObject = false; - } - } - } - - advance(); - - if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") { - warning("W009", state.tokens.curr); - } - - if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") { - warning("W010", state.tokens.curr); - } - - if (left && state.tokens.curr.led) { - left = state.tokens.curr.led(context, left); - } else { - error("E033", state.tokens.curr, state.tokens.curr.id); - } - } - } - - state.nameStack.pop(); - - return left; - } - - function sameLine(first, second) { - return first.line === (second.startLine || second.line); - } - - function nobreaknonadjacent(left, right) { - if (!state.option.laxbreak && !sameLine(left, right)) { - warning("W014", right, right.value); - } - } - - function nolinebreak(t) { - t = t; - if (!sameLine(t, state.tokens.next)) { - warning("E022", t, t.value); - } - } - function checkComma(opts) { - var prev = state.tokens.prev; - var curr = state.tokens.curr; - opts = opts || {}; - - if (!sameLine(prev, curr)) { - if (!state.option.laxcomma) { - if (checkComma.first) { - warning("I001", curr); - checkComma.first = false; - } - warning("W014", prev, curr.value); - } - } - - if (state.tokens.next.identifier && !(opts.property && state.inES5())) { - switch (state.tokens.next.value) { - case "break": - case "case": - case "catch": - case "continue": - case "default": - case "do": - case "else": - case "finally": - case "for": - case "if": - case "in": - case "instanceof": - case "return": - case "switch": - case "throw": - case "try": - case "var": - case "let": - case "while": - case "with": - error("E024", state.tokens.next, state.tokens.next.value); - return false; - } - } - - if (state.tokens.next.type === "(punctuator)") { - switch (state.tokens.next.value) { - case "}": - case "]": - case ",": - case ")": - if (opts.allowTrailing) { - return true; - } - - error("E024", state.tokens.next, state.tokens.next.value); - return false; - } - } - return true; - } - function symbol(s, p) { - var x = state.syntax[s]; - if (!x || typeof x !== "object") { - state.syntax[s] = x = { - id: s, - lbp: p, - rbp: p, - value: s - }; - } - return x; - } - function delim(s) { - var x = symbol(s, 0); - x.delim = true; - return x; - } - function stmt(s, f) { - var x = delim(s); - x.identifier = x.reserved = true; - x.fud = f; - return x; - } - function blockstmt(s, f) { - var x = stmt(s, f); - x.block = true; - return x; - } - function reserveName(x) { - var c = x.id.charAt(0); - if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) { - x.identifier = x.reserved = true; - } - return x; - } - function prefix(s, f) { - var x = symbol(s, 150); - reserveName(x); - - x.nud = (typeof f === "function") ? f : function(context) { - this.arity = "unary"; - this.right = expression(context, 150); - - if (this.id === "++" || this.id === "--") { - if (state.option.plusplus) { - warning("W016", this, this.id); - } - - if (this.right) { - checkLeftSideAssign(context, this.right, this); - } - } - - return this; - }; - - return x; - } - function type(s, f) { - var x = symbol(s, 0); - x.type = s; - x.nud = f; - return x; - } - function reserve(name, func) { - var x = type(name, func); - x.identifier = true; - x.reserved = true; - return x; - } - function FutureReservedWord(name, meta) { - var x = type(name, state.syntax["(identifier)"].nud); - - meta = meta || {}; - meta.isFutureReservedWord = true; - - x.value = name; - x.identifier = true; - x.reserved = true; - x.meta = meta; - - return x; - } - function infix(s, f, p, w) { - var x = symbol(s, p); - reserveName(x); - x.infix = true; - x.led = function(context, left) { - if (!w) { - nobreaknonadjacent(state.tokens.prev, state.tokens.curr); - } - if ((s === "in" || s === "instanceof") && left.id === "!") { - warning("W018", left, "!"); - } - if (typeof f === "function") { - return f(context, left, this); - } else { - this.left = left; - this.right = expression(context, p); - return this; - } - }; - return x; - } - function application(s) { - var x = symbol(s, 42); - - x.infix = true; - x.led = function(context, left) { - nobreaknonadjacent(state.tokens.prev, state.tokens.curr); - - this.left = left; - this.right = doFunction(context, { type: "arrow", loneArg: left }); - return this; - }; - return x; - } - function relation(s, f) { - var x = symbol(s, 100); - - x.infix = true; - x.led = function(context, left) { - nobreaknonadjacent(state.tokens.prev, state.tokens.curr); - this.left = left; - var right = this.right = expression(context, 100); - - if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) { - warning("W019", this); - } else if (f) { - f.apply(this, [context, left, right]); - } - - if (!left || !right) { - quit("E041", state.tokens.curr); - } - - if (left.id === "!") { - warning("W018", left, "!"); - } - - if (right.id === "!") { - warning("W018", right, "!"); - } - - return this; - }; - return x; - } - function beginsUnaryExpression(token) { - return token.arity === "unary" && token.id !== "++" && token.id !== "--"; - } - - var typeofValues = {}; - typeofValues.legacy = [ - "xml", - "unknown" - ]; - typeofValues.es3 = [ - "undefined", "boolean", "number", "string", "function", "object", - ]; - typeofValues.es3 = typeofValues.es3.concat(typeofValues.legacy); - typeofValues.es6 = typeofValues.es3.concat("symbol", "bigint"); - function isTypoTypeof(left, right, state) { - var values; - - if (state.option.notypeof) - return false; - - if (!left || !right) - return false; - - values = state.inES6() ? typeofValues.es6 : typeofValues.es3; - - if (right.type === "(identifier)" && right.value === "typeof" && left.type === "(string)") { - if (left.value === "bigint") { - if (!state.option.unstable.bigint) { - warning("W144", left, "BigInt", "bigint"); - } - - return false; - } - - return !_.includes(values, left.value); - } - - return false; - } - function isGlobalEval(left, state) { - var isGlobal = false; - if (left.type === "this" && state.funct["(context)"] === null) { - isGlobal = true; - } - else if (left.type === "(identifier)") { - if (state.option.node && left.value === "global") { - isGlobal = true; - } - - else if (state.option.browser && (left.value === "window" || left.value === "document")) { - isGlobal = true; - } - } - - return isGlobal; - } - function findNativePrototype(left) { - var natives = [ - "Array", "ArrayBuffer", "Boolean", "Collator", "DataView", "Date", - "DateTimeFormat", "Error", "EvalError", "Float32Array", "Float64Array", - "Function", "Infinity", "Intl", "Int16Array", "Int32Array", "Int8Array", - "Iterator", "Number", "NumberFormat", "Object", "RangeError", - "ReferenceError", "RegExp", "StopIteration", "String", "SyntaxError", - "TypeError", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", - "URIError" - ]; - - function walkPrototype(obj) { - if (typeof obj !== "object") return; - return obj.right === "prototype" ? obj : walkPrototype(obj.left); - } - - function walkNative(obj) { - while (!obj.identifier && typeof obj.left === "object") - obj = obj.left; - - if (obj.identifier && natives.indexOf(obj.value) >= 0 && - state.funct["(scope)"].isPredefined(obj.value)) { - return obj.value; - } - } - - var prototype = walkPrototype(left); - if (prototype) return walkNative(prototype); - } - function checkLeftSideAssign(context, left, assignToken, options) { - - var allowDestructuring = options && options.allowDestructuring; - - assignToken = assignToken || left; - - if (state.option.freeze) { - var nativeObject = findNativePrototype(left); - if (nativeObject) - warning("W121", left, nativeObject); - } - - if (left.identifier && !left.isMetaProperty) { - state.funct["(scope)"].block.reassign(left.value, left); - } - - if (left.id === ".") { - if (!left.left || left.left.value === "arguments" && !state.isStrict()) { - warning("W143", assignToken); - } - - state.nameStack.set(state.tokens.prev); - return true; - } else if (left.id === "{" || left.id === "[") { - if (!allowDestructuring || !left.destructAssign) { - if (left.id === "{" || !left.left) { - warning("E031", assignToken); - } else if (left.left.value === "arguments" && !state.isStrict()) { - warning("W143", assignToken); - } - } - - if (left.id === "[") { - state.nameStack.set(left.right); - } - - return true; - } else if (left.identifier && !isReserved(context, left) && !left.isMetaProperty) { - if (state.funct["(scope)"].bindingtype(left.value) === "exception") { - warning("W022", left); - } - - if (left.value === "eval" && state.isStrict()) { - error("E031", assignToken); - return false; - } else if (left.value === "arguments") { - if (!state.isStrict()) { - warning("W143", assignToken); - } else { - error("E031", assignToken); - return false; - } - } - state.nameStack.set(left); - return true; - } - - error("E031", assignToken); - - return false; - } - function assignop(s, f) { - var x = infix(s, typeof f === "function" ? f : function(context, left, that) { - that.left = left; - - checkLeftSideAssign(context, left, that, { allowDestructuring: true }); - - that.right = expression(context, 10); - - return that; - }, 20); - - x.exps = true; - x.assign = true; - - return x; - } - function bitwise(s, f, p) { - var x = symbol(s, p); - reserveName(x); - x.infix = true; - x.led = (typeof f === "function") ? f : function(context, left) { - if (state.option.bitwise) { - warning("W016", this, this.id); - } - this.left = left; - this.right = expression(context, p); - return this; - }; - return x; - } - function bitwiseassignop(s) { - symbol(s, 20).exps = true; - return infix(s, function(context, left, that) { - if (state.option.bitwise) { - warning("W016", that, that.id); - } - - checkLeftSideAssign(context, left, that); - - that.right = expression(context, 10); - - return that; - }, 20); - } - function suffix(s) { - var x = symbol(s, 150); - - x.led = function(context, left) { - if (state.option.plusplus) { - warning("W016", this, this.id); - } - - checkLeftSideAssign(context, left, this); - - this.left = left; - return this; - }; - return x; - } - function optionalidentifier(context, prop, preserve) { - if (!state.tokens.next.identifier) { - return; - } - - if (!preserve) { - advance(); - } - - var curr = state.tokens.curr; - var val = state.tokens.curr.value; - - if (!isReserved(context, curr)) { - return val; - } - - if (prop) { - if (state.inES5()) { - return val; - } - } - - warning("W024", state.tokens.curr, state.tokens.curr.id); - return val; - } - function spreadrest(operation) { - if (!checkPunctuator(state.tokens.next, "...")) { - return false; - } - - if (!state.inES6(true)) { - warning("W119", state.tokens.next, operation + " operator", "6"); - } - advance(); - - if (checkPunctuator(state.tokens.next, "...")) { - warning("E024", state.tokens.next, "..."); - while (checkPunctuator(state.tokens.next, "...")) { - advance(); - } - } - - return true; - } - function identifier(context, prop) { - var i = optionalidentifier(context, prop, false); - if (i) { - return i; - } - - error("E030", state.tokens.next, state.tokens.next.value); - if (state.tokens.next.id !== ";") { - advance(); - } - } - function reachable(controlToken) { - var i = 0, t; - if (state.tokens.next.id !== ";" || controlToken.inBracelessBlock) { - return; - } - for (;;) { - do { - t = peek(i); - i += 1; - } while (t.id !== "(end)" && t.id === "(comment)"); - - if (t.reach) { - return; - } - if (t.id !== "(endline)") { - if (t.id === "function") { - if (state.option.latedef === true) { - warning("W026", t); - } - break; - } - - warning("W027", t, t.value, controlToken.value); - break; - } - } - } - function parseFinalSemicolon(stmt) { - if (state.tokens.next.id !== ";") { - if (state.tokens.next.isUnclosed) return advance(); - - var isSameLine = sameLine(state.tokens.curr, state.tokens.next) && - state.tokens.next.id !== "(end)"; - var blockEnd = checkPunctuator(state.tokens.next, "}"); - - if (isSameLine && !blockEnd && !(stmt.id === "do" && state.inES6(true))) { - errorAt("E058", state.tokens.curr.line, state.tokens.curr.character); - } else if (!state.option.asi) { - if (!(blockEnd && isSameLine && state.option.lastsemic)) { - warningAt("W033", state.tokens.curr.line, state.tokens.curr.character); - } - } - } else { - advance(";"); - } - } - function statement(context) { - var i = indent, r, t = state.tokens.next, hasOwnScope = false; - - context |= prodParams.initial; - - if (t.id === ";") { - advance(";"); - return; - } - var res = isReserved(context, t); - - if (res && t.meta && t.meta.isFutureReservedWord && !t.fud) { - warning("W024", t, t.id); - res = false; - } - - if (t.identifier && !res && peek().id === ":") { - advance(); - advance(":"); - - hasOwnScope = true; - state.funct["(scope)"].stack(); - state.funct["(scope)"].block.addLabel(t.value, { token: state.tokens.curr }); - - if (!state.tokens.next.labelled && state.tokens.next.value !== "{") { - warning("W028", state.tokens.next, t.value, state.tokens.next.value); - } - - t = state.tokens.next; - } - - if (t.id === "{") { - var iscase = (state.funct["(verb)"] === "case" && state.tokens.curr.value === ":"); - block(context, true, true, false, false, iscase); - - if (hasOwnScope) { - state.funct["(scope)"].unstack(); - } - - return; - } - - r = expression(context, 0); - - if (r && !(r.identifier && r.value === "function") && - !(r.type === "(punctuator)" && r.left && - r.left.identifier && r.left.value === "function")) { - if (!state.isStrict() && state.stmtMissingStrict()) { - warning("E007"); - } - } - - if (!t.block) { - if (!state.option.expr && (!r || !r.exps)) { - warning("W030", state.tokens.curr); - } else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") { - warning("W031", t); - } - - parseFinalSemicolon(t); - } - - indent = i; - if (hasOwnScope) { - state.funct["(scope)"].unstack(); - } - return r; - } - function statements(context) { - var a = [], p; - - while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") { - if (state.tokens.next.id === ";") { - p = peek(); - - if (!p || (p.id !== "(" && p.id !== "[")) { - warning("W032"); - } - - advance(";"); - } else { - a.push(statement(context)); - } - } - return a; - } - function directives() { - var current = state.tokens.next; - while (state.tokens.next.id === "(string)") { - var next = peekIgnoreEOL(); - if (!isEndOfExpr(0, current, next)) { - break; - } - current = next; - - advance(); - var directive = state.tokens.curr.value; - if (state.directive[directive] || - (directive === "use strict" && state.option.strict === "implied")) { - warning("W034", state.tokens.curr, directive); - } - if (directive === "use strict" && state.inES7() && - !state.funct["(global)"] && state.funct["(hasSimpleParams)"] === false) { - error("E065", state.tokens.curr); - } - state.directive[directive] = true; - - parseFinalSemicolon(current); - } - - if (state.isStrict()) { - state.option.undef = true; - } - } - function block(context, ordinary, stmt, isfunc, isfatarrow, iscase) { - var a, - b = inblock, - old_indent = indent, - m, - t, - d; - - inblock = ordinary; - - t = state.tokens.next; - - var metrics = state.funct["(metrics)"]; - metrics.nestedBlockDepth += 1; - metrics.verifyMaxNestedBlockDepthPerFunction(); - - if (state.tokens.next.id === "{") { - advance("{"); - state.funct["(scope)"].stack(); - - if (state.tokens.next.id !== "}") { - indent += state.option.indent; - while (!ordinary && state.tokens.next.from > indent) { - indent += state.option.indent; - } - - if (isfunc) { - m = {}; - for (d in state.directive) { - m[d] = state.directive[d]; - } - directives(); - - state.funct["(isStrict)"] = state.isStrict(); - - if (state.option.strict && state.funct["(context)"]["(global)"]) { - if (!m["use strict"] && !state.isStrict()) { - warning("E007"); - } - } - } - - a = statements(context); - - metrics.statementCount += a.length; - - indent -= state.option.indent; - } else if (isfunc) { - state.funct["(isStrict)"] = state.isStrict(); - } - - advance("}", t); - - if (isfunc) { - state.funct["(scope)"].validateParams(isfatarrow); - if (m) { - state.directive = m; - } - } - - state.funct["(scope)"].unstack(); - - indent = old_indent; - } else if (!ordinary) { - if (isfunc) { - state.funct["(scope)"].stack(); - - if (stmt && !isfatarrow && !state.inMoz()) { - error("W118", state.tokens.curr, "function closure expressions"); - } - - if (isfatarrow) { - state.funct["(scope)"].validateParams(true); - } - - var expr = expression(context, 10); - - if (state.option.noreturnawait && context & prodParams.async && - expr.identifier && expr.value === "await") { - warning("W146", expr); - } - - if (state.option.strict && state.funct["(context)"]["(global)"]) { - if (!state.isStrict()) { - warning("E007"); - } - } - - state.funct["(scope)"].unstack(); - } else { - error("E021", state.tokens.next, "{", state.tokens.next.value); - } - } else { - - state.funct["(scope)"].stack(); - - if (!stmt || state.option.curly) { - warning("W116", state.tokens.next, "{", state.tokens.next.value); - } - var supportsFnDecl = state.funct["(verb)"] === "if" || - state.tokens.curr.id === "else"; - - state.tokens.next.inBracelessBlock = true; - indent += state.option.indent; - a = [statement(context)]; - indent -= state.option.indent; - - if (a[0] && a[0].declaration && - !(supportsFnDecl && a[0].id === "function")) { - error("E048", a[0], a[0].id[0].toUpperCase() + a[0].id.slice(1)); - } - - state.funct["(scope)"].unstack(); - } - switch (state.funct["(verb)"]) { - case "break": - case "continue": - case "return": - case "throw": - if (iscase) { - break; - } - default: - state.funct["(verb)"] = null; - } - - inblock = b; - if (ordinary && state.option.noempty && (!a || a.length === 0)) { - warning("W035", state.tokens.prev); - } - metrics.nestedBlockDepth -= 1; - return a; - } - function countMember(m) { - if (membersOnly && typeof membersOnly[m] !== "boolean") { - warning("W036", state.tokens.curr, m); - } - if (typeof member[m] === "number") { - member[m] += 1; - } else { - member[m] = 1; - } - } - - type("(number)", function() { - if (state.tokens.next.id === ".") { - warning("W005", this); - } - - return this; - }); - - type("(string)", function() { - return this; - }); - - state.syntax["(identifier)"] = { - type: "(identifier)", - lbp: 0, - identifier: true, - - nud: function(context) { - var v = this.value; - var isLoneArrowParam = state.tokens.next.id === "=>"; - - if (isReserved(context, this)) { - warning("W024", this, v); - } else if (!isLoneArrowParam && !state.funct["(comparray)"].check(v)) { - state.funct["(scope)"].block.use(v, state.tokens.curr); - } - - return this; - }, - - led: function() { - error("E033", state.tokens.next, state.tokens.next.value); - } - }; - - var baseTemplateSyntax = { - identifier: false, - template: true, - }; - state.syntax["(template)"] = _.extend({ - lbp: 155, - type: "(template)", - nud: doTemplateLiteral, - led: doTemplateLiteral, - noSubst: false - }, baseTemplateSyntax); - - state.syntax["(template middle)"] = _.extend({ - lbp: 0, - type: "(template middle)", - noSubst: false - }, baseTemplateSyntax); - - state.syntax["(template tail)"] = _.extend({ - lbp: 0, - type: "(template tail)", - tail: true, - noSubst: false - }, baseTemplateSyntax); - - state.syntax["(no subst template)"] = _.extend({ - lbp: 155, - type: "(template)", - nud: doTemplateLiteral, - led: doTemplateLiteral, - noSubst: true, - tail: true // mark as tail, since it's always the last component - }, baseTemplateSyntax); - - type("(regexp)", function() { - return this; - }); - - delim("(endline)"); - (function(x) { - x.line = x.from = 0; - })(delim("(begin)")); - delim("(end)").reach = true; - delim("(error)").reach = true; - delim("}").reach = true; - delim(")"); - delim("]"); - delim("\"").reach = true; - delim("'").reach = true; - delim(";"); - delim(":").reach = true; - delim("#"); - - reserve("else"); - reserve("case").reach = true; - reserve("catch"); - reserve("default").reach = true; - reserve("finally"); - reserve("true", function() { return this; }); - reserve("false", function() { return this; }); - reserve("null", function() { return this; }); - reserve("this", function() { - if (state.isStrict() && !isMethod() && - !state.option.validthis && ((state.funct["(statement)"] && - state.funct["(name)"].charAt(0) > "Z") || state.funct["(global)"])) { - warning("W040", this); - } - - return this; - }); - reserve("super", function() { - superNud.call(state.tokens.curr, this); - - return this; - }); - - assignop("=", "assign"); - assignop("+=", "assignadd"); - assignop("-=", "assignsub"); - assignop("*=", "assignmult"); - assignop("/=", "assigndiv").nud = function() { - error("E014"); - }; - assignop("%=", "assignmod"); - assignop("**=", function(context, left, that) { - if (!state.inES7()) { - warning("W119", that, "Exponentiation operator", "7"); - } - - that.left = left; - - checkLeftSideAssign(context, left, that); - - that.right = expression(context, 10); - - return that; - }); - - bitwiseassignop("&="); - bitwiseassignop("|="); - bitwiseassignop("^="); - bitwiseassignop("<<="); - bitwiseassignop(">>="); - bitwiseassignop(">>>="); - infix(",", function(context, left, that) { - if (state.option.nocomma) { - warning("W127", that); - } - - that.left = left; - - if (checkComma()) { - that.right = expression(context, 10); - } else { - that.right = null; - } - - return that; - }, 10, true); - - infix("?", function(context, left, that) { - increaseComplexityCount(); - that.left = left; - that.right = expression(context & ~prodParams.noin, 10); - advance(":"); - expression(context, 10); - return that; - }, 30); - - var orPrecendence = 40; - infix("||", function(context, left, that) { - increaseComplexityCount(); - that.left = left; - that.right = expression(context, orPrecendence); - return that; - }, orPrecendence); - infix("&&", "and", 50); - infix("**", function(context, left, that) { - if (!state.inES7()) { - warning("W119", that, "Exponentiation operator", "7"); - } - if (!left.paren && beginsUnaryExpression(left)) { - error("E024", that, "**"); - } - - that.left = left; - that.right = expression(context, that.rbp); - return that; - }, 150); - state.syntax["**"].rbp = 140; - bitwise("|", "bitor", 70); - bitwise("^", "bitxor", 80); - bitwise("&", "bitand", 90); - relation("==", function(context, left, right) { - var eqnull = state.option.eqnull && - ((left && left.value) === "null" || (right && right.value) === "null"); - - switch (true) { - case !eqnull && state.option.eqeqeq: - this.from = this.character; - warning("W116", this, "===", "=="); - break; - case isTypoTypeof(right, left, state): - warning("W122", this, right.value); - break; - case isTypoTypeof(left, right, state): - warning("W122", this, left.value); - break; - } - - return this; - }); - relation("===", function(context, left, right) { - if (isTypoTypeof(right, left, state)) { - warning("W122", this, right.value); - } else if (isTypoTypeof(left, right, state)) { - warning("W122", this, left.value); - } - return this; - }); - relation("!=", function(context, left, right) { - var eqnull = state.option.eqnull && - ((left && left.value) === "null" || (right && right.value) === "null"); - - if (!eqnull && state.option.eqeqeq) { - this.from = this.character; - warning("W116", this, "!==", "!="); - } else if (isTypoTypeof(right, left, state)) { - warning("W122", this, right.value); - } else if (isTypoTypeof(left, right, state)) { - warning("W122", this, left.value); - } - return this; - }); - relation("!==", function(context, left, right) { - if (isTypoTypeof(right, left, state)) { - warning("W122", this, right.value); - } else if (isTypoTypeof(left, right, state)) { - warning("W122", this, left.value); - } - return this; - }); - relation("<"); - relation(">"); - relation("<="); - relation(">="); - bitwise("<<", "shiftleft", 120); - bitwise(">>", "shiftright", 120); - bitwise(">>>", "shiftrightunsigned", 120); - infix("in", "in", 120); - infix("instanceof", function(context, left, token) { - var right; - var scope = state.funct["(scope)"]; - token.left = left; - token.right = right = expression(context, 120); - if (!right) { - return token; - } - - if (right.id === "(number)" || - right.id === "(string)" || - right.value === "null" || - (right.value === "undefined" && !scope.has("undefined")) || - right.arity === "unary" || - right.id === "{" || - (right.id === "[" && !right.right) || - right.id === "(regexp)" || - (right.id === "(template)" && !right.tag)) { - error("E060"); - } - - if (right.id === "function") { - warning("W139"); - } - - return token; - }, 120); - infix("+", function(context, left, that) { - var next = state.tokens.next; - var right; - that.left = left; - that.right = right = expression(context, 130); - - if (left && right && left.id === "(string)" && right.id === "(string)") { - left.value += right.value; - left.character = right.character; - if (!state.option.scripturl && reg.javascriptURL.test(left.value)) { - warning("W050", left); - } - return left; - } - - if (next.id === "+" || next.id === "++") { - warning("W007", that.right); - } - - return that; - }, 130); - prefix("+", function(context) { - var next = state.tokens.next; - this.arity = "unary"; - this.right = expression(context, 150); - - if (next.id === "+" || next.id === "++") { - warning("W007", this.right); - } - - return this; - }); - infix("-", function(context, left, that) { - var next = state.tokens.next; - that.left = left; - that.right = expression(context, 130); - - if (next.id === "-" || next.id === "--") { - warning("W006", that.right); - } - - return that; - }, 130); - prefix("-", function(context) { - var next = state.tokens.next; - this.arity = "unary"; - this.right = expression(context, 150); - - if (next.id === "-" || next.id === "--") { - warning("W006", this.right); - } - - return this; - }); - infix("*", "mult", 140); - infix("/", "div", 140); - infix("%", "mod", 140); - - suffix("++"); - prefix("++", "preinc"); - state.syntax["++"].exps = true; - - suffix("--"); - prefix("--", "predec"); - state.syntax["--"].exps = true; - - prefix("delete", function(context) { - this.arity = "unary"; - var p = expression(context, 150); - if (!p) { - return this; - } - - if (p.id !== "." && p.id !== "[") { - warning("W051"); - } - this.first = p; - if (p.identifier && !state.isStrict()) { - p.forgiveUndef = true; - } - return this; - }).exps = true; - - prefix("~", function(context) { - if (state.option.bitwise) { - warning("W016", this, "~"); - } - this.arity = "unary"; - this.right = expression(context, 150); - return this; - }); - - infix("..."); - - prefix("!", function(context) { - this.arity = "unary"; - this.right = expression(context, 150); - - if (!this.right) { // '!' followed by nothing? Give up. - quit("E041", this); - } - - if (bang[this.right.id] === true) { - warning("W018", this, "!"); - } - return this; - }); - - prefix("typeof", function(context) { - this.arity = "unary"; - var p = expression(context, 150); - this.first = this.right = p; - - if (!p) { // 'typeof' followed by nothing? Give up. - quit("E041", this); - } - if (p.identifier) { - p.forgiveUndef = true; - } - return this; - }); - prefix("new", function(context) { - var mp = metaProperty(context, "target", function() { - if (!state.inES6(true)) { - warning("W119", state.tokens.prev, "new.target", "6"); - } - var inFunction, c = state.funct; - while (c) { - inFunction = !c["(global)"]; - if (!c["(arrow)"]) { break; } - c = c["(context)"]; - } - if (!inFunction) { - warning("W136", state.tokens.prev, "new.target"); - } - }); - if (mp) { return mp; } - - var c = expression(context, 155), i; - if (c && c.id !== "function") { - if (c.identifier) { - switch (c.value) { - case "Number": - case "String": - case "Boolean": - case "Math": - case "JSON": - warning("W053", state.tokens.prev, c.value); - break; - case "Symbol": - if (state.inES6()) { - warning("W053", state.tokens.prev, c.value); - } - break; - case "Function": - if (!state.option.evil) { - warning("W054"); - } - break; - case "Date": - case "RegExp": - case "this": - break; - default: - i = c.value.substr(0, 1); - if (state.option.newcap && (i < "A" || i > "Z") && - !state.funct["(scope)"].isPredefined(c.value)) { - warning("W055", state.tokens.curr); - } - } - } else { - if (c.id !== "." && c.id !== "[" && c.id !== "(") { - warning("W056", state.tokens.curr); - } - } - } else { - if (!state.option.supernew) - warning("W057", this); - } - if (state.tokens.next.id !== "(" && !state.option.supernew) { - warning("W058", state.tokens.curr, state.tokens.curr.value); - } - this.first = this.right = c; - return this; - }); - state.syntax["new"].exps = true; - blockstmt("class", function(context) { - var className, classNameToken; - var inexport = context & prodParams.export; - - if (!state.inES6()) { - warning("W104", state.tokens.curr, "class", "6"); - } - state.inClassBody = true; - if (state.tokens.next.identifier && state.tokens.next.value !== "extends") { - classNameToken = state.tokens.next; - className = classNameToken.value; - identifier(context); - state.funct["(scope)"].addbinding(className, { - type: "class", - initialized: false, - token: classNameToken - }); - } - if (state.tokens.next.value === "extends") { - advance("extends"); - expression(context, 0); - } - - if (classNameToken) { - this.name = className; - state.funct["(scope)"].initialize(className); - if (inexport) { - state.funct["(scope)"].setExported(className, classNameToken); - } - } - state.funct["(scope)"].stack(); - classBody(this, context); - return this; - }).exps = true; - prefix("class", function(context) { - var className, classNameToken; - - if (!state.inES6()) { - warning("W104", state.tokens.curr, "class", "6"); - } - state.inClassBody = true; - if (state.tokens.next.identifier && state.tokens.next.value !== "extends") { - classNameToken = state.tokens.next; - className = classNameToken.value; - identifier(context); - } - if (state.tokens.next.value === "extends") { - advance("extends"); - expression(context, 0); - } - - state.funct["(scope)"].stack(); - if (classNameToken) { - this.name = className; - state.funct["(scope)"].addbinding(className, { - type: "class", - initialized: true, - token: classNameToken - }); - state.funct["(scope)"].block.use(className, classNameToken); - } - - classBody(this, context); - return this; - }); - - function classBody(classToken, context) { - var props = Object.create(null); - var name, accessorType, token, isStatic, inGenerator, hasConstructor; - if (state.tokens.next.value === "{") { - advance("{"); - } else { - warning("W116", state.tokens.curr, "identifier", state.tokens.next.type); //? - advance(); - } - - while (state.tokens.next.value !== "}") { - isStatic = false; - inGenerator = false; - context &= ~prodParams.preAsync; - - if (state.tokens.next.value === "static" && - !checkPunctuator(peek(), "(")) { - isStatic = true; - advance(); - } - - if (state.tokens.next.value === "async") { - if (!checkPunctuator(peek(), "(")) { - context |= prodParams.preAsync; - advance(); - - nolinebreak(state.tokens.curr); - - if (checkPunctuator(state.tokens.next, "*")) { - inGenerator = true; - advance("*"); - - if (!state.inES9()) { - warning("W119", state.tokens.next, "async generators", "9"); - } - } - - if (!state.inES8()) { - warning("W119", state.tokens.curr, "async functions", "8"); - } - } - } - - if (state.tokens.next.value === "*") { - inGenerator = true; - advance(); - } - - token = state.tokens.next; - - if ((token.value === "set" || token.value === "get") && !checkPunctuator(peek(), "(")) { - if (inGenerator) { - error("E024", token, token.value); - } - accessorType = token.value; - advance(); - token = state.tokens.next; - - if (!isStatic && token.value === "constructor") { - error("E049", token, "class " + accessorType + "ter method", token.value); - } else if (isStatic && token.value === "prototype") { - error("E049", token, "static class " + accessorType + "ter method", token.value); - } - } else { - accessorType = null; - } - - switch (token.value) { - case ";": - warning("W032", token); - advance(); - break; - case "constructor": - if (isStatic) { - name = propertyName(context); - saveProperty(props, name, token, true, isStatic); - doMethod(classToken, context, name, inGenerator); - } else { - if (inGenerator || context & prodParams.preAsync) { - error("E024", token, token.value); - } else if (hasConstructor) { - error("E024", token, token.value); - } else { - hasConstructor = !accessorType && !isStatic; - } - advance(); - doMethod(classToken, context, state.nameStack.infer()); - } - break; - case "[": - name = computedPropertyName(context); - doMethod(classToken, context, name, inGenerator); - break; - default: - name = propertyName(context); - if (name === undefined) { - error("E024", token, token.value); - advance(); - break; - } - - if (accessorType) { - saveAccessor(accessorType, props, name, token, true, isStatic); - name = state.nameStack.infer(); - } else { - if (isStatic && name === "prototype") { - error("E049", token, "static class method", name); - } - - saveProperty(props, name, token, true, isStatic); - } - - doMethod(classToken, context, name, inGenerator); - break; - } - } - advance("}"); - checkProperties(props); - - state.inClassBody = false; - state.funct["(scope)"].unstack(); - } - - function doMethod(classToken, context, name, generator) { - if (generator) { - if (!state.inES6()) { - warning("W119", state.tokens.curr, "function*", "6"); - } - } - - if (state.tokens.next.value !== "(") { - error("E054", state.tokens.next, state.tokens.next.value); - advance(); - if (state.tokens.next.value === "{") { - advance(); - if (state.tokens.next.value === "}") { - warning("W116", state.tokens.next, "(", state.tokens.next.value); - advance(); - identifier(context); - advance(); - } - return; - } else { - while (state.tokens.next.value !== "(") { - advance(); - } - } - } - - doFunction(context, { name: name, - type: generator ? "generator" : null, - isMethod: true, - statement: classToken }); - } - - prefix("void").exps = true; - - infix(".", function(context, left, that) { - var m = identifier(context, true); - - if (typeof m === "string") { - countMember(m); - } - - that.left = left; - that.right = m; - - if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") { - warning("W001"); - } - - if (left && left.value === "arguments" && (m === "callee" || m === "caller")) { - if (state.option.noarg) - warning("W059", left, m); - else if (state.isStrict()) - error("E008"); - } else if (!state.option.evil && left && left.value === "document" && - (m === "write" || m === "writeln")) { - warning("W060", left); - } - - if (!state.option.evil && (m === "eval" || m === "execScript")) { - if (isGlobalEval(left, state)) { - warning("W061"); - } - } - - return that; - }, 160, true); - - infix("(", function(context, left, that) { - if (state.option.immed && left && !left.immed && left.id === "function") { - warning("W062"); - } - - if (state.option.asi && checkPunctuators(state.tokens.prev, [")", "]"]) && - !sameLine(state.tokens.prev, state.tokens.curr)) { - warning("W014", state.tokens.curr, state.tokens.curr.id); - } - - var n = 0; - var p = []; - - if (left) { - if (left.type === "(identifier)") { - if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) { - if ("Array Number String Boolean Date Object Error Symbol".indexOf(left.value) === -1) { - if (left.value === "Math") { - warning("W063", left); - } else if (state.option.newcap) { - warning("W064", left); - } - } - } - } - } - - if (state.tokens.next.id !== ")") { - for (;;) { - spreadrest("spread"); - - p[p.length] = expression(context, 10); - n += 1; - if (state.tokens.next.id !== ",") { - break; - } - advance(","); - checkComma({ allowTrailing: true }); - - if (state.tokens.next.id === ")") { - if (!state.inES8()) { - warning("W119", state.tokens.curr, "Trailing comma in arguments lists", "8"); - } - - break; - } - } - } - - advance(")"); - - if (typeof left === "object") { - if (!state.inES5() && left.value === "parseInt" && n === 1) { - warning("W065", state.tokens.curr); - } - if (!state.option.evil) { - if (left.value === "eval" || left.value === "Function" || - left.value === "execScript") { - warning("W061", left); - } else if (p[0] && p[0].id === "(string)" && - (left.value === "setTimeout" || - left.value === "setInterval")) { - warning("W066", left); - addEvalCode(left, p[0]); - } else if (p[0] && p[0].id === "(string)" && - left.value === "." && - left.left.value === "window" && - (left.right === "setTimeout" || - left.right === "setInterval")) { - warning("W066", left); - addEvalCode(left, p[0]); - } - } - if (!left.identifier && left.id !== "." && left.id !== "[" && left.id !== "=>" && - left.id !== "(" && left.id !== "&&" && left.id !== "||" && left.id !== "?" && - left.id !== "async" && !(state.inES6() && left["(name)"])) { - warning("W067", that); - } - } - - that.left = left; - return that; - }, 155, true).exps = true; - - function peekThroughParens(parens) { - var pn = state.tokens.next; - var i = -1; - var pn1; - - do { - if (pn.value === "(") { - parens += 1; - } else if (pn.value === ")") { - parens -= 1; - } - - i += 1; - pn1 = pn; - pn = peek(i); - } while (!(parens === 0 && pn1.value === ")") && pn.type !== "(end)"); - - return pn; - } - - prefix("(", function(context, rbp) { - var ret, triggerFnExpr, first, last; - var opening = state.tokens.curr; - var preceeding = state.tokens.prev; - var isNecessary = !state.option.singleGroups; - var pn = peekThroughParens(1); - - if (state.tokens.next.id === "function") { - triggerFnExpr = state.tokens.next.immed = true; - } - if (pn.value === "=>") { - pn.funct = doFunction(context, { type: "arrow", parsedOpening: true }); - return pn; - } - if (state.tokens.next.id === ")") { - advance(")"); - return; - } - - ret = expression(context, 0); - - advance(")", this); - - if (!ret) { - return; - } - - ret.paren = true; - - if (state.option.immed && ret && ret.id === "function") { - if (state.tokens.next.id !== "(" && - state.tokens.next.id !== "." && state.tokens.next.id !== "[") { - warning("W068", this); - } - } - - if (ret.id === ",") { - first = ret.left; - while (first.id === ",") { - first = first.left; - } - - last = ret.right; - } else { - first = last = ret; - - if (!isNecessary) { - if (!triggerFnExpr) { - triggerFnExpr = ret.id === "async"; - } - - isNecessary = - (opening.beginsStmt && (ret.id === "{" || triggerFnExpr)) || - (triggerFnExpr && - (!isEndOfExpr() || state.tokens.prev.id !== "}")) || - (ret.id === "=>" && !isEndOfExpr()) || - (ret.id === "{" && preceeding.id === "=>") || - (beginsUnaryExpression(ret) && state.tokens.next.id === "**") || - (ret.type === "(number)" && - checkPunctuator(pn, ".") && /^\d+$/.test(ret.value)) || - (opening.beginsStmt && ret.id === "=" && ret.left.id === "{"); - } - } - if (!isNecessary && (isOperator(first) || first !== last)) { - isNecessary = - (rbp > first.lbp) || - (rbp > 0 && rbp === first.lbp) || - (!isEndOfExpr() && last.rbp < state.tokens.next.lbp); - } - - if (!isNecessary) { - warning("W126", opening); - } - - return ret; - }); - - application("=>"); - - infix("[", function(context, left, that) { - var e, s, canUseDot; - - if (state.option.asi && checkPunctuators(state.tokens.prev, [")", "]"]) && - !sameLine(state.tokens.prev, state.tokens.curr)) { - warning("W014", state.tokens.curr, state.tokens.curr.id); - } - - e = expression(context & ~prodParams.noin, 10); - - if (e && e.type === "(string)") { - if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) { - if (isGlobalEval(left, state)) { - warning("W061"); - } - } - - countMember(e.value); - if (!state.option.sub && reg.identifier.test(e.value)) { - s = state.syntax[e.value]; - - if (s) { - canUseDot = !isReserved(context, s); - } else { - canUseDot = e.value !== "eval" && e.value !== "arguments"; - } - - if (canUseDot) { - warning("W069", state.tokens.prev, e.value); - } - } - } - advance("]", that); - - if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") { - warning("W001"); - } - - that.left = left; - that.right = e; - return that; - }, 160, true); - - function comprehensiveArrayExpression(context) { - var res = {}; - res.exps = true; - state.funct["(comparray)"].stack(); - var reversed = false; - if (state.tokens.next.value !== "for") { - reversed = true; - if (!state.inMoz()) { - warning("W116", state.tokens.next, "for", state.tokens.next.value); - } - state.funct["(comparray)"].setState("use"); - res.right = expression(context, 10); - } - - advance("for"); - if (state.tokens.next.value === "each") { - advance("each"); - if (!state.inMoz()) { - warning("W118", state.tokens.curr, "for each"); - } - } - advance("("); - state.funct["(comparray)"].setState("define"); - res.left = expression(context, 130); - if (_.includes(["in", "of"], state.tokens.next.value)) { - advance(); - } else { - error("E045", state.tokens.curr); - } - state.funct["(comparray)"].setState("generate"); - expression(context, 10); - - advance(")"); - if (state.tokens.next.value === "if") { - advance("if"); - advance("("); - state.funct["(comparray)"].setState("filter"); - expression(context, 10); - advance(")"); - } - - if (!reversed) { - state.funct["(comparray)"].setState("use"); - res.right = expression(context, 10); - } - - advance("]"); - state.funct["(comparray)"].unstack(); - return res; - } - - prefix("[", function(context) { - var blocktype = lookupBlockType(); - if (blocktype.isCompArray) { - if (!state.option.esnext && !state.inMoz()) { - warning("W118", state.tokens.curr, "array comprehension"); - } - return comprehensiveArrayExpression(context); - } else if (blocktype.isDestAssign) { - this.destructAssign = destructuringPattern(context, { - openingParsed: true, - assignment: true - }); - return this; - } - var b = !sameLine(state.tokens.curr, state.tokens.next); - this.first = []; - if (b) { - indent += state.option.indent; - if (state.tokens.next.from === indent + state.option.indent) { - indent += state.option.indent; - } - } - while (state.tokens.next.id !== "(end)") { - while (state.tokens.next.id === ",") { - if (!state.option.elision) { - if (!state.inES5()) { - warning("W070"); - } else { - warning("W128"); - do { - advance(","); - } while (state.tokens.next.id === ","); - continue; - } - } - advance(","); - } - - if (state.tokens.next.id === "]") { - break; - } - - spreadrest("spread"); - - this.first.push(expression(context, 10)); - if (state.tokens.next.id === ",") { - advance(","); - checkComma({ allowTrailing: true }); - if (state.tokens.next.id === "]" && !state.inES5()) { - warning("W070", state.tokens.curr); - break; - } - } else { - if (state.option.trailingcomma && state.inES5()) { - warningAt("W140", state.tokens.curr.line, state.tokens.curr.character); - } - break; - } - } - if (b) { - indent -= state.option.indent; - } - advance("]", this); - return this; - }); - - - function isMethod() { - return !!state.funct["(method)"]; - } - - function propertyName(context, preserveOrToken) { - var id; - var preserve = true; - if (typeof preserveOrToken === "object") { - id = preserveOrToken; - } else { - preserve = preserveOrToken; - id = optionalidentifier(context, true, preserve); - } - - if (!id) { - if (state.tokens.next.id === "(string)") { - id = state.tokens.next.value; - if (!preserve) { - advance(); - } - } else if (state.tokens.next.id === "(number)") { - id = state.tokens.next.value.toString(); - if (!preserve) { - advance(); - } - } - } else if (typeof id === "object") { - if (id.id === "(string)" || id.id === "(identifier)") id = id.value; - else if (id.id === "(number)") id = id.value.toString(); - } - - if (id === "hasOwnProperty") { - warning("W001"); - } - - return id; - } - function functionparams(context, options) { - var next; - var paramsIds = []; - var ident; - var tokens = []; - var t; - var pastDefault = false; - var pastRest = false; - var arity = 0; - var loneArg = options && options.loneArg; - var hasDestructuring = false; - - if (loneArg && loneArg.identifier === true) { - state.funct["(scope)"].addParam(loneArg.value, loneArg); - return { arity: 1, params: [ loneArg.value ], isSimple: true }; - } - - next = state.tokens.next; - - if (!options || !options.parsedOpening) { - advance("("); - } - - if (state.tokens.next.id === ")") { - advance(")"); - return; - } - - function addParam(addParamArgs) { - state.funct["(scope)"].addParam.apply(state.funct["(scope)"], addParamArgs); - } - - for (;;) { - arity++; - var currentParams = []; - - if (_.includes(["{", "["], state.tokens.next.id)) { - hasDestructuring = true; - tokens = destructuringPattern(context); - for (t in tokens) { - t = tokens[t]; - if (t.id) { - paramsIds.push(t.id); - currentParams.push([t.id, t.token]); - } - } - } else { - pastRest = spreadrest("rest"); - ident = identifier(context); - - if (ident) { - paramsIds.push(ident); - currentParams.push([ident, state.tokens.curr]); - } else { - while (!checkPunctuators(state.tokens.next, [",", ")"])) advance(); - } - } - if (pastDefault) { - if (state.tokens.next.id !== "=") { - error("W138", state.tokens.curr); - } - } - if (state.tokens.next.id === "=") { - if (!state.inES6()) { - warning("W119", state.tokens.next, "default parameters", "6"); - } - - if (pastRest) { - error("E062", state.tokens.next); - } - - advance("="); - pastDefault = true; - expression(context, 10); - } - currentParams.forEach(addParam); - if (state.tokens.next.id === ",") { - if (pastRest) { - warning("W131", state.tokens.next); - } - advance(","); - checkComma({ allowTrailing: true }); - } - - if (state.tokens.next.id === ")") { - if (state.tokens.curr.id === "," && !state.inES8()) { - warning("W119", state.tokens.curr, "Trailing comma in function parameters", "8"); - } - - advance(")", next); - return { - arity: arity, - params: paramsIds, - isSimple: !hasDestructuring && !pastRest && !pastDefault - }; - } - } - } - function functor(name, token, overwrites) { - var funct = { - "(name)" : name, - "(breakage)" : 0, - "(loopage)" : 0, - "(isStrict)" : "unknown", - - "(global)" : false, - - "(line)" : null, - "(character)" : null, - "(metrics)" : null, - "(statement)" : null, - "(context)" : null, - "(scope)" : null, - "(comparray)" : null, - "(yielded)" : null, - "(arrow)" : null, - "(async)" : null, - "(params)" : null - }; - - if (token) { - _.extend(funct, { - "(line)" : token.line, - "(character)": token.character, - "(metrics)" : createMetrics(token) - }); - } - - _.extend(funct, overwrites); - - if (funct["(context)"]) { - funct["(scope)"] = funct["(context)"]["(scope)"]; - funct["(comparray)"] = funct["(context)"]["(comparray)"]; - } - - return funct; - } - function hasParsedCode(funct) { - return funct["(global)"] && !funct["(verb)"]; - } - function doTemplateLiteral(context, leftOrRbp) { - var ctx = this.context; - var noSubst = this.noSubst; - var depth = this.depth; - var left = typeof leftOrRbp === "number" ? null : leftOrRbp; - - if (!noSubst) { - while (!end()) { - if (!state.tokens.next.template || state.tokens.next.depth > depth) { - expression(context, 0); // should probably have different rbp? - } else { - advance(); - } - } - } - - return { - id: "(template)", - type: "(template)", - tag: left - }; - - function end() { - if (state.tokens.curr.template && state.tokens.curr.tail && - state.tokens.curr.context === ctx) { - return true; - } - var complete = (state.tokens.next.template && state.tokens.next.tail && - state.tokens.next.context === ctx); - if (complete) advance(); - return complete || state.tokens.next.isUnclosed; - } - } - function doFunction(context, options) { - var f, token, name, statement, classExprBinding, isGenerator, isArrow, - isMethod, ignoreLoopFunc; - var oldOption = state.option; - var oldIgnored = state.ignored; - var isAsync = context & prodParams.preAsync; - - if (options) { - name = options.name; - statement = options.statement; - classExprBinding = options.classExprBinding; - isGenerator = options.type === "generator"; - isArrow = options.type === "arrow"; - isMethod = options.isMethod; - ignoreLoopFunc = options.ignoreLoopFunc; - } - - context &= ~prodParams.noin; - context &= ~prodParams.tryClause; - - if (isAsync) { - context |= prodParams.async; - } else { - context &= ~prodParams.async; - } - - if (isGenerator) { - context |= prodParams.yield; - } else if (!isArrow) { - context &= ~prodParams.yield; - } - context &= ~prodParams.preAsync; - - state.option = Object.create(state.option); - state.ignored = Object.create(state.ignored); - - state.funct = functor(name || state.nameStack.infer(), state.tokens.next, { - "(statement)": statement, - "(context)": state.funct, - "(arrow)": isArrow, - "(method)": isMethod, - "(async)": isAsync - }); - - f = state.funct; - token = state.tokens.curr; - - functions.push(state.funct); - state.funct["(scope)"].stack("functionouter"); - var internallyAccessibleName = !isMethod && (name || classExprBinding); - if (internallyAccessibleName) { - state.funct["(scope)"].block.add(internallyAccessibleName, - classExprBinding ? "class" : "function", state.tokens.curr, false); - } - - if (!isArrow) { - state.funct["(scope)"].funct.add("arguments", "var", token, false); - } - state.funct["(scope)"].stack("functionparams"); - - var paramsInfo = functionparams(context, options); - - if (paramsInfo) { - state.funct["(params)"] = paramsInfo.params; - state.funct["(hasSimpleParams)"] = paramsInfo.isSimple; - state.funct["(metrics)"].arity = paramsInfo.arity; - state.funct["(metrics)"].verifyMaxParametersPerFunction(); - } else { - state.funct["(params)"] = []; - state.funct["(metrics)"].arity = 0; - state.funct["(hasSimpleParams)"] = true; - } - - if (isArrow) { - context &= ~prodParams.yield; - - if (!state.inES6(true)) { - warning("W119", state.tokens.curr, "arrow function syntax (=>)", "6"); - } - - if (!options.loneArg) { - advance("=>"); - } - } - - block(context, false, true, true, isArrow); - - if (!state.option.noyield && isGenerator && !state.funct["(yielded)"]) { - warning("W124", state.tokens.curr); - } - - state.funct["(metrics)"].verifyMaxStatementsPerFunction(); - state.funct["(metrics)"].verifyMaxComplexityPerFunction(); - state.funct["(unusedOption)"] = state.option.unused; - state.option = oldOption; - state.ignored = oldIgnored; - state.funct["(last)"] = state.tokens.curr.line; - state.funct["(lastcharacter)"] = state.tokens.curr.character; - state.funct["(scope)"].unstack(); // also does usage and label checks - state.funct["(scope)"].unstack(); - - state.funct = state.funct["(context)"]; - - if (!ignoreLoopFunc && !state.option.loopfunc && state.funct["(loopage)"]) { - if (f["(outerMutables)"]) { - warning("W083", token, f["(outerMutables)"].join(", ")); - } - } - - return f; - } - - function createMetrics(functionStartToken) { - return { - statementCount: 0, - nestedBlockDepth: -1, - ComplexityCount: 1, - arity: 0, - - verifyMaxStatementsPerFunction: function() { - if (state.option.maxstatements && - this.statementCount > state.option.maxstatements) { - warning("W071", functionStartToken, this.statementCount); - } - }, - - verifyMaxParametersPerFunction: function() { - if (_.isNumber(state.option.maxparams) && - this.arity > state.option.maxparams) { - warning("W072", functionStartToken, this.arity); - } - }, - - verifyMaxNestedBlockDepthPerFunction: function() { - if (state.option.maxdepth && - this.nestedBlockDepth > 0 && - this.nestedBlockDepth === state.option.maxdepth + 1) { - warning("W073", null, this.nestedBlockDepth); - } - }, - - verifyMaxComplexityPerFunction: function() { - var max = state.option.maxcomplexity; - var cc = this.ComplexityCount; - if (max && cc > max) { - warning("W074", functionStartToken, cc); - } - } - }; - } - - function increaseComplexityCount() { - state.funct["(metrics)"].ComplexityCount += 1; - } - - function checkCondAssignment(token) { - if (!token || token.paren) { - return; - } - - if (token.id === ",") { - checkCondAssignment(token.right); - return; - } - - switch (token.id) { - case "=": - case "+=": - case "-=": - case "*=": - case "%=": - case "&=": - case "|=": - case "^=": - case "/=": - if (!state.option.boss) { - warning("W084", token); - } - } - } - function checkProperties(props) { - if (state.inES5()) { - for (var name in props) { - if (props[name] && props[name].setterToken && !props[name].getterToken && - !props[name].static) { - warning("W078", props[name].setterToken); - } - } - } - } - - function metaProperty(context, name, c) { - if (checkPunctuator(state.tokens.next, ".")) { - var left = state.tokens.curr.id; - advance("."); - var id = identifier(context); - state.tokens.curr.isMetaProperty = true; - if (name !== id) { - error("E057", state.tokens.prev, left, id); - } else { - c(); - } - return state.tokens.curr; - } - } - (function(x) { - x.nud = function(context) { - var b, f, i, params, t, isGeneratorMethod = false, nextVal; - var props = Object.create(null); // All properties, including accessors - var isAsyncMethod = false; - - b = !sameLine(state.tokens.curr, state.tokens.next); - if (b) { - indent += state.option.indent; - if (state.tokens.next.from === indent + state.option.indent) { - indent += state.option.indent; - } - } - - var blocktype = lookupBlockType(); - if (blocktype.isDestAssign) { - this.destructAssign = destructuringPattern(context, { - openingParsed: true, - assignment: true - }); - return this; - } - state.inObjectBody = true; - for (;;) { - if (state.tokens.next.id === "}") { - break; - } - - nextVal = state.tokens.next.value; - if (state.tokens.next.identifier && - (peekIgnoreEOL().id === "," || peekIgnoreEOL().id === "}")) { - if (!state.inES6()) { - warning("W104", state.tokens.next, "object short notation", "6"); - } - i = propertyName(context, true); - saveProperty(props, i, state.tokens.next); - - expression(context, 10); - - } else if (peek().id !== ":" && (nextVal === "get" || nextVal === "set")) { - advance(nextVal); - - if (!state.inES5()) { - error("E034"); - } - - if (state.tokens.next.id === "[") { - i = computedPropertyName(context); - } else { - i = propertyName(context); - if (!i && !state.inES6()) { - error("E035"); - } - } - if (i) { - saveAccessor(nextVal, props, i, state.tokens.curr); - } - - t = state.tokens.next; - f = doFunction(context, { isMethod: true }); - params = f["(params)"]; - if (nextVal === "get" && i && params.length) { - warning("W076", t, params[0], i); - } else if (nextVal === "set" && i && f["(metrics)"].arity !== 1) { - warning("W077", t, i); - } - - } else if (spreadrest("spread")) { - if (!state.inES9()) { - warning("W119", state.tokens.next, "object spread property", "9"); - } - - expression(context, 10); - } else { - if (state.tokens.next.id === "async" && !checkPunctuators(peek(), ["(", ":"])) { - if (!state.inES8()) { - warning("W119", state.tokens.next, "async functions", "8"); - } - - isAsyncMethod = true; - advance(); - - nolinebreak(state.tokens.curr); - } else { - isAsyncMethod = false; - } - - if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") { - if (isAsyncMethod && !state.inES9()) { - warning("W119", state.tokens.next, "async generators", "9"); - } else if (!state.inES6()) { - warning("W104", state.tokens.next, "generator functions", "6"); - } - - advance("*"); - isGeneratorMethod = true; - } else { - isGeneratorMethod = false; - } - - if (state.tokens.next.id === "[") { - i = computedPropertyName(context); - state.nameStack.set(i); - } else { - state.nameStack.set(state.tokens.next); - i = propertyName(context); - saveProperty(props, i, state.tokens.next); - - if (typeof i !== "string") { - break; - } - } - - if (state.tokens.next.value === "(") { - if (!state.inES6()) { - warning("W104", state.tokens.curr, "concise methods", "6"); - } - - doFunction(isAsyncMethod ? context | prodParams.preAsync : context, { - isMethod: true, - type: isGeneratorMethod ? "generator" : null - }); - } else { - advance(":"); - expression(context, 10); - } - } - - countMember(i); - - if (state.tokens.next.id === ",") { - advance(","); - checkComma({ allowTrailing: true, property: true }); - if (state.tokens.next.id === ",") { - warning("W070", state.tokens.curr); - } else if (state.tokens.next.id === "}" && !state.inES5()) { - warning("W070", state.tokens.curr); - } - } else { - if (state.option.trailingcomma && state.inES5()) { - warningAt("W140", state.tokens.curr.line, state.tokens.curr.character); - } - break; - } - } - if (b) { - indent -= state.option.indent; - } - advance("}", this); - - checkProperties(props); - state.inObjectBody = false; - - return this; - }; - x.fud = function() { - error("E036", state.tokens.curr); - }; - }(delim("{"))); - - function destructuringPattern(context, options) { - var isAssignment = options && options.assignment; - - context &= ~prodParams.noin; - - if (!state.inES6()) { - warning("W104", state.tokens.curr, - isAssignment ? "destructuring assignment" : "destructuring binding", "6"); - } - - return destructuringPatternRecursive(context, options); - } - - function destructuringPatternRecursive(context, options) { - var ids, idx; - var identifiers = []; - var openingParsed = options && options.openingParsed; - var isAssignment = options && options.assignment; - var recursiveOptions = isAssignment ? { assignment: isAssignment } : null; - var firstToken = openingParsed ? state.tokens.curr : state.tokens.next; - - var nextInnerDE = function() { - var ident; - if (checkPunctuators(state.tokens.next, ["[", "{"])) { - ids = destructuringPatternRecursive(context, recursiveOptions); - for (idx = 0; idx < ids.length; idx++) { - identifiers.push({ id: ids[idx].id, token: ids[idx].token }); - } - } else if (checkPunctuator(state.tokens.next, ",")) { - identifiers.push({ id: null, token: state.tokens.curr }); - } else if (checkPunctuator(state.tokens.next, "(")) { - advance("("); - nextInnerDE(); - advance(")"); - } else { - if (isAssignment) { - var assignTarget = expression(context, 20); - if (assignTarget) { - checkLeftSideAssign(context, assignTarget); - if (assignTarget.identifier) { - ident = assignTarget.value; - } - } - } else { - ident = identifier(context); - } - if (ident) { - identifiers.push({ id: ident, token: state.tokens.curr }); - } - } - }; - - var assignmentProperty = function(context) { - var id, expr; - - if (checkPunctuator(state.tokens.next, "[")) { - advance("["); - expression(context, 10); - advance("]"); - advance(":"); - nextInnerDE(); - } else if (state.tokens.next.id === "(string)" || - state.tokens.next.id === "(number)") { - advance(); - advance(":"); - nextInnerDE(); - } else { - var isRest = spreadrest("rest"); - - if (isRest) { - if (!state.inES9()) { - warning("W119", state.tokens.next, "object rest property", "9"); - } - if (state.tokens.next.type === "(identifier)") { - id = identifier(context); - } else { - expr = expression(context, 10); - error("E030", expr, expr.value); - } - } else { - id = identifier(context); - } - - if (!isRest && checkPunctuator(state.tokens.next, ":")) { - advance(":"); - nextInnerDE(); - } else if (id) { - if (isAssignment) { - checkLeftSideAssign(context, state.tokens.curr); - } - identifiers.push({ id: id, token: state.tokens.curr }); - } - - if (isRest && checkPunctuator(state.tokens.next, ",")) { - warning("W130", state.tokens.next); - } - } - }; - - var id, value; - if (checkPunctuator(firstToken, "[")) { - if (!openingParsed) { - advance("["); - } - if (checkPunctuator(state.tokens.next, "]")) { - warning("W137", state.tokens.curr); - } - var element_after_rest = false; - while (!checkPunctuator(state.tokens.next, "]")) { - var isRest = spreadrest("rest"); - - nextInnerDE(); - - if (isRest && !element_after_rest && - checkPunctuator(state.tokens.next, ",")) { - warning("W130", state.tokens.next); - element_after_rest = true; - } - if (!isRest && checkPunctuator(state.tokens.next, "=")) { - if (checkPunctuator(state.tokens.prev, "...")) { - advance("]"); - } else { - advance("="); - } - id = state.tokens.prev; - value = expression(context, 10); - if (value && value.identifier && value.value === "undefined") { - warning("W080", id, id.value); - } - } - if (!checkPunctuator(state.tokens.next, "]")) { - advance(","); - } - } - advance("]"); - } else if (checkPunctuator(firstToken, "{")) { - - if (!openingParsed) { - advance("{"); - } - if (checkPunctuator(state.tokens.next, "}")) { - warning("W137", state.tokens.curr); - } - while (!checkPunctuator(state.tokens.next, "}")) { - assignmentProperty(context); - if (checkPunctuator(state.tokens.next, "=")) { - advance("="); - id = state.tokens.prev; - value = expression(context, 10); - if (value && value.identifier && value.value === "undefined") { - warning("W080", id, id.value); - } - } - if (!checkPunctuator(state.tokens.next, "}")) { - advance(","); - if (checkPunctuator(state.tokens.next, "}")) { - break; - } - } - } - advance("}"); - } - return identifiers; - } - - function destructuringPatternMatch(tokens, value) { - var first = value.first; - - if (!first) - return; - - _.zip(tokens, Array.isArray(first) ? first : [ first ]).forEach(function(val) { - var token = val[0]; - var value = val[1]; - - if (token && value) - token.first = value; - else if (token && token.first && !value) - warning("W080", token.first, token.first.value); - }); - } - - function blockVariableStatement(type, statement, context) { - - var noin = context & prodParams.noin; - var inexport = context & prodParams.export; - var isLet = type === "let"; - var isConst = type === "const"; - var tokens, lone, value, letblock; - - if (!state.inES6()) { - warning("W104", state.tokens.curr, type, "6"); - } - - if (isLet && isMozillaLet()) { - advance("("); - state.funct["(scope)"].stack(); - letblock = true; - statement.declaration = false; - } - - statement.first = []; - for (;;) { - var names = []; - if (_.includes(["{", "["], state.tokens.next.value)) { - tokens = destructuringPattern(context); - lone = false; - } else { - tokens = [ { id: identifier(context), token: state.tokens.curr } ]; - lone = true; - } - if (!noin && isConst && state.tokens.next.id !== "=") { - warning("E012", state.tokens.curr, state.tokens.curr.value); - } - - for (var t in tokens) { - if (tokens.hasOwnProperty(t)) { - t = tokens[t]; - if (t.id === "let") { - warning("W024", t.token, t.id); - } - - if (state.funct["(scope)"].block.isGlobal()) { - if (predefined[t.id] === false) { - warning("W079", t.token, t.id); - } - } - if (t.id) { - state.funct["(scope)"].addbinding(t.id, { - type: type, - token: t.token }); - names.push(t.token); - } - } - } - - if (state.tokens.next.id === "=") { - statement.hasInitializer = true; - - advance("="); - if (!noin && peek(0).id === "=" && state.tokens.next.identifier) { - warning("W120", state.tokens.next, state.tokens.next.value); - } - var id = state.tokens.prev; - value = expression(context, 10); - if (value) { - if (value.identifier && value.value === "undefined") { - warning("W080", id, id.value); - } - if (!lone) { - destructuringPatternMatch(names, value); - } - } - } - if (state.tokens.next.value !== "in" && state.tokens.next.value !== "of") { - for (t in tokens) { - if (tokens.hasOwnProperty(t)) { - t = tokens[t]; - state.funct["(scope)"].initialize(t.id); - - if (lone && inexport) { - state.funct["(scope)"].setExported(t.token.value, t.token); - } - } - } - } - - statement.first = statement.first.concat(names); - - if (state.tokens.next.id !== ",") { - break; - } - - statement.hasComma = true; - advance(","); - checkComma(); - } - if (letblock) { - advance(")"); - block(context, true, true); - statement.block = true; - state.funct["(scope)"].unstack(); - } - - return statement; - } - - var conststatement = stmt("const", function(context) { - return blockVariableStatement("const", this, context); - }); - conststatement.exps = true; - conststatement.declaration = true; - function isMozillaLet() { - return state.tokens.next.id === "(" && state.inMoz(); - } - var letstatement = stmt("let", function(context) { - return blockVariableStatement("let", this, context); - }); - letstatement.nud = function(context, rbp) { - if (isMozillaLet()) { - state.funct["(scope)"].stack(); - advance("("); - state.tokens.prev.fud(context); - advance(")"); - expression(context, rbp); - state.funct["(scope)"].unstack(); - } else { - this.exps = false; - return state.syntax["(identifier)"].nud.apply(this, arguments); - } - }; - letstatement.meta = { es5: true, isFutureReservedWord: false, strictOnly: true }; - letstatement.exps = true; - letstatement.declaration = true; - letstatement.useFud = function(context) { - var next = state.tokens.next; - var nextIsBindingName; - - if (this.line !== next.line && !state.inES6()) { - return false; - } - nextIsBindingName = next.identifier && (!isReserved(context, next) || - next.id === "let"); - - return nextIsBindingName || checkPunctuators(next, ["{", "["]) || - isMozillaLet(); - }; - - var varstatement = stmt("var", function(context) { - var noin = context & prodParams.noin; - var inexport = context & prodParams.export; - var tokens, lone, value, id; - - this.first = []; - for (;;) { - var names = []; - if (_.includes(["{", "["], state.tokens.next.value)) { - tokens = destructuringPattern(context); - lone = false; - } else { - tokens = []; - id = identifier(context); - - if (id) { - tokens.push({ id: id, token: state.tokens.curr }); - } - - lone = true; - } - - if (state.option.varstmt) { - warning("W132", this); - } - - - for (var t in tokens) { - if (tokens.hasOwnProperty(t)) { - t = tokens[t]; - if (state.funct["(global)"] && !state.impliedClosure()) { - if (predefined[t.id] === false) { - warning("W079", t.token, t.id); - } else if (state.option.futurehostile === false) { - if ((!state.inES5() && vars.ecmaIdentifiers[5][t.id] === false) || - (!state.inES6() && vars.ecmaIdentifiers[6][t.id] === false)) { - warning("W129", t.token, t.id); - } - } - } - if (t.id) { - state.funct["(scope)"].addbinding(t.id, { - type: "var", - token: t.token }); - - if (lone && inexport) { - state.funct["(scope)"].setExported(t.id, t.token); - } - names.push(t.token); - } - } - } - - if (state.tokens.next.id === "=") { - this.hasInitializer = true; - - state.nameStack.set(state.tokens.curr); - - advance("="); - if (peek(0).id === "=" && state.tokens.next.identifier) { - if (!noin && - !state.funct["(params)"] || - state.funct["(params)"].indexOf(state.tokens.next.value) === -1) { - warning("W120", state.tokens.next, state.tokens.next.value); - } - } - id = state.tokens.prev; - value = expression(context, 10); - if (value) { - if (!state.funct["(loopage)"] && value.identifier && - value.value === "undefined") { - warning("W080", id, id.value); - } - if (!lone) { - destructuringPatternMatch(names, value); - } - } - } - - this.first = this.first.concat(names); - - if (state.tokens.next.id !== ",") { - break; - } - this.hasComma = true; - advance(","); - checkComma(); - } - - return this; - }); - varstatement.exps = true; - - blockstmt("function", function(context) { - var inexport = context & prodParams.export; - var generator = false; - var isAsync = context & prodParams.preAsync; - var labelType = ""; - - if (isAsync) { - labelType = "async "; - } - - if (state.tokens.next.value === "*") { - if (isAsync && !state.inES9()) { - warning("W119", state.tokens.prev, "async generators", "9"); - } else if (!isAsync && !state.inES6(true)) { - warning("W119", state.tokens.next, "function*", "6"); - } - - advance("*"); - labelType += "generator "; - generator = true; - } - - labelType += "function"; - - if (inblock) { - warning("W082", state.tokens.curr); - } - var nameToken = optionalidentifier(context) ? state.tokens.curr : null; - - if (!nameToken) { - if (!inexport) { - warning("W025"); - } - } else { - state.funct["(scope)"].addbinding(nameToken.value, { - type: labelType, - token: state.tokens.curr, - initialized: true }); - - if (inexport) { - state.funct["(scope)"].setExported(nameToken.value, state.tokens.prev); - } - } - - var f = doFunction(context, { - name: nameToken && nameToken.value, - statement: this, - type: generator ? "generator" : null, - ignoreLoopFunc: inblock // a declaration may already have warned - }); - var enablesStrictMode = f["(isStrict)"] && !state.isStrict(); - if (nameToken && (f["(name)"] === "arguments" || f["(name)"] === "eval") && - enablesStrictMode) { - error("E008", nameToken); - } - - if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) { - error("E039"); - } - return this; - }).declaration = true; - - prefix("function", function(context) { - var generator = false; - var isAsync = context & prodParams.preAsync; - - if (state.tokens.next.value === "*") { - if (isAsync && !state.inES9()) { - warning("W119", state.tokens.prev, "async generators", "9"); - } else if (!isAsync && !state.inES6(true)) { - warning("W119", state.tokens.curr, "function*", "6"); - } - - advance("*"); - generator = true; - } - var nameToken = optionalidentifier(isAsync ? context | prodParams.async : context) ? - state.tokens.curr : null; - - var f = doFunction(context, { - name: nameToken && nameToken.value, - type: generator ? "generator" : null - }); - - if (generator && nameToken && nameToken.value === "yield") { - error("E024", nameToken, "yield"); - } - - if (nameToken && (f["(name)"] === "arguments" || f["(name)"] === "eval") && - f["(isStrict)"]) { - error("E008", nameToken); - } - - return this; - }); - - blockstmt("if", function(context) { - var t = state.tokens.next; - increaseComplexityCount(); - advance("("); - var expr = expression(context, 0); - - if (!expr) { - quit("E041", this); - } - - checkCondAssignment(expr); - var forinifcheck = null; - if (state.option.forin && state.forinifcheckneeded) { - state.forinifcheckneeded = false; // We only need to analyze the first if inside the loop - forinifcheck = state.forinifchecks[state.forinifchecks.length - 1]; - if (expr.type === "(punctuator)" && expr.value === "!") { - forinifcheck.type = "(negative)"; - } else { - forinifcheck.type = "(positive)"; - } - } - - advance(")", t); - var s = block(context, true, true); - if (forinifcheck && forinifcheck.type === "(negative)") { - if (s && s[0] && s[0].type === "(identifier)" && s[0].value === "continue") { - forinifcheck.type = "(negative-with-continue)"; - } - } - - if (state.tokens.next.id === "else") { - advance("else"); - if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") { - statement(context); - } else { - block(context, true, true); - } - } - return this; - }); - - blockstmt("try", function(context) { - var b; - var hasParameter = false; - - function catchParameter() { - advance("("); - - if (checkPunctuators(state.tokens.next, ["[", "{"])) { - var tokens = destructuringPattern(context); - _.each(tokens, function(token) { - if (token.id) { - state.funct["(scope)"].addParam(token.id, token, "exception"); - } - }); - } else if (state.tokens.next.type !== "(identifier)") { - warning("E030", state.tokens.next, state.tokens.next.value); - } else { - state.funct["(scope)"].addParam(identifier(context), state.tokens.curr, "exception"); - } - - if (state.tokens.next.value === "if") { - if (!state.inMoz()) { - warning("W118", state.tokens.curr, "catch filter"); - } - advance("if"); - expression(context, 0); - } - - advance(")"); - } - - block(context | prodParams.tryClause, true); - - while (state.tokens.next.id === "catch") { - increaseComplexityCount(); - if (b && (!state.inMoz())) { - warning("W118", state.tokens.next, "multiple catch blocks"); - } - advance("catch"); - if (state.tokens.next.id !== "{") { - state.funct["(scope)"].stack("catchparams"); - hasParameter = true; - catchParameter(); - } else if (!state.inES10()) { - warning("W119", state.tokens.curr, "optional catch binding", "10"); - } - block(context, false); - - if (hasParameter) { - state.funct["(scope)"].unstack(); - hasParameter = false; - } - b = true; - } - - if (state.tokens.next.id === "finally") { - advance("finally"); - block(context, true); - return; - } - - if (!b) { - error("E021", state.tokens.next, "catch", state.tokens.next.value); - } - - return this; - }); - - blockstmt("while", function(context) { - var t = state.tokens.next; - state.funct["(breakage)"] += 1; - state.funct["(loopage)"] += 1; - increaseComplexityCount(); - advance("("); - checkCondAssignment(expression(context, 0)); - advance(")", t); - block(context, true, true); - state.funct["(breakage)"] -= 1; - state.funct["(loopage)"] -= 1; - return this; - }).labelled = true; - - blockstmt("with", function(context) { - var t = state.tokens.next; - if (state.isStrict()) { - error("E010", state.tokens.curr); - } else if (!state.option.withstmt) { - warning("W085", state.tokens.curr); - } - - advance("("); - expression(context, 0); - advance(")", t); - block(context, true, true); - - return this; - }); - - blockstmt("switch", function(context) { - var t = state.tokens.next; - var g = false; - var noindent = false; - var seenCase = false; - - state.funct["(breakage)"] += 1; - advance("("); - checkCondAssignment(expression(context, 0)); - advance(")", t); - t = state.tokens.next; - advance("{"); - state.funct["(scope)"].stack(); - - if (state.tokens.next.from === indent) - noindent = true; - - if (!noindent) - indent += state.option.indent; - - for (;;) { - switch (state.tokens.next.id) { - case "case": - switch (state.funct["(verb)"]) { - case "yield": - case "break": - case "case": - case "continue": - case "return": - case "switch": - case "throw": - break; - case "default": - if (state.option.leanswitch) { - warning("W145", state.tokens.next); - } - - break; - default: - if (!state.tokens.curr.caseFallsThrough) { - warning("W086", state.tokens.curr, "case"); - } - } - - advance("case"); - expression(context, 0); - seenCase = true; - increaseComplexityCount(); - g = true; - advance(":"); - state.funct["(verb)"] = "case"; - break; - case "default": - switch (state.funct["(verb)"]) { - case "yield": - case "break": - case "continue": - case "return": - case "throw": - break; - case "case": - if (state.option.leanswitch) { - warning("W145", state.tokens.curr); - } - - break; - default: - if (seenCase && !state.tokens.curr.caseFallsThrough) { - warning("W086", state.tokens.curr, "default"); - } - } - - advance("default"); - g = true; - advance(":"); - state.funct["(verb)"] = "default"; - break; - case "}": - if (!noindent) - indent -= state.option.indent; - - advance("}", t); - state.funct["(scope)"].unstack(); - state.funct["(breakage)"] -= 1; - state.funct["(verb)"] = undefined; - return; - case "(end)": - error("E023", state.tokens.next, "}"); - return; - default: - indent += state.option.indent; - if (g) { - switch (state.tokens.curr.id) { - case ",": - error("E040"); - return; - case ":": - g = false; - statements(context); - break; - default: - error("E025", state.tokens.curr); - return; - } - } else { - if (state.tokens.curr.id === ":") { - advance(":"); - error("E024", state.tokens.curr, ":"); - statements(context); - } else { - error("E021", state.tokens.next, "case", state.tokens.next.value); - return; - } - } - indent -= state.option.indent; - } - } - }).labelled = true; - - stmt("debugger", function() { - if (!state.option.debug) { - warning("W087", this); - } - return this; - }).exps = true; - - (function() { - var x = stmt("do", function(context) { - state.funct["(breakage)"] += 1; - state.funct["(loopage)"] += 1; - increaseComplexityCount(); - - this.first = block(context, true, true); - advance("while"); - var t = state.tokens.next; - advance("("); - checkCondAssignment(expression(context, 0)); - advance(")", t); - state.funct["(breakage)"] -= 1; - state.funct["(loopage)"] -= 1; - return this; - }); - x.labelled = true; - x.exps = true; - }()); - - blockstmt("for", function(context) { - var s, t = state.tokens.next; - var letscope = false; - var isAsync = false; - var foreachtok = null; - - if (t.value === "each") { - foreachtok = t; - advance("each"); - if (!state.inMoz()) { - warning("W118", state.tokens.curr, "for each"); - } - } - - if (state.tokens.next.identifier && state.tokens.next.value === "await") { - advance("await"); - isAsync = true; - - if (!(context & prodParams.async)) { - error("E024", state.tokens.curr, "await"); - } else if (!state.inES9()) { - warning("W119", state.tokens.curr, "asynchronous iteration", "9"); - } - } - - increaseComplexityCount(); - advance("("); - var nextop; // contains the token of the "in" or "of" operator - var comma; // First comma punctuator at level 0 - var initializer; // First initializer at level 0 - var bindingPower; - var targets; - var target; - var decl; - var afterNext = peek(); - - var headContext = context | prodParams.noin; - - if (state.tokens.next.id === "var") { - advance("var"); - decl = state.tokens.curr.fud(headContext); - comma = decl.hasComma ? decl : null; - initializer = decl.hasInitializer ? decl : null; - } else if (state.tokens.next.id === "const" || - (state.tokens.next.id === "let" && - ((afterNext.identifier && afterNext.id !== "in") || - checkPunctuators(afterNext, ["{", "["])))) { - advance(state.tokens.next.id); - letscope = true; - state.funct["(scope)"].stack(); - decl = state.tokens.curr.fud(headContext); - comma = decl.hasComma ? decl : null; - initializer = decl.hasInitializer ? decl : null; - } else if (!checkPunctuator(state.tokens.next, ";")) { - targets = []; - - while (state.tokens.next.value !== "in" && - state.tokens.next.value !== "of" && - !checkPunctuator(state.tokens.next, ";")) { - - if (checkPunctuators(state.tokens.next, ["{", "["])) { - destructuringPattern(headContext, { assignment: true }) - .forEach(function(elem) { - this.push(elem.token); - }, targets); - if (checkPunctuator(state.tokens.next, "=")) { - advance("="); - initializer = state.tokens.curr; - expression(headContext, 10); - } - } else { - target = expression(headContext, 10); - - if (target) { - if (target.type === "(identifier)") { - targets.push(target); - } else if (checkPunctuator(target, "=")) { - initializer = target; - targets.push(target); - } - } - } - - if (checkPunctuator(state.tokens.next, ",")) { - advance(","); - - if (!comma) { - comma = state.tokens.curr; - } - } - } - if (!initializer && !comma) { - targets.forEach(function(token) { - if (!state.funct["(scope)"].has(token.value)) { - warning("W088", token, token.value); - } - }); - } - } - - nextop = state.tokens.next; - - if (isAsync && nextop.value !== "of") { - error("E066", nextop); - } - if (_.includes(["in", "of"], nextop.value)) { - if (nextop.value === "of") { - bindingPower = 20; - - if (!state.inES6()) { - warning("W104", nextop, "for of", "6"); - } - } else { - bindingPower = 0; - } - if (comma) { - error("W133", comma, nextop.value, "more than one ForBinding"); - } - if (initializer) { - error("W133", initializer, nextop.value, "initializer is forbidden"); - } - if (target && !comma && !initializer) { - checkLeftSideAssign(context, target, nextop); - } - - advance(nextop.value); - expression(context, bindingPower); - advance(")", t); - - if (nextop.value === "in" && state.option.forin) { - state.forinifcheckneeded = true; - - if (state.forinifchecks === undefined) { - state.forinifchecks = []; - } - state.forinifchecks.push({ - type: "(none)" - }); - } - - state.funct["(breakage)"] += 1; - state.funct["(loopage)"] += 1; - - s = block(context, true, true); - - if (nextop.value === "in" && state.option.forin) { - if (state.forinifchecks && state.forinifchecks.length > 0) { - var check = state.forinifchecks.pop(); - - if (// No if statement or not the first statement in loop body - s && s.length > 0 && (typeof s[0] !== "object" || s[0].value !== "if") || - check.type === "(positive)" && s.length > 1 || - check.type === "(negative)") { - warning("W089", this); - } - } - state.forinifcheckneeded = false; - } - - state.funct["(breakage)"] -= 1; - state.funct["(loopage)"] -= 1; - - } else { - if (foreachtok) { - error("E045", foreachtok); - } - nolinebreak(state.tokens.curr); - advance(";"); - if (decl) { - if (decl.value === "const" && !decl.hasInitializer) { - warning("E012", decl, decl.first[0].value); - } - - decl.first.forEach(function(token) { - state.funct["(scope)"].initialize(token.value); - }); - } - state.funct["(loopage)"] += 1; - if (state.tokens.next.id !== ";") { - checkCondAssignment(expression(context, 0)); - } - nolinebreak(state.tokens.curr); - advance(";"); - if (state.tokens.next.id === ";") { - error("E021", state.tokens.next, ")", ";"); - } - if (state.tokens.next.id !== ")") { - for (;;) { - expression(context, 0); - if (state.tokens.next.id !== ",") { - break; - } - advance(","); - checkComma(); - } - } - advance(")", t); - state.funct["(breakage)"] += 1; - block(context, true, true); - state.funct["(breakage)"] -= 1; - state.funct["(loopage)"] -= 1; - } - if (letscope) { - state.funct["(scope)"].unstack(); - } - return this; - }).labelled = true; - - - stmt("break", function() { - var v = state.tokens.next.value; - - if (!state.option.asi) - nolinebreak(this); - - if (state.tokens.next.identifier && - sameLine(state.tokens.curr, state.tokens.next)) { - if (!state.funct["(scope)"].funct.hasLabel(v)) { - warning("W090", state.tokens.next, v); - } - this.first = state.tokens.next; - advance(); - } else { - if (state.funct["(breakage)"] === 0) - warning("W052", state.tokens.next, this.value); - } - - reachable(this); - - return this; - }).exps = true; - - - stmt("continue", function() { - var v = state.tokens.next.value; - - if (state.funct["(breakage)"] === 0 || !state.funct["(loopage)"]) { - warning("W052", state.tokens.next, this.value); - } - - if (!state.option.asi) - nolinebreak(this); - - if (state.tokens.next.identifier) { - if (sameLine(state.tokens.curr, state.tokens.next)) { - if (!state.funct["(scope)"].funct.hasLabel(v)) { - warning("W090", state.tokens.next, v); - } - this.first = state.tokens.next; - advance(); - } - } - - reachable(this); - - return this; - }).exps = true; - - - stmt("return", function(context) { - if (sameLine(this, state.tokens.next)) { - if (state.tokens.next.id !== ";" && !state.tokens.next.reach) { - this.first = expression(context, 0); - - if (this.first && - this.first.type === "(punctuator)" && this.first.value === "=" && - !this.first.paren && !state.option.boss) { - warning("W093", this.first); - } - - if (state.option.noreturnawait && context & prodParams.async && - !(context & prodParams.tryClause) && - this.first.identifier && this.first.value === "await") { - warning("W146", this.first); - } - } - } else { - if (state.tokens.next.type === "(punctuator)" && - ["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) { - nolinebreak(this); // always warn (Line breaking error) - } - } - - reachable(this); - - return this; - }).exps = true; - - prefix("await", function(context) { - if (context & prodParams.async) { - if (!state.funct["(params)"]) { - error("E024", this, "await"); - } - - expression(context, 10); - return this; - } else { - this.exps = false; - return state.syntax["(identifier)"].nud.apply(this, arguments); - } - }).exps = true; - - (function(asyncSymbol) { - asyncSymbol.meta = { es5: true, isFutureReservedWord: true, strictOnly: true }; - asyncSymbol.isFunc = function() { - var next = state.tokens.next; - var afterParens; - - if (this.line !== next.line) { - return false; - } - - if (next.id === "function") { - return true; - } - - if (next.id === "(") { - afterParens = peekThroughParens(0); - - return afterParens.id === "=>"; - } - - if (next.identifier) { - return peek().id === "=>"; - } - - return false; - }; - asyncSymbol.useFud = asyncSymbol.isFunc; - asyncSymbol.fud = function(context) { - if (!state.inES8()) { - warning("W119", this, "async functions", "8"); - } - context |= prodParams.preAsync; - context |= prodParams.initial; - this.func = expression(context, 0); - this.block = this.func.block; - this.exps = this.func.exps; - return this; - }; - asyncSymbol.exps = true; - delete asyncSymbol.reserved; - }(prefix("async", function(context, rbp) { - if (this.isFunc(context)) { - if (!state.inES8()) { - warning("W119", this, "async functions", "8"); - } - - context |= prodParams.preAsync; - this.func = expression(context, rbp); - this.identifier = false; - return this; - } - - this.exps = false; - return state.syntax["(identifier)"].nud.apply(this, arguments); - }))); - - (function(yieldSymbol) { - yieldSymbol.rbp = yieldSymbol.lbp = 25; - yieldSymbol.exps = true; - })(prefix("yield", function(context) { - if (state.inMoz()) { - return mozYield.call(this, context); - } - - if (!(context & prodParams.yield)) { - this.exps = false; - return state.syntax["(identifier)"].nud.apply(this, arguments); - } - - var prev = state.tokens.prev; - if (!state.funct["(params)"]) { - error("E024", this, "yield"); - } - - if (!this.beginsStmt && prev.lbp > 30 && !checkPunctuators(prev, ["("])) { - error("E061", this); - } - - if (!state.inES6()) { - warning("W104", state.tokens.curr, "yield", "6"); - } - state.funct["(yielded)"] = true; - - if (state.tokens.next.value === "*") { - advance("*"); - } - if (state.tokens.curr.value === "*" || sameLine(state.tokens.curr, state.tokens.next)) { - if (state.tokens.next.nud) { - - nobreaknonadjacent(state.tokens.curr, state.tokens.next); - this.first = expression(context, 10); - - if (this.first.type === "(punctuator)" && this.first.value === "=" && - !this.first.paren && !state.option.boss) { - warning("W093", this.first); - } - } else if (state.tokens.next.led) { - if (state.tokens.next.id !== ",") { - error("W017", state.tokens.next); - } - } - } - - return this; - })); - var mozYield = function(context) { - var prev = state.tokens.prev; - if (state.inES6(true) && !(context & prodParams.yield)) { - error("E046", state.tokens.curr, "yield"); - } - state.funct["(yielded)"] = true; - var delegatingYield = false; - - if (state.tokens.next.value === "*") { - delegatingYield = true; - advance("*"); - } - - if (sameLine(this, state.tokens.next)) { - if (delegatingYield || - (state.tokens.next.id !== ";" && !state.option.asi && - !state.tokens.next.reach && state.tokens.next.nud)) { - - nobreaknonadjacent(state.tokens.curr, state.tokens.next); - this.first = expression(context, 10); - - if (this.first.type === "(punctuator)" && this.first.value === "=" && - !this.first.paren && !state.option.boss) { - warning("W093", this.first); - } - } - if (state.tokens.next.id !== ")" && - (prev.lbp > 30 || (!prev.assign && !isEndOfExpr()))) { - error("E050", this); - } - } else if (!state.option.asi) { - nolinebreak(this); // always warn (Line breaking error) - } - return this; - }; - - stmt("throw", function(context) { - nolinebreak(this); - this.first = expression(context, 20); - - reachable(this); - - return this; - }).exps = true; - - stmt("import", function(context) { - if (!state.funct["(scope)"].block.isGlobal()) { - error("E053", state.tokens.curr, "Import"); - } - - if (!state.inES6()) { - warning("W119", state.tokens.curr, "import", "6"); - } - - if (state.tokens.next.type === "(string)") { - advance("(string)"); - return this; - } - - if (state.tokens.next.identifier) { - this.name = identifier(context); - state.funct["(scope)"].addbinding(this.name, { - type: "import", - initialized: true, - token: state.tokens.curr }); - - if (state.tokens.next.value === ",") { - advance(","); - } else { - advance("from"); - advance("(string)"); - return this; - } - } - - if (state.tokens.next.id === "*") { - advance("*"); - advance("as"); - if (state.tokens.next.identifier) { - this.name = identifier(context); - state.funct["(scope)"].addbinding(this.name, { - type: "import", - initialized: true, - token: state.tokens.curr }); - } - } else { - advance("{"); - for (;;) { - if (state.tokens.next.value === "}") { - advance("}"); - break; - } - var importName; - if (state.tokens.next.type === "default") { - importName = "default"; - advance("default"); - } else { - importName = identifier(context); - } - if (state.tokens.next.value === "as") { - advance("as"); - importName = identifier(context); - } - state.funct["(scope)"].addbinding(importName, { - type: "import", - initialized: true, - token: state.tokens.curr }); - - if (state.tokens.next.value === ",") { - advance(","); - } else if (state.tokens.next.value === "}") { - advance("}"); - break; - } else { - error("E024", state.tokens.next, state.tokens.next.value); - break; - } - } - } - advance("from"); - advance("(string)"); - - return this; - }).exps = true; - - stmt("export", function(context) { - var ok = true; - var token; - var identifier; - var moduleSpecifier; - context = context | prodParams.export; - - if (!state.inES6()) { - warning("W119", state.tokens.curr, "export", "6"); - ok = false; - } - - if (!state.funct["(scope)"].block.isGlobal()) { - error("E053", state.tokens.curr, "Export"); - ok = false; - } - - if (state.tokens.next.value === "*") { - advance("*"); - advance("from"); - advance("(string)"); - return this; - } - - if (state.tokens.next.type === "default") { - state.nameStack.set(state.tokens.next); - - advance("default"); - var exportType = state.tokens.next.id; - if (exportType === "function") { - this.block = true; - advance("function"); - state.syntax["function"].fud(context); - } else if (exportType === "async" && peek().id === "function") { - this.block = true; - advance("async"); - advance("function"); - state.syntax["function"].fud(context | prodParams.preAsync); - } else if (exportType === "class") { - this.block = true; - advance("class"); - state.syntax["class"].fud(context); - } else { - token = expression(context, 10); - if (token.identifier) { - identifier = token.value; - state.funct["(scope)"].setExported(identifier, token); - } - } - return this; - } - if (state.tokens.next.value === "{") { - advance("{"); - var exportedTokens = []; - while (!checkPunctuator(state.tokens.next, "}")) { - if (!state.tokens.next.identifier) { - error("E030", state.tokens.next, state.tokens.next.value); - } - advance(); - - exportedTokens.push(state.tokens.curr); - - if (state.tokens.next.value === "as") { - advance("as"); - if (!state.tokens.next.identifier) { - error("E030", state.tokens.next, state.tokens.next.value); - } - advance(); - } - - if (!checkPunctuator(state.tokens.next, "}")) { - advance(","); - } - } - advance("}"); - if (state.tokens.next.value === "from") { - advance("from"); - moduleSpecifier = state.tokens.next; - advance("(string)"); - } else if (ok) { - exportedTokens.forEach(function(token) { - state.funct["(scope)"].setExported(token.value, token); - }); - } - - if (exportedTokens.length === 0) { - if (moduleSpecifier) { - warning("W142", this, "export", moduleSpecifier.value); - } else { - warning("W141", this, "export"); - } - } - - return this; - } else if (state.tokens.next.id === "var") { - advance("var"); - state.tokens.curr.fud(context); - } else if (state.tokens.next.id === "let") { - advance("let"); - state.tokens.curr.fud(context); - } else if (state.tokens.next.id === "const") { - advance("const"); - state.tokens.curr.fud(context); - } else if (state.tokens.next.id === "function") { - this.block = true; - advance("function"); - state.syntax["function"].fud(context); - } else if (state.tokens.next.id === "async" && peek().id === "function") { - this.block = true; - advance("async"); - advance("function"); - state.syntax["function"].fud(context | prodParams.preAsync); - } else if (state.tokens.next.id === "class") { - this.block = true; - advance("class"); - state.syntax["class"].fud(context); - } else { - error("E024", state.tokens.next, state.tokens.next.value); - } - - return this; - }).exps = true; - function supportsSuper(type, funct) { - if (type === "call" && funct["(async)"]) { - return false; - } - - if (type === "property" && funct["(method)"]) { - return true; - } - - if (type === "call" && funct["(statement)"] && - funct["(statement)"].id === "class") { - return true; - } - - if (funct["(arrow)"]) { - return supportsSuper(type, funct["(context)"]); - } - - return false; - } - - var superNud = function() { - var next = state.tokens.next; - - if (checkPunctuators(next, ["[", "."])) { - if (!supportsSuper("property", state.funct)) { - error("E063", this); - } - } else if (checkPunctuator(next, "(")) { - if (!supportsSuper("call", state.funct)) { - error("E064", this); - } - } else { - error("E024", next, next.value || next.id); - } - - return this; - }; - - FutureReservedWord("abstract"); - FutureReservedWord("boolean"); - FutureReservedWord("byte"); - FutureReservedWord("char"); - FutureReservedWord("double"); - FutureReservedWord("enum", { es5: true }); - FutureReservedWord("export", { es5: true }); - FutureReservedWord("extends", { es5: true }); - FutureReservedWord("final"); - FutureReservedWord("float"); - FutureReservedWord("goto"); - FutureReservedWord("implements", { es5: true, strictOnly: true }); - FutureReservedWord("import", { es5: true }); - FutureReservedWord("int"); - FutureReservedWord("interface", { es5: true, strictOnly: true }); - FutureReservedWord("long"); - FutureReservedWord("native"); - FutureReservedWord("package", { es5: true, strictOnly: true }); - FutureReservedWord("private", { es5: true, strictOnly: true }); - FutureReservedWord("protected", { es5: true, strictOnly: true }); - FutureReservedWord("public", { es5: true, strictOnly: true }); - FutureReservedWord("short"); - FutureReservedWord("static", { es5: true, strictOnly: true }); - FutureReservedWord("synchronized"); - FutureReservedWord("transient"); - FutureReservedWord("volatile"); - - var lookupBlockType = function() { - var pn, pn1, prev; - var i = -1; - var bracketStack = 0; - var ret = {}; - if (checkPunctuators(state.tokens.curr, ["[", "{"])) { - bracketStack += 1; - } - do { - prev = i === -1 ? state.tokens.curr : pn; - pn = i === -1 ? state.tokens.next : peek(i); - pn1 = peek(i + 1); - i = i + 1; - if (checkPunctuators(pn, ["[", "{"])) { - bracketStack += 1; - } else if (checkPunctuators(pn, ["]", "}"])) { - bracketStack -= 1; - } - if (bracketStack === 1 && pn.identifier && pn.value === "for" && - !checkPunctuator(prev, ".")) { - ret.isCompArray = true; - ret.notJson = true; - break; - } - if (bracketStack === 0 && checkPunctuators(pn, ["}", "]"])) { - if (pn1.value === "=") { - ret.isDestAssign = true; - ret.notJson = true; - break; - } else if (pn1.value === ".") { - ret.notJson = true; - break; - } - } - if (checkPunctuator(pn, ";")) { - ret.notJson = true; - } - } while (bracketStack > 0 && pn.id !== "(end)"); - return ret; - }; - function saveProperty(props, name, tkn, isClass, isStatic, isComputed) { - if (tkn.identifier) { - name = tkn.value; - } - var key = name; - if (isClass && isStatic) { - key = "static " + name; - } - - if (props[key] && name !== "__proto__" && !isComputed) { - var msg = ["key", "class method", "static class method"]; - msg = msg[(isClass || false) + (isStatic || false)]; - warning("W075", state.tokens.next, msg, name); - } else { - props[key] = Object.create(null); - } - - props[key].basic = true; - props[key].basictkn = tkn; - } - function saveAccessor(accessorType, props, name, tkn, isClass, isStatic) { - var flagName = accessorType === "get" ? "getterToken" : "setterToken"; - var key = name; - state.tokens.curr.accessorType = accessorType; - state.nameStack.set(tkn); - if (isClass && isStatic) { - key = "static " + name; - } - - if (props[key]) { - if ((props[key].basic || props[key][flagName]) && name !== "__proto__") { - var msg = ""; - if (isClass) { - if (isStatic) { - msg += "static "; - } - msg += accessorType + "ter method"; - } else { - msg = "key"; - } - warning("W075", state.tokens.next, msg, name); - } - } else { - props[key] = Object.create(null); - } - - props[key][flagName] = tkn; - if (isStatic) { - props[key].static = true; - } - } - function computedPropertyName(context) { - advance("["); - state.tokens.curr.delim = true; - state.tokens.curr.lbp = 0; - - if (!state.inES6()) { - warning("W119", state.tokens.curr, "computed property names", "6"); - } - var value = expression(context & ~prodParams.noin, 10); - advance("]"); - return value; - } - function checkPunctuators(token, values) { - if (token.type === "(punctuator)") { - return _.includes(values, token.value); - } - return false; - } - function checkPunctuator(token, value) { - return token.type === "(punctuator)" && token.value === value; - } - function destructuringAssignOrJsonValue(context) { - - var block = lookupBlockType(); - if (block.notJson) { - if (!state.inES6() && block.isDestAssign) { - warning("W104", state.tokens.curr, "destructuring assignment", "6"); - } - statements(context); - } else { - state.option.laxbreak = true; - state.jsonMode = true; - jsonValue(); - } - } - var arrayComprehension = function() { - var CompArray = function() { - this.mode = "use"; - this.variables = []; - }; - var _carrays = []; - var _current; - function declare(v) { - var l = _current.variables.filter(function(elt) { - if (elt.value === v) { - elt.undef = false; - return v; - } - }).length; - return l !== 0; - } - function use(v) { - var l = _current.variables.filter(function(elt) { - if (elt.value === v && !elt.undef) { - if (elt.unused === true) { - elt.unused = false; - } - return v; - } - }).length; - return (l === 0); - } - return { stack: function() { - _current = new CompArray(); - _carrays.push(_current); - }, - unstack: function() { - _current.variables.filter(function(v) { - if (v.unused) - warning("W098", v.token, v.token.raw_text || v.value); - if (v.undef) - state.funct["(scope)"].block.use(v.value, v.token); - }); - _carrays.splice(-1, 1); - _current = _carrays[_carrays.length - 1]; - }, - setState: function(s) { - if (_.includes(["use", "define", "generate", "filter"], s)) - _current.mode = s; - }, - check: function(v) { - if (!_current) { - return; - } - if (_current && _current.mode === "use") { - if (use(v)) { - _current.variables.push({ - token: state.tokens.curr, - value: v, - undef: true, - unused: false - }); - } - return true; - } else if (_current && _current.mode === "define") { - if (!declare(v)) { - _current.variables.push({ - token: state.tokens.curr, - value: v, - undef: false, - unused: true - }); - } - return true; - } else if (_current && _current.mode === "generate") { - state.funct["(scope)"].block.use(v, state.tokens.curr); - return true; - } else if (_current && _current.mode === "filter") { - if (use(v)) { - state.funct["(scope)"].block.use(v, state.tokens.curr); - } - return true; - } - return false; - } - }; - }; - function jsonValue() { - function jsonObject() { - var o = {}, t = state.tokens.next; - advance("{"); - if (state.tokens.next.id !== "}") { - for (;;) { - if (state.tokens.next.id === "(end)") { - error("E026", state.tokens.next, t.line); - } else if (state.tokens.next.id === "}") { - warning("W094", state.tokens.curr); - break; - } else if (state.tokens.next.id === ",") { - error("E028", state.tokens.next); - } else if (state.tokens.next.id !== "(string)") { - warning("W095", state.tokens.next, state.tokens.next.value); - } - if (o[state.tokens.next.value] === true) { - warning("W075", state.tokens.next, "key", state.tokens.next.value); - } else if ((state.tokens.next.value === "__proto__" && - !state.option.proto) || (state.tokens.next.value === "__iterator__" && - !state.option.iterator)) { - warning("W096", state.tokens.next, state.tokens.next.value); - } else { - o[state.tokens.next.value] = true; - } - advance(); - advance(":"); - jsonValue(); - if (state.tokens.next.id !== ",") { - break; - } - advance(","); - } - } - advance("}"); - } - - function jsonArray() { - var t = state.tokens.next; - advance("["); - if (state.tokens.next.id !== "]") { - for (;;) { - if (state.tokens.next.id === "(end)") { - error("E027", state.tokens.next, t.line); - } else if (state.tokens.next.id === "]") { - warning("W094", state.tokens.curr); - break; - } else if (state.tokens.next.id === ",") { - error("E028", state.tokens.next); - } - jsonValue(); - if (state.tokens.next.id !== ",") { - break; - } - advance(","); - } - } - advance("]"); - } - - switch (state.tokens.next.id) { - case "{": - jsonObject(); - break; - case "[": - jsonArray(); - break; - case "true": - case "false": - case "null": - case "(number)": - case "(string)": - advance(); - break; - case "-": - advance("-"); - advance("(number)"); - break; - default: - error("E003", state.tokens.next); - } - } - function lintEvalCode(internals, options, globals) { - var priorErrorCount, idx, jdx, internal; - - for (idx = 0; idx < internals.length; idx += 1) { - internal = internals[idx]; - options.scope = internal.elem; - priorErrorCount = JSHINT.errors.length; - - itself(internal.code, options, globals); - - for (jdx = priorErrorCount; jdx < JSHINT.errors.length; jdx += 1) { - JSHINT.errors[jdx].line += internal.token.line - 1; - } - } - } - - var escapeRegex = function(str) { - return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); - }; - var itself = function(s, o, g) { - var x, reIgnoreStr, reIgnore; - var optionKeys, newOptionObj, newIgnoredObj; - - o = _.clone(o); - state.reset(); - newOptionObj = state.option; - newIgnoredObj = state.ignored; - - if (o && o.scope) { - JSHINT.scope = o.scope; - } else { - JSHINT.errors = []; - JSHINT.internals = []; - JSHINT.blacklist = {}; - JSHINT.scope = "(main)"; - } - - predefined = Object.create(null); - combine(predefined, vars.ecmaIdentifiers[3]); - combine(predefined, vars.reservedVars); - - declared = Object.create(null); - var exported = Object.create(null); // Variables that live outside the current file - - function each(obj, cb) { - if (!obj) - return; - - if (!Array.isArray(obj) && typeof obj === "object") - obj = Object.keys(obj); - - obj.forEach(cb); - } - - if (o) { - - each([o.predef, o.globals], function(dict) { - each(dict, function(item) { - var slice, prop; - - if (item[0] === "-") { - slice = item.slice(1); - JSHINT.blacklist[slice] = slice; - delete predefined[slice]; - } else { - prop = Object.getOwnPropertyDescriptor(dict, item); - predefined[item] = prop ? prop.value : false; - } - }); - }); - - each(o.exported || null, function(item) { - exported[item] = true; - }); - - delete o.predef; - delete o.exported; - - optionKeys = Object.keys(o); - for (x = 0; x < optionKeys.length; x++) { - if (/^-W\d{3}$/g.test(optionKeys[x])) { - newIgnoredObj[optionKeys[x].slice(1)] = true; - } else { - var optionKey = optionKeys[x]; - newOptionObj[optionKey] = o[optionKey]; - } - } - } - - state.option = newOptionObj; - state.ignored = newIgnoredObj; - - state.option.indent = state.option.indent || 4; - state.option.maxerr = state.option.maxerr || 50; - - indent = 1; - - var scopeManagerInst = scopeManager(state, predefined, exported, declared); - scopeManagerInst.on("warning", function(ev) { - warning.apply(null, [ ev.code, ev.token].concat(ev.data)); - }); - - scopeManagerInst.on("error", function(ev) { - error.apply(null, [ ev.code, ev.token ].concat(ev.data)); - }); - - state.funct = functor("(global)", null, { - "(global)" : true, - "(scope)" : scopeManagerInst, - "(comparray)" : arrayComprehension(), - "(metrics)" : createMetrics(state.tokens.next) - }); - - functions = [state.funct]; - member = {}; - membersOnly = null; - inblock = false; - lookahead = []; - - if (!isString(s) && !Array.isArray(s)) { - errorAt("E004", 0); - return false; - } - - api = { - get isJSON() { - return state.jsonMode; - }, - - getOption: function(name) { - return state.option[name] || null; - }, - - getCache: function(name) { - return state.cache[name]; - }, - - setCache: function(name, value) { - state.cache[name] = value; - }, - - warn: function(code, data) { - warningAt.apply(null, [ code, data.line, data.char ].concat(data.data)); - }, - - on: function(names, listener) { - names.split(" ").forEach(function(name) { - emitter.on(name, listener); - }.bind(this)); - } - }; - - emitter.removeAllListeners(); - (extraModules || []).forEach(function(func) { - func(api); - }); - - state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"]; - if (o && o.ignoreDelimiters) { - - if (!Array.isArray(o.ignoreDelimiters)) { - o.ignoreDelimiters = [o.ignoreDelimiters]; - } - - o.ignoreDelimiters.forEach(function(delimiterPair) { - if (!delimiterPair.start || !delimiterPair.end) - return; - - reIgnoreStr = escapeRegex(delimiterPair.start) + - "[\\s\\S]*?" + - escapeRegex(delimiterPair.end); - - reIgnore = new RegExp(reIgnoreStr, "ig"); - - s = s.replace(reIgnore, function(match) { - return match.replace(/./g, " "); - }); - }); - } - - lex = new Lexer(s); - - lex.on("warning", function(ev) { - warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data)); - }); - - lex.on("error", function(ev) { - errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data)); - }); - - lex.on("fatal", function(ev) { - quit("E041", ev); - }); - - lex.on("Identifier", function(ev) { - emitter.emit("Identifier", ev); - }); - - lex.on("String", function(ev) { - emitter.emit("String", ev); - }); - - lex.on("Number", function(ev) { - emitter.emit("Number", ev); - }); - var name; - for (name in o) { - if (_.has(o, name)) { - checkOption(name, true, state.tokens.curr); - } - } - if (o) { - for (name in o.unstable) { - if (_.has(o.unstable, name)) { - checkOption(name, false, state.tokens.curr); - } - } - } - - try { - applyOptions(); - combine(predefined, g || {}); - checkComma.first = true; - - advance(); - switch (state.tokens.next.id) { - case "{": - case "[": - destructuringAssignOrJsonValue(0); - break; - default: - directives(); - - if (state.directive["use strict"]) { - if (!state.allowsGlobalUsd()) { - warning("W097", state.tokens.prev); - } - } - - statements(0); - } - - if (state.tokens.next.id !== "(end)") { - quit("E041", state.tokens.curr); - } - - state.funct["(scope)"].unstack(); - - } catch (err) { - if (err && err.name === "JSHintError") { - var nt = state.tokens.next || {}; - JSHINT.errors.push({ - scope : "(main)", - raw : err.raw, - code : err.code, - reason : err.reason, - line : err.line || nt.line, - character : err.character || nt.from - }); - } else { - throw err; - } - } - if (JSHINT.scope === "(main)") { - lintEvalCode(JSHINT.internals, o || {}, g); - } - - return JSHINT.errors.length === 0; - }; - itself.addModule = function(func) { - extraModules.push(func); - }; - - itself.addModule(style.register); - itself.data = function() { - var data = { - functions: [], - options: state.option - }; - - var fu, f, i, n, globals; - - if (itself.errors.length) { - data.errors = itself.errors; - } - - if (state.jsonMode) { - data.json = true; - } - - var impliedGlobals = state.funct["(scope)"].getImpliedGlobals(); - if (impliedGlobals.length > 0) { - data.implieds = impliedGlobals; - } - - globals = state.funct["(scope)"].getUsedOrDefinedGlobals(); - if (globals.length > 0) { - data.globals = globals; - } - - for (i = 1; i < functions.length; i += 1) { - f = functions[i]; - fu = {}; - - fu.name = f["(name)"]; - fu.param = f["(params)"]; - fu.line = f["(line)"]; - fu.character = f["(character)"]; - fu.last = f["(last)"]; - fu.lastcharacter = f["(lastcharacter)"]; - - fu.metrics = { - complexity: f["(metrics)"].ComplexityCount, - parameters: f["(metrics)"].arity, - statements: f["(metrics)"].statementCount - }; - - data.functions.push(fu); - } - - var unuseds = state.funct["(scope)"].getUnuseds(); - if (unuseds.length > 0) { - data.unused = unuseds; - } - - for (n in member) { - if (typeof member[n] === "number") { - data.member = member; - break; - } - } - - return data; - }; - - itself.jshint = itself; - - return itself; -}()); -if (typeof exports === "object" && exports) { - exports.JSHINT = JSHINT; -} - -},{"./lex.js":"/../../jshint/src/lex.js","./messages.js":"/../../jshint/src/messages.js","./options.js":"/../../jshint/src/options.js","./prod-params.js":"/../../jshint/src/prod-params.js","./reg.js":"/../../jshint/src/reg.js","./scope-manager.js":"/../../jshint/src/scope-manager.js","./state.js":"/../../jshint/src/state.js","./style.js":"/../../jshint/src/style.js","./vars.js":"/../../jshint/src/vars.js","console-browserify":"/../../jshint/node_modules/console-browserify/index.js","events":"/../node_modules/events/events.js","lodash.clone":"/../../jshint/node_modules/lodash.clone/index.js","underscore":"/../../jshint/node_modules/underscore/underscore.js"}],"/../../jshint/src/lex.js":[function(_dereq_,module,exports){ - -"use strict"; - -var _ = _dereq_("underscore"); -var events = _dereq_("events"); -var reg = _dereq_("./reg.js"); -var state = _dereq_("./state.js").state; - -var unicodeData = _dereq_("../data/ascii-identifier-data.js"); -var asciiIdentifierStartTable = unicodeData.asciiIdentifierStartTable; -var asciiIdentifierPartTable = unicodeData.asciiIdentifierPartTable; -var nonAsciiIdentifierStartTable = _dereq_("../data/non-ascii-identifier-start.js"); -var nonAsciiIdentifierPartTable = _dereq_("../data/non-ascii-identifier-part-only.js"); -var es5IdentifierNames; - -var Token = { - Identifier: 1, - Punctuator: 2, - NumericLiteral: 3, - StringLiteral: 4, - Comment: 5, - Keyword: 6, - RegExp: 9, - TemplateHead: 10, - TemplateMiddle: 11, - TemplateTail: 12, - NoSubstTemplate: 13 -}; - -var Context = { - Block: 1, - Template: 2 -}; - -function isHex(str) { - return /^[0-9a-fA-F]+$/.test(str); -} - -function isHexDigit(str) { - return str.length === 1 && isHex(str); -} - -function asyncTrigger() { - var _checks = []; - - return { - push: function(fn) { - _checks.push(fn); - }, - - check: function() { - for (var check = 0; check < _checks.length; ++check) { - _checks[check](); - } - - _checks.splice(0, _checks.length); - } - }; -} -function Lexer(source) { - var lines = source; - - if (typeof lines === "string") { - lines = lines - .replace(/\r\n/g, "\n") - .replace(/\r/g, "\n") - .split("\n"); - } - - if (lines[0] && lines[0].substr(0, 2) === "#!") { - if (lines[0].indexOf("node") !== -1) { - state.option.node = true; - } - lines[0] = ""; - } - - this.emitter = new events.EventEmitter(); - this.source = source; - this.setLines(lines); - this.prereg = true; - - this.line = 0; - this.char = 1; - this.from = 1; - this.input = ""; - this.inComment = false; - this.context = []; - this.templateStarts = []; - - for (var i = 0; i < state.option.indent; i += 1) { - state.tab += " "; - } -} - -Lexer.prototype = { - _lines: [], - - inContext: function(ctxType) { - return this.context.length > 0 && this.context[this.context.length - 1].type === ctxType; - }, - - pushContext: function(ctxType) { - this.context.push({ type: ctxType }); - }, - - popContext: function() { - return this.context.pop(); - }, - - currentContext: function() { - return this.context.length > 0 && this.context[this.context.length - 1]; - }, - - getLines: function() { - this._lines = state.lines; - return this._lines; - }, - - setLines: function(val) { - this._lines = val; - state.lines = this._lines; - }, - peek: function(i) { - return this.input.charAt(i || 0); - }, - skip: function(i) { - i = i || 1; - this.char += i; - this.input = this.input.slice(i); - }, - on: function(names, listener) { - names.split(" ").forEach(function(name) { - this.emitter.on(name, listener); - }.bind(this)); - }, - trigger: function() { - this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments)); - }, - triggerAsync: function(type, args, checks, fn) { - checks.push(function() { - if (fn()) { - this.trigger(type, args); - } - }.bind(this)); - }, - scanPunctuator: function() { - var ch1 = this.peek(); - var ch2, ch3, ch4; - - switch (ch1) { - case ".": - if ((/^[0-9]$/).test(this.peek(1))) { - return null; - } - if (this.peek(1) === "." && this.peek(2) === ".") { - return { - type: Token.Punctuator, - value: "..." - }; - } - case "(": - case ")": - case ";": - case ",": - case "[": - case "]": - case ":": - case "~": - case "?": - return { - type: Token.Punctuator, - value: ch1 - }; - case "{": - this.pushContext(Context.Block); - return { - type: Token.Punctuator, - value: ch1 - }; - case "}": - if (this.inContext(Context.Block)) { - this.popContext(); - } - return { - type: Token.Punctuator, - value: ch1 - }; - case "#": - return { - type: Token.Punctuator, - value: ch1 - }; - case "": - return null; - } - - ch2 = this.peek(1); - ch3 = this.peek(2); - ch4 = this.peek(3); - - if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") { - return { - type: Token.Punctuator, - value: ">>>=" - }; - } - - if (ch1 === "=" && ch2 === "=" && ch3 === "=") { - return { - type: Token.Punctuator, - value: "===" - }; - } - - if (ch1 === "!" && ch2 === "=" && ch3 === "=") { - return { - type: Token.Punctuator, - value: "!==" - }; - } - - if (ch1 === ">" && ch2 === ">" && ch3 === ">") { - return { - type: Token.Punctuator, - value: ">>>" - }; - } - - if (ch1 === "<" && ch2 === "<" && ch3 === "=") { - return { - type: Token.Punctuator, - value: "<<=" - }; - } - - if (ch1 === ">" && ch2 === ">" && ch3 === "=") { - return { - type: Token.Punctuator, - value: ">>=" - }; - } - if (ch1 === "=" && ch2 === ">") { - return { - type: Token.Punctuator, - value: ch1 + ch2 - }; - } - if (ch1 === ch2 && ("+-<>&|*".indexOf(ch1) >= 0)) { - if (ch1 === "*" && ch3 === "=") { - return { - type: Token.Punctuator, - value: ch1 + ch2 + ch3 - }; - } - - return { - type: Token.Punctuator, - value: ch1 + ch2 - }; - } - if ("<>=!+-*%&|^/".indexOf(ch1) >= 0) { - if (ch2 === "=") { - return { - type: Token.Punctuator, - value: ch1 + ch2 - }; - } - - return { - type: Token.Punctuator, - value: ch1 - }; - } - - return null; - }, - scanComments: function(checks) { - var ch1 = this.peek(); - var ch2 = this.peek(1); - var rest = this.input.substr(2); - var startLine = this.line; - var startChar = this.char; - var self = this; - - function commentToken(label, body, opt) { - var special = [ - "jshint", "jshint.unstable", "jslint", "members", "member", "globals", - "global", "exported" - ]; - var isSpecial = false; - var value = label + body; - var commentType = "plain"; - opt = opt || {}; - - if (opt.isMultiline) { - value += "*/"; - } - - body = body.replace(/\n/g, " "); - - if (label === "/*" && reg.fallsThrough.test(body)) { - isSpecial = true; - commentType = "falls through"; - } - - special.forEach(function(str) { - if (isSpecial) { - return; - } - if (label === "//" && str !== "jshint" && str !== "jshint.unstable") { - return; - } - - if (body.charAt(str.length) === " " && body.substr(0, str.length) === str) { - isSpecial = true; - label = label + str; - body = body.substr(str.length); - } - - if (!isSpecial && body.charAt(0) === " " && body.charAt(str.length + 1) === " " && - body.substr(1, str.length) === str) { - isSpecial = true; - label = label + " " + str; - body = body.substr(str.length + 1); - } - var strIndex = body.indexOf(str); - if (!isSpecial && strIndex >= 0 && body.charAt(strIndex + str.length) === " ") { - var isAllWhitespace = body.substr(0, strIndex).trim().length === 0; - if (isAllWhitespace) { - isSpecial = true; - body = body.substr(str.length + strIndex); - } - } - - if (!isSpecial) { - return; - } - - switch (str) { - case "member": - commentType = "members"; - break; - case "global": - commentType = "globals"; - break; - default: - var options = body.split(":").map(function(v) { - return v.replace(/^\s+/, "").replace(/\s+$/, ""); - }); - - if (options.length === 2) { - switch (options[0]) { - case "ignore": - switch (options[1]) { - case "start": - self.ignoringLinterErrors = true; - isSpecial = false; - break; - case "end": - self.ignoringLinterErrors = false; - isSpecial = false; - break; - } - } - } - - commentType = str; - } - }); - - return { - type: Token.Comment, - commentType: commentType, - value: value, - body: body, - isSpecial: isSpecial, - isMalformed: opt.isMalformed || false - }; - } - if (ch1 === "*" && ch2 === "/") { - this.trigger("error", { - code: "E018", - line: startLine, - character: startChar - }); - - this.skip(2); - return null; - } - if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) { - return null; - } - if (ch2 === "/") { - this.skip(this.input.length); // Skip to the EOL. - return commentToken("//", rest); - } - - var body = ""; - if (ch2 === "*") { - this.inComment = true; - this.skip(2); - - while (this.peek() !== "*" || this.peek(1) !== "/") { - if (this.peek() === "") { // End of Line - body += "\n"; - if (!this.nextLine(checks)) { - this.trigger("error", { - code: "E017", - line: startLine, - character: startChar - }); - - this.inComment = false; - return commentToken("/*", body, { - isMultiline: true, - isMalformed: true - }); - } - } else { - body += this.peek(); - this.skip(); - } - } - - this.skip(2); - this.inComment = false; - return commentToken("/*", body, { isMultiline: true }); - } - }, - scanKeyword: function() { - var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input); - var keywords = [ - "if", "in", "do", "var", "for", "new", - "try", "let", "this", "else", "case", - "void", "with", "enum", "while", "break", - "catch", "throw", "const", "yield", "class", - "super", "return", "typeof", "delete", - "switch", "export", "import", "default", - "finally", "extends", "function", "continue", - "debugger", "instanceof", "true", "false", "null", "async", "await" - ]; - - if (result && keywords.indexOf(result[0]) >= 0) { - return { - type: Token.Keyword, - value: result[0] - }; - } - - return null; - }, - scanIdentifier: function(checks) { - var id = ""; - var index = 0; - var char, value; - - function isNonAsciiIdentifierStart(code) { - return nonAsciiIdentifierStartTable.indexOf(code) > -1; - } - - function isNonAsciiIdentifierPart(code) { - return isNonAsciiIdentifierStart(code) || nonAsciiIdentifierPartTable.indexOf(code) > -1; - } - - var readUnicodeEscapeSequence = function() { - index += 1; - - if (this.peek(index) !== "u") { - return null; - } - - var sequence = this.peek(index + 1) + this.peek(index + 2) + - this.peek(index + 3) + this.peek(index + 4); - var code; - - if (isHex(sequence)) { - code = parseInt(sequence, 16); - - if (asciiIdentifierPartTable[code] || isNonAsciiIdentifierPart(code)) { - index += 5; - return "\\u" + sequence; - } - - return null; - } - - return null; - }.bind(this); - - var getIdentifierStart = function() { - var chr = this.peek(index); - var code = chr.charCodeAt(0); - - if (code === 92) { - return readUnicodeEscapeSequence(); - } - - if (code < 128) { - if (asciiIdentifierStartTable[code]) { - index += 1; - return chr; - } - - return null; - } - - if (isNonAsciiIdentifierStart(code)) { - index += 1; - return chr; - } - - return null; - }.bind(this); - - var getIdentifierPart = function() { - var chr = this.peek(index); - var code = chr.charCodeAt(0); - - if (code === 92) { - return readUnicodeEscapeSequence(); - } - - if (code < 128) { - if (asciiIdentifierPartTable[code]) { - index += 1; - return chr; - } - - return null; - } - - if (isNonAsciiIdentifierPart(code)) { - index += 1; - return chr; - } - - return null; - }.bind(this); - - function removeEscapeSequences(id) { - return id.replace(/\\u([0-9a-fA-F]{4})/g, function(m0, codepoint) { - return String.fromCharCode(parseInt(codepoint, 16)); - }); - } - - char = getIdentifierStart(); - if (char === null) { - return null; - } - - id = char; - for (;;) { - char = getIdentifierPart(); - - if (char === null) { - break; - } - - id += char; - } - - value = removeEscapeSequences(id); - - if (!state.inES6(true)) { - es5IdentifierNames = _dereq_("../data/es5-identifier-names.js"); - - if (!es5IdentifierNames.test(value)) { - this.triggerAsync( - "warning", - { - code: "W119", - line: this.line, - character: this.char, - data: ["unicode 8", "6"] - }, - checks, - function() { return true; } - ); - } - } - - return { - type: Token.Identifier, - value: value, - text: id, - tokenLength: id.length - }; - }, - scanNumericLiteral: function(checks) { - var index = 0; - var value = ""; - var length = this.input.length; - var char = this.peek(index); - var isAllowedDigit = isDecimalDigit; - var base = 10; - var isLegacy = false; - - function isDecimalDigit(str) { - return (/^[0-9]$/).test(str); - } - - function isOctalDigit(str) { - return (/^[0-7]$/).test(str); - } - - function isBinaryDigit(str) { - return (/^[01]$/).test(str); - } - - function isIdentifierStart(ch) { - return (ch === "$") || (ch === "_") || (ch === "\\") || - (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z"); - } - - if (char !== "." && !isDecimalDigit(char)) { - return null; - } - - if (char !== ".") { - value = this.peek(index); - index += 1; - char = this.peek(index); - - if (value === "0") { - if (char === "x" || char === "X") { - isAllowedDigit = isHexDigit; - base = 16; - - index += 1; - value += char; - } - if (char === "o" || char === "O") { - isAllowedDigit = isOctalDigit; - base = 8; - - if (!state.inES6(true)) { - this.triggerAsync( - "warning", - { - code: "W119", - line: this.line, - character: this.char, - data: [ "Octal integer literal", "6" ] - }, - checks, - function() { return true; } - ); - } - - index += 1; - value += char; - } - if (char === "b" || char === "B") { - isAllowedDigit = isBinaryDigit; - base = 2; - - if (!state.inES6(true)) { - this.triggerAsync( - "warning", - { - code: "W119", - line: this.line, - character: this.char, - data: [ "Binary integer literal", "6" ] - }, - checks, - function() { return true; } - ); - } - - index += 1; - value += char; - } - if (isOctalDigit(char)) { - isAllowedDigit = isOctalDigit; - base = 8; - isLegacy = true; - - index += 1; - value += char; - } - - if (!isOctalDigit(char) && isDecimalDigit(char)) { - index += 1; - value += char; - } - } - - while (index < length) { - char = this.peek(index); - if (!(isLegacy && isDecimalDigit(char)) && !isAllowedDigit(char)) { - break; - } - value += char; - index += 1; - } - - var isBigInt = this.peek(index) === 'n'; - - if (isAllowedDigit !== isDecimalDigit || isBigInt) { - if (isBigInt) { - if (!state.option.unstable.bigint) { - this.triggerAsync( - "warning", - { - code: "W144", - line: this.line, - character: this.char, - data: [ "BigInt", "bigint" ] - }, - checks, - function() { return true; } - ); - } - - value += char; - index += 1; - } else if (!isLegacy && value.length <= 2) { // 0x - return { - type: Token.NumericLiteral, - value: value, - isMalformed: true - }; - } - - if (index < length) { - char = this.peek(index); - if (isIdentifierStart(char)) { - return null; - } - } - - return { - type: Token.NumericLiteral, - value: value, - base: base, - isLegacy: isLegacy, - isMalformed: false - }; - } - } - - if (char === ".") { - value += char; - index += 1; - - while (index < length) { - char = this.peek(index); - if (!isDecimalDigit(char)) { - break; - } - value += char; - index += 1; - } - } - - if (char === "e" || char === "E") { - value += char; - index += 1; - char = this.peek(index); - - if (char === "+" || char === "-") { - value += this.peek(index); - index += 1; - } - - char = this.peek(index); - if (isDecimalDigit(char)) { - value += char; - index += 1; - - while (index < length) { - char = this.peek(index); - if (!isDecimalDigit(char)) { - break; - } - value += char; - index += 1; - } - } else { - return null; - } - } - - if (index < length) { - char = this.peek(index); - if (isIdentifierStart(char)) { - return null; - } - } - - return { - type: Token.NumericLiteral, - value: value, - base: base, - isMalformed: !isFinite(value) - }; - }, - scanEscapeSequence: function(checks) { - var allowNewLine = false; - var jump = 1; - this.skip(); - var char = this.peek(); - - switch (char) { - case "'": - this.triggerAsync("warning", { - code: "W114", - line: this.line, - character: this.char, - data: [ "\\'" ] - }, checks, function() {return state.jsonMode; }); - break; - case "b": - char = "\\b"; - break; - case "f": - char = "\\f"; - break; - case "n": - char = "\\n"; - break; - case "r": - char = "\\r"; - break; - case "t": - char = "\\t"; - break; - case "0": - char = "\\0"; - var n = parseInt(this.peek(1), 10); - this.triggerAsync("warning", { - code: "W115", - line: this.line, - character: this.char - }, checks, - function() { return n >= 0 && n <= 7 && state.isStrict(); }); - break; - case "1": - case "2": - case "3": - case "4": - case "5": - case "6": - case "7": - char = "\\" + char; - this.triggerAsync("warning", { - code: "W115", - line: this.line, - character: this.char - }, checks, - function() { return state.isStrict(); }); - break; - case "u": - var sequence = this.input.substr(1, 4); - var code = parseInt(sequence, 16); - if (!isHex(sequence)) { - this.trigger("warning", { - code: "W052", - line: this.line, - character: this.char, - data: [ "u" + sequence ] - }); - } - char = String.fromCharCode(code); - jump = 5; - break; - case "v": - this.triggerAsync("warning", { - code: "W114", - line: this.line, - character: this.char, - data: [ "\\v" ] - }, checks, function() { return state.jsonMode; }); - - char = "\v"; - break; - case "x": - var x = parseInt(this.input.substr(1, 2), 16); - - this.triggerAsync("warning", { - code: "W114", - line: this.line, - character: this.char, - data: [ "\\x-" ] - }, checks, function() { return state.jsonMode; }); - - char = String.fromCharCode(x); - jump = 3; - break; - case "\\": - char = "\\\\"; - break; - case "\"": - char = "\\\""; - break; - case "/": - break; - case "": - allowNewLine = true; - char = ""; - break; - } - - return { char: char, jump: jump, allowNewLine: allowNewLine }; - }, - scanTemplateLiteral: function(checks) { - var tokenType; - var value = ""; - var ch; - var startLine = this.line; - var startChar = this.char; - var depth = this.templateStarts.length; - - if (this.peek() === "`") { - if (!state.inES6(true)) { - this.triggerAsync( - "warning", - { - code: "W119", - line: this.line, - character: this.char, - data: ["template literal syntax", "6"] - }, - checks, - function() { return true; } - ); - } - tokenType = Token.TemplateHead; - this.templateStarts.push({ line: this.line, char: this.char }); - depth = this.templateStarts.length; - this.skip(1); - this.pushContext(Context.Template); - } else if (this.inContext(Context.Template) && this.peek() === "}") { - tokenType = Token.TemplateMiddle; - } else { - return null; - } - - while (this.peek() !== "`") { - while ((ch = this.peek()) === "") { - value += "\n"; - if (!this.nextLine(checks)) { - var startPos = this.templateStarts.pop(); - this.trigger("error", { - code: "E052", - line: startPos.line, - character: startPos.char - }); - return { - type: tokenType, - value: value, - startLine: startLine, - startChar: startChar, - isUnclosed: true, - depth: depth, - context: this.popContext() - }; - } - } - - if (ch === '$' && this.peek(1) === '{') { - value += '${'; - this.skip(2); - return { - type: tokenType, - value: value, - startLine: startLine, - startChar: startChar, - isUnclosed: false, - depth: depth, - context: this.currentContext() - }; - } else if (ch === '\\') { - var escape = this.scanEscapeSequence(checks); - value += escape.char; - this.skip(escape.jump); - } else if (ch !== '`') { - value += ch; - this.skip(1); - } - } - tokenType = tokenType === Token.TemplateHead ? Token.NoSubstTemplate : Token.TemplateTail; - this.skip(1); - this.templateStarts.pop(); - - return { - type: tokenType, - value: value, - startLine: startLine, - startChar: startChar, - isUnclosed: false, - depth: depth, - context: this.popContext() - }; - }, - scanStringLiteral: function(checks) { - var quote = this.peek(); - if (quote !== "\"" && quote !== "'") { - return null; - } - this.triggerAsync("warning", { - code: "W108", - line: this.line, - character: this.char // +1? - }, checks, function() { return state.jsonMode && quote !== "\""; }); - - var value = ""; - var startLine = this.line; - var startChar = this.char; - var allowNewLine = false; - - this.skip(); - - while (this.peek() !== quote) { - if (this.peek() === "") { // End Of Line - - if (!allowNewLine) { - this.trigger("warning", { - code: "W112", - line: this.line, - character: this.char - }); - } else { - allowNewLine = false; - - this.triggerAsync("warning", { - code: "W043", - line: this.line, - character: this.char - }, checks, function() { return !state.option.multistr; }); - - this.triggerAsync("warning", { - code: "W042", - line: this.line, - character: this.char - }, checks, function() { return state.jsonMode && state.option.multistr; }); - } - - if (!this.nextLine(checks)) { - return { - type: Token.StringLiteral, - value: value, - startLine: startLine, - startChar: startChar, - isUnclosed: true, - quote: quote - }; - } - - } else { // Any character other than End Of Line - - allowNewLine = false; - var char = this.peek(); - var jump = 1; // A length of a jump, after we're done - - if (char < " ") { - this.triggerAsync( - "warning", - { - code: "W113", - line: this.line, - character: this.char, - data: [ "" ] - }, - checks, - function() { return true; } - ); - } - if (char === "\\") { - var parsed = this.scanEscapeSequence(checks); - char = parsed.char; - jump = parsed.jump; - allowNewLine = parsed.allowNewLine; - } - if (char !== "") { - value += char; - this.skip(jump); - } - } - } - - this.skip(); - return { - type: Token.StringLiteral, - value: value, - startLine: startLine, - startChar: startChar, - isUnclosed: false, - quote: quote - }; - }, - scanRegExp: function(checks) { - var index = 0; - var length = this.input.length; - var char = this.peek(); - var value = char; - var body = ""; - var groupReferences = []; - var allFlags = ""; - var es5Flags = ""; - var malformed = false; - var isCharSet = false; - var isCharSetRange = false; - var isGroup = false; - var isQuantifiable = false; - var hasInvalidQuantifier = false; - var escapedChars = ""; - var hasUFlag = function() { return allFlags.indexOf("u") > -1; }; - var escapeSequence; - var groupCount = 0; - var terminated, malformedDesc; - - var scanRegexpEscapeSequence = function() { - var next, sequence; - index += 1; - char = this.peek(index); - - if (reg.nonzeroDigit.test(char)) { - sequence = char; - next = this.peek(index + 1); - while (reg.nonzeroDigit.test(next) || next === "0") { - index += 1; - char = next; - sequence += char; - body += char; - value += char; - next = this.peek(index + 1); - } - groupReferences.push(Number(sequence)); - return sequence; - } - - escapedChars += char; - - if (char === "u" && this.peek(index + 1) === "{") { - var x = index + 2; - sequence = "u{"; - next = this.peek(x); - while (isHex(next)) { - sequence += next; - x += 1; - next = this.peek(x); - } - - if (next !== "}") { - this.triggerAsync( - "error", - { - code: "E016", - line: this.line, - character: this.char, - data: [ "Invalid Unicode escape sequence" ] - }, - checks, - hasUFlag - ); - } else if (sequence.length > 2) { - sequence += "}"; - body += sequence; - value += sequence; - index = x + 1; - return sequence; - } - } - if (char < " ") { - malformed = true; - this.triggerAsync( - "warning", - { - code: "W048", - line: this.line, - character: this.char - }, - checks, - function() { return true; } - ); - } - if (char === "<") { - malformed = true; - this.triggerAsync( - "warning", - { - code: "W049", - line: this.line, - character: this.char, - data: [ char ] - }, - checks, - function() { return true; } - ); - } else if (char === "0" && reg.decimalDigit.test(this.peek(index + 1))) { - this.triggerAsync( - "error", - { - code: "E016", - line: this.line, - character: this.char, - data: [ "Invalid decimal escape sequence" ] - }, - checks, - hasUFlag - ); - } - - index += 1; - body += char; - value += char; - - return char; - }.bind(this); - - var checkQuantifier = function() { - var lookahead = index; - var lowerBound = ""; - var upperBound = ""; - var next; - - next = this.peek(lookahead + 1); - - while (reg.decimalDigit.test(next)) { - lookahead += 1; - lowerBound += next; - next = this.peek(lookahead + 1); - } - - if (!lowerBound) { - return false; - } - - if (next === "}") { - return true; - } - - if (next !== ",") { - return false; - } - - lookahead += 1; - next = this.peek(lookahead + 1); - - while (reg.decimalDigit.test(next)) { - lookahead += 1; - upperBound += next; - next = this.peek(lookahead + 1); - } - - if (next !== "}") { - return false; - } - - if (upperBound) { - return Number(lowerBound) <= Number(upperBound); - } - - return true; - }.bind(this); - - var translateUFlag = function(body) { - var astralSubstitute = "\uFFFF"; - - return body - .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function($0, $1, $2) { - var codePoint = parseInt($1 || $2, 16); - var literal; - - if (codePoint > 0x10FFFF) { - malformed = true; - this.trigger("error", { - code: "E016", - line: this.line, - character: this.char, - data: [ char ] - }); - - return; - } - literal = String.fromCharCode(codePoint); - - if (reg.regexpSyntaxChars.test(literal)) { - return $0; - } - - if (codePoint <= 0xFFFF) { - return String.fromCharCode(codePoint); - } - return astralSubstitute; - }.bind(this)) - .replace( - /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, - astralSubstitute - ); - }.bind(this); - if (!this.prereg || char !== "/") { - return null; - } - - index += 1; - terminated = false; - - while (index < length) { - isCharSetRange &= char === "-"; - char = this.peek(index); - value += char; - body += char; - - if (isCharSet) { - if (char === "]") { - if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") { - isCharSet = false; - } - } else if (char === "-") { - isCharSetRange = true; - } - } - - if (char === "\\") { - escapeSequence = scanRegexpEscapeSequence(); - - if (isCharSet && (this.peek(index) === "-" || isCharSetRange) && - reg.regexpCharClasses.test(escapeSequence)) { - this.triggerAsync( - "error", - { - code: "E016", - line: this.line, - character: this.char, - data: [ "Character class used in range" ] - }, - checks, - hasUFlag - ); - } - - continue; - } - - if (isCharSet) { - index += 1; - continue; - } - - if (char === "{" && !hasInvalidQuantifier) { - hasInvalidQuantifier = !checkQuantifier(); - } - - if (char === "[") { - isCharSet = true; - index += 1; - continue; - } else if (char === "(") { - isGroup = true; - - if (this.peek(index + 1) === "?" && - (this.peek(index + 2) === "=" || this.peek(index + 2) === "!")) { - isQuantifiable = true; - } - } else if (char === ")") { - if (isQuantifiable) { - isQuantifiable = false; - - if (reg.regexpQuantifiers.test(this.peek(index + 1))) { - this.triggerAsync( - "error", - { - code: "E016", - line: this.line, - character: this.char, - data: [ "Quantified quantifiable" ] - }, - checks, - hasUFlag - ); - } - } else { - groupCount += 1; - } - - isGroup = false; - } else if (char === "/") { - body = body.substr(0, body.length - 1); - terminated = true; - index += 1; - break; - } - - index += 1; - } - - if (!terminated) { - this.trigger("error", { - code: "E015", - line: this.line, - character: this.from - }); - - return void this.trigger("fatal", { - line: this.line, - from: this.from - }); - } - - while (index < length) { - char = this.peek(index); - if (!/[gimyus]/.test(char)) { - break; - } - if (char === "y") { - if (!state.inES6(true)) { - this.triggerAsync( - "warning", - { - code: "W119", - line: this.line, - character: this.char, - data: [ "Sticky RegExp flag", "6" ] - }, - checks, - function() { return true; } - ); - } - } else if (char === "u") { - if (!state.inES6(true)) { - this.triggerAsync( - "warning", - { - code: "W119", - line: this.line, - character: this.char, - data: [ "Unicode RegExp flag", "6" ] - }, - checks, - function() { return true; } - ); - } - - var hasInvalidEscape = (function(groupReferences, groupCount, escapedChars, reg) { - var hasInvalidGroup = groupReferences.some(function(groupReference) { - if (groupReference > groupCount) { - return true; - } - }); - - if (hasInvalidGroup) { - return true; - } - - return !escapedChars.split("").every(function(escapedChar) { - return escapedChar === "u" || - escapedChar === "/" || - escapedChar === "0" || - reg.regexpControlEscapes.test(escapedChar) || - reg.regexpCharClasses.test(escapedChar) || - reg.regexpSyntaxChars.test(escapedChar); - }); - }(groupReferences, groupCount, escapedChars, reg)); - - if (hasInvalidEscape) { - malformedDesc = "Invalid escape"; - } else if (hasInvalidQuantifier) { - malformedDesc = "Invalid quantifier"; - } - - body = translateUFlag(body); - } else if (char === "s") { - if (!state.inES9()) { - this.triggerAsync( - "warning", - { - code: "W119", - line: this.line, - character: this.char, - data: [ "DotAll RegExp flag", "9" ] - }, - checks, - function() { return true; } - ); - } - if (value.indexOf("s") > -1) { - malformedDesc = "Duplicate RegExp flag"; - } - } else { - es5Flags += char; - } - - if (allFlags.indexOf(char) > -1) { - malformedDesc = "Duplicate RegExp flag"; - } - allFlags += char; - - value += char; - allFlags += char; - index += 1; - } - - if (allFlags.indexOf("u") === -1) { - this.triggerAsync("warning", { - code: "W147", - line: this.line, - character: this.char - }, checks, function() { return state.option.regexpu; }); - } - - try { - new RegExp(body, es5Flags); - } catch (err) { - malformedDesc = err.message; - } - - if (malformedDesc) { - malformed = true; - this.trigger("error", { - code: "E016", - line: this.line, - character: this.char, - data: [ malformedDesc ] - }); - } else if (allFlags.indexOf("s") > -1 && !reg.regexpDot.test(body)) { - this.trigger("warning", { - code: "W148", - line: this.line, - character: this.char - }); - } - - return { - type: Token.RegExp, - value: value, - isMalformed: malformed - }; - }, - scanNonBreakingSpaces: function() { - return state.option.nonbsp ? - this.input.search(/(\u00A0)/) : -1; - }, - next: function(checks) { - this.from = this.char; - while (reg.whitespace.test(this.peek())) { - this.from += 1; - this.skip(); - } - - var match = this.scanComments(checks) || - this.scanStringLiteral(checks) || - this.scanTemplateLiteral(checks); - - if (match) { - return match; - } - - match = - this.scanRegExp(checks) || - this.scanPunctuator() || - this.scanKeyword() || - this.scanIdentifier(checks) || - this.scanNumericLiteral(checks); - - if (match) { - this.skip(match.tokenLength || match.value.length); - return match; - } - - return null; - }, - nextLine: function(checks) { - var char; - - if (this.line >= this.getLines().length) { - return false; - } - - this.input = this.getLines()[this.line]; - this.line += 1; - this.char = 1; - this.from = 1; - - var inputTrimmed = this.input.trim(); - - var startsWith = function() { - return _.some(arguments, function(prefix) { - return inputTrimmed.indexOf(prefix) === 0; - }); - }; - - var endsWith = function() { - return _.some(arguments, function(suffix) { - return inputTrimmed.indexOf(suffix, inputTrimmed.length - suffix.length) !== -1; - }); - }; - if (this.ignoringLinterErrors === true) { - if (!startsWith("/*", "//") && !(this.inComment && endsWith("*/"))) { - this.input = ""; - } - } - - char = this.scanNonBreakingSpaces(); - if (char >= 0) { - this.triggerAsync( - "warning", - { code: "W125", line: this.line, character: char + 1 }, - checks, - function() { return true; } - ); - } - - this.input = this.input.replace(/\t/g, state.tab); - - if (!this.ignoringLinterErrors && state.option.maxlen && - state.option.maxlen < this.input.length) { - var inComment = this.inComment || - startsWith.call(inputTrimmed, "//") || - startsWith.call(inputTrimmed, "/*"); - - var shouldTriggerError = !inComment || !reg.maxlenException.test(inputTrimmed); - - if (shouldTriggerError) { - this.triggerAsync( - "warning", - { code: "W101", line: this.line, character: this.input.length }, - checks, - function() { return true; } - ); - } - } - - return true; - }, - token: function() { - var checks = asyncTrigger(); - var token; - var create = function(type, value, isProperty, token) { - var obj; - - if (type !== "(endline)" && type !== "(end)") { - this.prereg = false; - } - - if (type === "(punctuator)") { - switch (value) { - case ".": - case ")": - case "~": - case "#": - case "]": - case "}": - case "++": - case "--": - this.prereg = false; - break; - default: - this.prereg = true; - } - - obj = Object.create(state.syntax[value] || state.syntax["(error)"]); - } - - if (type === "(identifier)") { - if (value === "return" || value === "case" || value === "yield" || - value === "typeof" || value === "instanceof" || value === "void" || - value === "await") { - this.prereg = true; - } - - if (_.has(state.syntax, value)) { - obj = Object.create(state.syntax[value] || state.syntax["(error)"]); - } - } - - if (type === "(template)" || type === "(template middle)") { - this.prereg = true; - } - - if (!obj) { - obj = Object.create(state.syntax[type]); - } - - obj.identifier = (type === "(identifier)"); - obj.type = obj.type || type; - obj.value = value; - obj.line = this.line; - obj.character = this.char; - obj.from = this.from; - if (obj.identifier && token) obj.raw_text = token.text || token.value; - if (token && token.startLine && token.startLine !== this.line) { - obj.startLine = token.startLine; - } - if (token && token.context) { - obj.context = token.context; - } - if (token && token.depth) { - obj.depth = token.depth; - } - if (token && token.isUnclosed) { - obj.isUnclosed = token.isUnclosed; - } - - if (isProperty && obj.identifier) { - obj.isProperty = isProperty; - } - - obj.check = checks.check; - - return obj; - }.bind(this); - - for (;;) { - if (!this.input.length) { - if (this.nextLine(checks)) { - return create("(endline)", ""); - } - - if (this.exhausted) { - return null; - } - - this.exhausted = true; - return create("(end)", ""); - } - - token = this.next(checks); - - if (!token) { - if (this.input.length) { - this.trigger("error", { - code: "E024", - line: this.line, - character: this.char, - data: [ this.peek() ] - }); - - this.input = ""; - } - - continue; - } - - switch (token.type) { - case Token.StringLiteral: - this.triggerAsync("String", { - line: this.line, - char: this.char, - from: this.from, - startLine: token.startLine, - startChar: token.startChar, - value: token.value, - quote: token.quote - }, checks, function() { return true; }); - - return create("(string)", token.value, null, token); - - case Token.TemplateHead: - this.trigger("TemplateHead", { - line: this.line, - char: this.char, - from: this.from, - startLine: token.startLine, - startChar: token.startChar, - value: token.value - }); - return create("(template)", token.value, null, token); - - case Token.TemplateMiddle: - this.trigger("TemplateMiddle", { - line: this.line, - char: this.char, - from: this.from, - startLine: token.startLine, - startChar: token.startChar, - value: token.value - }); - return create("(template middle)", token.value, null, token); - - case Token.TemplateTail: - this.trigger("TemplateTail", { - line: this.line, - char: this.char, - from: this.from, - startLine: token.startLine, - startChar: token.startChar, - value: token.value - }); - return create("(template tail)", token.value, null, token); - - case Token.NoSubstTemplate: - this.trigger("NoSubstTemplate", { - line: this.line, - char: this.char, - from: this.from, - startLine: token.startLine, - startChar: token.startChar, - value: token.value - }); - return create("(no subst template)", token.value, null, token); - - case Token.Identifier: - this.triggerAsync("Identifier", { - line: this.line, - char: this.char, - from: this.from, - name: token.value, - raw_name: token.text, - isProperty: state.tokens.curr.id === "." - }, checks, function() { return true; }); - case Token.Keyword: - return create("(identifier)", token.value, state.tokens.curr.id === ".", token); - - case Token.NumericLiteral: - if (token.isMalformed) { - this.trigger("warning", { - code: "W045", - line: this.line, - character: this.char, - data: [ token.value ] - }); - } - - this.triggerAsync("warning", { - code: "W114", - line: this.line, - character: this.char, - data: [ "0x-" ] - }, checks, function() { return token.base === 16 && state.jsonMode; }); - - this.triggerAsync("warning", { - code: "W115", - line: this.line, - character: this.char - }, checks, function() { - return state.isStrict() && token.base === 8 && token.isLegacy; - }); - - this.trigger("Number", { - line: this.line, - char: this.char, - from: this.from, - value: token.value, - base: token.base, - isMalformed: token.isMalformed - }); - - return create("(number)", token.value); - - case Token.RegExp: - return create("(regexp)", token.value); - - case Token.Comment: - if (token.isSpecial) { - return { - id: '(comment)', - value: token.value, - body: token.body, - type: token.commentType, - isSpecial: token.isSpecial, - line: this.line, - character: this.char, - from: this.from - }; - } - - break; - - default: - return create("(punctuator)", token.value); - } - } - } -}; - -exports.Lexer = Lexer; -exports.Context = Context; - -},{"../data/ascii-identifier-data.js":"/../../jshint/data/ascii-identifier-data.js","../data/es5-identifier-names.js":"/../../jshint/data/es5-identifier-names.js","../data/non-ascii-identifier-part-only.js":"/../../jshint/data/non-ascii-identifier-part-only.js","../data/non-ascii-identifier-start.js":"/../../jshint/data/non-ascii-identifier-start.js","./reg.js":"/../../jshint/src/reg.js","./state.js":"/../../jshint/src/state.js","events":"/../node_modules/events/events.js","underscore":"/../../jshint/node_modules/underscore/underscore.js"}],"/../../jshint/src/messages.js":[function(_dereq_,module,exports){ -"use strict"; - -var _ = _dereq_("underscore"); - -var errors = { - E001: "Bad {a}option: '{b}'.", - E002: "Bad option value.", - E003: "Expected a JSON value.", - E004: "Input is neither a string nor an array of strings.", - E005: "Input is empty.", - E006: "Unexpected early end of program.", - E007: "Missing \"use strict\" statement.", - E008: "Strict violation.", - E009: "Option 'validthis' can't be used in a global scope.", - E010: "'with' is not allowed in strict mode.", - E011: "'{a}' has already been declared.", - E012: "const '{a}' is initialized to 'undefined'.", - E013: "Attempting to override '{a}' which is a constant.", - E014: "A regular expression literal can be confused with '/='.", - E015: "Unclosed regular expression.", - E016: "Invalid regular expression.", - E017: "Unclosed comment.", - E018: "Unbegun comment.", - E019: "Unmatched '{a}'.", - E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.", - E021: "Expected '{a}' and instead saw '{b}'.", - E022: "Line breaking error '{a}'.", - E023: "Missing '{a}'.", - E024: "Unexpected '{a}'.", - E025: "Missing ':' on a case clause.", - E026: "Missing '}' to match '{' from line {a}.", - E027: "Missing ']' to match '[' from line {a}.", - E028: "Illegal comma.", - E029: "Unclosed string.", - E030: "Expected an identifier and instead saw '{a}'.", - E031: "Bad assignment.", // FIXME: Rephrase - E032: "Expected a small integer or 'false' and instead saw '{a}'.", - E033: "Expected an operator and instead saw '{a}'.", - E034: "get/set are ES5 features.", - E035: "Missing property name.", - E036: "Expected to see a statement and instead saw a block.", - E037: null, - E038: null, - E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.", - E040: "Each value should have its own case label.", - E041: "Unrecoverable syntax error.", - E042: "Stopping.", - E043: "Too many errors.", - E044: null, - E045: "Invalid for each loop.", - E046: "Yield expressions may only occur within generator functions.", - E047: null, - E048: "{a} declaration not directly within block.", - E049: "A {a} cannot be named '{b}'.", - E050: "Mozilla requires the yield expression to be parenthesized here.", - E051: null, - E052: "Unclosed template literal.", - E053: "{a} declarations are only allowed at the top level of module scope.", - E054: "Class properties must be methods. Expected '(' but instead saw '{a}'.", - E055: "The '{a}' option cannot be set after any executable code.", - E056: "'{a}' was used before it was declared, which is illegal for '{b}' variables.", - E057: "Invalid meta property: '{a}.{b}'.", - E058: "Missing semicolon.", - E059: "Incompatible values for the '{a}' and '{b}' linting options.", - E060: "Non-callable values cannot be used as the second operand to instanceof.", - E061: "Invalid position for 'yield' expression (consider wrapping in parenthesis).", - E062: "Rest parameter does not a support default value.", - E063: "Super property may only be used within method bodies.", - E064: "Super call may only be used within class method bodies.", - E065: "Functions defined outside of strict mode with non-simple parameter lists may not " + - "enable strict mode.", - E066: "Asynchronous iteration is only available with for-of loops." -}; - -var warnings = { - W001: "'hasOwnProperty' is a really bad name.", - W002: "Value of '{a}' may be overwritten in IE 8 and earlier.", - W003: "'{a}' was used before it was defined.", - W004: "'{a}' is already defined.", - W005: "A dot following a number can be confused with a decimal point.", - W006: "Confusing minuses.", - W007: "Confusing plusses.", - W008: "A leading decimal point can be confused with a dot: '{a}'.", - W009: "The array literal notation [] is preferable.", - W010: "The object literal notation {} is preferable.", - W011: null, - W012: null, - W013: null, - W014: "Misleading line break before '{a}'; readers may interpret this as an expression boundary.", - W015: null, - W016: "Unexpected use of '{a}'.", - W017: "Bad operand.", - W018: "Confusing use of '{a}'.", - W019: "Use the isNaN function to compare with NaN.", - W020: "Read only.", - W021: "Reassignment of '{a}', which is a {b}. " + - "Use 'var' or 'let' to declare bindings that may change.", - W022: "Do not assign to the exception parameter.", - W023: null, - W024: "Expected an identifier and instead saw '{a}' (a reserved word).", - W025: "Missing name in function declaration.", - W026: "Inner functions should be listed at the top of the outer function.", - W027: "Unreachable '{a}' after '{b}'.", - W028: "Label '{a}' on {b} statement.", - W030: "Expected an assignment or function call and instead saw an expression.", - W031: "Do not use 'new' for side effects.", - W032: "Unnecessary semicolon.", - W033: "Missing semicolon.", - W034: "Unnecessary directive \"{a}\".", - W035: "Empty block.", - W036: "Unexpected /*member '{a}'.", - W037: "'{a}' is a statement label.", - W038: "'{a}' used out of scope.", - W039: null, - W040: "If a strict mode function is executed using function invocation, " + - "its 'this' value will be undefined.", - W041: null, - W042: "Avoid EOL escaping.", - W043: "Bad escaping of EOL. Use option multistr if needed.", - W044: "Bad or unnecessary escaping.", /* TODO(caitp): remove W044 */ - W045: "Bad number '{a}'.", - W046: "Don't use extra leading zeros '{a}'.", - W047: "A trailing decimal point can be confused with a dot: '{a}'.", - W048: "Unexpected control character in regular expression.", - W049: "Unexpected escaped character '{a}' in regular expression.", - W050: "JavaScript URL.", - W051: "Variables should not be deleted.", - W052: "Unexpected '{a}'.", - W053: "Do not use {a} as a constructor.", - W054: "The Function constructor is a form of eval.", - W055: "A constructor name should start with an uppercase letter.", - W056: "Bad constructor.", - W057: "Weird construction. Is 'new' necessary?", - W058: "Missing '()' invoking a constructor.", - W059: "Avoid arguments.{a}.", - W060: "document.write can be a form of eval.", - W061: "eval can be harmful.", - W062: "Wrap an immediate function invocation in parens " + - "to assist the reader in understanding that the expression " + - "is the result of a function, and not the function itself.", - W063: "Math is not a function.", - W064: "Missing 'new' prefix when invoking a constructor.", - W065: "Missing radix parameter.", - W066: "Implied eval. Consider passing a function instead of a string.", - W067: "Bad invocation.", - W068: "Wrapping non-IIFE function literals in parens is unnecessary.", - W069: "['{a}'] is better written in dot notation.", - W070: "Extra comma. (it breaks older versions of IE)", - W071: "This function has too many statements. ({a})", - W072: "This function has too many parameters. ({a})", - W073: "Blocks are nested too deeply. ({a})", - W074: "This function's cyclomatic complexity is too high. ({a})", - W075: "Duplicate {a} '{b}'.", - W076: "Unexpected parameter '{a}' in get {b} function.", - W077: "Expected a single parameter in set {a} function.", - W078: "Setter is defined without getter.", - W079: "Redefinition of '{a}'.", - W080: "It's not necessary to initialize '{a}' to 'undefined'.", - W081: null, - W082: "Function declarations should not be placed in blocks. " + - "Use a function expression or move the statement to the top of " + - "the outer function.", - W083: "Functions declared within loops referencing an outer scoped " + - "variable may lead to confusing semantics. ({a})", - W084: "Assignment in conditional expression", - W085: "Don't use 'with'.", - W086: "Expected a 'break' statement before '{a}'.", - W087: "Forgotten 'debugger' statement?", - W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.", - W089: "The body of a for in should be wrapped in an if statement to filter " + - "unwanted properties from the prototype.", - W090: "'{a}' is not a statement label.", - W091: null, - W093: "Did you mean to return a conditional instead of an assignment?", - W094: "Unexpected comma.", - W095: "Expected a string and instead saw {a}.", - W096: "The '{a}' key may produce unexpected results.", - W097: "Use the function form of \"use strict\".", - W098: "'{a}' is defined but never used.", - W099: null, - W100: null, - W101: "Line is too long.", - W102: null, - W103: "The '{a}' property is deprecated.", - W104: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz).", - W105: null, - W106: "Identifier '{a}' is not in camel case.", - W107: "Script URL.", - W108: "Strings must use doublequote.", - W109: "Strings must use singlequote.", - W110: "Mixed double and single quotes.", - W112: "Unclosed string.", - W113: "Control character in string: {a}.", - W114: "Avoid {a}.", - W115: "Octal literals are not allowed in strict mode.", - W116: "Expected '{a}' and instead saw '{b}'.", - W117: "'{a}' is not defined.", - W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).", - W119: "'{a}' is only available in ES{b} (use 'esversion: {b}').", - W120: "You might be leaking a variable ({a}) here.", - W121: "Extending prototype of native object: '{a}'.", - W122: "Invalid typeof value '{a}'", - W123: "'{a}' is already defined in outer scope.", - W124: "A generator function should contain at least one yield expression.", - W125: "This line contains non-breaking spaces: http://jshint.com/docs/options/#nonbsp", - W126: "Unnecessary grouping operator.", - W127: "Unexpected use of a comma operator.", - W128: "Empty array elements require elision=true.", - W129: "'{a}' is defined in a future version of JavaScript. Use a " + - "different variable name to avoid migration issues.", - W130: "Invalid element after rest element.", - W131: "Invalid parameter after rest parameter.", - W132: "`var` declarations are forbidden. Use `let` or `const` instead.", - W133: "Invalid for-{a} loop left-hand-side: {b}.", - W134: "The '{a}' option is only available when linting ECMAScript {b} code.", - W135: "{a} may not be supported by non-browser environments.", - W136: "'{a}' must be in function scope.", - W137: "Empty destructuring: this is unnecessary and can be removed.", - W138: "Regular parameters should not come after default parameters.", - W139: "Function expressions should not be used as the second operand to instanceof.", - W140: "Missing comma.", - W141: "Empty {a}: this is unnecessary and can be removed.", - W142: "Empty {a}: consider replacing with `import '{b}';`.", - W143: "Assignment to properties of a mapped arguments object may cause " + - "unexpected changes to formal parameters.", - W144: "'{a}' is a non-standard language feature. Enable it using the '{b}' unstable option.", - W145: "Superfluous 'case' clause.", - W146: "Unnecessary `await` expression.", - W147: "Regular expressions should include the 'u' flag.", - W148: "Unnecessary RegExp 's' flag." -}; - -var info = { - I001: "Comma warnings can be turned off with 'laxcomma'.", - I002: null, - I003: "ES5 option is now set per default" -}; - -exports.errors = {}; -exports.warnings = {}; -exports.info = {}; - -_.each(errors, function(desc, code) { - exports.errors[code] = { code: code, desc: desc }; -}); - -_.each(warnings, function(desc, code) { - exports.warnings[code] = { code: code, desc: desc }; -}); - -_.each(info, function(desc, code) { - exports.info[code] = { code: code, desc: desc }; -}); - -},{"underscore":"/../../jshint/node_modules/underscore/underscore.js"}],"/../../jshint/src/name-stack.js":[function(_dereq_,module,exports){ -"use strict"; - -function NameStack() { - this._stack = []; -} - -Object.defineProperty(NameStack.prototype, "length", { - get: function() { - return this._stack.length; - } -}); -NameStack.prototype.push = function() { - this._stack.push(null); -}; -NameStack.prototype.pop = function() { - this._stack.pop(); -}; -NameStack.prototype.set = function(token) { - this._stack[this.length - 1] = token; -}; -NameStack.prototype.infer = function() { - var nameToken = this._stack[this.length - 1]; - var prefix = ""; - var type; - if (!nameToken || nameToken.type === "class") { - nameToken = this._stack[this.length - 2]; - } - - if (!nameToken) { - return "(empty)"; - } - - type = nameToken.type; - - if (type !== "(string)" && type !== "(number)" && type !== "(identifier)" && type !== "default") { - return "(expression)"; - } - - if (nameToken.accessorType) { - prefix = nameToken.accessorType + " "; - } - - return prefix + nameToken.value; -}; - -module.exports = NameStack; - -},{}],"/../../jshint/src/options.js":[function(_dereq_,module,exports){ -"use strict"; -exports.bool = { - enforcing: { - bitwise : true, - freeze : true, - camelcase : true, - curly : true, - eqeqeq : true, - futurehostile: true, - es3 : true, - es5 : true, - forin : true, - immed : true, - leanswitch : true, - newcap : true, - noarg : true, - nocomma : true, - noempty : true, - nonbsp : true, - nonew : true, - noreturnawait: true, - regexpu : true, - undef : true, - singleGroups: false, - varstmt: false, - enforceall : false, - trailingcomma: false - }, - relaxing: { - asi : true, - multistr : true, - debug : true, - boss : true, - evil : true, - funcscope : true, - globalstrict: true, - iterator : true, - notypeof : true, - plusplus : true, - proto : true, - scripturl : true, - sub : true, - supernew : true, - laxbreak : true, - laxcomma : true, - validthis : true, - withstmt : true, - moz : true, - noyield : true, - eqnull : true, - lastsemic : true, - loopfunc : true, - expr : true, - esnext : true, - elision : true, - }, - environments: { - mootools : true, - couch : true, - jasmine : true, - jquery : true, - node : true, - qunit : true, - rhino : true, - shelljs : true, - prototypejs : true, - yui : true, - mocha : true, - module : true, - wsh : true, - worker : true, - nonstandard : true, - browser : true, - browserify : true, - devel : true, - dojo : true, - typed : true, - phantom : true - }, - obsolete: { - onecase : true, // if one case switch statements should be allowed - regexp : true, // if the . should not be allowed in regexp literals - regexdash : true // if unescaped first/last dash (-) inside brackets - } -}; -exports.val = { - maxlen : false, - indent : false, - maxerr : false, - predef : false, - globals : false, - quotmark : false, - - scope : false, - maxstatements: false, - maxdepth : false, - maxparams : false, - maxcomplexity: false, - shadow : false, - strict : true, - unused : true, - latedef : false, - - ignore : false, // start/end ignoring lines of code, bypassing the lexer - - ignoreDelimiters: false, // array of start/end delimiters used to ignore - esversion: 5 -}; -exports.unstable = { - bigint: true -}; -exports.inverted = { - bitwise : true, - forin : true, - newcap : true, - plusplus: true, - regexp : true, - undef : true, - eqeqeq : true, - strict : true -}; - -exports.validNames = Object.keys(exports.val) - .concat(Object.keys(exports.bool.relaxing)) - .concat(Object.keys(exports.bool.enforcing)) - .concat(Object.keys(exports.bool.obsolete)) - .concat(Object.keys(exports.bool.environments)) - .concat(["unstable"]); - -exports.unstableNames = Object.keys(exports.unstable); -exports.renamed = { - eqeq : "eqeqeq", - windows: "wsh", - sloppy : "strict" -}; - -exports.removed = { - nomen: true, - onevar: true, - passfail: true, - white: true, - gcl: true, - smarttabs: true, - trailing: true -}; -exports.noenforceall = { - varstmt: true, - strict: true, - regexpu: true -}; - -},{}],"/../../jshint/src/prod-params.js":[function(_dereq_,module,exports){ -module.exports = { - export: 1, - noin: 2, - initial: 4, - - preAsync: 8, - - async: 16, - tryClause: 32, - yield: 64 -}; - -},{}],"/../../jshint/src/reg.js":[function(_dereq_,module,exports){ - -"use strict"; -exports.unsafeString = - /@cc|<\/?|script|\]\s*\]|<\s*!|</i; -exports.needEsc = - /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/; - -exports.needEscGlobal = - /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; -exports.starSlash = /\*\//; -exports.identifier = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/; -exports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i; -exports.fallsThrough = /^\s*falls?\sthrough\s*$/; -exports.maxlenException = /^(?:(?:\/\/|\/\*|\*) ?)?[^ ]+$/; -exports.whitespace = /[ \f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/; - -exports.nonzeroDigit = /^[1-9]$/; - -exports.decimalDigit = /^[0-9]$/; - -exports.regexpSyntaxChars = /[\^$\\.*+?()[\]{}|]/; - -exports.regexpQuantifiers = /[*+?{]/; - -exports.regexpControlEscapes = /[fnrtv]/; - -exports.regexpCharClasses = /[dDsSwW]/; -exports.regexpDot = /(^|[^\\])(\\\\)*\./; - -},{}],"/../../jshint/src/scope-manager.js":[function(_dereq_,module,exports){ -"use strict"; - -var _ = _dereq_("underscore"); -_.slice = _dereq_("lodash.slice"); -var events = _dereq_("events"); -var marker = {}; -var scopeManager = function(state, predefined, exported, declared) { - - var _current; - var _scopeStack = []; - - function _newScope(type) { - _current = { - "(bindings)": Object.create(null), - "(usages)": Object.create(null), - "(labels)": Object.create(null), - "(parent)": _current, - "(type)": type, - "(params)": (type === "functionparams" || type === "catchparams") ? [] : null - }; - _scopeStack.push(_current); - } - - _newScope("global"); - _current["(predefined)"] = predefined; - - var _currentFunctBody = _current; // this is the block after the params = function - - var usedPredefinedAndGlobals = Object.create(null); - var impliedGlobals = Object.create(null); - var unuseds = []; - var emitter = new events.EventEmitter(); - - function warning(code, token) { - emitter.emit("warning", { - code: code, - token: token, - data: _.slice(arguments, 2) - }); - } - - function error(code, token) { - emitter.emit("warning", { - code: code, - token: token, - data: _.slice(arguments, 2) - }); - } - - function _setupUsages(bindingName) { - if (!_current["(usages)"][bindingName]) { - _current["(usages)"][bindingName] = { - "(modified)": [], - "(reassigned)": [], - "(tokens)": [] - }; - } - } - - var _getUnusedOption = function(unused_opt) { - if (unused_opt === undefined) { - unused_opt = state.option.unused; - } - - if (unused_opt === true) { - unused_opt = "last-param"; - } - - return unused_opt; - }; - - var _warnUnused = function(name, tkn, type, unused_opt) { - var line = tkn.line; - var chr = tkn.from; - var raw_name = tkn.raw_text || name; - - unused_opt = _getUnusedOption(unused_opt); - - var warnable_types = { - "vars": ["var"], - "last-param": ["var", "param"], - "strict": ["var", "param", "last-param"] - }; - - if (unused_opt) { - if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) { - warning("W098", { line: line, from: chr }, raw_name); - } - } - if (unused_opt || type === "var") { - unuseds.push({ - name: name, - line: line, - character: chr - }); - } - }; - function _checkForUnused() { - if (_current["(type)"] === "functionparams") { - _checkParams(); - return; - } - var currentBindings = _current["(bindings)"]; - for (var bindingName in currentBindings) { - if (currentBindings[bindingName]["(type)"] !== "exception" && - currentBindings[bindingName]["(unused)"]) { - _warnUnused(bindingName, currentBindings[bindingName]["(token)"], "var"); - } - } - } - function _checkParams() { - var params = _current["(params)"]; - - if (!params) { - return; - } - - var param = params.pop(); - var unused_opt; - - while (param) { - var binding = _current["(bindings)"][param]; - - unused_opt = _getUnusedOption(state.funct["(unusedOption)"]); - if (param === "undefined") - return; - - if (binding["(unused)"]) { - _warnUnused(param, binding["(token)"], "param", state.funct["(unusedOption)"]); - } else if (unused_opt === "last-param") { - return; - } - - param = params.pop(); - } - } - function _getBinding(bindingName) { - for (var i = _scopeStack.length - 1 ; i >= 0; --i) { - var scopeBindings = _scopeStack[i]["(bindings)"]; - if (scopeBindings[bindingName]) { - return scopeBindings; - } - } - } - function usedSoFarInCurrentFunction(bindingName) { - for (var i = _scopeStack.length - 1; i >= 0; i--) { - var current = _scopeStack[i]; - if (current["(usages)"][bindingName]) { - return current["(usages)"][bindingName]; - } - if (current === _currentFunctBody) { - break; - } - } - return false; - } - - function _checkOuterShadow(bindingName, token) { - if (state.option.shadow !== "outer") { - return; - } - - var isGlobal = _currentFunctBody["(type)"] === "global", - isNewFunction = _current["(type)"] === "functionparams"; - - var outsideCurrentFunction = !isGlobal; - for (var i = 0; i < _scopeStack.length; i++) { - var stackItem = _scopeStack[i]; - - if (!isNewFunction && _scopeStack[i + 1] === _currentFunctBody) { - outsideCurrentFunction = false; - } - if (outsideCurrentFunction && stackItem["(bindings)"][bindingName]) { - warning("W123", token, bindingName); - } - if (stackItem["(labels)"][bindingName]) { - warning("W123", token, bindingName); - } - } - } - - function _latedefWarning(type, bindingName, token) { - var isFunction; - - if (state.option.latedef) { - isFunction = type === "function" || type === "generator function" || - type === "async function"; - if ((state.option.latedef === true && isFunction) || !isFunction) { - warning("W003", token, bindingName); - } - } - } - - var scopeManagerInst = { - - on: function(names, listener) { - names.split(" ").forEach(function(name) { - emitter.on(name, listener); - }); - }, - - isPredefined: function(bindingName) { - return !this.has(bindingName) && _.has(_scopeStack[0]["(predefined)"], bindingName); - }, - stack: function(type) { - var previousScope = _current; - _newScope(type); - - if (!type && previousScope["(type)"] === "functionparams") { - - _current["(isFuncBody)"] = true; - _currentFunctBody = _current; - } - }, - unstack: function() { - var subScope = _scopeStack.length > 1 ? _scopeStack[_scopeStack.length - 2] : null; - var isUnstackingFunctionBody = _current === _currentFunctBody, - isUnstackingFunctionParams = _current["(type)"] === "functionparams", - isUnstackingFunctionOuter = _current["(type)"] === "functionouter"; - - var i, j, isImmutable, isFunction; - var currentUsages = _current["(usages)"]; - var currentBindings = _current["(bindings)"]; - var usedBindingNameList = Object.keys(currentUsages); - if (currentUsages.__proto__ && usedBindingNameList.indexOf("__proto__") === -1) { - usedBindingNameList.push("__proto__"); - } - - for (i = 0; i < usedBindingNameList.length; i++) { - var usedBindingName = usedBindingNameList[i]; - - var usage = currentUsages[usedBindingName]; - var usedBinding = currentBindings[usedBindingName]; - if (usedBinding) { - var usedBindingType = usedBinding["(type)"]; - isImmutable = usedBindingType === "const" || usedBindingType === "import"; - - if (usedBinding["(useOutsideOfScope)"] && !state.option.funcscope) { - var usedTokens = usage["(tokens)"]; - for (j = 0; j < usedTokens.length; j++) { - if (usedBinding["(function)"] === usedTokens[j]["(function)"]) { - error("W038", usedTokens[j], usedBindingName); - } - } - } - _current["(bindings)"][usedBindingName]["(unused)"] = false; - if (isImmutable && usage["(modified)"]) { - for (j = 0; j < usage["(modified)"].length; j++) { - error("E013", usage["(modified)"][j], usedBindingName); - } - } - - isFunction = usedBindingType === "function" || - usedBindingType === "generator function" || - usedBindingType === "async function"; - if ((isFunction || usedBindingType === "class") && usage["(reassigned)"]) { - for (j = 0; j < usage["(reassigned)"].length; j++) { - if (!usage["(reassigned)"][j].ignoreW021) { - warning("W021", usage["(reassigned)"][j], usedBindingName, usedBindingType); - } - } - } - continue; - } - - if (subScope) { - var bindingType = this.bindingtype(usedBindingName); - isImmutable = bindingType === "const" || - (bindingType === null && _scopeStack[0]["(predefined)"][usedBindingName] === false); - if (isUnstackingFunctionOuter && !isImmutable) { - if (!state.funct["(outerMutables)"]) { - state.funct["(outerMutables)"] = []; - } - state.funct["(outerMutables)"].push(usedBindingName); - } - if (!subScope["(usages)"][usedBindingName]) { - subScope["(usages)"][usedBindingName] = usage; - if (isUnstackingFunctionBody) { - subScope["(usages)"][usedBindingName]["(onlyUsedSubFunction)"] = true; - } - } else { - var subScopeUsage = subScope["(usages)"][usedBindingName]; - subScopeUsage["(modified)"] = subScopeUsage["(modified)"].concat(usage["(modified)"]); - subScopeUsage["(tokens)"] = subScopeUsage["(tokens)"].concat(usage["(tokens)"]); - subScopeUsage["(reassigned)"] = - subScopeUsage["(reassigned)"].concat(usage["(reassigned)"]); - } - } else { - if (typeof _current["(predefined)"][usedBindingName] === "boolean") { - delete declared[usedBindingName]; - usedPredefinedAndGlobals[usedBindingName] = marker; - if (_current["(predefined)"][usedBindingName] === false && usage["(reassigned)"]) { - for (j = 0; j < usage["(reassigned)"].length; j++) { - if (!usage["(reassigned)"][j].ignoreW020) { - warning("W020", usage["(reassigned)"][j]); - } - } - } - } - else { - for (j = 0; j < usage["(tokens)"].length; j++) { - var undefinedToken = usage["(tokens)"][j]; - if (!undefinedToken.forgiveUndef) { - if (state.option.undef && !undefinedToken.ignoreUndef) { - warning("W117", undefinedToken, usedBindingName); - } - if (impliedGlobals[usedBindingName]) { - impliedGlobals[usedBindingName].line.push(undefinedToken.line); - } else { - impliedGlobals[usedBindingName] = { - name: usedBindingName, - line: [undefinedToken.line] - }; - } - } - } - } - } - } - if (!subScope) { - Object.keys(declared) - .forEach(function(bindingNotUsed) { - _warnUnused(bindingNotUsed, declared[bindingNotUsed], "var"); - }); - } - if (subScope && !isUnstackingFunctionBody && - !isUnstackingFunctionParams && !isUnstackingFunctionOuter) { - var bindingNames = Object.keys(currentBindings); - for (i = 0; i < bindingNames.length; i++) { - - var defBindingName = bindingNames[i]; - var defBinding = currentBindings[defBindingName]; - - if (!defBinding["(blockscoped)"] && defBinding["(type)"] !== "exception") { - var shadowed = subScope["(bindings)"][defBindingName]; - if (shadowed) { - shadowed["(unused)"] &= defBinding["(unused)"]; - } else { - defBinding["(useOutsideOfScope)"] = - _currentFunctBody["(type)"] !== "global" && - !this.funct.has(defBindingName, { excludeCurrent: true }); - - subScope["(bindings)"][defBindingName] = defBinding; - } - - delete currentBindings[defBindingName]; - } - } - } - - _checkForUnused(); - - _scopeStack.pop(); - if (isUnstackingFunctionBody) { - _currentFunctBody = _scopeStack[_.findLastIndex(_scopeStack, function(scope) { - return scope["(isFuncBody)"] || scope["(type)"] === "global"; - })]; - } - - _current = subScope; - }, - addParam: function(bindingName, token, type) { - type = type || "param"; - - if (type === "exception") { - var previouslyDefinedBindingType = this.funct.bindingtype(bindingName); - if (previouslyDefinedBindingType && previouslyDefinedBindingType !== "exception") { - if (!state.option.node) { - warning("W002", state.tokens.next, bindingName); - } - } - - if (state.isStrict() && (bindingName === "arguments" || bindingName === "eval")) { - warning("E008", token); - } - } - if (_.has(_current["(bindings)"], bindingName)) { - _current["(bindings)"][bindingName].duplicated = true; - } else { - _checkOuterShadow(bindingName, token); - - _current["(bindings)"][bindingName] = { - "(type)" : type, - "(token)": token, - "(unused)": true }; - - _current["(params)"].push(bindingName); - } - - if (_.has(_current["(usages)"], bindingName)) { - var usage = _current["(usages)"][bindingName]; - if (usage["(onlyUsedSubFunction)"]) { - _latedefWarning(type, bindingName, token); - } else { - warning("E056", token, bindingName, type); - } - } - }, - - validateParams: function(isArrow) { - var isStrict = state.isStrict(); - var currentFunctParamScope = _currentFunctBody["(parent)"]; - var isSimple = state.funct['(hasSimpleParams)']; - var isMethod = state.funct["(method)"]; - - if (!currentFunctParamScope["(params)"]) { - return; - } - - currentFunctParamScope["(params)"].forEach(function(bindingName) { - var binding = currentFunctParamScope["(bindings)"][bindingName]; - - if (binding.duplicated) { - if (isStrict || isArrow || isMethod || !isSimple) { - warning("E011", binding["(token)"], bindingName); - } else if (state.option.shadow !== true) { - warning("W004", binding["(token)"], bindingName); - } - } - - if (isStrict && (bindingName === "arguments" || bindingName === "eval")) { - warning("E008", binding["(token)"]); - } - }); - }, - - getUsedOrDefinedGlobals: function() { - var list = Object.keys(usedPredefinedAndGlobals); - if (usedPredefinedAndGlobals.__proto__ === marker && - list.indexOf("__proto__") === -1) { - list.push("__proto__"); - } - - return list; - }, - getImpliedGlobals: function() { - var values = _.values(impliedGlobals); - var hasProto = false; - if (impliedGlobals.__proto__) { - hasProto = values.some(function(value) { - return value.name === "__proto__"; - }); - if (!hasProto) { - values.push(impliedGlobals.__proto__); - } - } - - return values; - }, - getUnuseds: function() { - return unuseds; - }, - has: function(bindingName) { - return Boolean(_getBinding(bindingName)); - }, - bindingtype: function(bindingName) { - var scopeBindings = _getBinding(bindingName); - if (scopeBindings) { - return scopeBindings[bindingName]["(type)"]; - } - return null; - }, - addExported: function(bindingName) { - var globalBindings = _scopeStack[0]["(bindings)"]; - if (_.has(declared, bindingName)) { - delete declared[bindingName]; - } else if (_.has(globalBindings, bindingName)) { - globalBindings[bindingName]["(unused)"] = false; - } else { - for (var i = 1; i < _scopeStack.length; i++) { - var scope = _scopeStack[i]; - if (!scope["(type)"]) { - if (_.has(scope["(bindings)"], bindingName) && - !scope["(bindings)"][bindingName]["(blockscoped)"]) { - scope["(bindings)"][bindingName]["(unused)"] = false; - return; - } - } else { - break; - } - } - exported[bindingName] = true; - } - }, - setExported: function(bindingName, token) { - this.block.use(bindingName, token); - }, - initialize: function(bindingName) { - if (_current["(bindings)"][bindingName]) { - _current["(bindings)"][bindingName]["(initialized)"] = true; - } - }, - addbinding: function(bindingName, opts) { - - var type = opts.type; - var token = opts.token; - var isblockscoped = type === "let" || type === "const" || - type === "class" || type === "import" || type === "generator function" || - type === "async function" || type === "async generator function"; - var ishoisted = type === "function" || type === "generator function" || - type === "async function" || type === "import"; - var isexported = (isblockscoped ? _current : _currentFunctBody)["(type)"] === "global" && - _.has(exported, bindingName); - _checkOuterShadow(bindingName, token); - - if (state.isStrict() && (bindingName === "arguments" || bindingName === "eval")) { - warning("E008", token); - } - - if (isblockscoped) { - - var declaredInCurrentScope = _current["(bindings)"][bindingName]; - if (!declaredInCurrentScope && _current === _currentFunctBody && - _current["(type)"] !== "global") { - declaredInCurrentScope = !!_currentFunctBody["(parent)"]["(bindings)"][bindingName]; - } - if (!declaredInCurrentScope && _current["(usages)"][bindingName]) { - var usage = _current["(usages)"][bindingName]; - if (usage["(onlyUsedSubFunction)"] || ishoisted) { - _latedefWarning(type, bindingName, token); - } else if (!ishoisted) { - warning("E056", token, bindingName, type); - } - } - if (declaredInCurrentScope && - (!ishoisted || (_current["(type)"] !== "global" || type === "import"))) { - warning("E011", token, bindingName); - } - else if (state.option.shadow === "outer") { - if (scopeManagerInst.funct.has(bindingName)) { - warning("W004", token, bindingName); - } - } - - scopeManagerInst.block.add( - bindingName, type, token, !isexported, opts.initialized - ); - - } else { - - var declaredInCurrentFunctionScope = scopeManagerInst.funct.has(bindingName); - if (!declaredInCurrentFunctionScope && usedSoFarInCurrentFunction(bindingName)) { - _latedefWarning(type, bindingName, token); - } - if (scopeManagerInst.funct.has(bindingName, { onlyBlockscoped: true })) { - warning("E011", token, bindingName); - } else if (state.option.shadow !== true) { - if (declaredInCurrentFunctionScope && bindingName !== "__proto__") { - if (_currentFunctBody["(type)"] !== "global") { - warning("W004", token, bindingName); - } - } - } - - scopeManagerInst.funct.add(bindingName, type, token, !isexported); - - if (_currentFunctBody["(type)"] === "global" && !state.impliedClosure()) { - usedPredefinedAndGlobals[bindingName] = marker; - } - } - }, - - funct: { - bindingtype: function(bindingName, options) { - var onlyBlockscoped = options && options.onlyBlockscoped; - var excludeParams = options && options.excludeParams; - var currentScopeIndex = _scopeStack.length - (options && options.excludeCurrent ? 2 : 1); - for (var i = currentScopeIndex; i >= 0; i--) { - var current = _scopeStack[i]; - if (current["(bindings)"][bindingName] && - (!onlyBlockscoped || current["(bindings)"][bindingName]["(blockscoped)"])) { - return current["(bindings)"][bindingName]["(type)"]; - } - var scopeCheck = excludeParams ? _scopeStack[ i - 1 ] : current; - if (scopeCheck && scopeCheck["(type)"] === "functionparams") { - return null; - } - } - return null; - }, - hasLabel: function(labelName) { - for (var i = _scopeStack.length - 1; i >= 0; i--) { - var current = _scopeStack[i]; - - if (current["(labels)"][labelName]) { - return true; - } - if (current["(type)"] === "functionparams") { - return false; - } - } - return false; - }, - has: function(bindingName, options) { - return Boolean(this.bindingtype(bindingName, options)); - }, - add: function(bindingName, type, tok, unused) { - _current["(bindings)"][bindingName] = { - "(type)" : type, - "(token)": tok, - "(blockscoped)": false, - "(function)": _currentFunctBody, - "(unused)": unused }; - } - }, - - block: { - isGlobal: function() { - return _current["(type)"] === "global"; - }, - use: function(bindingName, token) { - var paramScope = _currentFunctBody["(parent)"]; - if (paramScope && paramScope["(bindings)"][bindingName] && - paramScope["(bindings)"][bindingName]["(type)"] === "param") { - if (!scopeManagerInst.funct.has(bindingName, - { excludeParams: true, onlyBlockscoped: true })) { - paramScope["(bindings)"][bindingName]["(unused)"] = false; - } - } - - if (token && (state.ignored.W117 || state.option.undef === false)) { - token.ignoreUndef = true; - } - - _setupUsages(bindingName); - - _current["(usages)"][bindingName]["(onlyUsedSubFunction)"] = false; - - if (token) { - token["(function)"] = _currentFunctBody; - _current["(usages)"][bindingName]["(tokens)"].push(token); - } - var binding = _current["(bindings)"][bindingName]; - if (binding && binding["(blockscoped)"] && !binding["(initialized)"]) { - error("E056", token, bindingName, binding["(type)"]); - } - }, - - reassign: function(bindingName, token) { - token.ignoreW020 = state.ignored.W020; - token.ignoreW021 = state.ignored.W021; - - this.modify(bindingName, token); - - _current["(usages)"][bindingName]["(reassigned)"].push(token); - }, - - modify: function(bindingName, token) { - - _setupUsages(bindingName); - - _current["(usages)"][bindingName]["(onlyUsedSubFunction)"] = false; - _current["(usages)"][bindingName]["(modified)"].push(token); - }, - add: function(bindingName, type, tok, unused, initialized) { - _current["(bindings)"][bindingName] = { - "(type)" : type, - "(token)": tok, - "(initialized)": !!initialized, - "(blockscoped)": true, - "(unused)": unused }; - }, - - addLabel: function(labelName, opts) { - var token = opts.token; - if (scopeManagerInst.funct.hasLabel(labelName)) { - warning("E011", token, labelName); - } - else if (state.option.shadow === "outer") { - if (scopeManagerInst.funct.has(labelName)) { - warning("W004", token, labelName); - } else { - _checkOuterShadow(labelName, token); - } - } - _current["(labels)"][labelName] = token; - } - } - }; - return scopeManagerInst; -}; - -module.exports = scopeManager; - -},{"events":"/../node_modules/events/events.js","lodash.slice":"/../../jshint/node_modules/lodash.slice/index.js","underscore":"/../../jshint/node_modules/underscore/underscore.js"}],"/../../jshint/src/state.js":[function(_dereq_,module,exports){ -"use strict"; -var NameStack = _dereq_("./name-stack.js"); - -var state = { - syntax: {}, - isStrict: function() { - return this.directive["use strict"] || this.inClassBody || - this.option.module || this.option.strict === "implied"; - }, - stmtMissingStrict: function() { - if (this.option.strict === "global") { - return true; - } - - if (this.option.strict === false) { - return false; - } - - if (this.option.globalstrict) { - return true; - } - - return false; - }, - - allowsGlobalUsd: function() { - return this.option.strict === "global" || this.option.globalstrict || - this.option.module || this.impliedClosure(); - }, - impliedClosure: function() { - return this.option.node || this.option.phantom || this.option.browserify; - }, - - inMoz: function() { - return this.option.moz; - }, - inES10: function() { - return this.esVersion >= 10; - }, - inES9: function() { - return this.esVersion >= 9; - }, - inES8: function() { - return this.esVersion >= 8; - }, - inES7: function() { - return this.esVersion >= 7; - }, - inES6: function(strict) { - if (!strict && this.option.moz) { - return true; - } - - return this.esVersion >= 6; - }, - inES5: function() { - return !this.esVersion || this.esVersion >= 5 || this.option.moz; - }, - inferEsVersion: function() { - var badOpt = null; - - if (this.option.esversion) { - if (this.option.es3) { - badOpt = "es3"; - } else if (this.option.es5) { - badOpt = "es5"; - } else if (this.option.esnext) { - badOpt = "esnext"; - } - - if (badOpt) { - return badOpt; - } - - if (this.option.esversion === 2015) { - this.esVersion = 6; - } else { - this.esVersion = this.option.esversion; - } - } else if (this.option.es3) { - this.esVersion = 3; - } else if (this.option.esnext) { - this.esVersion = 6; - } - - return null; - }, - - reset: function() { - this.tokens = { - prev: null, - next: null, - curr: null - }; - - this.option = { unstable: {} }; - this.esVersion = 5; - this.funct = null; - this.ignored = {}; - this.directive = Object.create(null); - this.jsonMode = false; - this.lines = []; - this.tab = ""; - this.cache = {}; // Node.JS doesn't have Map. Sniff. - this.ignoredLines = {}; - this.forinifcheckneeded = false; - this.nameStack = new NameStack(); - this.inClassBody = false; - } -}; - -exports.state = state; - -},{"./name-stack.js":"/../../jshint/src/name-stack.js"}],"/../../jshint/src/style.js":[function(_dereq_,module,exports){ -"use strict"; - -exports.register = function(linter) { - - linter.on("Identifier", function style_scanProto(data) { - if (linter.getOption("proto")) { - return; - } - - if (data.name === "__proto__") { - linter.warn("W103", { - line: data.line, - char: data.char, - data: [ data.name, "6" ] - }); - } - }); - - linter.on("Identifier", function style_scanIterator(data) { - if (linter.getOption("iterator")) { - return; - } - - if (data.name === "__iterator__") { - linter.warn("W103", { - line: data.line, - char: data.char, - data: [ data.name ] - }); - } - }); - - linter.on("Identifier", function style_scanCamelCase(data) { - if (!linter.getOption("camelcase")) { - return; - } - - if (data.name.replace(/^_+|_+$/g, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) { - linter.warn("W106", { - line: data.line, - char: data.char, - data: [ data.name ] - }); - } - }); - - linter.on("String", function style_scanQuotes(data) { - var quotmark = linter.getOption("quotmark"); - var code; - - if (!quotmark) { - return; - } - - if (quotmark === "single" && data.quote !== "'") { - code = "W109"; - } - - if (quotmark === "double" && data.quote !== "\"") { - code = "W108"; - } - - if (quotmark === true) { - if (!linter.getCache("quotmark")) { - linter.setCache("quotmark", data.quote); - } - - if (linter.getCache("quotmark") !== data.quote) { - code = "W110"; - } - } - - if (code) { - linter.warn(code, { - line: data.line, - char: data.char, - }); - } - }); - - linter.on("Number", function style_scanNumbers(data) { - if (data.value.charAt(0) === ".") { - linter.warn("W008", { - line: data.line, - char: data.char, - data: [ data.value ] - }); - } - - if (data.value.substr(data.value.length - 1) === ".") { - linter.warn("W047", { - line: data.line, - char: data.char, - data: [ data.value ] - }); - } - - if (/^00+/.test(data.value)) { - linter.warn("W046", { - line: data.line, - char: data.char, - data: [ data.value ] - }); - } - }); - - linter.on("String", function style_scanJavaScriptURLs(data) { - var re = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i; - - if (linter.getOption("scripturl")) { - return; - } - - if (re.test(data.value)) { - linter.warn("W107", { - line: data.line, - char: data.char - }); - } - }); -}; - -},{}],"/../../jshint/src/vars.js":[function(_dereq_,module,exports){ - -"use strict"; - -exports.reservedVars = { - NaN : false, - undefined : false -}; - -exports.ecmaIdentifiers = { - 3: { - Array : false, - Boolean : false, - Date : false, - decodeURI : false, - decodeURIComponent : false, - encodeURI : false, - encodeURIComponent : false, - Error : false, - "eval" : false, - EvalError : false, - Function : false, - hasOwnProperty : false, - Infinity : false, - isFinite : false, - isNaN : false, - Math : false, - Number : false, - Object : false, - parseInt : false, - parseFloat : false, - RangeError : false, - ReferenceError : false, - RegExp : false, - String : false, - SyntaxError : false, - TypeError : false, - URIError : false - }, - 5: { - JSON : false - }, - 6: { - ArrayBuffer : false, - DataView : false, - Float32Array : false, - Float64Array : false, - Int8Array : false, - Int16Array : false, - Int32Array : false, - Map : false, - Promise : false, - Proxy : false, - Reflect : false, - Set : false, - Symbol : false, - Uint8Array : false, - Uint16Array : false, - Uint32Array : false, - Uint8ClampedArray : false, - WeakMap : false, - WeakSet : false - }, - 8: { - Atomics : false, - SharedArrayBuffer : false - } -}; - -exports.browser = { - Audio : false, - Blob : false, - addEventListener : false, // EventTarget - applicationCache : false, - atob : false, // WindowOrWorkerGlobalScope - blur : false, - btoa : false, // WindowOrWorkerGlobalScope - cancelAnimationFrame : false, - CanvasGradient : false, - CanvasPattern : false, - CanvasRenderingContext2D: false, - CSS : false, - CSSImportRule : false, - CSSGroupingRule : false, - CSSMarginRule : false, - CSSMediaRule : false, - CSSNamespaceRule : false, - CSSPageRule : false, - CSSRule : false, - CSSRuleList : false, - CSSStyleDeclaration : false, - CSSStyleRule : false, - CSSStyleSheet : false, - clearInterval : false, // WindowOrWorkerGlobalScope - clearTimeout : false, // WindowOrWorkerGlobalScope - close : false, - closed : false, - Comment : false, - CompositionEvent : false, - createImageBitmap : false, // WindowOrWorkerGlobalScope - CustomEvent : false, - DOMParser : false, - defaultStatus : false, - dispatchEvent : false, // EventTarget - Document : false, - document : false, - DocumentFragment : false, - Element : false, - ElementTimeControl : false, - Event : false, - event : false, - fetch : false, - File : false, - FileList : false, - FileReader : false, - FormData : false, - focus : false, - frames : false, - getComputedStyle : false, - Headers : false, - HTMLAnchorElement : false, - HTMLAreaElement : false, - HTMLAudioElement : false, - HTMLBaseElement : false, - HTMLBlockquoteElement: false, - HTMLBodyElement : false, - HTMLBRElement : false, - HTMLButtonElement : false, - HTMLCanvasElement : false, - HTMLCollection : false, - HTMLDataElement : false, - HTMLDataListElement : false, - HTMLDetailsElement : false, - HTMLDialogElement : false, - HTMLDirectoryElement : false, - HTMLDivElement : false, - HTMLDListElement : false, - HTMLElement : false, - HTMLEmbedElement : false, - HTMLFieldSetElement : false, - HTMLFontElement : false, - HTMLFormElement : false, - HTMLFrameElement : false, - HTMLFrameSetElement : false, - HTMLHeadElement : false, - HTMLHeadingElement : false, - HTMLHRElement : false, - HTMLHtmlElement : false, - HTMLIFrameElement : false, - HTMLImageElement : false, - HTMLInputElement : false, - HTMLIsIndexElement : false, - HTMLLabelElement : false, - HTMLLayerElement : false, - HTMLLegendElement : false, - HTMLLIElement : false, - HTMLLinkElement : false, - HTMLMapElement : false, - HTMLMarqueeElement : false, - HTMLMediaElement : false, - HTMLMenuElement : false, - HTMLMetaElement : false, - HTMLMeterElement : false, - HTMLModElement : false, - HTMLObjectElement : false, - HTMLOListElement : false, - HTMLOptGroupElement : false, - HTMLOptionElement : false, - HTMLParagraphElement : false, - HTMLParamElement : false, - HTMLPictureElement : false, - HTMLPreElement : false, - HTMLProgressElement : false, - HTMLQuoteElement : false, - HTMLScriptElement : false, - HTMLSelectElement : false, - HTMLSlotElement : false, - HTMLSourceElement : false, - HTMLStyleElement : false, - HTMLTableCaptionElement: false, - HTMLTableCellElement : false, - HTMLTableColElement : false, - HTMLTableElement : false, - HTMLTableRowElement : false, - HTMLTableSectionElement: false, - HTMLTemplateElement : false, - HTMLTextAreaElement : false, - HTMLTimeElement : false, - HTMLTitleElement : false, - HTMLTrackElement : false, - HTMLUListElement : false, - HTMLVideoElement : false, - history : false, - Image : false, - IntersectionObserver : false, - Intl : false, - length : false, - localStorage : false, - location : false, - matchMedia : false, - MediaList : false, - MediaRecorder : false, - MessageChannel : false, - MessageEvent : false, - MessagePort : false, - MouseEvent : false, - moveBy : false, - moveTo : false, - MutationObserver : false, - name : false, - Node : false, - NodeFilter : false, - NodeList : false, - Notification : false, - navigator : false, - onbeforeunload : true, - onblur : true, - onerror : true, - onfocus : true, - onload : true, - onresize : true, - onunload : true, - open : false, - openDatabase : false, - opener : false, - Option : false, - origin : false, // WindowOrWorkerGlobalScope - parent : false, - performance : false, - print : false, - queueMicrotask : false, // WindowOrWorkerGlobalScope - Range : false, - requestAnimationFrame : false, - removeEventListener : false, // EventTarget - Request : false, - resizeBy : false, - resizeTo : false, - Response : false, - screen : false, - scroll : false, - scrollBy : false, - scrollTo : false, - sessionStorage : false, - setInterval : false, // WindowOrWorkerGlobalScope - setTimeout : false, // WindowOrWorkerGlobalScope - SharedWorker : false, - status : false, - Storage : false, - StyleSheet : false, - SVGAElement : false, - SVGAltGlyphDefElement: false, - SVGAltGlyphElement : false, - SVGAltGlyphItemElement: false, - SVGAngle : false, - SVGAnimateColorElement: false, - SVGAnimateElement : false, - SVGAnimateMotionElement: false, - SVGAnimateTransformElement: false, - SVGAnimatedAngle : false, - SVGAnimatedBoolean : false, - SVGAnimatedEnumeration: false, - SVGAnimatedInteger : false, - SVGAnimatedLength : false, - SVGAnimatedLengthList: false, - SVGAnimatedNumber : false, - SVGAnimatedNumberList: false, - SVGAnimatedPathData : false, - SVGAnimatedPoints : false, - SVGAnimatedPreserveAspectRatio: false, - SVGAnimatedRect : false, - SVGAnimatedString : false, - SVGAnimatedTransformList: false, - SVGAnimationElement : false, - SVGCSSRule : false, - SVGCircleElement : false, - SVGClipPathElement : false, - SVGColor : false, - SVGColorProfileElement: false, - SVGColorProfileRule : false, - SVGComponentTransferFunctionElement: false, - SVGCursorElement : false, - SVGDefsElement : false, - SVGDescElement : false, - SVGDocument : false, - SVGElement : false, - SVGElementInstance : false, - SVGElementInstanceList: false, - SVGEllipseElement : false, - SVGExternalResourcesRequired: false, - SVGFEBlendElement : false, - SVGFEColorMatrixElement: false, - SVGFEComponentTransferElement: false, - SVGFECompositeElement: false, - SVGFEConvolveMatrixElement: false, - SVGFEDiffuseLightingElement: false, - SVGFEDisplacementMapElement: false, - SVGFEDistantLightElement: false, - SVGFEFloodElement : false, - SVGFEFuncAElement : false, - SVGFEFuncBElement : false, - SVGFEFuncGElement : false, - SVGFEFuncRElement : false, - SVGFEGaussianBlurElement: false, - SVGFEImageElement : false, - SVGFEMergeElement : false, - SVGFEMergeNodeElement: false, - SVGFEMorphologyElement: false, - SVGFEOffsetElement : false, - SVGFEPointLightElement: false, - SVGFESpecularLightingElement: false, - SVGFESpotLightElement: false, - SVGFETileElement : false, - SVGFETurbulenceElement: false, - SVGFilterElement : false, - SVGFilterPrimitiveStandardAttributes: false, - SVGFitToViewBox : false, - SVGFontElement : false, - SVGFontFaceElement : false, - SVGFontFaceFormatElement: false, - SVGFontFaceNameElement: false, - SVGFontFaceSrcElement: false, - SVGFontFaceUriElement: false, - SVGForeignObjectElement: false, - SVGGElement : false, - SVGGlyphElement : false, - SVGGlyphRefElement : false, - SVGGradientElement : false, - SVGHKernElement : false, - SVGICCColor : false, - SVGImageElement : false, - SVGLangSpace : false, - SVGLength : false, - SVGLengthList : false, - SVGLineElement : false, - SVGLinearGradientElement: false, - SVGLocatable : false, - SVGMPathElement : false, - SVGMarkerElement : false, - SVGMaskElement : false, - SVGMatrix : false, - SVGMetadataElement : false, - SVGMissingGlyphElement: false, - SVGNumber : false, - SVGNumberList : false, - SVGPaint : false, - SVGPathElement : false, - SVGPathSeg : false, - SVGPathSegArcAbs : false, - SVGPathSegArcRel : false, - SVGPathSegClosePath : false, - SVGPathSegCurvetoCubicAbs: false, - SVGPathSegCurvetoCubicRel: false, - SVGPathSegCurvetoCubicSmoothAbs: false, - SVGPathSegCurvetoCubicSmoothRel: false, - SVGPathSegCurvetoQuadraticAbs: false, - SVGPathSegCurvetoQuadraticRel: false, - SVGPathSegCurvetoQuadraticSmoothAbs: false, - SVGPathSegCurvetoQuadraticSmoothRel: false, - SVGPathSegLinetoAbs : false, - SVGPathSegLinetoHorizontalAbs: false, - SVGPathSegLinetoHorizontalRel: false, - SVGPathSegLinetoRel : false, - SVGPathSegLinetoVerticalAbs: false, - SVGPathSegLinetoVerticalRel: false, - SVGPathSegList : false, - SVGPathSegMovetoAbs : false, - SVGPathSegMovetoRel : false, - SVGPatternElement : false, - SVGPoint : false, - SVGPointList : false, - SVGPolygonElement : false, - SVGPolylineElement : false, - SVGPreserveAspectRatio: false, - SVGRadialGradientElement: false, - SVGRect : false, - SVGRectElement : false, - SVGRenderingIntent : false, - SVGSVGElement : false, - SVGScriptElement : false, - SVGSetElement : false, - SVGStopElement : false, - SVGStringList : false, - SVGStylable : false, - SVGStyleElement : false, - SVGSwitchElement : false, - SVGSymbolElement : false, - SVGTRefElement : false, - SVGTSpanElement : false, - SVGTests : false, - SVGTextContentElement: false, - SVGTextElement : false, - SVGTextPathElement : false, - SVGTextPositioningElement: false, - SVGTitleElement : false, - SVGTransform : false, - SVGTransformList : false, - SVGTransformable : false, - SVGURIReference : false, - SVGUnitTypes : false, - SVGUseElement : false, - SVGVKernElement : false, - SVGViewElement : false, - SVGViewSpec : false, - SVGZoomAndPan : false, - Text : false, - TextDecoder : false, - TextEncoder : false, - TimeEvent : false, - top : false, - URL : false, - WebGLActiveInfo : false, - WebGLBuffer : false, - WebGLContextEvent : false, - WebGLFramebuffer : false, - WebGLProgram : false, - WebGLRenderbuffer : false, - WebGLRenderingContext: false, - WebGLShader : false, - WebGLShaderPrecisionFormat: false, - WebGLTexture : false, - WebGLUniformLocation : false, - WebSocket : false, - window : false, - Window : false, - Worker : false, - XDomainRequest : false, - XMLDocument : false, - XMLHttpRequest : false, - XMLSerializer : false, - XPathEvaluator : false, - XPathException : false, - XPathExpression : false, - XPathNamespace : false, - XPathNSResolver : false, - XPathResult : false -}; - -exports.devel = { - alert : false, - confirm: false, - console: false, - Debug : false, - opera : false, - prompt : false -}; - -exports.worker = { - addEventListener : true, // EventTarget - atob : true, // WindowOrWorkerGlobalScope - btoa : true, // WindowOrWorkerGlobalScope - clearInterval : true, // WindowOrWorkerGlobalScope - clearTimeout : true, // WindowOrWorkerGlobalScope - createImageBitmap : true, // WindowOrWorkerGlobalScope - dispatchEvent : true, // EventTarget - importScripts : true, - onmessage : true, - origin : true, // WindowOrWorkerGlobalScope - postMessage : true, - queueMicrotask : true, // WindowOrWorkerGlobalScope - removeEventListener : true, // EventTarget - self : true, - setInterval : true, // WindowOrWorkerGlobalScope - setTimeout : true, // WindowOrWorkerGlobalScope - FileReaderSync : true -}; -exports.nonstandard = { - escape : false, - unescape: false -}; - -exports.couch = { - "require" : false, - respond : false, - getRow : false, - emit : false, - send : false, - start : false, - sum : false, - log : false, - exports : false, - module : false, - provides : false -}; - -exports.node = { - __filename : false, - __dirname : false, - arguments : false, - GLOBAL : false, - global : false, - module : false, - require : false, - - Buffer : true, - console : true, - exports : true, - process : true, - setTimeout : true, - clearTimeout : true, - setInterval : true, - clearInterval : true, - setImmediate : true, // v0.9.1+ - clearImmediate: true // v0.9.1+ -}; - -exports.browserify = { - __filename : false, - __dirname : false, - global : false, - module : false, - require : false, - Buffer : true, - exports : true, - process : true -}; - -exports.phantom = { - phantom : true, - require : true, - WebPage : true, - console : true, // in examples, but undocumented - exports : true // v1.7+ -}; - -exports.qunit = { - asyncTest : false, - deepEqual : false, - equal : false, - expect : false, - module : false, - notDeepEqual : false, - notEqual : false, - notOk : false, - notPropEqual : false, - notStrictEqual : false, - ok : false, - propEqual : false, - QUnit : false, - raises : false, - start : false, - stop : false, - strictEqual : false, - test : false, - "throws" : false -}; - -exports.rhino = { - arguments : false, - defineClass : false, - deserialize : false, - gc : false, - help : false, - importClass : false, - importPackage: false, - "java" : false, - load : false, - loadClass : false, - Packages : false, - print : false, - quit : false, - readFile : false, - readUrl : false, - runCommand : false, - seal : false, - serialize : false, - spawn : false, - sync : false, - toint32 : false, - version : false -}; - -exports.shelljs = { - target : false, - echo : false, - exit : false, - cd : false, - pwd : false, - ls : false, - find : false, - cp : false, - rm : false, - mv : false, - mkdir : false, - test : false, - cat : false, - sed : false, - grep : false, - which : false, - dirs : false, - pushd : false, - popd : false, - env : false, - exec : false, - chmod : false, - config : false, - error : false, - tempdir : false -}; - -exports.typed = { - ArrayBuffer : false, - ArrayBufferView : false, - DataView : false, - Float32Array : false, - Float64Array : false, - Int16Array : false, - Int32Array : false, - Int8Array : false, - Uint16Array : false, - Uint32Array : false, - Uint8Array : false, - Uint8ClampedArray : false -}; - -exports.wsh = { - ActiveXObject : true, - Enumerator : true, - GetObject : true, - ScriptEngine : true, - ScriptEngineBuildVersion : true, - ScriptEngineMajorVersion : true, - ScriptEngineMinorVersion : true, - VBArray : true, - WSH : true, - WScript : true, - XDomainRequest : true -}; - -exports.dojo = { - dojo : false, - dijit : false, - dojox : false, - define : false, - "require": false -}; - -exports.jquery = { - "$" : false, - jQuery : false -}; - -exports.mootools = { - "$" : false, - "$$" : false, - Asset : false, - Browser : false, - Chain : false, - Class : false, - Color : false, - Cookie : false, - Core : false, - Document : false, - DomReady : false, - DOMEvent : false, - DOMReady : false, - Drag : false, - Element : false, - Elements : false, - Event : false, - Events : false, - Fx : false, - Group : false, - Hash : false, - HtmlTable : false, - IFrame : false, - IframeShim : false, - InputValidator: false, - instanceOf : false, - Keyboard : false, - Locale : false, - Mask : false, - MooTools : false, - Native : false, - Options : false, - OverText : false, - Request : false, - Scroller : false, - Slick : false, - Slider : false, - Sortables : false, - Spinner : false, - Swiff : false, - Tips : false, - Type : false, - typeOf : false, - URI : false, - Window : false -}; - -exports.prototypejs = { - "$" : false, - "$$" : false, - "$A" : false, - "$F" : false, - "$H" : false, - "$R" : false, - "$break" : false, - "$continue" : false, - "$w" : false, - Abstract : false, - Ajax : false, - Class : false, - Enumerable : false, - Element : false, - Event : false, - Field : false, - Form : false, - Hash : false, - Insertion : false, - ObjectRange : false, - PeriodicalExecuter: false, - Position : false, - Prototype : false, - Selector : false, - Template : false, - Toggle : false, - Try : false, - Autocompleter : false, - Builder : false, - Control : false, - Draggable : false, - Draggables : false, - Droppables : false, - Effect : false, - Sortable : false, - SortableObserver : false, - Sound : false, - Scriptaculous : false -}; - -exports.yui = { - YUI : false, - Y : false, - YUI_config: false -}; - -exports.mocha = { - mocha : false, - describe : false, - xdescribe : false, - it : false, - xit : false, - context : false, - xcontext : false, - before : false, - after : false, - beforeEach : false, - afterEach : false, - suite : false, - test : false, - setup : false, - teardown : false, - suiteSetup : false, - suiteTeardown : false -}; - -exports.jasmine = { - jasmine : false, - describe : false, - xdescribe : false, - it : false, - xit : false, - beforeEach : false, - afterEach : false, - setFixtures : false, - loadFixtures: false, - spyOn : false, - expect : false, - runs : false, - waitsFor : false, - waits : false, - beforeAll : false, - afterAll : false, - fail : false, - fdescribe : false, - fit : false, - pending : false, - spyOnProperty: false -}; - -},{}],"/../node_modules/assert/assert.js":[function(_dereq_,module,exports){ -(function (global){ -'use strict'; - -var objectAssign = _dereq_('object-assign'); -function compare(a, b) { - if (a === b) { - return 0; - } - - var x = a.length; - var y = b.length; - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i]; - y = b[i]; - break; - } - } - - if (x < y) { - return -1; - } - if (y < x) { - return 1; - } - return 0; -} -function isBuffer(b) { - if (global.Buffer && typeof global.Buffer.isBuffer === 'function') { - return global.Buffer.isBuffer(b); - } - return !!(b != null && b._isBuffer); -} - -var util = _dereq_('util/'); -var hasOwn = Object.prototype.hasOwnProperty; -var pSlice = Array.prototype.slice; -var functionsHaveNames = (function () { - return function foo() {}.name === 'foo'; -}()); -function pToString (obj) { - return Object.prototype.toString.call(obj); -} -function isView(arrbuf) { - if (isBuffer(arrbuf)) { - return false; - } - if (typeof global.ArrayBuffer !== 'function') { - return false; - } - if (typeof ArrayBuffer.isView === 'function') { - return ArrayBuffer.isView(arrbuf); - } - if (!arrbuf) { - return false; - } - if (arrbuf instanceof DataView) { - return true; - } - if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) { - return true; - } - return false; -} - -var assert = module.exports = ok; - -var regex = /\s*function\s+([^\(\s]*)\s*/; -function getName(func) { - if (!util.isFunction(func)) { - return; - } - if (functionsHaveNames) { - return func.name; - } - var str = func.toString(); - var match = str.match(regex); - return match && match[1]; -} -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - if (options.message) { - this.message = options.message; - this.generatedMessage = false; - } else { - this.message = getMessage(this); - this.generatedMessage = true; - } - var stackStartFunction = options.stackStartFunction || fail; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } else { - var err = new Error(); - if (err.stack) { - var out = err.stack; - var fn_name = getName(stackStartFunction); - var idx = out.indexOf('\n' + fn_name); - if (idx >= 0) { - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - - this.stack = out; - } - } -}; -util.inherits(assert.AssertionError, Error); - -function truncate(s, n) { - if (typeof s === 'string') { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} -function inspect(something) { - if (functionsHaveNames || !util.isFunction(something)) { - return util.inspect(something); - } - var rawname = getName(something); - var name = rawname ? ': ' + rawname : ''; - return '[Function' + name + ']'; -} -function getMessage(self) { - return truncate(inspect(self.actual), 128) + ' ' + - self.operator + ' ' + - truncate(inspect(self.expected), 128); -} - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} -assert.fail = fail; - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected, false)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) { - if (!_deepEqual(actual, expected, true)) { - fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual); - } -}; - -function _deepEqual(actual, expected, strict, memos) { - if (actual === expected) { - return true; - } else if (isBuffer(actual) && isBuffer(expected)) { - return compare(actual, expected) === 0; - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - } else if ((actual === null || typeof actual !== 'object') && - (expected === null || typeof expected !== 'object')) { - return strict ? actual === expected : actual == expected; - } else if (isView(actual) && isView(expected) && - pToString(actual) === pToString(expected) && - !(actual instanceof Float32Array || - actual instanceof Float64Array)) { - return compare(new Uint8Array(actual.buffer), - new Uint8Array(expected.buffer)) === 0; - } else if (isBuffer(actual) !== isBuffer(expected)) { - return false; - } else { - memos = memos || {actual: [], expected: []}; - - var actualIndex = memos.actual.indexOf(actual); - if (actualIndex !== -1) { - if (actualIndex === memos.expected.indexOf(expected)) { - return true; - } - } - - memos.actual.push(actual); - memos.expected.push(expected); - - return objEquiv(actual, expected, strict, memos); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b, strict, actualVisitedObjects) { - if (a === null || a === undefined || b === null || b === undefined) - return false; - if (util.isPrimitive(a) || util.isPrimitive(b)) - return a === b; - if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) - return false; - var aIsArgs = isArguments(a); - var bIsArgs = isArguments(b); - if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) - return false; - if (aIsArgs) { - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b, strict); - } - var ka = objectKeys(a); - var kb = objectKeys(b); - var key, i; - if (ka.length !== kb.length) - return false; - ka.sort(); - kb.sort(); - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] !== kb[i]) - return false; - } - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) - return false; - } - return true; -} - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected, false)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -assert.notDeepStrictEqual = notDeepStrictEqual; -function notDeepStrictEqual(actual, expected, message) { - if (_deepEqual(actual, expected, true)) { - fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual); - } -} - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } - - try { - if (actual instanceof expected) { - return true; - } - } catch (e) { - } - - if (Error.isPrototypeOf(expected)) { - return false; - } - - return expected.call({}, actual) === true; -} - -function _tryBlock(block) { - var error; - try { - block(); - } catch (e) { - error = e; - } - return error; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (typeof block !== 'function') { - throw new TypeError('"block" argument must be a function'); - } - - if (typeof expected === 'string') { - message = expected; - expected = null; - } - - actual = _tryBlock(block); - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - var userProvidedMessage = typeof message === 'string'; - var isUnwantedException = !shouldThrow && util.isError(actual); - var isUnexpectedException = !shouldThrow && actual && !expected; - - if ((isUnwantedException && - userProvidedMessage && - expectedException(actual, expected)) || - isUnexpectedException) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws(true, block, error, message); -}; -assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) { - _throws(false, block, error, message); -}; - -assert.ifError = function(err) { if (err) throw err; }; -function strict(value, message) { - if (!value) fail(value, true, message, '==', strict); -} -assert.strict = objectAssign(strict, assert, { - equal: assert.strictEqual, - deepEqual: assert.deepStrictEqual, - notEqual: assert.notStrictEqual, - notDeepEqual: assert.notDeepStrictEqual -}); -assert.strict.strict = assert.strict; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if (hasOwn.call(obj, key)) keys.push(key); - } - return keys; -}; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"object-assign":"/../node_modules/object-assign/index.js","util/":"/../node_modules/assert/node_modules/util/util.js"}],"/../node_modules/assert/node_modules/inherits/inherits_browser.js":[function(_dereq_,module,exports){ -if (typeof Object.create === 'function') { - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -},{}],"/../node_modules/assert/node_modules/util/support/isBufferBrowser.js":[function(_dereq_,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} -},{}],"/../node_modules/assert/node_modules/util/util.js":[function(_dereq_,module,exports){ -(function (process,global){ - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; -exports.deprecate = function(fn, msg) { - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; -function inspect(obj, opts) { - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - ctx.showHidden = opts; - } else if (opts) { - exports._extend(ctx, opts); - } - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - if (ctx.customInspect && - value && - isFunction(value.inspect) && - value.inspect !== exports.inspect && - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = _dereq_('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; -exports.inherits = _dereq_('inherits'); - -exports._extend = function(origin, add) { - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":"/../node_modules/assert/node_modules/util/support/isBufferBrowser.js","_process":"/../node_modules/process/browser.js","inherits":"/../node_modules/assert/node_modules/inherits/inherits_browser.js"}],"/../node_modules/events/events.js":[function(_dereq_,module,exports){ - -var objectCreate = Object.create || objectCreatePolyfill -var objectKeys = Object.keys || objectKeysPolyfill -var bind = Function.prototype.bind || functionBindPolyfill - -function EventEmitter() { - if (!this._events || !Object.prototype.hasOwnProperty.call(this, '_events')) { - this._events = objectCreate(null); - this._eventsCount = 0; - } - - this._maxListeners = this._maxListeners || undefined; -} -module.exports = EventEmitter; -EventEmitter.EventEmitter = EventEmitter; - -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; -var defaultMaxListeners = 200; - -var hasDefineProperty; -try { - var o = {}; - if (Object.defineProperty) Object.defineProperty(o, 'x', { value: 0 }); - hasDefineProperty = o.x === 0; -} catch (err) { hasDefineProperty = false } -if (hasDefineProperty) { - Object.defineProperty(EventEmitter, 'defaultMaxListeners', { - enumerable: true, - get: function() { - return defaultMaxListeners; - }, - set: function(arg) { - if (typeof arg !== 'number' || arg < 0 || arg !== arg) - throw new TypeError('"defaultMaxListeners" must be a positive number'); - defaultMaxListeners = arg; - } - }); -} else { - EventEmitter.defaultMaxListeners = defaultMaxListeners; -} -EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { - if (typeof n !== 'number' || n < 0 || isNaN(n)) - throw new TypeError('"n" argument must be a positive number'); - this._maxListeners = n; - return this; -}; - -function $getMaxListeners(that) { - if (that._maxListeners === undefined) - return EventEmitter.defaultMaxListeners; - return that._maxListeners; -} - -EventEmitter.prototype.getMaxListeners = function getMaxListeners() { - return $getMaxListeners(this); -}; -function emitNone(handler, isFn, self) { - if (isFn) - handler.call(self); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self); - } -} -function emitOne(handler, isFn, self, arg1) { - if (isFn) - handler.call(self, arg1); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self, arg1); - } -} -function emitTwo(handler, isFn, self, arg1, arg2) { - if (isFn) - handler.call(self, arg1, arg2); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self, arg1, arg2); - } -} -function emitThree(handler, isFn, self, arg1, arg2, arg3) { - if (isFn) - handler.call(self, arg1, arg2, arg3); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].call(self, arg1, arg2, arg3); - } -} - -function emitMany(handler, isFn, self, args) { - if (isFn) - handler.apply(self, args); - else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - listeners[i].apply(self, args); - } -} - -EventEmitter.prototype.emit = function emit(type) { - var er, handler, len, args, i, events; - var doError = (type === 'error'); - - events = this._events; - if (events) - doError = (doError && events.error == null); - else if (!doError) - return false; - if (doError) { - if (arguments.length > 1) - er = arguments[1]; - if (er instanceof Error) { - throw er; // Unhandled 'error' event - } else { - var err = new Error('Unhandled "error" event. (' + er + ')'); - err.context = er; - throw err; - } - return false; - } - - handler = events[type]; - - if (!handler) - return false; - - var isFn = typeof handler === 'function'; - len = arguments.length; - switch (len) { - case 1: - emitNone(handler, isFn, this); - break; - case 2: - emitOne(handler, isFn, this, arguments[1]); - break; - case 3: - emitTwo(handler, isFn, this, arguments[1], arguments[2]); - break; - case 4: - emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]); - break; - default: - args = new Array(len - 1); - for (i = 1; i < len; i++) - args[i - 1] = arguments[i]; - emitMany(handler, isFn, this, args); - } - - return true; -}; - -function _addListener(target, type, listener, prepend) { - var m; - var events; - var existing; - - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - - events = target._events; - if (!events) { - events = target._events = objectCreate(null); - target._eventsCount = 0; - } else { - if (events.newListener) { - target.emit('newListener', type, - listener.listener ? listener.listener : listener); - events = target._events; - } - existing = events[type]; - } - - if (!existing) { - existing = events[type] = listener; - ++target._eventsCount; - } else { - if (typeof existing === 'function') { - existing = events[type] = - prepend ? [listener, existing] : [existing, listener]; - } else { - if (prepend) { - existing.unshift(listener); - } else { - existing.push(listener); - } - } - if (!existing.warned) { - m = $getMaxListeners(target); - if (m && m > 0 && existing.length > m) { - existing.warned = true; - var w = new Error('Possible EventEmitter memory leak detected. ' + - existing.length + ' "' + String(type) + '" listeners ' + - 'added. Use emitter.setMaxListeners() to ' + - 'increase limit.'); - w.name = 'MaxListenersExceededWarning'; - w.emitter = target; - w.type = type; - w.count = existing.length; - if (typeof console === 'object' && console.warn) { - console.warn('%s: %s', w.name, w.message); - } - } - } - } - - return target; -} - -EventEmitter.prototype.addListener = function addListener(type, listener) { - return _addListener(this, type, listener, false); -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.prependListener = - function prependListener(type, listener) { - return _addListener(this, type, listener, true); - }; - -function onceWrapper() { - if (!this.fired) { - this.target.removeListener(this.type, this.wrapFn); - this.fired = true; - switch (arguments.length) { - case 0: - return this.listener.call(this.target); - case 1: - return this.listener.call(this.target, arguments[0]); - case 2: - return this.listener.call(this.target, arguments[0], arguments[1]); - case 3: - return this.listener.call(this.target, arguments[0], arguments[1], - arguments[2]); - default: - var args = new Array(arguments.length); - for (var i = 0; i < args.length; ++i) - args[i] = arguments[i]; - this.listener.apply(this.target, args); - } - } -} - -function _onceWrap(target, type, listener) { - var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; - var wrapped = bind.call(onceWrapper, state); - wrapped.listener = listener; - state.wrapFn = wrapped; - return wrapped; -} - -EventEmitter.prototype.once = function once(type, listener) { - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - this.on(type, _onceWrap(this, type, listener)); - return this; -}; - -EventEmitter.prototype.prependOnceListener = - function prependOnceListener(type, listener) { - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - this.prependListener(type, _onceWrap(this, type, listener)); - return this; - }; -EventEmitter.prototype.removeListener = - function removeListener(type, listener) { - var list, events, position, i, originalListener; - - if (typeof listener !== 'function') - throw new TypeError('"listener" argument must be a function'); - - events = this._events; - if (!events) - return this; - - list = events[type]; - if (!list) - return this; - - if (list === listener || list.listener === listener) { - if (--this._eventsCount === 0) - this._events = objectCreate(null); - else { - delete events[type]; - if (events.removeListener) - this.emit('removeListener', type, list.listener || listener); - } - } else if (typeof list !== 'function') { - position = -1; - - for (i = list.length - 1; i >= 0; i--) { - if (list[i] === listener || list[i].listener === listener) { - originalListener = list[i].listener; - position = i; - break; - } - } - - if (position < 0) - return this; - - if (position === 0) - list.shift(); - else - spliceOne(list, position); - - if (list.length === 1) - events[type] = list[0]; - - if (events.removeListener) - this.emit('removeListener', type, originalListener || listener); - } - - return this; - }; - -EventEmitter.prototype.removeAllListeners = - function removeAllListeners(type) { - var listeners, events, i; - - events = this._events; - if (!events) - return this; - if (!events.removeListener) { - if (arguments.length === 0) { - this._events = objectCreate(null); - this._eventsCount = 0; - } else if (events[type]) { - if (--this._eventsCount === 0) - this._events = objectCreate(null); - else - delete events[type]; - } - return this; - } - if (arguments.length === 0) { - var keys = objectKeys(events); - var key; - for (i = 0; i < keys.length; ++i) { - key = keys[i]; - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = objectCreate(null); - this._eventsCount = 0; - return this; - } - - listeners = events[type]; - - if (typeof listeners === 'function') { - this.removeListener(type, listeners); - } else if (listeners) { - for (i = listeners.length - 1; i >= 0; i--) { - this.removeListener(type, listeners[i]); - } - } - - return this; - }; - -function _listeners(target, type, unwrap) { - var events = target._events; - - if (!events) - return []; - - var evlistener = events[type]; - if (!evlistener) - return []; - - if (typeof evlistener === 'function') - return unwrap ? [evlistener.listener || evlistener] : [evlistener]; - - return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); -} - -EventEmitter.prototype.listeners = function listeners(type) { - return _listeners(this, type, true); -}; - -EventEmitter.prototype.rawListeners = function rawListeners(type) { - return _listeners(this, type, false); -}; - -EventEmitter.listenerCount = function(emitter, type) { - if (typeof emitter.listenerCount === 'function') { - return emitter.listenerCount(type); - } else { - return listenerCount.call(emitter, type); - } -}; - -EventEmitter.prototype.listenerCount = listenerCount; -function listenerCount(type) { - var events = this._events; - - if (events) { - var evlistener = events[type]; - - if (typeof evlistener === 'function') { - return 1; - } else if (evlistener) { - return evlistener.length; - } - } - - return 0; -} - -EventEmitter.prototype.eventNames = function eventNames() { - return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; -}; -function spliceOne(list, index) { - for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) - list[i] = list[k]; - list.pop(); -} - -function arrayClone(arr, n) { - var copy = new Array(n); - for (var i = 0; i < n; ++i) - copy[i] = arr[i]; - return copy; -} - -function unwrapListeners(arr) { - var ret = new Array(arr.length); - for (var i = 0; i < ret.length; ++i) { - ret[i] = arr[i].listener || arr[i]; - } - return ret; -} - -function objectCreatePolyfill(proto) { - var F = function() {}; - F.prototype = proto; - return new F; -} -function objectKeysPolyfill(obj) { - var keys = []; - for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k)) { - keys.push(k); - } - return k; -} -function functionBindPolyfill(context) { - var fn = this; - return function () { - return fn.apply(context, arguments); - }; -} - -},{}],"/../node_modules/object-assign/index.js":[function(_dereq_,module,exports){ - -'use strict'; -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - return false; - } -} - -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; - -},{}],"/../node_modules/process/browser.js":[function(_dereq_,module,exports){ -var process = module.exports = {}; - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - return setTimeout(fun, 0); - } - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - return clearTimeout(marker); - } - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - return cachedClearTimeout(marker); - } catch (e){ - try { - return cachedClearTimeout.call(null, marker); - } catch (e){ - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; - -process.listeners = function (name) { return [] } - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],"/../node_modules/util/node_modules/inherits/inherits_browser.js":[function(_dereq_,module,exports){ -arguments[4]["/../node_modules/assert/node_modules/inherits/inherits_browser.js"][0].apply(exports,arguments) -},{}],"/../node_modules/util/support/isBufferBrowser.js":[function(_dereq_,module,exports){ -arguments[4]["/../node_modules/assert/node_modules/util/support/isBufferBrowser.js"][0].apply(exports,arguments) -},{}],"/../node_modules/util/util.js":[function(_dereq_,module,exports){ -arguments[4]["/../node_modules/assert/node_modules/util/util.js"][0].apply(exports,arguments) -},{"./support/isBuffer":"/../node_modules/util/support/isBufferBrowser.js","_process":"/../node_modules/process/browser.js","inherits":"/../node_modules/util/node_modules/inherits/inherits_browser.js"}]},{},["/../../jshint/src/jshint.js"]); - -}); - -define("ace/mode/javascript_worker",[], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var Mirror = require("../worker/mirror").Mirror; -var lint = require("./javascript/jshint").JSHINT; - -function startRegex(arr) { - return RegExp("^(" + arr.join("|") + ")"); -} - -var disabledWarningsRe = startRegex([ - "Bad for in variable '(.+)'.", - 'Missing "use strict"' -]); -var errorsRe = startRegex([ - "Unexpected", - "Expected ", - "Confusing (plus|minus)", - "\\{a\\} unterminated regular expression", - "Unclosed ", - "Unmatched ", - "Unbegun comment", - "Bad invocation", - "Missing space after", - "Missing operator at" -]); -var infoRe = startRegex([ - "Expected an assignment", - "Bad escapement of EOL", - "Unexpected comma", - "Unexpected space", - "Missing radix parameter.", - "A leading decimal point can", - "\\['{a}'\\] is better written in dot notation.", - "'{a}' used out of scope" -]); - -var JavaScriptWorker = exports.JavaScriptWorker = function(sender) { - Mirror.call(this, sender); - this.setTimeout(500); - this.setOptions(); -}; - -oop.inherits(JavaScriptWorker, Mirror); - -(function() { - this.setOptions = function(options) { - this.options = options || { - esnext: true, - moz: true, - devel: true, - browser: true, - node: true, - laxcomma: true, - laxbreak: true, - lastsemic: true, - onevar: false, - passfail: false, - maxerr: 100, - expr: true, - multistr: true, - globalstrict: true - }; - this.doc.getValue() && this.deferredUpdate.schedule(100); - }; - - this.changeOptions = function(newOptions) { - oop.mixin(this.options, newOptions); - this.doc.getValue() && this.deferredUpdate.schedule(100); - }; - - this.onUpdate = function() { - var value = this.doc.getValue(); - value = value.replace(/^#!.*\n/, "\n"); - if (!value) - return this.sender.emit("annotate", []); - - var errors = []; - lint(value, this.options, this.options.globals); - var results = lint.errors; - - var errorAdded = false; - for (var i = 0; i < results.length; i++) { - var error = results[i]; - if (!error) - continue; - var raw = error.raw; - var type = "warning"; - - if (raw == "Missing semicolon.") { - var str = error.evidence.substr(error.character); - str = str.charAt(str.search(/\S/)); - if (str && /[\w\d{(['"]/.test(str)) { - error.reason = 'Missing ";" before statement'; - type = "error"; - } else { - type = "info"; - } - } - else if (disabledWarningsRe.test(raw)) { - continue; - } - else if (infoRe.test(raw)) { - type = "info"; - } - else if (errorsRe.test(raw)) { - errorAdded = true; - type = "error"; - } - else if (raw == "'{a}' is not defined.") { - type = "warning"; - } - else if (raw == "'{a}' is defined but never used.") { - type = "info"; - } - - errors.push({ - row: error.line-1, - column: error.character-1, - text: error.reason, - type: type, - raw: raw - }); - - if (errorAdded) { - } - } - - this.sender.emit("annotate", errors); - }; - -}).call(JavaScriptWorker.prototype); - -}); diff --git a/src/ace/worker-json.js b/src/ace/worker-json.js deleted file mode 100644 index 12bddb870..000000000 --- a/src/ace/worker-json.js +++ /dev/null @@ -1,1715 +0,0 @@ -"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.data, - file: file, - line: line, - col: col, - stack: 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 = {}; -require.tlns = {}; -window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { - for (var i in topLevelNamespaces) - 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 = 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/range",[], function(require, exports, module) { -"use strict"; -var comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; -var Range = function(startRow, startColumn, endRow, endColumn) { - this.start = { - row: startRow, - column: startColumn - }; - - this.end = { - row: endRow, - column: endColumn - }; -}; - -(function() { - this.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; - }; - this.toString = function() { - return ("Range: [" + this.start.row + "/" + this.start.column + - "] -> [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.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; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.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; - } - }; - this.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; - } - }; - this.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; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.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; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.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); - } - }; - this.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); - }; - this.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); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.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); - }; - this.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 - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -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 this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - 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 - }; - } - this.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 - }); - }; - this.detach = function() { - this.document.off("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$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; - }; - -}).call(Anchor.prototype); - -}); - -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 = function(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); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.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); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.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; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.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); - }; - - this.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}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$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; - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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; - }; - this.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: ["", ""] - }); - } - }; - this.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; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.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); - } - }; - - this.$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); - } - }; - - this.$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); - }; - this.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() - }); - }; - this.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}; - }; - this.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; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -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= '0' && ch <= '9') { - string += ch; - next(); - } - if (ch === '.') { - string += '.'; - while (next() && ch >= '0' && ch <= '9') { - string += ch; - } - } - if (ch === 'e' || ch === 'E') { - string += ch; - next(); - if (ch === '-' || ch === '+') { - string += ch; - next(); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - } - number = +string; - if (isNaN(number)) { - error("Bad number"); - } else { - return number; - } - }, - - string = function () { - - var hex, - i, - string = '', - uffff; - - if (ch === '"') { - while (next()) { - if (ch === '"') { - next(); - return string; - } else if (ch === '\\') { - next(); - if (ch === 'u') { - uffff = 0; - for (i = 0; i < 4; i += 1) { - hex = parseInt(next(), 16); - if (!isFinite(hex)) { - break; - } - uffff = uffff * 16 + hex; - } - string += String.fromCharCode(uffff); - } else if (typeof escapee[ch] === 'string') { - string += escapee[ch]; - } else { - break; - } - } else if (ch == "\n" || ch == "\r") { - break; - } else { - string += ch; - } - } - } - error("Bad string"); - }, - - white = function () { - - while (ch && ch <= ' ') { - next(); - } - }, - - word = function () { - - switch (ch) { - case 't': - next('t'); - next('r'); - next('u'); - next('e'); - return true; - case 'f': - next('f'); - next('a'); - next('l'); - next('s'); - next('e'); - return false; - case 'n': - next('n'); - next('u'); - next('l'); - next('l'); - return null; - } - error("Unexpected '" + ch + "'"); - }, - - value, // Place holder for the value function. - - array = function () { - - var array = []; - - if (ch === '[') { - next('['); - white(); - if (ch === ']') { - next(']'); - return array; // empty array - } - while (ch) { - array.push(value()); - white(); - if (ch === ']') { - next(']'); - return array; - } - next(','); - white(); - } - } - error("Bad array"); - }, - - object = function () { - - var key, - object = {}; - - if (ch === '{') { - next('{'); - white(); - if (ch === '}') { - next('}'); - return object; // empty object - } - while (ch) { - key = string(); - white(); - next(':'); - if (Object.hasOwnProperty.call(object, key)) { - error('Duplicate key "' + key + '"'); - } - object[key] = value(); - white(); - if (ch === '}') { - next('}'); - return object; - } - next(','); - white(); - } - } - error("Bad object"); - }; - - value = function () { - - white(); - switch (ch) { - case '{': - return object(); - case '[': - return array(); - case '"': - return string(); - case '-': - return number(); - default: - return ch >= '0' && ch <= '9' ? number() : word(); - } - }; - - return function (source, reviver) { - var result; - - text = source; - at = 0; - ch = ' '; - result = value(); - white(); - if (ch) { - error("Syntax error"); - } - - return typeof reviver === 'function' ? function walk(holder, key) { - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - }({'': result}, '') : result; - }; -}); - -define("ace/mode/json_worker",[], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var Mirror = require("../worker/mirror").Mirror; -var parse = require("./json/json_parse"); - -var JsonWorker = exports.JsonWorker = function(sender) { - Mirror.call(this, sender); - this.setTimeout(200); -}; - -oop.inherits(JsonWorker, Mirror); - -(function() { - - this.onUpdate = function() { - var value = this.doc.getValue(); - var errors = []; - try { - if (value) - parse(value); - } catch (e) { - var pos = this.doc.indexToPosition(e.at-1); - errors.push({ - row: pos.row, - column: pos.column, - text: e.message, - type: "error" - }); - } - this.sender.emit("annotate", errors); - }; - -}).call(JsonWorker.prototype); - -}); diff --git a/src/ace/worker-lua.js b/src/ace/worker-lua.js deleted file mode 100644 index 39e2d35a2..000000000 --- a/src/ace/worker-lua.js +++ /dev/null @@ -1,3608 +0,0 @@ -"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.data, - file: file, - line: line, - col: col, - stack: 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 = {}; -require.tlns = {}; -window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { - for (var i in topLevelNamespaces) - 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 = 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/range",[], function(require, exports, module) { -"use strict"; -var comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; -var Range = function(startRow, startColumn, endRow, endColumn) { - this.start = { - row: startRow, - column: startColumn - }; - - this.end = { - row: endRow, - column: endColumn - }; -}; - -(function() { - this.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; - }; - this.toString = function() { - return ("Range: [" + this.start.row + "/" + this.start.column + - "] -> [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.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; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.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; - } - }; - this.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; - } - }; - this.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; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.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; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.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); - } - }; - this.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); - }; - this.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); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.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); - }; - this.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 - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -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 this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - 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 - }; - } - this.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 - }); - }; - this.detach = function() { - this.document.off("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$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; - }; - -}).call(Anchor.prototype); - -}); - -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 = function(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); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.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); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.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; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.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); - }; - - this.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}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$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; - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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; - }; - this.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: ["", ""] - }); - } - }; - this.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; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.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); - } - }; - - this.$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); - } - }; - - this.$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); - }; - this.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() - }); - }; - this.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}; - }; - this.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; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -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> 6) , - highMask | 0x80 | ( codepoint & 0x3f) - ); - } else if (codepoint < 0x10000) { - return String.fromCharCode( - highMask | 0xe0 | (codepoint >> 12) , - highMask | 0x80 | ((codepoint >> 6) & 0x3f), - highMask | 0x80 | ( codepoint & 0x3f) - ); - } else /* istanbul ignore else */ if (codepoint < 0x110000) { - return String.fromCharCode( - highMask | 0xf0 | (codepoint >> 18) , - highMask | 0x80 | ((codepoint >> 12) & 0x3f), - highMask | 0x80 | ((codepoint >> 6) & 0x3f), - highMask | 0x80 | ( codepoint & 0x3f) - ); - } else { - return null; - } - } - - function toHex(num, digits) { - var result = num.toString(16); - while (result.length < digits) - result = '0' + result; - return result; - } - - function checkChars(rx) { - return function (s) { - var m = rx.exec(s); - if (!m) - return s; - raise(null, errors.invalidCodeUnit, toHex(m[0].charCodeAt(0), 4).toUpperCase()); - }; - } - - var encodingModes = { - 'pseudo-latin1': { - fixup: checkChars(/[^\x00-\xff]/), - encodeByte: function (value) { - if (value === null) - return ''; - return String.fromCharCode(value); - }, - encodeUTF8: function (codepoint) { - return encodeUTF8(codepoint); - }, - }, - 'x-user-defined': { - fixup: checkChars(/[^\x00-\x7f\uf780-\uf7ff]/), - encodeByte: function (value) { - if (value === null) - return ''; - if (value >= 0x80) - return String.fromCharCode(value | 0xf700); - return String.fromCharCode(value); - }, - encodeUTF8: function (codepoint) { - return encodeUTF8(codepoint, 0xf700); - } - }, - 'none': { - discardStrings: true, - fixup: function (s) { - return s; - }, - encodeByte: function (value) { - return ''; - }, - encodeUTF8: function (codepoint) { - return ''; - } - } - }; - - var EOF = 1, StringLiteral = 2, Keyword = 4, Identifier = 8 - , NumericLiteral = 16, Punctuator = 32, BooleanLiteral = 64 - , NilLiteral = 128, VarargLiteral = 256; - - exports.tokenTypes = { EOF: EOF, StringLiteral: StringLiteral - , Keyword: Keyword, Identifier: Identifier, NumericLiteral: NumericLiteral - , Punctuator: Punctuator, BooleanLiteral: BooleanLiteral - , NilLiteral: NilLiteral, VarargLiteral: VarargLiteral - }; - - var errors = exports.errors = { - unexpected: 'unexpected %1 \'%2\' near \'%3\'' - , unexpectedEOF: 'unexpected symbol near \'\'' - , expected: '\'%1\' expected near \'%2\'' - , expectedToken: '%1 expected near \'%2\'' - , unfinishedString: 'unfinished string near \'%1\'' - , malformedNumber: 'malformed number near \'%1\'' - , decimalEscapeTooLarge: 'decimal escape too large near \'%1\'' - , invalidEscape: 'invalid escape sequence near \'%1\'' - , hexadecimalDigitExpected: 'hexadecimal digit expected near \'%1\'' - , braceExpected: 'missing \'%1\' near \'%2\'' - , tooLargeCodepoint: 'UTF-8 value too large near \'%1\'' - , unfinishedLongString: 'unfinished long string (starting at line %1) near \'%2\'' - , unfinishedLongComment: 'unfinished long comment (starting at line %1) near \'%2\'' - , ambiguousSyntax: 'ambiguous syntax (function call x new statement) near \'%1\'' - , noLoopToBreak: 'no loop to break near \'%1\'' - , labelAlreadyDefined: 'label \'%1\' already defined on line %2' - , labelNotVisible: 'no visible label \'%1\' for ' - , gotoJumpInLocalScope: ' jumps into the scope of local \'%2\'' - , cannotUseVararg: 'cannot use \'...\' outside a vararg function near \'%1\'' - , invalidCodeUnit: 'code unit U+%1 is not allowed in the current encoding mode' - }; - - var ast = exports.ast = { - labelStatement: function(label) { - return { - type: 'LabelStatement' - , label: label - }; - } - - , breakStatement: function() { - return { - type: 'BreakStatement' - }; - } - - , gotoStatement: function(label) { - return { - type: 'GotoStatement' - , label: label - }; - } - - , returnStatement: function(args) { - return { - type: 'ReturnStatement' - , 'arguments': args - }; - } - - , ifStatement: function(clauses) { - return { - type: 'IfStatement' - , clauses: clauses - }; - } - , ifClause: function(condition, body) { - return { - type: 'IfClause' - , condition: condition - , body: body - }; - } - , elseifClause: function(condition, body) { - return { - type: 'ElseifClause' - , condition: condition - , body: body - }; - } - , elseClause: function(body) { - return { - type: 'ElseClause' - , body: body - }; - } - - , whileStatement: function(condition, body) { - return { - type: 'WhileStatement' - , condition: condition - , body: body - }; - } - - , doStatement: function(body) { - return { - type: 'DoStatement' - , body: body - }; - } - - , repeatStatement: function(condition, body) { - return { - type: 'RepeatStatement' - , condition: condition - , body: body - }; - } - - , localStatement: function(variables, init) { - return { - type: 'LocalStatement' - , variables: variables - , init: init - }; - } - - , assignmentStatement: function(variables, init) { - return { - type: 'AssignmentStatement' - , variables: variables - , init: init - }; - } - - , callStatement: function(expression) { - return { - type: 'CallStatement' - , expression: expression - }; - } - - , functionStatement: function(identifier, parameters, isLocal, body) { - return { - type: 'FunctionDeclaration' - , identifier: identifier - , isLocal: isLocal - , parameters: parameters - , body: body - }; - } - - , forNumericStatement: function(variable, start, end, step, body) { - return { - type: 'ForNumericStatement' - , variable: variable - , start: start - , end: end - , step: step - , body: body - }; - } - - , forGenericStatement: function(variables, iterators, body) { - return { - type: 'ForGenericStatement' - , variables: variables - , iterators: iterators - , body: body - }; - } - - , chunk: function(body) { - return { - type: 'Chunk' - , body: body - }; - } - - , identifier: function(name) { - return { - type: 'Identifier' - , name: name - }; - } - - , literal: function(type, value, raw) { - type = (type === StringLiteral) ? 'StringLiteral' - : (type === NumericLiteral) ? 'NumericLiteral' - : (type === BooleanLiteral) ? 'BooleanLiteral' - : (type === NilLiteral) ? 'NilLiteral' - : 'VarargLiteral'; - - return { - type: type - , value: value - , raw: raw - }; - } - - , tableKey: function(key, value) { - return { - type: 'TableKey' - , key: key - , value: value - }; - } - , tableKeyString: function(key, value) { - return { - type: 'TableKeyString' - , key: key - , value: value - }; - } - , tableValue: function(value) { - return { - type: 'TableValue' - , value: value - }; - } - - - , tableConstructorExpression: function(fields) { - return { - type: 'TableConstructorExpression' - , fields: fields - }; - } - , binaryExpression: function(operator, left, right) { - var type = ('and' === operator || 'or' === operator) ? - 'LogicalExpression' : - 'BinaryExpression'; - - return { - type: type - , operator: operator - , left: left - , right: right - }; - } - , unaryExpression: function(operator, argument) { - return { - type: 'UnaryExpression' - , operator: operator - , argument: argument - }; - } - , memberExpression: function(base, indexer, identifier) { - return { - type: 'MemberExpression' - , indexer: indexer - , identifier: identifier - , base: base - }; - } - - , indexExpression: function(base, index) { - return { - type: 'IndexExpression' - , base: base - , index: index - }; - } - - , callExpression: function(base, args) { - return { - type: 'CallExpression' - , base: base - , 'arguments': args - }; - } - - , tableCallExpression: function(base, args) { - return { - type: 'TableCallExpression' - , base: base - , 'arguments': args - }; - } - - , stringCallExpression: function(base, argument) { - return { - type: 'StringCallExpression' - , base: base - , argument: argument - }; - } - - , comment: function(value, raw) { - return { - type: 'Comment' - , value: value - , raw: raw - }; - } - }; - - function finishNode(node) { - if (trackLocations) { - var location = locations.pop(); - location.complete(); - location.bless(node); - } - if (options.onCreateNode) options.onCreateNode(node); - return node; - } - - var slice = Array.prototype.slice - , toString = Object.prototype.toString - ; - - var indexOf = /* istanbul ignore next */ function (array, element) { - for (var i = 0, length = array.length; i < length; ++i) { - if (array[i] === element) return i; - } - return -1; - }; - if (Array.prototype.indexOf) - indexOf = function (array, element) { - return array.indexOf(element); - }; - - function indexOfObject(array, property, element) { - for (var i = 0, length = array.length; i < length; ++i) { - if (array[i][property] === element) return i; - } - return -1; - } - - function sprintf(format) { - var args = slice.call(arguments, 1); - format = format.replace(/%(\d)/g, function (match, index) { - return '' + args[index - 1] || /* istanbul ignore next */ ''; - }); - return format; - } - - var assign = /* istanbul ignore next */ function (dest) { - var args = slice.call(arguments, 1) - , src, prop; - - for (var i = 0, length = args.length; i < length; ++i) { - src = args[i]; - for (prop in src) - if (Object.prototype.hasOwnProperty.call(src, prop)) { - dest[prop] = src[prop]; - } - } - - return dest; - }; - if (Object.assign) - assign = Object.assign; - - exports.SyntaxError = SyntaxError; - - function fixupError(e) { - if (!Object.create) - return e; - return Object.create(e, { - 'line': { 'writable': true, value: e.line }, - 'index': { 'writable': true, value: e.index }, - 'column': { 'writable': true, value: e.column } - }); - } - - function raise(token) { - var message = sprintf.apply(null, slice.call(arguments, 1)) - , error, col; - - if (token === null || typeof token.line === 'undefined') { - col = index - lineStart + 1; - error = fixupError(new SyntaxError(sprintf('[%1:%2] %3', line, col, message))); - error.index = index; - error.line = line; - error.column = col; - } else { - col = token.range[0] - token.lineStart; - error = fixupError(new SyntaxError(sprintf('[%1:%2] %3', token.line, col, message))); - error.line = token.line; - error.index = token.range[0]; - error.column = col; - } - throw error; - } - - function tokenValue(token) { - var raw = input.slice(token.range[0], token.range[1]); - if (raw) - return raw; - return token.value; - } - - function raiseUnexpectedToken(type, token) { - raise(token, errors.expectedToken, type, tokenValue(token)); - } - - function unexpected(found) { - var near = tokenValue(lookahead); - if ('undefined' !== typeof found.type) { - var type; - switch (found.type) { - case StringLiteral: type = 'string'; break; - case Keyword: type = 'keyword'; break; - case Identifier: type = 'identifier'; break; - case NumericLiteral: type = 'number'; break; - case Punctuator: type = 'symbol'; break; - case BooleanLiteral: type = 'boolean'; break; - case NilLiteral: - return raise(found, errors.unexpected, 'symbol', 'nil', near); - case EOF: - return raise(found, errors.unexpectedEOF); - } - return raise(found, errors.unexpected, type, tokenValue(found), near); - } - return raise(found, errors.unexpected, 'symbol', found, near); - } - - var index - , token - , previousToken - , lookahead - , comments - , tokenStart - , line - , lineStart; - - exports.lex = lex; - - function lex() { - skipWhiteSpace(); - while (45 === input.charCodeAt(index) && - 45 === input.charCodeAt(index + 1)) { - scanComment(); - skipWhiteSpace(); - } - if (index >= length) return { - type : EOF - , value: '' - , line: line - , lineStart: lineStart - , range: [index, index] - }; - - var charCode = input.charCodeAt(index) - , next = input.charCodeAt(index + 1); - tokenStart = index; - if (isIdentifierStart(charCode)) return scanIdentifierOrKeyword(); - - switch (charCode) { - case 39: case 34: // '" - return scanStringLiteral(); - - case 48: case 49: case 50: case 51: case 52: case 53: - case 54: case 55: case 56: case 57: // 0-9 - return scanNumericLiteral(); - - case 46: // . - if (isDecDigit(next)) return scanNumericLiteral(); - if (46 === next) { - if (46 === input.charCodeAt(index + 2)) return scanVarargLiteral(); - return scanPunctuator('..'); - } - return scanPunctuator('.'); - - case 61: // = - if (61 === next) return scanPunctuator('=='); - return scanPunctuator('='); - - case 62: // > - if (features.bitwiseOperators) - if (62 === next) return scanPunctuator('>>'); - if (61 === next) return scanPunctuator('>='); - return scanPunctuator('>'); - - case 60: // < - if (features.bitwiseOperators) - if (60 === next) return scanPunctuator('<<'); - if (61 === next) return scanPunctuator('<='); - return scanPunctuator('<'); - - case 126: // ~ - if (61 === next) return scanPunctuator('~='); - if (!features.bitwiseOperators) - break; - return scanPunctuator('~'); - - case 58: // : - if (features.labels) - if (58 === next) return scanPunctuator('::'); - return scanPunctuator(':'); - - case 91: // [ - if (91 === next || 61 === next) return scanLongStringLiteral(); - return scanPunctuator('['); - - case 47: // / - if (features.integerDivision) - if (47 === next) return scanPunctuator('//'); - return scanPunctuator('/'); - - case 38: case 124: // & | - if (!features.bitwiseOperators) - break; - case 42: case 94: case 37: case 44: case 123: case 125: - case 93: case 40: case 41: case 59: case 35: case 45: - case 43: // * ^ % , { } ] ( ) ; # - + - return scanPunctuator(input.charAt(index)); - } - - return unexpected(input.charAt(index)); - } - - function consumeEOL() { - var charCode = input.charCodeAt(index) - , peekCharCode = input.charCodeAt(index + 1); - - if (isLineTerminator(charCode)) { - if (10 === charCode && 13 === peekCharCode) ++index; - if (13 === charCode && 10 === peekCharCode) ++index; - ++line; - lineStart = ++index; - - return true; - } - return false; - } - - function skipWhiteSpace() { - while (index < length) { - var charCode = input.charCodeAt(index); - if (isWhiteSpace(charCode)) { - ++index; - } else if (!consumeEOL()) { - break; - } - } - } - - function scanIdentifierOrKeyword() { - var value, type; - while (isIdentifierPart(input.charCodeAt(++index))); - value = encodingMode.fixup(input.slice(tokenStart, index)); - if (isKeyword(value)) { - type = Keyword; - } else if ('true' === value || 'false' === value) { - type = BooleanLiteral; - value = ('true' === value); - } else if ('nil' === value) { - type = NilLiteral; - value = null; - } else { - type = Identifier; - } - - return { - type: type - , value: value - , line: line - , lineStart: lineStart - , range: [tokenStart, index] - }; - } - - function scanPunctuator(value) { - index += value.length; - return { - type: Punctuator - , value: value - , line: line - , lineStart: lineStart - , range: [tokenStart, index] - }; - } - - function scanVarargLiteral() { - index += 3; - return { - type: VarargLiteral - , value: '...' - , line: line - , lineStart: lineStart - , range: [tokenStart, index] - }; - } - - function scanStringLiteral() { - var delimiter = input.charCodeAt(index++) - , beginLine = line - , beginLineStart = lineStart - , stringStart = index - , string = encodingMode.discardStrings ? null : '' - , charCode; - - for (;;) { - charCode = input.charCodeAt(index++); - if (delimiter === charCode) break; - if (index > length || isLineTerminator(charCode)) { - string += input.slice(stringStart, index - 1); - raise(null, errors.unfinishedString, input.slice(tokenStart, index - 1)); - } - if (92 === charCode) { // backslash - if (!encodingMode.discardStrings) { - var beforeEscape = input.slice(stringStart, index - 1); - string += encodingMode.fixup(beforeEscape); - } - var escapeValue = readEscapeSequence(); - if (!encodingMode.discardStrings) - string += escapeValue; - stringStart = index; - } - } - if (!encodingMode.discardStrings) { - string += encodingMode.encodeByte(null); - string += encodingMode.fixup(input.slice(stringStart, index - 1)); - } - - return { - type: StringLiteral - , value: string - , line: beginLine - , lineStart: beginLineStart - , lastLine: line - , lastLineStart: lineStart - , range: [tokenStart, index] - }; - } - - function scanLongStringLiteral() { - var beginLine = line - , beginLineStart = lineStart - , string = readLongString(false); - if (false === string) raise(token, errors.expected, '[', tokenValue(token)); - - return { - type: StringLiteral - , value: encodingMode.discardStrings ? null : encodingMode.fixup(string) - , line: beginLine - , lineStart: beginLineStart - , lastLine: line - , lastLineStart: lineStart - , range: [tokenStart, index] - }; - } - - function scanNumericLiteral() { - var character = input.charAt(index) - , next = input.charAt(index + 1); - - var literal = ('0' === character && 'xX'.indexOf(next || null) >= 0) ? - readHexLiteral() : readDecLiteral(); - - var foundImaginaryUnit = readImaginaryUnitSuffix() - , foundInt64Suffix = readInt64Suffix(); - - if (foundInt64Suffix && (foundImaginaryUnit || literal.hasFractionPart)) { - raise(null, errors.malformedNumber, input.slice(tokenStart, index)); - } - - return { - type: NumericLiteral - , value: literal.value - , line: line - , lineStart: lineStart - , range: [tokenStart, index] - }; - } - - function readImaginaryUnitSuffix() { - if (!features.imaginaryNumbers) return; - if ('iI'.indexOf(input.charAt(index) || null) >= 0) { - ++index; - return true; - } else { - return false; - } - } - - function readInt64Suffix() { - if (!features.integerSuffixes) return; - - if ('uU'.indexOf(input.charAt(index) || null) >= 0) { - ++index; - if ('lL'.indexOf(input.charAt(index) || null) >= 0) { - ++index; - if ('lL'.indexOf(input.charAt(index) || null) >= 0) { - ++index; - return 'ULL'; - } else { - raise(null, errors.malformedNumber, input.slice(tokenStart, index)); - } - } else { - raise(null, errors.malformedNumber, input.slice(tokenStart, index)); - } - } else if ('lL'.indexOf(input.charAt(index) || null) >= 0) { - ++index; - if ('lL'.indexOf(input.charAt(index) || null) >= 0) { - ++index; - return 'LL'; - } else { - raise(null, errors.malformedNumber, input.slice(tokenStart, index)); - } - } - } - - function readHexLiteral() { - var fraction = 0 // defaults to 0 as it gets summed - , binaryExponent = 1 // defaults to 1 as it gets multiplied - , binarySign = 1 // positive - , digit, fractionStart, exponentStart, digitStart; - - digitStart = index += 2; // Skip 0x part - if (!isHexDigit(input.charCodeAt(index))) - raise(null, errors.malformedNumber, input.slice(tokenStart, index)); - - while (isHexDigit(input.charCodeAt(index))) ++index; - digit = parseInt(input.slice(digitStart, index), 16); - var foundFraction = false; - if ('.' === input.charAt(index)) { - foundFraction = true; - fractionStart = ++index; - - while (isHexDigit(input.charCodeAt(index))) ++index; - fraction = input.slice(fractionStart, index); - fraction = (fractionStart === index) ? 0 - : parseInt(fraction, 16) / Math.pow(16, index - fractionStart); - } - var foundBinaryExponent = false; - if ('pP'.indexOf(input.charAt(index) || null) >= 0) { - foundBinaryExponent = true; - ++index; - if ('+-'.indexOf(input.charAt(index) || null) >= 0) - binarySign = ('+' === input.charAt(index++)) ? 1 : -1; - - exponentStart = index; - if (!isDecDigit(input.charCodeAt(index))) - raise(null, errors.malformedNumber, input.slice(tokenStart, index)); - - while (isDecDigit(input.charCodeAt(index))) ++index; - binaryExponent = input.slice(exponentStart, index); - binaryExponent = Math.pow(2, binaryExponent * binarySign); - } - - return { - value: (digit + fraction) * binaryExponent, - hasFractionPart: foundFraction || foundBinaryExponent - }; - } - - function readDecLiteral() { - while (isDecDigit(input.charCodeAt(index))) ++index; - var foundFraction = false; - if ('.' === input.charAt(index)) { - foundFraction = true; - ++index; - while (isDecDigit(input.charCodeAt(index))) ++index; - } - var foundExponent = false; - if ('eE'.indexOf(input.charAt(index) || null) >= 0) { - foundExponent = true; - ++index; - if ('+-'.indexOf(input.charAt(index) || null) >= 0) ++index; - if (!isDecDigit(input.charCodeAt(index))) - raise(null, errors.malformedNumber, input.slice(tokenStart, index)); - - while (isDecDigit(input.charCodeAt(index))) ++index; - } - - return { - value: parseFloat(input.slice(tokenStart, index)), - hasFractionPart: foundFraction || foundExponent - }; - } - - function readUnicodeEscapeSequence() { - var sequenceStart = index++; - - if (input.charAt(index++) !== '{') - raise(null, errors.braceExpected, '{', '\\' + input.slice(sequenceStart, index)); - if (!isHexDigit(input.charCodeAt(index))) - raise(null, errors.hexadecimalDigitExpected, '\\' + input.slice(sequenceStart, index)); - - while (input.charCodeAt(index) === 0x30) ++index; - var escStart = index; - - while (isHexDigit(input.charCodeAt(index))) { - ++index; - if (index - escStart > 6) - raise(null, errors.tooLargeCodepoint, '\\' + input.slice(sequenceStart, index)); - } - - var b = input.charAt(index++); - if (b !== '}') { - if ((b === '"') || (b === "'")) - raise(null, errors.braceExpected, '}', '\\' + input.slice(sequenceStart, index--)); - else - raise(null, errors.hexadecimalDigitExpected, '\\' + input.slice(sequenceStart, index)); - } - - var codepoint = parseInt(input.slice(escStart, index - 1) || '0', 16); - var frag = '\\' + input.slice(sequenceStart, index); - - if (codepoint > 0x10ffff) { - raise(null, errors.tooLargeCodepoint, frag); - } - - return encodingMode.encodeUTF8(codepoint, frag); - } - function readEscapeSequence() { - var sequenceStart = index; - switch (input.charAt(index)) { - case 'a': ++index; return '\x07'; - case 'n': ++index; return '\n'; - case 'r': ++index; return '\r'; - case 't': ++index; return '\t'; - case 'v': ++index; return '\x0b'; - case 'b': ++index; return '\b'; - case 'f': ++index; return '\f'; - case '\r': - case '\n': - consumeEOL(); - return '\n'; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - while (isDecDigit(input.charCodeAt(index)) && index - sequenceStart < 3) ++index; - - var frag = input.slice(sequenceStart, index); - var ddd = parseInt(frag, 10); - if (ddd > 255) { - raise(null, errors.decimalEscapeTooLarge, '\\' + ddd); - } - return encodingMode.encodeByte(ddd, '\\' + frag); - - case 'z': - if (features.skipWhitespaceEscape) { - ++index; - skipWhiteSpace(); - return ''; - } - break; - - case 'x': - if (features.hexEscapes) { - if (isHexDigit(input.charCodeAt(index + 1)) && - isHexDigit(input.charCodeAt(index + 2))) { - index += 3; - return encodingMode.encodeByte(parseInt(input.slice(sequenceStart + 1, index), 16), '\\' + input.slice(sequenceStart, index)); - } - raise(null, errors.hexadecimalDigitExpected, '\\' + input.slice(sequenceStart, index + 2)); - } - break; - - case 'u': - if (features.unicodeEscapes) - return readUnicodeEscapeSequence(); - break; - - case '\\': case '"': case "'": - return input.charAt(index++); - } - - if (features.strictEscapes) - raise(null, errors.invalidEscape, '\\' + input.slice(sequenceStart, index + 1)); - return input.charAt(index++); - } - - function scanComment() { - tokenStart = index; - index += 2; // -- - - var character = input.charAt(index) - , content = '' - , isLong = false - , commentStart = index - , lineStartComment = lineStart - , lineComment = line; - - if ('[' === character) { - content = readLongString(true); - if (false === content) content = character; - else isLong = true; - } - if (!isLong) { - while (index < length) { - if (isLineTerminator(input.charCodeAt(index))) break; - ++index; - } - if (options.comments) content = input.slice(commentStart, index); - } - - if (options.comments) { - var node = ast.comment(content, input.slice(tokenStart, index)); - if (options.locations) { - node.loc = { - start: { line: lineComment, column: tokenStart - lineStartComment } - , end: { line: line, column: index - lineStart } - }; - } - if (options.ranges) { - node.range = [tokenStart, index]; - } - if (options.onCreateNode) options.onCreateNode(node); - comments.push(node); - } - } - - function readLongString(isComment) { - var level = 0 - , content = '' - , terminator = false - , character, stringStart, firstLine = line; - - ++index; // [ - while ('=' === input.charAt(index + level)) ++level; - if ('[' !== input.charAt(index + level)) return false; - - index += level + 1; - if (isLineTerminator(input.charCodeAt(index))) consumeEOL(); - - stringStart = index; - while (index < length) { - while (isLineTerminator(input.charCodeAt(index))) consumeEOL(); - - character = input.charAt(index++); - if (']' === character) { - terminator = true; - for (var i = 0; i < level; ++i) { - if ('=' !== input.charAt(index + i)) terminator = false; - } - if (']' !== input.charAt(index + level)) terminator = false; - } - if (terminator) { - content += input.slice(stringStart, index - 1); - index += level + 1; - return content; - } - } - - raise(null, isComment ? - errors.unfinishedLongComment : - errors.unfinishedLongString, - firstLine, ''); - } - - function next() { - previousToken = token; - token = lookahead; - lookahead = lex(); - } - - function consume(value) { - if (value === token.value) { - next(); - return true; - } - return false; - } - - function expect(value) { - if (value === token.value) next(); - else raise(token, errors.expected, value, tokenValue(token)); - } - - function isWhiteSpace(charCode) { - return 9 === charCode || 32 === charCode || 0xB === charCode || 0xC === charCode; - } - - function isLineTerminator(charCode) { - return 10 === charCode || 13 === charCode; - } - - function isDecDigit(charCode) { - return charCode >= 48 && charCode <= 57; - } - - function isHexDigit(charCode) { - return (charCode >= 48 && charCode <= 57) || (charCode >= 97 && charCode <= 102) || (charCode >= 65 && charCode <= 70); - } - - function isIdentifierStart(charCode) { - if ((charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode) - return true; - if (features.extendedIdentifiers && charCode >= 128) - return true; - return false; - } - - function isIdentifierPart(charCode) { - if ((charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 48 && charCode <= 57)) - return true; - if (features.extendedIdentifiers && charCode >= 128) - return true; - return false; - } - - function isKeyword(id) { - switch (id.length) { - case 2: - return 'do' === id || 'if' === id || 'in' === id || 'or' === id; - case 3: - return 'and' === id || 'end' === id || 'for' === id || 'not' === id; - case 4: - if ('else' === id || 'then' === id) - return true; - if (features.labels && !features.contextualGoto) - return ('goto' === id); - return false; - case 5: - return 'break' === id || 'local' === id || 'until' === id || 'while' === id; - case 6: - return 'elseif' === id || 'repeat' === id || 'return' === id; - case 8: - return 'function' === id; - } - return false; - } - - function isUnary(token) { - if (Punctuator === token.type) return '#-~'.indexOf(token.value) >= 0; - if (Keyword === token.type) return 'not' === token.value; - return false; - } - - function isBlockFollow(token) { - if (EOF === token.type) return true; - if (Keyword !== token.type) return false; - switch (token.value) { - case 'else': case 'elseif': - case 'end': case 'until': - return true; - default: - return false; - } - } - var scopes - , scopeDepth - , globals; - function createScope() { - var scope = scopes[scopeDepth++].slice(); - scopes.push(scope); - if (options.onCreateScope) options.onCreateScope(); - } - function destroyScope() { - var scope = scopes.pop(); - --scopeDepth; - if (options.onDestroyScope) options.onDestroyScope(); - } - function scopeIdentifierName(name) { - if (options.onLocalDeclaration) options.onLocalDeclaration(name); - if (-1 !== indexOf(scopes[scopeDepth], name)) return; - scopes[scopeDepth].push(name); - } - function scopeIdentifier(node) { - scopeIdentifierName(node.name); - attachScope(node, true); - } - function attachScope(node, isLocal) { - if (!isLocal && -1 === indexOfObject(globals, 'name', node.name)) - globals.push(node); - - node.isLocal = isLocal; - } - function scopeHasName(name) { - return (-1 !== indexOf(scopes[scopeDepth], name)); - } - - var locations = [] - , trackLocations; - - function createLocationMarker() { - return new Marker(token); - } - - function Marker(token) { - if (options.locations) { - this.loc = { - start: { - line: token.line - , column: token.range[0] - token.lineStart - } - , end: { - line: 0 - , column: 0 - } - }; - } - if (options.ranges) this.range = [token.range[0], 0]; - } - Marker.prototype.complete = function() { - if (options.locations) { - this.loc.end.line = previousToken.lastLine || previousToken.line; - this.loc.end.column = previousToken.range[1] - (previousToken.lastLineStart || previousToken.lineStart); - } - if (options.ranges) { - this.range[1] = previousToken.range[1]; - } - }; - - Marker.prototype.bless = function (node) { - if (this.loc) { - var loc = this.loc; - node.loc = { - start: { - line: loc.start.line, - column: loc.start.column - }, - end: { - line: loc.end.line, - column: loc.end.column - } - }; - } - if (this.range) { - node.range = [ - this.range[0], - this.range[1] - ]; - } - }; - function markLocation() { - if (trackLocations) locations.push(createLocationMarker()); - } - function pushLocation(marker) { - if (trackLocations) locations.push(marker); - } - - function FullFlowContext() { - this.scopes = []; - this.pendingGotos = []; - } - - FullFlowContext.prototype.isInLoop = function () { - var i = this.scopes.length; - while (i --> 0) { - if (this.scopes[i].isLoop) - return true; - } - return false; - }; - - FullFlowContext.prototype.pushScope = function (isLoop) { - var scope = { - labels: {}, - locals: [], - deferredGotos: [], - isLoop: !!isLoop - }; - this.scopes.push(scope); - }; - - FullFlowContext.prototype.popScope = function () { - for (var i = 0; i < this.pendingGotos.length; ++i) { - var theGoto = this.pendingGotos[i]; - if (theGoto.maxDepth >= this.scopes.length) - if (--theGoto.maxDepth <= 0) - raise(theGoto.token, errors.labelNotVisible, theGoto.target); - } - - this.scopes.pop(); - }; - - FullFlowContext.prototype.addGoto = function (target, token) { - var localCounts = []; - - for (var i = 0; i < this.scopes.length; ++i) { - var scope = this.scopes[i]; - localCounts.push(scope.locals.length); - if (Object.prototype.hasOwnProperty.call(scope.labels, target)) - return; - } - - this.pendingGotos.push({ - maxDepth: this.scopes.length, - target: target, - token: token, - localCounts: localCounts - }); - }; - - FullFlowContext.prototype.addLabel = function (name, token) { - var scope = this.currentScope(); - - if (Object.prototype.hasOwnProperty.call(scope.labels, name)) { - raise(token, errors.labelAlreadyDefined, name, scope.labels[name].line); - } else { - var newGotos = []; - - for (var i = 0; i < this.pendingGotos.length; ++i) { - var theGoto = this.pendingGotos[i]; - - if (theGoto.maxDepth >= this.scopes.length && theGoto.target === name) { - if (theGoto.localCounts[this.scopes.length - 1] < scope.locals.length) { - scope.deferredGotos.push(theGoto); - } - continue; - } - - newGotos.push(theGoto); - } - - this.pendingGotos = newGotos; - } - - scope.labels[name] = { - localCount: scope.locals.length, - line: token.line - }; - }; - - FullFlowContext.prototype.addLocal = function (name, token) { - this.currentScope().locals.push({ - name: name, - token: token - }); - }; - - FullFlowContext.prototype.currentScope = function () { - return this.scopes[this.scopes.length - 1]; - }; - - FullFlowContext.prototype.raiseDeferredErrors = function () { - var scope = this.currentScope(); - var bads = scope.deferredGotos; - for (var i = 0; i < bads.length; ++i) { - var theGoto = bads[i]; - raise(theGoto.token, errors.gotoJumpInLocalScope, theGoto.target, scope.locals[theGoto.localCounts[this.scopes.length - 1]].name); - } - }; - - function LoopFlowContext() { - this.level = 0; - this.loopLevels = []; - } - - LoopFlowContext.prototype.isInLoop = function () { - return !!this.loopLevels.length; - }; - - LoopFlowContext.prototype.pushScope = function (isLoop) { - ++this.level; - if (isLoop) - this.loopLevels.push(this.level); - }; - - LoopFlowContext.prototype.popScope = function () { - var levels = this.loopLevels; - var levlen = levels.length; - if (levlen) { - if (levels[levlen - 1] === this.level) - levels.pop(); - } - --this.level; - }; - - LoopFlowContext.prototype.addGoto = - LoopFlowContext.prototype.addLabel = - function () { throw new Error('This should never happen'); }; - - LoopFlowContext.prototype.addLocal = - LoopFlowContext.prototype.raiseDeferredErrors = - function () {}; - - function makeFlowContext() { - return features.labels ? new FullFlowContext() : new LoopFlowContext(); - } - - function parseChunk() { - next(); - markLocation(); - if (options.scope) createScope(); - var flowContext = makeFlowContext(); - flowContext.allowVararg = true; - flowContext.pushScope(); - var body = parseBlock(flowContext); - flowContext.popScope(); - if (options.scope) destroyScope(); - if (EOF !== token.type) unexpected(token); - if (trackLocations && !body.length) previousToken = token; - return finishNode(ast.chunk(body)); - } - - function parseBlock(flowContext) { - var block = [] - , statement; - - while (!isBlockFollow(token)) { - if ('return' === token.value || (!features.relaxedBreak && 'break' === token.value)) { - block.push(parseStatement(flowContext)); - break; - } - statement = parseStatement(flowContext); - consume(';'); - if (statement) block.push(statement); - } - return block; - } - - function parseStatement(flowContext) { - markLocation(); - - if (Punctuator === token.type) { - if (consume('::')) return parseLabelStatement(flowContext); - } - if (features.emptyStatement) { - if (consume(';')) { - if (trackLocations) locations.pop(); - return; - } - } - - flowContext.raiseDeferredErrors(); - - if (Keyword === token.type) { - switch (token.value) { - case 'local': next(); return parseLocalStatement(flowContext); - case 'if': next(); return parseIfStatement(flowContext); - case 'return': next(); return parseReturnStatement(flowContext); - case 'function': next(); - var name = parseFunctionName(); - return parseFunctionDeclaration(name); - case 'while': next(); return parseWhileStatement(flowContext); - case 'for': next(); return parseForStatement(flowContext); - case 'repeat': next(); return parseRepeatStatement(flowContext); - case 'break': next(); - if (!flowContext.isInLoop()) - raise(token, errors.noLoopToBreak, token.value); - return parseBreakStatement(); - case 'do': next(); return parseDoStatement(flowContext); - case 'goto': next(); return parseGotoStatement(flowContext); - } - } - - if (features.contextualGoto && - token.type === Identifier && token.value === 'goto' && - lookahead.type === Identifier && lookahead.value !== 'goto') { - next(); return parseGotoStatement(flowContext); - } - if (trackLocations) locations.pop(); - - return parseAssignmentOrCallStatement(flowContext); - } - - function parseLabelStatement(flowContext) { - var nameToken = token - , label = parseIdentifier(); - - if (options.scope) { - scopeIdentifierName('::' + nameToken.value + '::'); - attachScope(label, true); - } - - expect('::'); - - flowContext.addLabel(nameToken.value, nameToken); - return finishNode(ast.labelStatement(label)); - } - - function parseBreakStatement() { - return finishNode(ast.breakStatement()); - } - - function parseGotoStatement(flowContext) { - var name = token.value - , gotoToken = previousToken - , label = parseIdentifier(); - - flowContext.addGoto(name, gotoToken); - return finishNode(ast.gotoStatement(label)); - } - - function parseDoStatement(flowContext) { - if (options.scope) createScope(); - flowContext.pushScope(); - var body = parseBlock(flowContext); - flowContext.popScope(); - if (options.scope) destroyScope(); - expect('end'); - return finishNode(ast.doStatement(body)); - } - - function parseWhileStatement(flowContext) { - var condition = parseExpectedExpression(flowContext); - expect('do'); - if (options.scope) createScope(); - flowContext.pushScope(true); - var body = parseBlock(flowContext); - flowContext.popScope(); - if (options.scope) destroyScope(); - expect('end'); - return finishNode(ast.whileStatement(condition, body)); - } - - function parseRepeatStatement(flowContext) { - if (options.scope) createScope(); - flowContext.pushScope(true); - var body = parseBlock(flowContext); - expect('until'); - flowContext.raiseDeferredErrors(); - var condition = parseExpectedExpression(flowContext); - flowContext.popScope(); - if (options.scope) destroyScope(); - return finishNode(ast.repeatStatement(condition, body)); - } - - function parseReturnStatement(flowContext) { - var expressions = []; - - if ('end' !== token.value) { - var expression = parseExpression(flowContext); - if (null != expression) expressions.push(expression); - while (consume(',')) { - expression = parseExpectedExpression(flowContext); - expressions.push(expression); - } - consume(';'); // grammar tells us ; is optional here. - } - return finishNode(ast.returnStatement(expressions)); - } - - function parseIfStatement(flowContext) { - var clauses = [] - , condition - , body - , marker; - if (trackLocations) { - marker = locations[locations.length - 1]; - locations.push(marker); - } - condition = parseExpectedExpression(flowContext); - expect('then'); - if (options.scope) createScope(); - flowContext.pushScope(); - body = parseBlock(flowContext); - flowContext.popScope(); - if (options.scope) destroyScope(); - clauses.push(finishNode(ast.ifClause(condition, body))); - - if (trackLocations) marker = createLocationMarker(); - while (consume('elseif')) { - pushLocation(marker); - condition = parseExpectedExpression(flowContext); - expect('then'); - if (options.scope) createScope(); - flowContext.pushScope(); - body = parseBlock(flowContext); - flowContext.popScope(); - if (options.scope) destroyScope(); - clauses.push(finishNode(ast.elseifClause(condition, body))); - if (trackLocations) marker = createLocationMarker(); - } - - if (consume('else')) { - if (trackLocations) { - marker = new Marker(previousToken); - locations.push(marker); - } - if (options.scope) createScope(); - flowContext.pushScope(); - body = parseBlock(flowContext); - flowContext.popScope(); - if (options.scope) destroyScope(); - clauses.push(finishNode(ast.elseClause(body))); - } - - expect('end'); - return finishNode(ast.ifStatement(clauses)); - } - - function parseForStatement(flowContext) { - var variable = parseIdentifier() - , body; - - if (options.scope) { - createScope(); - scopeIdentifier(variable); - } - if (consume('=')) { - var start = parseExpectedExpression(flowContext); - expect(','); - var end = parseExpectedExpression(flowContext); - var step = consume(',') ? parseExpectedExpression(flowContext) : null; - - expect('do'); - flowContext.pushScope(true); - body = parseBlock(flowContext); - flowContext.popScope(); - expect('end'); - if (options.scope) destroyScope(); - - return finishNode(ast.forNumericStatement(variable, start, end, step, body)); - } - else { - var variables = [variable]; - while (consume(',')) { - variable = parseIdentifier(); - if (options.scope) scopeIdentifier(variable); - variables.push(variable); - } - expect('in'); - var iterators = []; - do { - var expression = parseExpectedExpression(flowContext); - iterators.push(expression); - } while (consume(',')); - - expect('do'); - flowContext.pushScope(true); - body = parseBlock(flowContext); - flowContext.popScope(); - expect('end'); - if (options.scope) destroyScope(); - - return finishNode(ast.forGenericStatement(variables, iterators, body)); - } - } - - function parseLocalStatement(flowContext) { - var name - , declToken = previousToken; - - if (Identifier === token.type) { - var variables = [] - , init = []; - - do { - name = parseIdentifier(); - - variables.push(name); - flowContext.addLocal(name.name, declToken); - } while (consume(',')); - - if (consume('=')) { - do { - var expression = parseExpectedExpression(flowContext); - init.push(expression); - } while (consume(',')); - } - if (options.scope) { - for (var i = 0, l = variables.length; i < l; ++i) { - scopeIdentifier(variables[i]); - } - } - - return finishNode(ast.localStatement(variables, init)); - } - if (consume('function')) { - name = parseIdentifier(); - flowContext.addLocal(name.name, declToken); - - if (options.scope) { - scopeIdentifier(name); - createScope(); - } - return parseFunctionDeclaration(name, true); - } else { - raiseUnexpectedToken('', token); - } - } - - function parseAssignmentOrCallStatement(flowContext) { - var previous = token - , marker, startMarker; - var lvalue, base, name; - - var targets = []; - - if (trackLocations) startMarker = createLocationMarker(); - - do { - if (trackLocations) marker = createLocationMarker(); - - if (Identifier === token.type) { - name = token.value; - base = parseIdentifier(); - if (options.scope) attachScope(base, scopeHasName(name)); - lvalue = true; - } else if ('(' === token.value) { - next(); - base = parseExpectedExpression(flowContext); - expect(')'); - lvalue = false; - } else { - return unexpected(token); - } - - both: for (;;) { - var newBase; - - switch (StringLiteral === token.type ? '"' : token.value) { - case '.': - case '[': - lvalue = true; - break; - case ':': - case '(': - case '{': - case '"': - lvalue = null; - break; - default: - break both; - } - - base = parsePrefixExpressionPart(base, marker, flowContext); - } - - targets.push(base); - - if (',' !== token.value) - break; - - if (!lvalue) { - return unexpected(token); - } - - next(); - } while (true); - - if (targets.length === 1 && lvalue === null) { - pushLocation(marker); - return finishNode(ast.callStatement(targets[0])); - } else if (!lvalue) { - return unexpected(token); - } - - expect('='); - - var values = []; - - do { - values.push(parseExpectedExpression(flowContext)); - } while (consume(',')); - - pushLocation(startMarker); - return finishNode(ast.assignmentStatement(targets, values)); - } - - function parseIdentifier() { - markLocation(); - var identifier = token.value; - if (Identifier !== token.type) raiseUnexpectedToken('', token); - next(); - return finishNode(ast.identifier(identifier)); - } - - function parseFunctionDeclaration(name, isLocal) { - var flowContext = makeFlowContext(); - flowContext.pushScope(); - - var parameters = []; - expect('('); - if (!consume(')')) { - while (true) { - if (Identifier === token.type) { - var parameter = parseIdentifier(); - if (options.scope) scopeIdentifier(parameter); - - parameters.push(parameter); - - if (consume(',')) continue; - } - else if (VarargLiteral === token.type) { - flowContext.allowVararg = true; - parameters.push(parsePrimaryExpression(flowContext)); - } else { - raiseUnexpectedToken(' or \'...\'', token); - } - expect(')'); - break; - } - } - - var body = parseBlock(flowContext); - flowContext.popScope(); - expect('end'); - if (options.scope) destroyScope(); - - isLocal = isLocal || false; - return finishNode(ast.functionStatement(name, parameters, isLocal, body)); - } - - function parseFunctionName() { - var base, name, marker; - - if (trackLocations) marker = createLocationMarker(); - base = parseIdentifier(); - - if (options.scope) { - attachScope(base, scopeHasName(base.name)); - createScope(); - } - - while (consume('.')) { - pushLocation(marker); - name = parseIdentifier(); - base = finishNode(ast.memberExpression(base, '.', name)); - } - - if (consume(':')) { - pushLocation(marker); - name = parseIdentifier(); - base = finishNode(ast.memberExpression(base, ':', name)); - if (options.scope) scopeIdentifierName('self'); - } - - return base; - } - - function parseTableConstructor(flowContext) { - var fields = [] - , key, value; - - while (true) { - markLocation(); - if (Punctuator === token.type && consume('[')) { - key = parseExpectedExpression(flowContext); - expect(']'); - expect('='); - value = parseExpectedExpression(flowContext); - fields.push(finishNode(ast.tableKey(key, value))); - } else if (Identifier === token.type) { - if ('=' === lookahead.value) { - key = parseIdentifier(); - next(); - value = parseExpectedExpression(flowContext); - fields.push(finishNode(ast.tableKeyString(key, value))); - } else { - value = parseExpectedExpression(flowContext); - fields.push(finishNode(ast.tableValue(value))); - } - } else { - if (null == (value = parseExpression(flowContext))) { - locations.pop(); - break; - } - fields.push(finishNode(ast.tableValue(value))); - } - if (',;'.indexOf(token.value) >= 0) { - next(); - continue; - } - break; - } - expect('}'); - return finishNode(ast.tableConstructorExpression(fields)); - } - - function parseExpression(flowContext) { - var expression = parseSubExpression(0, flowContext); - return expression; - } - - function parseExpectedExpression(flowContext) { - var expression = parseExpression(flowContext); - if (null == expression) raiseUnexpectedToken('', token); - else return expression; - } - - function binaryPrecedence(operator) { - var charCode = operator.charCodeAt(0) - , length = operator.length; - - if (1 === length) { - switch (charCode) { - case 94: return 12; // ^ - case 42: case 47: case 37: return 10; // * / % - case 43: case 45: return 9; // + - - case 38: return 6; // & - case 126: return 5; // ~ - case 124: return 4; // | - case 60: case 62: return 3; // < > - } - } else if (2 === length) { - switch (charCode) { - case 47: return 10; // // - case 46: return 8; // .. - case 60: case 62: - if('<<' === operator || '>>' === operator) return 7; // << >> - return 3; // <= >= - case 61: case 126: return 3; // == ~= - case 111: return 1; // or - } - } else if (97 === charCode && 'and' === operator) return 2; - return 0; - } - - function parseSubExpression(minPrecedence, flowContext) { - var operator = token.value - , expression, marker; - - if (trackLocations) marker = createLocationMarker(); - if (isUnary(token)) { - markLocation(); - next(); - var argument = parseSubExpression(10, flowContext); - if (argument == null) raiseUnexpectedToken('', token); - expression = finishNode(ast.unaryExpression(operator, argument)); - } - if (null == expression) { - expression = parsePrimaryExpression(flowContext); - if (null == expression) { - expression = parsePrefixExpression(flowContext); - } - } - if (null == expression) return null; - - var precedence; - while (true) { - operator = token.value; - - precedence = (Punctuator === token.type || Keyword === token.type) ? - binaryPrecedence(operator) : 0; - - if (precedence === 0 || precedence <= minPrecedence) break; - if ('^' === operator || '..' === operator) --precedence; - next(); - var right = parseSubExpression(precedence, flowContext); - if (null == right) raiseUnexpectedToken('', token); - if (trackLocations) locations.push(marker); - expression = finishNode(ast.binaryExpression(operator, expression, right)); - - } - return expression; - } - - function parsePrefixExpressionPart(base, marker, flowContext) { - var expression, identifier; - - if (Punctuator === token.type) { - switch (token.value) { - case '[': - pushLocation(marker); - next(); - expression = parseExpectedExpression(flowContext); - expect(']'); - return finishNode(ast.indexExpression(base, expression)); - case '.': - pushLocation(marker); - next(); - identifier = parseIdentifier(); - return finishNode(ast.memberExpression(base, '.', identifier)); - case ':': - pushLocation(marker); - next(); - identifier = parseIdentifier(); - base = finishNode(ast.memberExpression(base, ':', identifier)); - pushLocation(marker); - return parseCallExpression(base, flowContext); - case '(': case '{': // args - pushLocation(marker); - return parseCallExpression(base, flowContext); - } - } else if (StringLiteral === token.type) { - pushLocation(marker); - return parseCallExpression(base, flowContext); - } - - return null; - } - - function parsePrefixExpression(flowContext) { - var base, name, marker; - - if (trackLocations) marker = createLocationMarker(); - if (Identifier === token.type) { - name = token.value; - base = parseIdentifier(); - if (options.scope) attachScope(base, scopeHasName(name)); - } else if (consume('(')) { - base = parseExpectedExpression(flowContext); - expect(')'); - } else { - return null; - } - for (;;) { - var newBase = parsePrefixExpressionPart(base, marker, flowContext); - if (newBase === null) - break; - base = newBase; - } - - return base; - } - - function parseCallExpression(base, flowContext) { - if (Punctuator === token.type) { - switch (token.value) { - case '(': - if (!features.emptyStatement) { - if (token.line !== previousToken.line) - raise(null, errors.ambiguousSyntax, token.value); - } - next(); - var expressions = []; - var expression = parseExpression(flowContext); - if (null != expression) expressions.push(expression); - while (consume(',')) { - expression = parseExpectedExpression(flowContext); - expressions.push(expression); - } - - expect(')'); - return finishNode(ast.callExpression(base, expressions)); - - case '{': - markLocation(); - next(); - var table = parseTableConstructor(flowContext); - return finishNode(ast.tableCallExpression(base, table)); - } - } else if (StringLiteral === token.type) { - return finishNode(ast.stringCallExpression(base, parsePrimaryExpression(flowContext))); - } - - raiseUnexpectedToken('function arguments', token); - } - - function parsePrimaryExpression(flowContext) { - var literals = StringLiteral | NumericLiteral | BooleanLiteral | NilLiteral | VarargLiteral - , value = token.value - , type = token.type - , marker; - - if (trackLocations) marker = createLocationMarker(); - - if (type === VarargLiteral && !flowContext.allowVararg) { - raise(token, errors.cannotUseVararg, token.value); - } - - if (type & literals) { - pushLocation(marker); - var raw = input.slice(token.range[0], token.range[1]); - next(); - return finishNode(ast.literal(type, value, raw)); - } else if (Keyword === type && 'function' === value) { - pushLocation(marker); - next(); - if (options.scope) createScope(); - return parseFunctionDeclaration(null); - } else if (consume('{')) { - pushLocation(marker); - return parseTableConstructor(flowContext); - } - } - - exports.parse = parse; - - var versionFeatures = { - '5.1': { - }, - '5.2': { - labels: true, - emptyStatement: true, - hexEscapes: true, - skipWhitespaceEscape: true, - strictEscapes: true, - relaxedBreak: true - }, - '5.3': { - labels: true, - emptyStatement: true, - hexEscapes: true, - skipWhitespaceEscape: true, - strictEscapes: true, - unicodeEscapes: true, - bitwiseOperators: true, - integerDivision: true, - relaxedBreak: true - }, - 'LuaJIT': { - labels: true, - contextualGoto: true, - hexEscapes: true, - skipWhitespaceEscape: true, - strictEscapes: true, - unicodeEscapes: true, - imaginaryNumbers: true, - integerSuffixes: true - } - }; - - function parse(_input, _options) { - if ('undefined' === typeof _options && 'object' === typeof _input) { - _options = _input; - _input = undefined; - } - if (!_options) _options = {}; - - input = _input || ''; - options = assign({}, defaultOptions, _options); - index = 0; - line = 1; - lineStart = 0; - length = input.length; - scopes = [[]]; - scopeDepth = 0; - globals = []; - locations = []; - - if (!Object.prototype.hasOwnProperty.call(versionFeatures, options.luaVersion)) { - throw new Error(sprintf("Lua version '%1' not supported", options.luaVersion)); - } - - features = assign({}, versionFeatures[options.luaVersion]); - if (options.extendedIdentifiers !== void 0) - features.extendedIdentifiers = !!options.extendedIdentifiers; - - if (!Object.prototype.hasOwnProperty.call(encodingModes, options.encodingMode)) { - throw new Error(sprintf("Encoding mode '%1' not supported", options.encodingMode)); - } - - encodingMode = encodingModes[options.encodingMode]; - - if (options.comments) comments = []; - if (!options.wait) return end(); - return exports; - } - exports.write = write; - - function write(_input) { - input += String(_input); - length = input.length; - return exports; - } - exports.end = end; - - function end(_input) { - if ('undefined' !== typeof _input) write(_input); - if (input && input.substr(0, 2) === '#!') input = input.replace(/^.*/, function (line) { - return line.replace(/./g, ' '); - }); - - length = input.length; - trackLocations = options.locations || options.ranges; - lookahead = lex(); - - var chunk = parseChunk(); - if (options.comments) chunk.comments = comments; - if (options.scope) chunk.globals = globals; - if (locations.length > 0) - throw new Error('Location tracking failed. This is most likely a bug in luaparse'); - - return chunk; - } - -})); - -}); - -define("ace/mode/lua_worker",[], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var Mirror = require("../worker/mirror").Mirror; -var luaparse = require("../mode/lua/luaparse"); - -var Worker = exports.Worker = function(sender) { - Mirror.call(this, sender); - this.setTimeout(500); -}; - -oop.inherits(Worker, Mirror); - -(function() { - - this.onUpdate = function() { - var value = this.doc.getValue(); - var errors = []; - try { - luaparse.parse(value); - } catch(e) { - if (e instanceof luaparse.SyntaxError) { - errors.push({ - row: e.line - 1, - column: e.column, - text: e.message, - type: "error" - }); - } - } - this.sender.emit("annotate", errors); - }; - -}).call(Worker.prototype); - -}); diff --git a/src/ace/worker-php.js b/src/ace/worker-php.js deleted file mode 100644 index 099101d1a..000000000 --- a/src/ace/worker-php.js +++ /dev/null @@ -1,3687 +0,0 @@ -"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.data, - file: file, - line: line, - col: col, - stack: 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 = {}; -require.tlns = {}; -window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { - for (var i in topLevelNamespaces) - 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 = 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/range",[], function(require, exports, module) { -"use strict"; -var comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; -var Range = function(startRow, startColumn, endRow, endColumn) { - this.start = { - row: startRow, - column: startColumn - }; - - this.end = { - row: endRow, - column: endColumn - }; -}; - -(function() { - this.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; - }; - this.toString = function() { - return ("Range: [" + this.start.row + "/" + this.start.column + - "] -> [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.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; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.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; - } - }; - this.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; - } - }; - this.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; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.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; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.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); - } - }; - this.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); - }; - this.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); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.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); - }; - this.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 - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -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 this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - 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 - }; - } - this.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 - }); - }; - this.detach = function() { - this.document.off("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$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; - }; - -}).call(Anchor.prototype); - -}); - -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 = function(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); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.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); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.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; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.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); - }; - - this.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}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$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; - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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); - }; - this.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; - }; - this.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: ["", ""] - }); - } - }; - this.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; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.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); - } - }; - - this.$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); - } - }; - - this.$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); - }; - this.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() - }); - }; - this.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}; - }; - this.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; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -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)/i - : /^(\<\?php(?:\r\n|[ \t\r\n])|\; + + $script.onerror = (error) => { + reject( + new Error( + `Failed to load script for plugin ${pluginId}: ${error.message || error}`, + ), + ); + }; + + $script.onload = async () => { + const $page = Page("Plugin"); + $page.show = () => { + actionStack.push({ + id: pluginId, + action: $page.hide, + }); + + app.append($page); + }; + + $page.onhide = function () { + actionStack.remove(pluginId); + }; + + try { + if (!(await fsOperation(cacheFile).exists())) { + await fsOperation(CACHE_STORAGE).createFile(pluginId); + } + + await acode.initPlugin(pluginId, baseUrl, $page, { + cacheFileUrl: await helpers.toInternalUri(cacheFile), + cacheFile: fsOperation(cacheFile), + firstInit: justInstalled, + }); + + resolve(); + } catch (error) { + reject(error); + } + }; + + document.head.append($script); + }); +} diff --git a/src/lib/loadPlugins.js b/src/lib/loadPlugins.js new file mode 100644 index 000000000..482909c8b --- /dev/null +++ b/src/lib/loadPlugins.js @@ -0,0 +1,151 @@ +import fsOperation from "../fileSystem"; +import Url from "../utils/Url"; +import loadPlugin from "./loadPlugin"; +import settings from "./settings"; + +// theme-related keywords for determining theme plugins +const THEME_IDENTIFIERS = new Set([ + "theme", + "catppuccin", + "pine", + "githubdark", + "radiant", + "rdtheme", + "ayumirage", + "dust", + "synthwave", + "dragon", + "mint", + "monokai", + "lumina_code", + "sweet", + "moonlight", + "bluloco", + "acode.plugin.extra_syntax_highlights", +]); + +export const onPluginLoadCallback = Symbol("onPluginLoadCallback"); +export const onPluginsLoadCompleteCallback = Symbol( + "onPluginsLoadCompleteCallback", +); + +export const LOADED_PLUGINS = new Set(); +export const BROKEN_PLUGINS = new Map(); + +export default async function loadPlugins(loadOnlyTheme = false) { + const plugins = await fsOperation(PLUGIN_DIR).lsDir(); + const results = []; + const failedPlugins = []; + + if (plugins.length > 0) { + toast(strings["loading plugins"]); + } + + let pluginsToLoad = []; + const currentTheme = settings.value.appTheme; + const enabledMap = settings.value.pluginsDisabled || {}; + + if (loadOnlyTheme) { + // Only load theme plugins matching current theme + pluginsToLoad = plugins.filter((pluginDir) => { + const pluginId = Url.basename(pluginDir.url); + // Skip already loaded and plugins that were previously marked broken + return ( + isThemePlugin(pluginId) && + !LOADED_PLUGINS.has(pluginId) && + !BROKEN_PLUGINS.has(pluginId) + ); + }); + } else { + // Load non-theme plugins that aren't loaded yet and are enabled + pluginsToLoad = plugins.filter((pluginDir) => { + const pluginId = Url.basename(pluginDir.url); + // Skip theme plugins, already loaded, disabled or previously marked broken + return ( + !isThemePlugin(pluginId) && + !LOADED_PLUGINS.has(pluginId) && + enabledMap[pluginId] !== true && + !BROKEN_PLUGINS.has(pluginId) + ); + }); + } + + // Load plugins concurrently + const LOAD_TIMEOUT = 15000; // ms per plugin + const loadPromises = pluginsToLoad.map(async (pluginDir) => { + const pluginId = Url.basename(pluginDir.url); + + if (loadOnlyTheme && currentTheme) { + const pluginIdLower = pluginId.toLowerCase(); + const currentThemeLower = currentTheme.toLowerCase(); + const matchFound = pluginIdLower.includes(currentThemeLower); + // Skip if: + // 1. No match found with current theme AND + // 2. It's not a theme plugin at all + if (!matchFound && !isThemePlugin(pluginId)) { + return; + } + } + + try { + // ensure loadPlugin doesn't hang: timeout wrapper + await Promise.race([ + loadPlugin(pluginId), + new Promise((_, rej) => + setTimeout(() => rej(new Error("Plugin load timeout")), LOAD_TIMEOUT), + ), + ]); + LOADED_PLUGINS.add(pluginId); + + acode[onPluginLoadCallback](pluginId); + + results.push(true); + // clear broken mark if present + if (BROKEN_PLUGINS.has(pluginId)) { + BROKEN_PLUGINS.delete(pluginId); + } + } catch (error) { + console.error(`Error loading plugin ${pluginId}:`, error); + // mark plugin as broken to avoid repeated attempts until user intervenes + BROKEN_PLUGINS.set(pluginId, { + error: String(error.message || error), + timestamp: Date.now(), + }); + failedPlugins.push(pluginId); + results.push(false); + } + }); + + await Promise.allSettled(loadPromises); + + acode[onPluginsLoadCompleteCallback](); + + if (failedPlugins.length > 0) { + setTimeout(() => { + cleanupFailedPlugins(failedPlugins).catch((error) => { + console.error("Failed to cleanup plugins:", error); + }); + }, 1000); + } + return results.filter(Boolean).length; +} + +function isThemePlugin(pluginId) { + // Convert to lowercase for case-insensitive matching + const id = pluginId.toLowerCase(); + // Check if any theme identifier is present in the plugin ID + return Array.from(THEME_IDENTIFIERS).some((theme) => id.includes(theme)); +} + +async function cleanupFailedPlugins(pluginIds) { + for (const pluginId of pluginIds) { + try { + const pluginDir = Url.join(PLUGIN_DIR, pluginId); + if (await fsOperation(pluginDir).exists()) { + await fsOperation(pluginDir).delete(); + } + } catch (error) { + console.error(`Failed to cleanup plugin ${pluginId}:`, error); + } + } +} diff --git a/src/lib/logger.js b/src/lib/logger.js new file mode 100644 index 000000000..a2e8d05c6 --- /dev/null +++ b/src/lib/logger.js @@ -0,0 +1,131 @@ +import fsOperation from "fileSystem"; +import Url from "utils/Url"; +import constants from "./constants"; + +/* +/** + * Logger class for handling application logging with buffer and file output. + * @class + */ + +/** + * Creates a new Logger instance. + * @constructor + * @param {number} [maxBufferSize=1000] - Maximum number of log entries to keep in buffer. + * @param {string} [logLevel="info"] - Minimum log level to record ("error", "warn", "info", "debug"). + * @param {number} [flushInterval=30000] - Interval in milliseconds for automatic log flushing. + */ +class Logger { + #logBuffer; + #maxBufferSize; + #logLevel; + #logFileName; + #flushInterval; + #autoFlushInterval; + #maxFileSize; + + constructor( + maxBufferSize = 1000, + logLevel = "info", + flushInterval = 30000, + maxFileSize = 10 * 1024 * 1024, + ) { + this.#logBuffer = new Map(); + this.#maxBufferSize = maxBufferSize; + this.#logLevel = logLevel; + this.#logFileName = constants.LOG_FILE_NAME; + this.#flushInterval = flushInterval; + this.#maxFileSize = maxFileSize; + this.#startAutoFlush(); // Automatically flush logs at intervals + this.#setupAppLifecycleHandlers(); // Handle app lifecycle events for safe log saving + } + + /** + * Logs a message with the specified log level. + * @param {'error' | 'warn' | 'info' | 'debug'} level - The log level. + * @param {string} message - The message to be logged. + */ + log(level, message) { + const levels = ["error", "warn", "info", "debug"]; + if (levels.indexOf(level) <= levels.indexOf(this.#logLevel)) { + let logEntry; + + // Check if the message is an instance of Error + if (message instanceof Error) { + logEntry = `[${new Date().toISOString()}] [${level.toUpperCase()}] ${message.name}: ${message.message}\nStack trace: ${message.stack}`; + } else { + logEntry = `[${new Date().toISOString()}] [${level.toUpperCase()}] ${message}`; + } + // LRU Mechanism for efficient log buffer management + if (this.#logBuffer.size >= this.#maxBufferSize) { + // Remove oldest entry + const oldestKey = this.#logBuffer.keys().next().value; + this.#logBuffer.delete(oldestKey); + } + this.#logBuffer.set(Date.now(), logEntry); // Using timestamp as key + } + } + + flushLogs() { + if (this.#logBuffer.size > 0) { + const logContent = Array.from(this.#logBuffer.values()).join("\n"); + this.#writeLogToFile(logContent); + this.#logBuffer.clear(); // Clear the buffer after flushing + } + } + + #writeLogToFile = async (logContent) => { + try { + const logFilePath = Url.join(DATA_STORAGE, constants.LOG_FILE_NAME); + if (!(await fsOperation(logFilePath).exists())) { + await fsOperation(window.DATA_STORAGE).createFile( + constants.LOG_FILE_NAME, + logContent, + ); + } else { + let existingData = await fsOperation(logFilePath).readFile("utf8"); + let newData = existingData + "\n" + logContent; + // Check if the new data exceeds the maximum file size + if (new Blob([newData]).size > this.#maxFileSize) { + const lines = newData.split("\n"); + while ( + new Blob([lines.join("\n")]).size > this.#maxFileSize && + lines.length > 0 + ) { + lines.shift(); + } + newData = lines.join("\n"); + } + + await fsOperation(logFilePath).writeFile(newData); + } + } catch (error) { + console.error( + "Error in handling fs operation on log file. Error:", + error, + ); + } + }; + + #startAutoFlush = () => { + this.#autoFlushInterval = setInterval(() => { + this.flushLogs(); + }, this.#flushInterval); + }; + + stopAutoFlush() { + clearInterval(this.#autoFlushInterval); + } + + #setupAppLifecycleHandlers = () => { + document.addEventListener( + "pause", + () => { + this.flushLogs(); // Flush logs when app is paused (background) + }, + false, + ); + }; +} + +export default Logger; diff --git a/src/lib/main.js b/src/lib/main.js deleted file mode 100644 index fc921eba4..000000000 --- a/src/lib/main.js +++ /dev/null @@ -1,622 +0,0 @@ -import '../styles/main.scss'; -import '../styles/themes.scss'; -import '../styles/page.scss'; -import '../styles/list.scss'; -import '../styles/sidenav.scss'; -import '../styles/tile.scss'; -import '../styles/contextMenu.scss'; -import '../styles/dialogs.scss'; -import '../styles/help.scss'; -import '../styles/overrideAceStyle.scss'; -import 'core-js/stable'; -import 'html-tag-js/dist/polyfill'; -import ajax from '@deadlyjack/ajax'; -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import git from './git'; -import tile from '../components/tile'; -import sidenav from '../components/sidenav'; -import contextMenu from '../components/contextMenu'; -import EditorManager from './editorManager'; -import ActionStack from './actionStack'; -import helpers from './utils/helpers'; -import Settings from './settings'; -import dialogs from '../components/dialogs'; -import constants from './constants'; -import intentHandler from './handlers/intent'; -import openFolder from './openFolder'; -import arrowkeys from './handlers/arrowkeys'; -import commands from './commands'; -import keyBindings from './keyBindings'; -import quickTools from './handlers/quickTools'; -import loadPolyFill from './utils/polyfill'; -import Url from './utils/Url'; -import applySettings from './applySettings'; -import fsOperation from './fileSystem/fsOperation'; -import run from './run'; -import toast from '../components/toast'; -import $_menu from '../views/menu.hbs'; -import $_fileMenu from '../views/file-menu.hbs'; -import Icon from '../components/icon'; -import restoreTheme from './restoreTheme'; - -loadPolyFill.apply(window); -window.onload = Main; - -async function Main() { - const oldPreventDefault = TouchEvent.prototype.preventDefault; - TouchEvent.prototype.preventDefault = function () { - if (this.cancelable) { - oldPreventDefault.bind(this)(); - } - }; - - ajax({ - url: 'https://acode.foxdebug.com/api/getad', - responseType: 'json', - }).then((/**@type {Promotion} */ promotion) => { - window.promotion = promotion; - if (promotion?.image) { - (async () => { - const image = await ajax({ - url: promotion.image, - responseType: 'arraybuffer', - }); - - if (image instanceof ArrayBuffer) { - promotion.image = URL.createObjectURL(new Blob([image])); - } - })(); - } - }) - .catch(err => { - console.log(err); - }); - - document.addEventListener('deviceready', ondeviceready); -} - -async function ondeviceready() { - const language = navigator.language.toLowerCase(); - const oldRURL = window.resolveLocalFileSystemURL; - const { - externalCacheDirectory, // - externalDataDirectory, - cacheDirectory, - dataDirectory, - } = cordova.file; - let lang = 'en-us'; - - iap.startConnection(); - window.root = tag(window.root); - window.app = tag(document.body); - window.addedFolder = []; - window.fileClipBoard = null; - window.restoreTheme = restoreTheme; - window.saveInterval = null; - window.editorManager = null; - window.customKeyBindings = null; - window.defaultKeyBindings = keyBindings; - window.toastQueue = []; - window.toast = toast; - window.ASSETS_DIRECTORY = Url.join(cordova.file.applicationDirectory, 'www'); - window.IS_FREE_VERSION = /(free)$/.test(BuildInfo.packageName); - window.DATA_STORAGE = externalDataDirectory || dataDirectory; - window.CACHE_STORAGE = externalCacheDirectory || cacheDirectory; - window.KEYBINDING_FILE = Url.join(DATA_STORAGE, '.key-bindings.json'); - window.gitRecordFile = Url.join(DATA_STORAGE, 'git/.gitfiles'); - window.gistRecordFile = Url.join(DATA_STORAGE, 'git/.gistfiles'); - window.actionStack = ActionStack(); - window.appSettings = new Settings(); - try { - window.ANDROID_SDK_INT = await new Promise((resolve, reject) => - system.getAndroidVersion(resolve, reject), - ); - } catch (error) { - window.ANDROID_SDK_INT = parseInt(device.version); - } - window.DOES_SUPPORT_THEME = (() => { - const $testEl = tag('div', { - style: { - height: `var(--test-height)`, - width: `var(--test-height)`, - }, - }); - document.body.append($testEl); - const client = $testEl.getBoundingClientRect(); - - $testEl.remove(); - - if (client.height === 0) return false; - else return true; - })(); - window.Acode = { - exec(key, val) { - if (key in commands) { - return commands[key](val); - } else { - return false; - } - }, - get exitAppMessage() { - const numFiles = editorManager.hasUnsavedFiles(); - if (numFiles) { - return strings['unsaved files close app']; - } - }, - setLoadingMessage(message) { - document.body.setAttribute('data-small-msg', message); - }, - }; - window.keyBindings = (name) => { - if (customKeyBindings && name in window.customKeyBindings) - return window.customKeyBindings[name].key; - else if (name in defaultKeyBindings) return defaultKeyBindings[name].key; - else return null; - }; - - system.requestPermission('android.permission.WRITE_EXTERNAL_STORAGE'); - localStorage.versionCode = BuildInfo.versionCode; - document.body.setAttribute('data-version', 'v' + BuildInfo.version); - Acode.setLoadingMessage('Loading settings...'); - - window.resolveLocalFileSystemURL = function (url, ...args) { - oldRURL.call(this, Url.safe(url), ...args); - }; - - if (navigator.app && typeof navigator.app.clearCache === 'function') { - navigator.app.clearCache(); - } - - setTimeout(() => { - if (document.body.classList.contains('loading')) - document.body.setAttribute( - 'data-small-msg', - 'This is taking unexpectedly long time!', - ); - }, 1000 * 10); - - if (language in constants.langList) { - lang = language; - } - Acode.setLoadingMessage('Loading settings...'); - await appSettings.init(lang); - - if (localStorage.versionCode < 150) { - localStorage.clear(); - appSettings.reset(); - window.location.reload(); - } - - Acode.setLoadingMessage('Loading custom theme...'); - document.head.append( - tag('style', { - id: 'custom-theme', - textContent: helpers.jsonToCSS( - constants.CUSTOM_THEME, - appSettings.value.customTheme, - ), - }), - ); - - Acode.setLoadingMessage('Loading language...'); - try { - const languageFile = `${ASSETS_DIRECTORY}/lang/${appSettings.value.lang}.json`; - const fs = fsOperation(languageFile); - const text = await fs.readFile('utf-8'); - window.strings = helpers.parseJSON(text); - } catch (error) { - alert('Unable to load language file.'); - } - - Acode.setLoadingMessage('Loading keybindings...'); - try { - const fs = fsOperation(KEYBINDING_FILE); - const content = await fs.readFile('utf-8'); - const bindings = helpers.parseJSON(content); - if (bindings) { - window.customKeyBindings = bindings; - } - } catch (error) { - await helpers.resetKeyBindings(); - } - - Acode.setLoadingMessage('Loading editor...'); - await helpers.loadScripts( - './js/ace/ace.js', - './js/emmet-core.js', - './js/ace/ext-language_tools.js', - './js/ace/ext-code_lens.js', - './js/ace/ext-emmet.js', - './js/ace/ext-beautify.js', - './js/ace/ext-modelist.js', - ); - ace.config.set('basePath', './js/ace/'); - window.beautify = ace.require('ace/ext/beautify').beautify; - window.modelist = ace.require('ace/ext/modelist'); - window.AceMouseEvent = ace.require('ace/mouse/mouse_event').MouseEvent; - - Acode.setLoadingMessage('Initializing GitHub...'); - await git.init(); - - loadApp(); -} - -async function loadApp() { - //#region declaration - const $editMenuToggler = tag('span', { - className: 'icon edit', - attr: { - style: 'font-size: 1.2em !important;', - action: '', - }, - }); - const $toggler = tag('span', { - className: 'icon menu', - attr: { - action: 'toggle-sidebar', - }, - }); - const $menuToggler = Icon('more_vert', 'toggle-menu'); - const $header = tile({ - type: 'header', - text: 'Acode', - lead: $toggler, - tail: $menuToggler, - }); - const $footer = tag('footer', { - id: 'quick-tools', - tabIndex: -1, - onclick: quickTools.clickListener, - }); - const $mainMenu = contextMenu({ - top: '6px', - right: '6px', - toggle: $menuToggler, - transformOrigin: 'top right', - innerHTML: () => { - return mustache.render($_menu, strings); - }, - }); - const $fileMenu = contextMenu({ - toggle: $editMenuToggler, - top: '6px', - transformOrigin: 'top right', - innerHTML: () => { - const file = editorManager.activeFile; - return mustache.render( - $_fileMenu, - Object.assign(strings, { - file_mode: (file.session.getMode().$id || '').split('/').pop(), - file_encoding: file.encoding, - file_read_only: !file.editable, - file_info: !!file.uri, - file_eol: file.eol, - }), - ); - }, - }); - const $main = tag('main'); - const $sidebar = sidenav($main, $toggler); - const $runBtn = tag('span', { - className: 'icon play_arrow', - attr: { - action: 'run-file', - }, - onclick() { - Acode.exec('run'); - }, - oncontextmenu() { - Acode.exec('run-file'); - }, - style: { - fontSize: '1.2em', - }, - }); - const $headerToggler = tag('span', { - className: 'floating icon keyboard_arrow_left', - id: 'header-toggler', - }); - const $quickToolToggler = tag('span', { - className: 'floating icon keyboard_arrow_up', - id: 'quicktool-toggler', - }); - const folders = helpers.parseJSON(localStorage.folders); - const files = helpers.parseJSON(localStorage.files) || []; - let registeredKey = ''; - //#endregion - - actionStack.onCloseApp = () => Acode.exec('save-state'); - Acode.$menuToggler = $menuToggler; - Acode.$editMenuToggler = $editMenuToggler; - Acode.$headerToggler = $headerToggler; - Acode.$quickToolToggler = $quickToolToggler; - Acode.$runBtn = $runBtn; - - $sidebar.setAttribute('empty-msg', strings['open folder']); - window.editorManager = EditorManager($sidebar, $header, $main); - - const fmode = appSettings.value.floatingButtonActivation; - const activationMode = fmode === 'long tap' ? 'oncontextmenu' : 'onclick'; - $headerToggler[activationMode] = function () { - root.classList.toggle('show-header'); - this.classList.toggle('keyboard_arrow_left'); - this.classList.toggle('keyboard_arrow_right'); - }; - $quickToolToggler[activationMode] = function () { - Acode.exec('toggle-quick-tools'); - }; - - //#region rendering - applySettings.beforeRender(); - window.restoreTheme(); - root.append($header, $main, $footer, $headerToggler, $quickToolToggler); - if (!appSettings.value.floatingButton) { - root.classList.add('hide-floating-button'); - } - applySettings.afterRender(); - //#endregion - - //#region loading-files - Acode.setLoadingMessage('Loading files...'); - if (Array.isArray(folders)) { - folders.forEach((folder) => openFolder(folder.url, folder.opts)); - } - for (let file of files) { - let text = ''; - const { - cursorPos, - isUnsaved, - filename, - type, - uri, - id, - readOnly, - mode, - deltedFile, - } = file; - const render = files.length === 1 || id === localStorage.lastfile; - - try { - const fs = fsOperation(Url.join(CACHE_STORAGE, id)); - text = await fs.readFile('utf-8'); - } catch (error) { } - - Acode.setLoadingMessage(`Loading ${filename}...`); - - if (type === 'git') { - gitRecord.get(file.sha).then((record) => { - if (record) { - editorManager.addNewFile(filename, { - type: 'git', - text: text || record.data, - isUnsaved: isUnsaved, - record, - render, - cursorPos, - id, - }); - } - }); - } else if (type === 'gist') { - const gist = gistRecord.get(file.recordid, file.isNew); - if (gist) { - const gistFile = gist.files[filename]; - editorManager.addNewFile(filename, { - type: 'gist', - text: text || gistFile.content, - isUnsaved, - record: gist, - render, - cursorPos, - id, - }); - } - } else if (uri) { - try { - const fs = fsOperation(uri); - if (!text) { - text = await fs.readFile('utf-8'); - } else if (!(await fs.exists()) && !readOnly) { - uri = null; - isUnsaved = true; - dialogs.alert( - strings.info.toUpperCase(), - strings['file has been deleted'].replace('{file}', filename), - ); - } - - if (text !== null) { - editorManager.addNewFile(filename, { - uri, - render, - isUnsaved, - cursorPos, - readOnly, - text, - id, - mode, - deltedFile, - }); - } - } catch (error) { - continue; - } - } else { - editorManager.addNewFile(filename, { - render, - isUnsaved, - cursorPos, - text, - id, - }); - } - } - //#endregion - - if (!editorManager.files.length) { - editorManager.addNewFile(); - } - onEditorUpdate(); - setTimeout(() => { - document.body.removeAttribute('data-small-msg'); - app.classList.remove('loading', 'splash'); - }, 1000); - - //#region Add event listeners - editorManager.onupdate = onEditorUpdate; - app.addEventListener('click', onClickApp); - $fileMenu.addEventListener('click', handleMenu); - $mainMenu.addEventListener('click', handleMenu); - $footer.addEventListener('touchstart', footerTouchStart); - $footer.addEventListener('contextmenu', footerOnContextMenu); - document.addEventListener('backbutton', actionStack.pop); - document.addEventListener('keydown', handleMainKeyDown); - document.addEventListener('keyup', handleMainKeyUp); - document.addEventListener('menubutton', $sidebar.toggle); - navigator.app.overrideButton('menubutton', true); - system.setIntentHandler(intentHandler); - $sidebar.onshow = function () { - const activeFile = editorManager.activeFile; - if (activeFile) editorManager.editor.blur(); - }; - document.addEventListener('pause', () => { - Acode.exec('save-state'); - }); - document.addEventListener('resume', () => { - Acode.exec('check-files'); - }); - //#endregion - - /** - * - * @param {KeyboardEvent} e - */ - function handleMainKeyDown(e) { - registeredKey = helpers.getCombination(e); - } - - /** - * - * @param {KeyboardEvent} e - */ - function handleMainKeyUp(e) { - let key = helpers.getCombination(e); - if (registeredKey && key !== registeredKey) return; - - const { editor } = editorManager; - - const isFocused = editor.textInput.getElement() === document.activeElement; - if (key === 'escape' && (!actionStack.length || isFocused)) - e.preventDefault(); - if (actionStack.length || isFocused) return; - for (let name in keyBindings) { - const obj = keyBindings[name]; - const binding = (obj.key || '').toLowerCase(); - if ( - binding === key && - constants.COMMANDS.includes(name) && - 'action' in obj - ) - Acode.exec(obj.action); - } - - registeredKey = null; - } - - /** - * - * @param {MouseEvent} e - */ - function handleMenu(e) { - const $target = e.target; - const action = $target.getAttribute('action'); - const value = $target.getAttribute('value'); - if (!action) return; - - if ($mainMenu.contains($target)) $mainMenu.hide(); - if ($fileMenu.contains($target)) $fileMenu.hide(); - Acode.exec(action, value); - } - - function footerTouchStart(e) { - arrowkeys.onTouchStart(e, $footer); - } - - /** - * - * @param {MouseEvent} e - */ - function footerOnContextMenu(e) { - if ( - e.target instanceof HTMLInputElement || - e.target instanceof HTMLTextAreaElement - ) - return; - e.preventDefault(); - editorManager.editor.focus(); - } - - function onEditorUpdate(type) { - const activeFile = editorManager.activeFile; - const $save = $footer.querySelector('[action=save]'); - - if (!$editMenuToggler.isConnected) - $header.insertBefore($editMenuToggler, $header.lastChild); - - if (activeFile) { - if (activeFile.isUnsaved) { - activeFile.assocTile.classList.add('notice'); - if ($save) $save.classList.add('notice'); - } else { - activeFile.assocTile.classList.remove('notice'); - if ($save) $save.classList.remove('notice'); - } - - editorManager.editor.setReadOnly(!activeFile.editable); - - if (type !== 'remove-file') { - run - .checkRunnable() - .then((res) => { - if (res) { - $runBtn.setAttribute('run-file', res); - $header.insertBefore($runBtn, $header.lastChild); - } else { - $runBtn.removeAttribute('run-file'); - $runBtn.remove(); - } - }) - .catch((err) => { - $runBtn.removeAttribute('run-file'); - $runBtn.remove(); - }); - } - } - - Acode.exec('save-state'); - } -} - -function onClickApp(e) { - let el = e.target; - if (el instanceof HTMLAnchorElement || checkIfInsideAncher()) { - e.preventDefault(); - e.stopPropagation(); - - system.openInBrowser(el.href); - } - - function checkIfInsideAncher() { - const allAs = [...tag.getAll('a')]; - - for (let a of allAs) { - if (a.contains(el)) { - el = a; - return true; - } - } - - return false; - } -} diff --git a/src/lib/notificationManager.js b/src/lib/notificationManager.js new file mode 100644 index 000000000..52518402d --- /dev/null +++ b/src/lib/notificationManager.js @@ -0,0 +1,232 @@ +import sidebarApps from "sidebarApps"; + +// Singleton instance +let instance = null; + +export default class NotificationManager { + DEFAULT_ICON = ``; + MAX_NOTIFICATIONS = 20; + notifications = []; + REFRESH_INTERVAL = 60000; // 1 minute refresh interval + timeUpdateInterval = null; + + constructor() { + if (instance) { + return instance; + } + this.notifications = []; + instance = this; + } + + init() { + document.body.appendChild( +
    , + ); + this.renderNotifications(); + this.startTimeUpdates(); + + sidebarApps + .get("notification") + ?.querySelector(".notifications-container") + .addEventListener("click", this.handleClick.bind(this)); + } + + startTimeUpdates() { + if (this.timeUpdateInterval) { + clearInterval(this.timeUpdateInterval); + } + + this.timeUpdateInterval = setInterval(() => { + this.updateNotificationTimes(); + }, this.REFRESH_INTERVAL); + } + + updateNotificationTimes() { + const container = sidebarApps + .get("notification") + ?.querySelector(".notifications-container"); + + if (!container) return; + + container.querySelectorAll(".notification-time").forEach((timeElement) => { + const notificationItem = timeElement.closest(".notification-item"); + const id = notificationItem?.dataset.id; + if (!id) return; + + const notification = this.notifications.find( + (n) => n.id === Number.parseInt(id), + ); + if (notification) { + timeElement.textContent = this.formatTime(notification.time); + } + }); + } + + renderNotifications() { + const container = sidebarApps + .get("notification") + ?.querySelector(".notifications-container"); + if (!container) return; + + if (this.notifications.length === 0) { + container.innerHTML = `
    ${strings["no_unread_notifications"]}
    `; + return; + } + + container.innerHTML = ""; + this.notifications.forEach((notification) => { + container.appendChild(this.createNotificationElement(notification)); + }); + } + + handleClick(e) { + const dismissButton = e.target.closest(".action-button"); + if (!dismissButton) return; + + e.stopPropagation(); + const notificationElement = dismissButton.closest(".notification-item"); + if (!notificationElement) return; + + const id = notificationElement.dataset.id; + if (id) { + const index = this.notifications.findIndex( + (n) => n.id === Number.parseInt(id), + ); + if (index > -1) { + notificationElement.remove(); + this.notifications.splice(index, 1); + this.renderNotifications(); + } + } + } + + createNotificationElement(notification) { + const element = ( +
    + ); + element.innerHTML = ` +
    + ${this.parseIcon(notification.icon)} +
    +
    +
    + ${notification.title} + ${this.formatTime(notification.time)} +
    +
    ${notification.message}
    +
    +
    Dismiss
    +
    +
    + `; + if (notification.action) { + element.addEventListener("click", (e) => { + if (e.target.closest(".action-button")) { + return; + } + notification.action(notification); + }); + } + return element; + } + + createToastNotification(notification) { + const element = ( +
    + ); + element.innerHTML = ` +
    ${this.parseIcon(notification.icon)}
    +
    +
    + ${notification.title} +
    +
    ${notification.message}
    +
    + ${notification.autoClose ? "" : ``} + `; + if (notification.action) { + element.addEventListener("click", () => + notification.action(notification), + ); + } + if (notification.autoClose) { + setTimeout(() => { + element.classList.add("hiding"); + setTimeout(() => element.remove(), 300); + }, 5000); + } + return element; + } + + addNotification(notification) { + this.notifications.unshift(notification); + + // Remove oldest if exceeding limit + if (this.notifications.length > this.MAX_NOTIFICATIONS) { + this.notifications.pop(); + } + + this.renderNotifications(); + + // show toast notification + document + .querySelector(".notification-toast-container") + ?.appendChild(this.createToastNotification(notification)); + } + + pushNotification({ + title, + message, + icon, + autoClose = true, + action = null, + type = "info", + }) { + const notification = { + id: Date.now(), + title, + message, + icon, + action, + autoClose, + type, + time: new Date(), + }; + this.addNotification(notification); + } + + parseIcon(icon) { + if (!icon) return this.DEFAULT_ICON; + if (icon.startsWith("`; + return ``; + } + + formatTime(date) { + const now = new Date(); + const diff = Math.floor((now - date) / 1000); + + if (diff < 60) return "Just now"; + if (diff < 3600) return `${Math.floor(diff / 60)}m`; + if (diff < 86400) return `${Math.floor(diff / 3600)}h`; + if (diff < 604800) return `${Math.floor(diff / 86400)}d`; + + return date.toLocaleDateString(); + } + + clearAll() { + this.notifications = []; + this.renderNotifications(); + if (this.timeUpdateInterval) { + clearInterval(this.timeUpdateInterval); + this.timeUpdateInterval = null; + } + } +} diff --git a/src/lib/openFile.js b/src/lib/openFile.js index e8edef86f..58319a09d 100644 --- a/src/lib/openFile.js +++ b/src/lib/openFile.js @@ -1,89 +1,428 @@ -import helpers from './utils/helpers'; -import dialogs from '../components/dialogs'; -import recents from './recents'; -import fsOperation from './fileSystem/fsOperation'; +import fsOperation from "fileSystem"; +import AudioPlayer from "components/audioPlayer"; +import alert from "dialogs/alert"; +import confirm from "dialogs/confirm"; +import loader from "dialogs/loader"; +import { reopenWithNewEncoding } from "palettes/changeEncoding"; +import { decode, detectEncoding } from "utils/encodings"; +import helpers from "utils/helpers"; +import EditorFile from "./editorFile"; +import fileTypeHandler from "./fileTypeHandler"; +import recents from "./recents"; +import appSettings from "./settings"; /** - * - * @param {String & fileOptions} file - * @param {object} data + * @typedef {object} FileOptions + * @property {string} text + * @property {{ row: number, column: number }} cursorPos + * @property {boolean} render + * @property {function} onsave + * @property {string} encoding + * @property {string} mode + * @property {string} uri */ -export default async function openFile(file, data = {}) { - try { - let uri = file.uri || file; - if (!uri && typeof uri !== 'string') return; - - const existingFile = editorManager.getFile(uri, 'uri'); - - if (existingFile) { - // If file is already opened - editorManager.switchFile(existingFile.id); - return; - } - - helpers.showTitleLoader(); - const fs = fsOperation(uri); - const fileInfo = await fs.stats(); - const name = fileInfo.name || file.name || uri; - const settings = appSettings.value; - const readOnly = fileInfo.canWrite ? false : true; - const { cursorPos, render, onsave, text, mode } = data; - const createEditor = (isUnsaved, text) => { - editorManager.addNewFile(name, { - uri, - text, - cursorPos, - isUnsaved, - render, - onsave, - readOnly, - mode, - }); - }; - - if (text) { - // If file is not opened and has unsaved text - helpers.removeTitleLoader(); - createEditor(true, text); - return; - } - - // Else open a new file - // Checks for valid file - const ext = helpers.extname(name); - if (appSettings.isFileAllowed(ext)) { - helpers.removeTitleLoader(); - return alert( - strings.notice.toUpperCase(), - `'${ext}' ${strings['file is not supported']}`, - ); - } else if (fileInfo.length * 0.000001 > settings.maxFileSize) { - helpers.removeTitleLoader(); - return alert( - strings.error.toUpperCase(), - strings['file too large'].replace( - '{size}', - settings.maxFileSize + 'MB', - ), - ); - } - - const binData = await fs.readFile(); - const fileContent = helpers.decodeText(binData); - - helpers.removeTitleLoader(); - if (helpers.isBinary(fileContent) && /image/i.test(fileInfo.type)) { - const blob = new Blob([binData]); - dialogs.box(name, ``); - return; - } - - createEditor(false, fileContent); - if (mode !== 'single') recents.addFile(uri); - return; - } catch (error) { - helpers.removeTitleLoader(); - console.error(error); - } +/** + * Opens a editor file + * @param {String & FileOptions} file + * @param {FileOptions} options + */ + +export default async function openFile(file, options = {}) { + try { + let uri = typeof file === "string" ? file : file.uri; + if (!uri) return; + + /**@type {EditorFile} */ + const existingFile = editorManager.getFile(uri, "uri"); + const { cursorPos, render, onsave, text, mode, encoding } = options; + + if (existingFile) { + // If file is already opened and new text is provided + const existingText = existingFile.session.getValue(); + const existingCursorPos = existingFile.session.selection.getCursor(); + + // If file is already opened + existingFile.makeActive(); + + if (onsave) { + existingFile.onsave = onsave; + } + + if (text && existingText !== text) { + // let confirmation = true; + // if (existingFile.isUnsaved) { + // const message = strings['reopen file'].replace('{file}', existingFile.filename); + // confirmation = await confirm(strings.warning, message); + // } + // if (confirmation) { + // } + existingFile.session.setValue(text); + } + + if ( + cursorPos && + existingCursorPos && + existingCursorPos.row !== cursorPos.row && + existingCursorPos.column !== cursorPos.column + ) { + existingFile.session.selection.moveCursorTo( + cursorPos.row, + cursorPos.column, + ); + } + + if (encoding && existingFile.encoding !== encoding) { + reopenWithNewEncoding(encoding); + } + return; + } + + loader.showTitleLoader(); + const settings = appSettings.value; + const fs = fsOperation(uri); + const fileInfo = await fs.stat(); + const name = fileInfo.name || file.filename || uri; + const readOnly = fileInfo.canWrite ? false : true; + const createEditor = (isUnsaved, text, detectedEncoding) => { + new EditorFile(name, { + uri, + text, + cursorPos, + isUnsaved, + render, + onsave, + readOnly, + encoding: detectedEncoding || encoding, + SAFMode: mode, + }); + }; + + // Check for registered file handlers + const customHandler = fileTypeHandler.getFileHandler(name); + if (customHandler) { + try { + await customHandler.handleFile({ + name, + uri, + stats: fileInfo, + readOnly, + options: { + cursorPos, + render, + onsave, + encoding, + mode, + createEditor, + }, + }); + return; + } catch (error) { + console.error(`File handler '${customHandler.id}' failed:`, error); + // Continue with default handling if custom handler fails + } + } + + if (text) { + // If file is not opened and has unsaved text + createEditor(true, text); + return; + } + + const videoRegex = /\.(mp4|webm|ogg|mov|avi|wmv|flv|mkv|3gp)$/i; + const imageRegex = /\.(jpe?g|png|gif|webp|bmp|ico|avif|apng|tiff?)$/i; + const audioRegex = /\.(mp3|wav|ogg|m4a|aac|wma|flac|opus|3gp|mid|midi)$/i; + + if (videoRegex.test(name)) { + const objectUrl = await fileToDataUrl(uri); + const videoContainer = ( +
    + ); + + const videoEl = ( + + ); + + videoContainer.append(videoEl); + + new EditorFile(name, { + uri, + type: "video", + tabIcon: "file file_type_video", + content: videoContainer, + render: true, + }); + return; + } + + if (imageRegex.test(name)) { + const objectUrl = await fileToDataUrl(uri); + const imageContainer = ( +
    + ); + + const imgEl = ( + + ); + + let scale = 1; + let startX = 0; + let startY = 0; + let translateX = 0; + let translateY = 0; + let lastX = 0; + let lastY = 0; + + function getBoundaries() { + const containerRect = imageContainer.getBoundingClientRect(); + const imgRect = imgEl.getBoundingClientRect(); + + const maxX = + (imgRect.width * scale - containerRect.width) / (2 * scale); + const maxY = + (imgRect.height * scale - containerRect.height) / (2 * scale); + + return { + maxX: Math.max(0, maxX), + maxY: Math.max(0, maxY), + minX: -Math.max(0, maxX), + minY: -Math.max(0, maxY), + }; + } + + function constrainTranslation() { + const bounds = getBoundaries(); + translateX = Math.min(Math.max(translateX, bounds.minX), bounds.maxX); + translateY = Math.min(Math.max(translateY, bounds.minY), bounds.maxY); + } + + // Zoom with mouse wheel + imageContainer.addEventListener("wheel", (e) => { + e.preventDefault(); + const delta = e.deltaY > 0 ? -0.1 : 0.1; + const oldScale = scale; + scale = Math.max(0.1, Math.min(5, scale + delta)); + + // Adjust translation to zoom toward mouse position + const rect = imgEl.getBoundingClientRect(); + const mouseX = e.clientX - rect.left; + const mouseY = e.clientY - rect.top; + + const scaleChange = scale / oldScale; + translateX = mouseX - (mouseX - translateX) * scaleChange; + translateY = mouseY - (mouseY - translateY) * scaleChange; + + constrainTranslation(); + imgEl.style.transform = `scale(${scale}) translate(${translateX}px, ${translateY}px)`; + }); + + // Pan image with mouse drag or touch + imageContainer.addEventListener("mousedown", startDrag); + imageContainer.addEventListener("touchstart", (e) => { + if (e.touches.length === 1) { + startDrag(e.touches[0]); + } else if (e.touches.length === 2) { + const touch1 = e.touches[0]; + const touch2 = e.touches[1]; + startX = Math.abs(touch1.clientX - touch2.clientX); + startY = Math.abs(touch1.clientY - touch2.clientY); + } + }); + + function startDrag(e) { + lastX = e.clientX; + lastY = e.clientY; + document.addEventListener("mousemove", onDrag); + document.addEventListener("mouseup", stopDrag); + document.addEventListener("touchmove", onTouchDrag); + document.addEventListener("touchend", stopDrag); + } + + function onDrag(e) { + const deltaX = e.clientX - lastX; + const deltaY = e.clientY - lastY; + translateX += deltaX / scale; + translateY += deltaY / scale; + lastX = e.clientX; + lastY = e.clientY; + constrainTranslation(); + imgEl.style.transform = `scale(${scale}) translate(${translateX}px, ${translateY}px)`; + } + + function onTouchDrag(e) { + if (e.touches.length === 1) { + const touch = e.touches[0]; + const deltaX = touch.clientX - lastX; + const deltaY = touch.clientY - lastY; + translateX += deltaX / scale; + translateY += deltaY / scale; + lastX = touch.clientX; + lastY = touch.clientY; + constrainTranslation(); + imgEl.style.transform = `scale(${scale}) translate(${translateX}px, ${translateY}px)`; + } else if (e.touches.length === 2) { + e.preventDefault(); + const touch1 = e.touches[0]; + const touch2 = e.touches[1]; + const currentX = Math.abs(touch1.clientX - touch2.clientX); + const currentY = Math.abs(touch1.clientY - touch2.clientY); + + const startDist = Math.sqrt(startX * startX + startY * startY); + const currentDist = Math.sqrt( + currentX * currentX + currentY * currentY, + ); + + const delta = (currentDist - startDist) / 100; + scale = Math.max(0.1, Math.min(5, scale + delta)); + constrainTranslation(); + imgEl.style.transform = `scale(${scale}) translate(${translateX}px, ${translateY}px)`; + + startX = currentX; + startY = currentY; + } + } + + function stopDrag() { + document.removeEventListener("mousemove", onDrag); + document.removeEventListener("mouseup", stopDrag); + document.removeEventListener("touchmove", onTouchDrag); + document.removeEventListener("touchend", stopDrag); + } + + imageContainer.append(imgEl); + + new EditorFile(name, { + uri, + type: "image", + tabIcon: "file file_type_image", + content: imageContainer, + render: true, + }); + return; + } + + if (audioRegex.test(name)) { + const objectUrl = await fileToDataUrl(uri); + const audioContainer = ( +
    + ); + + const audioPlayer = new AudioPlayer(audioContainer); + audioPlayer.loadTrack(objectUrl); + + const audioTab = new EditorFile(name, { + uri, + type: "audio", + tabIcon: "file file_type_audio", + content: audioPlayer.container, + render: true, + }); + audioTab.onclose = () => { + audioPlayer.cleanup(); + }; + return; + } + + // Else open a new file + // Checks for valid file + if (fileInfo.length * 0.000001 > settings.maxFileSize) { + return alert( + strings.error.toUpperCase(), + strings["file too large"].replace( + "{size}", + settings.maxFileSize + "MB", + ), + ); + } + + if (helpers.isBinary(uri)) { + const confirmation = await confirm(strings.info, strings["binary file"]); + if (!confirmation) return; + } + + const binData = await fs.readFile(); + + // Determine encoding: if explicit provided use it, otherwise + // if settings.defaultFileEncoding === 'auto' then detect; else use the default as-is + let detectedEncoding = file.encoding || encoding; + if (!detectedEncoding) { + const defaultSetting = appSettings.value.defaultFileEncoding; + if (defaultSetting === "auto") { + try { + detectedEncoding = await detectEncoding(binData); + if (detectedEncoding === "auto") detectedEncoding = "UTF-8"; + } catch (error) { + console.warn("Encoding detection failed, using UTF-8:", error); + detectedEncoding = "UTF-8"; + } + } else { + detectedEncoding = defaultSetting || "UTF-8"; + } + } + + const fileContent = await decode(binData, detectedEncoding); + + createEditor(false, fileContent, detectedEncoding); + if (mode !== "single") recents.addFile(uri); + return; + } catch (error) { + console.error(error); + } finally { + loader.removeTitleLoader(); + } +} + +/** + * Converts file to data url + * @param {string} file file url + */ +async function fileToDataUrl(file) { + const fs = fsOperation(file); + const fileInfo = await fs.stat(); + const binData = await fs.readFile(); + return URL.createObjectURL(new Blob([binData], { type: fileInfo.mime })); } diff --git a/src/lib/openFolder.js b/src/lib/openFolder.js index 98b44fc2c..6268ea053 100644 --- a/src/lib/openFolder.js +++ b/src/lib/openFolder.js @@ -1,665 +1,932 @@ -import tag from 'html-tag-js'; -import fsOperation from './fileSystem/fsOperation'; -import collapsableList from '../components/collapsableList'; -import helpers from './utils/helpers'; -import dialogs from '../components/dialogs'; -import tile from '../components/tile'; -import constants from './constants'; -import recents from './recents'; -import Path from './utils/Path'; -import openFile from './openFile'; -import Url from './utils/Url'; -import FileBrowser from '../pages/fileBrowser/fileBrowser'; -import URLParse from 'url-parse'; +import fsOperation from "fileSystem"; +import sidebarApps from "sidebarApps"; +import collapsableList from "components/collapsableList"; +import FileTree from "components/fileTree"; +import Sidebar from "components/sidebar"; +import tile from "components/tile"; +import toast from "components/toast"; +import alert from "dialogs/alert"; +import confirm from "dialogs/confirm"; +import prompt from "dialogs/prompt"; +import select from "dialogs/select"; +import escapeStringRegexp from "escape-string-regexp"; +import FileBrowser from "pages/fileBrowser"; +import helpers from "utils/helpers"; +import Path from "utils/Path"; +import Url from "utils/Url"; +import constants from "./constants"; +import * as FileList from "./fileList"; +import openFile from "./openFile"; +import recents from "./recents"; +import appSettings from "./settings"; + +const isTermuxSafUri = (value = "") => + value.startsWith("content://com.termux.documents/tree/"); +const isAcodeTerminalPublicSafUri = (value = "") => + value.startsWith("content://com.foxdebug.acode.documents/tree/"); +const isTerminalSafUri = (value = "") => + isTermuxSafUri(value) || isAcodeTerminalPublicSafUri(value); /** - * + * @typedef {import('../components/collapsableList').Collapsible} Collapsible + */ + +/** + * @typedef {object} ClipBoard + * @property {string} url + * @property {HTMLElement} $el + * @property {"cut"|"copy"} action + */ + +/** + * @typedef {object} Folder + * @property {string} id + * @property {string} url + * @property {string} title + * @property {boolean} listFiles Weather to list all files recursively + * @property {boolean} saveState + * @property {Collapsible} $node + * @property {ClipBoard} clipBoard + * @property {function(): void} remove + * @property {function(): void} reload + * @property {Map} listState + */ + +/**@type {Folder[]} */ +export const addedFolder = []; +const ACODE_PLUGIN_MANIFEST_FILE = "plugin.json"; +/** + * Open a folder in the sidebar * @param {string} _path - * @param {object} [opts] - * @param {string} [opts.name] + * @param {object} opts + * @param {string} opts.name * @param {string} [opts.id] - * @param {boolean} [opts.saveState=true] - * @param {boolean} [opts.reloadOnResume=true] + * @param {boolean} [opts.saveState] + * @param {boolean} [opts.listFiles] + * @param {Map} [opts.listState] */ function openFolder(_path, opts = {}) { - if (addedFolder.find((folder) => folder.url === _path)) { - return; - } - - let saveState = true, - reloadOnResume = true; - - if ('saveState' in opts) saveState = opts.saveState; - if ('reloadOnResume' in opts) reloadOnResume = opts.reloadOnResume; - - const listState = {}; - const title = opts.name || getTitle(); - const $closeBtn = tag('span', { - className: 'icon cancel', - attr: { - action: 'close', - }, - onclick: remove, - }); - let $root = collapsableList(title, !!!listState[_path], 'folder', { - tail: $closeBtn, - allCaps: true, - ontoggle: function (state) { - if (state === 'uncollapsed') { - for (let folder of addedFolder) { - if (folder.url !== _path) folder.$node.collapse(); - } - } - expandList.call(this); - }, - }); - /** - * @type {{url: string, $el: HTMLElement, action: "cut"|"copy"}} - */ - let clipBoard = null; - const loading = { - start() { - $root.$title.classList.add('loading'); - }, - stop() { - $root.$title.classList.remove('loading'); - }, - }; - const $text = $root.$title.querySelector(':scope>span.text'); - - $root.id = 'r' + _path.hashCode(); - - if ($text) { - $text.style.overflow = 'hidden'; - $text.style.whiteSpace = 'nowrap'; - $text.style.textOverflow = 'ellipsis'; - } - $root.$title.data_type = 'root'; - $root.$title.data_url = _path; - $root.$title.data_name = title; - - $root.$ul.onclick = - $root.$ul.oncontextmenu = - $root.$title.onclick = - $root.$title.oncontextmenu = - handleItems; - - addedFolder.push({ - url: _path, - remove, - $node: $root, - reload: () => { - if (!reloadOnResume) return; - $root.collapse(); - $root.uncollapse(); - }, - reloadOnResume, - saveState, - title, - id: opts.id, - }); - - updateHeight(); - recents.addFolder(_path, opts); - editorManager.sidebar.appendChild($root); - editorManager.onupdate('add-folder', _path); - - function getTitle() { - let title = ''; - try { - const { username, hostname, port } = URLParse(_path); - if (username && hostname) title = `${username}@${hostname}`; - else if (hostname) title = hostname; - - if (hostname && port) title += ':' + port; - - if (title) return title; - else return Path.basename(_path); - } catch (error) { - return Path.basename(_path); - } - } - - function remove(e) { - if (e) { - e.preventDefault(); - e.stopPropagation(); - e.stopImmediatePropagation(); - } - - if ($root.parentElement) { - $root.remove(); - $root = null; - } - - addedFolder = addedFolder.filter((folder) => folder.url !== _path); - updateHeight(); - editorManager.onupdate('remove-folder', _path); - } - - function updateHeight() { - openFolder.updateHeight(); - } - - /** - * - * @param {Event} e - */ - function handleItems(e) { - const mode = e.type; - const $target = e.target; - if (!($target instanceof HTMLElement)) return; - const type = $target.data_type; - if (!type) return; - const url = $target.data_url; - const name = $target.data_name; - - if (mode === 'click') handleClick(type, url, name, $target); - else if (mode === 'contextmenu') - handleContextmenu(type, url, name, $target); - } - - /** - * - * @param {"file"|"dir"|"root"} type - * @param {string} url - */ - function handleClick(type, uri) { - if (helpers.isFile(type)) { - openFile(uri, { render: true }); - editorManager.sidebar.hide(); - } - } - - /** - * - * @param {"file"|"dir"|"root"} type - * @param {string} url - * @param {string} name - * @param {HTMLElement} $target - */ - function handleContextmenu(type, url, name, $target) { - if (appSettings.value.vibrateOnTap) - navigator.vibrate(constants.VIBRATION_TIME); - const cancel = - strings.cancel + - (clipBoard ? ' (' + strings[clipBoard.action] + ')' : ''); - const COPY = ['copy', strings.copy, 'copy'], - CUT = ['cut', strings.cut, 'cut'], - REMOVE = ['delete', strings.delete, 'delete'], - RENAME = ['rename', strings.rename, 'edit'], - PASTE = ['paste', strings.paste, 'paste', !!clipBoard], - NEW_FILE = ['new file', strings['new file'], 'document-add'], - NEW_FOLDER = ['new folder', strings['new folder'], 'folder-add'], - CANCEL = ['cancel', cancel, 'clearclose'], - OPEN_FOLDER = ['open-folder', strings['open folder'], 'folder'], - INSERT_FILE = ['insert-file', strings['insert file'], 'file_copy']; - - let options; - - if (helpers.isFile(type)) options = [COPY, CUT, RENAME, REMOVE]; - else if (helpers.isDir(type)) - options = [ - COPY, - CUT, - REMOVE, - RENAME, - PASTE, - NEW_FILE, - NEW_FOLDER, - OPEN_FOLDER, - INSERT_FILE, - ]; - else if (type === 'root') - options = [RENAME, PASTE, NEW_FILE, NEW_FOLDER, INSERT_FILE]; - - if (clipBoard) options.push(CANCEL); - - dialogs.select(name, options).then((res) => { - execOperation(type, res, url, $target, name) - .catch((err) => { - if (err === false) return; - - console.error(err); - helpers.error(err); - }) - .finally(loading.stop); - }); - } - - /** - * @param {"dir"|"file"|"root"} type - * @param {"copy"|"cut"|"delete"|"rename"|"paste"|"new file"|"new folder"|"cancel"|"open-folder"} action - * @param {string} url target url - * @param {HTMLElement} $target target element - * @param {string} name Name of file or folder - */ - function execOperation(type, action, url, $target, name) { - let newName, - CASE = '', - src, - srcName, - srcType, - $src, - msg, - defaultValue; - - if (helpers.isDir(type)) { - Url.join(url, '/'); - } - - const target = $target.getAttribute('state'); - - switch (action) { - case 'copy': - case 'cut': - clipBoard = { - url, - action, - $el: $target, - }; - if (action === 'cut') $target.classList.add('cut'); - else $target.classList.remove('cut'); - return Promise.resolve(); - - case 'delete': - msg = strings['delete {name}'].replace('{name}', name); - - return dialogs - .confirm(strings.warging, msg) - .then(() => { - loading.start(); - const fs = fsOperation(url); - if (helpers.isDir(type)) return fs.deleteDir(); - else if (helpers.isFile(type)) return fs.deleteFile(); - }) - .then(() => { - recents.removeFile(url); - if (helpers.isFile(type)) { - $target.remove(); - const file = editorManager.getFile(url, 'uri'); - if (file) file.uri = null; - editorManager.onupdate('delete-file'); - } else { - recents.removeFolder(url); - helpers.updateUriOfAllActiveFiles(url, null); - $target.parentElement.remove(); - editorManager.onupdate('delete-folder'); - } - toast(strings.success); - }); - - case 'rename': - return dialogs - .prompt(strings.rename, name, 'text', { - match: constants.FILE_NAME_REGEX, - required: true, - }) - .then(async (newname) => { - loading.start(); - newName = newname; - if (newName !== name) { - const fs = fsOperation(url); - const newUrl = await fs.renameTo(newName); - newName = Url.basename(newUrl); - $target.querySelector(':scope>.text').textContent = newName; - $target.data_url = newUrl; - $target.data_urlname = newName; - if (helpers.isFile(type)) { - $target.querySelector(':scope>span').className = - helpers.getIconForFile(newName); - let file = editorManager.getFile(url, 'uri'); - if (file) { - file.uri = newUrl; - file.filename = newName; - } - } else { - helpers.updateUriOfAllActiveFiles(url, newUrl); - - //Reloading the folder by collasping and expanding the folder - $target.click(); //collaspe - $target.click(); //expand - } - toast(strings.success); - } - }); - - case 'paste': - $src = clipBoard.$el; - srcType = $src.data_type; - src = $src.isConnected - ? (helpers.isFile(srcType) - ? $src.parentElement - : $src.parentElement.parentElement - ).previousElementSibling.getAttribute('state') - : 'uncollapsed'; - srcName = $src.data_name; - - CASE += helpers.isFile(srcType) ? 1 : 0; - CASE += src === 'collapsed' ? 1 : 0; - CASE += target === 'collapsed' ? 1 : 0; - - return (async () => { - const fs = fsOperation(clipBoard.url); - let newUrl; - if (clipBoard.action === 'cut') newUrl = await fs.moveTo(url); - else newUrl = await fs.copyTo(url); - const newName = (await fsOperation(newUrl).stats()).name; - /** - * CASES: - * CASE 111: src is file and parent is collapsed where target is also collapsed - * CASE 110: src is file and parent is collapsed where target is uncollapsed - * CASE 101: src is file and parent is uncollapsed where target is collapsed - * CASE 100: src is file and parent is uncollapsed where target is also uncollapsed - * CASE 011: src is directory and parent is collapsed where target is also collapsed - * CASE 001: src is directory and parent is uncollapsed where target is also collapsed - * CASE 010: src is directory and parent is collapsed where target is also uncollapsed - * CASE 000: src is directory and parent is uncollapsed where target is also uncollapsed - */ - - if (clipBoard.action === 'cut') { - //move - - if (helpers.isFile(srcType)) { - const file = editorManager.getFile(clipBoard.url, 'uri'); - if (file) file.uri = newUrl; - } else if (helpers.isDir(srcType)) { - helpers.updateUriOfAllActiveFiles(clipBoard.url, newUrl); - } - - switch (CASE) { - case '111': - case '011': - break; - - case '110': - appendTile($target, createFileTile(newName, newUrl)); - break; - - case '101': - $src.remove(); - break; - - case '100': - appendTile($target, createFileTile(newName, newUrl)); - $src.remove(); - break; - - case '001': - $src.parentElement.remove(); - break; - - case '010': - appendList($target, createFolderTile(newName, newUrl)); - break; - - case '000': - appendList($target, createFolderTile(newName, newUrl)); - $src.parentElement.remove(); - break; - - default: - break; - } - } else { - //copy - - switch (CASE) { - case '111': - case '101': - case '011': - case '001': - break; - - case '110': - case '100': - appendTile($target, createFileTile(newName, newUrl)); - break; - - case '010': - case '000': - appendList($target, createFolderTile(newName, newUrl)); - break; - - default: - break; - } - } - - toast(strings.success); - clipBoard = null; - })(); - - case 'new file': - case 'new folder': - msg = - action === 'new file' - ? strings['enter file name'] - : strings['enter folder name']; - defaultValue = - action === 'new file' - ? constants.DEFAULT_FILE_NAME - : strings['new folder']; - return dialogs - .prompt(msg, defaultValue, 'text', { - match: constants.FILE_NAME_REGEX, - required: true, - }) - .then((res) => { - loading.start(); - newName = res; - const fs = fsOperation(url); - if (action === 'new file') return fs.createFile(newName); - else return fs.createDirectory(newName); - }) - .then((newUrl) => { - newName = Url.basename(newUrl); - if (target === 'uncollapsed') { - if (action === 'new file') - appendTile($target, createFileTile(newName, newUrl)); - else appendList($target, createFolderTile(newName, newUrl)); - } - toast(strings.success); - }); - - case 'cancel': - clipBoard.$el.classList.remove('cut'); - clipBoard = null; - return Promise.resolve(); - - case 'open-folder': - const obj = JSON.parse(JSON.stringify(opts)); - obj.name = name; - openFolder(url, obj); - return Promise.resolve(); - - case 'insert-file': - return (async () => { - loading.start(); - const file = await FileBrowser('file', strings['insert file']); - let fs = fsOperation(file.url); - let data = await fs.readFile(); - const stats = await fs.stats(); - - if (stats.length > 50000000) - throw new Error('Unable to insert file large than 50MB.'); - - const name = stats.name; - const fileUrl = Url.join(url, name); - - fs = fsOperation(url); - - try { - await fs.createFile(name); - } catch (error) { } - - fs = fsOperation(fileUrl); - await fs.writeFile(data); - appendTile($target, createFileTile(name, fileUrl)); - })(); - } - - /** - * - * @param {HTMLElement} $target - * @param {HTMLElement} $src - */ - function appendTile($target, $src) { - $target = $target.nextElementSibling; - const $firstTile = $target.querySelector(':scope>[type=file]'); - if ($firstTile) $target.insertBefore($src, $firstTile); - else $target.append($src); - } - - /** - * - * @param {HTMLElement} $target - * @param {HTMLElement} $src - */ - function appendList($target, $src) { - $target = $target.nextElementSibling; - const $firstList = $target.firstElementChild; - if ($firstList) $target.insertBefore($src, $firstList); - else $target.append($src); - } - } - - function createFileTile(name, url) { - const $tile = tile({ - lead: tag('span', { - className: helpers.getIconForFile(name), - }), - text: name, - }); - $tile.data_url = url; - $tile.data_name = name; - $tile.data_type = 'file'; - - return $tile; - } - - function createFolderTile(name, url) { - const $list = collapsableList(name, !!!listState[url], 'folder', { - ontoggle: expandList, - }); - $list.$title.data_url = url; - $list.$title.data_type = 'dir'; - $list.$title.data_name = name; - - return $list; - } - - /** - * - * @this {import('../components/collapsableList').Collaspable} - */ - async function expandList() { - const $target = this.$title; - const $ul = this.$ul; - const url = $target.data_url; - const state = $target.getAttribute('state'); - - if (!$ul) return; - $ul.textContent = null; - - if (saveState) listState[url] = false; - - if (state === 'uncollapsed') { - loading.start(); - if (saveState) listState[url] = true; - - try { - const fs = fsOperation(url); - let entries = await fs.lsDir(); - entries = helpers.sortDir( - entries, - { - sortByName: true, - showHiddenFiles: true, - }, - true, - ); - entries.map((entry) => { - const name = entry.name || Path.basename(entry.url); - if (entry.isDirectory) { - const $list = createFolderTile(name, entry.url); - $ul.appendChild($list); - } else { - const $item = createFileTile(name, entry.url); - $ul.append($item); - } - }); - } catch (err) { - this.collapse(); - helpers.error(err); - } - loading.stop(); - } - } + if (addedFolder.find((folder) => folder.url === _path)) { + return; + } + + const saveState = opts.saveState ?? true; + const listState = opts.listState || {}; + const title = opts.name; + let listFiles = opts.listFiles; + + if (!title) { + throw new Error("Folder name is required"); + } + + const $root = collapsableList(title, "folder", { + allCaps: true, + ontoggle: () => expandList($root), + }); + const $text = $root.$title.get(":scope>span.text"); + + $root.id = "r" + _path.hashCode(); + $text.style.overflow = "hidden"; + $text.style.whiteSpace = "nowrap"; + $text.style.textOverflow = "ellipsis"; + $root.$title.dataset.type = "root"; + $root.$title.dataset.url = _path; + $root.$title.dataset.name = title; + + $root.$ul.onclick = + $root.$ul.oncontextmenu = + $root.$title.onclick = + $root.$title.oncontextmenu = + handleItems; + + recents.addFolder(_path, opts); + sidebarApps.get("files").append($root); + + const event = { + url: _path, + name: title, + }; + + const folder = { + title, + remove, + listFiles, + saveState, + listState, + url: _path, + $node: $root, + id: opts.id, + clipBoard: {}, + reload() { + $root.collapse(); + $root.expand(); + }, + }; + + editorManager.emit("update", "add-folder"); + editorManager.onupdate("add-folder", event); + editorManager.emit("add-folder", event); + + (async () => { + if (typeof listFiles !== "boolean") { + const protocol = Url.getProtocol(_path).slice(0, -1); + const type = /^(content|file)$/.test(protocol) ? "" : ` (${protocol})`; + const message = strings["list files"].replace( + "{name}", + `${title}${type}`, + ); + listFiles = await confirm(strings.confirm, message, true); + } + + if (listFiles) { + FileList.addRoot({ url: _path, name: title }); + } + + folder.listFiles = listFiles; + addedFolder.push(folder); + })(); + + if (listState[_path]) { + $root.expand(); + } + + function remove(e) { + if (e) { + e.preventDefault(); + e.stopPropagation(); + e.stopImmediatePropagation(); + } + + if ($root.parentElement) { + $root.remove(); + } + + const index = addedFolder.findIndex((folder) => folder.url === _path); + if (index !== -1) addedFolder.splice(index, 1); + editorManager.emit("update", "remove-folder"); + editorManager.onupdate("remove-folder", event); + editorManager.emit("remove-folder", event); + } +} + +/** + * Expand the list + * @param {Collapsible} $list + */ +async function expandList($list) { + const { $ul, $title } = $list; + const { url } = $title.dataset; + + const { saveState, listState, $node } = openFolder.find(url); + const startLoading = () => $node.$title.classList.add("loading"); + const stopLoading = () => $node.$title.classList.remove("loading"); + + if (!$ul) return; + + // Cleanup existing file tree + if ($ul._fileTree) { + $ul._fileTree.destroy(); + $ul._fileTree = null; + } + $ul.innerHTML = ""; + + if (saveState) listState[url] = $list.unclasped; + if (!$list.unclasped) return; + + try { + startLoading(); + + const fileTree = new FileTree($ul, { + getEntries: (dirUrl) => fsOperation(dirUrl).lsDir(), + expandedState: listState, + onExpandedChange: (folderUrl, isExpanded) => { + if (saveState) listState[folderUrl] = isExpanded; + }, + onFileClick: (fileUrl) => { + handleClick("file", fileUrl); + }, + onContextMenu: (type, itemUrl, name, $target) => { + handleContextmenu(type, itemUrl, name, $target); + }, + }); + + await fileTree.load(url); + $ul._fileTree = fileTree; + } catch (err) { + $list.collapse(); + if (err?.includes?.("Invalid message length")) { + console.error(err); + toast("SFTP connection broken. Restart the app"); + return; + } + helpers.error(err); + } finally { + stopLoading(); + } +} + +/** + * Gets weather the folder is collapsed or not + * @param {HTMLElement} $el + * @param {boolean} isFile + * @returns + */ +function collapsed($el, isFile) { + if (!$el.isConnected) return true; + $el = $el.parentElement; + if (!isFile) { + $el = $el.parentElement; + } + + return $el.previousElementSibling.collapsed; +} + +/** + * Handle click event + * @param {Event} e + */ +function handleItems(e) { + const mode = e.type; + const $target = e.target; + if (!($target instanceof HTMLElement)) return; + const type = $target.dataset.type; + if (!type) return; + const url = $target.dataset.url; + const name = $target.dataset.name; + + if (mode === "click") { + handleClick(type, url, name, $target); + } else if (mode === "contextmenu") { + handleContextmenu(type, url, name, $target); + } +} + +/** + * Handle contextmenu + * @param {"file"|"dir"|"root"} type + * @param {string} url + * @param {string} name + * @param {HTMLElement} $target + */ +async function handleContextmenu(type, url, name, $target) { + if (appSettings.value.vibrateOnTap) { + navigator.vibrate(constants.VIBRATION_TIME); + } + const { clipBoard, $node } = openFolder.find(url); + const cancel = `${strings.cancel}${clipBoard ? ` (${strings[clipBoard.action]})` : ""}`; + const COPY = ["copy", strings.copy, "copy"]; + const CUT = ["cut", strings.cut, "cut"]; + const REMOVE = ["delete", strings.delete, "delete"]; + const RENAME = ["rename", strings.rename, "edit"]; + const PASTE = ["paste", strings.paste, "paste", !!clipBoard]; + const NEW_FILE = ["new file", strings["new file"], "document-add"]; + const NEW_FOLDER = ["new folder", strings["new folder"], "folder-add"]; + const CANCEL = ["cancel", cancel, "clearclose"]; + const OPEN_FOLDER = ["open-folder", strings["open folder"], "folder"]; + const INSERT_FILE = ["insert-file", strings["insert file"], "file_copy"]; + const CLOSE_FOLDER = ["close", strings["close"], "folder-remove"]; + const INSTALL_PLUGIN = [ + "install-plugin", + strings["install as plugin"] || "Install as Plugin", + "extension", + ]; + + let options; + + if (helpers.isFile(type)) { + options = [COPY, CUT, RENAME, REMOVE]; + if ( + url.toLowerCase().endsWith(".zip") && + (await fsOperation( + Url.dirname(url) + ACODE_PLUGIN_MANIFEST_FILE, + ).exists()) + ) { + options.push(INSTALL_PLUGIN); + } + } else if (helpers.isDir(type)) { + options = [COPY, CUT, REMOVE, RENAME]; + + if (clipBoard.url != null) { + options.push(PASTE); + } + + options.push(NEW_FILE, NEW_FOLDER, OPEN_FOLDER, INSERT_FILE); + } else if (type === "root") { + options = []; + + if (clipBoard.url != null) { + options.push(PASTE); + } + + options.push(NEW_FILE, NEW_FOLDER, INSERT_FILE, CLOSE_FOLDER); + } + + if (clipBoard.action) options.push(CANCEL); + + try { + const option = await select(name, options); + await execOperation(type, option, url, $target, name); + } catch (error) { + console.error(error); + helpers.error(error); + } finally { + $node.$title.classList.remove("loading"); + } +} + +/** + * @param {"dir"|"file"|"root"} type + * @param {"copy"|"cut"|"delete"|"rename"|"paste"|"new file"|"new folder"|"cancel"|"open-folder"|"install-plugin"} action + * @param {string} url target url + * @param {HTMLElement} $target target element + * @param {string} name Name of file or folder + */ +function execOperation(type, action, url, $target, name) { + const { clipBoard, $node, remove } = openFolder.find(url); + const startLoading = () => $node.$title.classList.add("loading"); + const stopLoading = () => $node.$title.classList.remove("loading"); + + switch (action) { + case "copy": + case "cut": + return clipBoardAction(); + + case "delete": + return deleteFile(); + + case "rename": + return renameFile(); + + case "paste": + return paste(); + + case "new file": + case "new folder": + return createNew(); + + case "cancel": + return cancelAction(); + + case "open-folder": + return open(); + + case "insert-file": + return insertFile(); + + case "close": + return remove(); + + case "install-plugin": + return installPlugin(); + } + + async function installPlugin() { + try { + const manifest = JSON.parse( + await fsOperation( + Url.dirname(url) + ACODE_PLUGIN_MANIFEST_FILE, + ).readFile("utf8"), + ); + const { default: installPlugin } = await import("lib/installPlugin"); + await installPlugin(url, manifest.name); + toast(strings["success"], 3000); + } catch (error) { + helpers.error(error); + console.error(error); + } + } + + async function deleteFile() { + const msg = strings["delete entry"].replace("{name}", name); + const confirmation = await confirm(strings.warning, msg); + if (!confirmation) return; + startLoading(); + if (!(await fsOperation(url).exists())) return; + // await fsOperation(url).delete(); + recents.removeFile(url); + if (helpers.isFile(type)) { + await fsOperation(url).delete(); + $target.remove(); + const file = editorManager.getFile(url, "uri"); + if (file) file.uri = null; + editorManager.onupdate("delete-file"); + editorManager.emit("update", "delete-file"); + } else { + if (isTerminalSafUri(url)) { + const fs = fsOperation(url); + const entries = await fs.lsDir(); + if (entries.length === 0) { + await fs.delete(); + } else { + const deleteRecursively = async (currentUrl) => { + const currentFs = fsOperation(currentUrl); + const currentEntries = await currentFs.lsDir(); + for (const entry of currentEntries) { + if (entry.isDirectory) { + await deleteRecursively(entry.url); + } else { + await fsOperation(entry.url).delete(); + } + } + await currentFs.delete(); + }; + await deleteRecursively(url); + } + } else { + await fsOperation(url).delete(); + } + recents.removeFolder(url); + helpers.updateUriOfAllActiveFiles(url, null); + $target.parentElement.remove(); + editorManager.onupdate("delete-folder"); + editorManager.emit("update", "delete-folder"); + } + + toast(strings.success); + FileList.remove(url); + } + + async function renameFile() { + if (isTermuxSafUri(url) && !helpers.isFile(type)) { + alert(strings.warning, strings["rename not supported"]); + return; + } + let newName = await prompt(strings.rename, name, "text", { + match: constants.FILE_NAME_REGEX, + required: true, + }); + + newName = helpers.fixFilename(newName); + if (!newName || newName === name) return; + + startLoading(); + const fs = fsOperation(url); + let newUrl; + + if (isTermuxSafUri(url) && helpers.isFile(type)) { + // Special handling for Termux SAF content files + const newFilePath = Url.join(Url.dirname(url), newName); + const content = await fs.readFile(); + await fsOperation(Url.dirname(url)).createFile(newName, content); + await fs.delete(); + newUrl = newFilePath; + } else { + newUrl = await fs.renameTo(newName); + } + + newName = Url.basename(newUrl); + $target.querySelector(":scope>.text").textContent = newName; + $target.dataset.url = newUrl; + $target.dataset.name = newName; + if (helpers.isFile(type)) { + $target.querySelector(":scope>span").className = + helpers.getIconForFile(newName); + let file = editorManager.getFile(url, "uri"); + if (file) { + file.uri = newUrl; + file.filename = newName; + } + } else { + helpers.updateUriOfAllActiveFiles(url, newUrl); + //Reloading the folder by collapsing and expanding the folder + $target.click(); //collapse + $target.click(); //expand + } + toast(strings.success); + FileList.rename(url, newUrl); + } + + async function createNew() { + const msg = + action === "new file" + ? strings["enter file name"] + : strings["enter folder name"]; + + let newName = await prompt(msg, "", "text", { + match: constants.FILE_NAME_REGEX, + required: true, + }); + + newName = helpers.fixFilename(newName); + if (!newName) return; + startLoading(); + let newUrl; + + if (action === "new file") { + newUrl = await helpers.createFileStructure(url, newName); + } else { + newUrl = await helpers.createFileStructure(url, newName, false); + } + if (!newUrl) return; + newName = Url.basename(newUrl.uri); + if ($target.unclasped) { + if (newUrl.type === "file") { + appendTile($target, createFileTile(newName, newUrl.uri)); + } else if (newUrl.type === "folder") { + appendList($target, createFolderTile(newName, newUrl.uri)); + } + } + + FileList.append(url, newUrl.uri); + toast(strings.success); + } + + async function paste() { + if (clipBoard.url == null) { + alert(strings.warning, "Nothing to paste"); + return; + } + + // Prevent pasting a folder into itself or its subdirectories + if (helpers.isDir(clipBoard.$el.dataset.type)) { + const sourceUrl = Url.parse(clipBoard.url).url; + const targetUrl = Url.parse(url).url; + + // Check if trying to paste folder into itself + if (sourceUrl === targetUrl) { + alert(strings.warning, "Cannot paste a folder into itself"); + return; + } + + // Check if trying to paste folder into one of its subdirectories + if ( + targetUrl.startsWith(sourceUrl + "/") || + targetUrl.startsWith(sourceUrl + "\\") + ) { + alert(strings.warning, "Cannot paste a folder into its subdirectory"); + return; + } + } + + let CASE = ""; + const $src = clipBoard.$el; + const srcType = $src.dataset.type; + const IS_FILE = helpers.isFile(srcType); + const IS_DIR = helpers.isDir(srcType); + const srcCollapsed = collapsed($src, IS_FILE); + + CASE += IS_FILE ? 1 : 0; + CASE += srcCollapsed ? 1 : 0; + CASE += $target.collapsed ? 1 : 0; + + startLoading(); + try { + const fs = fsOperation(clipBoard.url); + const itemName = Url.basename(clipBoard.url); + const possibleConflictUrl = Url.join(url, itemName); + const doesExist = await fsOperation(possibleConflictUrl).exists(); + if (doesExist) { + let confirmation = await confirm( + strings.warning, + strings["already exists"] + ? strings["already exists"].replace("{name}", itemName) + : `"${itemName}" already exists in this location.`, + ); + if (!confirmation) return; + } + let newUrl; + if (clipBoard.action === "cut") { + // Special handling for SAF folders backed by terminal providers - move manually due to SAF limitations + if (isTerminalSafUri(clipBoard.url) && IS_DIR) { + const moveRecursively = async (sourceUrl, targetParentUrl) => { + const sourceFs = fsOperation(sourceUrl); + const sourceName = Url.basename(sourceUrl); + const targetUrl = Url.join(targetParentUrl, sourceName); + + // Create target folder + await fsOperation(targetParentUrl).createDirectory(sourceName); + + // Get all entries in source folder + const entries = await sourceFs.lsDir(); + + // Move all files and folders recursively + for (const entry of entries) { + if (entry.isDirectory) { + await moveRecursively(entry.url, targetUrl); + } else { + const fileContent = await fsOperation(entry.url).readFile(); + const fileName = entry.name || Url.basename(entry.url); + await fsOperation(targetUrl).createFile(fileName, fileContent); + await fsOperation(entry.url).delete(); + } + } + + // Delete the now-empty source folder + await sourceFs.delete(); + return targetUrl; + }; + + newUrl = await moveRecursively(clipBoard.url, url); + } else { + newUrl = await fs.moveTo(url); + } + } else { + newUrl = await fs.copyTo(url); + } + const { name: newName } = await fsOperation(newUrl).stat(); + stopLoading(); + /** + * CASES: + * CASE 111: src is file and parent is collapsed where target is also collapsed + * CASE 110: src is file and parent is collapsed where target is unclasped + * CASE 101: src is file and parent is unclasped where target is collapsed + * CASE 100: src is file and parent is unclasped where target is also unclasped + * CASE 011: src is directory and parent is collapsed where target is also collapsed + * CASE 001: src is directory and parent is unclasped where target is also collapsed + * CASE 010: src is directory and parent is collapsed where target is also unclasped + * CASE 000: src is directory and parent is unclasped where target is also unclasped + */ + + if (clipBoard.action === "cut") { + //move + + if (IS_FILE) { + const file = editorManager.getFile(clipBoard.url, "uri"); + if (file) file.uri = newUrl; + } else if (IS_DIR) { + helpers.updateUriOfAllActiveFiles(clipBoard.url, newUrl); + } + + switch (CASE) { + case "111": + case "011": + break; + + case "110": + appendTile($target, createFileTile(newName, newUrl)); + break; + + case "101": + $src.remove(); + break; + + case "100": + appendTile($target, createFileTile(newName, newUrl)); + $src.remove(); + break; + + case "001": + $src.parentElement.remove(); + break; + + case "010": + appendList($target, createFolderTile(newName, newUrl)); + break; + + case "000": + appendList($target, createFolderTile(newName, newUrl)); + $src.parentElement.remove(); + break; + + default: + break; + } + FileList.remove(clipBoard.url); + } else { + //copy + + switch (CASE) { + case "111": + case "101": + case "011": + case "001": + break; + + case "110": + case "100": + appendTile($target, createFileTile(newName, newUrl)); + break; + + case "010": + case "000": + appendList($target, createFolderTile(newName, newUrl)); + break; + + default: + break; + } + } + + FileList.append(url, newUrl); + toast(strings.success); + clearClipboard(); + } catch (error) { + console.error(error); + helpers.error(error); + } finally { + stopLoading(); + } + } + + async function insertFile() { + startLoading(); + try { + const file = await FileBrowser("file", strings["insert file"]); + const sourceFs = fsOperation(file.url); + const data = await sourceFs.readFile(); + const sourceStats = await sourceFs.stat(); + const insertedFile = await fsOperation(url).createFile( + sourceStats.name, + data, + ); + appendTile($target, createFileTile(sourceStats.name, insertedFile)); + FileList.append(url, insertedFile); + } catch (error) { + } finally { + stopLoading(); + } + } + + async function clipBoardAction() { + clipBoard.url = url; + clipBoard.action = action; + clipBoard.$el = $target; + + if (action === "cut") $target.classList.add("cut"); + else $target.classList.remove("cut"); + } + + async function open() { + FileBrowser.openFolder({ + url, + name, + }); + } + + function cancelAction() { + clipBoard.$el.classList.remove("cut"); + clearClipboard(); + } + + function clearClipboard() { + clipBoard.$el = null; + clipBoard.url = null; + clipBoard.action = null; + } +} + +/** + * + * @param {"file"|"dir"|"root"} type + * @param {string} url + */ +function handleClick(type, uri) { + if (!helpers.isFile(type)) return; + openFile(uri, { render: true }); + Sidebar.hide(); } -openFolder.updateHeight = function () { - if (!addedFolder.length) return; - let activeFileListHeight = 0; - - if (appSettings.value.openFileListPos === 'sidebar') { - const client = editorManager.openFileList.getBoundingClientRect(); - activeFileListHeight = client.height; - } - - let totalFolder = addedFolder.length - 1; - for (let folder of addedFolder) { - folder.$node.style.maxHeight = `calc(100% - ${totalFolder * 30 + activeFileListHeight - }px)`; - folder.$node.style.height = `calc(100% - ${totalFolder * 30 + activeFileListHeight - }px)`; - } +/** + * Insert a file into the list + * @param {HTMLElement} $target + * @param {HTMLElement} $tile + */ +function appendTile($target, $tile) { + $target = $target.nextElementSibling; + const $firstTile = $target.get(":scope>[type=file]"); + if ($firstTile) $target.insertBefore($tile, $firstTile); + else $target.append($tile); +} + +/** + * Insert folder into the list + * @param {HTMLElement} $target The target element + * @param {HTMLElement} $list The tile to be inserted + */ +function appendList($target, $list) { + $target = $target.nextElementSibling; + const $firstList = $target.firstElementChild; + if ($firstList) $target.insertBefore($list, $firstList); + else $target.append($list); +} + +/** + * Create a folder tile + * @param {string} name + * @param {string} url + * @returns {HTMLElement} + */ +function createFolderTile(name, url) { + const $list = collapsableList(name, "folder", { + ontoggle: () => expandList($list), + }); + const { $title } = $list; + $title.dataset.url = url; + $title.dataset.name = name; + $title.dataset.type = "dir"; + + return $list; +} + +/** + * Create a file tile + * @param {string} name + * @param {string} url + * @returns {HTMLElement} + */ +function createFileTile(name, url) { + const $tile = tile({ + lead: , + text: name, + }); + $tile.dataset.url = url; + $tile.dataset.name = name; + $tile.dataset.type = "file"; + + return $tile; +} + +/** + * Add file or folder to the list if expanded + * @param {string} url Url of file or folder to add + * @param {'file'|'folder'} type is file or folder + */ +openFolder.add = async (url, type) => { + const { url: parent } = await fsOperation(Url.dirname(url)).stat(); + FileList.append(parent, url); + + const filesApp = sidebarApps.get("files"); + const $els = filesApp.getAll(`[data-url="${parent}"]`); + Array.from($els).forEach(($el) => { + if ($el.dataset.type !== "dir") return; + + if (type === "file") { + appendTile($el, createFileTile(Url.basename(url), url)); + } else { + appendList($el, createFolderTile(Url.basename(url), url)); + } + }); }; -openFolder.updateItem = function (oldFile, newFile, newFilename) { - const $el = editorManager.sidebar.querySelector(`[url="${oldFile}"]`); - if ($el) { - $el.data_url = newFile; - $el.data_name = newFilename; - $el.querySelector(':scope>span').className = - helpers.getIconForFile(newFilename); - $el.querySelector(':scope>.text').textContent = newFilename; - } +openFolder.renameItem = (oldFile, newFile, newFilename) => { + FileList.rename(oldFile, newFile); + + helpers.updateUriOfAllActiveFiles(oldFile, newFile); + + const filesApp = sidebarApps.get("files"); + const $els = filesApp.getAll(`[data-url="${oldFile}"]`); + Array.from($els).forEach(($el) => { + if ($el.dataset.type === "dir") { + $el = $el.$title; + setTimeout(() => { + $el.collapse(); + $el.expand(); + }, 0); + } else { + $el.querySelector(":scope>span").className = + helpers.getIconForFile(newFilename); + } + + $el.dataset.url = newFile; + $el.dataset.name = newFilename; + $el.querySelector(":scope>.text").textContent = newFilename; + }); }; -openFolder.removeItem = function (url) { - const $el = editorManager.sidebar.querySelector(`[url="${url}"]`); - if ($el) { - const type = $el.data_type; - if (helpers.isFile(type)) { - $el.remove(); - } else { - $el.parentElement.remove(); - } - } +openFolder.removeItem = (url) => { + FileList.remove(url); + const folder = addedFolder.find(({ url: fUrl }) => url === fUrl); + + if (folder) { + folder.remove(); + return; + } + + const filesApp = sidebarApps.get("files"); + const $el = filesApp.getAll(`[data-url="${url}"]`); + Array.from($el).forEach(($el) => { + const type = $el.dataset.type; + if (helpers.isFile(type)) { + $el.remove(); + } else { + $el.parentElement.remove(); + } + }); }; -openFolder.removeFolders = function (url) { - ({ url } = Url.parse(url)); - const regex = new RegExp('^' + url); - addedFolder.forEach((folder) => { - if (regex.test(folder.url)) { - folder.remove(); - } - }); +openFolder.removeFolders = (url) => { + ({ url } = Url.parse(url)); + const regex = new RegExp("^" + escapeStringRegexp(url)); + addedFolder.forEach((folder) => { + if (regex.test(folder.url)) { + folder.remove(); + } + }); }; /** - * + * Find the folder that contains the url * @param {String} url * @returns {Folder} */ -openFolder.find = function (url) { - return addedFolder.find((folder) => { - const { url: furl } = Url.parse(folder.url); - const regex = new RegExp('^' + furl); - return regex.test(url); - }); +openFolder.find = (url) => { + const found = addedFolder.find((folder) => folder.url === url); + if (found) return found; + return addedFolder.find((folder) => { + const { url: furl } = Url.parse(folder.url); + const regex = new RegExp("^" + escapeStringRegexp(furl)); + return regex.test(url); + }); }; export default openFolder; diff --git a/src/lib/polyfill.js b/src/lib/polyfill.js new file mode 100644 index 000000000..9a853d5bc --- /dev/null +++ b/src/lib/polyfill.js @@ -0,0 +1,142 @@ +// polyfill for prepend + +(function (arr) { + arr.forEach(function (item) { + if (item.hasOwnProperty("prepend")) { + return; + } + Object.defineProperty(item, "prepend", { + configurable: true, + enumerable: true, + writable: true, + value: function prepend() { + var argArr = Array.prototype.slice.call(arguments), + docFrag = document.createDocumentFragment(); + + argArr.forEach(function (argItem) { + var node = + argItem instanceof Node + ? argItem + : document.createTextNode(String(argItem)); + docFrag.appendChild(node); + }); + + this.insertBefore(docFrag, this.firstChild); + }, + }); + }); +})([Element.prototype, Document.prototype, DocumentFragment.prototype]); + +// polyfill for closest + +(function (arr) { + arr.forEach(function (item) { + if (item.hasOwnProperty("closest")) { + return; + } + Object.defineProperty(item, "closest", { + configurable: true, + enumerable: true, + writable: true, + value: function closest(s) { + var matches = (this.document || this.ownerDocument).querySelectorAll(s), + i, + el = this; + do { + i = matches.length; + while (--i >= 0 && matches.item(i) !== el) {} + } while (i < 0 && (el = el.parentElement)); + return el; + }, + }); + }); +})([Element.prototype]); + +// polyfill for replaceWith + +(function (arr) { + arr.forEach(function (item) { + if (item.hasOwnProperty("replaceWith")) { + return; + } + Object.defineProperty(item, "replaceWith", { + configurable: true, + enumerable: true, + writable: true, + value: function replaceWith() { + var parent = this.parentNode, + i = arguments.length, + currentNode; + if (!parent) return; + if (!i) + // if there are no arguments + parent.removeChild(this); + while (i--) { + // i-- decrements i and returns the value of i before the decrement + currentNode = arguments[i]; + if (typeof currentNode !== "object") { + currentNode = this.ownerDocument.createTextNode(currentNode); + } else if (currentNode.parentNode) { + currentNode.parentNode.removeChild(currentNode); + } + // the value of "i" below is after the decrement + if (!i) + // if currentNode is the first argument (currentNode === arguments[0]) + parent.replaceChild(currentNode, this); + // if currentNode isn't the first + else parent.insertBefore(this.previousSibling, currentNode); + } + }, + }); + }); +})([Element.prototype, CharacterData.prototype, DocumentType.prototype]); + +// polyfill for toggleAttribute + +(function (arr) { + arr.forEach(function (item) { + if (item.hasOwnProperty("toggleAttribute")) { + return; + } + Object.defineProperty(item, "toggleAttribute", { + configurable: true, + enumerable: true, + writable: true, + value: function toggleAttribute() { + var attr = arguments[0]; + if (this.hasAttribute(attr)) { + this.removeAttribute(attr); + } else { + this.setAttribute(attr, arguments[1] || ""); + } + }, + }); + }); +})([Element.prototype]); + +// polyfill for performance.now + +(function () { + if ("performance" in window === false) { + window.performance = {}; + } + + Date.now = + Date.now || + function () { + // thanks IE8 + return new Date().getTime(); + }; + + if ("now" in window.performance === false) { + var nowOffset = Date.now(); + + if (performance.timing && performance.timing.navigationStart) { + nowOffset = performance.timing.navigationStart; + } + + window.performance.now = function now() { + return Date.now() - nowOffset; + }; + } +})(); diff --git a/src/lib/projects.js b/src/lib/projects.js new file mode 100644 index 000000000..83d2ed4c0 --- /dev/null +++ b/src/lib/projects.js @@ -0,0 +1,45 @@ +const projects = { + html() { + acode.addIcon( + "html-project-icon", + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABIUExURUdwTORPJuRPJuNOJeRPJuNQJ+RPJuNOJuNPJuROJeRPJuNOJuRPJuRQJONPJuNPJeVQI+NPJeROJuNPJuZPJ+NOJuRPJuNPJkmKsooAAAAXdFJOUwA6h5uxKGh/60/VE8BBll8izqXdDHT3jnqTYwAAAQRJREFUGBl9wY22azAURtGFhMS/Vvu9/5veHeGMMrhzAvoPkqBHgWTRo4XE6ZEjqfSoImn0qCGpZQYuBpmaJMpMXESZSFLIfLioZQoSLzMCzYmMJ+lkXsBbVx0bmR546YosSGqBUheBbJEUuFgkLWROpuMsSHJklYznTKYiK2WaHwWsMiXZRxceZpkP2SQzGO1mKGQmsigTwWvXQZSJZIVMDZ12K9QyBdks0wBDuUjvVw00MjNZJ1OxmWc2o0zHLkhynl9OUuDQyoS+jGx8PfZfSS2HXrvg6unVatdzcLrlOIy6NXIog26Ekj9+qlqdtNXkOSua/qvNt28Kbq1xfL/HuPLjH4f8MW+juHZUAAAAAElFTkSuQmCC", + ); + return { + async files() { + return { + "index.html": + '\n\n\n \n \n \n \n <%name%>\n\n\n\t

    <%name%>

    \n\n', + "css/index.css": "", + "js/index.js": "", + }; + }, + icon: "html-project-icon", + }; + }, +}; + +export default { + list() { + return Object.keys(projects).map((project) => ({ + name: project, + icon: projects[project]().icon, + })); + }, + get(project) { + return projects[project]?.(); + }, + /** + * + * @param {string} project Project name + * @param {()=>Promise>} files Async function that returns a map of files + * @param {string} iconSrc Icon source (data url) + */ + set(project, files, iconSrc) { + const icon = `${project}-project-icon`; + acode.addIcon(`${project}-project-icon`, iconSrc); + projects[project] = () => ({ files, icon }); + }, + delete(project) { + delete projects[project]; + }, +}; diff --git a/src/lib/recents.js b/src/lib/recents.js index af834e214..9eb3bad84 100644 --- a/src/lib/recents.js +++ b/src/lib/recents.js @@ -1,137 +1,168 @@ -import Url from './utils/Url'; -import dialogs from '../components/dialogs'; -import helpers from './utils/helpers'; +import select from "dialogs/select"; +import escapeStringRegexp from "escape-string-regexp"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; const recents = { - /** - * @returns {Array} - */ - get files() { - return JSON.parse(localStorage.recentFiles || '[]'); - }, - /** - * @returns {{url: String, opts: Map}[]} - */ - get folders() { - return JSON.parse(localStorage.recentFolders || '[]'); - }, - set files(list) { - if (Array.isArray(list)) localStorage.recentFiles = JSON.stringify(list); - }, - set folders(list) { - if (Array.isArray(list)) localStorage.recentFolders = JSON.stringify(list); - }, - MAX: 10, - /** - * - * @param {string} file - */ - addFile(file) { - let files = this.files; - if (files.length >= this.MAX) files.pop(); - files = files.filter((i) => i !== file); - files.unshift(file); - this.files = files; - }, - addFolder(url, opts) { - if (url.slice(-1) === '/') { - url = url.slice(0, -1); - } - - let folders = this.folders; - if (folders.length >= this.MAX) folders.pop(); - folders = folders.filter((i) => i.url !== url); - folders.unshift({ - url, - opts, - }); - this.folders = folders; - }, - - removeFolder(url) { - ({ url } = Url.parse(url)); - this.folders = this.folders.filter((folder) => { - return !new RegExp('^' + folder.url).test(url); - }); - }, - - removeFile(url) { - ({ url } = Url.parse(url)); - this.files = this.files.filter((file) => { - return !new RegExp('^' + url).test(file); - }); - }, - - clear() { - this.files = []; - this.folders = []; - }, - /** - * - * @param {Array>} [extra] - * @param {"file"|"dir"|"all"} [type] - * @param {string} [title] - * @returns {Promise} - */ - select(extra, type = 'all', title = strings['open recent']) { - const all = []; - const MAX = 20; - const shortName = (name) => { - name = helpers.getVirtualPath(name); - - if (name.length > MAX) { - return '...' + name.substr(-MAX - 3); - } - return name; - }; - - if (type === 'dir' || type === 'all') { - let dirs = this.folders; - for (let dir of dirs) { - const { url } = dir; - - all.push([ - { - type: 'dir', - val: dir, - }, - shortName(url), - 'icon folder', - ]); - } - } - - if (type === 'file' || type === 'all') { - let files = this.files; - for (let file of files) { - if (!file) continue; - const name = shortName(Url.parse(file).url); - all.push([ - { - type: 'file', - val: file, - }, - name, - helpers.getIconForFile(name), - ]); - } - } - - if (type === 'all') all.push(['clear', strings.clear, 'icon clearclose']); - - if (extra) { - extra = extra.map((item) => { - item[1] = shortName(item[1]); - return item; - }); - - all.push(...extra); - } - - return dialogs.select(title, all, { - textTransform: false, - }); - }, + /** + * @returns {Array} + */ + get files() { + return JSON.parse(localStorage.recentFiles || "[]"); + }, + /** + * @returns {{url: String, opts: Map}[]} + */ + get folders() { + return JSON.parse(localStorage.recentFolders || "[]"); + }, + set files(list) { + if (Array.isArray(list)) localStorage.recentFiles = JSON.stringify(list); + }, + set folders(list) { + if (Array.isArray(list)) localStorage.recentFolders = JSON.stringify(list); + }, + MAX: 10, + /** + * + * @param {string} file + */ + addFile(file) { + let files = this.files; + if (files.length >= this.MAX) files.pop(); + files = files.filter((i) => i !== file); + files.unshift(file); + this.files = files; + }, + addFolder(url, opts) { + if (url.slice(-1) === "/") { + url = url.slice(0, -1); + } + + let folders = this.folders; + if (folders.length >= this.MAX) folders.pop(); + folders = folders.filter((i) => i.url !== url); + folders.unshift({ + url, + opts, + }); + this.folders = folders; + }, + + removeFolder(url) { + ({ url } = Url.parse(url)); + this.folders = this.folders.filter((folder) => { + return !new RegExp("^" + escapeStringRegexp(folder.url)).test(url); + }); + }, + + removeFile(url) { + ({ url } = Url.parse(url)); + this.files = this.files.filter((file) => { + return !new RegExp("^" + escapeStringRegexp(url)).test(file); + }); + }, + + clear() { + this.files = []; + this.folders = []; + }, + /** + * + * @param {Array>} [extra] + * @param {"file"|"dir"|"all"} [type] + * @param {string} [title] + * @returns {Promise} + */ + select(extra, type = "all", title = strings["open recent"]) { + const all = []; + const MAX = 20; + const shortName = (name) => { + name = helpers.getVirtualPath(name); + + if (name.length > MAX) { + return "..." + name.substr(-MAX - 3); + } + return name; + }; + + if (type === "dir" || type === "all") { + let dirs = this.folders; + for (let dir of dirs) { + const { url } = dir; + + const dirValue = { + type: "dir", + val: dir, + }; + + const tailElement = tag("span", { + className: "icon clearclose", + dataset: { + action: "clear", + }, + }); + + all.push({ + value: dirValue, + text: shortName(url), + icon: "folder", + tailElement: tailElement, + ontailclick: (e) => { + const $item = e.currentTarget.closest(".tile"); + if ($item) $item.remove(); + this.removeFolder(dir.url); + }, + }); + } + } + + if (type === "file" || type === "all") { + let files = this.files; + for (let file of files) { + if (!file) continue; + const name = shortName(Url.parse(file).url); + + const fileValue = { + type: "file", + val: file, + }; + const tailElement = tag("span", { + className: "icon clearclose", + dataset: { + action: "clear", + }, + }); + + all.push({ + value: fileValue, + text: name, + icon: helpers.getIconForFile(name), + tailElement: tailElement, + ontailclick: (e) => { + const $item = e.currentTarget.closest(".tile"); + if ($item) $item.remove(); + this.removeFile(file); + }, + }); + } + } + + if (type === "all") all.push(["clear", strings.clear, "icon clearclose"]); + + if (extra) { + extra = extra.map((item) => { + item[1] = shortName(item[1]); + return item; + }); + + all.push(...extra); + } + + return select(title, all, { + textTransform: false, + }); + }, }; export default recents; diff --git a/src/lib/remoteStorage.js b/src/lib/remoteStorage.js index f7dad0eea..96dee270a 100644 --- a/src/lib/remoteStorage.js +++ b/src/lib/remoteStorage.js @@ -1,422 +1,438 @@ -import helpers from './utils/helpers'; -import dialogs from '../components/dialogs'; -import Url from './utils/Url'; -import Sftp from './fileSystem/sftp'; -import Ftp from './fileSystem/ftp'; -import fsOperation from './fileSystem/fsOperation'; -import URLParse from 'url-parse'; +import fsOperation from "fileSystem"; +import Ftp from "fileSystem/ftp"; +import Sftp from "fileSystem/sftp"; +import loader from "dialogs/loader"; +import multiPrompt from "dialogs/multiPrompt"; +import URLParse from "url-parse"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; export default { - /** - * - * @param {...any} args [username, password, hostname, port, ftps, active, name] - */ - async addFtp(...args) { - let stopConnection = false; - const { - username, // - password, - hostname, - port, - ftps, - active, - alias, - } = await prompt(...args); - const security = ftps ? 'ftps' : 'ftp'; - const mode = active ? 'active' : 'passive'; - const ftp = Ftp(username, password, hostname, port, security, mode); - try { - dialogs.loader.create(strings['add ftp'], strings.connecting + '...', { - timeout: 10000, - callback() { - stopConnection = true; - }, - }); - const home = await ftp.homeDirectory(); + /** + * + * @param {...any} args [username, password, hostname, port, ftps, active, name] + */ + async addFtp(...args) { + let stopConnection = false; + const { + username, // + password, + hostname, + port, + ftps, + active, + alias, + } = await prompt(...args); + const security = ftps ? "ftps" : "ftp"; + const mode = active ? "active" : "passive"; + const ftp = Ftp(hostname, username, password, port, security, mode); + try { + loader.create(strings["add ftp"], strings["connecting..."], { + timeout: 10000, + callback() { + stopConnection = true; + }, + }); + const [home] = await Promise.all([ftp.getWorkingDirectory(), loadAd()]); - if (stopConnection) { - stopConnection = false; - return; - } + if (stopConnection) { + stopConnection = false; + return; + } - const url = Url.formate({ - protocol: 'ftp:', - username, - password, - hostname, - port, - path: '/', - query: { - mode, - security, - }, - }); + const url = Url.formate({ + protocol: "ftp:", + username, + password, + hostname, + port, + path: "/", + query: { + mode, + security, + }, + }); - const res = { - url, - alias, - name: alias, - type: 'ftp', - home: null, - }; + const res = { + url, + alias, + name: alias, + type: "ftp", + home: null, + }; - if (home !== '/') { - res.home = home; - } - dialogs.loader.destroy(); - return res; - } catch (err) { - if (stopConnection) { - stopConnection = false; - return; - } + if (home !== "/") { + res.home = home; + } + loader.destroy(); + if (IS_FREE_VERSION && (await window.iad?.isLoaded())) { + window.iad.show(); + } + return res; + } catch (err) { + if (stopConnection) { + stopConnection = false; + return; + } - dialogs.loader.destroy(); - await helpers.error(err); - return await this.addFtp( - username, - password, - hostname, - alias, - port, - security, - mode, - ); - } + loader.destroy(); + await helpers.error(err); + return await this.addFtp( + username, + password, + hostname, + alias, + port, + security, + mode, + ); + } - function prompt(username, password, hostname, alias, port, security, mode) { - port = port || 21; - security = security || 'ftp'; - mode = mode || 'passive'; - return dialogs.multiPrompt(strings['add ftp'], [ - { - id: 'alias', - placeholder: 'Name', - type: 'text', - value: alias ? alias : '', - required: true, - }, - { - id: 'username', - placeholder: 'Username (optional)', - type: 'text', - value: username, - }, - { - id: 'hostname', - placeholder: 'Hostname', - type: 'text', - required: true, - value: hostname, - }, - { - id: 'password', - placeholder: 'Password (optional)', - type: 'password', - value: password, - }, - [ - 'Security type: ', - { - id: 'ftp', - placeholder: 'FTP', - name: 'type', - type: 'radio', - value: security === 'ftp' ? true : false, - }, - { - id: 'ftps', - placeholder: 'FTPS', - name: 'type', - type: 'radio', - value: security === 'ftps' ? true : false, - }, - ], - [ - 'Connection mode: ', - { - id: 'active', - placeholder: 'Active', - name: 'mode', - type: 'radio', - value: mode === 'active' ? true : false, - }, - { - id: 'passive', - placeholder: 'Passive', - name: 'mode', - type: 'radio', - value: mode === 'passive' ? true : false, - }, - ], - { - id: 'port', - placeholder: 'Port (optional)', - type: 'number', - value: port, - }, - ]); - } - }, - /** - * @param {...any} args [hostname, username, keyFile, password, passphrase, port, name] - */ - async addSftp(...args) { - let stopConnection = false; + function prompt(username, password, hostname, alias, port, security, mode) { + port = port || 21; + security = security || "ftp"; + mode = mode || "passive"; + return multiPrompt(strings["add ftp"], [ + { + id: "alias", + placeholder: strings.name, + type: "text", + value: alias ? alias : "", + required: true, + }, + { + id: "username", + placeholder: `${strings.username} (${strings.optional})`, + type: "text", + value: username, + }, + { + id: "hostname", + placeholder: strings.hostname, + type: "text", + required: true, + value: hostname, + }, + { + id: "password", + placeholder: `${strings.password} (${strings.optional})`, + type: "password", + value: password, + }, + [ + `${strings["security type"]}: `, + { + id: "ftp", + placeholder: "FTP", + name: "type", + type: "radio", + value: security === "ftp" ? true : false, + }, + { + id: "ftps", + placeholder: "FTPS", + name: "type", + type: "radio", + value: security === "ftps" ? true : false, + }, + ], + [ + `${strings["connection mode"]}: `, + { + id: "active", + placeholder: "Active", + name: "mode", + type: "radio", + value: mode === "active" ? true : false, + }, + { + id: "passive", + placeholder: "Passive", + name: "mode", + type: "radio", + value: mode === "passive" ? true : false, + }, + ], + { + id: "port", + placeholder: `${strings.port} (${strings.optional})`, + type: "number", + value: port, + }, + ]); + } + }, + /** + * @param {...any} args [hostname, username, keyFile, password, passphrase, port, name] + */ + async addSftp(...args) { + let stopConnection = false; - const { - hostname, - username, - keyFile, - password, - passPhrase, - port, - alias, - usePassword, - } = await prompt(...args); - const authType = usePassword ? 'password' : 'keyFile'; + const { + hostname, + username, + keyFile, + password, + passPhrase, + port, + alias, + usePassword, + } = await prompt(...args); + const authType = usePassword ? "password" : "keyFile"; - dialogs.loader.create(strings['add sftp'], strings.connecting + '...', { - timeout: 10000, - callback() { - stopConnection = true; - }, - }); - const connection = Sftp(hostname, parseInt(port), username, { - password, - keyFile, - passPhrase, - }); + loader.create(strings["add sftp"], strings["connecting..."], { + timeout: 10000, + callback() { + stopConnection = true; + }, + }); + const connection = Sftp(hostname, Number.parseInt(port), username, { + password, + keyFile, + passPhrase, + }); - try { - const home = await connection.pwd(); + try { + const [home] = await Promise.all([connection.pwd(), loadAd()]); - if (stopConnection) { - stopConnection = false; - return; - } + if (stopConnection) { + stopConnection = false; + return; + } - let localKeyFile = ''; - if (keyFile) { - let fs = fsOperation(keyFile); - const rawData = await fs.readFile(); - const text = new TextDecoder('utf-8').decode(new Uint8Array(rawData)); + let localKeyFile = ""; + if (keyFile) { + let fs = fsOperation(keyFile); + const text = await fs.readFile("utf8"); - //Original key file sometimes gives permission error - //To solve permission error - const filename = keyFile.hashCode(); - localKeyFile = Url.join(DATA_STORAGE, filename); - fs = fsOperation(localKeyFile); - const exists = await fs.exists(); - if (exists) { - await fs.writeFile(text); - } else { - let fs = fsOperation(DATA_STORAGE); - await fs.createFile(filename, text); - } - } + //Original key file sometimes gives permission error + //To solve permission error + const filename = keyFile.hashCode(); + localKeyFile = Url.join(DATA_STORAGE, filename); + fs = fsOperation(localKeyFile); + const exists = await fs.exists(); + if (exists) { + await fs.writeFile(text); + } else { + let fs = fsOperation(DATA_STORAGE); + await fs.createFile(filename, text); + } + } - const url = Url.formate({ - protocol: 'sftp:', - hostname, - username, - password, - port, - path: '/', - query: { - keyFile: localKeyFile, - passPhrase, - }, - }); - dialogs.loader.destroy(); - return { - alias, - name: alias, - url, - type: 'sftp', - home, - }; - } catch (err) { - if (stopConnection) { - stopConnection = false; - return; - } + const url = Url.formate({ + protocol: "sftp:", + hostname, + username, + password, + port, + path: "/", + query: { + keyFile: localKeyFile, + passPhrase, + }, + }); + loader.destroy(); + if (IS_FREE_VERSION && (await window.iad?.isLoaded())) { + window.iad.show(); + } + return { + alias, + name: alias, + url, + type: "sftp", + home, + }; + } catch (err) { + if (stopConnection) { + stopConnection = false; + return; + } - dialogs.loader.destroy(); - await helpers.error(err); - return await this.addSftp( - hostname, - username, - keyFile, - password, - passPhrase, - port, - alias, - authType, - ); - } + loader.destroy(); + await helpers.error(err); + return await this.addSftp( + hostname, + username, + keyFile, + password, + passPhrase, + port, + alias, + authType, + ); + } - function prompt( - hostname, - username, - keyFile, - password, - passPhrase, - port, - alias, - authType = 'password', - ) { - port = port || 22; + function prompt( + hostname, + username, + keyFile, + password, + passPhrase, + port, + alias, + authType = "password", + ) { + port = port || 22; - const MODE_PASS = authType === 'password'; - const inputs = [ - { - id: 'alias', - placeholder: 'Name', - type: 'text', - value: alias ? alias : '', - required: true, - }, - { - id: 'username', - placeholder: 'Username (optional)', - type: 'text', - value: username, - }, - { - id: 'hostname', - placeholder: 'Hostname', - type: 'text', - required: true, - value: hostname, - }, - [ - 'Authentication type: ', - { - id: 'usePassword', - placeholder: 'Password', - name: 'authType', - type: 'radio', - value: MODE_PASS, - onchange() { - if (!!this.value) { - this.prompt.$body.get('#password').hidden = false; - this.prompt.$body.get('#keyFile').hidden = true; - this.prompt.$body.get('#passPhrase').hidden = true; - } - }, - }, - { - id: 'useKeyFile', - placeholder: 'Key file', - name: 'authType', - type: 'radio', - value: !MODE_PASS, - onchange() { - if (!!this.value) { - const $password = this.prompt.$body.get('#password'); - $password.hidden = true; - $password.value = ''; - this.prompt.$body.get('#keyFile').hidden = false; - this.prompt.$body.get('#passPhrase').hidden = false; - } - }, - }, - ], - { - id: 'password', - placeholder: 'Password', - name: 'password', - type: 'password', - value: password, - hidden: !MODE_PASS, - }, - { - id: 'keyFile', - placeholder: 'Select key file', - name: 'keyFile', - hidden: MODE_PASS, - value: keyFile, - type: 'text', - onclick() { - sdcard.openDocumentFile((res) => { - this.value = res.uri; - }); - }, - }, - { - id: 'passPhrase', - placeholder: 'Passphrase (optional)', - name: 'passPhrase', - type: 'password', - hidden: MODE_PASS, - value: passPhrase, - }, - { - id: 'port', - placeholder: 'Port (optional)', - type: 'number', - value: port, - }, - ]; + const MODE_PASS = authType === "password"; + const inputs = [ + { + id: "alias", + placeholder: strings.name, + type: "text", + value: alias ? alias : "", + required: true, + }, + { + id: "username", + placeholder: `${strings.username} (${strings.optional})`, + type: "text", + value: username, + }, + { + id: "hostname", + placeholder: strings.hostname, + type: "text", + required: true, + value: hostname, + }, + [ + "Authentication type: ", + { + id: "usePassword", + placeholder: strings.password, + name: "authType", + type: "radio", + value: MODE_PASS, + onchange() { + if (!!this.value) { + this.prompt.$body.get("#password").hidden = false; + this.prompt.$body.get("#keyFile").hidden = true; + this.prompt.$body.get("#passPhrase").hidden = true; + } + }, + }, + { + id: "useKeyFile", + placeholder: strings["key file"], + name: "authType", + type: "radio", + value: !MODE_PASS, + onchange() { + if (!!this.value) { + const $password = this.prompt.$body.get("#password"); + $password.hidden = true; + $password.value = ""; + this.prompt.$body.get("#keyFile").hidden = false; + this.prompt.$body.get("#passPhrase").hidden = false; + } + }, + }, + ], + { + id: "password", + placeholder: strings.password, + name: "password", + type: "password", + value: password, + hidden: !MODE_PASS, + }, + { + id: "keyFile", + placeholder: strings["select key file"], + name: "keyFile", + hidden: MODE_PASS, + value: keyFile, + type: "text", + onclick() { + sdcard.openDocumentFile((res) => { + this.value = res.uri; + }); + }, + }, + { + id: "passPhrase", + placeholder: `${strings.passphrase} (${strings.optional})`, + name: "passPhrase", + type: "password", + hidden: MODE_PASS, + value: passPhrase, + }, + { + id: "port", + placeholder: `${strings.port} (${strings.optional})`, + type: "number", + value: port, + }, + ]; - return dialogs.multiPrompt(strings['add sftp'], inputs); - } - }, - edit({ name, storageType, url }) { - let { username, password, hostname, port, query } = URLParse(url, true); + return multiPrompt(strings["add sftp"], inputs); + } + }, + edit({ name, storageType, url }) { + let { username, password, hostname, port, query } = URLParse(url, true); - if (username) { - username = decodeURIComponent(username); - } + if (username) { + username = decodeURIComponent(username); + } - if (password) { - password = decodeURIComponent(password); - } + if (password) { + password = decodeURIComponent(password); + } - if (storageType === 'ftp') { - let { security, mode } = query; - if (security) { - security = decodeURIComponent(security); - } + if (storageType === "ftp") { + let { security, mode } = query; + if (security) { + security = decodeURIComponent(security); + } - if (mode) { - mode = decodeURIComponent(mode); - } + if (mode) { + mode = decodeURIComponent(mode); + } - return this.addFtp( - username, - password, - hostname, - name, - port, - security, - mode, - ); - } + return this.addFtp( + username, + password, + hostname, + name, + port, + security, + mode, + ); + } - if (storageType === 'sftp') { - let { passPhrase, keyFile } = query; - if (passPhrase) { - passPhrase = decodeURIComponent(passPhrase); - } + if (storageType === "sftp") { + let { passPhrase, keyFile } = query; + if (passPhrase) { + passPhrase = decodeURIComponent(passPhrase); + } - if (keyFile) { - keyFile = decodeURIComponent(keyFile); - } + if (keyFile) { + keyFile = decodeURIComponent(keyFile); + } - return this.addSftp( - hostname, - username, - keyFile, - password, - passPhrase, - port, - name, - password ? 'password' : 'key', - ); - } + return this.addSftp( + hostname, + username, + keyFile, + password, + passPhrase, + port, + name, + password ? "password" : "key", + ); + } - return null; - }, + return null; + }, }; + +async function loadAd() { + if (!IS_FREE_VERSION) return; + try { + if (!(await window.iad?.isLoaded())) { + toast(strings.loading); + await window.iad.load(); + } + } catch (error) {} +} diff --git a/src/lib/removeAds.js b/src/lib/removeAds.js new file mode 100644 index 000000000..2188e810e --- /dev/null +++ b/src/lib/removeAds.js @@ -0,0 +1,34 @@ +import purchaseListener from "handlers/purchase"; +import helpers from "utils/helpers"; + +/** + * Remove ads after purchase + * @returns {Promise} + */ +export default function removeAds() { + return new Promise((resolve, reject) => { + iap.getProducts(["acode_pro_new"], (products) => { + const [product] = products; + + iap.setPurchaseUpdatedListener(...purchaseListener(onpurchase, reject)); + + iap.purchase( + product.productId, + (code) => { + // ignore + }, + (err) => { + alert(strings.error, err); + }, + ); + }); + + function onpurchase() { + resolve(null); + helpers.hideAd(true); + localStorage.setItem("acode_pro", "true"); + window.IS_FREE_VERSION = false; + toast(strings["thank you :)"]); + } + }); +} diff --git a/src/lib/restoreFiles.js b/src/lib/restoreFiles.js new file mode 100644 index 000000000..345d2280c --- /dev/null +++ b/src/lib/restoreFiles.js @@ -0,0 +1,28 @@ +import EditorFile from "./editorFile"; + +/** + * + * @param {import('./editorFile').FileOptions[]} files + * @param {(count: number)=>void} callback + */ +export default async function restoreFiles(files) { + let rendered = false; + + await Promise.all( + files.map(async (file, i) => { + rendered = file.render; + + if (i === files.length - 1 && !rendered) { + file.render = true; + } + + const { filename, render = false } = file; + const options = { + ...file, + render, + emitUpdate: false, + }; + new EditorFile(filename, options); + }), + ); +} diff --git a/src/lib/restoreTheme.js b/src/lib/restoreTheme.js index 51603314a..8c88650a6 100644 --- a/src/lib/restoreTheme.js +++ b/src/lib/restoreTheme.js @@ -1,58 +1,38 @@ -import Irid from 'irid'; -import constants from './constants'; -import fsOperation from './fileSystem/fsOperation'; -import Url from './utils/Url'; - -export default async function restoreTheme(darken) { - if (darken && document.body.classList.contains('loading')) return; - - let theme = DOES_SUPPORT_THEME ? appSettings.value.appTheme : 'default'; - const themeList = constants.appThemeList; - let themeData = themeList[theme]; - let type = themeData.type; - - if (!themeData || (!themeData.isFree && IS_FREE_VERSION)) { - theme = 'default'; - themeData = themeList[theme]; - appSettings.value.appTheme = theme; - appSettings.update(); - } - - if (theme === 'custom') { - const color = appSettings.value.customTheme['--primary-color']; - themeData.primary = Irid(color).toHexString(); - themeData.darken = Irid(themeData.primary).darken(0.4).toHexString(); - - type = appSettings.value.customThemeMode; - } - - let hexColor = darken ? themeData.darken : themeData.primary; - - app.setAttribute('theme', theme); - system.setUiTheme(hexColor, type); - - if (DOES_SUPPORT_THEME) { - document.body.setAttribute('theme-type', type); - const style = getComputedStyle(app); - const loaderFile = Url.join(ASSETS_DIRECTORY, 'res/tail-spin.svg'); - const textColor = style.getPropertyValue('--text-main-color').trim(); - const svgName = '__tail-spin__.svg'; - const img = Url.join(DATA_STORAGE, svgName); - - localStorage.__primary_color = style.getPropertyValue('--primary-color'); - try { - let fs = fsOperation(loaderFile); - const svg = await fs.readFile('utf-8'); - - fs = fsOperation(img); - if (!(await fs.exists())) { - await fsOperation(DATA_STORAGE).createFile(svgName); - } - const text = svg.replace(/#fff/g, textColor); - await fs.writeFile(text); - app.style.cssText = `--tail-spin: url(${img})`; - } catch (error) { - console.error(error); - } - } +import themes from "theme/list"; +import Color from "utils/color"; +import appSettings from "./settings"; + +let count = 0; + +/** + * Restores the theme or darkens the status bar and navigation bar + * Used when dialogs are opened which has mask that darkens the background + * @param {boolean} darken Whether to darken the status bar and navigation bar + * @returns + */ +export default function restoreTheme(darken = false) { + if (!count && !darken) return; + count += darken ? 1 : -1; + if (darken !== !!count) return; + if (darken && document.body.classList.contains("loading")) return; + + let themeName = DOES_SUPPORT_THEME ? appSettings.value.appTheme : "default"; + let theme = themes.get(themeName); + + if (theme?.version !== "free" && IS_FREE_VERSION) { + themeName = "default"; + theme = themes.get(themeName); + appSettings.value.appTheme = themeName; + appSettings.update(); + } + + if ( + !theme.darkenedPrimaryColor || + theme.darkenedPrimaryColor === theme.primaryColor + ) { + theme.darkenPrimaryColor(); + } + const color = darken ? theme.darkenedPrimaryColor : theme.primaryColor; + const hexColor = Color(color).hex.toString(); + system.setUiTheme(hexColor, theme.toJSON("hex")); } diff --git a/src/lib/run.js b/src/lib/run.js index 56ec7fb12..b6dcc02b1 100644 --- a/src/lib/run.js +++ b/src/lib/run.js @@ -1,15 +1,24 @@ -import mimeType from 'mime-types'; -import * as marked from 'marked'; -import mustache from 'mustache'; -import $_console from '../views/console.hbs'; -import $_markdown from '../views/markdown.hbs'; -import helpers from './utils/helpers'; -import dialogs from '../components/dialogs'; -import git from './git'; -import constants from './constants'; -import fsOperation from './fileSystem/fsOperation'; -import Url from './utils/Url'; -import openFolder from './openFolder'; +import fsOperation from "fileSystem"; +import tutorial from "components/tutorial"; +import alert from "dialogs/alert"; +import box from "dialogs/box"; +import markdownIt from "markdown-it"; +import anchor from "markdown-it-anchor"; +import MarkdownItGitHubAlerts from "markdown-it-github-alerts"; +import mimeType from "mime-types"; +import mustache from "mustache"; +import browser from "plugins/browser"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; +import $_console from "views/console.hbs"; +import $_markdown from "views/markdown.hbs"; +import constants from "./constants"; +import EditorFile from "./editorFile"; +import openFolder from "./openFolder"; +import appSettings from "./settings"; + +/**@type {Server} */ +let webServer; /** * Starts the server and run the active file in browser @@ -18,315 +27,315 @@ import openFolder from './openFolder'; * @param {Boolean} runFile */ async function run( - isConsole = false, - target = appSettings.value.previewMode, - runFile = false, + isConsole = false, + target = appSettings.value.previewMode, + runFile = false, ) { - if (!Acode.$runBtn.isConnected && !isConsole) return; - - if (!isConsole && !localStorage.__init_runPreview) { - localStorage.__init_runPreview = true; - - await new Promise((resolve) => { - dialogs.alert(strings.info.toUpperCase(), strings['preview info'], () => { - resolve(); - }); - }); - } - - const activeFile = isConsole ? null : editorManager.activeFile; - const uuid = helpers.uuid(); - - let isLoading = false; - let filename, pathName, extension; - let port = constants.PORT; - let EXECUTING_SCRIPT = uuid + '_script.js'; - const MIMETYPE_HTML = mimeType.lookup('html'); - const CONSOLE_SCRIPT = uuid + '_console.js'; - const MARKDOWN_STYLE = uuid + '_md.css'; - const queue = []; - - if (activeFile) { - filename = activeFile.filename; - pathName = activeFile.location; - extension = helpers.extname(filename); - - if (!pathName && activeFile.uri) { - pathName = Url.dirname(activeFile.uri); - } - } - - if (runFile && extension === 'svg') { - try { - const fs = fsOperation(activeFile.uri); - const res = await fs.readFile(); - const blob = new Blob([new Uint8Array(res)], { - type: mimeType.lookup(extension), - }); - - dialogs.box(filename, ``); - } catch (err) { - helpers.error(err); - } - return; - } - - if (!runFile && filename !== 'index.html' && pathName) { - const folder = openFolder.find(activeFile.uri); - - if (folder) { - const { url } = folder; - const fs = fsOperation(Url.join(url, 'index.html')); - - try { - if (await fs.exists()) { - filename = 'index.html'; - extension = 'html'; - pathName = url; - start(); - return; - } - - next(); - } catch (err) { - helpers.error(err); - return; - } - } - } - - next(); - - function next() { - if (extension === 'js' || isConsole) startConsole(); - else start(); - } - - function startConsole() { - runConsole(); - start(); - } - - function runConsole() { - if (!isConsole) EXECUTING_SCRIPT = activeFile.filename; - isConsole = true; - target = 'inapp'; - filename = 'console.html'; - pathName = `${ASSETS_DIRECTORY}www/`; - port = constants.CONSOLE_PORT; - } - - function start() { - if (target === 'browser') { - system.isPowerSaveMode( - (res) => { - if (res) - dialogs.alert(strings.info, strings['powersave mode warning']); - else startServer(); - }, - () => { - startServer(); - }, - ); - } else startServer(); - } - - function startServer() { - webserver.stop(); - webserver.start( - () => { - openBrowser(); - }, - (err) => { - if (err === 'Server already running') { - openBrowser(); - } else { - ++port; - start(); - } - }, - port, - ); - - webserver.onRequest(handleRequest); - } - - function handleRequest(req) { - const reqId = req.requestId; - let reqPath = req.path.substr(1); - - if (reqPath === '/') { - reqPath = 'index.html'; - } - - const ext = helpers.extname(reqPath); - let url = null; - - switch (reqPath) { - case CONSOLE_SCRIPT: - if (isConsole || appSettings.value.console === 'legacy') { - url = `${ASSETS_DIRECTORY}/js/build/console.build.js`; - } else { - url = `${DATA_STORAGE}/eruda.js`; - } - sendFileContent(url, reqId, 'application/javascript'); - break; - - case EXECUTING_SCRIPT: - let text; - if (extension === 'js') text = activeFile.session.getValue(); - else text = ''; - sendText(text, reqId, 'application/javascript'); - break; - - case MARKDOWN_STYLE: - url = appSettings.value.markdownStyle; - if (url) sendFileContent(url, reqId, 'text/css'); - else sendText('img {max-width: 100%;}', reqId, 'text/css'); - break; - - default: - sendByExt(); - break; - } - - async function sendByExt() { - if (isConsole) { - if (reqPath === 'console.html') { - sendText( - mustache.render($_console, { - CONSOLE_SCRIPT, - EXECUTING_SCRIPT, - }), - reqId, - MIMETYPE_HTML, - ); - return; - } - - if (reqPath === 'favicon.ico') { - sendIco(ASSETS_DIRECTORY, reqId); - return; - } - } - - if (activeFile.mode === 'single') { - if (filename === reqPath) { - sendText( - activeFile.session.getValue(), - reqId, - mimeType.lookup(filename), - ); - } else { - error(reqId); - } - return; - } - - let url = activeFile.uri; - let file = null; - - if (pathName) { - url = Url.join(pathName, reqPath); - file = editorManager.getFile(url, 'uri'); - } else if (activeFile.type === 'git') { - file = activeFile; - } - - switch (ext) { - case 'htm': - case 'html': - if (file) { - sendHTML(file.session.getValue(), reqId); - } else { - sendFileContent(url, reqId, MIMETYPE_HTML); - } - break; - - case 'md': - if (file) { - const html = marked(file.session.getValue()); - const doc = mustache.render($_markdown, { - html, - filename, - MARKDOWN_STYLE, - }); - sendText(doc, reqId, MIMETYPE_HTML); - } - break; - - default: - if (file && file.type === 'git') { - try { - const gitFile = await git.getGitFile(file.record, reqPath); - const data = helpers.b64toBlob( - gitFile, - mimeType.lookup(reqPath), - ); - - const id = file.record.sha + encodeURIComponent(reqPath); - const cacheFile = id.hashCode() + '.' + ext; - const uri = Url.join(CACHE_STORAGE, cacheFile); - const cacheDirFs = fsOperation(CACHE_STORAGE); - const cacheFileFs = fsOperation(uri); - - if (await cacheFileFs.exists()) { - sendFile(uri, reqId); - break; - } - - await cacheDirFs.createFile(cacheFile); - await cacheFileFs.writeFile(data); - - sendFile(uri, reqId); - } catch (err) { - if (reqPath === 'favicon.ico') { - sendIco(ASSETS_DIRECTORY, reqId); - } else { - error(reqId); - } - } - } else { - if (file && file.isUnsaved) { - sendText( - file.session.getValue(), - reqId, - mimeType.lookup(file.filename), - ); - } else if (url) { - if (reqPath === 'favicon.ico') { - sendIco(ASSETS_DIRECTORY, reqId); - } else { - sendFile(url, reqId); - } - } else { - error(reqId); - } - } - break; - } - } - } - - function error(id) { - webserver.sendResponse(id, { - status: 404, - body: 'File not found!', - }); - } - - function sendIco(assets, reqId) { - const ico = Url.join(assets, 'res/logo/favicon.ico'); - sendFile(ico, reqId); - } - - /** - * - * @param {string} text - * @param {string} id - */ - function sendHTML(text, id) { - const js = ` + if (!isConsole && !runFile) { + const { serverPort, previewPort, previewMode, disableCache, host } = + appSettings.value; + if (serverPort !== previewPort) { + const src = `http://${host}:${previewPort}`; + if (previewMode === "browser") { + system.openInBrowser(src); + return; + } + + browser.open(src); + return; + } + } + + /** @type {EditorFile} */ + const activeFile = isConsole ? null : editorManager.activeFile; + if (!isConsole && !(await activeFile?.canRun())) return; + + if (!isConsole && !localStorage.__init_runPreview) { + localStorage.__init_runPreview = true; + tutorial("run-preview", strings["preview info"]); + } + + const uuid = helpers.uuid(); + + let isLoading = false; + let filename, pathName, extension; + let port = appSettings.value.serverPort; + let EXECUTING_SCRIPT = uuid + "_script.js"; + const MIMETYPE_HTML = mimeType.lookup("html"); + const CONSOLE_SCRIPT = uuid + "_console.js"; + const MARKDOWN_STYLE = uuid + "_md.css"; + const queue = []; + + if (activeFile) { + filename = activeFile.filename; + pathName = activeFile.location; + extension = Url.extname(filename); + + if (!pathName && activeFile.uri) { + pathName = Url.dirname(activeFile.uri); + } + } + + if (runFile && extension === "svg") { + try { + const fs = fsOperation(activeFile.uri); + const res = await fs.readFile(); + const blob = new Blob([new Uint8Array(res)], { + type: mimeType.lookup(extension), + }); + + box(filename, ``); + } catch (err) { + helpers.error(err); + } + return; + } + + if (!runFile && filename !== "index.html" && pathName) { + const folder = openFolder.find(activeFile.uri); + + if (folder) { + const { url } = folder; + const fs = fsOperation(Url.join(url, "index.html")); + + try { + if (await fs.exists()) { + filename = "index.html"; + extension = "html"; + pathName = url; + start(); + return; + } + + next(); + return; + } catch (err) { + helpers.error(err); + return; + } + } + } + + next(); + + function next() { + if (extension === ".js" || isConsole) startConsole(); + else start(); + } + + function startConsole() { + runConsole(); + start(); + } + + function runConsole() { + if (!isConsole) EXECUTING_SCRIPT = activeFile.filename; + isConsole = true; + target = "inapp"; + filename = "console.html"; + pathName = `${ASSETS_DIRECTORY}www/`; + port = constants.CONSOLE_PORT; + } + + function start() { + if (target === "browser") { + system.isPowerSaveMode((res) => { + if (res) { + alert(strings.info, strings["powersave mode warning"]); + } else { + startServer(); + } + }, startServer); + } else { + startServer(); + } + } + + function startServer() { + webServer?.stop(); + webServer = CreateServer(port, openBrowser, onError); + webServer.setOnRequestHandler(handleRequest); + + function onError(err) { + if (err === "Server already running") { + openBrowser(); + } else { + ++port; + start(); + } + } + } + + /** + * Requests handler + * @param {object} req + * @param {string} req.requestId + * @param {string} req.path + */ + function handleRequest(req) { + const reqId = req.requestId; + let reqPath = req.path.substring(1); + + if (!reqPath || reqPath.endsWith("/")) { + reqPath += "index.html"; + } + + const ext = Url.extname(reqPath); + let url = null; + + switch (reqPath) { + case CONSOLE_SCRIPT: + if ( + isConsole || + appSettings.value.console === appSettings.CONSOLE_LEGACY + ) { + url = `${ASSETS_DIRECTORY}/build/console.js`; + } else { + url = `${DATA_STORAGE}/eruda.js`; + } + sendFileContent(url, reqId, "application/javascript"); + break; + + case EXECUTING_SCRIPT: { + const text = activeFile?.session.getValue() || ""; + sendText(text, reqId, "application/javascript"); + break; + } + + case MARKDOWN_STYLE: + url = appSettings.value.markdownStyle; + if (url) sendFileContent(url, reqId, "text/css"); + else sendText("img {max-width: 100%;}", reqId, "text/css"); + break; + + default: + sendByExt(); + break; + } + + async function sendByExt() { + if (isConsole) { + if (reqPath === "console.html") { + sendText( + mustache.render($_console, { + CONSOLE_SCRIPT, + EXECUTING_SCRIPT, + }), + reqId, + MIMETYPE_HTML, + ); + return; + } + + if (reqPath === "favicon.ico") { + sendIco(ASSETS_DIRECTORY, reqId); + return; + } + } + + if (activeFile.mode === "single") { + if (filename === reqPath) { + sendText( + activeFile.session.getValue(), + reqId, + mimeType.lookup(filename), + ); + } else { + error(reqId); + } + return; + } + + let url = activeFile.uri; + let file = activeFile.SAFMode === "single" ? activeFile : null; + + if (pathName) { + url = Url.join(pathName, reqPath); + file = editorManager.getFile(url, "uri"); + } else if (!activeFile.uri) { + file = activeFile; + } + + switch (ext) { + case ".htm": + case ".html": + if (file && file.loaded && file.isUnsaved) { + sendHTML(file.session.getValue(), reqId); + } else { + sendFileContent(url, reqId, MIMETYPE_HTML); + } + break; + + case ".md": + if (file) { + const html = markdownIt({ html: true }) + .use(MarkdownItGitHubAlerts) + .use(anchor, { + slugify: (s) => + s + .trim() + .toLowerCase() + .replace(/[^a-z0-9]+/g, "-"), + }) + .render(file.session.getValue()); + const doc = mustache.render($_markdown, { + html, + filename, + MARKDOWN_STYLE, + }); + sendText(doc, reqId, MIMETYPE_HTML); + } + break; + + default: + if (file && file.loaded && file.isUnsaved) { + sendText( + file.session.getValue(), + reqId, + mimeType.lookup(file.filename), + ); + } else if (url) { + if (reqPath === "favicon.ico") { + sendIco(ASSETS_DIRECTORY, reqId); + } else { + sendFile(url, reqId); + } + } else { + error(reqId); + } + break; + } + } + } + + /** + * Sends 404 error + * @param {string} id + */ + function error(id) { + webServer?.send(id, { + status: 404, + body: "File not found!", + }); + } + + /** + * Sends favicon + * @param {string} assets + * @param {string} reqId + */ + function sendIco(assets, reqId) { + const ico = Url.join(assets, "res/logo/favicon.ico"); + sendFile(ico, reqId); + } + + /** + * Sends HTML file + * @param {string} text + * @param {string} id + */ + function sendHTML(text, id) { + const js = ` `; - text = text.replace(/><\/script>/g, ' crossorigin="anonymous">'); - const part = text.split(''); - if (part.length === 2) { - text = `${part[0]}${js}${part[1]}`; - } else if (//i.test(text)) { - text = text.replace('', `${js}`); - } else { - text = `${js}` + text; - } - sendText(text, id); - } - - async function sendFile(path, id) { - if (isLoading) { - queue.push(() => { - sendFile(path, id); - }); - return; - } - const protocol = Url.getProtocol(path); - const ext = Url.extname(path); - const mimetype = mimeType.lookup(ext); - if (/s?ftp:/.test(protocol)) { - const cacheFile = Url.join( - CACHE_STORAGE, - protocol.slice(0, -1) + path.hashCode(), - ); - isLoading = true; - const fs = fsOperation(path); - try { - await fs.readFile(); // Because reading the remote file will create cache file - send(cacheFile, mimetype); // send the created file here - } catch (err) { - error(id); - } - - isLoading = false; - const action = queue.splice(-1, 1)[0]; - if (typeof action === 'function') action(); - } else if (protocol === 'content:') { - sdcard.formatUri( - path, - (uri) => { - send(uri, mimetype); - }, - () => { - error(id); - }, - ); - } else { - send(path, mimetype); - } - - function send(path, mimetype) { - webserver.sendResponse(id, { - status: 200, - path, - headers: { - 'Content-Type': mimetype, - }, - }); - } - } - - async function sendFileContent(url, id, mime, processText) { - const fs = fsOperation(url); - - if (!(await fs.exists())) { - error(id); - return; - } - - let text = await fs.readFile('utf-8'); - text = processText ? processText(text) : text; - if (mime === MIMETYPE_HTML) { - sendHTML(text, id); - } else { - sendText(text, id, mime); - } - } - - function sendText(text, id, mimeType, processText) { - webserver.sendResponse(id, { - status: 200, - body: processText ? processText(text) : text, - headers: { - 'Content-Type': mimeType || 'text/html', - }, - }); - } - - function openBrowser() { - const src = `http://localhost:${port}/${filename}`; - if (target === 'browser') { - system.openInBrowser(src); - return; - } - - const browser = system.inAppBrowser(src, filename, !isConsole); - browser.onOpenExternalBrowser = () => { - target = "browser"; - } - } + text = text.replace(/><\/script>/g, ' crossorigin="anonymous">'); + const part = text.split(""); + if (part.length === 2) { + text = `${part[0]}${js}${part[1]}`; + } else if (//i.test(text)) { + text = text.replace("", `${js}`); + } else { + text = `${js}` + text; + } + sendText(text, id); + } + + /** + * Sends file + * @param {string} path + * @param {string} id + * @returns + */ + async function sendFile(path, id) { + if (isLoading) { + queue.push(() => { + sendFile(path, id); + }); + return; + } + + isLoading = true; + const protocol = Url.getProtocol(path); + const ext = Url.extname(path); + const mimetype = mimeType.lookup(ext); + if (/s?ftp:/.test(protocol)) { + const cacheFile = Url.join( + CACHE_STORAGE, + protocol.slice(0, -1) + path.hashCode(), + ); + const fs = fsOperation(path); + try { + await fs.readFile(); // Because reading the remote file will create cache file + path = cacheFile; + } catch (err) { + error(id); + isLoading = false; + return; + } + } else if (protocol === "content:") { + path = await new Promise((resolve, reject) => { + sdcard.formatUri(path, resolve, reject); + }); + } else if (!/^file:/.test(protocol)) { + const fileContent = await fsOperation(path).readFile(); + const tempFileName = path.hashCode(); + const tempFile = Url.join(CACHE_STORAGE, tempFileName); + if (!(await fsOperation(tempFile).exists())) { + await fsOperation(CACHE_STORAGE).createFile(tempFileName, fileContent); + } else { + await fsOperation(tempFile).writeFile(fileContent); + } + path = tempFile; + } + + webServer?.send(id, { + status: 200, + path, + headers: { + "Content-Type": mimetype, + }, + }); + + isLoading = false; + const action = queue.splice(-1, 1)[0]; + if (typeof action === "function") action(); + } + + /** + * Sends file content + * @param {string} url + * @param {string} id + * @param {string} mime + * @param {(txt: string) => string} processText + * @returns + */ + async function sendFileContent(url, id, mime, processText) { + const fs = fsOperation(url); + + if (!(await fs.exists())) { + error(id); + return; + } + + let text = await fs.readFile(appSettings.value.defaultFileEncoding); + text = processText ? processText(text) : text; + if (mime === MIMETYPE_HTML) { + sendHTML(text, id); + } else { + sendText(text, id, mime); + } + } + + /** + * Sends text + * @param {string} text + * @param {string} id + * @param {string} mimeType + * @param {(txt: string) => string} processText + */ + function sendText(text, id, mimeType, processText) { + webServer?.send(id, { + status: 200, + body: processText ? processText(text) : text, + headers: { + "Content-Type": mimeType || "text/html", + }, + }); + } + + /** + * Opens the preview in browser + */ + function openBrowser() { + console.count("openBrowser"); + const src = `http://localhost:${port}/${filename}`; + if (target === "browser") { + system.openInBrowser(src); + return; + } + + browser.open(src, isConsole); + } } -run.checkRunnable = async function () { - try { - const activeFile = editorManager.activeFile; - if (activeFile.type === 'regular') { - const folder = openFolder.find(activeFile.uri); - if (folder) { - const url = Url.join(folder.url, 'index.html'); - const fs = fsOperation(url); - if (await fs.exists()) { - return url; - } - } - } - - const runnableFile = /\.((html?)|(md)|(js)|(svg))$/; - const filename = activeFile.filename; - if (runnableFile.test(filename)) return filename; - - return null; - } catch (err) { - if (err instanceof Error) throw error; - else throw new Error(err); - } -}; - -run.runFile = () => { - run(undefined, undefined, true); -}; - export default run; diff --git a/src/lib/saveFile.js b/src/lib/saveFile.js index 68f1aaef7..a80813ca8 100644 --- a/src/lib/saveFile.js +++ b/src/lib/saveFile.js @@ -1,199 +1,197 @@ -import FileBrowser from '../pages/fileBrowser/fileBrowser'; -import dialogs from '../components/dialogs'; -import helpers from '../lib/utils/helpers'; -import constants from './constants'; -import recents from '../lib/recents'; -import fsOperation from '../lib/fileSystem/fsOperation'; -import Url from './utils/Url'; -import openFolder from './openFolder'; +import fsOperation from "fileSystem"; +import prompt from "dialogs/prompt"; +import select from "dialogs/select"; +import recents from "lib/recents"; +import FileBrowser from "pages/fileBrowser"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; +import constants from "./constants"; +import EditorFile from "./editorFile"; +import openFolder from "./openFolder"; +import appSettings from "./settings"; + +let saveTimeout; + +const SELECT_FOLDER = "select-folder"; /** - * - * @param {File} file + * Saves a file to it's location, if file is new, it will ask for location + * @param {EditorFile} file * @param {boolean} [isSaveAs] */ async function saveFile(file, isSaveAs = false) { - let fs; - let url; - let filename; - let isNewFile = false; - let createFile = false; - const data = file.session.getValue(); - const $text = file.assocTile.querySelector('span.text'); - if (file.type === 'regular' && !file.uri) { - isNewFile = true; - } else if (file.uri) { - isSaveAs = isSaveAs ?? file.readOnly; - } - - beautifyFile(); - - if (!isSaveAs && !isNewFile) { - if (file.type === 'git') { - const values = await dialogs.multiPrompt('Commit', [ - { - id: 'message', - placeholder: strings['commit message'], - value: file.record.commitMessage, - type: 'text', - required: true, - }, - { - id: 'branch', - placeholder: strings.branch, - value: file.record.branch, - type: 'text', - required: true, - hints: (cb) => { - file.record.repository.listBranches().then((res) => { - const data = res.data; - const branches = []; - data.map((branch) => branches.push(branch.name)); - cb(branches); - }); - }, - }, - ]); - - if (!values.branch || !values.message) return; - file.record.branch = values.branch; - file.record.commitMessage = values.message; - await file.record.setData(data); - file.isUnsaved = false; - editorManager.onupdate('save-file'); - return; - } - if (file.type === 'gist') { - await file.record.setData(file.name, data); - file.isUnsaved = false; - editorManager.onupdate('save-file'); - return; - } - } else { - const option = await recents.select( - [['select-folder', strings['select folder'], 'folder']], - 'dir', - strings['select folder'], - ); - - filename = file.filename; - - if (option === 'select-folder') { - url = await selectFolder(); - } else { - url = option.val.url; - } - - if (isSaveAs) { - filename = await getfilename(url, file.filename); - } else { - filename = await check(url, file.filename); - } - } - - createFile = isSaveAs || url; - - if (filename !== file.filename) { - file.filename = filename; - beautifyFile(); - } - - $text.textContent = strings.saving + '...'; - file.isSaving = true; - - try { - if (createFile) { - const fileUri = Url.join(url, file.filename); - fs = fsOperation(fileUri); - - if (!(await fs.exists())) { - const fileDir = fsOperation(url); - await fileDir.createFile(file.filename); - } - - const openedFile = editorManager.getFile(fileUri, 'uri'); - if (openedFile) openedFile.uri = null; - file.uri = fileUri; - recents.addFile(fileUri); - - const folder = openFolder.find(url); - if (folder) folder.reload(); - } - - if (!fs) fs = fsOperation(file.uri); - await fs.writeFile(data); - if (file.location) { - recents.addFolder(file.location); - } - - if (window.saveTimeout) clearTimeout(window.saveTimeout); - window.saveTimeout = setTimeout(() => { - file.isSaving = false; - file.isUnsaved = false; - file.onsave(); - if (url) recents.addFile(file.uri); - editorManager.onupdate('save-file'); - resetText(); - }, editorManager.TIMEOUT_VALUE + 100); - } catch (err) { - helpers.error(err); - } - resetText(); - - function resetText() { - setTimeout(() => { - $text.textContent = file.filename; - }, editorManager.TIMEOUT_VALUE); - } - - async function selectFolder() { - const dir = await FileBrowser( - 'folder', - strings[`save file${isSaveAs ? ' as' : ''}`], - strings['save here'], - ); - return dir.url; - } - - async function getfilename(url, name) { - const filename = await dialogs.prompt( - strings['enter file name'], - name || '', - strings['new file'], - { - match: constants.FILE_NAME_REGEX, - required: true, - }, - ); - - return await check(url, filename); - } - - async function check(url, filename) { - const pathname = Url.join(url, filename); - - const fs = fsOperation(pathname); - if (await fs.exists()) { - const action = await dialogs.select(strings['file already exists'], [ - ['overwrite', strings.overwrite], - ['newname', strings['enter file name']], - ]); - - if (action === 'newname') { - filename = await getfilename(url, filename); - } - } - - return filename; - } - - function beautifyFile(name) { - const ext = helpers.extname(name || file.filename); - const beautify = appSettings.value.beautify; - if (beautify[0] !== '*' && beautify.indexOf(ext) < 0) { - Acode.exec('format'); - } - } + // If file is loading, return + if (file.loading) return; + + /** + * If set, new file needs to be created + * @type {string} + */ + let newUrl; + /** + * File operation object + * @type {fsOperation} + */ + let fileOnDevice; + /** + * File name, can be changed by user + * @type {string} + */ + let { filename } = file; + /** + * If file is new + * @type {boolean} + */ + let isNewFile = false; + + /** + * Encoding of file + * @type {string} + */ + const { encoding } = file; + /** + * File data + * @type {string} + */ + const data = file.session.getValue(); + /** + * File tab bar text element, used to show saving status + * @type {HTMLElement} + */ + const $text = file.tab.querySelector("span.text"); + + if (!file.uri) { + isNewFile = true; + } else { + isSaveAs = isSaveAs ?? file.readOnly; + } + + if (isSaveAs || isNewFile) { + const option = await recents.select( + [[SELECT_FOLDER, strings["select folder"], "folder"]], // options + "dir", // type + strings["select folder"], // title + ); + + if (option === SELECT_FOLDER) { + newUrl = await selectFolder(); + } else { + newUrl = option.val.url; + } + + if (isSaveAs) { + filename = await getfilename(newUrl, file.filename); + } else { + filename = await check(newUrl, file.filename); + } + + // in case if user cancels the dialog + if (!filename) return; + } + + if (filename !== file.filename) { + file.filename = filename; + } + + $text.textContent = strings.saving + "..."; + file.isSaving = true; + + try { + if (isSaveAs || newUrl) { + // if save as or new file + const fileUri = Url.join(newUrl, file.filename); + fileOnDevice = fsOperation(fileUri); + + if (!(await fileOnDevice.exists())) { + await fsOperation(newUrl).createFile(file.filename); + } + + const openedFile = editorManager.getFile(fileUri, "uri"); + if (openedFile) openedFile.uri = null; + file.uri = fileUri; + recents.addFile(fileUri); + + const folder = openFolder.find(newUrl); + if (folder) folder.reload(); + } + + if (!fileOnDevice) { + fileOnDevice = fsOperation(file.uri); + } + + if (appSettings.value.formatOnSave) { + editorManager.activeFile.markChanged = false; + acode.exec("format", false); + } + + await fileOnDevice.writeFile(data, encoding); + + if (file.location) { + recents.addFolder(file.location); + } + + clearTimeout(saveTimeout); + saveTimeout = setTimeout(() => { + file.isSaving = false; + file.isUnsaved = false; + if (newUrl) recents.addFile(file.uri); + editorManager.onupdate("save-file"); + editorManager.emit("update", "save-file"); + editorManager.emit("save-file", file); + resetText(); + }, editorManager.TIMEOUT_VALUE + 100); + } catch (err) { + helpers.error(err); + } + resetText(); + + function resetText() { + setTimeout(() => { + $text.textContent = file.filename; + }, editorManager.TIMEOUT_VALUE); + } + + async function selectFolder() { + const dir = await FileBrowser( + "folder", + strings[`save file${isSaveAs ? " as" : ""}`], + ); + return dir.url; + } + + async function getfilename(url, name) { + let filename = await prompt( + strings["enter file name"], + name || "", + strings["new file"], + { + match: constants.FILE_NAME_REGEX, + required: true, + }, + ); + + filename = helpers.fixFilename(filename); + if (!filename) return null; + return await check(url, filename); + } + + async function check(url, filename) { + const pathname = Url.join(url, filename); + + const fs = fsOperation(pathname); + if (!(await fs.exists())) return filename; + + const action = await select(strings["file already exists"], [ + ["overwrite", strings.overwrite], + ["newname", strings["enter file name"]], + ]); + + if (action === "newname") { + filename = await getfilename(url, filename); + } + + return filename; + } } export default saveFile; diff --git a/src/lib/saveState.js b/src/lib/saveState.js index e620b8de1..fa825d3b3 100644 --- a/src/lib/saveState.js +++ b/src/lib/saveState.js @@ -1,55 +1,74 @@ -import constants from './constants'; +import constants from "./constants"; +import { addedFolder } from "./openFolder"; +import appSettings from "./settings"; export default () => { - const filesToSave = []; - const folders = []; - const { activeFile, editor, files } = editorManager; - - for (let file of files) { - if (file.id === constants.DEFAULT_FILE_SESSION) { - continue; - } - - const edit = { - id: file.id, - filename: file.filename, - type: file.type, - uri: file.uri, - isUnsaved: file.isUnsaved, - readOnly: file.readOnly, - mode: file.mode, - deltedFile: file.deltedFile, - cursorPos: editor.getCursorPosition(), - recordid: null, - isNew: null, - sha: null, - }; - - if (edit.type === 'git') edit.sha = file.record.sha; - else if (edit.type === 'gist') { - edit.recordid = file.record.id; - edit.isNew = file.record.isNew; - } - - filesToSave.push(edit); - } - - addedFolder.forEach((folder) => { - const { url, reloadOnResume, saveState, title } = folder; - folders.push({ - url, - opts: { - saveState, - reloadOnResume, - name: title, - }, - }); - }); - - if (activeFile) { - localStorage.setItem('lastfile', activeFile.id); - } - - localStorage.files = JSON.stringify(filesToSave); - localStorage.folders = JSON.stringify(folders); + if (!window.editorManager) return; + + const filesToSave = []; + const folders = []; + const { editor, files, activeFile } = editorManager; + const { value: settings } = appSettings; + + files.forEach((file) => { + if (file.type !== "editor") return; + if (file.id === constants.DEFAULT_FILE_SESSION) return; + if (file.SAFMode === "single") return; + + const fileJson = { + id: file.id, + uri: file.uri, + type: file.type, + filename: file.filename, + isUnsaved: file.isUnsaved, + readOnly: file.readOnly, + SAFMode: file.SAFMode, + deletedFile: file.deletedFile, + cursorPos: editor.getCursorPosition(), + scrollTop: editor.session.getScrollTop(), + scrollLeft: editor.session.getScrollLeft(), + editable: file.editable, + encoding: file.encoding, + render: activeFile.id === file.id, + folds: parseFolds(file.session.getAllFolds()), + }; + + if (settings.rememberFiles || fileJson.isUnsaved) + filesToSave.push(fileJson); + }); + + if (settings.rememberFolders) { + addedFolder.forEach((folder) => { + const { url, saveState, title, listState, listFiles } = folder; + folders.push({ + url, + opts: { + saveState, + name: title, + listState, + listFiles, + }, + }); + }); + } + + localStorage.files = JSON.stringify(filesToSave); + localStorage.folders = JSON.stringify(folders); }; + +function parseFolds(folds) { + if (!Array.isArray(folds)) return []; + + return folds + .map((fold) => { + if (!fold || !fold.range) return null; + + const { range, ranges, placeholder } = fold; + return { + range, + ranges: parseFolds(ranges || []), + placeholder, + }; + }) + .filter(Boolean); +} diff --git a/src/lib/searchHistory.js b/src/lib/searchHistory.js new file mode 100644 index 000000000..5adb63431 --- /dev/null +++ b/src/lib/searchHistory.js @@ -0,0 +1,188 @@ +/** + * Search and Replace History Manager + * Manages search/replace history using localStorage + */ + +const HISTORY_KEY = "acode.searchreplace.history"; +const MAX_HISTORY_ITEMS = 20; + +class SearchHistory { + constructor() { + this.history = this.loadHistory(HISTORY_KEY); + this.searchIndex = -1; // Current position in history for search input + this.replaceIndex = -1; // Current position in history for replace input + this.tempSearchValue = ""; // Temporary storage for current search input + this.tempReplaceValue = ""; // Temporary storage for current replace input + } + + /** + * Load history from localStorage + * @param {string} key Storage key + * @returns {Array} History items + */ + loadHistory(key) { + try { + const stored = localStorage.getItem(key); + return stored ? JSON.parse(stored) : []; + } catch (error) { + console.warn("Failed to load search history:", error); + return []; + } + } + + /** + * Save history to localStorage + */ + saveHistory() { + try { + localStorage.setItem(HISTORY_KEY, JSON.stringify(this.history)); + } catch (error) { + console.warn("Failed to save search history:", error); + } + } + + /** + * Add item to history + * @param {string} item Item to add + */ + addToHistory(item) { + if (!item || typeof item !== "string" || item.trim().length === 0) { + return; + } + + const trimmedItem = item.trim(); + + // Remove existing item if present + this.history = this.history.filter((h) => h !== trimmedItem); + + // Add to beginning + this.history.unshift(trimmedItem); + + // Limit history size + this.history = this.history.slice(0, MAX_HISTORY_ITEMS); + + this.saveHistory(); + } + + /** + * Get history + * @returns {Array} History items + */ + getHistory() { + return [...this.history]; + } + + /** + * Clear all history + */ + clearHistory() { + this.history = []; + this.saveHistory(); + } + + /** + * Navigate up in search history (terminal-like) + * @param {string} currentValue Current input value + * @returns {string} Previous history item or current value + */ + navigateSearchUp(currentValue) { + if (this.history.length === 0) return currentValue; + + // Store current value if we're at the beginning + if (this.searchIndex === -1) { + this.tempSearchValue = currentValue; + this.searchIndex = this.history.length - 1; + } else if (this.searchIndex > 0) { + this.searchIndex--; + } + + return this.history[this.searchIndex] || currentValue; + } + + /** + * Navigate down in search history (terminal-like) + * @param {string} currentValue Current input value + * @returns {string} Next history item or original value + */ + navigateSearchDown(currentValue) { + if (this.history.length === 0 || this.searchIndex === -1) { + return currentValue; + } + + this.searchIndex++; + + // If we've gone past the end, return to original value + if (this.searchIndex >= this.history.length) { + this.searchIndex = -1; + return this.tempSearchValue; + } + + return this.history[this.searchIndex]; + } + + /** + * Navigate up in replace history (terminal-like) + * @param {string} currentValue Current input value + * @returns {string} Previous history item or current value + */ + navigateReplaceUp(currentValue) { + if (this.history.length === 0) return currentValue; + + // Store current value if we're at the beginning + if (this.replaceIndex === -1) { + this.tempReplaceValue = currentValue; + this.replaceIndex = this.history.length - 1; + } else if (this.replaceIndex > 0) { + this.replaceIndex--; + } + + return this.history[this.replaceIndex] || currentValue; + } + + /** + * Navigate down in replace history (terminal-like) + * @param {string} currentValue Current input value + * @returns {string} Next history item or original value + */ + navigateReplaceDown(currentValue) { + if (this.history.length === 0 || this.replaceIndex === -1) { + return currentValue; + } + + this.replaceIndex++; + + // If we've gone past the end, return to original value + if (this.replaceIndex >= this.history.length) { + this.replaceIndex = -1; + return this.tempReplaceValue; + } + + return this.history[this.replaceIndex]; + } + + /** + * Reset search history navigation + */ + resetSearchNavigation() { + this.searchIndex = -1; + this.tempSearchValue = ""; + } + + /** + * Reset replace history navigation + */ + resetReplaceNavigation() { + this.replaceIndex = -1; + this.tempReplaceValue = ""; + } + + /** + * Reset all navigation state + */ + resetAllNavigation() { + this.resetSearchNavigation(); + this.resetReplaceNavigation(); + } +} + +export default new SearchHistory(); diff --git a/src/lib/selectionMenu.js b/src/lib/selectionMenu.js new file mode 100644 index 000000000..8e7fea58b --- /dev/null +++ b/src/lib/selectionMenu.js @@ -0,0 +1,57 @@ +const exec = (command) => { + const { editor } = editorManager; + editor.execCommand(command); + + if (command === "selectall") { + editor.scrollToRow(Number.POSITIVE_INFINITY); + editor.setSelection(true); + editor.setMenu(true); + } + editor.focus(); +}; + +const items = []; + +export default function selectionMenu() { + return [ + item( + () => exec("copy"), + , + "selected", + true, + ), + item(() => exec("cut"), , "selected"), + item(() => exec("paste"), , "all"), + item( + () => exec("selectall"), + , + "all", + true, + ), + item( + (color) => acode.exec("insert-color", color), + , + "all", + ), + ...items, + ]; +} + +/** + * + * @param {function} onclick function to be called when the item is clicked + * @param {string | HTMLElement} text content of the item + * @param {'selected'|'all'} mode mode supported by the item + * @param {boolean} readOnly whether to show the item in readOnly mode + */ +selectionMenu.add = (onclick, text, mode, readOnly) => { + items.push(item(onclick, text, mode, readOnly)); +}; + +selectionMenu.exec = (command) => { + exec(command); +}; + +function item(onclick, text, mode = "all", readOnly = false) { + return { onclick, text, mode, readOnly }; +} diff --git a/src/lib/settings.js b/src/lib/settings.js index 27110813b..38113cfe1 100644 --- a/src/lib/settings.js +++ b/src/lib/settings.js @@ -1,6 +1,13 @@ -import fsOperation from './fileSystem/fsOperation'; -import helpers from './utils/helpers'; -import Url from './utils/Url'; +import fsOperation from "fileSystem"; +import ThemeBuilder from "theme/builder"; +import themes from "theme/list"; +import { getSystemEditorTheme } from "theme/preInstalled"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; +import constants from "./constants"; +import lang from "./lang"; +import { isDeviceDarkTheme } from "./systemConfiguration"; + /** * @typedef {object} fileBrowserSettings * @property {string} showHiddenFiles @@ -14,267 +21,396 @@ import Url from './utils/Url'; * @property {boolean} regExp */ +class Settings { + #customTheme = new ThemeBuilder("Custom").toJSON(); + #defaultSettings; + #oldSettings; + #initialized = false; + #on = { + update: [], + "update:after": [], + reset: [], + }; + #searchSettings = { + caseSensitive: false, + regExp: false, + wholeWord: false, + }; + #fileBrowserSettings = { + showHiddenFiles: false, + sortByName: true, + }; + #excludeFolders = [ + "**/node_modules/**", + "**/bower_components/**", + "**/jspm_packages/**", + "**/.npm/**", + "**/flow-typed/**", + "**/vendor/**", + "**/composer/**", + "**/venv/**", + "**/.virtualenv/**", + "**/__pycache__/**", + "**/.pytest_cache/**", + "**/.eggs/**", + "**/*.egg-info/**", + "**/.git/**", + "**/.svn/**", + "**/.hg/**", + "**/.vscode/**", + "**/.idea/**", + "**/.vs/**", + "**/.project/**", + "**/.settings/**", + "**/.classpath/**", + "**/dist/**", + "**/build/**", + "**/out/**", + "**/target/**", + "**/bin/**", + "**/obj/**", + "**/coverage/**", + "**/.nyc_output/**", + "**/htmlcov/**", + "**/temp/**", + "**/tmp/**", + "**/.cache/**", + "**/logs/**", + "**/.sass-cache/**", + "**/.DS_Store/**", + "**/Thumbs.db/**", + ]; + #IS_TABLET = innerWidth > 768; + + QUICKTOOLS_ROWS = 2; + QUICKTOOLS_GROUP_CAPACITY = 8; + QUICKTOOLS_GROUPS = 2; + #QUICKTOOLS_SIZE = + this.QUICKTOOLS_GROUP_CAPACITY * // items per group + this.QUICKTOOLS_GROUPS * // number of groups + this.QUICKTOOLS_ROWS; // number of rows + + QUICKTOOLS_TRIGGER_MODE_TOUCH = "touch"; + QUICKTOOLS_TRIGGER_MODE_CLICK = "click"; + OPEN_FILE_LIST_POS_HEADER = "header"; + OPEN_FILE_LIST_POS_SIDEBAR = "sidebar"; + OPEN_FILE_LIST_POS_BOTTOM = "bottom"; + KEYBOARD_MODE_NO_SUGGESTIONS = "NO_SUGGESTIONS"; + KEYBOARD_MODE_NO_SUGGESTIONS_AGGRESSIVE = "NO_SUGGESTIONS_AGGRESSIVE"; + KEYBOARD_MODE_NORMAL = "NORMAL"; + CONSOLE_ERUDA = "eruda"; + CONSOLE_LEGACY = "legacy"; + PREVIEW_MODE_INAPP = "inapp"; + PREVIEW_MODE_BROWSER = "browser"; + + /**@type {{[key: string]: import('components/settingsPage').SettingsPage}} */ + uiSettings = {}; + + constructor() { + this.#defaultSettings = { + animation: "system", + appTheme: "dark", + autosave: 0, + fileBrowser: this.#fileBrowserSettings, + formatter: {}, + maxFileSize: 12, + serverPort: constants.SERVER_PORT, + previewPort: constants.PREVIEW_PORT, + showConsoleToggler: true, + previewMode: this.PREVIEW_MODE_INAPP, + disableCache: false, + useCurrentFileForPreview: false, + host: "localhost", + search: this.#searchSettings, + lang: "en-us", + fontSize: "12px", + editorTheme: "ace/theme/nord_dark", + textWrap: true, + softTab: true, + tabSize: 2, + retryRemoteFsAfterFail: true, + linenumbers: true, + formatOnSave: false, + fadeFoldWidgets: false, + autoCorrect: true, + openFileListPos: this.OPEN_FILE_LIST_POS_HEADER, + quickTools: this.#IS_TABLET ? 0 : 1, + quickToolsTriggerMode: this.QUICKTOOLS_TRIGGER_MODE_TOUCH, + editorFont: "Roboto Mono", + vibrateOnTap: true, + fullscreen: false, + floatingButton: !this.#IS_TABLET, + liveAutoCompletion: true, + showPrintMargin: false, + printMargin: 80, + scrollbarSize: 20, + showSpaces: false, + confirmOnExit: true, + lineHeight: 2, + leftMargin: 50, + checkFiles: true, + checkForAppUpdates: false, + desktopMode: false, + console: this.CONSOLE_LEGACY, + keyboardMode: this.KEYBOARD_MODE_NO_SUGGESTIONS_AGGRESSIVE, + rememberFiles: true, + rememberFolders: true, + diagonalScrolling: false, + reverseScrolling: false, + teardropTimeout: 3000, + teardropSize: 30, + scrollSpeed: constants.SCROLL_SPEED_NORMAL, + customTheme: this.#customTheme, + relativeLineNumbers: false, + elasticTabstops: false, + rtlText: false, + hardWrap: false, + useTextareaForIME: false, + touchMoveThreshold: Math.round((1 / devicePixelRatio) * 10) / 20, + quicktoolsItems: [...Array(this.#QUICKTOOLS_SIZE).keys()], + excludeFolders: this.#excludeFolders, + defaultFileEncoding: "UTF-8", + inlineAutoCompletion: true, + colorPreview: true, + maxRetryCount: 3, + showRetryToast: false, + showSideButtons: true, + showAnnotations: false, + pluginsDisabled: {}, // pluginId: true/false + }; + this.value = structuredClone(this.#defaultSettings); + } + + async init() { + if (this.#initialized) return; + this.settingsFile = Url.join(DATA_STORAGE, "settings.json"); + + this.#defaultSettings.appTheme = "system"; + this.#defaultSettings.editorTheme = getSystemEditorTheme( + isDeviceDarkTheme(), + ); + + this.#initialized = true; + + const fs = fsOperation(this.settingsFile); + + if (!(await fs.exists())) { + await this.#save(); + this.value = structuredClone(this.#defaultSettings); + this.#oldSettings = structuredClone(this.#defaultSettings); + this.value.lang = navigator.language || "en-us"; + return; + } + + const settings = helpers.parseJSON(await fs.readFile("utf8")); + if (settings) { + // make sure that all the settings are present + Object.keys(this.#defaultSettings).forEach((setting) => { + const value = settings[setting]; + if ( + value === undefined || + typeof value !== typeof this.#defaultSettings[setting] + ) { + settings[setting] = this.#defaultSettings[setting]; + } + }); + + this.value = structuredClone(settings); + this.#oldSettings = structuredClone(settings); + try { + themes.update(ThemeBuilder.fromJSON(this.value.customTheme)); + } catch (error) { + themes.update(new ThemeBuilder("Custom").toJSON()); + } + + // Ensure pluginsDisabled exists + if (!this.value.pluginsDisabled) this.value.pluginsDisabled = {}; + + return; + } + + await this.reset(); + } + + async #save() { + const fs = fsOperation(this.settingsFile); + const settingsText = JSON.stringify(this.value, undefined, 4); + + if (!(await fs.exists())) { + const dirFs = fsOperation(DATA_STORAGE); + await dirFs.createFile("settings.json"); + } + + await fs.writeFile(settingsText); + this.#oldSettings = structuredClone(this.value); + } + + /** + * + * @param {Object} [settings] - if provided, the settings will be updated + * @param {Boolean} [showToast] - if false, the toast will not be shown + * default is true + * @param {Boolean} [saveFile] - if false, the settings will not be saved to the file, + * default is true + */ + async update(settings, showToast = true, saveFile = true) { + if (typeof settings === "boolean") { + showToast = settings; + settings = undefined; + } + + const onupdate = [...this.#on.update]; + const onupdateAfter = [...this.#on["update:after"]]; + + if (settings) { + Object.keys(settings).forEach((key) => { + if (key in this.value) this.value[key] = settings[key]; + }); + } + + const changedSettings = this.#getChangedKeys(); + changedSettings.forEach((setting) => { + this.#applySettings(setting); + const listeners = this.#on[`update:${setting}`]; + if (Array.isArray(listeners)) { + onupdate.push(...listeners); + } + onupdate.forEach((listener) => listener(this.value[setting])); + }); + + if (saveFile) await this.#save(); + if (showToast) toast(strings["settings saved"]); + + changedSettings.forEach((setting) => { + const listeners = this.#on[`update:${setting}:after`]; + if (Array.isArray(listeners)) { + onupdateAfter.push(...listeners); + } + onupdateAfter.forEach((listener) => listener(this.value[setting])); + }); + } + + async reset(setting) { + if (setting) { + if (setting in this.#defaultSettings) { + this.value[setting] = this.#defaultSettings[setting]; + await this.update(); + } else { + return false; + } + } else { + this.value = this.#defaultSettings; + await this.update(false); + } + + this.#on.reset.forEach((onreset) => onreset(this.value)); + } + + /** + * Adds a listener for the given event + * @param {'update:' | 'update::after' | 'reset'} event + * @param {function():void} callback + */ + on(event, callback) { + if (!this.#on[event]) this.#on[event] = []; + this.#on[event].push(callback); + } + + /** + * Removes the given callback from the given event + * @param {'update' | 'reset'} event + * @param {function():void} callback + */ + off(event, callback) { + if (!this.#on[event]) this.#on[event] = []; + this.#on[event].splice(this.#on[event].indexOf(callback), 1); + } + + /** + * Gets a setting with the given key + * @param {String} key + * @returns + */ + get(key) { + return this.value[key]; + } + + /** + * Returns changed settings + * @returns {Array} + */ + #getChangedKeys() { + if (!this.#oldSettings) return []; + const keys = []; + Object.keys(this.#oldSettings).forEach((key) => { + const value = this.#oldSettings[key]; + if (typeof value === "object") { + if (!areEqual(value, this.value[key])) keys.push(key); + return; + } + + if (value !== this.value[key]) keys.push(key); + }); + return keys; + } + + #applySettings(setting) { + switch (setting) { + case "animation": + this.applyAnimationSetting(); + break; + + case "lang": + this.applyLangSetting(); + break; + + default: + break; + } + } + + async applyAnimationSetting() { + let value = this.value.animation; + if (value === "system") { + const res = await new Promise((resolve, reject) => { + system.getGlobalSetting("animator_duration_scale", resolve, reject); + }); + if (res) value = "yes"; + else value = "no"; + } + + if (value === "yes") { + app.classList.remove("no-animation"); + } else if (value === "no") { + app.classList.add("no-animation"); + } + } + + async applyLangSetting() { + const value = this.value.lang; + lang.set(value); + } +} + /** - * @typedef {object} settingsValue - * @property {fileBrowserSettings} fileBrowser - * @property {number} maxFileSize - * @property {string[]} filesNotAllowed - * @property {searchAndFindSettings} search - * @property {string} lang + * Checks whether given objects are equal or not + * @param {Object} obj1 + * @param {Object} obj2 + * @returns */ +function areEqual(obj1, obj2) { + if (obj1 === obj2) return true; + if (obj1 == null || obj2 == null) return false; + if (obj1.constructor !== obj2.constructor) return false; -class Settings { - /** - * @type {settingsValue} - */ - #defaultSettings; - #initialized = false; - #oldSettings; - - constructor() { - this.methods = { - update: [], - reset: [], - }; - - this.#defaultSettings = { - animation: true, - autosave: 0, - fileBrowser: { - showHiddenFiles: false, - sortByName: true, - }, - maxFileSize: 12, - filesNotAllowed: [ - 'zip', - 'apk', - 'doc', - 'docx', - 'mp3', - 'mp4', - 'avi', - 'flac', - 'mov', - 'rar', - 'pdf', - 'gif', - 'flv', - ], - search: { - caseSensitive: false, - regExp: false, - wholeWord: false, - backwards: true, - }, - lang: 'en-us', - fontSize: '12px', - editorTheme: /free/.test(BuildInfo.packageName) - ? 'ace/theme/nord_dark' - : 'ace/theme/dracula', - appTheme: /free/.test(BuildInfo.packageName) ? 'dark' : 'ocean', - textWrap: true, - softTab: true, - tabSize: 2, - linenumbers: true, - beautify: ['*'], - linting: false, - autoCorrect: true, - previewMode: 'inapp', - showSpaces: false, - openFileListPos: 'header', - quickTools: true, - editorFont: 'default', - vibrateOnTap: true, - fullscreen: false, - floatingButtonActivation: 'click', - floatingButton: true, - liveAutoCompletion: true, - showPrintMargin: false, - scrollbarSize: 20, - cursorControllerSize: 'small', - confirmOnExit: true, - customThemeMode: 'dark', - lineHeight: 2, - checkFiles: true, - desktopMode: false, - console: 'legacy', - keyboardMode: 'CODE', - customTheme: { - '--primary-color': 'rgb(153,153,255)', - '--secondary-color': 'rgb(255,255,255)', - '--accent-color': 'rgb(51,153,255)', - '--text-color': 'rgb(37,37,37)', - '--text-main-color': 'rgb(255,255,255)', - '--a-color': 'rgb(97,94,253)', - '--border-color': 'rgba(122, 122, 122, 0.227)', - '--error-text-color': 'rgb(255,185,92)', - '--active-icon-color': 'rgba(0, 0, 0, 0.2)', - '--popup-border-color': 'rgba(0, 0, 0, 0)', - '--box-shadow-color': 'rgba(0, 0, 0, 0.2)', - '--button-background-color': 'rgb(51,153,255)', - '--button-active-color': 'rgb(44,142,240)', - '--button-text-color': 'rgb(255,255,255)', - '--scrollbar-color': 'rgba(0, 0, 0, 0.33)', - '--menu-background-color': 'rgb(255,255,255)', - '--menu-text-color': 'rgb(37,37,37)', - '--menu-icon-color': 'rgb(153,153,255)', - '--dialogbox-background-color': 'rgb(255,255,255)', - '--dialogbox-text-color': 'rgb(37,37,37)', - '--dialogbox-selected-option-color': 'rgb(169,0,0)', - '--command-palette-background-color': 'rgb(153,153,255)', - '--command-palette-text-color': 'rgb(255,255,255)', - '--command-palette-border': 'none', - }, - }; - - this.settingsFile = Url.join(DATA_STORAGE, 'settings.json'); - } - - async init(lang) { - if (this.#initialized) return; - this.#initialized = true; - - const fs = fsOperation(this.settingsFile); - - if (!(await fs.exists())) { - await this.#save(); - this.value = { ...this.#defaultSettings }; - this.#oldSettings = { ...this.#defaultSettings }; - this.value.lang = lang; - return; - } - - const settings = helpers.parseJSON(await fs.readFile('utf-8')); - if (settings) { - if (!Array.isArray(settings.beautify)) savedSettings.beautify = ['*']; - for (let setting in this.#defaultSettings) { - if (!(setting in settings)) { - settings[setting] = this.#defaultSettings[setting]; - } - } - this.value = settings; - return; - } - - await this.reset(); - } - - async #save() { - const fs = fsOperation(this.settingsFile); - const settingsText = JSON.stringify(this.value, undefined, 4); - - if (!(await fs.exists())) { - const dirFs = fsOperation(DATA_STORAGE); - await dirFs.createFile('settings.json'); - } - - await fs.writeFile(settingsText); - this.#oldSettings = { ...this.value }; - } - - /** - * - * @param {Object} settings - * @param {Boolean} showToast - * @param {Boolean} saveFile - */ - async update(settings = null, showToast = true, saveFile = true) { - if (typeof settings === 'boolean') { - showToast = settings; - settings = null; - } - - const onupdate = [...this.methods.update]; - - for (let key in settings) { - if (key in this.value) this.value[key] = settings[key]; - } - - const changedSettings = this.#getChangedKeys(); - for (let key of changedSettings) { - if (Array.isArray(this.methods[`update:${key}`])) { - for (let cb of this.methods[`update:${key}`]) { - onupdate.push(cb.bind(this.value, this.value[key])); - } - } - } - - if (saveFile) await this.#save(); - if (showToast) toast(strings['settings saved']); - for (let callback of onupdate) callback(this.value); - } - - async reset(setting) { - if (setting) { - if (setting in this.#defaultSettings) { - this.value[setting] = this.#defaultSettings[setting]; - await this.update(); - } else { - return false; - } - } else { - this.value = this.#defaultSettings; - await this.update(false); - } - - for (let onreset of this.methods.reset) onreset(this.value); - } - - /** - * - * @param {'update' | 'reset'} event - * @param {function():void} callback - */ - on(event, callback) { - if (!this.methods[event]) this.methods[event] = []; - this.methods[event].push(callback); - } - - /** - * - * @param {'update' | 'reset'} event - * @param {function():void} callback - */ - off(event, callback) { - if (!this.methods[event]) this.methods[event] = []; - this.methods[event].splice(this.methods[event].indexOf(callback), 1); - } - - /** - * - * @param {String} key - * @returns - */ - get(key) { - return this.value[key]; - } - - /** - * - * @param {String} ext - * @returns - */ - isFileAllowed(ext = '') { - return this.value.filesNotAllowed.includes(ext.toLowerCase()); - } - - /** - * Returns changed settings - * @returns {Array} - */ - #getChangedKeys() { - const keys = []; - for (let key in this.#oldSettings) { - const value = this.#oldSettings[key]; - if (typeof value === 'object') { - if (!helpers.areEqual(value, this.value[key])) keys.push(key); - continue; - } - - if (value !== this.value[key]) keys.push(key); - } - return keys; - } + for (let key in obj1) { + if (!obj2.hasOwnProperty(key)) return false; + if (obj1[key] === obj2[key]) continue; + if (typeof obj1[key] !== "object") return false; + if (!areEqual(obj1[key], obj2[key])) return false; + } + + return true; } -export default Settings; +export default new Settings(); diff --git a/src/lib/showFileInfo.js b/src/lib/showFileInfo.js index 25b08b6ff..77eeebcca 100644 --- a/src/lib/showFileInfo.js +++ b/src/lib/showFileInfo.js @@ -1,64 +1,70 @@ -import fileSize from 'filesize'; -import mustache from 'mustache'; -import $_fileInfo from '../views/file-info.hbs'; -import fsOperation from './fileSystem/fsOperation'; -import Url from './utils/Url'; -import dialogs from '../components/dialogs'; -import helpers from './utils/helpers'; +import fsOperation from "fileSystem"; +import box from "dialogs/box"; +import { filesize } from "filesize"; +import mustache from "mustache"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; +import $_fileInfo from "views/file-info.hbs"; +import settings from "./settings"; /** * Shows file info * @param {String} [url] */ export default async function showFileInfo(url) { - if (!url) url = editorManager.activeFile.uri; - app.classList.add('title-loading'); - try { - const fs = fsOperation(url); - const stats = await fs.stats(); - const value = await fs.readFile('utf-8'); + if (!url) url = editorManager.activeFile.uri; + app.classList.add("title-loading"); + try { + const fs = fsOperation(url); + const stats = await fs.stat(); - let { name, lastModified, length, uri, type } = stats; - length = fileSize(length); - lastModified = new Date(lastModified).toLocaleString(); + let { name, lastModified, length, type } = stats; + length = filesize(length); + lastModified = new Date(lastModified).toLocaleString(); - const protocol = Url.getProtocol(uri); - const options = { - name, - lastModified, - length, - showUri: uri, - shareUri: uri, - type, - lineCount: value.split(/\n+/).length, - wordCount: value.split(/\s+|\n+/).length, - lang: strings, - showUri: helpers.getVirtualPath(url), - }; + const protocol = Url.getProtocol(url); + const fileType = type.toLowerCase(); + const options = { + name: name.slice(0, name.length - Url.extname(name).length), + extension: Url.extname(name), + lastModified, + length, + type, + lang: strings, + showUri: helpers.getVirtualPath(url), + isEditor: + fileType === "text/plain" || editorManager.activeFile.type === "editor", + }; - if (/s?ftp:/.test(protocol)) { - options.shareUri = Url.join(CACHE_STORAGE, name); - const fs = fsOperation(options.shareUri); - if (await fs.exists()) { - await fs.deleteFile(); - } - await fsOperation(CACHE_STORAGE).createFile(name, value); - } + if (editorManager.activeFile.type === "editor") { + const value = await fs.readFile(settings.value.defaultFileEncoding); + options.lineCount = value.split(/\n+/).length; + options.wordCount = value.split(/\s+|\n+/).length; - dialogs.box('', mustache.render($_fileInfo, options), true).onclick((e) => { - const $target = e.target; - if ($target instanceof HTMLElement) { - const action = $target.getAttribute('action'); - const value = $target.getAttribute('value'); + if (/s?ftp:/.test(protocol)) { + options.shareUri = Url.join(CACHE_STORAGE, name); + const fs = fsOperation(options.shareUri); + if (await fs.exists()) { + await fs.delete(); + } + await fsOperation(CACHE_STORAGE).createFile(name, value); + } + } - if (action === 'share') { - system.shareFile(value, () => {}, console.error); - } - } - }); - } catch (err) { - helpers.error(err); - } + box("", mustache.render($_fileInfo, options), true).onclick((e) => { + const $target = e.target; + if ($target instanceof HTMLElement) { + const action = $target.getAttribute("action"); - app.classList.remove('title-loading'); + if (action === "copy") { + cordova.plugins.clipboard.copy($target.textContent); + toast(strings["copied to clipboard"]); + } + } + }); + } catch (err) { + helpers.error(err); + } + + app.classList.remove("title-loading"); } diff --git a/src/lib/startAd.js b/src/lib/startAd.js new file mode 100644 index 000000000..e4eccd9ef --- /dev/null +++ b/src/lib/startAd.js @@ -0,0 +1,56 @@ +let adUnitIdBanner = "ca-app-pub-5911839694379275/9157899592"; // Production +let adUnitIdInterstitial = "ca-app-pub-5911839694379275/9570937608"; // Production +let initialized = false; + +export default async function startAd() { + if (!IS_FREE_VERSION || !admob) return; + + if (!initialized) { + initialized = true; + + if (BuildInfo.type === "debug") { + adUnitIdBanner = "ca-app-pub-3940256099942544/6300978111"; // Test + adUnitIdInterstitial = "ca-app-pub-3940256099942544/5224354917"; // Test + } + } + + const consentStatus = await consent.getConsentStatus(); + if (consentStatus === consent.ConsentStatus.Required) { + await consent.requestInfoUpdate(); + } + + const formStatus = await consent.getFormStatus(); + if (formStatus === consent.FormStatus.Available) { + const form = await consent.loadForm(); + form.show(); + } + + await admob.start(); + + const currentHour = new Date().getHours(); + //currentHour >= 22: Covers 10:00 PM to 11:59 PM. + //currentHour < 4: Covers 12:00 AM to 3:59 AM. + const isQuietHours = currentHour >= 22 || currentHour < 4; + + await admob.configure({ + appMuted: isQuietHours, + appVolume: isQuietHours ? 0.0 : 1.0, + }); + + const banner = new admob.BannerAd({ + adUnitId: adUnitIdBanner, + position: "bottom", + }); + + const interstitial = new admob.InterstitialAd({ + adUnitId: adUnitIdInterstitial, + }); + + interstitial.load(); + + interstitial.on("dismiss", () => { + interstitial.load(); + }); + window.ad = banner; + window.iad = interstitial; +} diff --git a/src/lib/systemConfiguration.js b/src/lib/systemConfiguration.js new file mode 100644 index 000000000..24a3180b7 --- /dev/null +++ b/src/lib/systemConfiguration.js @@ -0,0 +1,58 @@ +export const HARDKEYBOARDHIDDEN_NO = 1; +export const HARDKEYBOARDHIDDEN_YES = 2; +export const HARDKEYBOARDHIDDEN_UNDEFINED = 0; + +export const KEYBOARDHIDDEN_NO = 1; +export const KEYBOARDHIDDEN_YES = 2; +export const KEYBOARDHIDDEN_UNDEFINED = 0; + +export const KEYBOARD_12KEY = 3; +export const KEYBOARD_QWERTY = 2; +export const KEYBOARD_UNDEFINED = 0; +export const KEYBOARD_NOKEYS = 1; + +export const NAVIGATIONHIDDEN_NO = 1; +export const NAVIGATIONHIDDEN_YES = 2; +export const NAVIGATIONHIDDEN_UNDEFINED = 0; + +export const NAVIGATION_DPAD = 2; +export const NAVIGATION_TRACKBALL = 3; +export const NAVIGATION_WHEEL = 4; +export const NAVIGATION_UNDEFINED = 0; + +export const ORIENTATION_LANDSCAPE = 2; +export const ORIENTATION_PORTRAIT = 1; +export const ORIENTATION_SQUARE = 3; +export const ORIENTATION_UNDEFINED = 0; + +export const TOUCHSCREEN_FINGER = 3; +export const TOUCHSCREEN_NOTOUCH = 1; +export const TOUCHSCREEN_STYLUS = 2; +export const TOUCHSCREEN_UNDEFINED = 0; + +/** + * @typedef {Object} SystemConfiguration + * @property {number} hardKeyboardHidden + * @property {number} navigationHidden + * @property {number} keyboardHidden + * @property {number} keyboardHeight + * @property {number} orientation + * @property {number} navigation + * @property {number} fontScale + * @property {number} keyboard + * @property {string} locale + */ + +/** + * Get the system configuration + * @returns {Promise} + */ +export function getSystemConfiguration() { + return new Promise((resolve, reject) => { + cordova.exec(resolve, reject, "System", "get-configuration", []); + }); +} + +export function isDeviceDarkTheme() { + return window.matchMedia("(prefers-color-scheme: dark)").matches; +} diff --git a/src/lib/utils/Path.js b/src/lib/utils/Path.js deleted file mode 100644 index 28c737b5c..000000000 --- a/src/lib/utils/Path.js +++ /dev/null @@ -1,187 +0,0 @@ -export default { - /** - * The path.dirname() method returns the directory name of a path, - * similar to the Unix dirname command. - * Trailing directory separators are ignored. - * @param {string} path - * @returns {string} - */ - dirname(path) { - if (path.endsWith('/')) path = path.slice(0, -1); - const parts = path.split('/').slice(0, -1); - if (!/^(\.|\.\.|)$/.test(parts[0])) parts.unshift('.'); - const res = parts.join('/'); - - if (!res) return '/'; - else return res; - }, - - /** - * The path.basename() methods returns the last portion of a path, - * similar to the Unix basename command. - * Trailing directory separators are ignored, see path.sep. - * @param {string} path - * @returns {string} - */ - basename(path, ext = '') { - ext = ext || ''; - if (path === '' || path === '/') return path; - const ar = path.split('/'); - const last = ar.slice(-1)[0]; - // if (!last) return decodeURL(ar.slice(-2)[0]); - if (!last) return ar.slice(-2)[0]; - let res = decodeURI(last.split('?')[0] || ''); - if (this.extname(res) === ext) res = res.replace(new RegExp(ext + '$'), ''); - // return decodeURL(res); - return res; - }, - - /** - * returns the extension of the path, from the last occurrence of the . (period) - * character to end of string in the last portion of the path. - * If there is no . in the last portion of the path, or if there are no . characters - * other than the first character of the basename of path (see path.basename()) , an - * empty string is returned. - * @param {string} path - */ - extname(path) { - const filename = path.split('/').slice(-1)[0]; - if (/.+\..*$/.test(filename)) - return /(?:\.([^.]*))?$/.exec(filename)[0] || ''; - return ''; - }, - - /** - * returns a path string from an object. - * @param {PathObject} pathObject - */ - format(pathObject) { - let { root, dir, ext, name, base } = pathObject; - - if (base || !ext.startsWith('.')) { - ext = ''; - if (base) name = ''; - } - - dir = dir || root; - - if (!dir.endsWith('/')) dir += '/'; - - return dir + (base || name) + ext; - }, - - /** - * The path.isAbsolute() method determines if path is an absolute path. - * @param {string} path - */ - isAbsolute(path) { - return path.startsWith('/'); - }, - - /** - * Joins the given number of paths - * @param {...string} paths - */ - join(...paths) { - let res = paths.join('/'); - return this.normalize(res); - }, - - /** - * Normalizes the given path, resolving '..' and '.' segments. - * @param {string} path - */ - normalize(path) { - path = path.replace(/\.\/+/g, './'); - path = path.replace(/\/+/g, '/'); - - const resolved = []; - const pathAr = path.split('/'); - - for (let dir of pathAr) { - if (dir === '..') { - if (resolved.length) resolved.pop(); - } else if (dir === '.') continue; - else resolved.push(dir); - } - - return resolved.join('/'); - }, - - /** - * - * @param {string} path - * @returns {PathObject} - */ - parse(path) { - const root = path.startsWith('/') ? '/' : ''; - const dir = this.dirname(path); - const ext = this.extname(path); - const name = this.basename(path, ext); - const base = this.basename(path); - - return { - root, - dir, - base, - ext, - name, - }; - }, - - /** - * Resolve the path eg. -```js -resolvePath('path/to/some/dir/', '../../dir') //returns 'path/to/dir' -``` - * @param {...string} paths - */ - resolve(...paths) { - if (!paths.length) throw new Error('resolve(...path) : Arguments missing!'); - - let result = ''; - - for (let path of paths) { - if (path.startsWith('/')) { - result = path; - continue; - } - - result = this.normalize(this.join(result, path)); - } - - if (result.startsWith('/')) return result; - else return '/' + result; - }, - - /** - * Gets path for path2 relative to path1 - * @param {String} path1 - * @param {String} path2 - */ - convertToRelative(path1, path2) { - path1 = this.normalize(path1).split('/'); - path2 = this.normalize(path2).split('/'); - - const p1len = path1.length; - const p2len = path2.length; - - let flag = false, - path = []; - path1.map((dir, i) => { - if (dir === path2[i] && !flag) return; - - path.push(path2[i]); - if (!flag) { - flag = true; - return; - } - - if (flag) path.unshift('..'); - }); - - if (p2len > p1len) path.push(...path2.slice(p1len)); - - return path.join('/'); - }, -}; diff --git a/src/lib/utils/Uri.js b/src/lib/utils/Uri.js deleted file mode 100644 index a238b0176..000000000 --- a/src/lib/utils/Uri.js +++ /dev/null @@ -1,102 +0,0 @@ -import path from './Path'; - -export default { - /** - * Parse content uri to rootUri and docID - * - * eg. - *```js - * parse("content://.../AA98-181D%3A::.../index.html") - *``` - * `returns` {rootUri: "content://.../AA98-181D%3A", docId: "...index.html"} - * - * @param {string} contentUri - * @returns {{rootUri: string, docId: string, isFileUri: boolean}} - */ - parse(contentUri) { - let rootUri, - docId = ''; - - const DOC_PROVIDER = - /^content:\/\/com\.((?![:<>"\/\\\|\?\*]).)*\.documents\//; - const TREE_URI = - /^content:\/\/com\.((?![:<>"\/\\\|\?\*]).)*\.documents\/tree\//; - const SINGLE_URI = - /^content:\/\/com\.(((?![:<>"\/\\\|\?\*]).)*)\.documents\/document/; - - if (DOC_PROVIDER.test(contentUri)) { - if (TREE_URI.test(contentUri)) { - if (/::/.test(contentUri)) { - [rootUri, docId] = contentUri.split('::'); - } else { - rootUri = contentUri; - docId = decodeURIComponent(contentUri.split('/').slice(-1)[0]); - } - } else if (SINGLE_URI.test(contentUri)) { - const [provider, providerId] = SINGLE_URI.exec(contentUri); - docId = decodeURIComponent(contentUri); //DecodUri - docId = docId.replace(provider, ''); //replace single to tree - docId = path.normalize(docId); //normalize docid - - if (docId.startsWith('/')) docId = docId.slice(1); // remove leading '/' - - rootUri = - `content://com.${providerId}.documents/tree/` + - docId.split(':')[0] + - '%3A'; - } - - return { - rootUri, - docId, - isFileUri: /^file:\/\/\//.test(rootUri), - }; - } else { - throw new Error('Invalid uri format.'); - } - }, - /** - * Formats the five contentUri object to string - * @param {{rootUri: string, docId: string} | String} contentUriObject or rootId - * @param {string} [docId] - * @returns {string} - */ - format(contentUriObject, docId) { - let rootUri; - - if (typeof contentUriObject === 'string') { - rootUri = contentUriObject; - } else { - rootUri = contentUriObject.rootUri; - docId = contentUriObject.docId; - } - - if (docId) return [rootUri, docId].join('::'); - else return rootUri; - }, - /** - * Gets virtual address by replacing root with name i.e. added in file explorer - * @param {string} url - */ - getVirtualAddress(url) { - try { - const { docId, rootUri, isFileUri } = this.parse(url); - - if (isFileUri) return url; - const storageList = JSON.parse(localStorage.storageList || '[]'); - - for (let storage of storageList) { - if ((storage.uri ?? storage.url) === rootUri) { - const id = rootUri.split('/').pop(); - let filePath = docId.replace(decodeURL(id), ''); - if (filePath.startsWith('/')) filePath = filePath.slice(1); - return `${storage.name}/${filePath}`; - } - } - - return url; - } catch (e) { - return url; - } - }, -}; diff --git a/src/lib/utils/Url.js b/src/lib/utils/Url.js deleted file mode 100644 index 3fff8691b..000000000 --- a/src/lib/utils/Url.js +++ /dev/null @@ -1,252 +0,0 @@ -import URLParse from 'url-parse'; -import path from './Path'; -import Uri from './Uri'; - -export default { - /** - * Returns basename from a url eg. 'index.html' from 'ftp://localhost/foo/bar/index.html' - * @param {string} url - */ - basename(url) { - url = this.parse(url).url; - const protocol = this.getProtocol(url); - if (protocol === 'content:') { - try { - let { rootUri, docId, isFileUri } = Uri.parse(url); - - if (isFileUri) return this.basename(rootUri); - - if (docId.endsWith('/')) docId = docId.slice(0, -1); - docId = docId.split(':').pop(); - return this.pathname(docId).split('/').pop(); - } catch (error) { - return null; - } - } else { - if (url.endsWith('/')) url = url.slice(0, -1); - return this.pathname(url).split('/').pop(); - } - }, - - /** - * Checks if given urls are same or not - * @param {...String} urls - */ - areSame(...urls) { - let firstUrl = urls[0]; - if (firstUrl.endsWith('/')) firstUrl = firstUrl.slice(0, -1); - return urls.every(url => { - if (url.endsWith('/')) url = url.slice(0, -1); - return firstUrl === url; - }); - }, - - /** - * - * @param {String} url - * returns the extension of the path, from the last occurrence of the . (period) - * character to end of string in the last portion of the path. - * If there is no . in the last portion of the path, or if there are no . - * characters other than the first character of the basename of path (see path.basename()), - * an empty string is returned. - */ - extname(url) { - const name = this.basename(url); - if (name) return path.extname(name); - else return null; - }, - /** - * - * @param {...string} pathnames - * @returns {String} - */ - join(...pathnames) { - if (pathnames.length < 2) - throw new Error('Join(), requires atleast two parameters'); - - let { url, query } = this.parse(pathnames[0]); - - const protocol = (this.PROTOCOL_PATTERN.exec(url) || [])[0] || ''; - - if (protocol === 'content://') { - try { - if (pathnames[1].startsWith('/')) pathnames[1] = pathnames[1].slice(1); - const contentUri = Uri.parse(url); - const protocol = this.getProtocol(contentUri.rootUri); - if (protocol === 'content:') { - let [root, pathname] = contentUri.docId.split(':'); - const newDocId = path.join(pathname, ...pathnames.slice(1)); - return `${contentUri.rootUri}::${root}:${newDocId}${query}`; - } else { - return this.join(contentUri.rootUri, ...pathnames.slice(1)); - } - } catch (error) { - return null; - } - } else if (protocol) { - url = url.replace(new RegExp('^' + protocol), ''); - pathnames[0] = url; - return protocol + path.join(...pathnames) + query; - } else { - return path.join(url, ...pathnames.slice(1)) + query; - } - }, - /** - * Make url safe by encoding url components - * @param {string} url - */ - safe(url) { - let { url: uri, query } = this.parse(url); - url = uri; - const protocol = (this.PROTOCOL_PATTERN.exec(url) || [])[0] || ''; - if (protocol) url = url.replace(new RegExp('^' + protocol), ''); - const parts = url.split('/').map((part, i) => { - if (i === 0) return part; - return fixedEncodeURIComponent(part); - }); - return protocol + parts.join('/') + query; - - function fixedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return '%' + c.charCodeAt(0).toString(16); - }); - } - }, - /** - * Gets pathname from url eg. gets '/foo/bar' from 'ftp://myhost.com/foo/bar' - * @param {string} url - */ - pathname(url) { - if (typeof url !== 'string' || !this.PROTOCOL_PATTERN.test(url)) return url; - - url = url.split('?')[0]; - const protocol = (this.PROTOCOL_PATTERN.exec(url) || [])[0] || ''; - - if (protocol === 'content://') { - try { - const { rootUri, docId, isFileUri } = Uri.parse(url); - if (isFileUri) return this.pathname(rootUri); - else return '/' + (docId.split(':')[1] || docId); - } catch (error) { - return null; - } - } else { - if (protocol) url = url.replace(new RegExp('^' + protocol), ''); - - if (protocol !== 'file:///') - return '/' + url.split('/').slice(1).join('/'); - - return '/' + url; - } - }, - - /** - * Returns dirname from url eg. 'ftp://localhost/foo/' from 'ftp://localhost/foo/bar' - * @param {string} url - */ - dirname(url) { - if (typeof url !== 'string') throw new Error('URL must be string'); - - const urlObj = this.parse(url); - url = urlObj.url; - const protocol = this.getProtocol(url); - - if (protocol === 'content:') { - try { - let { rootUri, docId, isFileUri } = Uri.parse(url); - - if (isFileUri) return this.dirname(rootUri); - else { - if (docId.endsWith('/')) docId = docId.slice(0, -1); - docId = [...docId.split('/').slice(0, -1), ''].join('/'); - return Uri.format(rootUri, docId); - } - } catch (error) { - return null; - } - } else { - if (url.endsWith('/')) url = url.slice(0, -1); - return [...url.split('/').slice(0, -1), ''].join('/') + urlObj.query; - } - }, - - /** - * Parse given url into url and query - * @param {string} url - * @returns {URLObject} - */ - parse(url) { - const [uri, query = ''] = url.split(/(?=\?)/); - return { - url: uri, - query, - }; - }, - - /** - * Formate Url object to string - * @param {object} urlObj - * @param {"ftp:"|"sftp:"|"http:"|"https:"} urlObj.protocol - * @param {string|number} urlObj.hostname - * @param {string} [urlObj.path] - * @param {string} [urlObj.username] - * @param {string} [urlObj.password] - * @param {string|number} [urlObj.port] - * @param {object} [urlObj.query] - */ - formate(urlObj) { - let { protocol, hostname, username, password, path, port, query } = urlObj; - - const enc = (str) => encodeURIComponent(str); - - if (!protocol || !hostname) - throw new Error("Cannot formate url. Missing 'protocol' and 'hostname'."); - - let string = `${protocol}//`; - - if (username && password) string += `${enc(username)}:${enc(password)}@`; - else if (username) string += `${username}@`; - - string += hostname; - - if (port) string += `:${port}`; - - if (path) { - if (!path.startsWith('/')) path = '/' + path; - - string += path; - } - - if (query && typeof query === 'object') { - string += '?'; - - for (let key in query) string += `${enc(key)}=${enc(query[key])}&`; - - string = string.slice(0, -1); - } - - return string; - }, - /** - * Returns protocol of a url e.g. 'ftp:' from 'ftp://localhost/foo/bar' - * @param {string} url - * @returns {"ftp:"|"sftp:"|"http:"|"https:"} - */ - getProtocol(url) { - return (/^([a-z]+:)\/\/\/?/i.exec(url) || [])[1] || ''; - }, - /** - * - * @param {string} url - * @returns {string} - */ - hidePassword(url) { - const { protocol, username, hostname, pathname } = URLParse(url); - if (protocol === 'file:') { - return url; - } else { - return `${protocol}//${username}@${hostname}${pathname}`; - } - }, - PROTOCOL_PATTERN: /^[a-z]+:\/\/\/?/i, -}; diff --git a/src/lib/utils/helpers.js b/src/lib/utils/helpers.js deleted file mode 100644 index d9a5ae7b2..000000000 --- a/src/lib/utils/helpers.js +++ /dev/null @@ -1,716 +0,0 @@ -import Cryptojs from 'crypto-js'; -import constants from '../constants'; -import dialogs from '../../components/dialogs'; -import keyBindings from '../keyBindings'; -import tag from 'html-tag-js'; -import ajax from '@deadlyjack/ajax'; -import path from './Path'; -import Url from './Url'; -import Uri from './Uri'; -import fsOperation from '../fileSystem/fsOperation'; - -const credentials = { - key: 'xkism2wq3)(I#$MNkds0)*(73am)(*73_L:w3k[*(#WOd983jkdssap sduy*&T#W3elkiu8983hKLUYs*(&y))', - - encrypt(str) { - return Cryptojs.AES.encrypt(str, this.key).toString(); - }, - - decrypt(str) { - return Cryptojs.AES.decrypt(str, this.key).toString(Cryptojs.enc.Utf8); - }, -}; - -export default { - credentials, - showTitleLoader() { - setTimeout(() => { - app.classList.remove('title-loading-hide'); - app.classList.add('title-loading'); - }, 0); - }, - removeTitleLoader() { - setTimeout(() => { - app.classList.add('title-loading-hide'); - }, 0); - }, - /** - * Get extension name - * @param {String} pathname - * @returns - */ - extname(pathname) { - const res = path.extname(pathname); - if (res) return res.slice(1).toLowerCase(); - return res; - }, - /** - * Get error message for file error code - * @param {number} code - * @returns {string} - */ - getErrorMessage(code) { - switch (code) { - case 1: - return 'Path not found'; - case 2: - return 'Security error'; - case 3: - return 'Action aborted'; - case 4: - return 'File not readable'; - case 5: - return 'File encoding error'; - case 6: - return 'Modification not allowed'; - case 7: - return 'Invalid state'; - case 8: - return 'Syntax error'; - case 9: - return 'Invalid modification'; - case 10: - return 'Quota exceeded'; - case 11: - return 'Type mismatch'; - case 12: - return 'Path already exists'; - default: - return 'Uncaught error'; - } - }, - /** - * Get programming language name for extension name - * @param {String} ext - * @returns - */ - getLangNameFromExt(ext) { - if (ext === 'mdb') return 'access'; - if (ext === 'any') return 'anyscript'; - if ( - [ - 'xl', - 'xls', - 'xlr', - 'xlsx', - 'xltx', - 'xlthtml', - 'sdc', - 'ods', - 'dex', - 'cell', - 'def', - 'ods', - 'ots', - 'uos', - ].includes(ext) - ) - return 'excel'; - if (ext === 'pde') return 'processinglang'; - if (['py', 'pyc', 'pyd', 'pyo', 'pyw', 'pyz', 'gyp'].includes(ext)) - return 'python'; - if (ext === 'src') return 'source'; - if (['doc', 'docx', 'odt', 'rtf', 'wpd'].includes(ext)) return 'word'; - if (['txt', 'csv'].includes(ext)) return 'text'; - return ext; - }, - /** - * Gets programming language name according to filename - * @param {String} filename - * @returns - */ - getLangNameFromFileName(filename) { - const regex = { - postcssconfig: /^postcss\.config\.js$/i, - typescriptdef: /\.d\.ts$/i, - webpack: /^webpack\.config\.js$/i, - yarn: /^yarn\.lock$/i, - npm: /(^package\.json$)|(^package\-lock\.json$)/i, - testjs: /\.test\.js$/i, - testts: /\.test\.ts$/i, - eslint: /(^\.eslintrc$)|(^\.eslintignore$)/i, - git: /(^\.gitignore$)|(^\.gitmodules$)/i, - jsmap: /\.map\.js$/i, - jsconfig: /^jsconfig.json$/i, - jsbeautify: /^jsbeautifyrc$/i, - actionscript: /\.as$/i, - ada: /\.(ada|adb)$/i, - apache: /\.?(htaccess|htgroups|conf|htaccess|htpasswd)$/i, - asciidoc: /\.(asciidoc|adoc)$/i, - assembly: /\.(a|asm)$/i, - autohotkey: /\.ahk$/i, - apex: /\.(apex|cls|trigger|tgr)$/i, - babel: /\.babelrc$/i, - crystal: /\.cr$/i, - cpp: /\.(cpp|cc|cxx|ino)$/i, - cppheader: /\.(hh|hpp)$/i, - clojure: /\.clj$/i, - clojurescript: /\.cljs$/i, - cobol: /\.(cbl|cob)$/i, - csharp: /\.cs$/i, - coffeescript: /(\.(coffee|cf|cson))$|(^cakefile)$/i, - cmake: /^cmake$/i, - dartlang: /\.dart$/i, - diff: /\.diff$/i, - dlang: /\.(d|di)$/i, - docker: /^dockerfile$/i, - drools: /\.drl$/i, - ejs: /\.ejs$/i, - elixir: /\.(ex|exs)$/i, - elm: /\.elm$/i, - erlang: /\.(erl|hrl)$/i, - fortran: /\.(f|f90)$/i, - fsharp: /\.(fsi|fs|fsx|fsscript)$/i, - gcode: /\.gcode$/i, - glsl: /\.(glsl|frag|vert)$/i, - graphql: /\.gql$/i, - groovy: /\.groovy$/i, - haml: /\.haml$/i, - handlebars: /\.(hbs|handlebars|tpl|mustache)$/i, - haskell: /\.hs$/i, - cabal: /\.cabal$/i, - haxe: /\.hx$/i, - hjson: /\.hjson$/i, - html: /\.(html|htm|xhtml|vue|we|wpy)$/i, - ini: /\.(ini|conf|cfg|prefs)$/i, - io: /\.io$/i, - javascript: /\.(js|jsm)$/i, - jsx: /\.jsx$/i, - jsp: /\.jsp$/i, - julia: /\.jl$/i, - kotlin: /\.(kt|kts)$/i, - license: /^license$/i, - less: /\.less$/i, - liquid: /\.liquid$/i, - lisp: /\.lisp$/i, - livescript: /\.ls$/i, - lsl: /\.lsl$/i, - lua: /\.(lua|lp)$/i, - makefile: /^makefile$|^GNUmakefile$|^OCamlMakefile$|\.?make$/i, - markdown: /\.(md|markdown)$/i, - matlab: /\.matlab$/i, - mysql: /\.mysql$/i, - nginx: /\.(nginx|conf)$/i, - nim: /\.nim$/i, - objectivec: /\.m$/i, - objectivecpp: /\.mm$/i, - ocaml: /\.(ml|mli)$/i, - perl: /\.(pl|pm|p6|pl6|pm6)$/i, - pgsql: /\.pgsql$/i, - php: /\.(php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module)$/i, - puppet: /\.(epp|pp)$/i, - powershell: /\.ps1$/i, - prolog: /\.(plg|prolog)$/i, - protobug: /\.proto$/i, - razor: /\.(cshtml|asp)$/i, - red: /\.(red|reds)$/i, - ruby: /^rakefile$|^guardfile$|^rakefile$|^gemfile$|\.(rb|ru|gemspec|rake)$/i, - rust: /\.rs$/i, - sass: /\.sass$/i, - scss: /\.scss$/i, - scala: /\.(scala|sbt)$/i, - shell: /\.(sh|bash)$|^..*rc$/i, - android: /\.slim$/i, - smali: /\.(smali)$/i, - smarty: /\.(smarty|tpl)$/i, - sql: /\.sql$/i, - stylus: /\.(styl|stylus)$/i, - svg: /\.svg$/i, - swift: /\.swift$/i, - tcl: /\.tcl$/i, - terraform: /\.(tf|tfvars|terragrunt)$/i, - tex: /\.tex$/i, - textile: /\.textile$/i, - toml: /\.toml$/i, - typescript: /\.(ts|typescript|str|tsx)$/i, - vala: /\.vala$/i, - vb: /\.(vb|vbs)$/i, - velocity: /\.vm$/i, - verilog: /\.(v|vh|sv|svh)$/i, - vhdl: /\.(vhd|vhdl)$/i, - xml: /\.(xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml)$/i, - xquery: /\.xq$/i, - yaml: /\.(yaml|yml)$/i, - }; - for (let type in regex) { - if (regex[type].test(filename)) return type; - } - - const ext = this.extname(filename); - return this.getLangNameFromExt(ext); - }, - /** - * Gets icon according to filename - * @param {string} filename - */ - getIconForFile(filename) { - let file; - let ext = this.extname(filename); - - if (['mp4', 'm4a', 'mov', '3gp', 'wmv', 'flv', 'avi'].includes(ext)) - file = 'movie'; - if (['png', 'jpeg', 'jpg', 'gif', 'ico', 'webp'].includes(ext)) - file = 'image'; - if (['wav', 'mp3', 'flac'].includes(ext)) file = 'audiotrack'; - if (['zip', 'rar', 'tar', 'deb'].includes(ext)) file = 'zip'; - if (ext === 'apk') file = 'android'; - - if (file) return 'icon ' + file; - return `file file_type_${this.getLangNameFromFileName(filename)}`; - }, - /** - * - * @param {FileEntry[]} list - * @param {object} fileBrowser settings - * @param {boolean | function(string):boolean} [readOnly] - * @param {'both'|'file'|'folder'} - */ - sortDir(list, fileBrowser, readOnly = false, mode = 'both') { - const dir = []; - const file = []; - const sortByName = fileBrowser.sortByName; - const showHiddenFile = fileBrowser.showHiddenFiles; - let getEnabled = () => true; - - if (typeof readOnly === 'function') { - getEnabled = readOnly; - readOnly = false; - } - - for (let item of list) { - let hidden; - - item.name = decodeURL(item.name || path.basename(item.url || '')); - hidden = item.name[0] === '.'; - - if (typeof item.readOnly !== 'boolean') item.readOnly = readOnly; - if (typeof item.canWrite !== 'boolean') item.canWrite = !readOnly; - if (typeof item.isDirectory !== 'boolean') { - if (this.isDir(item.type)) item.isDirectory = true; - } - if (!item.type) item.type = item.isDirectory ? 'dir' : 'file'; - if (!item.url) item.url = item.url || item.uri; - if (item.isFile) item.disabled = !getEnabled(item.name); - if ((hidden && showHiddenFile) || !hidden) { - if (item.isDirectory) { - dir.push(item); - } else if (item.isFile) { - file.push(item); - } - } - if (item.isDirectory) { - item.icon = 'folder'; - } else { - if (mode === 'folder') { - item.disabled = true; - } - item.icon = this.getIconForFile(item.name); - } - } - - if (sortByName) { - dir.sort(compare); - file.sort(compare); - } - - return dir.concat(file); - - function compare(a, b) { - return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1; - } - }, - /** - * Gets error message from error object - * @param {Error} err - * @param {...string} args - */ - errorMessage(err, ...args) { - args.map((arg) => { - try { - return Url.pathname(arg); - } catch (error) { - return arg; - } - }); - - const extra = args.join('
    '); - let msg; - - if (typeof err === 'string') { - msg = err; - } else if (err instanceof Error) { - msg = err.message; - } else if (err.code !== null) { - msg = this.getErrorMessage(err.code); - } - - return msg + (extra ? '
    ' + extra : ''); - }, - /** - * - * @param {Error} err - * @param {...string} args - * @returns {PromiseLike} - */ - error(err, ...args) { - console.error(err, ...args); - - if (err.code === 0) { - this.toast(err); - return; - } - - let hide = null; - const onhide = () => { - if (hide) hide(); - }; - const promise = { - then(fun) { - if (typeof fun === 'function') { - hide = fun; - } - }, - }; - - const msg = this.errorMessage(err, ...args); - dialogs.alert(strings.error, msg, onhide); - return promise; - }, - /** - * - * @param {Error} err - * @param {...string} args - */ - toast(err, ...args) { - window.toast(this.errorMessage(err, ...args)); - }, - /** - * - * @param {string} color - * @returns {'hex'|'rgb'|'hsl'} - */ - checkColorType(color) { - const { HEX_COLOR, RGB_COLOR, HSL_COLOR } = constants; - - if (HEX_COLOR.test(color)) return 'hex'; - if (RGB_COLOR.test(color)) return 'rgb'; - if (HSL_COLOR.test(color)) return 'hsl'; - return null; - }, - /** - * - * @param {string} str - * @returns {string} - */ - removeLineBreaks(str) { - return str.replace(/(\r\n)+|\r+|\n+|\t+/g, ''); - }, - /** - * Conversts base64 string ot Blob - * @param {Uint8Array} byteCharacters - * @param {String} contentType - * @param {Number} sliceSize - * @returns {Blob} - */ - b64toBlob(byteCharacters, contentType, sliceSize) { - contentType = contentType || ''; - sliceSize = sliceSize || 512; - const byteArrays = []; - - for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) { - let slice = byteCharacters.slice(offset, offset + sliceSize); - - let byteNumbers = new Array(slice.length); - for (let i = 0; i < slice.length; i++) { - byteNumbers[i] = slice.charCodeAt(i); - } - - let byteArray = new Uint8Array(byteNumbers); - - byteArrays.push(byteArray); - } - - let blob = new Blob(byteArrays, { - type: contentType, - }); - return blob; - }, - /** - * Gets body for feedback email - * @param {String} eol - * @returns - */ - getFeedbackBody(eol) { - const buildInfo = window.BuildInfo || {}; - const device = window.device || {}; - return ( - 'Version: ' + - buildInfo.version + - eol + - 'Device: ' + - (device.model || '') + - eol + - 'Manufacturer: ' + - (device.manufacturer || '') + - eol + - 'Android version: ' + - device.version + - eol + - 'Info: ' - ); - }, - /** - * Converts Blob object to text - * @param {Blob} blob - * @returns {String} - */ - blob2text(blob) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - - reader.onload = function () { - resolve(reader.result); - }; - - reader.onerror = function () { - reject(reader.error); - }; - - reader.readAsText(blob); - }); - }, - /** - * Returns unique ID - * @returns {string} - */ - uuid() { - return ( - new Date().getTime() + parseInt(Math.random() * 100000000000) - ).toString(36); - }, - /** - * Resets key binding - */ - async resetKeyBindings() { - const customKeyBindings = {}; - for (let binding in keyBindings) { - const { key, readOnly, description } = keyBindings[binding]; - if (!readOnly) - customKeyBindings[binding] = { - description, - key, - }; - } - const fs = fsOperation(KEYBINDING_FILE); - if (!(await fs.exists())) { - fsOperation(DATA_STORAGE).createFile(Url.basename(KEYBINDING_FILE)); - } - try { - fs.writeFile(JSON.stringify(customKeyBindings, undefined, 2)); - } catch (error) { - console.log(error); - } - }, - /** - * Loads script files to app - * @param {...string} scripts - * @returns {Promise} - */ - loadScripts(...scripts) { - return new Promise((resolve) => { - load(); - - function load() { - const script = scripts.splice(0, 1); - ajax({ - url: script, - responseType: 'text', - }) - .then((res) => { - const $script = tag('script', { - id: script, - textContent: res, - }); - document.head.append($script); - }) - .finally(() => { - if (!scripts.length) resolve(); - else load(); - }); - } - }); - }, - /** - * Loads style sheet to app - * @param {...string} styles - * @returns {Promise} - */ - loadStyles(...styles) { - return new Promise((resolve) => { - load(); - - function load() { - const style = styles.splice(0, 1); - ajax({ - url: style, - responseType: 'text', - }) - .then((res) => { - const $style = tag('style', { - id: style, - textContent: res, - }); - document.head.append($style); - }) - .finally(() => { - if (!styles.length) resolve(); - else load(); - }); - } - }); - }, - /** - * Parses JSON string, if fails returns null - * @param {Object|Array} string - */ - parseJSON(string) { - if (!string) return null; - try { - return JSON.parse(string); - } catch (e) { - return null; - } - }, - /** - * Gets keyboard combination pressed by user - * @param {KeyboardEvent} e - * @returns {string} - */ - getCombination(e) { - let key = e.ctrlKey ? 'Ctrl-' : ''; - key += e.shiftKey ? 'Shift-' : ''; - key += e.key; - return key.toLowerCase(); - }, - /** - * Decodes arrayBuffer to String according given encoding type - * @param {ArrayBuffer} arrayBuffer - * @param {String} [encoding='utf-8'] - */ - decodeText(arrayBuffer, encoding = 'utf-8') { - const uint8Array = new Uint8Array(arrayBuffer); - const result = new TextDecoder(encoding).decode(uint8Array); - return result; - }, - /** - * Converts JSON object to CSS string - * @param {String} selector - * @param {Map} obj - * @returns {String} - */ - jsonToCSS(selector, obj) { - let cssText = `${selector}{\n`; - - for (let key in obj) { - cssText += `${key}: ${obj[key]};\n`; - } - - return cssText + '}'; - }, - /** - * Checks if content is binary - * @param {any} content - * @returns {boolean} - */ - isBinary(content) { - return /[\x00-\x08\x0E-\x1F]/.test(content); - }, - /** - * Checks whether given type is directory or not - * @param {'dir'|'directory'|'folder'} type - * @returns {Boolean} - */ - isDir(type) { - return /^(dir|directory|folder)$/.test(type); - }, - /** - * Checks whether given type is file or not - * @param {'file'|'link'} type - * @returns {Boolean} - */ - isFile(type) { - return /^(file|link)$/.test(type); - }, - /** - * Replace matching part of url to alias name by which storage is added - * @param {String} url - * @returns {String} - */ - getVirtualPath(url) { - url = Url.parse(url).url; - - if (/^content:/.test(url)) { - return Uri.getVirtualAddress(url); - } - - const storageList = JSON.parse(localStorage.storageList || '[]'); - - for (let uuid of storageList) { - const storageUrl = Url.parse(uuid.uri || '').url; - if (!storageUrl) continue; - const regex = new RegExp('^' + storageUrl); - if (regex.test(url)) { - url = url.replace( - regex, - `${uuid.name}${url.startsWith('/') ? '' : '/'}`, - ); - break; - } - } - return url; - }, - /** - * Updates uri of all active which matches the oldUrl as location - * of the file - * @param {String} oldUrl - * @param {String} newUrl - */ - updateUriOfAllActiveFiles(oldUrl, newUrl) { - const files = editorManager.files; - const { url } = Url.parse(oldUrl); - - for (let file of files) { - if (!file.uri) continue; - const fileUrl = Url.parse(file.uri).url; - if (new RegExp('^' + url).test(fileUrl)) { - if (newUrl) { - file.uri = Url.join(newUrl, file.filename); - } else { - file.uri = null; - } - } - } - - editorManager.onupdate('file-delete'); - }, - /** - * Checks whether given objects are equal or not - * @param {Object} obj1 - * @param {Object} obj2 - * @returns - */ - areEqual(obj1, obj2) { - if (obj1 === obj2) return true; - if (obj1 == null || obj2 == null) return false; - if (obj1.constructor !== obj2.constructor) return false; - - for (let key in obj1) { - if (!obj2.hasOwnProperty(key)) return false; - if (obj1[key] === obj2[key]) continue; - if (typeof obj1[key] !== 'object') return false; - if (!this.isObjectEqual(obj1[key], obj2[key])) return false; - } - - return true; - }, -}; diff --git a/src/lib/utils/polyfill.js b/src/lib/utils/polyfill.js deleted file mode 100644 index bacf5a8e6..000000000 --- a/src/lib/utils/polyfill.js +++ /dev/null @@ -1,97 +0,0 @@ -export default function loadPolyFill() { - if (!('isConnected' in Node.prototype)) { - Object.defineProperty(Node.prototype, 'isConnected', { - get() { - return ( - !this.ownerDocument || - !( - this.ownerDocument.compareDocumentPosition(this) & - this.DOCUMENT_POSITION_DISCONNECTED - ) - ); - }, - }); - } - - if (!DOMTokenList.prototype.replace) { - DOMTokenList.prototype.replace = function (a, b) { - if (this.contains(a)) { - this.add(b); - this.remove(a); - return true; - } - return false; - }; - } - - if (!HTMLElement.prototype.append) { - HTMLElement.prototype.append = function (...nodes) { - nodes.map((node) => this.appendChild(node)); - }; - } - - if (!HTMLElement.prototype.remove) { - HTMLElement.prototype.remove = function () { - this.parentElement.removeChild(this); - }; - } - - if (!HTMLElement.prototype.getParent) { - HTMLElement.prototype.getParent = function (queryString) { - const $$ = [...document.querySelectorAll(queryString)]; - for (let $ of $$) if ($.contains(this)) return $; - return null; - }; - } - Object.defineProperty(String.prototype, 'hashCode', { - value: function () { - let hash = 0; - for (let i = 0; i < this.length; i++) { - const chr = this.charCodeAt(i); - hash = (hash << 5) - hash + chr; - hash |= 0; // Convert to 32bit integer - } - return Math.abs(hash) + (hash < 0 ? 'N' : ''); - }, - }); - - Object.defineProperty(String.prototype, 'subtract', { - value: function (str) { - return this.replace(new RegExp('^' + str), ''); - }, - }); - - Object.defineProperty(String.prototype, 'capitalize', { - value: function (index) { - if (typeof index === 'number' && index >= 0) { - const strs = [ - this.slice(0, index), - this.slice(index, index + 1), - this.slice(index + 1), - ]; - return strs[0] + (strs[1] ? strs[1].toUpperCase() : '') + strs[2]; - } else { - let strs = this.split(' '); - strs = strs.map((str) => { - if (str.length > 0) return str[0].toUpperCase() + str.slice(1); - return ''; - }); - return strs.join(' '); - } - }, - }); - - /** - * Decode any url recursively until its fully decoded - * @param {string} url URL string - * @returns {string} - */ - window.decodeURL = (url) => { - if (/%[0-9a-f]{2}/i.test(url)) { - const newurl = decodeURIComponent(url); - if (url === newurl) return url; - return decodeURL(newurl); - } - return url; - }; -} diff --git a/src/main.js b/src/main.js new file mode 100644 index 000000000..50a176d18 --- /dev/null +++ b/src/main.js @@ -0,0 +1,715 @@ +import "core-js/stable"; +import "html-tag-js/dist/polyfill"; + +import "./main.scss"; +import "res/icons/style.css"; +import "res/file-icons/style.css"; +import "styles/overrideAceStyle.scss"; +import "styles/wideScreen.scss"; + +import "lib/polyfill"; +import "ace/supportedModes"; +import "components/WebComponents"; + +import fsOperation from "fileSystem"; +import sidebarApps from "sidebarApps"; +import ajax from "@deadlyjack/ajax"; +import { setKeyBindings } from "ace/commands"; +import { initModes } from "ace/modelist"; +import Contextmenu from "components/contextmenu"; +import Sidebar from "components/sidebar"; +import { TerminalManager } from "components/terminal"; +import tile from "components/tile"; +import toast from "components/toast"; +import tutorial from "components/tutorial"; +import confirm from "dialogs/confirm"; +import intentHandler, { processPendingIntents } from "handlers/intent"; +import keyboardHandler, { keydownState } from "handlers/keyboard"; +import quickToolsInit from "handlers/quickToolsInit"; +import windowResize from "handlers/windowResize"; +import Acode from "lib/acode"; +import actionStack from "lib/actionStack"; +import applySettings from "lib/applySettings"; +import checkFiles from "lib/checkFiles"; +import checkPluginsUpdate from "lib/checkPluginsUpdate"; +import EditorFile from "lib/editorFile"; +import EditorManager from "lib/editorManager"; +import { initFileList } from "lib/fileList"; +import lang from "lib/lang"; +import loadPlugins from "lib/loadPlugins"; +import Logger from "lib/logger"; +import NotificationManager from "lib/notificationManager"; +import openFolder, { addedFolder } from "lib/openFolder"; +import restoreFiles from "lib/restoreFiles"; +import settings from "lib/settings"; +import startAd from "lib/startAd"; +import mustache from "mustache"; +import plugins from "pages/plugins"; +import openWelcomeTab from "pages/welcome"; +import otherSettings from "settings/appSettings"; +import themes from "theme/list"; +import { getEncoding, initEncodings } from "utils/encodings"; +import helpers from "utils/helpers"; +import loadPolyFill from "utils/polyfill"; +import Url from "utils/Url"; +import $_fileMenu from "views/file-menu.hbs"; +import $_menu from "views/menu.hbs"; +import auth, { loginEvents } from "./lib/auth"; + +const previousVersionCode = Number.parseInt(localStorage.versionCode, 10); + +window.onload = Main; +const logger = new Logger(); + +async function Main() { + const oldPreventDefault = TouchEvent.prototype.preventDefault; + + ajax.response = (xhr) => { + return xhr.response; + }; + + loadPolyFill.apply(window); + + TouchEvent.prototype.preventDefault = function () { + if (this.cancelable) { + oldPreventDefault.bind(this)(); + } + }; + + window.addEventListener("resize", windowResize); + document.addEventListener("pause", pauseHandler); + document.addEventListener("resume", resumeHandler); + document.addEventListener("keydown", keyboardHandler); + document.addEventListener("deviceready", onDeviceReady); + document.addEventListener("backbutton", backButtonHandler); + document.addEventListener("menubutton", menuButtonHandler); +} + +async function onDeviceReady() { + await initEncodings(); // important to load encodings before anything else + + const isFreePackage = /(free)$/.test(BuildInfo.packageName); + const oldResolveURL = window.resolveLocalFileSystemURL; + const { + externalCacheDirectory, // + externalDataDirectory, + cacheDirectory, + dataDirectory, + } = cordova.file; + + window.app = document.body; + window.root = tag.get("#root"); + window.addedFolder = addedFolder; + window.editorManager = null; + window.toast = toast; + window.ASSETS_DIRECTORY = Url.join(cordova.file.applicationDirectory, "www"); + window.DATA_STORAGE = externalDataDirectory || dataDirectory; + window.CACHE_STORAGE = externalCacheDirectory || cacheDirectory; + window.PLUGIN_DIR = Url.join(DATA_STORAGE, "plugins"); + window.KEYBINDING_FILE = Url.join(DATA_STORAGE, ".key-bindings.json"); + window.IS_FREE_VERSION = isFreePackage; + window.log = logger.log.bind(logger); + + // Capture synchronous errors + window.addEventListener("error", (event) => { + const errorMsg = `Error: ${event.message}, Source: ${event.filename}, Line: ${event.lineno}, Column: ${event.colno}, Stack: ${event.error?.stack || "N/A"}`; + window.log("error", errorMsg); + }); + // Capture unhandled promise rejections + window.addEventListener("unhandledrejection", (event) => { + window.log( + "error", + `Unhandled rejection: ${event.reason ? event.reason.message : "Unknown reason"}\nStack: ${event.reason ? event.reason.stack : "No stack available"}`, + ); + }); + + startAd(); + + try { + await helpers.promisify(iap.startConnection).catch((e) => { + window.log("error", "connection error"); + window.log("error", e); + }); + + if (localStorage.acode_pro === "true") { + window.IS_FREE_VERSION = false; + } + + if (navigator.onLine) { + const purchases = await helpers.promisify(iap.getPurchases); + const isPro = purchases.find((p) => + p.productIds.includes("acode_pro_new"), + ); + if (isPro) { + window.IS_FREE_VERSION = false; + } else { + window.IS_FREE_VERSION = isFreePackage; + } + } + } catch (error) { + window.log("error", "Purchase error"); + window.log("error", error); + } + + try { + window.ANDROID_SDK_INT = await new Promise((resolve, reject) => + system.getAndroidVersion(resolve, reject), + ); + } catch (error) { + window.ANDROID_SDK_INT = Number.parseInt(device.version); + } + window.DOES_SUPPORT_THEME = (() => { + const $testEl = ( +
    + ); + document.body.append($testEl); + const client = $testEl.getBoundingClientRect(); + + $testEl.remove(); + + if (client.height === 0) return false; + return true; + })(); + window.acode = new Acode(); + + system.requestPermission("android.permission.READ_EXTERNAL_STORAGE"); + system.requestPermission("android.permission.WRITE_EXTERNAL_STORAGE"); + system.requestPermission("android.permission.POST_NOTIFICATIONS"); + + const { versionCode } = BuildInfo; + + if (previousVersionCode !== versionCode) { + system.clearCache(); + } + + if (!(await fsOperation(PLUGIN_DIR).exists())) { + await fsOperation(DATA_STORAGE).createDirectory("plugins"); + } + + localStorage.versionCode = versionCode; + document.body.setAttribute( + "data-version", + `v${BuildInfo.version} (${versionCode})`, + ); + acode.setLoadingMessage("Loading settings..."); + + window.resolveLocalFileSystemURL = function (url, ...args) { + oldResolveURL.call(this, Url.safe(url), ...args); + }; + + setTimeout(async () => { + if (document.body.classList.contains("loading")) { + window.log("warn", "App is taking unexpectedly long time!"); + document.body.setAttribute( + "data-small-msg", + "This is taking unexpectedly long time!", + ); + } + }, 1000 * 10); + + acode.setLoadingMessage("Loading settings..."); + await settings.init(); + themes.init(); + + acode.setLoadingMessage("Loading language..."); + await lang.set(settings.value.lang); + + try { + await loadApp(); + } catch (error) { + window.log("error", error); + toast(`Error: ${error.message}`); + } finally { + setTimeout(async () => { + document.body.removeAttribute("data-small-msg"); + app.classList.remove("loading", "splash"); + + // load plugins + try { + await loadPlugins(); + // Ensure at least one sidebar app is active after all plugins are loaded + // This handles cases where the stored section was from an uninstalled plugin + sidebarApps.ensureActiveApp(); + + // Re-emit events for active file after plugins are loaded + const { activeFile } = editorManager; + if (activeFile?.uri) { + // Re-emit file-loaded event + editorManager.emit("file-loaded", activeFile); + // Re-emit switch-file event + editorManager.emit("switch-file", activeFile); + } + } catch (error) { + window.log("error", "Failed to load plugins!"); + window.log("error", error); + toast("Failed to load plugins!"); + } + applySettings.afterRender(); + + // Check login status before emitting events + try { + const isLoggedIn = await auth.isLoggedIn(); + if (isLoggedIn) { + loginEvents.emit(); + } + } catch (error) { + console.error("Error checking login status:", error); + toast("Error checking login status"); + } + }, 500); + } + + await promptUpdateCheckConsent(); + + // Check for app updates + if (settings.value.checkForAppUpdates && navigator.onLine) { + cordova.plugin.http.sendRequest( + "https://api.github.com/repos/Acode-Foundation/Acode/releases/latest", + { + method: "GET", + responseType: "json", + }, + (response) => { + const release = response.data; + // assuming version is in format v1.2.3 + const latestVersion = release.tag_name + .replace("v", "") + .split(".") + .map(Number); + const currentVersion = BuildInfo.version.split(".").map(Number); + + const hasUpdate = latestVersion.some( + (num, i) => num > currentVersion[i], + ); + + if (hasUpdate) { + acode.pushNotification( + "Update Available", + `Acode ${release.tag_name} is now available! Click here to checkout.`, + { + icon: "update", + type: "warning", + action: () => { + system.openInBrowser(release.html_url); + }, + }, + ); + } + }, + (err) => { + window.log("error", "Failed to check for updates"); + window.log("error", err); + }, + ); + } + checkPluginsUpdate() + .then((updates) => { + if (!updates.length) return; + acode.pushNotification( + "Plugin Updates", + `${updates.length} plugin${updates.length > 1 ? "s" : ""} ${updates.length > 1 ? "have" : "has"} new version${updates.length > 1 ? "s" : ""} available.`, + { + icon: "extension", + action: () => { + plugins(updates); + }, + }, + ); + }) + .catch(console.error); +} + +async function promptUpdateCheckConsent() { + try { + if (Boolean(localStorage.getItem("checkForUpdatesPrompted"))) return; + + if (settings.value.checkForAppUpdates) { + localStorage.setItem("checkForUpdatesPrompted", "true"); + return; + } + + const message = strings["prompt update check consent message"]; + const shouldEnable = await confirm(strings?.confirm, message); + localStorage.setItem("checkForUpdatesPrompted", "true"); + if (shouldEnable) { + await settings.update({ checkForAppUpdates: true }, false); + } + } catch (error) { + console.error("Failed to prompt for update check consent", error); + } +} + +async function loadApp() { + let $mainMenu; + let $fileMenu; + const $editMenuToggler = ( + + ); + const $navToggler = ( + + ); + const $menuToggler = ( + + ); + const $header = tile({ + type: "header", + text: "Acode", + lead: $navToggler, + tail: $menuToggler, + }); + const $main =
    ; + const $sidebar = ; + const $runBtn = ( + acode.exec("run")} + oncontextmenu={() => acode.exec("run-file")} + /> + ); + const $floatingNavToggler = ( + acode.exec("toggle-sidebar")} + /> + ); + const $headerToggler = ( + + ); + const folders = helpers.parseJSON(localStorage.folders); + const files = helpers.parseJSON(localStorage.files) || []; + const editorManager = await EditorManager($header, $main); + + const setMainMenu = () => { + if ($mainMenu) { + $mainMenu.removeEventListener("click", handleMenu); + $mainMenu.destroy(); + } + const { openFileListPos, fullscreen } = settings.value; + if (openFileListPos === settings.OPEN_FILE_LIST_POS_BOTTOM && fullscreen) { + $mainMenu = createMainMenu({ bottom: "6px", toggler: $menuToggler }); + } else { + $mainMenu = createMainMenu({ top: "6px", toggler: $menuToggler }); + } + $mainMenu.addEventListener("click", handleMenu); + }; + + const setFileMenu = () => { + if ($fileMenu) { + $fileMenu.removeEventListener("click", handleMenu); + $fileMenu.destroy(); + } + const { openFileListPos, fullscreen } = settings.value; + if (openFileListPos === settings.OPEN_FILE_LIST_POS_BOTTOM && fullscreen) { + $fileMenu = createFileMenu({ bottom: "6px", toggler: $editMenuToggler }); + } else { + $fileMenu = createFileMenu({ top: "6px", toggler: $editMenuToggler }); + } + $fileMenu.addEventListener("click", handleMenu); + }; + + acode.$headerToggler = $headerToggler; + window.actionStack = actionStack.windowCopy(); + window.editorManager = editorManager; + setMainMenu(settings.value.openFileListPos); + setFileMenu(settings.value.openFileListPos); + actionStack.onCloseApp = () => acode.exec("save-state"); + $headerToggler.onclick = function () { + root.classList.toggle("show-header"); + this.classList.toggle("keyboard_arrow_left"); + this.classList.toggle("keyboard_arrow_right"); + }; + + //#region rendering + applySettings.beforeRender(); + root.appendOuter($header, $main, $floatingNavToggler, $headerToggler); + //#endregion + + //#region Add event listeners + initModes(); + quickToolsInit(); + sidebarApps.init($sidebar); + await sidebarApps.loadApps(); + editorManager.onupdate = onEditorUpdate; + root.on("show", mainPageOnShow); + app.addEventListener("click", onClickApp); + editorManager.on("rename-file", onFileUpdate); + editorManager.on("switch-file", onFileUpdate); + editorManager.on("file-loaded", onFileUpdate); + navigator.app.overrideButton("menubutton", true); + system.setIntentHandler(intentHandler, intentHandler.onError); + system.getCordovaIntent(intentHandler, intentHandler.onError); + setTimeout(showTutorials, 1000); + settings.on("update:openFileListPos", () => { + setMainMenu(); + setFileMenu(); + }); + settings.on("update:fullscreen", () => { + setMainMenu(); + setFileMenu(); + }); + + $sidebar.onshow = () => { + const activeFile = editorManager.activeFile; + if (activeFile) editorManager.editor.blur(); + }; + sdcard.watchFile(KEYBINDING_FILE, async () => { + await setKeyBindings(editorManager.editor); + toast(strings["key bindings updated"]); + }); + //#endregion + + const notificationManager = new NotificationManager(); + notificationManager.init(); + + window.log("info", "Started app and its services..."); + + // Show welcome tab on first launch, otherwise create default file + const isFirstLaunch = Number.isNaN(previousVersionCode); + if (isFirstLaunch) { + openWelcomeTab(); + } else { + new EditorFile(); + } + + // load theme plugins + try { + await loadPlugins(true); + } catch (error) { + window.log("error", "Failed to load theme plugins!"); + window.log("error", error); + toast("Failed to load theme plugins!"); + } + + acode.setLoadingMessage("Loading folders..."); + if (Array.isArray(folders)) { + for (const folder of folders) { + folder.opts.listFiles = !!folder.opts.listFiles; + openFolder(folder.url, folder.opts); + } + } + + if (Array.isArray(files) && files.length) { + try { + await restoreFiles(files); + // save state to handle file loading gracefully + sessionStorage.setItem("isfilesRestored", true); + // Process any pending intents that were queued before files were restored + await processPendingIntents(); + } catch (error) { + window.log("error", "File loading failed!"); + window.log("error", error); + toast("File loading failed!"); + } + } else { + // Even when no files need to be restored, mark as restored and process pending intents + sessionStorage.setItem("isfilesRestored", true); + await processPendingIntents(); + onEditorUpdate(undefined, false); + } + + initFileList(); + + TerminalManager.restorePersistedSessions().catch((error) => { + console.error("Terminal restoration failed:", error); + }); + + /** + * + * @param {MouseEvent} e + */ + function handleMenu(e) { + const $target = e.target; + const action = $target.getAttribute("action"); + const value = $target.getAttribute("value") || undefined; + if (!action) return; + + if ($mainMenu.contains($target)) $mainMenu.hide(); + if ($fileMenu.contains($target)) $fileMenu.hide(); + acode.exec(action, value); + } + + function onEditorUpdate(mode, saveState = true) { + const { activeFile } = editorManager; + + // if (!$editMenuToggler.isConnected) { + // $header.insertBefore($editMenuToggler, $header.lastChild); + // } + if (activeFile?.type === "page" || activeFile?.type === "terminal") { + $editMenuToggler.remove(); + } else { + if (!$editMenuToggler.isConnected) { + $header.insertBefore($editMenuToggler, $header.lastChild); + } + } + + if (mode === "switch-file") { + if (settings.value.rememberFiles && activeFile) { + localStorage.setItem("lastfile", activeFile.id); + } + return; + } + + if (saveState) acode.exec("save-state"); + } + + async function onFileUpdate() { + try { + const { serverPort, previewPort } = settings.value; + let canRun = false; + if (serverPort !== previewPort) { + canRun = true; + } else { + const { activeFile } = editorManager; + canRun = await activeFile?.canRun(); + } + + if (canRun) { + $header.insertBefore($runBtn, $header.lastChild); + } else { + $runBtn.remove(); + } + } catch (error) { + $runBtn.removeAttribute("run-file"); + $runBtn.remove(); + } + } +} + +function onClickApp(e) { + let el = e.target; + if (el instanceof HTMLAnchorElement || checkIfInsideAnchor()) { + e.preventDefault(); + e.stopPropagation(); + + system.openInBrowser(el.href); + } + + function checkIfInsideAnchor() { + const allAs = [...document.body.getAll("a")]; + + for (const a of allAs) { + if (a.contains(el)) { + el = a; + return true; + } + } + + return false; + } +} + +function mainPageOnShow() { + const { editor } = editorManager; + editor.resize(true); +} + +function createMainMenu({ top, bottom, toggler }) { + return Contextmenu({ + right: "6px", + top, + bottom, + toggler, + transformOrigin: top ? "top right" : "bottom right", + innerHTML: () => { + return mustache.render($_menu, strings); + }, + }); +} + +function createFileMenu({ top, bottom, toggler }) { + const $menu = Contextmenu({ + top, + bottom, + toggler, + transformOrigin: top ? "top right" : "bottom right", + innerHTML: () => { + const file = window.editorManager.activeFile; + + if (file.type === "page") { + return ""; + } + + if (file.loading) { + $menu.classList.add("disabled"); + } else { + $menu.classList.remove("disabled"); + } + + const { label: encoding } = getEncoding(file.encoding); + const isEditorFile = file.type === "editor"; + return mustache.render($_fileMenu, { + ...strings, + file_mode: isEditorFile + ? (file.session?.getMode()?.$id || "").split("/").pop() + : "", + file_encoding: isEditorFile ? encoding : "", + file_read_only: !file.editable, + file_on_disk: !!file.uri, + file_eol: isEditorFile ? file.eol : "", + copy_text: !!window.editorManager.editor.getCopyText(), + is_editor: isEditorFile, + }); + }, + }); + + return $menu; +} + +function showTutorials() { + if (window.innerWidth > 750) { + tutorial("quicktools-tutorials", (hide) => { + const onclick = () => { + otherSettings(); + hide(); + }; + + return ( +

    + Quicktools has been disabled because it seems like + you are on a bigger screen and probably using a keyboard. To enable + it,{" "} + + click here + {" "} + or press Ctrl + Shift + P and search for{" "} + quicktools. +

    + ); + }); + } +} + +function backButtonHandler() { + if (keydownState.esc) { + keydownState.esc = false; + return; + } + actionStack.pop(); +} + +function menuButtonHandler() { + const { acode } = window; + acode?.exec("toggle-sidebar"); +} + +function pauseHandler() { + const { acode } = window; + acode?.exec("save-state"); +} + +function resumeHandler() { + if (!settings.value.checkFiles) return; + checkFiles(); +} diff --git a/src/main.scss b/src/main.scss new file mode 100644 index 000000000..8d0f5fa39 --- /dev/null +++ b/src/main.scss @@ -0,0 +1,856 @@ +@use "./styles/page.scss"; +@use "./styles/list.scss"; +@use "./styles/mixins.scss"; +@use "./styles/keyframes.scss"; +@use "./styles/fileInfo.scss"; +@use "./styles/markdown.scss"; + +:root { + --scrollbar-width: 4px; +} + +* { + margin: 0; + padding: 0; + + &:focus { + outline: none; + } +} + +html { + overflow: auto; +} + +html, +body { + width: 100%; + height: 100%; + font-size: 14px; +} + +body { + user-select: none; + font-family: "Roboto", sans-serif; + -webkit-tap-highlight-color: transparent; + background-color: #9999ff; + background-color: var(--primary-color); + color: #252525; + color: var(--secondary-text-color); + + &.no-animation * { + animation: none !important; + transition: none !important; + box-shadow: none !important; + } + + &:not(.loading).title-loading { + &.title-loading-hide { + &::after { + background-image: none; + transform: translateX(-50%) translateY(-100%) scale3d(0.5, 0.5, 1); + opacity: 0; + animation: hide-loader 100ms ease-in 1; + } + } + + &::after { + content: ""; + background-color: #3333ff; + background-color: var(--primary-color); + border-radius: 50%; + position: fixed; + height: 40px; + width: 40px; + top: 6px; + left: 50%; + transform: translateX(-50%); + background-image: url(res/tail-spin.svg); + background-repeat: no-repeat; + background-position: center; + background-size: 30px; + box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2); + box-shadow: 0 0 4px 0 var(--box-shadow-color); + border: solid 1px transparent; + border: solid 1px var(--popup-border-color); + animation: appear 100ms ease-out 1; + box-sizing: border-box; + z-index: 999; + } + } + + .main { + position: relative; + } +} + +a { + color: #615efd; + color: var(--link-text-color); +} + +.open-file-list { + position: relative; + height: 30px; + width: 100%; + background-color: #9999ff; + background-color: var(--primary-color); + overflow-x: auto !important; + overflow-y: hidden !important; + display: flex; + flex-direction: row !important; + color: white; + color: var(--primary-text-color); + z-index: 5; + + li.tile { + $width: 120px; + height: 100%; + overflow: hidden; + font-size: 0.8em; + align-items: center; + margin: 0; + padding: 0; + color: inherit; + min-width: $width; + min-width: var(--file-tab-width); + max-width: $width; + max-width: var(--file-tab-width); + + .text { + display: inline-block; + white-space: nowrap; + max-width: $width; + max-width: var(--file-tab-width); + overflow: hidden; + text-overflow: ellipsis; + margin: 0; + padding: 0; + color: inherit; + } + + &.notice { + &::before { + content: "•"; + color: #ffda0c; + font-size: 1.5em; + margin-left: 2.5px; + text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5); + } + } + + &.active { + border-top: solid 2px gold; + background-color: rgba(0, 0, 0, 0.2); + } + + .file, + .icon { + height: 24px; + width: 24px; + font-size: 1em; + background-size: 22px; + background-position: center; + color: inherit; + } + } +} + +a.icon { + pointer-events: all !important; + color: white; + + &:focus, + &:active { + border: none; + outline: none; + } +} + +.no-scroll { + &::-webkit-scrollbar { + width: 0px; + height: 0px; + } +} + +.list, +.prompt, +.scroll { + &::-webkit-scrollbar { + width: var(--scrollbar-width); + height: var(--scrollbar-width); + } + + &::-webkit-scrollbar-track { + background: transparent; + } + + &::-webkit-scrollbar-thumb { + background: rgba(0, 0, 0, 0.333); + background: var(--scrollbar-color); + border-radius: calc(var(--scrollbar-width) / 2); + } +} + +.icon { + user-select: none; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + text-decoration: none; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background-position: center; + background-size: 24px; + background-repeat: no-repeat; + + &.hidden { + display: none !important; + } + + &.color { + display: flex; + + &::before { + content: ""; + height: 16px; + width: 16px; + border: solid 1px #a90000; + border: solid 1px var(--active-color); + background-color: currentColor; + color: inherit !important; + } + + &.dark { + color: #252525; + } + + &.light { + color: #ffffff; + } + } + + &.notice { + @include mixins.icon-badge; + } + + &.angularjs::before { + content: "\e92f"; + color: #dd0031; + } + + &.html::before { + content: "\e939"; + color: #e34f26; + } + + &.disabled { + opacity: 0.6; + pointer-events: none; + } + + &.dull { + opacity: 0.6; + } + + &:focus { + border: rgba(0, 0, 0, 0.1); + } + + &:not(.floating):active { + transition: all 100ms ease; + background-color: rgba(0, 0, 0, 0.2) !important; + background-color: var(--active-icon-color) !important; + } + + &.active { + background-color: rgba(0, 0, 0, 0.2) !important; + background-color: var(--active-icon-color) !important; + } + + &.no-icon { + max-width: 5px; + margin-right: 5px; + border-radius: 0; + } + + &.letters::before { + content: attr(data-letters); + text-transform: uppercase; + font-size: 0.6em; + font-weight: bolder; + } +} + +.mask { + position: fixed; + left: 0; + top: 0; + display: block; + height: 100vh; + width: 100vw; + background-color: black; + opacity: 0; +} + +footer { + + &.button-container, + .button-container { + overflow-x: auto; + + .section { + max-width: 100%; + min-width: 100%; + + .icon.active { + @include mixins.active-icon; + } + } + + background-color: #9999ff; + background-color: var(--primary-color); + color: white; + color: var(--primary-text-color); + } +} + +.section, +.button-container { + display: flex; + min-height: 40px; + background-color: inherit; + color: inherit; + user-select: none; + width: 100%; + + &.primary { + button { + color: white !important; + color: var(--button-text-color) !important; + background-color: #39f !important; + background-color: var(--button-background-color) !important; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 4px var(--box-shadow-color); + border-radius: 4px; + + &:active { + background-color: #2c8ef0 !important; + background-color: var(--button-active-color) !important; + box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + box-shadow: inset 0 0 2px var(--box-shadow-color); + } + } + } + + &.disabled { + pointer-events: none; + + .icon, + input, + button { + opacity: 0.6; + } + } + + >button { + flex: 1; + display: inline-flex; + align-items: center; + justify-content: center; + border: none; + text-transform: uppercase; + background-color: inherit; + color: inherit; + + * { + pointer-events: none; + } + + &.disabled { + pointer-events: none; + opacity: 0.6; + } + + &:active { + transition: all 100ms ease; + box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2); + box-shadow: inset 0 0 4px var(--box-shadow-color); + } + + &:disabled { + opacity: 0.6; + } + } + + textarea, + input { + flex: 2; + height: auto; + color: inherit; + border-bottom: 1px solid currentColor; + margin: 5px; + background-color: inherit; + + &::placeholder { + color: rgba(255, 255, 255, 0.6); + } + } + + .icon { + color: inherit; + font-size: 1.3em; + } + + .search, + .save { + font-size: 1em; + } +} + +input { + height: 40px; + outline: none; + border: none; + background-color: inherit; + border-bottom: solid 1px #252525; + border-bottom: solid 1px var(--secondary-text-color); + padding: 0; + box-sizing: border-box; + color: #252525; + color: var(--secondary-text-color); + caret-color: currentColor; + text-indent: 10px; + + &:focus { + border-bottom-color: #a90000 !important; + border-bottom-color: var(--active-color) !important; + } +} + +input, +textarea { + &::placeholder { + color: inherit; + opacity: 0.8; + } +} + +.search-status { + flex: 1; + display: flex; + color: white; + color: var(--primary-text-color); + align-items: center; + justify-content: center; + + span:not(:nth-child(2)) { + margin: 0 5px; + color: white; + color: var(--primary-text-color); + } +} + +.cursor { + position: absolute; + top: 0; + left: 0; + display: block; + border-radius: 50%; + background-color: white; + background-color: var(--primary-text-color); + border: solid 1px #666; + box-sizing: border-box; + transform-origin: left top; + z-index: 4; + pointer-events: none; + + &[data-size="60"] { + width: 60px; + height: 60px; + } + + &[data-size="30"] { + width: 30px; + height: 30px; + } + + &[data-size="20"] { + width: 20px; + height: 20px; + } + + &.end { + border-radius: 0% 50% 50% 50%; + } + + &.start { + border-radius: 50% 0 50% 50%; + } + + &.single { + transform: rotate(45deg); + border-radius: 0 50% 50% 50%; + } +} + +.cursor-menu { + position: absolute; + top: 0; + left: 0; + height: 40px; + background-color: #ffffff; + background-color: var(--secondary-color); + display: flex; + border-radius: 4px; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 8px var(--box-shadow-color); + border: none; + border: solid 1px var(--popup-border-color); + color: #252525; + color: var(--secondary-text-color); + transform-origin: left center; + z-index: 4; + + >span, + >div { + display: inline-flex; + align-items: center; + justify-content: center; + height: 100%; + font-size: 0.9em; + min-width: 50px; + color: inherit; + user-select: none; + white-space: nowrap; + + &.disabled { + opacity: 0.6; + pointer-events: none; + } + } +} + +.file { + display: flex; + align-items: center; + justify-content: center; + background-repeat: no-repeat; + background-position: 6px center; + background-size: 18px; + width: 30px; + height: 30px; +} + +.hr { + display: flex; + align-items: center; + margin: auto auto 15px auto; + + &::after, + &::before { + content: ""; + height: 1px; + width: 60px; + background-color: #252525; + background-color: var(--secondary-text-color); + margin: auto 15px; + opacity: 0.5; + } +} + +.d-none { + display: none !important; +} + +.floating.icon { + position: fixed; + height: 50px; + width: 50px; + font-size: 1.6rem; + border: 1px solid; + background-color: #9999ff; + background-color: var(--primary-color); + top: 10px; + right: 10px; + opacity: 0.2; + box-sizing: border-box; + color: white; + color: var(--primary-text-color); + transition: all 300ms ease; + box-shadow: -5px 5px 20px 0px rgba(0, 0, 0, 0.5); + + &:active { + transition: all 100ms ease; + box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.5); + } + + &.hide { + opacity: 0 !important; + } +} + +button { + cursor: pointer; + + &.floating.icon { + z-index: 1; + opacity: 1; + + &:disabled { + opacity: 0.2; + } + } +} + +#social-links { + position: relative; + height: 60px; + font-size: 1.2em; + width: 100%; + text-align: center; + + &::after { + display: block; + width: 100%; + content: attr(title); + text-align: center; + font-size: 0.5em; + text-transform: none; + } + + a { + display: inline-flex; + min-height: 40px; + min-width: 40px; + text-shadow: 0 0 1px white; + + &.github { + color: black; + } + } +} + +#header-toggler { + display: none; + top: 10px; + right: 10px; + z-index: 1; + height: 40px; + width: 40px; +} + +#sidebar-toggler { + display: none; + top: 10px; + left: 10px; + z-index: 1; + height: 40px; + width: 40px; +} + +#quicktools-toggler { + top: auto; + bottom: 10px; + right: 10px; + z-index: 1; +} + +.sake { + animation: sake 3s ease-out infinite; +} + +.flex-center { + display: flex; + align-items: center; + justify-content: center; +} + +.link { + text-decoration: underline; +} + +.w-resize { + cursor: w-resize; +} + +.note { + margin: 20px 0; + + .note-title { + background-color: rgba(0, 0, 0, 0.2); + display: flex; + align-items: center; + justify-content: center; + height: 30px; + text-transform: uppercase; + + .icon { + margin: 0 10px; + } + } + + p { + padding: 10px; + box-sizing: border-box; + opacity: 0.8; + font-size: 0.9rem; + } +} + +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-results-button, +input[type="search"]::-webkit-search-results-decoration { + -webkit-appearance: none; +} + +.tab-page-container { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: hidden; +} + +.tab-page-content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: auto; +} + +.notification-toast-container { + position: absolute; + bottom: 20px; + left: 10px; + right: 10px; + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 8px; + z-index: 1000; + pointer-events: none; + + >* { + pointer-events: auto; + } + + .notification-toast { + padding: 12px; + border-radius: 6px; + background: var(--secondary-color); + min-width: 200px; + max-width: min(400px, calc(100vw - 40px)); + display: flex; + gap: 12px; + align-items: flex-start; + box-shadow: 0 4px 12px var(--box-shadow-color); + animation: toastSlideIn 0.3s ease-out; + transition: all 0.3s ease; + border: 1px solid var(--border-color); + word-break: break-word; + white-space: normal; + box-sizing: border-box; + + &.hiding { + transform: translateX(120%); + opacity: 0; + } + + .close-icon { + cursor: pointer; + font-size: 14px; + color: var(--secondary-text-color); + margin-left: auto; + + &:hover { + color: var(--button-background-color); + } + } + + .notification-icon { + width: 20px; + height: 20px; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + color: var(--primary-text-color); + } + + .notification-content { + flex: 1; + min-width: 0; + + .notification-title { + font-size: 13px; + font-weight: 500; + margin-bottom: 4px; + color: var(--primary-text-color); + display: flex; + justify-content: space-between; + align-items: center; + } + + .notification-message { + font-size: 12px; + color: var(--secondary-text-color); + line-height: 1.4; + overflow-wrap: break-word; + hyphens: auto; + } + } + + &.success { + .notification-icon { + color: #48c158; + } + } + + &.warning { + .notification-icon { + color: var(--danger-text-color); + } + } + + &.error { + .notification-icon { + color: var(--error-text-color); + } + } + + &.info { + .notification-icon { + color: var(--primary-text-color); + } + } + } + + @media (max-width: 768px) { + align-items: stretch; + + .notification-toast { + min-width: auto; + max-width: 100%; + } + } +} + +@keyframes toastSlideIn { + from { + transform: translateX(120%); + opacity: 0; + } + + to { + transform: translateX(0); + opacity: 1; + } +} diff --git a/src/pages/about/about.hbs b/src/pages/about/about.hbs deleted file mode 100644 index 7aa39ca62..000000000 --- a/src/pages/about/about.hbs +++ /dev/null @@ -1,113 +0,0 @@ -
    - -
    - - -
    -

    Acode editor {{version}}

    -
    -
    - {{#webview}} - - -
    - Webview {{versionName}} - {{packageName}} -
    -
    - {{/webview}} - - -
    - Official webpage -
    -
    - - -
    - Telegram -
    -
    - - -
    - Mail -
    -
    - - -
    - Twitter -
    -
    - - -
    - Instagram -
    -
    - - -
    - GitHub -
    -
    - - -
    - Stackoverflow -
    -
    - - -
    - YouTube -
    -
    - - -
    - foxdebug.com -
    -
    - - -
    Ace Editor
    -
    - - -
    Autosize
    -
    - - -
    Apache Cordova
    -
    - - -
    Babel js
    -
    - - -
    Webpack
    -
    - - -
    Mustache.js
    -
    - - -
    Marked
    -
    -
    - -
    -
    \ No newline at end of file diff --git a/src/pages/about/about.include.js b/src/pages/about/about.include.js deleted file mode 100644 index 7b2acbac0..000000000 --- a/src/pages/about/about.include.js +++ /dev/null @@ -1,57 +0,0 @@ -import './about.scss'; -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import Page from '../../components/page'; -import _template from './about.hbs'; -import rateBox from '../../components/dialogboxes/rateBox'; -import constants from '../../lib/constants'; - -export default function AboutInclude() { - const $page = Page(strings.about.capitalize()); - - system.getWebviewInfo( - (res) => render(res), - (err) => render(), - ); - - function render(webview) { - const $content = tag.parse( - mustache.render(_template, { - ...BuildInfo, - webview, - PERSONAL_EMAIL: constants.PERSONAL_EMAIL, - }), - ); - actionStack.push({ - id: 'about', - action: $page.hide, - }); - - $content.onclick = (e) => { - const $el = e.target; - if (!($el instanceof HTMLElement)) return; - const action = $el.getAttribute('action'); - if (!action) return; - - e.preventDefault(); - switch (action) { - case 'rate-box': - rateBox(); - break; - - default: - break; - } - }; - - $page.onhide = function () { - actionStack.remove('about'); - }; - - $page.classList.add('about-us'); - - $page.append($content); - } - - document.body.append($page); -} diff --git a/src/pages/about/about.js b/src/pages/about/about.js index edf974c1e..cb6a6b5c4 100644 --- a/src/pages/about/about.js +++ b/src/pages/about/about.js @@ -1,8 +1,123 @@ -//jshint ignore:start +import "./about.scss"; +import Logo from "components/logo"; +import Page from "components/page"; +import Reactive from "html-tag-js/reactive"; +import actionStack from "lib/actionStack"; +import constants from "lib/constants"; +import helpers from "utils/helpers"; -function About() { - import(/* webpackChunkName: "about" */ './about.include').then((res) => { - res.default(); - }); +export default function AboutInclude() { + const $page = Page(strings.about.capitalize()); + const webviewVersionName = Reactive("N/A"); + const webviewPackageName = Reactive("N/A"); + + $page.classList.add("about-us"); + $page.body = ( +
    + + +
    +

    Acode editor

    +
    + Version {BuildInfo.version} ({BuildInfo.versionCode}) +
    +
    + +
    + { + e.preventDefault(); + system.openInBrowser( + `https://play.google.com/store/apps/details?id=${webviewPackageName.value}`, + ); + }} + > +
    + +
    +
    + Webview {webviewVersionName} +
    {webviewPackageName}
    +
    +
    + +
    + +
    +
    + Official webpage +
    {constants.WEBSITE_URL}
    +
    +
    + +
    + +
    +
    + Foxbiz Software Pvt. Ltd. +
    {constants.FOXBIZ_URL}
    +
    +
    +
    + +
    + +
    + +
    + Mail +
    + +
    + +
    + Twitter +
    + +
    + +
    + Instagram +
    + +
    + +
    + GitHub +
    + +
    + +
    + Telegram +
    + +
    + +
    + Discord +
    +
    +
    + ); + + system.getWebviewInfo((res) => { + webviewPackageName.value = res?.packageName || "N/A"; + webviewVersionName.value = res?.versionName || "N/A"; + }); + + actionStack.push({ + id: "about", + action: $page.hide, + }); + + $page.onhide = function () { + actionStack.remove("about"); + helpers.hideAd(); + }; + + app.append($page); + helpers.showAd(); } -export default About; diff --git a/src/pages/about/about.scss b/src/pages/about/about.scss index bb6ce2dbb..6b66771e0 100644 --- a/src/pages/about/about.scss +++ b/src/pages/about/about.scss @@ -1,20 +1,129 @@ #about-page { - overflow: auto; - - .logo { - display: block; - height: 250px; - width: 250px; - border-radius: 50%; - background-repeat: no-repeat; - background-position: center; - background-size: contain; - box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.2); - box-shadow: 0 0 8px 2px (--box-shadow-color); - margin: 15px auto; + padding: 16px; + display: flex; + flex-direction: column; + align-items: center; + gap: 24px; + overflow-y: auto; + + .version-info { + text-align: center; + margin-bottom: 32px; + + .version-title { + font-size: 24px; + font-weight: 600; + margin-bottom: 4px; + } + + .version-number { + color: color-mix(in srgb, var(--primary-text-color) 60%, transparent); + font-size: 14px; + } + } + + .info-section { + width: 100%; + max-width: 400px; + min-height: fit-content; + height: auto; + background: color-mix(in srgb, + var(--popup-background-color) 20%, + transparent); + border-radius: 12px; + overflow: visible; + margin-bottom: 16px; + display: flex; + flex-direction: column; + + .info-item { + display: flex; + align-items: center; + padding: 16px; + color: var(--secondary-text-color); + text-decoration: none; + border-bottom: 1px solid var(--border-color); + transition: background 0.2s ease; + + &:last-child { + border-bottom: none; + } + + &:hover { + background: color-mix(in srgb, + var(--popup-background-color) 40%, + transparent); + } + + .info-item-icon { + width: 24px; + height: 24px; + margin-right: 12px; + display: flex; + align-items: center; + font-size: 24px; + } + + .info-item-text { + flex: 1; + font-size: 15px; + + .info-item-subtext { + color: color-mix(in srgb, var(--primary-text-color) 60%, transparent); + font-size: 13px; + margin-top: 2px; + } + } + } + } + + .social-links { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 12px; + width: 100%; + max-width: 400px; + + .social-link { + display: inline-flex; + align-items: center; + padding: 12px; + background: color-mix(in srgb, + var(--popup-background-color) 20%, + transparent); + border-radius: 12px; + color: var(--secondary-text-color); + text-decoration: none; + transition: all 0.2s ease; + + &:hover { + background: color-mix(in srgb, + var(--popup-background-color) 40%, + transparent); + transform: translateY(-1px); + } + + .social-icon { + width: 24px; + height: 24px; + margin-right: 12px; + font-size: 24px; + display: flex; + align-items: center; + } + } + } + + .icon { + height: 100%; + width: 100%; + } + + .foxbiz { + background-image: url(./foxbiz.svg); } - .file { - background-position: center; + .discord { + background-image: url(./discord.svg); } -} +} \ No newline at end of file diff --git a/src/pages/about/discord.svg b/src/pages/about/discord.svg new file mode 100644 index 000000000..c03e8e127 --- /dev/null +++ b/src/pages/about/discord.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/pages/about/foxbiz.svg b/src/pages/about/foxbiz.svg new file mode 100644 index 000000000..a6b3d6b95 --- /dev/null +++ b/src/pages/about/foxbiz.svg @@ -0,0 +1,46 @@ + + diff --git a/src/pages/about/index.js b/src/pages/about/index.js new file mode 100644 index 000000000..6ee332b35 --- /dev/null +++ b/src/pages/about/index.js @@ -0,0 +1,8 @@ +//jshint ignore:start + +function About() { + import(/* webpackChunkName: "about" */ "./about").then((res) => { + res.default(); + }); +} +export default About; diff --git a/src/pages/about/logo.png b/src/pages/about/logo.png new file mode 100644 index 000000000..657515246 Binary files /dev/null and b/src/pages/about/logo.png differ diff --git a/src/pages/changelog/changelog.js b/src/pages/changelog/changelog.js new file mode 100644 index 000000000..20dc31bf6 --- /dev/null +++ b/src/pages/changelog/changelog.js @@ -0,0 +1,195 @@ +import "./style.scss"; +import fsOperation from "fileSystem"; +import Contextmenu from "components/contextmenu"; +import Page from "components/page"; +import toast from "components/toast"; +import Ref from "html-tag-js/ref"; +import actionStack from "lib/actionStack"; +import markdownIt from "markdown-it"; +import markdownItFootnote from "markdown-it-footnote"; +import markdownItTaskLists from "markdown-it-task-lists"; +import helpers from "utils/helpers"; + +export default async function Changelog() { + const GITHUB_API_URL = + "https://api.github.com/repos/Acode-Foundation/Acode/releases"; + const CHANGELOG_FILE_URL = + "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/CHANGELOG.md"; + const currentVersion = BuildInfo.version; + + let selectedVersion = currentVersion; + let selectedStatus = "current"; + const versionIndicatorRef = Ref(); + const versionTextRef = Ref(); + const body = Ref(); + + const versionSelector = ( +
    + + {selectedVersion} +
    + ); + + const $page = Page(strings["changelog"], { + tail: versionSelector, + }); + + const versionSelectorMenu = Contextmenu({ + top: "36px", + right: "5px", + toggler: versionSelector, + transformOrigin: "top right", + onclick: menuClickHandler, + innerHTML: () => { + return ` +
  • + Current Version (${currentVersion}) +
  • +
  • + Latest Release +
  • +
  • + Beta Version +
  • +
  • + Full Changelog +
  • + `; + }, + }); + + const changelogMd = await import("../../../CHANGELOG.md"); + + toast("Loading changelog..."); + loadVersionChangelog(); + body.onref = () => renderChangelog(changelogMd.default); + $page.body =
    ; + app.append($page); + helpers.showAd(); + + $page.onhide = function () { + actionStack.remove("changelog"); + helpers.hideAd(); + }; + + actionStack.push({ + id: "changelog", + action: $page.hide, + }); + + async function loadLatestRelease() { + try { + const releases = await fsOperation(`${GITHUB_API_URL}/latest`).readFile( + "json", + ); + selectedVersion = releases.tag_name.replace("v", ""); + selectedStatus = "latest"; + updateVersionSelector(); + return renderChangelog(releases.body); + } catch (error) { + toast("Failed to load latest release notes"); + renderChangelog(changelogMd.default); + } + } + + async function loadBetaRelease() { + try { + const releases = await fsOperation(GITHUB_API_URL).readFile("json"); + const betaRelease = releases.find((r) => r.prerelease); + if (!betaRelease) { + body.content =
    No beta release found
    ; + return; + } + selectedVersion = betaRelease.tag_name.replace("v", ""); + selectedStatus = "prerelease"; + updateVersionSelector(); + return renderChangelog(betaRelease.body); + } catch (error) { + toast("Failed to load beta release notes"); + renderChangelog(changelogMd.default); + } + } + + async function loadFullChangelog() { + try { + const changeLogText = + await fsOperation(CHANGELOG_FILE_URL).readFile("utf8"); + const cleanedText = changeLogText.replace(/^#\s*Change\s*Log\s*\n*/i, ""); + selectedVersion = "Changelogs.md"; + selectedStatus = "current"; + updateVersionSelector(); + return renderChangelog(cleanedText); + } catch (error) { + toast("Failed to load full changelog"); + renderChangelog(changelogMd.default); + } + } + + async function loadVersionChangelog() { + try { + const releases = await fsOperation(GITHUB_API_URL).readFile("json"); + const currentRelease = releases.find( + (r) => r.tag_name.replace("v", "") === currentVersion, + ); + selectedVersion = currentVersion; + selectedStatus = "current"; + updateVersionSelector(); + if (currentRelease) { + return renderChangelog(currentRelease.body); + } else { + return loadLatestRelease(); + } + } catch (error) { + toast("Failed to load version changelog"); + renderChangelog(changelogMd.default); + } + } + + function renderChangelog(text) { + const md = markdownIt({ html: true, linkify: true }); + const REPO_URL = "https://github.com/Acode-Foundation/Acode"; + let processedText = text + // Convert full PR URLs to #number format with links preserved in markdown + .replace( + /https:\/\/github\.com\/Acode-Foundation\/Acode\/pull\/(\d+)/g, + `[#$1](${REPO_URL}/pull/$1)`, + ) + // Convert existing #number references to links if they aren't already + .replace(/(? { + const Changelog = res.default; + Changelog(); + }); +} + +export default plugin; diff --git a/src/pages/changelog/style.scss b/src/pages/changelog/style.scss new file mode 100644 index 000000000..e5bc0ddf8 --- /dev/null +++ b/src/pages/changelog/style.scss @@ -0,0 +1,62 @@ +#changelog { + max-width: 800px; + margin: auto; + overflow: auto; + padding: 0 1rem; +} + +.changelog-version-selector { + display: flex; + align-items: center; + gap: 8px; + background-color: var(--popup-background-color); + border: none; + border-radius: 8px; + padding: 8px 16px; + font-weight: 500; + cursor: pointer; + transition: all 0.2s ease; + margin-right: 6px; + + &:hover { + background-color: var(--secondary-color); + } +} + +.status-indicator { + display: inline-block; + width: 8px; + height: 8px; + border-radius: 50%; +} +.status-latest { + background-color: #10b981; +} +.status-prerelease { + background-color: var(--danger-color); +} +.status-current { + background-color: var(--active-icon-color); +} + +.loading { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + color: var(--primary-text-color); + font-size: 1.2em; + animation: pulse 1.5s ease-in-out infinite; +} + +@keyframes pulse { + 0% { + opacity: 0.6; + } + 50% { + opacity: 1; + } + 100% { + opacity: 0.6; + } +} diff --git a/src/pages/customTheme/customTheme.hbs b/src/pages/customTheme/customTheme.hbs deleted file mode 100644 index 16df2efbe..000000000 --- a/src/pages/customTheme/customTheme.hbs +++ /dev/null @@ -1,21 +0,0 @@ -
    -
    - {{#colors}} -
    - - -
    - {{text}} -
    -
    - {{/colors}} -
    -
    \ No newline at end of file diff --git a/src/pages/customTheme/customTheme.include.js b/src/pages/customTheme/customTheme.include.js deleted file mode 100644 index 9e9cf861a..000000000 --- a/src/pages/customTheme/customTheme.include.js +++ /dev/null @@ -1,121 +0,0 @@ -import './customTheme.scss'; -import tag from 'html-tag-js'; -import Mustache from 'mustache'; -import template from './customTheme.hbs'; -import Page from '../../components/page'; -import color from '../../components/dialogboxes/color'; -import helpers from '../../lib/utils/helpers'; -import constants from '../../lib/constants'; -import confirm from '../../components/dialogboxes/confirm'; -import select from '../../components/dialogboxes/select'; - -export default function CustomThemeInclude() { - const $page = Page(`${strings['custom']} ${strings['theme']}`.capitalize()); - let unsaved = false; - - $page.get('header').append( - tag('span', { - className: 'icon historyrestore', - attr: { - action: 'reset-theme', - }, - style: { - color: 'red', - }, - }), - tag('span', { - className: 'icon check', - attr: { - action: 'set-theme', - }, - }), - ); - - render(); - app.append($page); - - actionStack.push({ - id: 'custom-theme', - action: $page.hide, - }); - - $page.addEventListener('click', handleClick); - - /** - * Handle click event - * @param {MouseEvent | TouchEvent} e - */ - function handleClick(e) { - const $target = e.target; - if ($target instanceof HTMLElement) { - const action = $target.getAttribute('action'); - - if (action === 'set-theme') { - select(strings['theme type'], [ - ['light', strings['light']], - ['dark', strings['dark']], - ]).then((res) => { - appSettings.update({ - appTheme: 'custom', - customThemeMode: res, - }); - updateTheme(); - const title = $page.header.text; - if (title.slice(-1) === '*') { - $page.header.text = title.slice(0, -1); - } - }); - return; - } - - if (action === 'set-color') { - const name = $target.getAttribute('name'); - const defaultValue = $target.getAttribute('value'); - color(defaultValue).then((color) => { - appSettings.value.customTheme[name] = color; - appSettings.update(); - const scrolltop = $page.get('#custom-theme').scrollTop; - render(); - $page.get('#custom-theme').scrollTop = scrolltop; - if ($page.header.text.slice(-1) !== '*') $page.header.text += ' *'; - }); - - return; - } - - if (action === 'reset-theme') { - confirm(strings['info'].toUpperCase(), strings['reset warning']).then( - () => { - appSettings.reset('customTheme'); - render(); - updateTheme(); - }, - ); - } - } - } - - function render() { - const customThemeColor = appSettings.value.customTheme; - const colors = Object.keys(customThemeColor).map((color) => { - return { - color, - value: customThemeColor[color], - text: color.replace(/-/g, ' ').trim(), - }; - }); - const html = Mustache.render(template, { colors }); - const $content = $page.get('#custom-theme'); - if ($content) $content.remove(); - $page.append(tag.parse(html)); - } - - function updateTheme() { - tag.get('#custom-theme').textContent = helpers.jsonToCSS( - constants.CUSTOM_THEME, - appSettings.value.customTheme, - ); - - window.restoreTheme(); - } -} diff --git a/src/pages/customTheme/customTheme.js b/src/pages/customTheme/customTheme.js index 58de7c98b..a2bdd54ee 100644 --- a/src/pages/customTheme/customTheme.js +++ b/src/pages/customTheme/customTheme.js @@ -1,6 +1,115 @@ -export default async function CustomTheme(...args) { - const customTheme = ( - await import(/* webpackChunkName: "customTheme" */ './customTheme.include') - ).default; - customTheme(); -} +import "./customTheme.scss"; + +import Page from "components/page"; +import color from "dialogs/color"; +import confirm from "dialogs/confirm"; +import select from "dialogs/select"; +import actionStack from "lib/actionStack"; +import settings from "lib/settings"; +import ThemeBuilder from "theme/builder"; +import themes from "theme/list"; +import { isValidColor } from "utils/color/regex"; +import helpers from "utils/helpers"; + +export default function CustomThemeInclude() { + const theme = themes.get("custom"); + const $page = Page(`${strings["custom"]} ${strings["theme"]}`.capitalize()); + $page.header.append( + , + , + ); + + render(); + app.append($page); + helpers.showAd(); + + actionStack.push({ + id: "custom-theme", + action: $page.hide, + }); + + $page.onhide = () => { + actionStack.remove("custom-theme"); + helpers.hideAd(); + }; + + $page.addEventListener("click", handleClick); + + /** + * Handle click event + * @param {MouseEvent | TouchEvent} e + */ + async function handleClick(e) { + const $target = e.target; + if ($target instanceof HTMLElement) { + const action = $target.getAttribute("action"); + + if (action === "set-theme") { + try { + theme.type = await select(strings["theme type"], [ + ["light", strings["light"]], + ["dark", strings["dark"]], + ]); + applyTheme(); + } catch (error) {} + return; + } + + if (action === "reset-theme") { + const confirmation = await confirm( + strings["info"].toUpperCase(), + strings["reset warning"], + ); + if (!confirmation) return; + settings.reset("customTheme"); + themes.update(ThemeBuilder.fromJSON(settings.value.customTheme)); + applyTheme(); + render(); + } + } + } + + function applyTheme() { + setTimeout(() => { + themes.apply("custom"); + }, 300); + } + + function render() { + const pascalToNormal = (str) => + str.replace(/([A-Z])/g, " $1").toLowerCase(); + const customTheme = themes.get("custom"); + + $page.body = ( +
    +
    + {Object.keys(customTheme.toJSON()) + .filter((key) => isValidColor(customTheme[key])) + .map((key) => ( +
    { + const newColor = await color(customTheme[key]); + customTheme[key] = newColor; + e.target.get(".icon").style.color = newColor; + }} + > + +
    + {pascalToNormal(key)} +
    +
    + ))} +
    +
    + ); + } +} diff --git a/src/pages/customTheme/customTheme.scss b/src/pages/customTheme/customTheme.scss index b5ee6e77d..428261f8a 100644 --- a/src/pages/customTheme/customTheme.scss +++ b/src/pages/customTheme/customTheme.scss @@ -8,5 +8,6 @@ border: solid 1px rgb(255, 255, 255); border-radius: 50%; box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.2); + background-color: currentColor; } -} +} \ No newline at end of file diff --git a/src/pages/customTheme/index.js b/src/pages/customTheme/index.js new file mode 100644 index 000000000..23ec91ff6 --- /dev/null +++ b/src/pages/customTheme/index.js @@ -0,0 +1,6 @@ +export default async function CustomTheme(...args) { + const customTheme = ( + await import(/* webpackChunkName: "customTheme" */ "./customTheme") + ).default; + customTheme(); +} diff --git a/src/pages/donate/donate.hbs b/src/pages/donate/donate.hbs deleted file mode 100644 index cfbb6b955..000000000 --- a/src/pages/donate/donate.hbs +++ /dev/null @@ -1,6 +0,0 @@ -
    -
    -
    {{{col1}}}
    -
    {{{col2}}}
    -
    -
    \ No newline at end of file diff --git a/src/pages/donate/donate.include.js b/src/pages/donate/donate.include.js deleted file mode 100644 index 6b0e655d3..000000000 --- a/src/pages/donate/donate.include.js +++ /dev/null @@ -1,137 +0,0 @@ -import './donate.scss'; -import bodyHBS from "./donate.hbs"; -import productHBS from "./product.hbs"; -import mustache from "mustache"; -import Page from "../../components/page"; -import constants from "../../lib/constants"; -import ajax from '@deadlyjack/ajax'; -import helpers from '../../lib/utils/helpers'; -import dialogs from '../../components/dialogs'; - -//TODO: fix (-1 means, user is not logged in to any google account) - -export default function DonateInclude() { - const BASE_URL = "https://acode.foxdebug.com/res/"; - const $page = Page(strings.support); - - actionStack.push({ - id: 'donate page', - action: $page.hide, - }); - - $page.onhide = function () { - actionStack.remove('donate page'); - }; - - app.append($page); - - iap.setPurchaseUpdatedListener(purchases => { - if (Array.isArray(purchases)) { - (async function () { - const promises = []; - for (let purchase of purchases) { - promises.push( - new Promise((resolve, reject) => { - iap.consume(purchase.purchaseToken, resCode => { - purchase.consumed = resCode === iap.OK ? true : false; - purchase.consumeCode = resCode; - resolve(purchase); - }, err => { - reject(err); - }); - }) - ) - } - - const settledPromises = await Promise.allSettled(promises); - const rejectedPromise = settledPromises.find(promise => promise.status === 'rejected'); - let msg = ""; - if (rejectedPromise) { - msg = "Something went wrong.\n"; - msg += `Error: ${rejectedPromise.reason}\n`; - msg += `Code: ${rejectedPromise.value.resCode}`; - } else { - const blob = await ajax({ url: BASE_URL + "6.jpeg", responseType: "blob" }).catch(err => { - helpers.error(err); - }); - const url = URL.createObjectURL(blob); - msg = ``; - msg += strings['donation message']; - } - - dialogs.alert(strings.info.toUpperCase(), msg); - })(); - } - }, err => { - if (err !== iap.USER_CANCELED) dialogs.alert(strings.error.toUpperCase(), err); - }); - - app.onclick = function (e) { - const $target = e.target; - if (!($target instanceof HTMLElement)) return; - const action = $target.getAttribute('action'); - let value; - - switch (action) { - case 'donate': - value = $target.getAttribute('value'); - iap.purchase(value, purchase => { - console.log(purchase); - }, err => { - if (err !== iap.USER_CANCELED) dialogs.alert(strings.error.toUpperCase(), err); - }); - break; - default: - break; - } - }; - - helpers.showTitleLoader(); - - (async function render() { - - let products = await new Promise((resolve, reject) => { - iap.getProducts(constants.SKULIST, products => { - resolve(products); - }, err => { - reject(err); - }); - }); - - products = products.sort((a, b) => { - const aPrice = parseFloat(a.price.replace(/[^0-9.]/g, '')); - const bPrice = parseFloat(b.price.replace(/[^0-9.]/g, '')); - return aPrice - bPrice; - }); - - products = products.map(product => { - product.image = `${BASE_URL}${(product.productId === 'bronze' ? '1.jpeg' : '2.jpeg')}`; - product.donate = strings.donate.replace('{amount}', product.price); - return product; - }); - - const col1 = []; - const col2 = []; - products.forEach((product, i) => { - const html = mustache.render(productHBS, product) - if (i % 2 === 0) { - col1.push(html); - return; - } - col2.push(html); - }); - - $page.innerHTML = mustache.render(bodyHBS, { - col1: col1.join(''), - col2: col2.join(''), - }); - - })() - .catch(error => { - actionStack.pop(); - helpers.error(error); - }) - .finally(() => { - helpers.removeTitleLoader(); - }); -} \ No newline at end of file diff --git a/src/pages/donate/donate.js b/src/pages/donate/donate.js deleted file mode 100644 index 7188a3561..000000000 --- a/src/pages/donate/donate.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function Donate(){ - import(/* webpackChunkName: "donate" */ './donate.include').then((res) => { - const Donate = res.default; - Donate(); - } - ); -} \ No newline at end of file diff --git a/src/pages/donate/donate.scss b/src/pages/donate/donate.scss deleted file mode 100644 index f41297352..000000000 --- a/src/pages/donate/donate.scss +++ /dev/null @@ -1,53 +0,0 @@ -#donate-page{ - overflow: auto; - - .products{ - display: flex; - justify-content: center; - margin: 0 auto; - - .col{ - display: flex; - flex-direction: column; - width: 42.5%; - max-width: 450px; - margin: 10px 5% 10px 2.5%; - - &:nth-child(2n+1){ - margin: 10px 2.5% 10px 5%; - } - } - - .product{ - width: 100%; - margin-bottom: 10%; - border-radius: 4px; - box-shadow: 0 0 10px 0 rgba(0,0,0,0.2); - background-color: rgb(51, 153, 255); - background-color: var(--primary-color); - overflow: hidden; - height: fit-content; - min-height: 200px; - - - img{ - width: 100%; - min-height: 167px; - height: auto; - } - - .product-info{ - margin-top: -4px; - - p{ - padding: 10px; - box-sizing: border-box; - font-size: 0.8em; - color: rgb(37, 37, 37); - color: var(--text-color); - } - } - } - } - -} \ No newline at end of file diff --git a/src/pages/donate/product.hbs b/src/pages/donate/product.hbs deleted file mode 100644 index 8f2577b8d..000000000 --- a/src/pages/donate/product.hbs +++ /dev/null @@ -1,9 +0,0 @@ -
    - {{id}} -
    -

    {{description}}

    -
    - -
    -
    -
    \ No newline at end of file diff --git a/src/pages/fileBrowser/add-menu-home.hbs b/src/pages/fileBrowser/add-menu-home.hbs index ec4ece0d7..b5d81268d 100644 --- a/src/pages/fileBrowser/add-menu-home.hbs +++ b/src/pages/fileBrowser/add-menu-home.hbs @@ -1,3 +1,3 @@ -
  • {{add path}}
  • +
  • {{add path}}
  • {{add ftp}}
  • -
  • {{add sftp}}
  • \ No newline at end of file +
  • {{add sftp}}
  • \ No newline at end of file diff --git a/src/pages/fileBrowser/add-menu.hbs b/src/pages/fileBrowser/add-menu.hbs index 357eeab09..341b84090 100644 --- a/src/pages/fileBrowser/add-menu.hbs +++ b/src/pages/fileBrowser/add-menu.hbs @@ -1,3 +1,4 @@
  • {{new file}}
  • {{new folder}}
  • -
  • {{new project}}
  • \ No newline at end of file +
  • {{new project}}
  • +
  • {{import project zip}}
  • diff --git a/src/pages/fileBrowser/fileBrowser.include.js b/src/pages/fileBrowser/fileBrowser.include.js deleted file mode 100644 index c93cbea2e..000000000 --- a/src/pages/fileBrowser/fileBrowser.include.js +++ /dev/null @@ -1,1070 +0,0 @@ -import './fileBrowser.scss'; -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import Page from '../../components/page'; -import helpers from '../../lib/utils/helpers'; -import contextMenu from '../../components/contextMenu'; -import dialogs from '../../components/dialogs'; -import constants from '../../lib/constants'; -import filesSettings from '../settings/filesSettings'; -import _template from './fileBrowser.hbs'; -import _list from './list.hbs'; -import _addMenu from './add-menu.hbs'; -import _addMenuHome from './add-menu-home.hbs'; -import externalFs from '../../lib/fileSystem/externalFs'; -import fsOperation from '../../lib/fileSystem/fsOperation'; -import searchBar from '../../components/searchbar'; -import projects from './projects'; -import Url from '../../lib/utils/Url'; -import util from './util'; -import openFolder from '../../lib/openFolder'; -import recents from '../../lib/recents'; -import remoteStorage from '../../lib/remoteStorage'; -import URLParse from 'url-parse'; - -/** - * @typedef {{url: String, name: String}} Location - */ - -/** - * @typedef Storage - * @property {String} name - * @property {String} uuid - * @property {String} url - * @property {'dir'} type - * @property {'permission'|'ftp'|'sftp'|'sd'} storageType - */ - -/** - * - * @param {import('./fileBrowser').BrowseMode} [mode='file'] - * @param {function(string):boolean} [buttonText] button text or function to check extension - * @param {string} [info] - * @param {boolean} [doesOpenLast] - * @returns {Promise} - */ -function FileBrowserInclude(mode, info, buttonText, doesOpenLast = true) { - mode = mode || 'file'; - buttonText = buttonText || strings['select folder']; - - const IS_FOLDER_MODE = ['folder', 'both'].includes(mode); - const IS_FILE_MODE = ['file', 'both'].includes(mode); - const storedState = helpers.parseJSON(localStorage.fileBrowserState) || []; - /**@type {Array} */ - const state = []; - /**@type {Array} */ - const allStorages = []; - let storageList = JSON.parse(localStorage.storageList || '[]'); - - if (!info) { - if (mode !== 'both') { - info = IS_FOLDER_MODE ? strings['open folder'] : strings['open file']; - } else { - info = strings['file browser']; - } - } - - return new Promise((resolve, reject) => { - //#region Declaration - const $menuToggler = tag('i', { - className: 'icon more_vert', - attr: { - action: 'toggle-menu', - }, - }); - const $addMenuToggler = tag('i', { - className: 'icon add', - attr: { - action: 'toggle-add-menu', - }, - }); - const $search = tag('i', { - className: 'icon search', - attr: { - action: 'search', - }, - }); - const $lead = tag('span', { - className: 'icon clearclose', - attr: { - action: 'close', - }, - }); - const $page = Page(strings['file browser'].capitalize(), { - lead: $lead, - }); - const $content = tag.parse( - mustache.render(_template, { - type: mode, - info, - }), - ); - const $navigation = $content.get('.navigation'); - const menuOption = { - top: '8px', - right: '8px', - toggle: $menuToggler, - transformOrigin: 'top right', - }; - const $fbMenu = contextMenu({ - innerHTML: () => { - return ` -
  • ${strings.settings.capitalize(0)}
  • -
  • ${strings['reset connections'].capitalize(0)}
  • -
  • ${strings.reload.capitalize(0)}
  • - `; - }, - ...menuOption, - }); - const $addMenu = contextMenu({ - innerHTML: () => { - if (currentDir.url === '/') { - const addSftpNotice = !localStorage.__fbAddSftp; - const addPathNotice = !localStorage.__fbAddPath; - return mustache.render(_addMenuHome, { - addPathNotice, - addSftpNotice, - ...strings, - }); - } else { - return mustache.render(_addMenu, strings); - } - }, - ...((menuOption.toggle = $addMenuToggler) && menuOption), - }); - const progress = {}; - let cachedDir = {}; - let currentDir = { - url: null, - name: null, - list: [], - scroll: 0, - }; - let folderOption; - //#endregion - - actionStack.setMark(); - $lead.onclick = $page.hide; - $content.addEventListener('click', handleClick); - $content.addEventListener('contextmenu', handleContextMenu); - $page.append($content); - $page.get('header').append($search, $addMenuToggler, $menuToggler); - app.append($page); - - actionStack.push({ - id: 'filebrowser', - action: function () { - const err = new Error('User cancelled'); - Object.defineProperty(err, 'code', { - value: 0, - }); - reject(err); - $page.hide(); - }, - }); - - $fbMenu.onclick = function (e) { - $fbMenu.hide(); - const action = e.target.getAttribute('action'); - if (action === 'settings') { - filesSettings(reload); - return; - } - - if (action === 'reload') { - const { url } = currentDir; - if (url in cachedDir) delete cachedDir[url]; - reload(); - return; - } - - if (action === 'refresh') { - ftp.disconnect( - () => { }, - () => { }, - ); - sftp.close( - () => { }, - () => { }, - ); - toast(strings.success); - return; - } - - checkAndSetNotification(); - }; - - $addMenu.onclick = function (e) { - $addMenu.hide(); - const $target = e.target; - const action = $target.getAttribute('action'); - const value = $target.getAttribute('value'); - if (!action) return; - - switch (action) { - case 'create': - create(value); - break; - - case 'add-path': - localStorage.__fbAddPath = true; - addStorage(); - break; - - case 'addFtp': - case 'addSftp': - if (action === 'addSftp') { - localStorage.__fbAddSftp = true; - } - - remoteStorage[action]() - .then((storage) => { - updateStorage(storage); - }) - .catch((err) => { - if (err) console.error(err); - }); - break; - - default: - break; - } - - checkAndSetNotification(); - }; - - $search.onclick = function () { - const $list = $content.get('#list'); - if ($list) searchBar($list); - }; - - $page.onhide = function () { - actionStack.clearFromMark(); - actionStack.remove('filebrowser'); - $content.removeEventListener('click', handleClick); - $content.removeEventListener('contextmenu', handleContextMenu); - document.removeEventListener('resume', reload); - }; - - if (IS_FOLDER_MODE) { - const openFolder = tag('button', { - textContent: buttonText, - }); - folderOption = tag('footer', { - className: 'button-container', - child: openFolder, - }); - - $page.setAttribute('footer-height', 1); - $page.append(folderOption); - - openFolder.onclick = () => { - $page.hide(); - resolve({ - type: 'folder', - ...currentDir, - }); - }; - } - - if (doesOpenLast && storedState.length) { - loadStates(storedState); - return; - } - navigate('/', '/'); - - /** - * Called when any file folder is clicked - * @param {MouseEvent} e - * @param {"contextmenu"} [isContextMenu] - */ - function handleClick(e, isContextMenu) { - /** - * @type {HTMLElement} - */ - const $el = e.target; - let action = $el.getAttribute('action'); - if (!action) return; - - let url = $el.data_url; - let name = $el.data_name || $el.getAttribute('name'); - const opendoc = $el.hasAttribute('open-doc'); - const uuid = $el.getAttribute('uuid'); - const type = $el.getAttribute('type'); - const storageType = $el.getAttribute('storageType'); - const home = $el.getAttribute('home'); - const isDir = ['dir', 'directory', 'folder'].includes(type); - - if (!url) { - const $url = $el.get('data-url'); - if ($url) { - url = $url.textContent; - } - } - - if (storageType === 'notification') { - switch (uuid) { - case 'addstorage': - addStorage(); - break; - - default: - break; - } - return; - } - - if (!url && action === 'open' && isDir && !opendoc && !isContextMenu) { - dialogs.loader.hide(); - util.addPath(name, uuid).then((res) => { - const storage = allStorages.find((storage) => storage.uuid === uuid); - storage.url = res.uri; - storage.name = res.name; - name = res.name; - updateStorage(storage, false); - url = res.uri; - folder(); - }); - return; - } - - if (opendoc) action = 'open-doc'; - if (isContextMenu) action = 'contextmenu'; - - switch (action) { - case 'navigation': - folder(); - break; - case 'contextmenu': - cmhandler(); - break; - case 'open': - if (isDir) folder(); - else if (!$el.hasAttribute('disabled')) file(); - break; - case 'open-doc': - openDoc(); - break; - } - - function folder() { - if (home) { - navigateToHome(); - return; - } - navigate(url, name); - } - - function navigateToHome() { - const navigations = []; - const dirs = home.split('/'); - const { url: parsedUrl, query } = Url.parse(url); - let path = ''; - - for (let dir of dirs) { - path = Url.join(path, dir); - navigations.push({ - url: `${Url.join(parsedUrl, path, '')}${query}`, - name: dir || name, - }); - } - - loadStates(navigations); - } - - function file() { - $page.hide(); - resolve({ - type: 'file', - url, - name, - }); - } - - function cmhandler() { - if (appSettings.value.vibrateOnTap) { - navigator.vibrate(constants.VIBRATION_TIME); - } - if ($el.getAttribute('open-doc') === 'true') return; - - const options = [ - ['delete', strings.delete, 'delete'], - ['rename', strings.rename, 'text_format'], - ]; - - if (/s?ftp/.test(storageType)) { - options.push(['edit', strings.edit, 'edit']); - } - - if (helpers.isFile(type)) { - options.push(['info', strings.info, 'info']); - } - - dialogs.select('', options).then((res) => { - switch (res) { - case 'delete': - dialogs - .confirm( - strings.warning.toUpperCase(), - strings['delete {name}'].replace('{name}', name), - ) - .then(remove); - break; - case 'rename': - dialogs - .prompt(strings.rename, name, 'text', { - match: constants.FILE_NAME_REGEX, - }) - .then((newname) => { - rename(newname); - }); - break; - - case 'edit': - remoteStorage - .edit(storageList.find((storage) => storage.uuid === uuid)) - .then((storage) => { - if (storage) { - storage.uuid = uuid; - updateStorage(storage); - } - }) - .catch((err) => { - if (err) console.error(err); - }); - break; - - case 'info': - Acode.exec('file-info', url); - break; - } - }); - } - - function rename(newname) { - if (uuid) { - renameStorage(newname); - } else { - renameFile(newname); - } - } - - function remove() { - if (uuid) { - removeStorage(); - } else { - removeFile(); - } - } - - async function renameFile(newname) { - const fs = fsOperation(url); - try { - const newUrl = await fs.renameTo(newname); - openFolder.updateItem(url, newUrl, newname); - toast(strings.success); - reload(); - } catch (err) { - helpers.error(err); - } - } - - async function removeFile() { - try { - const fs = fsOperation(url); - if (helpers.isFile(type)) await fs.deleteFile(); - if (helpers.isDir(type)) await fs.deleteDir(); - recents.removeFile(url); - if (helpers.isDir(type)) { - helpers.updateUriOfAllActiveFiles(url); - recents.removeFolder(url); - openFolder.removeItem(url); - openFolder.removeFolders(url); - } else { - const openedFile = editorManager.getFile(url, 'uri'); - if (openedFile) openedFile.uri = null; - } - delete cachedDir[url]; - reload(); - toast(strings.success); - } catch (err) { - helpers.error(err); - } - } - - function removeStorage() { - if (url) { - recents.removeFolder(url); - recents.removeFile(url); - } - storageList = storageList.filter((storage) => { - if (storage.uuid !== uuid) { - return true; - } - - if (storage.url) { - const parsedUrl = URLParse(storage.url, true); - const keyFile = decodeURIComponent( - parsedUrl.query['keyFile'] || '', - ); - if (keyFile) { - fsOperation(keyFile).deleteFile(); - } - } - return false; - }); - localStorage.storageList = JSON.stringify(storageList); - reload(); - } - - function renameStorage(newname) { - storageList = storageList.map((storage) => { - if (storage.uuid === uuid) storage.name = newname; - return storage; - }); - localStorage.storageList = JSON.stringify(storageList); - reload(); - } - - function openDoc() { - sdcard.openDocumentFile( - (res) => { - res.url = res.uri; - resolve({ - type: 'file', - ...res, - name: res.filename, - mode: 'single', - }); - $page.hide(); - }, - (err) => { - helpers.error(err); - }, - ); - } - } - - function handleContextMenu(e) { - handleClick(e, true); - } - - function checkAndSetNotification() { - const addButtonNotice = !localStorage.__fbAddPath || !localStorage.__fbAddSftp; - - if (addButtonNotice) { - $addMenuToggler.classList.add('notice'); - } else { - $addMenuToggler.classList.remove('notice'); - } - } - - async function listAllStorages() { - let hasInternalStorage = true; - if (IS_FOLDER_MODE) folderOption.classList.add('disabled'); - allStorages.length = 0; - - if (ANDROID_SDK_INT == 29) { - const rootDirName = cordova.file.externalRootDirectory; - const testDirName = 'Acode_Test_file' + helpers.uuid(); - const testDirFs = fsOperation(Url.join(rootDirName, testDirName)); - - try { - await fsOperation(rootDirName).createDirectory(testDirName); - await testDirFs.createFile('test' + helpers.uuid()); - - hasInternalStorage = !!(await testDirFs.lsDir()).length; - } catch (error) { - console.error(error); - } finally { - testDirFs.deleteDir(); - } - } else if (ANDROID_SDK_INT > 29) { - hasInternalStorage = false; - } - - if (hasInternalStorage) { - util.pushFolder( - allStorages, - 'Internal storage', - cordova.file.externalRootDirectory, - { - uuid: 'internal-storage', - }, - ); - } - - try { - const res = await externalFs.listStorages(); - res.forEach((storage) => { - if (storageList.find((s) => s.uuid === storage.uuid)) return; - let path; - if (storage.path && isStorageManager) { - path = 'file://' + storage.path; - } - util.pushFolder(allStorages, storage.name, path || '', { - ...storage, - storageType: 'sd', - }); - }); - } catch (err) { } - - storageList.forEach((storage) => { - let url = storage.url || /**@drepreceted */ storage['uri']; - - util.pushFolder(allStorages, storage.name, url, { - storageType: storage.storageType, - uuid: storage.uuid, - home: storage.home, - }); - }); - - if (!allStorages.length) { - util.pushFolder(allStorages, strings['add a storage'], '', { - storageType: 'notification', - uuid: 'addstorage', - }); - } - - if (IS_FILE_MODE) { - util.pushFolder(allStorages, 'Select document', null, { - 'open-doc': true, - }); - } - - return allStorages; - } - - /** - * Gets directory for given url for rendering - * @param {String} url - * @param {String} name - * @returns {Promise<{name: String, url: String, list: [], scroll: Number}>} - */ - async function getDir(url, name) { - const { fileBrowser } = appSettings.value; - let list = null; - let error = false; - - if (url in cachedDir) { - return cachedDir[url]; - } else { - if (url === '/') { - list = await listAllStorages(); - } else { - const id = helpers.uuid(); - - progress[id] = true; - const timeout = setTimeout(() => { - dialogs.loader.create(name, strings.loading + '...', { - timeout: 10000, - callback() { - dialogs.loader.destroy(); - navigate('/', '/'); - progress[id] = false; - }, - }); - }, 100); - - const fs = fsOperation(url); - try { - list = await fs.lsDir(); - } catch (err) { - if (progress[id]) { - helpers.error(err, url); - } else { - console.error(err); - } - } - - error = !progress[id]; - - delete progress[id]; - clearTimeout(timeout); - dialogs.loader.destroy(); - } - if (error) return null; - return { - url, - name, - scroll: 0, - list: helpers.sortDir(list, fileBrowser, testFileType, mode), - }; - } - } - - /** - * Navigates to specific directory - * @param {String} url - * @param {String} name - */ - async function navigate(url, name, assignBackButton = true) { - if (!url) { - throw new Error('navigate(url, name): "url" is required.'); - } - - if (!name) { - throw new Error('navigate(url, name): "name" is required.'); - } - - if (url === '/') { - if (IS_FOLDER_MODE) folderOption.classList.add('disabled'); - } else { - if (IS_FOLDER_MODE) folderOption.classList.remove('disabled'); - } - - const $nav = tag.get(`#${getNavId(url)}`); - - //If navigate to previous directories, clear the rest navigation - if ($nav) { - let $topNav; - while (($topNav = $navigation.lastChild) !== $nav) { - const url = $topNav.data_url; - actionStack.remove(url); - $topNav.remove(); - } - - while (1) { - const location = state.slice(-1)[0]; - if (!location || location.url === url) break; - state.pop(); - } - localStorage.fileBrowserState = JSON.stringify(state); - - const dir = await getDir(url, name); - if (dir) { - render(dir); - } - return; - } - - const dir = await getDir(url, name); - if (dir) { - const { url: curl, name: cname } = currentDir; - let action; - if (doesOpenLast) pushState({ name, url }); - if (curl && cname && assignBackButton) { - action = () => { - navigate(curl, cname, false); - }; - } - pushToNavbar(name, url, action); - render(dir); - } - } - - /** - * @param {"file"|"folder"|"project"} arg - */ - async function create(arg) { - const { url } = currentDir; - const alreadyCreated = []; - const options = []; - let cturl = ''; - let newUrl = null; - let project = ''; - let projectName = ''; - let framework = ''; - - if (arg === 'file' || arg === 'folder') { - let title = strings['enter folder name']; - let val = strings['new folder']; - if (arg === 'file') { - title = strings['enter file name']; - val = 'untitled.txt'; - } - - let entryName = await dialogs.prompt(title, val, 'filename', { - match: constants.FILE_NAME_REGEX, - required: true, - }); - - if (!entryName) return; - entryName = helpers.removeLineBreaks(entryName); - - try { - const fs = fsOperation(url); - if (arg === 'folder') await fs.createDirectory(entryName); - if (arg === 'file') await fs.createFile(entryName); - updateAddedFolder(url); - reload(); - } catch (err) { - helpers.error(err); - } - - return; - } - - if (arg === 'project') { - /** - * Initiating project options - */ - Object.keys(projects).map((projectname) => { - options.push([projectname, projectname, 'icon ' + projectname]); - }); - - framework = await dialogs.select(strings['new project'], options); - dialogs.loader.create(framework, strings.loading + '...'); - project = (await projects[framework]()).default; - dialogs.loader.destroy(); - projectName = await dialogs.prompt( - strings['project name'], - framework, - 'text', - { - required: true, - match: constants.FILE_NAME_REGEX, - }, - ); - - try { - const fs = fsOperation(url); - dialogs.loader.create(projectName, strings.loading + '...'); - await fs.createDirectory(projectName); - newUrl = Url.join(url, projectName, '/'); - const files = Object.keys(project); // All project files - await createProject(files); // Creating project - } catch (err) { - helpers.error(err); - } - - dialogs.loader.destroy(); - } - - async function createProject(files) { - // checking if it's the last file - if (!files.length) { - updateAddedFolder(url); - reload(); - return; - } - cturl = ''; - const file = files.pop(); - await createFile(file); - return await createProject(files); - } - - function createFile(fileurl) { - const paths = fileurl.split('/'); - const filename = paths.pop(); - return createDir(project, fileurl, filename, paths); - } - - async function createDir(project, fileurl, filename, paths) { - const lclUrl = Url.join(newUrl, cturl); - const fs = fsOperation(lclUrl); - - if (paths.length === 0) { - const data = project[fileurl].replace(/<%name%>/g, projectName); - await fs.createFile(filename, data); - return; - } - - const name = paths.splice(0, 1)[0]; - const toCreate = Url.join(lclUrl, name); - if (!alreadyCreated.includes(toCreate)) { - await fs.createDirectory(name); - alreadyCreated.push(toCreate); - } - cturl += name + '/'; - return await createDir(project, fileurl, filename, paths); - } - } - - /** - * Pushes a navigation button to navbar - * @param {String} id - * @param {String} name - * @param {String} url - */ - function pushToNavbar(name, url, action) { - $navigation.append( - tag('span', { - id: getNavId(url), - className: 'nav', - data_url: url, - data_name: name, - attr: { - action: 'navigation', - text: name, - }, - tabIndex: -1, - }), - ); - $navigation.scrollLeft = $navigation.scrollWidth; - - if (action && !actionStack.has(url)) { - actionStack.push({ - id: url, - action, - }); - } - } - - /** - * Loads up given states - * @param {Array} states - */ - function loadStates(states) { - if (!Array.isArray(states)) return; - - const backNavigation = []; - const { url, name } = states.pop(); - let { url: lastUrl, name: lastName } = currentDir; - - while (states.length) { - const location = states.splice(0, 1)[0]; - const { url, name } = location; - let action; - - if (doesOpenLast) pushState({ name, url }); - if (lastUrl && lastName) { - backNavigation.push([lastUrl, lastName]); - action = () => { - const [url, name] = backNavigation.pop(); - navigate(url, name, false); - }; - } - pushToNavbar(name, url, action); - lastUrl = url; - lastName = name; - } - - currentDir = { url: lastUrl, name: lastName }; - navigate(url, name); - } - - /** - * - * @param {String} url - */ - function getNavId(url) { - return `nav_${url.hashCode()}`; - } - - /** - * Updates folders that are added in sidebar - * @param {String} url - */ - function updateAddedFolder(url) { - if (cachedDir[url]) delete cachedDir[url]; - if (cachedDir[currentDir.url]) delete cachedDir[currentDir.url]; - - const regex = new RegExp(Url.parse(url).url); - - for (let folder of addedFolder) { - if (folder.url === url) { - folder.remove(); - } else if (regex.test(currentDir.url)) { - folder.reload(); - } - } - } - - /** - * Check if file is allowed or not and returns `true` if allowed - * else returns `false`. - * @param {String} uri - * @returns - */ - function testFileType(uri) { - const ext = helpers.extname(uri); - - if ( - appSettings.value.filesNotAllowed.includes((ext || '').toLowerCase()) - ) { - return false; - } - return true; - } - - /** - * - * @param {Storage} storage - * @param {Boolean} doesRleoad - */ - function updateStorage(storage, doesRleoad = true) { - if (storage.uuid) { - storageList = storageList.filter((s) => s.uuid !== storage.uuid); - } else { - storage.uuid = helpers.uuid(); - } - - if (!storage.type) { - storage.type = 'dir'; - } - - if (!storage.storageType) { - storage.storageType = storage.type; - } - - storageList.push(storage); - localStorage.storageList = JSON.stringify(storageList); - if (doesRleoad) reload(); - } - - function render(dir) { - const { list, scroll } = dir; - const $list = tag.parse( - mustache.render(_list, { - msg: strings['empty folder message'], - list, - }), - ); - - const $oldList = $content.get('#list'); - if ($oldList) { - const { url } = currentDir; - if (url && cachedDir[url]) { - cachedDir[url].scroll = $oldList.scrollTop; - } - $oldList.remove(); - } - $content.append($list); - $list.scrollTop = scroll; - $list.focus(); - - //Adding notification to icon to let user know about new feature - if (dir.url === '/') { - checkAndSetNotification(); - } else { - $menuToggler.classList.remove('notice'); - $addMenuToggler.classList.remove('notice'); - } - - currentDir = dir; - cachedDir[dir.url] = dir; - } - - function reload() { - const { url, name } = currentDir; - delete cachedDir[url]; - navigate(url, name); - } - - function pushState({ url, name }) { - if (!url || !name) return; - if (state.find((l) => l.url === url)) return; - state.push({ url, name }); - localStorage.fileBrowserState = JSON.stringify(state); - } - - /** - * Adds a new storage and refresh location - */ - function addStorage() { - util - .addPath() - .then((res) => { - storageList.push(res); - localStorage.storageList = JSON.stringify(storageList); - reload(); - }) - .catch((err) => { - helpers.error(err); - }); - } - }); -} - -export default FileBrowserInclude; diff --git a/src/pages/fileBrowser/fileBrowser.js b/src/pages/fileBrowser/fileBrowser.js index 919deb701..f034f1c22 100644 --- a/src/pages/fileBrowser/fileBrowser.js +++ b/src/pages/fileBrowser/fileBrowser.js @@ -1,118 +1,1506 @@ -import dialogs from '../../components/dialogs'; -import openFile from '../../lib/openFile'; -import openFolder from '../../lib/openFolder'; -import helpers from '../../lib/utils/helpers'; -import Url from '../../lib/utils/Url'; - -/** - * @typedef {"file"|"folder"|"both"} BrowseMode - * @typedef {{type: 'file' | 'folder', url: String, name: String}} SelectedFile - */ - -/** - * - * @param {BrowseMode} [mode='file'] Specify file browser mode, value can be 'file', 'folder' or 'both' - * @param {string} info A small message to show what's file browser is opened for - * @param {string} buttonText button text - * @param {boolean} doesOpenLast Should file browser open lastly visited directory? - * @param {Array<{name: String, url: String}>} defaultDir Default directory to open. - * @returns {Promise} - */ -function FileBrowser(mode, info, buttonText, doesOpenLast, ...args) { - return new Promise((resolve, reject) => { - import(/* webpackChunkName: "fileBrowser" */ './fileBrowser.include').then( - (res) => { - const FileBrowser = res.default; - FileBrowser(mode, info, buttonText, doesOpenLast, ...args) - .then(resolve) - .catch(reject); - }, - ); - }); -} - -FileBrowser.checkForValidFile = (uri) => { - const ext = helpers.extname(uri); - - if (appSettings.value.filesNotAllowed.includes((ext || '').toLowerCase())) { - return false; - } - return true; -}; - -FileBrowser.openFile = (res) => { - const { url, name, mode } = res; - - const createOption = { - uri: url, - name, - render: true, - }; - - if (mode) { - createOption.mode = mode; - } - - openFile(url, createOption); -}; - -FileBrowser.openFileError = (err) => { - console.error(err); - const ERROR = strings.error.toUpperCase(); - if (err.code) { - dialogs.alert( - ERROR, - `${strings['unable to open file']}. ${helpers.errorMessage(err.code)}`, - ); - } else if (err.code !== 0) { - dialogs.alert(ERROR, strings['unable to open file']); - } -}; - -FileBrowser.openFolder = (res) => { - const url = res.url; - const protocol = Url.getProtocol(url); - - async () => {}; - - if (protocol === 'ftp:') { - openFolder(res.url, { - name: res.name, - reloadOnResume: false, - saveState: false, - }); - return; - } - - openFolder(res.url, { - name: res.name, - }); -}; - -FileBrowser.openFolderError = (err) => { - console.error(err); - const ERROR = strings.error.toUpperCase(); - if (err.code) { - dialogs.alert( - ERROR, - `${strings['unable to open folder']}. ${helpers.errorMessage(err.code)}`, - ); - } else if (err.code !== 0) { - dialogs.alert(ERROR, strings['unable to open folder']); - } -}; - -FileBrowser.open = (res) => { - if (res.type === 'folder') { - FileBrowser.openFolder(res); - return; - } - - FileBrowser.openFile(res); -}; - -FileBrowser.openError = (err) => { - FileBrowser.openFileError(err); -}; - -export default FileBrowser; +import "./fileBrowser.scss"; + +import fsOperation from "fileSystem"; +import externalFs from "fileSystem/externalFs"; +import Checkbox from "components/checkbox"; +import Contextmenu from "components/contextmenu"; +import Page from "components/page"; +import searchBar from "components/searchbar"; +import alert from "dialogs/alert"; +import confirm from "dialogs/confirm"; +import loader from "dialogs/loader"; +import prompt from "dialogs/prompt"; +import select from "dialogs/select"; +import JSZip from "jszip"; +import actionStack from "lib/actionStack"; +import checkFiles from "lib/checkFiles"; +import constants from "lib/constants"; +import openFolder from "lib/openFolder"; +import projects from "lib/projects"; +import recents from "lib/recents"; +import remoteStorage from "lib/remoteStorage"; +import appSettings from "lib/settings"; +import mimeTypes from "mime-types"; +import mustache from "mustache"; +import filesSettings from "settings/filesSettings"; +import URLParse from "url-parse"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; +import _addMenu from "./add-menu.hbs"; +import _addMenuHome from "./add-menu-home.hbs"; +import _template from "./fileBrowser.hbs"; +import _list from "./list.hbs"; +import util from "./util"; + +/** + * @typedef {{url: String, name: String}} Location + */ + +/** + * @typedef Storage + * @property {String} name + * @property {String} uuid + * @property {String} url + * @property {'dir'} type + * @property {'permission'|'ftp'|'sftp'|'sd'} storageType + */ + +/** + * + * @param {import('.').BrowseMode} [mode='file'] + * @param {string} [info] + * @param {boolean} [doesOpenLast] + * @returns {Promise} + */ +function FileBrowserInclude(mode, info, doesOpenLast = true) { + mode = mode || "file"; + + const IS_FOLDER_MODE = ["folder", "both"].includes(mode); + const IS_FILE_MODE = ["file", "both"].includes(mode); + const storedState = helpers.parseJSON(localStorage.fileBrowserState) || []; + /**@type {Array} */ + const state = []; + /**@type {Array} */ + const allStorages = []; + let storageList = JSON.parse(localStorage.storageList || "[]"); + + let isSelectionMode = false; + let selectedItems = new Set(); + + if (!info) { + if (mode !== "both") { + info = IS_FOLDER_MODE ? strings["open folder"] : strings["open file"]; + } else { + info = strings["file browser"]; + } + } + + return new Promise((resolve, reject) => { + //#region Declaration + const $menuToggler = ( + + ); + const $selectionMenuToggler = ( + + ); + const $addMenuToggler = ( + + ); + const $selectionModeToggler = ( + + ); + + const $search = ; + const $lead = ; + const $page = Page(strings["file browser"].capitalize(), { + lead: $lead, + }); + let hideSearchBar = () => {}; + const $content = helpers.parseHTML( + mustache.render(_template, { + type: mode, + info, + }), + ); + const $navigation = $content.get(".navigation"); + const menuOption = { + top: "8px", + right: "8px", + toggler: $menuToggler, + transformOrigin: "top right", + }; + const $fbMenu = Contextmenu({ + innerHTML: () => { + return ` +
  • ${strings.settings.capitalize(0)}
  • + ${currentDir.url === "/" ? `
  • ${strings["reset connections"].capitalize(0)}
  • ` : ""} +
  • ${strings.reload.capitalize(0)}
  • + `; + }, + ...menuOption, + }); + const $selectionMenu = Contextmenu({ + innerHTML: () => { + return ` +
  • ${strings.compress.capitalize(0)}
  • +
  • ${strings.delete.capitalize(0)}
  • + `; + }, + ...((menuOption.toggler = $selectionMenuToggler) && menuOption), + }); + const $addMenu = Contextmenu({ + innerHTML: () => { + if (currentDir.url === "/") { + return mustache.render(_addMenuHome, { + ...strings, + }); + } else { + return mustache.render(_addMenu, strings); + } + }, + ...((menuOption.toggler = $addMenuToggler) && menuOption), + }); + + $selectionMenuToggler.style.display = "none"; + const progress = {}; + let cachedDir = {}; + let currentDir = { + url: null, + name: null, + list: [], + scroll: 0, + }; + /** + * @type {HTMLButtonElement} + */ + let $openFolder; + //#endregion + + actionStack.setMark(); + $lead.onclick = close; + $content.addEventListener("click", handleClick); + $content.addEventListener("contextmenu", handleContextMenu, true); + $page.body = $content; + $page.header.append( + $search, + $selectionModeToggler, + $addMenuToggler, + $menuToggler, + $selectionMenuToggler, + ); + + if (IS_FOLDER_MODE) { + $openFolder = tag("button", { + className: "floating icon check", + style: { + bottom: "10px", + top: "auto", + }, + disabled: true, + onclick() { + $page.hide(); + + if (IS_FREE_VERSION && window.iad?.isLoaded()) { + window.iad.show(); + } + + resolve({ + type: "folder", + ...currentDir, + }); + }, + }); + + $page.append($openFolder); + } + + app.append($page); + helpers.showAd(); + + actionStack.push({ + id: "filebrowser", + action: close, + }); + + $selectionModeToggler.onclick = function () { + isSelectionMode = !isSelectionMode; + toggleSelectionMode(isSelectionMode); + }; + + $fbMenu.onclick = function (e) { + $fbMenu.hide(); + const action = e.target.getAttribute("action"); + if (action === "settings") { + filesSettings().show(); + const onshow = () => { + $page.off("show", onshow); + reload(); + }; + $page.on("show", onshow); + return; + } + + if (action === "reload") { + const { url } = currentDir; + if (url in cachedDir) delete cachedDir[url]; + reload(); + return; + } + + if (action === "refresh") { + ftp.disconnect( + () => {}, + () => {}, + ); + sftp.close( + () => {}, + () => {}, + ); + toast(strings.success); + return; + } + }; + + $addMenu.onclick = async (e) => { + $addMenu.hide(); + const $target = e.target; + const action = $target.getAttribute("action"); + const value = $target.getAttribute("value"); + if (!action) return; + + switch (action) { + case "create": { + try { + const newUrl = await create(value); + if (!newUrl) break; + + const type = value === "file" ? "file" : "folder"; + openFolder.add(newUrl, type); + reload(); + } catch (error) { + window.log("error", error); + helpers.error(error); + } + break; + } + + case "import-project-zip": { + let zipFile = await new Promise((resolve, reject) => { + sdcard.openDocumentFile( + (res) => { + resolve(res.uri); + }, + (err) => { + reject(err); + }, + "application/zip", + ); + }); + + if (!zipFile) break; + + const loadingLoader = loader.create( + strings["loading"], + "Importing zip file...", + { timeout: 10000 }, + ); + + try { + const zipContent = await fsOperation(zipFile).readFile(); + const zip = await JSZip.loadAsync(zipContent); + const targetDir = currentDir.url; + const targetFs = fsOperation(targetDir); + + // Create folder with zip name + const zipName = Url.basename(zipFile).replace(/\.zip$/, ""); + const extractDir = Url.join(targetDir, zipName); + await targetFs.createDirectory(zipName); + + const files = Object.keys(zip.files); + const total = files.length; + let current = 0; + + for (const filePath of files) { + const file = zip.files[filePath]; + current++; + + loadingLoader.setMessage( + `Extracting ${filePath} (${Math.round((current / total) * 100)}%)`, + ); + + if (file.dir) { + await fsOperation(extractDir).createDirectory(filePath); + } else { + const content = await file.async("arraybuffer"); + await fsOperation(extractDir).createFile(filePath, content); + } + } + + loadingLoader.destroy(); + toast(strings.success); + reload(); + } catch (err) { + loadingLoader.destroy(); + helpers.error(err); + } + break; + } + + case "add-path": + addStorage(); + break; + + case "addFtp": + case "addSftp": { + const storage = await remoteStorage[action](); + updateStorage(storage); + break; + } + + default: + break; + } + }; + + $selectionMenu.onclick = async (e) => { + $selectionMenu.hide(); + const $target = e.target; + const action = $target.getAttribute("action"); + if (!action) return; + + switch (action) { + case "compress": + if (currentDir.url === "/") { + break; + } + + const zip = new JSZip(); + let loadingLoader = loader.create( + strings["loading"], + "Compressing files", + { + timeout: 3000, + }, + ); + try { + for (const url of selectedItems) { + const fs = fsOperation(url); + const stats = await fs.stat(); + const isDir = stats.isDirectory; + + if (isDir) { + const addDirToZip = async (dirUrl, zipFolder) => { + const entries = await fsOperation(dirUrl).lsDir(); + for (const entry of entries) { + const percent = ( + ((entries.length - entries.indexOf(entry)) / + entries.length) * + 100 + ).toFixed(0); + loadingLoader.setMessage( + `Compressing ${entry.name.length > 20 ? entry.name.substring(0, 20) + "..." : entry.name} (${percent}%)`, + ); + if (entry.isDirectory) { + const newZipFolder = zipFolder.folder(entry.name); + await addDirToZip(entry.url, newZipFolder); + } else { + const content = await fsOperation(entry.url).readFile(); + zipFolder.file(entry.name, content, { binary: true }); + } + } + }; + await addDirToZip(url, zip.folder(Url.basename(url))); + } else { + const content = await fs.readFile(); + zip.file(Url.basename(url), content); + } + } + + const zipContent = await zip.generateAsync({ + type: "arraybuffer", + }); + const zipName = "archive_" + Date.now() + ".zip"; + const zipPath = Url.join(currentDir.url, zipName); + const shortPath = + currentDir.url.length > 40 + ? currentDir.url.substring(0, 37) + "..." + : currentDir.url; + loadingLoader.setMessage(`Saving ${zipName} to ${shortPath}`); + await fsOperation(currentDir.url).createFile(zipName, zipContent); + loadingLoader.destroy(); + toast(strings.success); + isSelectionMode = !isSelectionMode; + toggleSelectionMode(isSelectionMode); + reload(); + } catch (err) { + loadingLoader.destroy(); + toast(strings.error); + console.error(err); + } + break; + + case "delete": { + if (currentDir.url === "/") { + break; + } + + // Show confirmation dialog + const confirmMessage = + selectedItems.size === 1 + ? strings["delete entry"].replace( + "{name}", + Array.from(selectedItems)[0].split("/").pop(), + ) + : strings["delete entries"].replace( + "{count}", + selectedItems.size, + ); + + const confirmation = await confirm(strings.warning, confirmMessage); + if (!confirmation) break; + + const loadingDialog = loader.create( + strings.loading, + strings["deleting items"].replace("{count}", selectedItems.size), + { timeout: 3000 }, + ); + + try { + for (const url of selectedItems) { + if ((await fsOperation(url).stat()).isDirectory) { + if (url.startsWith("content://com.termux.documents/tree/")) { + const fs = fsOperation(url); + const entries = await fs.lsDir(); + if (entries.length === 0) { + await fs.delete(); + } else { + const deleteRecursively = async (currentUrl) => { + const currentFs = fsOperation(currentUrl); + const currentEntries = await currentFs.lsDir(); + for (const entry of currentEntries) { + if (entry.isDirectory) { + await deleteRecursively(entry.url); + } else { + await fsOperation(entry.url).delete(); + } + } + await currentFs.delete(); + }; + await deleteRecursively(url); + } + } else { + await fsOperation(url).delete(); + } + helpers.updateUriOfAllActiveFiles(url); + recents.removeFolder(url); + } else { + const fs = fsOperation(url); + await fs.delete(); + const openedFile = editorManager.getFile(url, "uri"); + if (openedFile) openedFile.uri = null; + } + recents.removeFile(url); + openFolder.removeItem(url); + delete cachedDir[url]; + } + toast(strings.success); + reload(); + isSelectionMode = false; + toggleSelectionMode(false); + } catch (err) { + loadingDialog.destroy(); + helpers.error(err); + } finally { + loadingDialog.destroy(); + } + break; + } + + default: + break; + } + }; + + $search.onclick = function () { + const $list = $content.get("#list"); + if ($list) searchBar($list, (hide) => (hideSearchBar = hide)); + }; + + $page.onhide = function () { + hideSearchBar(); + helpers.hideAd(); + actionStack.clearFromMark(); + actionStack.remove("filebrowser"); + $content.removeEventListener("click", handleClick); + $content.removeEventListener("contextmenu", handleContextMenu); + document.removeEventListener("resume", reload); + }; + + if (doesOpenLast && storedState.length) { + loadStates(storedState); + return; + } + navigate("/", "/"); + + function close() { + const err = new Error("User cancelled"); + Object.defineProperty(err, "code", { + value: 0, + }); + reject(err); + $page.hide(); + } + + function updateSelectionCount($count) { + if ($count) { + $count.textContent = `${selectedItems.size} items selected`; + } + } + + function toggleSelectionMode(active) { + const $list = $content.get("#list"); + if (active) { + $list.classList.add("selection-mode"); + const $header = tag("div", { + className: "selection-header", + }); + + const selectAllCheckbox = Checkbox("", false); + const $count = tag("span", { + className: "text selection-count", + textContent: "0 items selected", + }); + + // Handle select all functionality + selectAllCheckbox.onclick = () => { + const checked = selectAllCheckbox.checked; + const items = $list.querySelectorAll(".tile:not(.selection-header)"); + items.forEach((item) => { + const checkbox = item.querySelector(".input-checkbox"); + if (checkbox) { + checkbox.checked = checked; + const url = item.querySelector("data-url").textContent; + if (checked) { + selectedItems.add(url); + } else { + selectedItems.delete(url); + } + } + }); + updateSelectionCount($count); + }; + + $header.append(selectAllCheckbox, $count); + $list.insertBefore($header, $list.firstChild); + + // Add checkboxes to list items + $list + .querySelectorAll(".tile:not(.selection-header)") + .forEach((item) => { + const checkbox = Checkbox("", false); + checkbox.onclick = () => { + const url = item.querySelector("data-url").textContent; + if (checkbox.checked) { + selectedItems.add(url); + } else { + selectedItems.delete(url); + } + updateSelectionCount($count); + }; + item.prepend(checkbox); + }); + + $addMenuToggler.style.display = "none"; + $menuToggler.style.display = "none"; + $selectionMenuToggler.style.display = ""; + + // Disable floating button in selection mode + if ($openFolder) { + $openFolder.disabled = true; + } + } else { + $list.classList.remove("selection-mode"); + $list.querySelector(".selection-header")?.remove(); + $list.querySelectorAll(".input-checkbox").forEach((cb) => cb.remove()); + selectedItems.clear(); + + $addMenuToggler.style.display = ""; + $menuToggler.style.display = ""; + $selectionMenuToggler.style.display = "none"; + + // Re-enable floating button when exiting selection mode + if ($openFolder) { + $openFolder.disabled = false; + } + } + } + + /** + * Called when any file folder is clicked + * @param {MouseEvent} e + * @param {"contextmenu"} [isContextMenu] + */ + function handleClick(e, isContextMenu) { + /** + * @type {HTMLElement} + */ + const $el = e.target; + + if (isSelectionMode) { + const checkbox = $el.closest(".tile")?.querySelector(".input-checkbox"); + if (checkbox && !$el.closest(".selection-header")) { + checkbox.checked = !checkbox.checked; + const url = $el + .closest(".tile") + .querySelector("data-url").textContent; + if (checkbox.checked) { + selectedItems.add(url); + } else { + selectedItems.delete(url); + } + const $count = $content.querySelector(".selection-count"); + updateSelectionCount($count); + } + return; + } + + let action = $el.getAttribute("action") || $el.dataset.action; + if (!action) return; + + let url = $el.dataset.url; + let name = $el.dataset.name || $el.getAttribute("name"); + const idOpenDoc = $el.hasAttribute("open-doc"); + const uuid = $el.getAttribute("uuid"); + const type = $el.getAttribute("type"); + const storageType = $el.getAttribute("storageType"); + const home = $el.getAttribute("home"); + const isDir = ["dir", "directory", "folder"].includes(type); + + if (!url) { + const $url = $el.get("data-url"); + if ($url) { + url = $url.textContent; + } + } + + if (storageType === "notification") { + switch (uuid) { + case "addstorage": + addStorage(); + break; + + default: + break; + } + return; + } + + if (!url && action === "open" && isDir && !idOpenDoc && !isContextMenu) { + loader.hide(); + util.addPath(name, uuid).then((res) => { + const storage = allStorages.find((storage) => storage.uuid === uuid); + storage.url = res.uri; + storage.name = res.name; + name = res.name; + updateStorage(storage, false); + url = res.uri; + folder(); + }); + return; + } + + if (isContextMenu) action = "contextmenu"; + else if (idOpenDoc) action = "open-doc"; + + switch (action) { + case "navigation": + folder(); + break; + case "contextmenu": + contextMenuHandler(); + break; + case "open": + if (isDir) folder(); + else if (!$el.hasAttribute("disabled")) file(); + break; + case "open-doc": + openDoc(); + break; + } + + function folder() { + if (home) { + navigateToHome(); + return; + } + navigate(url, name); + } + + function navigateToHome() { + const navigationArray = []; + const dirs = home.split("/"); + const { url: parsedUrl, query } = Url.parse(url); + let path = ""; + + for (let dir of dirs) { + path = Url.join(path, dir); + navigationArray.push({ + url: `${Url.join(parsedUrl, path, "")}${query}`, + name: dir || name, + }); + } + + loadStates(navigationArray); + } + + function file() { + $page.hide(); + resolve({ + type: "file", + url, + name, + }); + } + + async function getShareableUri(fileUrl) { + if (!fileUrl) return null; + try { + const fs = fsOperation(fileUrl); + if (/^s?ftp:/.test(fileUrl)) { + return fs.localName; + } + const stat = await fs.stat(); + return stat?.url || null; + } catch (error) { + return null; + } + } + + async function contextMenuHandler() { + if (appSettings.value.vibrateOnTap) { + navigator.vibrate(constants.VIBRATION_TIME); + } + if ($el.getAttribute("open-doc") === "true") return; + + const deleteText = + currentDir.url === "/" ? strings.remove : strings.delete; + const options = [ + ["delete", deleteText, "delete"], + ["rename", strings.rename, "text_format"], + ]; + + if (/s?ftp/.test(storageType)) { + options.push(["edit", strings.edit, "edit"]); + } + + if (helpers.isFile(type)) { + options.push(["info", strings.info, "info"]); + options.push(["open_with", strings["open with"], "open_in_browser"]); + } + + if (currentDir.url !== "/" && url) { + options.push(["copyuri", strings["copy uri"], "copy"]); + } + + const option = await select(strings["select"], options); + switch (option) { + case "delete": { + let deleteFunction = removeFile; + let message = strings["delete entry"].replace("{name}", name); + if (uuid) { + deleteFunction = removeStorage; + message = strings["remove entry"].replace("{name}", name); + } + + const confirmation = await confirm(strings.warning, message); + if (!confirmation) break; + deleteFunction(); + break; + } + + case "rename": { + let newname = await prompt(strings.rename, name, "text", { + match: constants.FILE_NAME_REGEX, + }); + + newname = helpers.fixFilename(newname); + if (!newname || newname === name) break; + + if (uuid) renameStorage(newname); + else renameFile(newname); + break; + } + + case "edit": { + const storage = await remoteStorage.edit( + storageList.find((storage) => storage.uuid === uuid), + ); + if (!storage) break; + storage.uuid = uuid; + updateStorage(storage); + break; + } + + case "info": + acode.exec("file-info", url); + break; + + case "copyuri": + navigator.clipboard.writeText(url); + alert(strings.success, strings["copied to clipboard"]); + break; + + case "open_with": + try { + const shareableUri = await getShareableUri(url); + if (!shareableUri) { + toast(strings["no app found to handle this file"]); + break; + } + + const mimeType = + mimeTypes.lookup(name) || + mimeTypes.lookup(shareableUri) || + "text/plain"; + + system.fileAction(shareableUri, name, "VIEW", mimeType, () => { + toast(strings["no app found to handle this file"]); + }); + } catch (error) { + console.error(error); + toast(strings.error); + } + break; + } + } + + async function renameFile(newname) { + if (url.startsWith("content://com.termux.documents/tree/")) { + if (helpers.isDir(type)) { + alert(strings.warning, strings["rename not supported"]); + return; + } else { + // Special handling for Termux content files + const fs = fsOperation(url); + try { + const content = await fs.readFile(); + const newUrl = Url.join(Url.dirname(url), newname); + await fsOperation(Url.dirname(url)).createFile(newname, content); + await fs.delete(); + + recents.removeFile(url); + recents.addFile(newUrl); + const file = editorManager.getFile(url, "uri"); + if (file) { + file.uri = newUrl; + file.filename = newname; + } + openFolder.renameItem(url, newUrl, newname); + toast(strings.success); + reload(); + return; + } catch (err) { + window.log("error", err); + helpers.error(err); + return; + } + } + } + const fs = fsOperation(url); + try { + const newUrl = await fs.renameTo(newname); + recents.removeFile(url); + recents.addFile(newUrl); + const file = editorManager.getFile(url, "uri"); + if (file) { + file.uri = newUrl; + file.filename = newname; + } + openFolder.renameItem(url, newUrl, newname); + toast(strings.success); + reload(); + } catch (err) { + window.log("error", err); + helpers.error(err); + } + } + + async function removeFile() { + try { + if (helpers.isDir(type)) { + if (url.startsWith("content://com.termux.documents/tree/")) { + const fs = fsOperation(url); + const entries = await fs.lsDir(); + if (entries.length === 0) { + await fs.delete(); + } else { + const deleteRecursively = async (currentUrl) => { + const currentFs = fsOperation(currentUrl); + const currentEntries = await currentFs.lsDir(); + for (const entry of currentEntries) { + if (entry.isDirectory) { + await deleteRecursively(entry.url); + } else { + await fsOperation(entry.url).delete(); + } + } + await currentFs.delete(); + }; + await deleteRecursively(url); + } + } else { + await fsOperation(url).delete(); + } + helpers.updateUriOfAllActiveFiles(url); + recents.removeFolder(url); + } else { + const fs = fsOperation(url); + await fs.delete(); + const openedFile = editorManager.getFile(url, "uri"); + if (openedFile) openedFile.uri = null; + } + recents.removeFile(url); + openFolder.removeItem(url); + toast(strings.success); + delete cachedDir[url]; + reload(); + } catch (err) { + window.log("error", err); + helpers.error(err); + } + } + + function removeStorage() { + if (url) { + recents.removeFolder(url); + recents.removeFile(url); + } + storageList = storageList.filter((storage) => { + if (storage.uuid !== uuid) { + return true; + } + + if (storage.url) { + const parsedUrl = URLParse(storage.url, true); + const keyFile = decodeURIComponent( + parsedUrl.query["keyFile"] || "", + ); + if (keyFile) { + fsOperation(keyFile).delete(); + } + } + return false; + }); + localStorage.storageList = JSON.stringify(storageList); + reload(); + } + + function renameStorage(newname) { + storageList = storageList.map((storage) => { + if (storage.uuid === uuid) storage.name = newname; + return storage; + }); + localStorage.storageList = JSON.stringify(storageList); + reload(); + } + + function openDoc() { + checkFiles.check = false; + sdcard.openDocumentFile( + (res) => { + res.url = res.uri; + resolve({ + type: "file", + ...res, + name: res.filename, + mode: "single", + }); + $page.hide(); + }, + (err) => { + helpers.error(err); + }, + ); + } + } + + function handleContextMenu(e) { + handleClick(e, true); + } + + async function listAllStorages() { + let hasInternalStorage = true; + allStorages.length = 0; + + if (ANDROID_SDK_INT === 29) { + const rootDirName = cordova.file.externalRootDirectory; + const testDirName = "Acode_Test_file" + helpers.uuid(); + const testDirFs = fsOperation(Url.join(rootDirName, testDirName)); + + try { + await fsOperation(rootDirName).createDirectory(testDirName); + await testDirFs.createFile("test" + helpers.uuid()); + + hasInternalStorage = !!(await testDirFs.lsDir()).length; + } catch (error) { + console.error(error); + } finally { + testDirFs.delete(); + } + } else if (ANDROID_SDK_INT > 29) { + hasInternalStorage = false; + } + + if (hasInternalStorage) { + util.pushFolder( + allStorages, + "Internal storage", + cordova.file.externalRootDirectory, + { + uuid: "internal-storage", + }, + ); + } + + // Check for Terminal Home Directory storage + try { + const isTerminalInstalled = await Terminal.isInstalled(); + if (typeof Terminal !== "undefined" && isTerminalInstalled) { + const isTerminalSupported = await Terminal.isSupported(); + + if (isTerminalSupported && isTerminalInstalled) { + const terminalHomeUrl = cordova.file.dataDirectory + "alpine/home"; + + // Check if this storage is not already in the list + const terminalStorageExists = allStorages.find( + (storage) => + storage.uuid === "terminal-home" || + storage.url === terminalHomeUrl, + ); + + if (!terminalStorageExists) { + util.pushFolder(allStorages, "Terminal Home", terminalHomeUrl, { + uuid: "terminal-home", + }); + } + } + } + } catch (error) { + console.error("Error checking Terminal installation:", error); + } + + try { + const res = await externalFs.listStorages(); + res.forEach((storage) => { + if (storageList.find((s) => s.uuid === storage.uuid)) return; + let path; + if (storage.path && isStorageManager) { + path = "file://" + storage.path; + } + util.pushFolder(allStorages, storage.name, path || "", { + ...storage, + storageType: "sd", + }); + }); + } catch (err) {} + + storageList.forEach((storage) => { + let url = storage.url || /**@deprecated */ storage["uri"]; + + util.pushFolder(allStorages, storage.name, url, { + storageType: storage.storageType, + uuid: storage.uuid, + home: storage.home, + }); + }); + + if (!allStorages.length) { + util.pushFolder(allStorages, strings["add a storage"], "", { + storageType: "notification", + uuid: "addstorage", + }); + } + + if (IS_FILE_MODE) { + util.pushFolder(allStorages, "Select document", null, { + "open-doc": true, + }); + } + + return allStorages; + } + + /** + * Gets directory for given url for rendering + * @param {String} url + * @param {String} name + * @returns {Promise<{name: String, url: String, list: [], scroll: Number}>} + */ + async function getDir(url, name) { + const { fileBrowser } = appSettings.value; + let list = []; + let error = false; + + if (url in cachedDir) { + return cachedDir[url]; + } else { + if (url === "/") { + list = await listAllStorages(); + } else { + const id = helpers.uuid(); + + progress[id] = true; + const timeout = setTimeout(() => { + loader.create(name, strings.loading + "...", { + timeout: 10000, + callback() { + loader.destroy(); + navigate("/", "/"); + progress[id] = false; + }, + }); + }, 100); + + const fs = fsOperation(url); + try { + list = (await fs.lsDir()) ?? []; + } catch (err) { + if (progress[id]) { + helpers.error(err, url); + } else { + console.error(err); + } + } + + error = !progress[id]; + + delete progress[id]; + clearTimeout(timeout); + loader.destroy(); + } + if (error) return null; + return { + url, + name, + scroll: 0, + list: helpers.sortDir(list, fileBrowser, mode), + }; + } + } + + /** + * Navigates to specific directory + * @param {String} url + * @param {String} name + */ + async function navigate(url, name, assignBackButton = true) { + if (document.getElementById("search-bar")) { + hideSearchBar(); + } + if (!url) { + throw new Error('navigate(url, name): "url" is required.'); + } + + if (!name) { + throw new Error('navigate(url, name): "name" is required.'); + } + + if (url === "/") { + if (IS_FOLDER_MODE) $openFolder.disabled = true; + } else { + if (IS_FOLDER_MODE) $openFolder.disabled = false; + } + + const $nav = tag.get(`#${getNavId(url)}`); + + //If navigate to previous directories, clear the rest navigation + if ($nav) { + let $topNav; + while (($topNav = $navigation.lastChild) !== $nav) { + const url = $topNav.dataset.url; + actionStack.remove(url); + $topNav.remove(); + } + + while (1) { + const location = state.slice(-1)[0]; + if (!location || location.url === url) break; + state.pop(); + } + localStorage.fileBrowserState = JSON.stringify(state); + + const dir = await getDir(url, name); + if (dir) { + render(dir); + } + return; + } + + const dir = await getDir(url, name); + if (dir) { + const { url: curl, name: cname } = currentDir; + let action; + if (doesOpenLast) pushState({ name, url }); + if (curl && cname && assignBackButton) { + action = () => { + navigate(curl, cname, false); + }; + } + pushToNavbar(name, url, action); + render(dir); + } + } + + /** + * @param {"file"|"folder"|"project"} arg + */ + async function create(arg) { + const { url } = currentDir; + const alreadyCreated = []; + const options = []; + let ctUrl = ""; + let projectLocation = null; + let projectFiles = ""; + let projectName = ""; + let project = ""; + let newUrl; + + if (arg === "file" || arg === "folder") { + let title = strings["enter folder name"]; + if (arg === "file") { + title = strings["enter file name"]; + } + + let entryName = await prompt(title, "", "filename", { + match: constants.FILE_NAME_REGEX, + required: true, + }); + + if (!entryName) return; + entryName = helpers.fixFilename(entryName); + + if (arg === "folder") { + newUrl = await helpers.createFileStructure(url, entryName, false); + } + if (arg === "file") { + newUrl = await helpers.createFileStructure(url, entryName); + } + if (!newUrl) return; + return newUrl.uri; + } + + if (arg === "project") { + projects.list().map((project) => { + const { name, icon } = project; + options.push([name, name, icon]); + }); + + project = await select(strings["new project"], options); + loader.create(project, strings.loading + "..."); + projectFiles = await projects.get(project).files(); + loader.destroy(); + projectName = await prompt(strings["project name"], project, "text", { + required: true, + match: constants.FILE_NAME_REGEX, + }); + + if (!projectName) return; + loader.create(projectName, strings.loading + "..."); + const fs = fsOperation(url); + const files = Object.keys(projectFiles); // All project files + + newUrl = await fs.createDirectory(projectName); + projectLocation = Url.join(url, projectName, "/"); + await createProject(files); // Creating project + loader.destroy(); + return newUrl; + } + + async function createProject(files) { + // checking if it's the last file + if (!files.length) { + reload(); + return; + } + ctUrl = ""; + const file = files.pop(); + await createFile(file); + return await createProject(files); + } + + function createFile(fileUrl) { + const paths = fileUrl.split("/"); + const filename = paths.pop(); + return createDir(projectFiles, fileUrl, filename, paths); + } + + async function createDir(project, fileUrl, filename, paths) { + const lclUrl = Url.join(projectLocation, ctUrl); + const fs = fsOperation(lclUrl); + + if (paths.length === 0) { + const data = project[fileUrl].replace(/<%name%>/g, projectName); + await fs.createFile(filename, data); + return; + } + + const name = paths.splice(0, 1)[0]; + const toCreate = Url.join(lclUrl, name); + if (!alreadyCreated.includes(toCreate)) { + await fs.createDirectory(name); + alreadyCreated.push(toCreate); + } + ctUrl += name + "/"; + return await createDir(project, fileUrl, filename, paths); + } + } + + /** + * Pushes a navigation button to navbar + * @param {String} id + * @param {String} name + * @param {String} url + */ + function pushToNavbar(name, url, action) { + if (!url) return; + const displayName = name || Url.basename(url) || url; + $navigation.append( + , + ); + $navigation.scrollLeft = $navigation.scrollWidth; + + if (action && !actionStack.has(url)) { + actionStack.push({ + id: url, + action, + }); + } + } + + /** + * Loads up given states + * @param {Array} states + */ + function loadStates(states) { + if (!Array.isArray(states) || !states.length) return; + + const backNavigation = []; + const lastState = states.pop(); + if (!lastState || !lastState.url) return; + const { url } = lastState; + const name = lastState.name || Url.basename(url) || url; + let { url: lastUrl, name: lastName } = currentDir; + + while (states.length) { + const location = states.splice(0, 1)[0]; + if (!location || !location.url) { + continue; + } + const { url, name } = location; + let action; + + if (doesOpenLast) pushState({ name, url }); + if (lastUrl && lastName) { + backNavigation.push([lastUrl, lastName]); + action = () => { + const [url, name] = backNavigation.pop(); + navigate(url, name, false); + }; + } + pushToNavbar(name, url, action); + lastUrl = url; + lastName = name; + } + + currentDir = { url: lastUrl, name: lastName }; + navigate(url, name); + } + + /** + * + * @param {String} url + */ + function getNavId(url) { + return `nav_${url.hashCode()}`; + } + + /** + * + * @param {Storage} storage + * @param {Boolean} doesReload + */ + function updateStorage(storage, doesReload = true) { + if (storage.uuid) { + storageList = storageList.filter((s) => s.uuid !== storage.uuid); + } else { + storage.uuid = helpers.uuid(); + } + + if (!storage.type) { + storage.type = "dir"; + } + + if (!storage.storageType) { + storage.storageType = storage.type; + } + + storageList.push(storage); + localStorage.storageList = JSON.stringify(storageList); + if (doesReload) reload(); + } + + function render(dir) { + const { list, scroll } = dir; + const $list = helpers.parseHTML( + mustache.render(_list, { + msg: strings["empty folder message"], + list, + }), + ); + + if (document.getElementById("search-bar")) { + hideSearchBar(); + } + + const $oldList = $content.get("#list"); + if ($oldList) { + const { url } = currentDir; + if (url && cachedDir[url]) { + cachedDir[url].scroll = $oldList.scrollTop; + } + $oldList.remove(); + } + $content.append($list); + $list.scrollTop = scroll; + $list.focus(); + + currentDir = dir; + cachedDir[dir.url] = dir; + } + + function reload() { + const { url, name } = currentDir; + delete cachedDir[url]; + navigate(url, name); + } + + function pushState({ url, name }) { + if (!url || !name) return; + if (state.find((l) => l.url === url)) return; + state.push({ url, name }); + localStorage.fileBrowserState = JSON.stringify(state); + } + + /** + * Adds a new storage and refresh location + */ + function addStorage() { + util + .addPath() + .then((res) => { + storageList.push(res); + localStorage.storageList = JSON.stringify(storageList); + reload(); + }) + .catch((err) => { + helpers.error(err); + }); + } + }); +} + +export default FileBrowserInclude; diff --git a/src/pages/fileBrowser/fileBrowser.scss b/src/pages/fileBrowser/fileBrowser.scss index 79e44aaee..2812d035c 100644 --- a/src/pages/fileBrowser/fileBrowser.scss +++ b/src/pages/fileBrowser/fileBrowser.scss @@ -1,88 +1,127 @@ -#file-browser { - data-url { - display: none; - } - - .tile { - &[storageType='notification'] { - background-color: rgb(153, 153, 255); - background-color: var(--primary-color); - color: rgb(255, 255, 255); - color: var(--text-main-color); - height: 40px; - text-align: center; - .icon { - display: none; - content: ''; - } - } - - .icon { - position: relative; - color: rgb(65, 85, 133); - - &[storageType]::after { - position: absolute; - top: 50%; - left: 50%; - content: attr(storageType); - transform: translate(-50%, -50%); - color: rgb(255, 255, 255); - font-size: 0.6rem; - font-weight: 600; - text-transform: uppercase; - } - - &.clearclose { - color: currentColor; - font-size: 1.2rem; - } - - &.folder { - color: rgb(206, 206, 53); - - &.user-added-storage { - color: rgb(53, 101, 206); - } - } - - &.code { - color: rgb(79, 155, 79); - } - } - } - - .info { - height: 30px; - display: flex; - align-items: center; - justify-content: center; - font-size: 0.9rem; - background-color: rgba($color: #000000, $alpha: 0.1); - } - - #list { - height: calc(100% - 60px); - overflow-y: auto; - - .tile { - &[disabled] { - .text { - opacity: 0.5; - } - } - - &[read-only] { - .text::after { - content: 'Read only'; - font-size: 0.6em; - color: rgb(255, 255, 255); - background-color: rgb(62, 100, 138); - border-radius: 4px; - padding: 5px; - margin: auto 15px; - } - } - } - } -} +#file-browser { + data-url { + display: none; + } + + .tile { + &[storageType="notification"] { + background-color: rgb(153, 153, 255); + background-color: var(--primary-color); + color: rgb(255, 255, 255); + color: var(--primary-text-color); + height: 40px; + text-align: center; + + .icon { + display: none; + content: ""; + } + } + + .icon { + position: relative; + color: rgb(65, 85, 133); + + &[storageType]::after { + position: absolute; + top: 50%; + left: 50%; + content: attr(storageType); + transform: translate(-50%, -50%); + color: rgb(255, 255, 255); + font-size: 0.6rem; + font-weight: 600; + text-transform: uppercase; + } + + &.clearclose { + color: currentColor; + font-size: 1.2rem; + } + + &.folder { + color: rgb(206, 206, 53); + + &.user-added-storage { + color: rgb(53, 101, 206); + } + } + + &.code { + color: rgb(79, 155, 79); + } + } + &.symlink { + .icon { + position: relative; + color: var(--link-text-color); + &::after { + content: "🔗"; + position: absolute; + bottom: 13px; + right: 10px; + font-size: 0.4em; + color: inherit; + } + } + + .text { + color: var(--link-text-color); + &::after { + content: " (symlink)"; + font-size: 0.8em; + color: color-mix(in srgb, var(--primary-text-color) 60%, transparent); + } + } + } + } + + .info { + height: 30px; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.9rem; + background-color: rgba($color: #000000, $alpha: 0.1); + } + + #list { + height: calc(100% - 60px); + overflow-y: auto; + + .tile { + &[disabled] { + .text { + opacity: 0.5; + } + } + + &[read-only] { + .text::after { + content: "Read only"; + font-size: 0.6em; + color: rgb(255, 255, 255); + background-color: rgb(62, 100, 138); + border-radius: 4px; + padding: 5px; + margin: auto 15px; + } + } + } + } + .selection-header { + display: flex; + align-items: center; + padding: 5px; + background: var(--primary-color); + color: var(--primary-text-color); + position: sticky; + top: 0; + z-index: 1; + gap: 10px; + + .selection-count { + font-size: 0.9em; + } + } +} diff --git a/src/pages/fileBrowser/index.js b/src/pages/fileBrowser/index.js new file mode 100644 index 000000000..63becfb32 --- /dev/null +++ b/src/pages/fileBrowser/index.js @@ -0,0 +1,100 @@ +import alert from "dialogs/alert"; +import openFile from "lib/openFile"; +import openFolder, { addedFolder } from "lib/openFolder"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; + +/** + * @typedef {"file"|"folder"|"both"} BrowseMode + * @typedef {{type: 'file' | 'folder', url: String, name: String}} SelectedFile + */ + +/** + * + * @param {BrowseMode} [mode='file'] Specify file browser mode, value can be 'file', 'folder' or 'both' + * @param {string} info A small message to show what's file browser is opened for + * @param {boolean} doesOpenLast Should file browser open lastly visited directory? + * @param {Array<{name: String, url: String}>} defaultDir Default directory to open. + * @returns {Promise} + */ +function FileBrowser(mode, info, doesOpenLast, ...args) { + return new Promise((resolve, reject) => { + import(/* webpackChunkName: "fileBrowser" */ "./fileBrowser").then( + (res) => { + const FileBrowser = res.default; + FileBrowser(mode, info, doesOpenLast, ...args) + .then(resolve) + .catch(reject); + }, + ); + }); +} + +FileBrowser.openFile = (res) => { + const { url, name, mode } = res; + const createOption = { + uri: url, + name, + render: true, + }; + + if (mode) { + createOption.mode = mode; + } + + openFile(url, createOption); +}; + +FileBrowser.openFileError = (err) => { + const ERROR = strings.error.toUpperCase(); + const message = `${strings["unable to open file"]}. ${helpers.errorMessage(err.code)}`; + if (err.code) { + alert(ERROR, message); + } else if (err.code !== 0) { + alert(ERROR, strings["unable to open file"]); + } +}; + +FileBrowser.openFolder = async (res) => { + const { url, name } = res; + const protocol = Url.getProtocol(url); + + if (protocol === "ftp:") { + openFolder(url, { + name: name, + saveState: false, + }); + } else { + openFolder(url, { + name: name, + }); + } + + const folder = addedFolder.find((folder) => folder.url === url); + folder?.$node?.$title?.click(); +}; + +FileBrowser.openFolderError = (err) => { + const ERROR = strings.error.toUpperCase(); + const message = `${strings["unable to open folder"]}. ${helpers.errorMessage(err.code)}`; + if (err.code) { + alert(ERROR, message); + } else if (err.code !== 0) { + alert(ERROR, strings["unable to open folder"]); + } +}; + +FileBrowser.open = (res) => { + if (res.type === "folder") { + FileBrowser.openFolder(res); + return; + } + + FileBrowser.openFile(res); +}; + +FileBrowser.openError = (err) => { + FileBrowser.openFileError(err); +}; + +export default FileBrowser; diff --git a/src/pages/fileBrowser/list.hbs b/src/pages/fileBrowser/list.hbs index b121b2518..a4ae77297 100644 --- a/src/pages/fileBrowser/list.hbs +++ b/src/pages/fileBrowser/list.hbs @@ -1,23 +1,23 @@
      {{#list}} {{#.}} -
    • - - +
      {{name}}
      @@ -25,4 +25,4 @@
    • {{/.}} {{/list}} -
    \ No newline at end of file + diff --git a/src/pages/fileBrowser/projects.js b/src/pages/fileBrowser/projects.js deleted file mode 100644 index 8469a0ba4..000000000 --- a/src/pages/fileBrowser/projects.js +++ /dev/null @@ -1,19 +0,0 @@ -//jshint ignore:start - -export default { - angular: () => { - return import(/* webpackChunkName: "angular" */ './projects/ng'); - }, - angularjs: () => { - return import(/* webpackChunkName: "angularjs" */ './projects/ngjs'); - }, - html: () => { - return import(/* webpackChunkName: "html" */ './projects/html'); - }, - react: () => { - return import(/* webpackChunkName: "react" */ './projects/react'); - }, - vue: () => { - return import(/* webpackChunkName: "vue" */ './projects/vue'); - }, -}; diff --git a/src/pages/fileBrowser/projects/html.js b/src/pages/fileBrowser/projects/html.js deleted file mode 100644 index 1261471bf..000000000 --- a/src/pages/fileBrowser/projects/html.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - 'index.html': - '\r\n\r\n\r\n \r\n \r\n \r\n \r\n <%name%>\r\n\r\n\r\n\t

    <%name%>

    \r\n\r\n', - 'css/index.css': '', - 'js/index.js': '', -}; diff --git a/src/pages/fileBrowser/projects/ng.js b/src/pages/fileBrowser/projects/ng.js deleted file mode 100644 index c035612a3..000000000 --- a/src/pages/fileBrowser/projects/ng.js +++ /dev/null @@ -1,21 +0,0 @@ -const appHTML = - '\r\n
    \r\n Angular Logo\r\n Welcome\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{ title }} app is running!\r\n \r\n \r\n \r\n
    \r\n \r\n

    Resources

    \r\n

    Here are some links to help you get started:

    \r\n
    \r\n \r\n \r\n \r\n Learn Angular\r\n \r\n \r\n \r\n \r\n \r\n \r\n Angular Blog\r\n \r\n \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n
    \r\n Love Angular? \r\n Give our repo a star.\r\n
    \r\n \r\n \r\n \r\n Star\r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n
    '; -const indexHTML = - '\r\n\r\n\r\n \r\n \r\n \r\n\r\n <%name%>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n <%name%> is loading...\r\n \r\n \r\n\r\n'; -const appTS = - "import {Component, NgModule, VERSION} from '@angular/core'\r\nimport {BrowserModule} from '@angular/platform-browser'\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: 'src/app/app.html',\r\n styleUrls: ['src/app/app.css']\r\n})\r\nexport class App {\r\n heading: string;\r\n text: string;\r\n\r\n constructor() {\r\n this.heading = `Angular v${VERSION.full}`;\r\n this.text = \"Caution: do not look into laser with remaining eye.\";\r\n }\r\n}\r\n\r\n@NgModule({\r\n imports: [BrowserModule],\r\n declarations: [App],\r\n bootstrap: [App]\r\n})\r\nexport class AppModule {\r\n}\r\n"; -const appCSS = - ':host {\r\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\r\n font-size: 14px;\r\n color: #333;\r\n box-sizing: border-box;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\nh1,\r\nh2,\r\nh3,\r\nh4,\r\nh5,\r\nh6 {\r\n margin: 8px 0;\r\n}\r\n\r\np {\r\n margin: 0;\r\n}\r\n\r\n.spacer {\r\n flex: 1;\r\n}\r\n\r\n.toolbar {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n background-color: #1976d2;\r\n color: white;\r\n font-weight: 600;\r\n}\r\n\r\n.toolbar img {\r\n margin: 0 16px;\r\n}\r\n\r\n.toolbar #twitter-logo {\r\n height: 40px;\r\n margin: 0 16px;\r\n}\r\n\r\n.toolbar #twitter-logo:hover {\r\n opacity: 0.8;\r\n}\r\n\r\n.content {\r\n display: flex;\r\n margin: 82px auto 32px;\r\n padding: 0 16px;\r\n max-width: 960px;\r\n flex-direction: column;\r\n align-items: center;\r\n}\r\n\r\nsvg.material-icons {\r\n height: 24px;\r\n width: auto;\r\n}\r\n\r\nsvg.material-icons:not(:last-child) {\r\n margin-right: 8px;\r\n}\r\n\r\n.card svg.material-icons path {\r\n fill: #888;\r\n}\r\n\r\n.card-container {\r\n display: flex;\r\n flex-wrap: wrap;\r\n justify-content: center;\r\n margin-top: 16px;\r\n}\r\n\r\n.card {\r\n border-radius: 4px;\r\n border: 1px solid #eee;\r\n background-color: #fafafa;\r\n height: 40px;\r\n width: 200px;\r\n margin: 0 8px 16px;\r\n padding: 16px;\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: center;\r\n align-items: center;\r\n transition: all 0.2s ease-in-out;\r\n line-height: 24px;\r\n}\r\n\r\n.card-container .card:not(:last-child) {\r\n margin-right: 0;\r\n}\r\n\r\n.card.card-small {\r\n height: 16px;\r\n width: 168px;\r\n}\r\n\r\n.card-container .card:not(.highlight-card) {\r\n cursor: pointer;\r\n}\r\n\r\n.card-container .card:not(.highlight-card):hover {\r\n transform: translateY(-3px);\r\n box-shadow: 0 4px 17px rgba(0, 0, 0, 0.35);\r\n}\r\n\r\n.card-container .card:not(.highlight-card):hover .material-icons path {\r\n fill: rgb(105, 103, 103);\r\n}\r\n\r\n.card.highlight-card {\r\n background-color: #1976d2;\r\n color: white;\r\n font-weight: 600;\r\n border: none;\r\n width: auto;\r\n min-width: 30%;\r\n position: relative;\r\n}\r\n\r\n.card.card.highlight-card span {\r\n margin-left: 60px;\r\n}\r\n\r\nsvg#rocket {\r\n width: 80px;\r\n position: absolute;\r\n left: -10px;\r\n top: -24px;\r\n}\r\n\r\nsvg#rocket-smoke {\r\n height: calc(100vh - 95px);\r\n position: absolute;\r\n top: 10px;\r\n right: 180px;\r\n z-index: -10;\r\n}\r\n\r\na,\r\na:visited,\r\na:hover {\r\n color: #1976d2;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #125699;\r\n}\r\n\r\n.terminal {\r\n position: relative;\r\n width: 80%;\r\n max-width: 600px;\r\n border-radius: 6px;\r\n padding-top: 45px;\r\n margin-top: 8px;\r\n overflow: hidden;\r\n background-color: rgb(15, 15, 16);\r\n}\r\n\r\n.terminal::before {\r\n content: "\\2022 \\2022 \\2022";\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n height: 4px;\r\n background: rgb(58, 58, 58);\r\n color: #c2c3c4;\r\n width: 100%;\r\n font-size: 2rem;\r\n line-height: 0;\r\n padding: 14px 0;\r\n text-indent: 4px;\r\n}\r\n\r\n.terminal pre {\r\n font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;\r\n color: white;\r\n padding: 0 1rem 1rem;\r\n margin: 0;\r\n}\r\n\r\n.circle-link {\r\n height: 40px;\r\n width: 40px;\r\n border-radius: 40px;\r\n margin: 8px;\r\n background-color: white;\r\n border: 1px solid #eeeeee;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n cursor: pointer;\r\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\r\n transition: 1s ease-out;\r\n}\r\n\r\n.circle-link:hover {\r\n transform: translateY(-0.25rem);\r\n box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\nfooter {\r\n margin-top: 8px;\r\n display: flex;\r\n align-items: center;\r\n line-height: 20px;\r\n}\r\n\r\nfooter a {\r\n display: flex;\r\n align-items: center;\r\n}\r\n\r\n.github-star-badge {\r\n color: #24292e;\r\n display: flex;\r\n align-items: center;\r\n font-size: 12px;\r\n padding: 3px 10px;\r\n border: 1px solid rgba(27, 31, 35, .2);\r\n border-radius: 3px;\r\n background-image: linear-gradient(-180deg, #fafbfc, #eff3f6 90%);\r\n margin-left: 4px;\r\n font-weight: 600;\r\n font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;\r\n}\r\n\r\n.github-star-badge:hover {\r\n background-image: linear-gradient(-180deg, #f0f3f6, #e6ebf1 90%);\r\n border-color: rgba(27, 31, 35, .35);\r\n background-position: -.5em;\r\n}\r\n\r\n.github-star-badge .material-icons {\r\n height: 16px;\r\n width: 16px;\r\n margin-right: 4px;\r\n}\r\n\r\nsvg#clouds {\r\n position: fixed;\r\n bottom: -160px;\r\n left: -230px;\r\n z-index: -10;\r\n width: 1920px;\r\n}\r\n\r\n\r\n/* Responsive Styles */\r\n@media screen and (max-width: 767px) {\r\n\r\n .card-container>*:not(.circle-link),\r\n .terminal {\r\n width: 100%;\r\n }\r\n\r\n .card:not(.highlight-card) {\r\n height: 16px;\r\n margin: 8px 0;\r\n }\r\n\r\n .card.highlight-card span {\r\n margin-left: 72px;\r\n }\r\n\r\n svg#rocket-smoke {\r\n right: 120px;\r\n transform: rotate(-5deg);\r\n }\r\n}\r\n\r\n@media screen and (max-width: 575px) {\r\n svg#rocket-smoke {\r\n display: none;\r\n visibility: hidden;\r\n }\r\n}'; -const mainTs = - "import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\nimport { AppModule } from './app/app';\r\n\r\nplatformBrowserDynamic().bootstrapModule(AppModule);\r\n"; -const systejsConfigJs = - "var angularVersion = '@6.0.7';\r\n\r\nSystem.config({\r\n transpiler: 'ts',\r\n typescriptOptions: {\r\n emitDecoratorMetadata: true,\r\n experimentalDecorators: true\r\n },\r\n packages: {\r\n \".\": {\r\n main: './main.ts',\r\n defaultExtension: 'ts'\r\n },\r\n rxjs: {\r\n main: 'index.js',\r\n defaultExtension: 'js'\r\n },\r\n \"rxjs/operators\": {\r\n main: 'index.js',\r\n defaultExtension: 'js'\r\n }\r\n },\r\n meta: {\r\n 'typescript': { 'exports': 'ts' }\r\n },\r\n paths: {\r\n 'npm:': 'https://unpkg.com/'\r\n },\r\n map: {\r\n '@angular/core': 'npm:@angular/core' + angularVersion + '/bundles/core.umd.js',\r\n '@angular/common': 'npm:@angular/common' + angularVersion + '/bundles/common.umd.js',\r\n '@angular/compiler': 'npm:@angular/compiler' + angularVersion + '/bundles/compiler.umd.js',\r\n '@angular/forms': 'npm:@angular/forms' + angularVersion + '/bundles/forms.umd.js',\r\n '@angular/http': 'npm:@angular/http' + angularVersion + '/bundles/http.umd.js',\r\n '@angular/router': 'npm:@angular/router' + angularVersion + '/bundles/router.umd.js',\r\n '@angular/platform-browser': 'npm:@angular/platform-browser' + angularVersion + '/bundles/platform-browser.umd.js',\r\n '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic' + angularVersion + '/bundles/platform-browser-dynamic.umd.js',\r\n 'rxjs': 'npm:rxjs@6.2.1',\r\n 'rxjs-compat': 'npm:rxjs-compat@6.2.1',\r\n 'ts': 'npm:plugin-typescript@8.0.0/lib/plugin.js',\r\n 'typescript': 'npm:typescript@2.9.2/lib/typescript.js'\r\n }\r\n});\r\n\r\nSystem.import('./src/main')\r\n .catch(console.error.bind(console));\r\n"; - -export default { - 'index.html': indexHTML, - 'src/app/app.html': appHTML, - 'src/app/app.ts': appTS, - 'src/app/app.css': appCSS, - 'src/main.ts': mainTs, - 'systemjs.config.js': systejsConfigJs, -}; diff --git a/src/pages/fileBrowser/projects/ngjs.js b/src/pages/fileBrowser/projects/ngjs.js deleted file mode 100644 index 4a0619fe7..000000000 --- a/src/pages/fileBrowser/projects/ngjs.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - 'index.html': - '\r\n\r\n\r\n \r\n \r\n \r\n\r\n <%name%>\r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n
    \r\n
    \r\n

    {{heading}}

    \r\n

    {{text}}

    \r\n
    \r\n
    \r\n \r\n \r\n\r\n', - 'index.js': - 'angular.module("app", [])\r\n .controller("MainCtrl", function ($scope) {\r\n $scope.heading = "<%name%>";\r\n $scope.text = "Angular is different from AngularJS.";\r\n });', -}; diff --git a/src/pages/fileBrowser/projects/react.js b/src/pages/fileBrowser/projects/react.js deleted file mode 100644 index ca64795ac..000000000 --- a/src/pages/fileBrowser/projects/react.js +++ /dev/null @@ -1,16 +0,0 @@ -export default { - 'index.html': - '\r\n\r\n\r\n \r\n \r\n \r\n \r\n <%name%>\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n \r\n
    <%name%> is loading...
    \r\n \r\n \r\n\r\n', - 'systemjs.config.js': - "SystemJS.config({\r\n baseURL:'https://unpkg.com/',\r\n defaultExtension: false,\r\n packages:{\r\n \"/\": \"js\"\r\n },\r\n meta: {\r\n '*.js': {\r\n 'babelOptions': {\r\n react: true\r\n }\r\n },\r\n '*.jsx': {\r\n 'babelOptions': {\r\n react: true\r\n }\r\n },\r\n '*.css': {\r\n loader: 'css'\r\n },\r\n },\r\n map: {\r\n 'plugin-babel': 'systemjs-plugin-babel@latest/plugin-babel.js',\r\n 'systemjs-babel-build': 'systemjs-plugin-babel@latest/systemjs-babel-browser.js',\r\n 'react': 'react@17/umd/react.production.min.js',\r\n 'react-dom': 'react-dom@17/umd/react-dom.production.min.js',\r\n 'css': 'systemjs-plugin-css@latest/css.js'\r\n },\r\n transpiler: 'plugin-babel'\r\n});\r\n\r\nSystemJS.import('./src/index.jsx')\r\n .catch(console.error.bind(console));", - 'src/App.jsx': - 'import React from \'react\';\r\nimport \'./App.css\';\r\n\r\nfunction App() {\r\n return (\r\n
    \r\n
    \r\n logo\r\n

    \r\n Hello from React.\r\n

    \r\n \r\n Learn React\r\n \r\n
    \r\n
    \r\n );\r\n}\r\n\r\nexport default App;\r\n', - 'assets/logo.svg': - '\r\n \r\n \r\n \r\n \r\n \r\n\r\n', - 'src/index.jsx': - "import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport App from './App.jsx';\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById('app')\r\n);\r\n", - 'src/index.css': - "body {\r\n margin: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\r\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\r\n sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\r\n monospace;\r\n}\r\n", - 'src/App.css': - '.App {\r\n text-align: center;\r\n}\r\n\r\n.App-logo {\r\n height: 40vmin;\r\n pointer-events: none;\r\n}\r\n\r\n@media (prefers-reduced-motion: no-preference) {\r\n .App-logo {\r\n animation: App-logo-spin infinite 20s linear;\r\n }\r\n}\r\n\r\n.App-header {\r\n background-color: #282c34;\r\n min-height: 100vh;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: calc(10px + 2vmin);\r\n color: white;\r\n}\r\n\r\n.App-link {\r\n color: #61dafb;\r\n}\r\n\r\n@keyframes App-logo-spin {\r\n from {\r\n transform: rotate(0deg);\r\n }\r\n to {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n', -}; diff --git a/src/pages/fileBrowser/projects/vue.js b/src/pages/fileBrowser/projects/vue.js deleted file mode 100644 index 6ff7b9127..000000000 --- a/src/pages/fileBrowser/projects/vue.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - 'index.html': - '\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n <%name%>\r\n\r\n\r\n\r\n \r\n
    <%name%> is loading...
    \r\n \r\n\r\n\r\n', - 'systemjs.config.js': - "SystemJS.config({\r\n baseURL:'https://unpkg.com/',\r\n defaultExtension: true,\r\n meta: {\r\n '*.vue': {\r\n 'loader': 'vue-loader'\r\n }\r\n },\r\n map: {\r\n 'plugin-babel': 'systemjs-plugin-babel@latest/plugin-babel.js',\r\n 'systemjs-babel-build': 'systemjs-plugin-babel@latest/systemjs-babel-browser.js',\r\n 'vue-loader': 'systemjs-vue-loader@latest',\r\n 'vue': 'vue@latest/dist/vue.js',\r\n 'vue-template-compiler': 'vue-template-compiler@latest'\r\n },\r\n transpiler: 'plugin-babel'\r\n});\r\n\r\nSystemJS.import('./src/main.js')\r\n .catch(console.error.bind(console));", - 'src/main.js': - "import Vue from 'vue'\r\nimport App from './App.vue'\r\n\r\nnew Vue({\r\n render: h => h(App)\r\n}).$mount('#app')", - 'src/App.vue': - '\r\n\r\n\r\n\r\n\r\n', - 'src/components/HelloWorld.vue': - '\r\n\r\n\r\n\r\n\r\n', - 'assets/logo.svg': - '', -}; diff --git a/src/pages/fileBrowser/util.js b/src/pages/fileBrowser/util.js index 65949f711..ddac49c60 100644 --- a/src/pages/fileBrowser/util.js +++ b/src/pages/fileBrowser/util.js @@ -1,73 +1,78 @@ -import tag from 'html-tag-js'; -import dialogs from '../../components/dialogs'; -import helpers from '../../lib/utils/helpers'; - -export default { - /** - * - * @param {Array} list - * @param {String} name - * @param {String} url - * @param {Object} extra - */ - pushFolder(list, name, url, extra = {}) { - list.push({ - url: url, - name: name, - isDirectory: true, - parent: true, - type: 'dir', - ...extra, - }); - }, - /** - * - * @param {String} name - * @returns {Promise<{name: String, uri: String, uuid: string}>} - */ - addPath(name = '', uuid) { - return new Promise((resolve, reject) => { - dialogs - .multiPrompt(strings['add path'], [ - { - id: 'uri', - placeholder: strings['select folder'], - type: 'text', - required: true, - readOnly: true, - onclick: function () { - sdcard.getStorageAccessPermission( - uuid, - (res) => { - const $name = tag.get('#name'); - if (!$name.value && res) { - const name = window.decodeURIComponent(res)?.split(':').pop()?.split('/').pop(); - $name.value = name ?? ''; - } - this.value = res; - }, - (err) => { - helpers.error(err); - }, - ); - }, - }, - { - id: 'name', - placeholder: strings['folder name'], - type: 'text', - required: true, - value: name, - }, - ], 'https://acode.foxdebug.com/faqs/224761680') - .then((values) => { - const { name, uri } = values; - resolve({ - name, - uri, - uuid: helpers.uuid(), - }); - }); - }); - }, -}; +import multiPrompt from "dialogs/multiPrompt"; +import helpers from "utils/helpers"; + +export default { + /** + * + * @param {Array} list + * @param {String} name + * @param {String} url + * @param {Object} extra + */ + pushFolder(list, name, url, extra = {}) { + list.push({ + url: url, + name: name, + isDirectory: true, + parent: true, + type: "dir", + ...extra, + }); + }, + /** + * Save a new path using storage access framework + * @param {String} name + * @returns {Promise<{name: String, uri: String, uuid: string}>} + */ + async addPath(name, uuid) { + const res = await multiPrompt( + strings["add path"], + [ + { + id: "uri", + placeholder: strings["select folder"], + type: "text", + required: true, + readOnly: true, + onclick() { + sdcard.getStorageAccessPermission( + uuid, + (res) => { + const $name = tag.get("#name"); + if (!$name.value && res) { + const name = window + .decodeURIComponent(res) + ?.split(":") + .pop() + ?.split("/") + .pop(); + $name.value = name ?? ""; + } + this.value = res; + }, + (err) => { + helpers.error(err); + }, + ); + }, + }, + { + id: "name", + placeholder: strings["folder name"], + type: "text", + required: true, + value: name ?? "", + }, + ], + "https://acode.app/faqs/224761680", + ); + + if (!res) return; + + return { + name: res.name, + uri: res.uri, + uuid: helpers.uuid(), + }; + }, +}; diff --git a/src/pages/fontManager/fontManager.js b/src/pages/fontManager/fontManager.js new file mode 100644 index 000000000..e132b90a4 --- /dev/null +++ b/src/pages/fontManager/fontManager.js @@ -0,0 +1,325 @@ +import "./style.scss"; +import fsOperation from "fileSystem"; +import Page from "components/page"; +import searchBar from "components/searchbar"; +import toast from "components/toast"; +import alert from "dialogs/alert"; +import box from "dialogs/box"; +import confirm from "dialogs/confirm"; +import loader from "dialogs/loader"; +import prompt from "dialogs/prompt"; +import Ref from "html-tag-js/ref"; +import actionStack from "lib/actionStack"; +import fonts from "lib/fonts"; +import appSettings from "lib/settings"; +import FileBrowser from "pages/fileBrowser"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; + +export default function fontManager() { + const defaultFont = "Roboto Mono"; + const $page = Page(strings.fonts?.capitalize()); + const $search = ; + const $addFont = ; + const list = Ref(); + + actionStack.push({ + id: "fontManager", + action: () => { + $page.hide(); + $page.removeEventListener("click", clickHandler); + }, + }); + + $page.onhide = () => { + helpers.hideAd(); + actionStack.remove("fontManager"); + }; + + $page.body =
    ; + + $page.querySelector("header").append($search, $addFont); + + app.append($page); + renderFonts(); + helpers.showAd(); + + $page.addEventListener("click", clickHandler); + + function renderFonts() { + const fontNames = fonts.getNames(); + const currentFont = appSettings.value.editorFont || "Roboto Mono"; + let $currentItem; + + const content = fontNames.map((fontName) => { + const isCurrent = fontName === currentFont; + const $item = ( + selectFont(fontName)} + onDelete={() => deleteFont(fontName)} + /> + ); + if (isCurrent) $currentItem = $item; + return $item; + }); + + list.el.content = content; + $currentItem?.scrollIntoView(); + } + + async function clickHandler(e) { + const $target = e.target; + if (!($target instanceof HTMLElement)) return; + const action = $target.getAttribute("action") || $target.dataset.action; + if (!action) return; + + switch (action) { + case "search": + searchBar(list.el); + break; + case "add-font": + await addNewFont(); + break; + } + } + + async function addNewFont() { + try { + const { url, name } = await FileBrowser( + "file", + "Select font file (.ttf, .otf, .woff)", + false, + ); + + // Check if file is a font file + const ext = name.toLowerCase().split(".").pop(); + if (!["ttf", "otf", "woff", "woff2"].includes(ext)) { + toast("Please select a valid font file (.ttf, .otf, .woff)"); + return; + } + + const fontName = await prompt( + "Font Name", + name.replace(/\.(ttf|otf|woff|woff2)$/i, ""), + ); + if (!fontName) return; + + // Check if font already exists + if (fonts.get(fontName)) { + toast("Font with this name already exists"); + return; + } + + await addFontFromFile(fontName, url); + } catch (error) { + if (error.message !== "User cancelled") { + toast("Failed to add font: " + error.message); + } + } + } + + async function addFontFromFile(fontName, fontUrl) { + try { + // Download the font to local storage first + loader.showTitleLoader(); + const FONT_DIR = Url.join(DATA_STORAGE, "fonts"); + const fontFileName = `${fontName.replace(/[^a-zA-Z0-9]/g, "_")}.ttf`; + const FONT_FILE = Url.join(FONT_DIR, fontFileName); + + // Create fonts directory if it doesn't exist + if (!(await fsOperation(FONT_DIR).exists())) { + await fsOperation(DATA_STORAGE).createDirectory("fonts"); + } + + // Read and save the font file + const fontData = await fsOperation(fontUrl).readFile(); + await fsOperation(FONT_DIR).createFile(fontFileName, fontData); + + // Get internal URI for the saved font + const internalUrl = await helpers.toInternalUri(FONT_FILE); + + // Generate CSS for the font + let css = `@font-face { + font-family: '${fontName}'; + src: url(${internalUrl}) format('truetype'); + font-weight: normal; + font-style: normal; +}`; + + loader.removeTitleLoader(); + + // Show CSS preview/edit dialog + const editedCSS = await showCSSEditor(css, fontName); + if (editedCSS === null) return; // User cancelled + + // Add the font + fonts.addCustom(fontName, editedCSS); + renderFonts(); + toast(`Font "${fontName}" added successfully`); + } catch (error) { + loader.removeTitleLoader(); + toast("Failed to add font: " + error.message); + } + } + + async function showCSSEditor(css, fontName) { + return new Promise((resolve) => { + const htmlContent = ` +
    + Edit the CSS @font-face rule below: +
    + + `; + + const dialog = box( + `Edit CSS - ${fontName}`, + htmlContent, + "Save", + "Cancel", + ) + .then((children) => { + const textarea = children[0].querySelector(".font-css-editor"); + if (textarea) { + textarea.focus(); + textarea.select(); + } + }) + .ok(() => { + const textarea = document.querySelector(".font-css-editor"); + const value = textarea ? textarea.value : css; + resolve(value); + dialog.hide(); + }) + .cancel(() => { + resolve(null); + dialog.hide(); + }); + }); + } + + async function selectFont(fontName) { + try { + await fonts.setFont(fontName); + appSettings.update({ editorFont: fontName }, false); + toast(`Font changed to "${fontName}"`); + renderFonts(); // Refresh to update current selection + } catch (error) { + toast("Failed to set font: " + error.message); + } + } + + async function deleteFont(fontName) { + // Don't allow deleting default fonts + const defaultFonts = ["Fira Code", "Roboto Mono", "MesloLGS NF Regular"]; + if (defaultFonts.includes(fontName)) { + toast("Cannot delete default fonts"); + return; + } + + const shouldDelete = await confirm( + "Delete Font", + `Are you sure you want to delete "${fontName}"?`, + ); + + if (shouldDelete) { + try { + // Check if we're deleting the currently active font + const currentFont = appSettings.value.editorFont || "Roboto Mono"; + const isCurrentFont = fontName === currentFont; + + // Remove from fonts collection + fonts.remove(fontName); + + // Try to delete the font file from storage + const FONT_DIR = Url.join(DATA_STORAGE, "fonts"); + const fontFileName = `${fontName.replace(/[^a-zA-Z0-9]/g, "_")}.ttf`; + const FONT_FILE = Url.join(FONT_DIR, fontFileName); + + const fs = fsOperation(FONT_FILE); + if (await fs.exists()) { + await fs.delete(); + } + + // If we deleted the current font, switch to default font (Roboto Mono) + if (isCurrentFont) { + await fonts.setFont(defaultFont); + appSettings.update({ editorFont: defaultFont }, false); + toast(`Font "${fontName}" deleted, switched to ${defaultFont}`); + } else { + toast(`Font "${fontName}" deleted`); + } + + renderFonts(); + } catch (error) { + // Font removed from collection even if file deletion fails + const currentFont = appSettings.value.editorFont || "Roboto Mono"; + const isCurrentFont = fontName === currentFont; + + // If we deleted the current font, switch to default font (Roboto Mono) + if (isCurrentFont) { + try { + await fonts.setFont(defaultFont); + appSettings.update({ editorFont: defaultFont }, false); + toast( + `Font "${fontName}" deleted, switched to ${defaultFont} (file cleanup may have failed)`, + ); + } catch (setFontError) { + toast( + `Font "${fontName}" deleted, but failed to switch to ${defaultFont}`, + ); + } + } else { + toast(`Font "${fontName}" deleted (file cleanup may have failed)`); + } + + renderFonts(); + } + } + } + + function FontItem({ name, isCurrent, onSelect, onDelete }) { + const defaultFonts = ["Fira Code", "Roboto Mono", "MesloLGS NF Regular"]; + const isDefault = defaultFonts.includes(name); + + const $item = ( +
    + +
    +
    {name}
    +
    + +
    + ); + + $item.onclick = (e) => { + const action = e.target.dataset.action; + if (action === "delete" && !isDefault) { + e.stopPropagation(); + onDelete(); + } else if ( + !e.target.classList.contains("icon") || + action === "select-font" + ) { + onSelect(); + } + }; + + return $item; + } +} diff --git a/src/pages/fontManager/index.js b/src/pages/fontManager/index.js new file mode 100644 index 000000000..9149ee3cd --- /dev/null +++ b/src/pages/fontManager/index.js @@ -0,0 +1,7 @@ +export default function fontManager(...args) { + import(/* webpackChunkName: "fontManager" */ "./fontManager").then( + (module) => { + module.default(...args); + }, + ); +} diff --git a/src/pages/fontManager/style.scss b/src/pages/fontManager/style.scss new file mode 100644 index 000000000..670d8ec3b --- /dev/null +++ b/src/pages/fontManager/style.scss @@ -0,0 +1,63 @@ +.main.list .list-item.current-font { + background: var(--active-color-5, rgba(51, 153, 255, 0.1)) !important; + border-left: 3px solid var(--active-color) !important; + + .text { + font-weight: 600 !important; + } + + .icon:first-child { + color: var(--active-color) !important; + } +} + +.font-manager { + .list-item { + .container { + flex: 1; + } + + .icon { + + &.visibility, + &.delete { + opacity: 0.6; + transition: opacity 0.2s ease; + cursor: pointer; + + &:hover { + opacity: 1; + } + } + + &.delete { + &:hover:not(.disabled) { + color: var(--error-text-color); + } + + &.disabled { + opacity: 0.3; + cursor: not-allowed; + + &:hover { + opacity: 0.3; + } + } + } + } + } +} + +.prompt.box { + .font-css-editor { + &.input { + border-bottom: 1px solid var(--border-color); + min-height: 120px; + margin-top: 5px; + + &:focus { + border-bottom-color: var(--active-color); + } + } + } +} \ No newline at end of file diff --git a/src/pages/gistFiles/gistFiles.hbs b/src/pages/gistFiles/gistFiles.hbs deleted file mode 100644 index 665853c59..000000000 --- a/src/pages/gistFiles/gistFiles.hbs +++ /dev/null @@ -1,11 +0,0 @@ -
    {{#files}} -
    - -
    -
    - {{filename}} -
    -
    - -
    - {{/files}}
    \ No newline at end of file diff --git a/src/pages/gistFiles/gistFiles.include.js b/src/pages/gistFiles/gistFiles.include.js deleted file mode 100644 index fa4126fab..000000000 --- a/src/pages/gistFiles/gistFiles.include.js +++ /dev/null @@ -1,216 +0,0 @@ -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import _template from './gistFiles.hbs'; -import _menu from './menu.hbs'; -import './gistFiles.scss'; -import Page from '../../components/page'; -import helpers from '../../lib/utils/helpers'; -import contextMenu from '../../components/contextMenu'; -import dialogs from '../../components/dialogs'; -import Gists from '../gists/gists'; -import git from '../../lib/git'; -import constants from '../../lib/constants'; -import searchBar from '../../components/searchbar'; -import Icon from '../../components/icon'; - -/** - * - * @param {Gist} gist - */ -function GistFilesInclude(gist) { - const fileNames = Object.keys(gist.files); - const $page = Page(fileNames[0] || 'Gist:' + gist.id); - const views = { - files: () => { - const files = []; - Object.values(gist.files).map((file) => { - files.push({ - filename: file.filename, - type: helpers.getIconForFile(file.filename), - }); - }); - return files; - }, - msg: strings['empty folder message'], - }; - const $content = tag.parse(mustache.render(_template, views)); - const $menuToggler = Icon('more_vert', 'toggle-menu'); - const $cm = contextMenu(mustache.render(_menu, strings), { - top: '8px', - right: '8px', - toggle: $menuToggler, - transformOrigin: 'top right', - }); - const $search = tag('span', { - className: 'icon search', - attr: { - action: 'search', - }, - }); - - $content.addEventListener('click', handleClick); - $cm.addEventListener('click', handleClick); - $page.append($content); - $page.querySelector('header').append($search, $menuToggler); - app.appendChild($page); - $search.onclick = () => { - searchBar($page.querySelector('.list')); - }; - - actionStack.push({ - id: 'gistFiles', - action: $page.hide, - }); - - $page.onhide = function () { - actionStack.remove('gistFiles'); - }; - - /** - * - * @param {MouseEvent} e - */ - function handleClick(e) { - const $el = e.target; - const action = $el.getAttribute('action'); - if (!action) return; - - if (['create', 'delete-gist'].includes(action)) $cm.hide(); - switch (action) { - case 'file': - file(); - break; - - case 'share': - share(); - break; - - case 'create': - addFile(); - break; - - case 'delete-gist': - deleteGist(); - break; - - case 'delete-file': - deleteFile(); - break; - } - - function addFile() { - dialogs - .prompt(strings['enter file name'], strings['new file'], 'text', { - match: constants.FILE_NAME_REGEX, - required: true, - }) - .then((name) => { - gist.addFile(name); - editorManager.addNewFile(name, { - type: 'gist', - filename: name, - isUnsaved: false, - record: gist, - render: true, - }); - - actionStack.pop(); - actionStack.pop(); - actionStack.pop(); - }); - } - - function deleteFile() { - const filename = $el.parentElement.getAttribute('filename'); - dialogs - .confirm( - strings.warning, - strings['delete {name}'].replace('{name}', filename), - ) - .then(() => { - if (filename) { - dialogs.loader.create(filename, strings.loading + '...'); - gist - .removeFile(filename) - .then(() => { - $el.parentElement.remove(); - toast(strings.success); - }) - .catch((err) => { - if (err) dialogs.alert(strings.error, err.toString()); - }) - .finally(() => { - dialogs.loader.destroy(); - }); - } - }); - } - - function deleteGist() { - dialogs - .confirm( - strings.warning, - strings['delete {name}'].replace('{name}', 'Gist: ' + gist.id), - ) - .then(() => { - const Gist = git.GitHub().getGist(gist.id); - dialogs.loader.create('', strings.loading + '...'); - Gist.delete() - .then((res) => { - if (res.status === 204) { - for (let file of editorManager.files) { - if (file.type === 'gist' && file.record.id === gist.id) - editorManager.removeFile(file, true); - } - toast(strings.success); - actionStack.pop(); - actionStack.pop(); - Gists((gists) => { - let index; - for (let [i, g] of gists.entries()) { - if (g.id === gist.id) { - index = i; - break; - } - } - - if (index !== undefined) { - gists.splice(index, 1); - } - return gists; - }); - } - }) - .catch((err) => { - if (err) { - console.error(err); - dialogs.alert(strings.error, err.toString()); - } - }) - .finally(() => { - dialogs.loader.destroy(); - }); - }); - } - - function share() { - const filename = $el.parentElement.getAttribute('filename'); - } - - function file() { - const filename = $el.getAttribute('filename'); - editorManager.addNewFile(filename, { - type: 'gist', - text: gist.files[filename].content, - isUnsaved: false, - record: gist, - render: true, - }); - actionStack.pop(); - actionStack.pop(); - actionStack.pop(); - } - } -} - -export default GistFilesInclude; diff --git a/src/pages/gistFiles/gistFiles.js b/src/pages/gistFiles/gistFiles.js deleted file mode 100644 index 2d94f7041..000000000 --- a/src/pages/gistFiles/gistFiles.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * - * @param {Gist} gist - */ -function GistFiles(gist) { - import(/* webpackChunkName: "gistFiles" */ './gistFiles.include').then( - (res) => { - const GistFiles = res.default; - GistFiles(gist); - }, - ); -} - -export default GistFiles; diff --git a/src/pages/gistFiles/gistFiles.scss b/src/pages/gistFiles/gistFiles.scss deleted file mode 100644 index 1599c6d5a..000000000 --- a/src/pages/gistFiles/gistFiles.scss +++ /dev/null @@ -1,12 +0,0 @@ -#gistFiles { - .list-item { - .icon { - font-size: 1em; - - &.file { - background-position: center; - background-size: 26px; - } - } - } -} diff --git a/src/pages/gistFiles/menu.hbs b/src/pages/gistFiles/menu.hbs deleted file mode 100644 index d47cedde9..000000000 --- a/src/pages/gistFiles/menu.hbs +++ /dev/null @@ -1,8 +0,0 @@ -
  • - {{new file}} - -
  • -
  • - Delete gist - -
  • \ No newline at end of file diff --git a/src/pages/gists/gists.hbs b/src/pages/gists/gists.hbs deleted file mode 100644 index e04d5b31c..000000000 --- a/src/pages/gists/gists.hbs +++ /dev/null @@ -1,21 +0,0 @@ -
    {{#gists}} -
    - -
    -
    - {{name}} -
    - -
    - - {{files_count}} -
    -
    - - {{comments}} -
    -
    -
    - -
    - {{/gists}}
    \ No newline at end of file diff --git a/src/pages/gists/gists.include.js b/src/pages/gists/gists.include.js deleted file mode 100644 index 5f966364d..000000000 --- a/src/pages/gists/gists.include.js +++ /dev/null @@ -1,233 +0,0 @@ -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import helpers from '../../lib/utils/helpers'; -import GithubLogin from '../login/login'; -import Page from '../../components/page'; - -import _template from './gists.hbs'; -import _menu from './menu.hbs'; -import './gists.scss'; -import contextMenu from '../../components/contextMenu'; -import fs from '../../lib/fileSystem/internalFs'; -import dialogs from '../../components/dialogs'; -import git from '../../lib/git'; -import GistFiles from '../gistFiles/gistFiles'; -import constants from '../../lib/constants'; -import searchBar from '../../components/searchbar'; -import Icon from '../../components/icon'; - -function GistsInclude(callbackGists) { - const $search = tag('span', { - className: 'icon search', - attr: { - action: 'search', - }, - }); - const $menuToggler = Icon('more_vert', 'toggle-menu'); - const $page = Page('Gists'); - const { credentials } = helpers; - /** - * @type {Array} - */ - let gists = null; - const github = git.GitHub(); - const user = github.getUser(); - const gistsFile = cordova.file.externalDataDirectory + '.gists'; - const $cm = contextMenu(mustache.render(_menu, strings), { - top: '8px', - right: '8px', - toggle: $menuToggler, - transformOrigin: 'top right', - }); - - $cm.addEventListener('click', handleClick); - $page.querySelector('header').append($search, $menuToggler); - $search.onclick = () => { - searchBar($page.querySelector('.list')); - }; - - fs.readFile(gistsFile) - .then((res) => { - const text = credentials.decrypt(helpers.decodeText(res.data)); - const repos = JSON.parse(text); - render(repos); - }) - .catch((err) => { - dialogs.loader.create('GitHub', strings.loading + '...'); - loadRepos(); - }); - - /** - * - * @param {Array} res - */ - function render(res) { - const $oldContent = $page.querySelector('#gists'); - if ($oldContent) $oldContent.remove(); - - gists = callbackGists ? callbackGists(res) : res; - gists.map((gist) => { - const files = Object.values(gist.files); - let filename = files.length > 0 ? files[0].filename : gist.id; - - gist.private = !gist.public; - gist.name = filename; - gist.files_count = files.length; - }); - const $content = tag.parse( - mustache.render(_template, { - gists, - msg: strings['empty folder message'], - }), - ); - - $content.addEventListener('click', handleClick); - - $page.append($content); - if (!$page.isConnected) { - app.appendChild($page); - actionStack.push({ - id: 'repos', - action: $page.hide, - }); - $page.onhide = function () { - actionStack.remove('repos'); - }; - } - } - - /** - * - * @param {MouseEvent} e - */ - function handleClick(e) { - /** - * @type {HTMLElement} - */ - const $el = e.target; - const action = $el.getAttribute('action'); - - if (['reload', 'create'].includes(action)) $cm.hide(); - switch (action) { - case 'gist': - getGist(); - break; - - case 'open': - system.openInBrowser($el.parentElement.getAttribute('data-url')); - break; - - case 'reload': - loadRepos(); - gistRecord.reset(); - break; - - case 'share': - break; //TODO: make it work - - case 'create': - createGist(); - break; - } - - function createGist() { - const newGist = { - id: parseInt(Math.random() * new Date().getTime()).toString(16), - files: {}, - public: false, - }; - dialogs - .select('', ['public', 'private'], { - default: 'priavate', - }) - .then((res) => { - if (res === 'public') newGist.public = true; - - return dialogs.prompt( - strings['enter file name'], - strings['new file'], - 'text', - { - match: constants.FILE_NAME_REGEX, - required: true, - }, - ); - }) - .then((filename) => { - const file = { - filename, - content: '', - }; - newGist.files[filename] = file; - - const gist = gistRecord.add(newGist, true); - - editorManager.addNewFile(filename, { - type: 'gist', - text: file.content, - isUnsaved: false, - record: gist, - render: true, - }); - - actionStack.pop(); - actionStack.pop(); - }); - } - - function getGist() { - const id = $el.id; - - let gist = gistRecord.get(id); - if (!gist) { - dialogs.loader.create('', strings.loading + '...'); - github - .getGist(id) - .read() - .then((res) => { - const data = res.data; - gist = gistRecord.add(data); - GistFiles(gist); - }) - .catch((err) => { - if (err) { - dialogs.alert(strings.error, err.toString()); - } - }) - .finally(() => { - dialogs.loader.destroy(); - }); - } else { - GistFiles(gist); - } - } - } - - function loadRepos() { - dialogs.loader.create('Gists', strings.loading + '...'); - user - .listGists() - .then((res) => { - const repos = res.data; - const data = credentials.encrypt(JSON.stringify(repos)); - fs.writeFile(gistsFile, data, true, false).catch((err) => { - toast(strings.error); - console.error(err); - }); - - render(repos); - }) - .catch((err) => { - if (err.response) { - GithubLogin(); - } else { - console.error(err); - } - }) - .finally(() => { - dialogs.loader.destroy(); - }); - } -} - -export default GistsInclude; diff --git a/src/pages/gists/gists.js b/src/pages/gists/gists.js deleted file mode 100644 index cb2a4dc1a..000000000 --- a/src/pages/gists/gists.js +++ /dev/null @@ -1,8 +0,0 @@ -function Gists(...agrs) { - import(/* webpackChunkName: "gists" */ './gists.include').then((res) => { - const Gists = res.default; - Gists(...agrs); - }); -} - -export default Gists; diff --git a/src/pages/gists/gists.scss b/src/pages/gists/gists.scss deleted file mode 100644 index ac2f8bf68..000000000 --- a/src/pages/gists/gists.scss +++ /dev/null @@ -1,60 +0,0 @@ -#gists { - .list-item { - .icon { - &.file { - background-size: 16px; - background-position: center; - } - } - - .octicon { - &.main-icon { - font-size: 1.8em; - color: rgb(106, 115, 125) !important; - - &::before { - content: '\f00e'; - } - - &[private] { - color: rgb(219, 171, 9) !important; - - &::before { - content: '\f08c'; - } - } - } - } - - .value { - text-transform: unset; - display: flex; - - .group { - display: flex; - align-items: center; - margin-right: 15px; - - .octicon, - .icon { - height: 30px; - width: 30px; - font-size: 1em; - } - } - } - - .private { - > .text::after { - content: 'private'; - font-size: 0.6em; - border-radius: 4px; - background-color: rgb(204, 204, 204); - color: rgb(51, 51, 51); - border: solid 1px rgb(51, 51, 51); - margin: auto 5px; - padding: 0 2.5px; - } - } - } -} diff --git a/src/pages/gists/menu.hbs b/src/pages/gists/menu.hbs deleted file mode 100644 index f5c9bfa0f..000000000 --- a/src/pages/gists/menu.hbs +++ /dev/null @@ -1,8 +0,0 @@ -
  • - new gist - -
  • -
  • - {{reload}} - -
  • \ No newline at end of file diff --git a/src/pages/github/gitHub.hbs b/src/pages/github/gitHub.hbs deleted file mode 100644 index 618cdb9b0..000000000 --- a/src/pages/github/gitHub.hbs +++ /dev/null @@ -1,32 +0,0 @@ -
    -
    - avatar -

    - {{name}} - {{login}} -

    -
    - followers - following - repositories - gists -
    -
    - -
    -
    -
    -
    - -
    - Gists -
    -
    -
    -
    -
    - Repositories -
    -
    -
    -
    \ No newline at end of file diff --git a/src/pages/github/gitHub.include.js b/src/pages/github/gitHub.include.js deleted file mode 100644 index b429e958a..000000000 --- a/src/pages/github/gitHub.include.js +++ /dev/null @@ -1,181 +0,0 @@ -import './gitHub.scss'; -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import helpers from '../../lib/utils/helpers'; -import GithubLogin from '../login/login'; -import Page from '../../components/page'; -import _template from './gitHub.hbs'; -import _menu from './menu.hbs'; -import contextMenu from '../../components/contextMenu'; -import dialogs from '../../components/dialogs'; -import git from '../../lib/git'; -import Repos from '../repos/repos'; -import Gists from '../gists/gists'; -import fsOperation from '../../lib/fileSystem/fsOperation'; -import Url from '../../lib/utils/Url'; -import Icon from '../../components/icon'; - -/** - * - * @param {object} $loginPage - */ -async function gitHubInclude($loginPage) { - let $page; - const $search = tag('span', { - className: 'icon search hidden', - }); - const $menuToggler = Icon('more_vert', 'toggle-menu'); - const { credentials } = helpers; - - const github = git.GitHub(); - const user = github.getUser(); - const githubFile = Url.join(DATA_STORAGE, '.github'); - const gitProfile = Url.join(DATA_STORAGE, '.git'); - const $cm = contextMenu(mustache.render(_menu, strings), { - top: '8px', - right: '8px', - toggle: $menuToggler, - transformOrigin: 'top right', - }); - - $cm.addEventListener('click', handleClick); - - const fs = fsOperation(gitProfile); - if (await fs.exists()) { - const text = await fs.readFile('utf-8'); - const profile = helpers.credentials.decrypt(text); - render(helpers.parseJSON(profile)); - } else { - loadProfile(); - } - - /** - * - * @param {MouseEvent} e - */ - function handleClick(e) { - /** - * @type {HTMLElement} - */ - const $el = e.target; - const action = $el.getAttribute('action'); - - if (['logout', 'reload'].includes(action)) $cm.hide(); - switch (action) { - case 'logout': - logout(() => { - toast(strings.success); - $page.hide(); - }); - break; - case 'gist': - Gists(); - break; - case 'repos': - Repos(); - break; - case 'reload': - loadProfile(function (profile) { - let $content = tag.get('#github'); - if ($content) $content.remove(); - $content = content(profile); - $page.append($content); - $content.addEventListener('click', handleClick); - }); - break; - case 'open': - system.openInBrowser($el.getAttribute('data-value')); - break; - } - } - - function render(profile) { - if (!$page) $page = Page('Github'); - const $content = content(profile); - $page.append($content); - app.appendChild($page); - $page.get('header').append($search, $menuToggler); - - actionStack.push({ - id: 'github', - action: $page.hide, - }); - - $page.onhide = function () { - actionStack.remove('github'); - }; - - $content.addEventListener('click', handleClick); - - if ($loginPage) $loginPage.hide(); - } - - async function loadProfile(onload) { - dialogs.loader.create('GitHub', strings.loading + '...'); - try { - const profile = await user.getProfile(); - const { data: profileData } = profile; - const data = credentials.encrypt(JSON.stringify(profileData)); - try { - const fs = fsOperation(gitProfile); - if (!(await fs.exists())) { - const dataFs = fsOperation(DATA_STORAGE); - await dataFs.createFile('.git'); - } - await fs.writeFile(data); - } catch (error) {} - - if (typeof onload === 'function') onload(profileData); - else render(profileData); - } catch (err) { - if (err.response.data) { - console.error(err.response.data.message); - if (err.response.status === 401) logout(); - if ($loginPage) { - $loginPage.setMessage(err.response.data.message); - } else { - GithubLogin(); - } - } else { - if ($loginPage) { - $loginPage.setMessage(err.response.statusText); - } - logout(); - } - } - - dialogs.loader.destroy(); - } - - /** - * - * @param {*} profile - * @returns {HTMLElement} - */ - function content(profile) { - if (profile) { - profile.total_repos = (profile.total_private_repos ?? 0) + profile.public_repos; - profile.total_gists = (profile.private_gists ?? 0) + profile.public_gists; - } - return tag.parse( - mustache.render(_template, { - ...strings, - ...profile, - }), - ); - } - - async function logout(onlogout) { - if (localStorage.username) delete localStorage.username; - if (localStorage.password) delete localStorage.password; - if (localStorage.token) delete localStorage.token; - - try { - await fsOperation(gitProfile).deleteFile(); - await fsOperation(githubFile).deleteFile(); - } catch (error) {} - if (onlogout) onlogout(); - } -} - -export default gitHubInclude; diff --git a/src/pages/github/gitHub.js b/src/pages/github/gitHub.js deleted file mode 100644 index ecf015fb9..000000000 --- a/src/pages/github/gitHub.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * - * @param {object} options - */ -function GitHub(options) { - import(/* webpackChunkName: "gitHub" */ './gitHub.include').then((res) => { - const GitHub = res.default; - GitHub(options); - }); -} - -export default GitHub; diff --git a/src/pages/github/gitHub.scss b/src/pages/github/gitHub.scss deleted file mode 100644 index 57349cdde..000000000 --- a/src/pages/github/gitHub.scss +++ /dev/null @@ -1,74 +0,0 @@ -#github { - .list-item { - .octicon { - font-size: 1.8em; - color: rgb(106, 115, 125) !important; - } - } - - .profile { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding-bottom: 16px; - border-bottom: solid 1px rgba(204, 204, 204, 0.4); - - img { - height: 150px; - width: 150px; - border-radius: 50%; - margin: 16px; - background-color: rgba($color: #000000, $alpha: 0.2); - } - - .info { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - margin-bottom: 16px; - - small { - opacity: 0.8; - } - } - - .tags { - flex: 1; - display: flex; - flex-wrap: wrap; - padding: 0 0 8px 16px; - box-sizing: border-box; - - .tag { - display: flex; - align-items: center; - height: 32px; - margin: 8px 16px 0 8px; - text-transform: capitalize; - - &::after { - content: attr(data-value); - height: 1.4em; - display: inline-flex; - justify-content: center; - align-items: center; - padding: 0 6px; - font-size: 0.8em; - background-color: rgb(255, 255, 255); - background-color: var(--text-main-color); - color: rgb(153, 153, 255); - color: var(--primary-color); - border-radius: 4px; - margin-left: 4px; - } - } - } - - .button-container { - width: calc(100% - 32px); - max-width: 450px; - } - } -} diff --git a/src/pages/github/menu.hbs b/src/pages/github/menu.hbs deleted file mode 100644 index 3902579e5..000000000 --- a/src/pages/github/menu.hbs +++ /dev/null @@ -1,8 +0,0 @@ -
  • - {{reload}} - -
  • -
  • - {{logout}} - -
  • \ No newline at end of file diff --git a/src/pages/help.js b/src/pages/help.js deleted file mode 100644 index 1d761c253..000000000 --- a/src/pages/help.js +++ /dev/null @@ -1,55 +0,0 @@ -import tag from 'html-tag-js'; -import Page from '../components/page'; -import gen from '../components/gen'; -import helpers from '../lib/utils/helpers'; -import constants from '../lib/constants'; - -export default function help() { - const page = Page(strings.help.capitalize()); - const options = tag('div', { - className: 'main list', - }); - - actionStack.push({ - id: 'help', - action: page.hide, - }); - page.onhide = function () { - actionStack.remove('help'); - }; - - const settingsOptions = [ - { - key: 'feedback', - text: 'Feedback', - }, - { - key: 'help', - text: strings.help, - }, - { - key: 'faqs', - text: 'FAQs', - }, - ]; - - gen.listItems(options, settingsOptions, changeSetting); - - function changeSetting() { - if (this.key === 'feedback') { - const subject = 'feedback - Acode editor'; - const textBody = helpers.getFeedbackBody('
    %0A'); - const email = constants.FEEDBACK_EMAIL; - system.openInBrowser( - `mailto:${email}?subject=${subject}&body=${textBody}`, - ); - } else if (this.key === 'help') { - system.openInBrowser('https://t.me/foxdebug_acode'); - } else if (this.key === 'faqs') { - system.openInBrowser('https://acode.foxdebug.com/faqs'); - } - } - - page.append(options); - document.body.append(page); -} diff --git a/src/pages/info/info.js b/src/pages/info/info.js deleted file mode 100644 index 9a63b45fd..000000000 --- a/src/pages/info/info.js +++ /dev/null @@ -1,62 +0,0 @@ -import tag from 'html-tag-js'; -import Page from '../../components/page'; -import git from '../../lib/git'; -import dialogs from '../../components/dialogs'; - -import './info.scss'; - -export default function Info(repo, owner) { - const $page = Page(repo); - const gitHub = git.GitHub(); - const repository = gitHub.getRepo(owner, repo); - - dialogs.loader.create(repo, strings.loading + '...'); - repository - .getReadme('master', false) - .then((res) => { - if (res.status === 200) { - const data = res.data; - let text = data.content; - if (data.encoding === 'base64') { - text = atob(text); - } - - return gitHub.getMarkdown().render({ - text, - }); - } else { - return Promise.reject(res); - } - }) - .then((res) => { - if (res.status === 200) { - const text = res.data; - $page.append( - tag('div', { - id: 'info-page', - className: 'main', - innerHTML: text, - }), - ); - } else { - $page.hide(); - } - }) - .catch((err) => { - dialogs.alert(strings.error, err.message); - console.error(err); - $page.hide(); - }) - .finally(() => { - dialogs.loader.destroy(); - }); - - actionStack.push({ - id: 'info', - action: $page.hide, - }); - $page.onhide = function () { - actionStack.remove('info'); - }; - app.appendChild($page); -} diff --git a/src/pages/info/info.scss b/src/pages/info/info.scss deleted file mode 100644 index 796a6facd..000000000 --- a/src/pages/info/info.scss +++ /dev/null @@ -1,953 +0,0 @@ -#info-page { - padding: 10px; - box-sizing: border-box; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; - line-height: 1.5; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, - sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; - font-size: 16px; - line-height: 1.5; - word-wrap: break-word; - overflow: auto; - - span, - pre { - color: #24292e; - } - - @font-face { - font-family: octicons-link; - src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) - format('woff'); - } - - .octicon { - display: inline-block; - fill: currentColor; - vertical-align: text-bottom; - } - - .anchor { - float: left; - line-height: 1; - padding-right: 4px; - color: rgb(92, 120, 185); - } - - .anchor:focus { - outline: none; - } - - h1 .octicon-link, - h2 .octicon-link, - h3 .octicon-link, - h4 .octicon-link, - h5 .octicon-link, - h6 .octicon-link { - color: #2d445d; - vertical-align: middle; - text-decoration: none; - } - - .pl-c { - color: rgb(106, 115, 125); - } - - .pl-c1, - .pl-s .pl-v { - color: rgb(0, 92, 197); - } - - .pl-e, - .pl-en { - color: rgb(111, 66, 193); - } - - .pl-s .pl-s1, - .pl-smi { - color: rgb(36, 41, 46); - } - - .pl-ent { - color: rgb(34, 134, 58); - } - - .pl-k { - color: rgb(215, 58, 73); - } - - .pl-pds, - .pl-s, - .pl-s .pl-pse .pl-s1, - .pl-sr, - .pl-sr .pl-cce, - .pl-sr .pl-sra, - .pl-sr .pl-sre { - color: #032f62; - } - - .pl-smw, - .pl-v { - color: #e36209; - } - - .pl-bu { - color: #b31d28; - } - - .pl-ii { - background-color: #b31d28; - color: #fafbfc; - } - - .pl-c2 { - background-color: #d73a49; - color: #fafbfc; - } - - .pl-c2:before { - content: '^M'; - } - - .pl-sr .pl-cce { - color: #22863a; - font-weight: 700; - } - - .pl-ml { - color: #735c0f; - } - - .pl-mh, - .pl-mh .pl-en, - .pl-ms { - color: #005cc5; - font-weight: 700; - } - - .pl-mi { - color: #24292e; - font-style: italic; - } - - .pl-mb { - color: #24292e; - font-weight: 700; - } - - .pl-md { - background-color: #ffeef0; - color: #b31d28; - } - - .pl-mi1 { - background-color: #f0fff4; - color: #22863a; - } - - .pl-mc { - background-color: #ffebda; - color: #e36209; - } - - .pl-mi2 { - background-color: #005cc5; - color: #f6f8fa; - } - - .pl-mdr { - color: #6f42c1; - font-weight: 700; - } - - .pl-ba { - color: #586069; - } - - .pl-sg { - color: #959da5; - } - - .pl-corl { - color: #032f62; - text-decoration: underline; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - a { - background-color: transparent; - } - - a:active, - a:hover { - outline-width: 0; - } - - strong { - font-weight: inherit; - font-weight: bolder; - } - - h1 { - font-size: 2em; - margin: 0.67em 0; - } - - img { - border-style: none; - } - - code, - kbd, - pre { - font-family: monospace, monospace; - font-size: 1em; - } - - hr { - box-sizing: content-box; - height: 0; - overflow: visible; - } - - input { - font: inherit; - margin: 0; - } - - input { - overflow: visible; - } - - [type='checkbox'] { - box-sizing: border-box; - padding: 0; - } - - * { - box-sizing: border-box; - } - - input { - font-family: inherit; - font-size: inherit; - line-height: inherit; - } - - a { - color: #0366d6; - text-decoration: none; - } - - a:hover { - text-decoration: underline; - } - - strong { - font-weight: 600; - } - - hr { - background: transparent; - border: 0; - border-bottom: 1px solid #dfe2e5; - height: 0; - margin: 15px 0; - overflow: hidden; - } - - hr:before { - content: ''; - display: table; - } - - hr:after { - clear: both; - content: ''; - display: table; - } - - table { - border-collapse: collapse; - border-spacing: 0; - } - - td, - th { - padding: 0; - } - - details summary { - cursor: pointer; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - margin-bottom: 0; - margin-top: 0; - } - - h1 { - font-size: 32px; - } - - h1, - h2 { - font-weight: 600; - } - - h2 { - font-size: 24px; - } - - h3 { - font-size: 20px; - } - - h3, - h4 { - font-weight: 600; - } - - h4 { - font-size: 16px; - } - - h5 { - font-size: 14px; - } - - h5, - h6 { - font-weight: 600; - } - - h6 { - font-size: 12px; - } - - p { - margin-bottom: 10px; - margin-top: 0; - } - - blockquote { - margin: 0; - } - - ol, - ul { - margin-bottom: 0; - margin-top: 0; - padding-left: 0; - } - - ol ol, - ul ol { - list-style-type: lower-roman; - } - - ol ol ol, - ol ul ol, - ul ol ol, - ul ul ol { - list-style-type: lower-alpha; - } - - dd { - margin-left: 0; - } - - code, - pre { - font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, - monospace; - font-size: 12px; - } - - pre { - margin-bottom: 0; - margin-top: 0; - } - - input::-webkit-inner-spin-button, - input::-webkit-outer-spin-button { - -webkit-appearance: none; - appearance: none; - margin: 0; - } - - .border { - border: 1px solid #e1e4e8 !important; - } - - .border-0 { - border: 0 !important; - } - - .border-bottom { - border-bottom: 1px solid #e1e4e8 !important; - } - - .rounded-1 { - border-radius: 3px !important; - } - - .bg-white { - background-color: #fff !important; - } - - .bg-gray-light { - background-color: #fafbfc !important; - } - - .text-gray-light { - color: #6a737d !important; - } - - .mb-0 { - margin-bottom: 0 !important; - } - - .my-2 { - margin-bottom: 8px !important; - margin-top: 8px !important; - } - - .pl-0 { - padding-left: 0 !important; - } - - .py-0 { - padding-bottom: 0 !important; - padding-top: 0 !important; - } - - .pl-1 { - padding-left: 4px !important; - } - - .pl-2 { - padding-left: 8px !important; - } - - .py-2 { - padding-bottom: 8px !important; - padding-top: 8px !important; - } - - .pl-3, - .px-3 { - padding-left: 16px !important; - } - - .px-3 { - padding-right: 16px !important; - } - - .pl-4 { - padding-left: 24px !important; - } - - .pl-5 { - padding-left: 32px !important; - } - - .pl-6 { - padding-left: 40px !important; - } - - .f6 { - font-size: 12px !important; - } - - .lh-condensed { - line-height: 1.25 !important; - } - - .text-bold { - font-weight: 600 !important; - } - - &:before { - content: ''; - display: table; - } - - &:after { - clear: both; - content: ''; - display: table; - } - - > :first-child { - margin-top: 0 !important; - } - - > :last-child { - margin-bottom: 0 !important; - } - - a:not([href]) { - color: inherit; - text-decoration: none; - } - - blockquote, - dl, - ol, - p, - pre, - table, - ul { - margin-bottom: 16px; - margin-top: 0; - } - - hr { - background-color: #e1e4e8; - border: 0; - height: 0.25em; - margin: 24px 0; - padding: 0; - } - - blockquote { - border-left: 0.25em solid #dfe2e5; - color: #6a737d; - padding: 0 1em; - } - - blockquote > :first-child { - margin-top: 0; - } - - blockquote > :last-child { - margin-bottom: 0; - } - - kbd { - background-color: #fafbfc; - border: 1px solid #c6cbd1; - border-bottom-color: #959da5; - border-radius: 3px; - box-shadow: inset 0 -1px 0 #959da5; - color: #444d56; - display: inline-block; - font-size: 11px; - line-height: 10px; - padding: 3px 5px; - vertical-align: middle; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-weight: 600; - line-height: 1.25; - margin-bottom: 16px; - margin-top: 24px; - } - - h1 { - font-size: 2em; - } - - h1, - h2 { - border-bottom: 1px solid #eaecef; - padding-bottom: 0.3em; - } - - h2 { - font-size: 1.5em; - } - - h3 { - font-size: 1.25em; - } - - h4 { - font-size: 1em; - } - - h5 { - font-size: 0.875em; - } - - h6 { - color: #6a737d; - font-size: 0.85em; - } - - ol, - ul { - padding-left: 2em; - } - - ol ol, - ol ul, - ul ol, - ul ul { - margin-bottom: 0; - margin-top: 0; - } - - li { - word-wrap: break-all; - } - - li > p { - margin-top: 16px; - } - - li + li { - margin-top: 0.25em; - } - - dl { - padding: 0; - } - - dl dt { - font-size: 1em; - font-style: italic; - font-weight: 600; - margin-top: 16px; - padding: 0; - } - - dl dd { - margin-bottom: 16px; - padding: 0 16px; - } - - table { - display: block; - overflow: auto; - width: 100%; - } - - table th { - font-weight: 600; - } - - table td, - table th { - border: 1px solid #dfe2e5; - padding: 6px 13px; - } - - table tr { - background-color: #ffffff; - border-top: 1px solid #c6cbd1; - } - - table tr:nth-child(2n) { - background-color: #f6f8fa; - } - - img { - background-color: #ffffff; - box-sizing: content-box; - max-width: 100%; - } - - img[align='right'] { - padding-left: 20px; - } - - img[align='left'] { - padding-right: 20px; - } - - code { - background-color: rgba(27, 31, 35, 0.05); - border-radius: 3px; - font-size: 85%; - margin: 0; - padding: 0.2em 0.4em; - } - - pre { - word-wrap: normal; - } - - pre > code { - background: transparent; - border: 0; - font-size: 100%; - margin: 0; - padding: 0; - white-space: pre; - word-break: normal; - } - - .highlight { - margin-bottom: 16px; - } - - .highlight pre { - margin-bottom: 0; - word-break: normal; - } - - .highlight pre, - pre { - background-color: #f6f8fa; - border-radius: 3px; - font-size: 85%; - line-height: 1.45; - overflow: auto; - padding: 16px; - } - - pre code { - background-color: transparent; - border: 0; - display: inline; - line-height: inherit; - margin: 0; - max-width: auto; - overflow: visible; - padding: 0; - word-wrap: normal; - } - - .commit-tease-sha { - color: #444d56; - display: inline-block; - font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, - monospace; - font-size: 90%; - } - - .blob-wrapper { - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; - overflow-x: auto; - overflow-y: hidden; - } - - .blob-wrapper-embedded { - max-height: 240px; - overflow-y: auto; - } - - .blob-num { - -moz-user-select: none; - -ms-user-select: none; - -webkit-user-select: none; - color: rgba(27, 31, 35, 0.3); - cursor: pointer; - font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, - monospace; - font-size: 12px; - line-height: 20px; - min-width: 50px; - padding-left: 10px; - padding-right: 10px; - text-align: right; - user-select: none; - vertical-align: top; - white-space: nowrap; - width: 1%; - } - - .blob-num:hover { - color: rgba(27, 31, 35, 0.6); - } - - .blob-num:before { - content: attr(data-line-number); - } - - .blob-code { - line-height: 20px; - padding-left: 10px; - padding-right: 10px; - position: relative; - vertical-align: top; - } - - .blob-code-inner { - color: #24292e; - font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, - monospace; - font-size: 12px; - overflow: visible; - white-space: pre; - word-wrap: normal; - } - - .pl-token.active, - .pl-token:hover { - background: #ffea7f; - cursor: pointer; - } - - kbd { - background-color: #fafbfc; - border: 1px solid #d1d5da; - border-bottom-color: #c6cbd1; - border-radius: 3px; - box-shadow: inset 0 -1px 0 #c6cbd1; - color: #444d56; - display: inline-block; - font: 11px SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, - monospace; - line-height: 10px; - padding: 3px 5px; - vertical-align: middle; - } - - :checked + .radio-label { - border-color: #0366d6; - position: relative; - z-index: 1; - } - - .tab-size[data-tab-size='1'] { - -moz-tab-size: 1; - tab-size: 1; - } - - .tab-size[data-tab-size='2'] { - -moz-tab-size: 2; - tab-size: 2; - } - - .tab-size[data-tab-size='3'] { - -moz-tab-size: 3; - tab-size: 3; - } - - .tab-size[data-tab-size='4'] { - -moz-tab-size: 4; - tab-size: 4; - } - - .tab-size[data-tab-size='5'] { - -moz-tab-size: 5; - tab-size: 5; - } - - .tab-size[data-tab-size='6'] { - -moz-tab-size: 6; - tab-size: 6; - } - - .tab-size[data-tab-size='7'] { - -moz-tab-size: 7; - tab-size: 7; - } - - .tab-size[data-tab-size='8'] { - -moz-tab-size: 8; - tab-size: 8; - } - - .tab-size[data-tab-size='9'] { - -moz-tab-size: 9; - tab-size: 9; - } - - .tab-size[data-tab-size='10'] { - -moz-tab-size: 10; - tab-size: 10; - } - - .tab-size[data-tab-size='11'] { - -moz-tab-size: 11; - tab-size: 11; - } - - .tab-size[data-tab-size='12'] { - -moz-tab-size: 12; - tab-size: 12; - } - - .task-list-item { - list-style-type: none; - } - - .task-list-item + .task-list-item { - margin-top: 3px; - } - - .task-list-item input { - margin: 0 0.2em 0.25em -1.6em; - vertical-align: middle; - } - - hr { - border-bottom-color: #eeeeee; - } - - .pl-0 { - padding-left: 0 !important; - } - - .pl-1 { - padding-left: 4px !important; - } - - .pl-2 { - padding-left: 8px !important; - } - - .pl-3 { - padding-left: 16px !important; - } - - .pl-4 { - padding-left: 24px !important; - } - - .pl-5 { - padding-left: 32px !important; - } - - .pl-6 { - padding-left: 40px !important; - } - - .pl-7 { - padding-left: 48px !important; - } - - .pl-8 { - padding-left: 64px !important; - } - - .pl-9 { - padding-left: 80px !important; - } - - .pl-10 { - padding-left: 96px !important; - } - - .pl-11 { - padding-left: 112px !important; - } - - .pl-12 { - padding-left: 128px !important; - } -} diff --git a/src/pages/login/login.hbs b/src/pages/login/login.hbs deleted file mode 100644 index cb91d1c44..000000000 --- a/src/pages/login/login.hbs +++ /dev/null @@ -1,10 +0,0 @@ -
    -
    - - - -
    - -
    -
    -
    \ No newline at end of file diff --git a/src/pages/login/login.include.js b/src/pages/login/login.include.js deleted file mode 100644 index c78171b16..000000000 --- a/src/pages/login/login.include.js +++ /dev/null @@ -1,61 +0,0 @@ -import './login.scss'; -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import Page from '../../components/page'; -import _template from './login.hbs'; -import helpers from '../../lib/utils/helpers'; -import gitHub from '../github/gitHub'; -import constants from '../../lib/constants'; -import Url from '../../lib/utils/Url'; -import fsOperation from '../../lib/fileSystem/fsOperation'; - -export default async function GithubLoginInclude() { - const $page = Page(strings['github login']); - const $content = tag.parse(mustache.render(_template, strings)); - const $form = $content.get('.form'); - const $input = $content.get('input'); - const $token = $content.get('#token'); - const $errorMsg = $content.get('#error-msg'); - const $info = tag('a', { - className: 'icon help', - href: constants.GITHUB_TOKEN, - }); - const fs = fsOperation(Url.join(DATA_STORAGE, '.github')); - if (await fs.exists()) { - fs.deleteDir(); - } - - $page.get('header').append($info); - $page.append($content); - - $input.onclick = () => ($errorMsg.textContent = ''); - $form.onsubmit = storeCredentials; - - actionStack.push({ - id: 'github login', - action: $page.hide, - }); - - $page.onhide = function () { - actionStack.remove('github login'); - }; - - Object.defineProperty($page, 'setMessage', { - value(msg) { - $errorMsg.textContent = msg; - }, - }); - - app.appendChild($page); - - function storeCredentials(e) { - e.preventDefault(); - let token = $token.value; - const credentials = helpers.credentials; - - if (token) localStorage.setItem('token', credentials.encrypt(token)); - else return ($errorMsg.textContent = 'Please enter GitHub token!'); - - gitHub($page); - } -} diff --git a/src/pages/login/login.js b/src/pages/login/login.js deleted file mode 100644 index 5326ee09b..000000000 --- a/src/pages/login/login.js +++ /dev/null @@ -1,10 +0,0 @@ -function GithubLogin() { - import(/* webpackChunkName: "githublogin" */ './login.include').then( - (res) => { - const GithubLogin = res.default; - GithubLogin(); - }, - ); -} - -export default GithubLogin; diff --git a/src/pages/login/login.scss b/src/pages/login/login.scss deleted file mode 100644 index 5aa7f6992..000000000 --- a/src/pages/login/login.scss +++ /dev/null @@ -1,20 +0,0 @@ -#github-login { - .form { - display: flex; - flex-direction: column; - padding: 10px; - box-sizing: border-box; - - input { - margin-bottom: 15px; - } - - #error-msg:not(:empty) { - height: 20px; - font-size: 1em; - color: rgb(255, 69, 0); - text-align: center; - margin: 15px auto; - } - } -} diff --git a/src/pages/modes/list.hbs b/src/pages/modes/list.hbs deleted file mode 100644 index 7faa39554..000000000 --- a/src/pages/modes/list.hbs +++ /dev/null @@ -1,10 +0,0 @@ -
      {{#modes}} - {{#.}} -
    • - -
      - {{name}} -
      -
    • - {{/.}} - {{/modes}}
    \ No newline at end of file diff --git a/src/pages/modes/modes.hbs b/src/pages/modes/modes.hbs deleted file mode 100644 index 01a57f8b5..000000000 --- a/src/pages/modes/modes.hbs +++ /dev/null @@ -1 +0,0 @@ -
    \ No newline at end of file diff --git a/src/pages/modes/modes.js b/src/pages/modes/modes.js deleted file mode 100644 index e85c98eed..000000000 --- a/src/pages/modes/modes.js +++ /dev/null @@ -1,81 +0,0 @@ -//#region Imports -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import Page from '../../components/page'; - -import _template from './modes.hbs'; -import _list from './list.hbs'; -import './modes.scss'; -import searchBar from '../../components/searchbar'; -//#endregion - -function Modes() { - const actionStack = window.actionStack; - return new Promise((resolve, reject) => { - //#region Declaration - const $search = tag('i', { - className: 'icon search', - attr: { - action: 'search', - }, - }); - const $page = Page(strings['syntax highlighting']); - const $content = tag.parse(_template); - const modes = modelist.modes; - const $list = tag.parse( - mustache.render(_list, { - modes, - }), - ); - //#endregion - - $page.addEventListener('click', handleClick); - $page.append($content); - $page.querySelector('header').append($search); - document.body.append($page); - - setTimeout(() => { - $content.append($list); - }, 300); - - actionStack.push({ - id: 'modes', - action: function () { - $page.hide(); - }, - }); - - $search.onclick = function () { - const $list = $content.get('#list'); - if ($list) searchBar($list); - }; - - $page.onhide = function () { - actionStack.remove('modes'); - $content.removeEventListener('click', handleClick); - }; - - /** - * - * @param {MouseEvent} e - */ - function handleClick(e) { - /** - * @type {HTMLElement} - */ - const $el = e.target; - let action = $el.getAttribute('action'); - if (!action) return; - - if (action === 'search') { - searchBar($list); - } else if (action === 'select') { - const mode = $el.getAttribute('mode'); - resolve(mode); - $page.hide(); - } - } - }); -} - -export default Modes; diff --git a/src/pages/modes/modes.scss b/src/pages/modes/modes.scss deleted file mode 100644 index 29ff026ad..000000000 --- a/src/pages/modes/modes.scss +++ /dev/null @@ -1,6 +0,0 @@ -#mode-selector { - #mode-list { - height: 100%; - overflow-y: auto; - } -} diff --git a/src/pages/plugin/index.js b/src/pages/plugin/index.js new file mode 100644 index 000000000..059afb03e --- /dev/null +++ b/src/pages/plugin/index.js @@ -0,0 +1,8 @@ +function plugin({ id, installed, install }, onInstall, onUninstall) { + import(/* webpackChunkName: "plugins" */ "./plugin").then((res) => { + const Plugin = res.default; + Plugin(id, installed, onInstall, onUninstall, install); + }); +} + +export default plugin; diff --git a/src/pages/plugin/plugin.js b/src/pages/plugin/plugin.js new file mode 100644 index 000000000..f4fb544f5 --- /dev/null +++ b/src/pages/plugin/plugin.js @@ -0,0 +1,500 @@ +import "./plugin.scss"; +import fsOperation from "fileSystem"; +import ajax from "@deadlyjack/ajax"; +import Page from "components/page"; +import alert from "dialogs/alert"; +import loader from "dialogs/loader"; +import purchaseListener from "handlers/purchase"; +import actionStack from "lib/actionStack"; +import constants from "lib/constants"; +import installPlugin from "lib/installPlugin"; +import InstallState from "lib/installState"; +import settings from "lib/settings"; +import markdownIt from "markdown-it"; +import anchor from "markdown-it-anchor"; +import markdownItFootnote from "markdown-it-footnote"; +import MarkdownItGitHubAlerts from "markdown-it-github-alerts"; +import markdownItTaskLists from "markdown-it-task-lists"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; +import view from "./plugin.view.js"; + +let $lastPluginPage; + +/** + * Plugin page + * @param {string} id + * @param {boolean} installed + * @param {() => void} [onInstall] + * @param {() => void} [onUninstall] + * @param {boolean} [installOnRender] + */ +export default async function PluginInclude( + id, + installed, + onInstall, + onUninstall, + installOnRender, +) { + if ($lastPluginPage) { + $lastPluginPage.hide(); + } + + installed = typeof installed !== "boolean" ? installed === "true" : installed; + const $page = Page(strings["plugin"]); + let plugin = {}; + let currentVersion = ""; + let purchased = false; + let cancelled = false; + let update = false; + let isPaid = false; + let price; + let product; + let purchaseToken; + let $settingsIcon; + let minVersionCode = -1; + + actionStack.push({ + id: "plugin", + action: $page.hide, + }); + + $page.onhide = function () { + helpers.hideAd(); + actionStack.remove("plugin"); + loader.removeTitleLoader(); + cancelled = true; + $lastPluginPage = null; + }; + + $lastPluginPage = $page; + app.append($page); + helpers.showAd(); + + try { + if (installed) { + const manifest = Url.join(PLUGIN_DIR, id, "plugin.json"); + const installedPlugin = await fsOperation(manifest) + .readFile("json") + .catch((err) => { + alert(`Failed to load plugin metadata: ${manifest}`); + console.error(err); + }); + const { author } = installedPlugin; + const readme = Url.join( + PLUGIN_DIR, + id, + installedPlugin.readme || "readme.md", + ); + const description = await fsOperation(readme) + .readFile("utf8") + .catch((err) => { + alert(`Failed to load plugin readme: ${readme}`); + console.error(err); + }); + let changelogs = ""; + if (installedPlugin.changelogs) { + const changelogPath = Url.join( + PLUGIN_DIR, + id, + installedPlugin.changelogs, + ); + const changelogExists = await fsOperation(changelogPath).exists(); + if (changelogExists) { + changelogs = await fsOperation(changelogPath).readFile("utf8"); + } + } + + const iconUrl = await helpers.toInternalUri( + Url.join(PLUGIN_DIR, id, installedPlugin.icon), + ); + const iconData = await fsOperation(iconUrl).readFile(); + const icon = URL.createObjectURL( + new Blob([iconData], { type: "image/png" }), + ); + plugin = { + id, + icon, + name: installedPlugin.name, + version: installedPlugin.version, + author: author.name, + author_github: author.github, + source: installedPlugin.source, + license: installedPlugin.license, + keywords: installedPlugin.keywords, + contributors: installedPlugin.contributors, + repository: installedPlugin.repository, + description, + changelogs, + }; + + isPaid = installedPlugin.price > 0; + $page.settitle(plugin.name); + render(); + } + + await (async () => { + try { + loader.showTitleLoader(); + if ((await helpers.checkAPIStatus()) && isValidSource(plugin.source)) { + const remotePlugin = await fsOperation( + constants.API_BASE, + `plugin/${id}`, + ) + .readFile("json") + .catch(() => null); + + if (cancelled || !remotePlugin) return; + + if (installed && remotePlugin?.version !== plugin.version) { + currentVersion = plugin.version; + update = true; + } + + if (remotePlugin.min_version_code) { + minVersionCode = remotePlugin.min_version_code; + } + + plugin = Object.assign({}, remotePlugin); + + if (!Number.parseFloat(remotePlugin.price)) return; + + isPaid = remotePlugin.price > 0; + try { + [product] = await helpers.promisify(iap.getProducts, [ + remotePlugin.sku, + ]); + if (product) { + const purchase = await getPurchase(product.productId); + purchased = !!purchase; + price = product.price; + purchaseToken = purchase?.purchaseToken; + } + } catch (error) { + helpers.error(error); + } + } + } catch (error) { + console.error(error); + } finally { + loader.removeTitleLoader(); + } + })(); + + $page.settitle(plugin.name); + render(); + + if (installOnRender && !installed) { + const $button = $page.get('[data-type="install"], [data-type="buy"]'); + $button?.click(); + } + } catch (err) { + console.error(err); + helpers.error(err); + } finally { + loader.removeTitleLoader(); + } + + async function install() { + try { + await Promise.all([ + loadAd(this), + installPlugin(plugin.source || id, plugin.name, purchaseToken), + ]); + if (onInstall) onInstall(plugin); + installed = true; + update = false; + if (!plugin.price && IS_FREE_VERSION && (await window.iad?.isLoaded())) { + window.iad.show(); + } + render(); + } catch (err) { + window.log("error", err); + helpers.error(err); + } + } + + async function uninstall() { + try { + const pluginDir = Url.join(PLUGIN_DIR, plugin.id); + const state = await InstallState.new(plugin.id); + await Promise.all([ + loadAd(this), + fsOperation(pluginDir).delete(), + state.delete(state.storeUrl), + ]); + acode.unmountPlugin(plugin.id); + if (onUninstall) onUninstall(plugin.id); + installed = false; + update = false; + if (!plugin.price && IS_FREE_VERSION && (await window.iad?.isLoaded())) { + window.iad.show(); + } + render(); + } catch (err) { + window.log("error", err); + helpers.error(err); + } + } + + async function buy(e) { + const $button = e.target; + const oldText = $button.textContent; + + try { + if (!product) throw new Error("Product not found"); + const apiStatus = await helpers.checkAPIStatus(); + + if (!apiStatus) { + alert(strings.error, strings.api_error); + return; + } + + iap.setPurchaseUpdatedListener(...purchaseListener(onpurchase, onerror)); + $button.textContent = strings["loading..."]; + await helpers.promisify(iap.purchase, product.productId); + + async function onpurchase(e) { + const purchase = await getPurchase(product.productId); + await ajax.post(Url.join(constants.API_BASE, "plugin/order"), { + data: { + id: plugin.id, + token: purchase?.purchaseToken, + package: BuildInfo.packageName, + }, + }); + purchaseToken = purchase?.purchaseToken; + purchased = !!purchase; + $button.textContent = oldText; + install(); + } + + async function onerror(error) { + helpers.error(error); + $button.textContent = oldText; + } + } catch (error) { + window.log("error", "Failed to buy:"); + window.log("error", error); + helpers.error(error); + $button.textContent = oldText; + } + } + + async function refund(e) { + const $button = e.target; + const oldText = $button.textContent; + try { + if (!product) throw new Error("Product not found"); + $button.textContent = strings["loading..."]; + const { refer, refunded, error } = await ajax.post( + Url.join(constants.API_BASE, "plugin/refund"), + { + data: { + id: plugin.id, + package: BuildInfo.packageName, + token: purchaseToken, + }, + }, + ); + if (refer) { + system.openInBrowser(refer); + return; + } + + if (refunded) { + toast(strings.success); + if (installed) uninstall(); + else render(); + return; + } + + toast(error || strings.error); + } catch (error) { + window.log("error", error); + helpers.error(error); + } finally { + $button.textContent = oldText; + } + } + + async function render() { + const pluginSettings = settings.uiSettings[`plugin-${plugin.id}`]; + $page.body = view({ + ...plugin, + body: markdownIt({ + html: true, + xhtmlOut: true, + }) + .use(MarkdownItGitHubAlerts) + .use(anchor, { + slugify: (s) => + s + .trim() + .toLowerCase() + .replace(/[^a-z0-9]+/g, "-"), + }) + .use(markdownItTaskLists) + .use(markdownItFootnote) + .render(plugin.description), + changelogs: plugin.changelogs + ? markdownIt({ html: true, xhtmlOut: true }) + .use(MarkdownItGitHubAlerts) + .use(anchor, { + slugify: (s) => + s + .trim() + .toLowerCase() + .replace(/[^a-z0-9]+/g, "-"), + }) + .use(markdownItTaskLists) + .use(markdownItFootnote) + .render(plugin.changelogs) + : null, + purchased, + installed, + update, + isPaid, + price, + buy, + refund, + install, + uninstall, + currentVersion, + minVersionCode, + }); + + // Handle anchor links + $page.body.querySelectorAll("a[href^='#']").forEach((link) => { + const originalHref = link.getAttribute("href"); + link.setAttribute("data-href", originalHref); + link.style.cursor = "pointer"; + // Remove default click behavior + link.removeAttribute("href"); + + // Add custom click handler + link.addEventListener( + "click", + (e) => { + e.preventDefault(); + e.stopPropagation(); + + const hash = link.getAttribute("data-href") || link.textContent; + const targetId = hash.startsWith("#") ? hash.slice(1) : hash; + + // Look for either the anchor link or a heading with matching id + const targetElement = + $page.body.querySelector(`[name="${targetId}"]`) || + $page.body.querySelector(`#${targetId}`); + + if (targetElement) { + const headerOffset = + document.querySelector("header")?.offsetHeight || 0; + const elementPosition = targetElement.getBoundingClientRect().top; + const offsetPosition = elementPosition - headerOffset; + + $page.body.scrollBy({ + top: offsetPosition, + behavior: "smooth", + }); + } + + return false; + }, + { capture: true }, + ); + }); + + // add copy button to code blocks + const codeBlocks = $page.body.querySelectorAll("pre"); + codeBlocks.forEach((pre) => { + pre.style.position = "relative"; + const copyButton = document.createElement("button"); + copyButton.className = "copy-button"; + copyButton.textContent = "Copy"; + + const codeElement = pre.querySelector("code"); + if (codeElement) { + const langMatch = codeElement.className.match( + /language-(\w+)|(javascript)/, + ); + if (langMatch) { + const langMap = { + bash: "sh", + shell: "sh", + }; + const lang = langMatch[1] || langMatch[2]; + const mappedLang = langMap[lang] || lang; + const highlight = ace.require("ace/ext/static_highlight"); + highlight(codeElement, { + mode: `ace/mode/${mappedLang}`, + theme: settings.value.editorTheme.startsWith("ace/theme/") + ? settings.value.editorTheme + : "ace/theme/" + settings.value.editorTheme, + }); + } + } + + copyButton.addEventListener("click", async () => { + const code = pre.querySelector("code")?.textContent || pre.textContent; + try { + cordova.plugins.clipboard.copy(code); + copyButton.textContent = "Copied!"; + setTimeout(() => { + copyButton.textContent = "Copy"; + }, 2000); + } catch (err) { + copyButton.textContent = "Failed to copy"; + setTimeout(() => { + copyButton.textContent = "Copy"; + }, 2000); + } + }); + + pre.appendChild(copyButton); + }); + + if ($settingsIcon) { + $settingsIcon.remove(); + $settingsIcon = null; + } + + if (pluginSettings) { + pluginSettings.setTitle(plugin.name); + $settingsIcon = ( + pluginSettings.show()} + > + ); + if (!$page.header.contains($settingsIcon)) { + $page.header.append($settingsIcon); + } + } + } + + async function loadAd(el) { + if (!IS_FREE_VERSION) return; + try { + if (!(await window.iad?.isLoaded())) { + const oldText = el.textContent; + el.textContent = strings["loading..."]; + await window.iad.load(); + el.textContent = oldText; + } + } catch (error) {} + } + + async function getPurchase(sku) { + const purchases = await helpers.promisify(iap.getPurchases); + const purchase = purchases.find((p) => p.productIds.includes(sku)); + return purchase; + } +} + +function isValidSource(source) { + return source + ? source.startsWith(Url.join(constants.API_BASE, "plugin")) + : true; +} diff --git a/src/pages/plugin/plugin.scss b/src/pages/plugin/plugin.scss new file mode 100644 index 000000000..cc2284d0e --- /dev/null +++ b/src/pages/plugin/plugin.scss @@ -0,0 +1,500 @@ +@use "../../styles/mixins.scss"; + +#plugin { + overflow: auto; + max-width: 800px; + padding: 20px; + margin: 0 auto; + + .plugin-header { + display: grid; + grid-template-columns: auto 1fr auto; + gap: 20px; + align-items: start; + margin-bottom: 24px; + + .plugin-icon { + width: 80px; + height: 80px; + border-radius: 16px; + background-position: center; + background-repeat: no-repeat; + background-size: contain; + } + + .plugin-info { + .title-wrapper { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 16px; + margin-bottom: 8px; + + .plugin-name { + font-size: 24px; + margin-bottom: 0; + } + + .source-indicator { + display: flex; + align-items: center; + gap: 6px; + background: rgba(0, 0, 0, 0.3); + backdrop-filter: blur(10px); + border-radius: 20px; + padding: 6px 10px; + font-size: 11px; + color: var(--primary-text-color); + cursor: pointer; + transition: all 0.3s ease; + border: 1px solid rgba(255, 255, 255, 0.1); + text-decoration: none; + + &:hover { + background-color: rgba(0, 0, 0, 0.5); + transform: translateY(-1px); + } + + .icon { + color: var(--primary-text-color); + font-size: 14px; + } + } + } + + .plugin-meta { + display: flex; + gap: 16px; + flex-wrap: wrap; + color: color-mix(in srgb, var(--primary-text-color) 60%, transparent); + font-size: 14px; + margin-bottom: 12px; + + .author-name { + display: inline-flex; + align-items: center; + gap: 4px; + + a { + text-decoration: none; + color: inherit; + } + } + + .verified-tick { + color: #3b82f6; + font-size: 16px; + } + + .version-updated { + opacity: 0.6; + font-size: 0.8em; + margin-left: 4px; + } + } + + .metrics-row { + display: flex; + flex-wrap: wrap; + gap: 16px; + color: color-mix(in srgb, var(--primary-text-color) 60%, transparent); + font-size: 14px; + + .metric { + display: flex; + align-items: center; + gap: 4px; + + .metric-value { + color: var(--primary-text-color); + font-weight: 500; + } + + .rating-value { + padding: 2px 8px; + border-radius: 12px; + font-weight: 600; + } + + .rating-high { + background: var(--link-text-color); + color: #0a3600; + } + + .rating-medium { + background: #f0a500; + color: #3d2800; + } + + .rating-low { + background: var(--error-text-color); + color: #fff; + } + } + } + + .keywords { + display: flex; + gap: 6px; + flex-wrap: wrap; + margin-top: 16px; + position: relative; + + .keyword { + background: color-mix(in srgb, + var(--link-text-color) 10%, + transparent); + color: var(--link-text-color); + padding: 6px 10px; + border-radius: 12px; + font-size: 13px; + transition: all 0.2s; + border: 1px solid color-mix(in srgb, var(--link-text-color) 25%, transparent); + } + } + } + + .action-buttons { + display: flex; + gap: 8px; + + .error { + display: flex; + color: rgb(255, 185, 92); + color: var(--error-text-color); + align-items: center; + + a { + color: inherit; + text-decoration: none; + } + } + + .btn { + padding: 8px 16px; + border-radius: 6px; + border: none; + font-size: 14px; + font-weight: 500; + cursor: pointer; + transition: all 0.2s; + display: inline-flex; + align-items: center; + gap: 6px; + + &:hover { + transform: translateY(-1px); + } + } + + .btn-install { + background: var(--button-background-color); + color: white; + } + + .btn-update { + background: var(--button-background-color); + color: white; + } + + .btn-uninstall { + background-color: var(--danger-color) !important; + color: white; + } + + .btn-secondary { + background: var(--primary-color); + color: var(--primary-text-color); + box-shadow: 0 0 10px var(--box-shadow-color); + } + } + + .more-info-small { + text-align: center; + font-style: italic; + font-size: 0.8rem; + opacity: 0.8; + } + } + + #plugin-tab { + .options { + display: flex; + gap: 0; + margin: 20px -20px; + padding: 0 20px; + border-bottom: 1px solid var(--border-color); + + .tab { + color: color-mix(in srgb, var(--primary-text-color) 60%, transparent); + } + + .tab.active { + color: var(--primary-text-color); + } + } + + .tab-content { + padding: 0 0 24px; + + #overview { + [class*="language-"] { + word-wrap: normal; + white-space: pre; + font-size: 0.8rem; + border-radius: 4px; + padding: 1em; + margin: 5px 0; + background: var(--primary-color); + color: var(--primary-text-color); + /* border-left: solid 5px var(--active-color); */ + overflow: auto; + width: calc(100% - 10px); + display: block; + user-select: text; + + div { + background: var(--primary-color); + } + } + } + } + + .content-section { + display: none; + } + + .content-section.active { + display: block; + } + + .content-section.md { + overflow-x: hidden; + overflow-wrap: break-word; + + img { + max-width: 100%; + height: auto; + } + + pre { + overflow-x: auto; + max-width: 100%; + } + + * { + max-width: 100%; + box-sizing: border-box; + } + } + + .contributor { + display: flex; + align-items: center; + gap: 12px; + padding: 12px 0; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); + text-decoration: none; + + &:last-child { + border-bottom: none; + } + + img { + width: 32px; + height: 32px; + border-radius: 50%; + } + + .contributor-info { + flex-grow: 1; + + .contributor-name { + font-weight: 500; + margin-bottom: 2px; + color: var(--primary-text-color); + } + + .contributor-role { + font-size: 13px; + color: color-mix(in srgb, var(--primary-text-color) 60%, transparent); + } + } + } + + #changelog { + .no-changelog { + text-align: center; + padding: 2rem; + color: color-mix(in srgb, var(--primary-text-color) 60%, transparent); + + i { + font-size: 3rem; + margin-bottom: 1rem; + opacity: 0.7; + display: block; + } + + p { + margin: 0.5rem 0; + } + } + } + } + + @media (max-width: 768px) { + .plugin-header { + grid-template-columns: 1fr; + justify-items: center; + text-align: center; + } + + .source-indicator { + position: absolute; + top: 20px; + right: 20px; + } + + .title-wrapper, + .plugin-meta, + .metrics-row, + .keywords { + justify-content: center; + } + + .action-buttons { + flex-direction: column; + width: 100%; + } + + .btn { + width: 100%; + justify-content: center; + } + + .tabs { + overflow-x: auto; + margin: 24px -24px; + padding: 0 24px; + } + } +} + +.reviews-container { + position: fixed; + display: flex; + flex-direction: column; + width: 100vw; + height: 70vh; + top: auto; + bottom: 0; + background-color: rgb(255, 255, 255); + background-color: var(--secondary-color); + z-index: 999; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 20px var(--box-shadow-color); + border-radius: 40px 40px 0 0; + overflow: hidden; + animation: slide-up 0.3s ease-in-out; + + &.hide { + transition: all 0.3s ease-in-out !important; + transform: translateY(100%) !important; + } + + .reviews-header { + height: 40px; + display: flex; + align-items: center; + justify-content: center; + + &::after { + content: ""; + width: 40px; + height: 5px; + border-radius: 2.5px; + background-color: rgba(0, 0, 0, 0.2); + } + } + + .write-review { + padding: 0 10px; + display: flex; + align-content: center; + justify-content: center; + width: fit-content; + margin: auto; + + span { + height: fit-content; + margin: auto; + } + + .icon { + height: 30px; + margin-right: 10px; + } + } + + .reviews-body { + flex: 1; + overflow: auto; + + &.loading { + @include mixins.loader(30px); + } + + .review { + padding: 10px; + display: flex; + flex-direction: column; + border-bottom: solid 1px rgba(255, 255, 255, 0.1); + + .review-author { + display: flex; + height: 30px; + align-items: center; + justify-content: flex-start; + margin-bottom: 5px; + + .vote { + height: 40px; + width: 40px; + background-position: center; + background-repeat: no-repeat; + background-size: 20px; + } + + .user-profile { + height: 30px; + width: 30px; + border-radius: 50%; + background-position: center; + background-repeat: no-repeat; + background-size: cover; + margin-right: 10px; + font-weight: 400; + } + } + + .review-body { + display: flex; + align-items: center; + font-weight: 300; + overflow: auto; + } + + .author-reply { + &::before { + display: block; + content: attr(data-author); + font-weight: 400; + margin-bottom: 10px; + } + + padding: 10px; + background-color: rgba(0, 0, 0, 0.1); + } + } + } +} \ No newline at end of file diff --git a/src/pages/plugin/plugin.view.js b/src/pages/plugin/plugin.view.js new file mode 100644 index 000000000..6ed0b0886 --- /dev/null +++ b/src/pages/plugin/plugin.view.js @@ -0,0 +1,541 @@ +import fsOperation from "fileSystem"; +import TabView from "components/tabView"; +import toast from "components/toast"; +import alert from "dialogs/alert"; +import DOMPurify from "dompurify"; +import Ref from "html-tag-js/ref"; +import actionStack from "lib/actionStack"; +import constants from "lib/constants"; +import moment from "moment"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; + +export default (props) => { + const { + id, + name, + body, + icon, + author, + downloads, + license, + changelogs, + repository, + keywords: keywordsRaw, + contributors: contributorsRaw, + votes_up: votesUp, + votes_down: votesDown, + author_verified: authorVerified, + author_github: authorGithub, + comment_count: commentCount, + package_updated_at: packageUpdatedAt, + } = props; + + let rating = "unrated"; + + const keywords = + typeof keywordsRaw === "string" ? JSON.parse(keywordsRaw) : keywordsRaw; + const contributors = + typeof contributorsRaw === "string" + ? JSON.parse(contributorsRaw) + : contributorsRaw; + + if (votesUp || votesDown) { + rating = `${Math.round((votesUp / (votesUp + votesDown)) * 100)}%`; + } + + const formatUpdatedDate = (dateString) => { + if (!dateString) return null; + + try { + // Configure moment for shorter relative time format + moment.updateLocale("en", { + relativeTime: { + future: "in %s", + past: "%s ago", + s: "now", + ss: "now", + m: "1m", + mm: "%dm", + h: "1h", + hh: "%dh", + d: "1d", + dd: "%dd", + M: "1mo", + MM: "%dmo", + y: "1y", + yy: "%dy", + }, + }); + + const updateTime = moment.utc(dateString); + if (!updateTime.isValid()) return null; + + return updateTime.fromNow(); + } catch (error) { + console.warn("Error parsing date with moment:", dateString, error); + return null; + } + }; + + return ( +
    +
    +
    +
    +
    +

    {name}

    + {repository + ? + + {strings.open_source} + + : null} +
    +
    + + + + + + + + {author} + + {authorVerified + ? { + toast(strings["verified publisher"]); + }} + className="licons verified verified-tick" + > + : ""} + + + + {license || "Unknown"} + +
    + {votesUp !== undefined + ?
    +
    + + + {helpers.formatDownloadCount( + typeof downloads === "string" + ? Number.parseInt(downloads) + : downloads, + )} + + {strings.downloads} +
    +
    + + = 80 ? "rating-high" : rating.replace("%", "") >= 50 ? "rating-medium" : "rating-low"}`} + > + {rating} + +
    +
    + + {commentCount} + {strings.reviews} +
    +
    + : null} + {Array.isArray(keywords) && keywords.length + ?
    + {keywords.map((keyword) => ( + {keyword} + ))} +
    + : null} +
    +
    + +
    + +
    + +
    + + {strings.overview} + + + {strings.contributors} + + + {strings.changelog} + +
    +
    +
    +
    + {(() => { + let contributorsList = contributors?.length + ? [ + { name: author, role: "Developer", github: authorGithub }, + ...contributors, + ] + : [{ name: author, role: "Developer", github: authorGithub }]; + + return contributorsList.map(({ name, role, github }) => { + let dp = Url.join(constants.API_BASE, `../user.png`); + if (github) { + dp = `https://avatars.githubusercontent.com/${github}`; + } + return ( + + {name} +
    +
    {name}
    +
    {role}
    +
    +
    + ); + }); + })()} +
    + +
    + +

    + No changelog is available for this plugin yet. +

    +

    + Check back later for updates! +

    +
    + ` + } + >
    +
    + + + ); +}; + +function handleTabClick(e) { + const $target = e.target; + if (!$target.classList.contains("tab")) return; + + const tabs = document.querySelectorAll(".tab"); + const contents = document.querySelectorAll(".content-section"); + + tabs.forEach((tab) => tab.classList.remove("active")); + contents.forEach((content) => content.classList.remove("active")); + + $target.classList.add("active"); + const tabId = $target.dataset.tab; + document.getElementById(tabId).classList.add("active"); +} + +function Buttons({ + name, + isPaid, + installed, + update, + install, + uninstall, + purchased, + price, + buy, + minVersionCode, +}) { + if ( + typeof minVersionCode === "number" && + minVersionCode > BuildInfo.versionCode + ) { + return ( +
    + + + {strings["plugin min version"] + .replace("{name}", name) + .replace("{v-code}", minVersionCode)} + +
    + ); + } + + if (installed && update) { + return ( + <> + + + + ); + } + + if (installed) { + return ( + + ); + } + + if (isPaid && !purchased && price) { + return ( + + ); + } + + if (isPaid && !purchased && !price) { + return ( +
    + alert(strings.info, strings["no-product-info"])} + className="icon info" + > + {strings["product not available"]} +
    + ); + } + + return ( + + ); +} + +function Version({ + currentVersion, + version, + packageUpdatedAt, + formatUpdatedDate, +}) { + const updatedText = + formatUpdatedDate && packageUpdatedAt + ? formatUpdatedDate(packageUpdatedAt) + : null; + + if (!currentVersion) { + return ( + + v{version} + {updatedText && ( + ({updatedText}) + )} + + ); + } + + return ( + + v{currentVersion} → v{version} + {updatedText && ({updatedText})} + + ); +} + +async function showReviews(pluginId, author) { + const mask = Ref(); + const body = Ref(); + const container = Ref(); + + actionStack.push({ + id: "reviews", + action: closeReviews, + }); + + app.append( + , + ); + app.append( +
    +
    +
    + + + Review + +
    +
    +
    , + ); + + try { + const reviews = await fsOperation( + constants.API_BASE, + `/comments/${pluginId}`, + ).readFile("json"); + if (!reviews.length) { + body.style.textAlign = "center"; + body.textContent = "No reviews yet"; + return; + } + + reviews.forEach((review) => { + if (!review.comment) return; + review.author = author; + body.append(); + }); + } catch (error) { + body.textContent = error.message; + } finally { + body.classList.remove("loading"); + } + + function closeReviews() { + actionStack.remove("reviews"); + container.classList.add("hide"); + + setTimeout(() => { + mask.el.remove(); + container.el.remove(); + }, 300); + } + + /** + * @param {TouchEvent} e + */ + function ontouchstart(e) { + const { clientY } = e.touches[0]; + const { top } = container.el.getBoundingClientRect(); + const y = clientY - top; + let dy = 0; + + container.style.transition = "none"; + document.addEventListener("touchmove", ontouchmove); + document.addEventListener("touchend", ontouchend); + document.addEventListener("touchcancel", ontouchend); + + function ontouchmove(e) { + const { clientY } = e.touches[0]; + dy = clientY - top - y; + + if (dy < 0) dy = 0; + + container.style.transform = `translateY(${dy}px)`; + } + + function ontouchend() { + document.removeEventListener("touchmove", ontouchmove); + document.removeEventListener("touchend", ontouchend); + document.removeEventListener("touchcancel", ontouchcancel); + if (dy < 100) { + container.style.transition = "transform 0.3s ease-in-out"; + container.style.transform = "translateY(0)"; + return; + } + closeReviews(); + } + } +} + +function Review({ + name, + github, + vote, + comment, + author, + author_reply: authorReply, +}) { + let dp = Url.join(constants.API_BASE, `../user.png`); + let voteImage = Ref(); + let review = Ref(); + + if (github) { + dp = `https://avatars.githubusercontent.com/${github}`; + } + + if (vote === 1) { + voteImage.style.backgroundImage = `url(${Url.join(constants.API_BASE, `../thumbs-up.gif`)})`; + } else if (vote === -1) { + voteImage.style.backgroundImage = `url(${Url.join(constants.API_BASE, `../thumbs-down.gif`)})`; + } + + if (authorReply) { + setTimeout(() => { + review.append( +

    + {authorReply} +

    , + ); + }, 0); + } + + return ( +
    +
    + + {name} + +
    +

    {comment}

    +
    + ); +} + +function MoreInfo({ purchased, price, refund }) { + if (!purchased) return ""; + + return ( + + {strings.owned} • {price} •{" "} + + {strings.refund} + + + ); +} diff --git a/src/pages/plugins/index.js b/src/pages/plugins/index.js new file mode 100644 index 000000000..e208ae581 --- /dev/null +++ b/src/pages/plugins/index.js @@ -0,0 +1,10 @@ +function plugins(updates) { + import(/* webpackChunkName: "plugins" */ './plugins').then( + (res) => { + const Plugins = res.default; + Plugins(updates); + }, + ); +} + +export default plugins; diff --git a/src/pages/plugins/item.js b/src/pages/plugins/item.js new file mode 100644 index 000000000..099309c14 --- /dev/null +++ b/src/pages/plugins/item.js @@ -0,0 +1,124 @@ +import helpers from "utils/helpers"; +import pluginIcon from './plugin-icon.png'; + +/** + * Creates a plugin list item + * @param {object} param0 + * @param {string} [param0.id] + * @param {string} [param0.name] + * @param {string} [param0.icon] + * @param {string} [param0.version] + * @param {number} [param0.downloads] + * @param {boolean} [param0.installed] + * @param {boolean} [param0.enabled] + * @param {function} [param0.onToggleEnabled] + * @returns + */ +export default function Item({ + id, + name, + icon, + version, + license, + author, + price, + author_verified, + downloads, + installed, + enabled, + onToggleEnabled, + updates, +}) { + const authorName = (() => { + const displayName = + typeof author === "object" ? author.name : author || "Unknown"; + // Check if it's likely an email or too long + if (displayName.includes("@") || displayName.length > 20) { + return displayName.substring(0, 20) + "..."; + } + return displayName; + })(); + + return ( +
    +
    +
    + {name +
    +
    +
    +
    + + {name} + + v{version} +
    +
    +
    + + {authorName} + {author_verified ? ( + + ) : ( + "" + )} +
    + +
    + + {license || "Unknown"} +
    + {downloads && ( + <> + +
    + + {helpers.formatDownloadCount(downloads)} +
    + + )} +
    +
    + {price !== null && price !== undefined && price !== 0 ? ( + ₹{price} + ) : null} + {installed && !updates ? ( + { + e.stopPropagation(); + onToggleEnabled?.(id, enabled); + }} + > + + + + + ) : null} +
    +
    +
    + ); +} diff --git a/src/pages/plugins/plugin-icon.png b/src/pages/plugins/plugin-icon.png new file mode 100644 index 000000000..7b35bbe7f Binary files /dev/null and b/src/pages/plugins/plugin-icon.png differ diff --git a/src/pages/plugins/plugins.js b/src/pages/plugins/plugins.js new file mode 100644 index 000000000..a0f0bcbe9 --- /dev/null +++ b/src/pages/plugins/plugins.js @@ -0,0 +1,768 @@ +import "./plugins.scss"; + +import Item from "./item"; +import Url from "utils/Url"; +import Plugin from "pages/plugin"; +import Page from "components/page"; +import helpers from "utils/helpers"; +import fsOperation from "fileSystem"; +import constants from "lib/constants"; +import TabView from "components/tabView"; +import searchBar from "components/searchbar"; +import FileBrowser from "pages/fileBrowser"; +import installPlugin from "lib/installPlugin"; +import prompt from "dialogs/prompt"; +import actionStack from "lib/actionStack"; +import Contextmenu from "components/contextmenu"; +import settings from "lib/settings"; +import loadPlugin from "lib/loadPlugin"; + +/** + * + * @param {Array} updates + */ +export default function PluginsInclude(updates) { + const $page = Page(strings["plugins"]); + const $search = ; + const $add = ; + const $filter = ; + const List = () => ( +
    + ); + const $list = { + all: , + installed: , + owned: , + }; + const plugins = { + all: [], + installed: [], + owned: [], + }; + let $currList = $list.installed; + let currSection = "installed"; + let hideSearchBar = () => {}; + let currentPage = 1; + let isLoading = false; + let hasMore = true; + let isSearching = false; + let currentFilter = null; + const LIMIT = 50; + + Contextmenu({ + toggler: $add, + top: "8px", + right: "8px", + items: [ + [strings.remote, "remote"], + [strings.local, "local"], + ], + onselect(item) { + addSource(item); + }, + }); + + const verifiedLabel = strings["verified publisher"]; + const authorLabel = strings.author || strings.name; + const keywordsLabel = strings.keywords; + + const filterOptions = { + "orderBy:top_rated": { type: "orderBy", value: "top_rated", baseLabel: strings.top_rated }, + "orderBy:newest": { type: "orderBy", value: "newest", baseLabel: strings.newly_added }, + "orderBy:downloads": { type: "orderBy", value: "downloads", baseLabel: strings.most_downloaded }, + "attribute:verified": { type: "verified", value: true, baseLabel: verifiedLabel }, + "attribute:author": { type: "author", baseLabel: authorLabel }, + "attribute:keywords": { type: "keywords", baseLabel: keywordsLabel }, + }; + + async function applyFilter(filterState) { + if (!filterState) return; + + const normalizedFilter = { + ...filterState, + displayLabel: filterState.displayLabel || filterState.baseLabel, + nextPage: 1, + buffer: [], + hasMoreSource: true, + }; + + currentFilter = normalizedFilter; + currentPage = 1; + hasMore = true; + isLoading = false; + plugins.all = []; + + if (currSection !== "all") { + render("all"); + } else { + $list.all.replaceChildren(); + } + + const filterMessage = ( +
    + {strings["filtered by"]} {normalizedFilter.displayLabel} + +
    + ); + + $list.all.append(filterMessage); + $list.all.setAttribute("empty-msg", strings["loading..."]); + await getFilteredPlugins(currentFilter, true); + } + + function clearFilter() { + currentFilter = null; + currentPage = 1; + hasMore = true; + isLoading = false; + plugins.all = []; + $list.all.replaceChildren(); + $list.all.setAttribute("empty-msg", strings["loading..."]); + getAllPlugins(); + } + + Contextmenu({ + toggler: $filter, + top: "8px", + right: "16px", + items: [ + [strings.top_rated, "orderBy:top_rated"], + [strings.newly_added, "orderBy:newest"], + [strings.most_downloaded, "orderBy:downloads"], + [verifiedLabel, "attribute:verified"], + [authorLabel, "attribute:author"], + [keywordsLabel, "attribute:keywords"], + ], + async onselect(action) { + const option = filterOptions[action]; + if (!option) return; + + const filterState = { + type: option.type, + value: option.value, + baseLabel: option.baseLabel, + displayLabel: option.baseLabel, + }; + + if (option.type === "author") { + const authorName = (await prompt("Enter author name", "", "text"))?.trim(); + if (!authorName) return; + filterState.value = authorName.toLowerCase(); + filterState.originalValue = authorName; + filterState.displayLabel = `${option.baseLabel}: ${authorName}`; + } else if (option.type === "keywords") { + const rawKeywords = (await prompt("Enter keywords", "", "text"))?.trim(); + if (!rawKeywords) return; + const keywordList = rawKeywords + .split(",") + .map((item) => item.trim()) + .filter(Boolean); + if (!keywordList.length) return; + filterState.value = keywordList.map((item) => item.toLowerCase()); + filterState.originalValue = keywordList.join(", "); + filterState.displayLabel = `${option.baseLabel}: ${filterState.originalValue}`; + } + + await applyFilter(filterState); + }, + }); + + $page.body = ( + +
    + + {strings.installed} + + + {strings.all} + + + {strings.owned} + +
    + {$list.installed} +
    + ); + $page.header.append($search, $filter, $add); + + actionStack.push({ + id: "plugins", + action: $page.hide, + }); + + $page.onhide = function () { + helpers.hideAd(); + actionStack.remove("plugins"); + }; + + $page.onconnect = () => { + $currList.scrollTop = $currList._scroll || 0; + }; + + $page.onwilldisconnect = () => { + $currList._scroll = $currList.scrollTop; + }; + + $page.ondisconnect = () => hideSearchBar(); + + $page.onclick = handleClick; + + $list.all.addEventListener('scroll', async (e) => { + if (isLoading || !hasMore || isSearching) return; + + const { scrollTop, scrollHeight, clientHeight } = e.target; + if (scrollTop + clientHeight >= scrollHeight - 50) { + if (currentFilter) { + await getFilteredPlugins(currentFilter); + } else { + await getAllPlugins(); + } + } + }) + + app.append($page); + helpers.showAd(); + + if (updates) { + $page.get(".options").style.display = "none"; + $add.style.display = "none"; + $filter.style.display = "none"; + $page.settitle(strings.update); + getInstalledPlugins(updates).then(() => { + render("installed"); + }); + return; + } + + if (navigator.onLine) { + getAllPlugins(); + getOwned(); + } + + getInstalledPlugins().then(() => { + if (plugins.installed.length) { + return; + } + + render("all"); + }); + + function handleClick(event) { + const $target = event.target; + const { action } = $target.dataset; + if (action === "search") { + if (currSection === "all") { + isSearching = true; + searchBar( + $currList, + (hide) => { + hideSearchBar = hide; + isSearching = false; + }, + undefined, + searchRemotely, + ); + return; + } else { + isSearching = true; + searchBar($currList, (hide) => { + hideSearchBar = hide; + isSearching = false; + }); + return; + } + } + if (action === "open") { + Plugin($target.dataset, onInstall, onUninstall); + return; + } + } + + function render(section) { + if (currSection === section) return; + + if (!section) { + section = currSection; + } + + if (document.getElementById("search-bar")) { + hideSearchBar(); + } + + const $section = $list[section]; + $currList._scroll = $currList.scrollTop; + $currList.replaceWith($section); + $section.scrollTop = $section._scroll || 0; + $currList = $section; + currSection = section; + if (section === "all") { + currentPage = 1; + hasMore = true; + isLoading = false; + plugins.all = []; // Reset the all plugins array + $list.all.replaceChildren(); + if (!currentFilter) { + getAllPlugins(); + } + } + $page.get(".options .active").classList.remove("active"); + $page.get(`#${section}_plugins`).classList.add("active"); + } + + function renderAll() { + render("all"); + if (currentFilter) { + applyFilter(currentFilter); + } + } + + function renderInstalled() { + render("installed"); + } + + function renderOwned() { + render("owned"); + } + + async function searchRemotely(query) { + if (!query) return []; + try { + const response = await fetch( + `${constants.API_BASE}/plugins?name=${query}`, + ); + const plugins = await response.json(); + // Map the plugins to Item elements and return + return plugins.map((plugin) => ); + } catch (error) { + $list.all.setAttribute("empty-msg", strings["error"]); + window.log("error", "Failed to search remotely:"); + window.log("error", error); + return []; + } + } + + async function getFilteredPlugins(filterState, isInitial = false) { + if (!filterState) return; + if (isLoading || !hasMore) return; + + try { + isLoading = true; + $list.all.setAttribute("empty-msg", strings["loading..."]); + + const { items, hasMore: hasMoreResults } = await retrieveFilteredPlugins(filterState); + + if (currentFilter !== filterState) { + return; + } + + const installed = await fsOperation(PLUGIN_DIR).lsDir(); + const disabledMap = settings.value.pluginsDisabled || {}; + + installed.forEach(({ url }) => { + const plugin = items.find(({ id }) => id === Url.basename(url)); + if (plugin) { + plugin.installed = true; + plugin.enabled = disabledMap[plugin.id] !== true; + plugin.onToggleEnabled = onToggleEnabled; + plugin.localPlugin = getLocalRes(plugin.id, "plugin.json"); + } + }); + + if (isInitial) { + $list.all.querySelectorAll(".filter-empty").forEach((el) => el.remove()); + } + + plugins.all.push(...items); + + const fragment = document.createDocumentFragment(); + items.forEach((plugin) => { + fragment.append(); + }); + + if (fragment.childNodes.length) { + $list.all.append(fragment); + } else if (isInitial) { + $list.all.append( +
    {strings["no plugins found"] || "No plugins found"}
    , + ); + } + + hasMore = hasMoreResults; + if (!hasMore) { + $list.all.setAttribute("empty-msg", strings["no plugins found"]); + } + } catch (error) { + $list.all.setAttribute("empty-msg", strings["error"]); + console.error("Failed to filter plugins:", error); + hasMore = false; + } finally { + isLoading = false; + } + } + + async function retrieveFilteredPlugins(filterState) { + if (!filterState) return { items: [], hasMore: false }; + + if (filterState.type === "orderBy") { + const page = filterState.nextPage || 1; + try { + let response; + if (filterState.value === "top_rated") { + response = await fetch( + `${constants.API_BASE}/plugins?explore=random&page=${page}&limit=${LIMIT}`, + ); + } else { + response = await fetch( + `${constants.API_BASE}/plugin?orderBy=${filterState.value}&page=${page}&limit=${LIMIT}`, + ); + } + const items = await response.json(); + if (!Array.isArray(items)) { + return { items: [], hasMore: false }; + } + filterState.nextPage = page + 1; + const hasMoreResults = items.length === LIMIT; + return { items, hasMore: hasMoreResults }; + } catch (error) { + console.error("Failed to fetch ordered plugins:", error); + return { items: [], hasMore: false }; + } + } + + if (!Array.isArray(filterState.buffer)) { + filterState.buffer = []; + } + if (filterState.hasMoreSource === undefined) { + filterState.hasMoreSource = true; + } + if (!filterState.nextPage) { + filterState.nextPage = 1; + } + + const items = []; + + while (items.length < LIMIT) { + if (filterState.buffer.length) { + items.push(filterState.buffer.shift()); + continue; + } + + if (filterState.hasMoreSource === false) break; + + try { + const page = filterState.nextPage; + const response = await fetch( + `${constants.API_BASE}/plugins?page=${page}&limit=${LIMIT}`, + ); + const data = await response.json(); + filterState.nextPage = page + 1; + + if (!Array.isArray(data) || !data.length) { + filterState.hasMoreSource = false; + break; + } + + if (data.length < LIMIT) { + filterState.hasMoreSource = false; + } + + const matched = data.filter((plugin) => matchesFilter(plugin, filterState)); + filterState.buffer.push(...matched); + } catch (error) { + console.error("Failed to fetch filtered plugins:", error); + filterState.hasMoreSource = false; + break; + } + } + + while (items.length < LIMIT && filterState.buffer.length) { + items.push(filterState.buffer.shift()); + } + + const hasMoreResults = + (filterState.hasMoreSource !== false && filterState.nextPage) || + filterState.buffer.length > 0; + + return { items, hasMore: Boolean(hasMoreResults) }; + } + + function matchesFilter(plugin, filterState) { + if (!plugin) return false; + + switch (filterState.type) { + case "verified": + return Boolean(plugin.author_verified); + case "author": { + const authorName = normalizePluginAuthor(plugin); + if (!authorName) return false; + return authorName.toLowerCase().includes(filterState.value); + } + case "keywords": { + const pluginKeywords = normalizePluginKeywords(plugin) + .map((keyword) => keyword.toLowerCase()) + .filter(Boolean); + if (!pluginKeywords.length) return false; + return filterState.value.some((keyword) => + pluginKeywords.some((pluginKeyword) => pluginKeyword.includes(keyword)), + ); + } + default: + return true; + } + } + + function normalizePluginAuthor(plugin) { + const { author } = plugin || {}; + if (!author) return ""; + if (typeof author === "string") return author; + if (typeof author === "object") { + return author.name || author.username || author.github || ""; + } + return ""; + } + + function normalizePluginKeywords(plugin) { + const { keywords } = plugin || {}; + if (!keywords) return []; + if (Array.isArray(keywords)) return keywords; + if (typeof keywords === "string") { + try { + const parsed = JSON.parse(keywords); + if (Array.isArray(parsed)) return parsed; + } catch (error) { + return keywords + .split(",") + .map((item) => item.trim()) + .filter(Boolean); + } + } + return []; + } + + async function getAllPlugins() { + if (currentFilter) return; + if (isLoading || !hasMore) return; + + try { + isLoading = true; + + $list.all.setAttribute("empty-msg", strings["loading..."]); + + const response = await fetch(`${constants.API_BASE}/plugins?page=${currentPage}&limit=${LIMIT}`); + const newPlugins = await response.json(); + + if (newPlugins.length < LIMIT) { + hasMore = false; + } + + const installed = await fsOperation(PLUGIN_DIR).lsDir(); + const disabledMap = settings.value.pluginsDisabled || {}; + + installed.forEach(({ url }) => { + const plugin = newPlugins.find(({ id }) => id === Url.basename(url)); + if (plugin) { + plugin.installed = true; + plugin.enabled = disabledMap[plugin.id] !== true; + plugin.onToggleEnabled = onToggleEnabled; + plugin.localPlugin = getLocalRes(plugin.id, "plugin.json"); + } + }); + + // Add plugins to the all plugins array + plugins.all.push(...newPlugins); + + const fragment = document.createDocumentFragment(); + newPlugins.forEach((plugin) => { + fragment.append(); + }); + $list.all.append(fragment); + + currentPage++; + $list.all.setAttribute("empty-msg", strings["no plugins found"]); + } catch (error) { + window.log("error", error); + } finally { + isLoading = false; + } + } + + async function getInstalledPlugins(updates) { + $list.installed.setAttribute("empty-msg", strings["loading..."]); + plugins.installed = []; + const disabledMap = settings.value.pluginsDisabled || {}; + const installed = await fsOperation(PLUGIN_DIR).lsDir(); + await Promise.all( + installed.map(async (item) => { + const id = Url.basename(item.url); + if (!((updates && updates.includes(id)) || !updates)) return; + const url = Url.join(item.url, "plugin.json"); + const plugin = await fsOperation(url).readFile("json"); + const iconUrl = getLocalRes(id, plugin.icon); + plugin.icon = await helpers.toInternalUri(iconUrl); + plugin.installed = true; + plugin.enabled = disabledMap[id] !== true; // default to true + plugin.onToggleEnabled = onToggleEnabled; + plugins.installed.push(plugin); + if ($list.installed.get(`[data-id=\"${id}\"]`)) return; + $list.installed.append(); + }), + ); + $list.installed.setAttribute("empty-msg", strings["no plugins found"]); + } + + async function getOwned() { + $list.owned.setAttribute("empty-msg", strings["loading..."]); + const purchases = await helpers.promisify(iap.getPurchases); + const disabledMap = settings.value.pluginsDisabled || {}; + + purchases.forEach(async ({ productIds }) => { + const [sku] = productIds; + const url = Url.join(constants.API_BASE, "plugin/owned", sku); + const plugin = await fsOperation(url).readFile("json"); + const isInstalled = plugins.installed.find(({ id }) => id === plugin.id); + plugin.installed = !!isInstalled; + + if (plugin.installed) { + plugin.enabled = disabledMap[plugin.id] !== true; + plugin.onToggleEnabled = onToggleEnabled; + } + + plugins.owned.push(plugin); + $list.owned.append(); + }); + $list.owned.setAttribute("empty-msg", strings["no plugins found"]); + } + + function onInstall(plugin) { + if (updates) return; + + if (!plugin || !plugin.id) { + console.error("Invalid plugin object passed to onInstall"); + return; + } + plugin.installed = true; + + const existingIndex = plugins.installed.findIndex(p => p.id === plugin.id); + if (existingIndex === -1) { + plugins.installed.push(plugin); + } else { + // Update existing plugin + plugins.installed[existingIndex] = plugin; + } + + const allPluginIndex = plugins.all.findIndex(p => p.id === plugin.id); + if (allPluginIndex !== -1) { + plugins.all[allPluginIndex] = plugin; + } + + const existingItem = $list.installed.get(`[data-id="${plugin.id}"]`); + if (!existingItem) { + $list.installed.append(); + } + + } + + function onUninstall(pluginId) { + if (!updates) { + plugins.installed = plugins.installed.filter( + (plugin) => plugin.id !== pluginId, + ); + + const plugin = plugins.all.find((plugin) => plugin.id === pluginId); + if (plugin) { + plugin.installed = false; + plugin.localPlugin = null; + } + } + + // Remove from DOM + const existingItem = $list.installed.get(`[data-id="${pluginId}"]`); + if (existingItem) { + existingItem.remove(); + } + } + + function getLocalRes(id, name) { + return Url.join(PLUGIN_DIR, id, name); + } + + async function addSource(sourceType, value = "https://") { + let source; + if (sourceType === "remote") { + source = await prompt("Enter plugin source", value, "url"); + } else { + source = (await FileBrowser("file", "Select plugin source")).url; + } + + if (!source) return; + + try { + await installPlugin(source); + await getInstalledPlugins(); + } catch (error) { + console.error(error); + window.toast(helpers.errorMessage(error)); + addSource(sourceType, source); + } + } + + async function onToggleEnabled(id, enabled) { + const disabledMap = settings.value.pluginsDisabled || {}; + + if (enabled) { + disabledMap[id] = true; + settings.update({ pluginsDisabled: disabledMap }, false); + window.acode.unmountPlugin(id); + window.toast(strings["plugin_disabled"] || "Plugin Disabled"); + } else { + delete disabledMap[id]; + settings.update({ pluginsDisabled: disabledMap }, false); + await loadPlugin(id); + window.toast(strings["plugin_enabled"] || "Plugin enabled"); + } + + // Update the plugin object's state in all plugin arrays + const installedPlugin = plugins.installed.find(p => p.id === id); + if (installedPlugin) { + installedPlugin.enabled = !enabled; + } + + const allPlugin = plugins.all.find(p => p.id === id); + if (allPlugin) { + allPlugin.enabled = !enabled; + } + + const ownedPlugin = plugins.owned.find(p => p.id === id); + if (ownedPlugin) { + ownedPlugin.enabled = !enabled; + } + + // Re-render the specific item in all tabs + const $installedItem = $list.installed.get(`[data-id="${id}"]`); + if ($installedItem && installedPlugin) { + const $newItem = ; + $installedItem.replaceWith($newItem); + } + + const $allItem = $list.all.get(`[data-id="${id}"]`); + if ($allItem && allPlugin) { + const $newItem = ; + $allItem.replaceWith($newItem); + } + + const $ownedItem = $list.owned.get(`[data-id="${id}"]`); + if ($ownedItem && ownedPlugin) { + const $newItem = ; + $ownedItem.replaceWith($newItem); + } + } +} diff --git a/src/pages/plugins/plugins.scss b/src/pages/plugins/plugins.scss new file mode 100644 index 000000000..279cddeeb --- /dev/null +++ b/src/pages/plugins/plugins.scss @@ -0,0 +1,268 @@ +#plugins { + display: flex; + flex-direction: column; + + .filter-message { + font-size: 0.9rem; + font-weight: 500; + color: var(--popup-text-color); + padding: 1rem 1.25rem; + border-bottom: 1px solid var(--border-color); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); + display: flex; + justify-content: space-between; + align-items: center; + background: var(--secondary-color); + border-radius: 8px 8px 0 0; + margin-bottom: 2px; + + strong { + color: var(--link-text-color); + margin-left: 0.25rem; + } + + span { + margin-left: auto; + padding: 0.5rem; + border-radius: 6px; + transition: all 0.2s ease; + + &:hover { + cursor: pointer; + background-color: var(--error-text-color); + transform: scale(1.05); + } + } + } + + .list { + overflow-y: auto; + padding: 0.5rem 0; + + &:empty::after { + content: attr(empty-msg); + display: flex; + align-items: center; + justify-content: center; + height: 200px; + color: var(--secondary-text-color); + font-size: 0.9rem; + font-style: italic; + } + } + + .list-item { + margin: 0 0.5rem 0.5rem 0.5rem; + background: var(--secondary-color); + padding: 0.875rem; + border-radius: 12px; + transition: all 0.2s ease; + display: flex; + align-items: center; + overflow: hidden; + border: 1px solid var(--border-color); + cursor: pointer; + position: relative; + + &:hover { + background: color-mix(in srgb, var(--primary-color) 12%, transparent); + transform: translateY(-1px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); + border-color: var(--active-color); + } + + &:active { + transform: translateY(0); + } + + .plugin-header { + display: flex; + align-items: center; + gap: 0.75rem; + width: 100%; + max-width: 100%; + height: fit-content; + min-height: 40px; + + .plugin-icon { + width: 40px; + height: 40px; + border-radius: 10px; + flex-shrink: 0; + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + background: var(--primary-color); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); + + img { + width: 100%; + height: 100%; + object-fit: cover; + object-position: center; + } + } + + .plugin-info { + flex: 1; + min-width: 0; + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.75rem; + margin: 0; + height: fit-content; + + .plugin-main { + min-width: 0; + flex: 1; + + .plugin-title { + display: flex; + align-items: center; + gap: 0.75rem; + min-width: 0; + margin-bottom: 0.375rem; + + .plugin-name { + font-weight: 600; + font-size: 0.95rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + min-width: 0; + max-width: calc(100% - 60px); + color: var(--primary-text-color); + } + + .plugin-version { + color: var(--secondary-text-color); + font-size: 0.75rem; + font-weight: 500; + padding: 0.25rem 0.5rem; + background: var(--primary-color); + border-radius: 6px; + white-space: nowrap; + flex-shrink: 0; + } + } + + .plugin-meta { + font-size: 0.875rem; + color: var(--secondary-text-color); + display: flex; + flex-wrap: wrap; + gap: 0.5rem; + align-items: center; + + .plugin-meta-dot { + width: 4px; + height: 4px; + background: var(--secondary-text-color); + border-radius: 50%; + display: inline-block; + opacity: 0.6; + } + + .plugin-stats { + display: flex; + align-items: center; + gap: 0.375rem; + font-size: 0.875rem; + + &.plugin-author { + max-width: 150px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .icon { + display: inline-flex; + align-items: center; + justify-content: center; + width: 14px; + height: 14px; + font-size: 14px; + line-height: 1; + flex-shrink: 0; + opacity: 0.8; + } + } + } + } + + .plugin-price { + background: var(--active-color); + color: var(--button-text-color); + padding: 0.375rem 0.75rem; + border-radius: 8px; + font-size: 0.875rem; + font-weight: 600; + display: flex; + align-items: center; + gap: 0.25rem; + flex-shrink: 0; + height: fit-content; + box-shadow: 0 2px 4px var(--box-shadow-color); + } + } + } + + .plugin-toggle-switch { + display: flex !important; + align-items: center; + gap: 0.5rem; + cursor: pointer; + z-index: 100; + min-width: 100px; + pointer-events: auto !important; + position: relative; + margin-left: auto; + justify-content: flex-end; + padding: 0.5rem; + border-radius: 8px; + transition: background-color 0.2s ease; + + &:hover { + background-color: var(--primary-color); + } + } + + .plugin-toggle-track { + width: 40px; + height: 22px; + border-radius: 12px; + background: #e5e7eb; + position: relative; + transition: all 0.3s ease; + display: inline-block; + margin-right: 0.5rem; + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + } + + .plugin-toggle-switch[data-enabled="true"] .plugin-toggle-track, + .plugin-toggle-track[data-enabled="true"] { + background: var(--active-color); + box-shadow: 0 2px 4px var(--box-shadow-color); + } + + .plugin-toggle-thumb { + position: absolute; + left: 2px; + top: 2px; + width: 18px; + height: 18px; + border-radius: 50%; + background: white; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); + transition: all 0.3s ease; + } + + .plugin-toggle-switch[data-enabled="true"] .plugin-toggle-thumb, + .plugin-toggle-track[data-enabled="true"] .plugin-toggle-thumb { + left: 20px; + } + } +} \ No newline at end of file diff --git a/src/pages/problems/index.js b/src/pages/problems/index.js new file mode 100644 index 000000000..d3714d1ce --- /dev/null +++ b/src/pages/problems/index.js @@ -0,0 +1,8 @@ +function plugin({ id, installed }, onInstall, onUninstall) { + import(/* webpackChunkName: "problems" */ "./problems").then((res) => { + const Problems = res.default; + Problems(); + }); +} + +export default plugin; diff --git a/src/pages/problems/problems.js b/src/pages/problems/problems.js new file mode 100644 index 000000000..b3d9d5a3c --- /dev/null +++ b/src/pages/problems/problems.js @@ -0,0 +1,97 @@ +import "./style.scss"; +import Page from "components/page"; +import actionStack from "lib/actionStack"; +import EditorFile from "lib/editorFile"; +import helpers from "utils/helpers"; + +export default function Problems() { + const $page = Page(strings["problems"]); + /**@type {EditorFile[]} */ + const files = editorManager.files; + const $content =
    ; + + files.forEach((file) => { + if (file.type !== "editor") return; + /**@type {[]} */ + const annotations = file.session?.getAnnotations(); + if (!annotations.length) return; + + $content.append( +
    + {`${file.name} (${annotations.length})`} +
    + {annotations.map((annotation) => { + let icon = "info"; + + switch (annotation.type) { + case "error": + icon = "cancel"; + break; + + case "warning": + icon = "warningreport_problem"; + break; + + default: + break; + } + + return ( +
    + + + {annotation.text} + + + {annotation.row + 1}:{annotation.column + 1} + +
    + ); + })} +
    +
    , + ); + }); + + $content.addEventListener("click", clickHandler); + $page.body = $content; + app.append($page); + helpers.showAd(); + + $page.onhide = function () { + helpers.hideAd(); + actionStack.remove("problems"); + }; + + actionStack.push({ + id: "problems", + action: $page.hide, + }); + + /** + * Click handler for problems page + * @param {MouseEvent} e + */ + function clickHandler(e) { + const $target = e.target; + const { action } = $target.dataset; + + if (action === "goto") { + const { fileId } = $target.dataset; + const annotation = $target.annotation; + + editorManager.switchFile(fileId); + editorManager.editor.gotoLine(annotation.row + 1, annotation.column); + $page.hide(); + + setTimeout(() => { + editorManager.editor.focus(); + }, 100); + } + } +} diff --git a/src/pages/problems/style.scss b/src/pages/problems/style.scss new file mode 100644 index 000000000..43406239e --- /dev/null +++ b/src/pages/problems/style.scss @@ -0,0 +1,51 @@ +#problems { + height: 100%; + width: 100%; + + .single-file { + padding: 10px; + box-sizing: border-box; + + summary { + height: 40px; + width: 100%; + font-weight: bold; + line-height: 40px; + } + + .problem { + display: flex; + padding: 5px; + border-bottom: solid 1px var(--border-color); + + * { + pointer-events: none; + } + + .icon { + margin: 0 5px; + font-size: 0.9rem; + color: var(--primary-text-color) !important; + } + + .problem-line { + display: flex; + align-items: center; + margin-left: 10px; + font-size: 0.9rem; + } + + .problem-message { + flex: 1; + + &[data-type='error'] { + color: var(--danger-color); + } + + &[data-type='warning'] { + color: var(--error-text-color); + } + } + } + } +} \ No newline at end of file diff --git a/src/pages/quickTools/index.js b/src/pages/quickTools/index.js new file mode 100644 index 000000000..5761f4462 --- /dev/null +++ b/src/pages/quickTools/index.js @@ -0,0 +1,4 @@ +export default async function QuickToolsSettings() { + const { default: Settings } = await import("./quickTools.js"); + Settings(); +} diff --git a/src/pages/quickTools/quickTools.js b/src/pages/quickTools/quickTools.js new file mode 100644 index 000000000..02022af9c --- /dev/null +++ b/src/pages/quickTools/quickTools.js @@ -0,0 +1,400 @@ +import "./style.scss"; +import Page from "components/page"; +import items, { description } from "components/quickTools/items"; +import actionStack from "lib/actionStack"; +import settings from "lib/settings"; +import helpers from "utils/helpers"; + +export default function QuickTools() { + const $page = Page(strings["shortcut buttons"]); + $page.id = "quicktools-settings-page"; + $page.style.overflow = "hidden"; + $page.style.display = "flex"; + $page.style.flexDirection = "column"; + + const manager = new QuickToolsManager(); + $page.body = manager.getContainer(); + + const onShow = $page.onshow; + $page.onshow = function () { + if (onShow) onShow.call(this); + const scrollContainer = $page.get(".scroll-container") || $page; + scrollContainer.style.overflow = "hidden"; + manager.getContainer().style.height = "100%"; + }; + + actionStack.push({ + id: "quicktools-settings", + action: $page.hide, + }); + + $page.onhide = () => { + actionStack.remove("quicktools-settings"); + helpers.hideAd(); + // Cleanup manager + manager.destroy(); + }; + + app.append($page); + helpers.showAd(); +} + +class QuickToolsManager { + constructor() { + this.container =
    ; + this.render(); + this.bindEvents(); + + this.longPressTimer = null; + this.dragState = null; + } + + getContainer() { + return this.container; + } + + render() { + this.destroy(); // Cleanup potential drag states before re-rendering + this.container.textContent = ""; + + // --- Active Tools Section --- + const activeSection =
    ; + activeSection.appendChild( +
    {strings["active tools"]}
    , + ); + + const activeGrid =
    ; + + const totalSlots = + settings.QUICKTOOLS_ROWS * + settings.QUICKTOOLS_GROUPS * + settings.QUICKTOOLS_GROUP_CAPACITY; + + for (let i = 0; i < totalSlots; i++) { + const itemIndex = settings.value.quicktoolsItems[i]; + const itemDef = items[itemIndex]; + const el = this.createItemElement(itemDef, i, "active"); + activeGrid.appendChild(el); + } + + activeSection.appendChild(activeGrid); + this.container.appendChild(activeSection); + + // --- Available Tools Section --- + const availableSection =
    ; + availableSection.appendChild( +
    {strings["available tools"]}
    , + ); + + // Group items + const categories = { + Modifiers: ["ctrl", "shift", "alt", "meta"], + Commands: ["command", "undo", "redo", "save", "search"], + Navigation: ["key"], + Symbols: ["insert"], + Other: [], + }; + + const groupedItems = {}; + items.forEach((item, index) => { + let category = "Other"; + for (const [cat, actions] of Object.entries(categories)) { + if (actions.includes(item.action)) { + category = cat; + break; + } + } + if (!groupedItems[category]) groupedItems[category] = []; + groupedItems[category].push({ item, index }); + }); + + Object.entries(groupedItems).forEach(([category, list]) => { + const catHeader =
    {category}
    ; + const catGrid =
    ; + + list.forEach(({ item, index }) => { + const el = this.createItemElement(item, index, "source"); + catGrid.appendChild(el); + }); + + availableSection.appendChild(catHeader); + availableSection.appendChild(catGrid); + }); + + this.container.appendChild(availableSection); + } + + createItemElement(itemDef, index, type) { + if (!itemDef) + return ( +
    + ); + + const hasIcon = itemDef.icon && itemDef.icon !== "letters"; + // If it's not an icon, we assume it relies on 'letters' + // Some items might have both, but 'letters' mode implies text rendering + + const el = ( +
    + {hasIcon ? : null} +
    + ); + return el; + } + + bindEvents() { + const c = this.container; + c.addEventListener("touchstart", this.handleTouchStart.bind(this), { + passive: false, + }); + c.addEventListener("touchmove", this.handleTouchMove.bind(this), { + passive: false, + }); + c.addEventListener("touchend", this.handleTouchEnd.bind(this)); + c.addEventListener("contextmenu", (e) => e.preventDefault()); + + c.addEventListener("mousedown", this.handleMouseDown.bind(this)); + } + + // --- Touch Handlers --- + + handleTouchStart(e) { + // If already dragging or pending, ignore new touches (prevent multi-touch mess) + if (this.dragState || this.longPressTimer) return; + + const target = e.target.closest(".tool-item"); + if (!target) return; + + this.longPressTimer = setTimeout(() => { + this.startDrag(target, e.touches[0]); + }, 300); + + this.touchStartX = e.touches[0].clientX; + this.touchStartY = e.touches[0].clientY; + this.potentialTarget = target; + } + + handleTouchMove(e) { + const touch = e.touches[0]; + if (this.dragState) { + e.preventDefault(); + this.updateDrag(touch); + return; + } + + if ( + Math.hypot( + touch.clientX - this.touchStartX, + touch.clientY - this.touchStartY, + ) > 10 + ) { + clearTimeout(this.longPressTimer); + this.longPressTimer = null; + this.potentialTarget = null; + } + } + + handleTouchEnd(e) { + clearTimeout(this.longPressTimer); + + if (this.dragState) { + this.endDrag(); + } else if (this.potentialTarget) { + // It was a tap + if (e.cancelable) e.preventDefault(); + this.handleClick(this.potentialTarget); + } + + this.potentialTarget = null; + } + + // --- Mouse Handlers --- + + handleMouseDown(e) { + const target = e.target.closest(".tool-item"); + if (!target) return; + + this.mouseDownInfo = { + target, + x: e.clientX, + y: e.clientY, + isDrag: false, + }; + + const moveHandler = (ev) => { + if (!this.mouseDownInfo.isDrag) { + if ( + Math.hypot( + ev.clientX - this.mouseDownInfo.x, + ev.clientY - this.mouseDownInfo.y, + ) > 5 + ) { + this.mouseDownInfo.isDrag = true; + this.startDrag(target, this.mouseDownInfo); + } + } + if (this.dragState) { + this.updateDrag(ev); + } + }; + + const upHandler = () => { + document.removeEventListener("mousemove", moveHandler); + document.removeEventListener("mouseup", upHandler); + + if (this.dragState) { + this.endDrag(); + } else { + this.handleClick(target); + } + }; + + document.addEventListener("mousemove", moveHandler); + document.addEventListener("mouseup", upHandler); + } + + // --- Core Drag Logic --- + + startDrag(el, pointer) { + // Double check state + if (this.dragState) { + this.destroy(); + return; + } + + if (navigator.vibrate) navigator.vibrate(30); + + const rect = el.getBoundingClientRect(); + const ghost = el.cloneNode(true); + ghost.classList.add("tool-ghost"); + ghost.style.width = rect.width + "px"; + ghost.style.height = rect.height + "px"; + + document.body.appendChild(ghost); + el.classList.add("dragging"); + + const type = el.dataset.type; + const index = Number.parseInt(el.dataset.index, 10); + + this.dragState = { + el, + type, // 'active' or 'source' + index, // slot index (active) or item ID (source) + ghost, + offsetX: pointer.clientX - rect.left - rect.width / 2, + offsetY: pointer.clientY - rect.top - rect.height / 2, + }; + + this.updateDrag(pointer); + } + + updateDrag(pointer) { + const { ghost } = this.dragState; + ghost.style.left = pointer.clientX + "px"; + ghost.style.top = pointer.clientY + "px"; + + const elementBelow = document.elementFromPoint( + pointer.clientX, + pointer.clientY, + ); + + this.cleanupHighlight(); + + const targetItem = elementBelow?.closest(".tool-item"); + if (targetItem && targetItem.dataset.type === "active") { + targetItem.classList.add("highlight-target"); + this.dragState.dropTarget = targetItem; + } else { + this.dragState.dropTarget = null; + } + } + + cleanupHighlight() { + const highlighted = this.container.querySelectorAll(".highlight-target"); + highlighted.forEach((el) => el.classList.remove("highlight-target")); + } + + endDrag() { + const { el, ghost, dropTarget, type, index } = this.dragState; + + this.cleanupHighlight(); + el.classList.remove("dragging"); + ghost.remove(); + this.dragState = null; + + if (dropTarget) { + const targetIndex = Number.parseInt(dropTarget.dataset.index, 10); + + if (type === "active") { + // Swap within active + if (targetIndex !== index) { + this.swapItems(index, targetIndex); + } + } else if (type === "source") { + // Replace active slot with source item + this.replaceItem(targetIndex, index); + } + } + } + + swapItems(srcIndex, destIndex) { + const temp = settings.value.quicktoolsItems[srcIndex]; + settings.value.quicktoolsItems[srcIndex] = + settings.value.quicktoolsItems[destIndex]; + settings.value.quicktoolsItems[destIndex] = temp; + + settings.update(); + this.render(); // Re-render to reflect changes + } + + replaceItem(slotIndex, newItemId) { + settings.value.quicktoolsItems[slotIndex] = newItemId; + settings.update(); + this.render(); + } + + async handleClick(el) { + const type = el.dataset.type; + const index = Number.parseInt(el.dataset.index, 10); + + let itemDef; + if (type === "active") { + const itemIndex = settings.value.quicktoolsItems[index]; + itemDef = items[itemIndex]; + } else { + itemDef = items[index]; + } + + if (itemDef) { + const desc = description(itemDef.id); + window.toast(desc, 2000); + } + } + + destroy() { + if (this.longPressTimer) clearTimeout(this.longPressTimer); + this.longPressTimer = null; + + if (this.dragState) { + if (this.dragState.ghost) { + this.dragState.ghost.remove(); + } + if (this.dragState.el) { + this.dragState.el.classList.remove("dragging"); + } + } + + this.cleanupHighlight(); + this.dragState = null; + this.potentialTarget = null; + } +} diff --git a/src/pages/quickTools/style.scss b/src/pages/quickTools/style.scss new file mode 100644 index 000000000..674a19326 --- /dev/null +++ b/src/pages/quickTools/style.scss @@ -0,0 +1,158 @@ +#quicktools-settings { + display: flex; + flex-direction: column; + height: 100%; + width: 100%; + overflow-y: hidden; + box-sizing: border-box; + background-color: var(--primary-color); + + .section-title { + font-size: 1rem; + font-weight: bold; + padding: 10px; + color: var(--text-color); + opacity: 0.8; + background-color: var(--primary-color); + z-index: 10; + width: 100%; + display: block; + box-sizing: border-box; + } + + .section { + display: flex; + flex-direction: column; + width: 100%; + box-sizing: border-box; + } + + .section.active-tools { + flex: 0 0 auto; + border-bottom: 3px dashed var(--border-color); + padding-bottom: 10px; + margin-bottom: 15px; + padding-left: 10px; + padding-right: 10px; + } + + .section.available-tools { + flex: 1 1 auto; + overflow-y: auto; + padding: 0 10px 10px 10px; + + .category-header { + font-size: 0.8rem; + text-transform: uppercase; + opacity: 0.6; + margin-top: 15px; + margin-bottom: 5px; + margin-left: 5px; + font-weight: bold; + display: block; + width: 100%; + } + } + + .quicktools-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); + gap: 8px; + width: 100%; + padding-bottom: 5px; + padding-top: 5px; + + &.active-grid { + grid-template-columns: repeat(8, 1fr); + min-height: auto; + margin-bottom: 5px; + } + } + + .tool-item { + background-color: var(--secondary-color); + color: var(--text-color); + border-radius: 8px; + aspect-ratio: 1; + display: flex; + align-items: center; + justify-content: center; + font-size: 1rem; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + transition: transform 0.2s ease, background-color 0.2s; + user-select: none; + -webkit-user-select: none; + cursor: grab; + position: relative; + border: 1px solid transparent; + border-bottom: 2px dashed var(--border-color); + + &:active { + transform: scale(0.95); + cursor: grabbing; + } + + &.dragging { + opacity: 0.3; + transform: scale(0.9); + border-color: var(--active-color); + } + + &.highlight-target { + border-color: var(--active-color); + background-color: rgba(0, 0, 0, 0.1); + transform: scale(1.05); + } + + &.empty { + background-color: transparent; + border: 2px dashed rgba(0, 0, 0, 0.1); + box-shadow: none; + } + + .icon { + font-size: 1.2rem; + pointer-events: none; + } + + &.has-letters::before { + content: attr(data-letters); + font-size: 0.9rem; + font-weight: bold; + text-transform: uppercase; + } + + &.has-icon::before { + display: none; + } + } +} + +.tool-ghost { + position: fixed; + top: 0; + left: 0; + width: 60px; + height: 60px; + background-color: var(--active-color); + color: #fff; + border-radius: 12px; + display: flex; + align-items: center; + justify-content: center; + z-index: 9999; + pointer-events: none; + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); + transform: translate(-50%, -50%) scale(1.1); + + .icon { + font-size: 1.5rem; + } + + &.has-letters::before { + content: attr(data-letters); + font-size: 1rem; + font-weight: bold; + text-transform: uppercase; + } +} \ No newline at end of file diff --git a/src/pages/repo/list.hbs b/src/pages/repo/list.hbs deleted file mode 100644 index c211eff2f..000000000 --- a/src/pages/repo/list.hbs +++ /dev/null @@ -1,15 +0,0 @@ -
    {{#list}}{{#.}} -
    - - -
    - {{name}} -
    - {{#isFile}} - {{size}} - {{/isFile}} -
    -
    - {{/.}}{{/list}} -
    \ No newline at end of file diff --git a/src/pages/repo/menu.hbs b/src/pages/repo/menu.hbs deleted file mode 100644 index eae640a68..000000000 --- a/src/pages/repo/menu.hbs +++ /dev/null @@ -1,4 +0,0 @@ -
  • - {{info}} - -
  • \ No newline at end of file diff --git a/src/pages/repo/repo.hbs b/src/pages/repo/repo.hbs deleted file mode 100644 index 299c44e90..000000000 --- a/src/pages/repo/repo.hbs +++ /dev/null @@ -1,3 +0,0 @@ -
    -
    -
    \ No newline at end of file diff --git a/src/pages/repo/repo.include.js b/src/pages/repo/repo.include.js deleted file mode 100644 index 28d3c220f..000000000 --- a/src/pages/repo/repo.include.js +++ /dev/null @@ -1,374 +0,0 @@ -import _template from './repo.hbs'; -import _list from './list.hbs'; -import _menu from './menu.hbs'; -import './repo.scss'; -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import mimeType from 'mime-types'; -import Page from '../../components/page'; -import helpers from '../../lib/utils/helpers'; -import dialogs from '../../components/dialogs'; -import git from '../../lib/git'; -import contextMenu from '../../components/contextMenu'; -import searchBar from '../../components/searchbar'; -import Icon from '../../components/icon'; - -export default function RepoInclude(owner, repoName) { - let $page; - const $menuToggler = Icon('more_vert', 'toggle-menu'); - const $content = tag.parse(_template); - const $navigation = $content.querySelector('.navigation'); - const repo = git.GitHub().getRepo(owner, repoName); - const $search = tag('span', { - className: 'icon search', - attr: { - action: 'search', - }, - }); - let cachedTree = { - '/': { - name: '/', - sha: '/', - list: [], - }, - }; - let currentTree = { list: [], name: '', sha: '', scroll: 0 }; - let branch; - const branches = []; - const input1 = { - id: 'from', - placeholder: strings['use branch'], - hints: (cb) => { - cb(branches.slice(0, -1)); - }, - type: 'text', - }; - const input2 = { - id: 'branch', - placeholder: strings['new branch'], - type: 'text', - match: /^[a-z\-_0-9]+$/i, - }; - const path = []; - const $cm = contextMenu(mustache.render(_menu, strings), { - toggle: $menuToggler, - top: '8px', - right: '8px', - transformOrigin: 'top right', - }); - - dialogs.loader.create(repoName, strings.loading + '...'); - repo - .listBranches() - .then((res) => { - dialogs.loader.destroy(); - const data = res.data; - data.map((branch) => branches.push(branch.name)); - branches.push(['add', strings['new branch'], 'add']); - return dialogs.select(strings['select branch'], branches); - }) - .then((res) => { - if (res === 'add') { - addBranch(); - } else { - branch = res; - getRepo(); - } - }) - .catch((err) => { - helpers.error(err); - dialogs.loader.destroy(); - }); - - function addBranch() { - dialogs - .multiPrompt(strings['create new branch'], [input1, input2]) - .then((res) => { - const from = res.from; - branch = res.branch; - dialogs.loader.create('', strings.loading + '...'); - return repo.createBranch(from, branch); - }) - .then(getRepo) - .catch((err) => { - helpers.error(err); - }) - .finally(() => { - dialogs.loader.destroy(); - }); - } - - function getRepo() { - dialogs.loader.create(repoName, strings.loading + '...'); - repo - .getSha(branch, '') - .then((res) => { - const list = transofrmRepoList(res.data); - $page = Page(repoName + ` (${branch})`, { - lead: tag('span', { - className: 'icon clearclose', - attr: { - action: 'close', - }, - }), - }); - cachedTree['/'].list = list; - navigate('/', '/'); - actionStack.setMark(); - actionStack.push({ - id: 'repo', - action: $page.hide, - }); - - $page.onhide = function () { - $cm.removeEventListener('click', handleClick); - $page.removeEventListener('click', handleClick); - actionStack.clearFromMark(); - actionStack.remove('repo'); - }; - - $cm.addEventListener('click', handleClick); - $page.addEventListener('click', handleClick); - $page.append($content); - $page.querySelector('header').append($search, $menuToggler); - document.body.appendChild($page); - }) - .catch((err) => { - helpers.error(err); - }) - .finally(() => { - dialogs.loader.destroy(); - }); - } - - /** - * - * @param {MouseEvent} e - */ - function handleClick(e) { - /** - * @type {HTMLElement} - */ - const $el = e.target; - const action = $el.getAttribute('action'); - - if (!action) return; - if (action === 'info') $cm.hide(); - - performeAction(action, $el); - } - - /** - * - * @param {{list: Array, scroll: Number}} param0 - */ - function render({ list, scroll = 0 }) { - const $oldList = $content.get('.list'); - if ($oldList) $oldList.remove(); - const $list = tag.parse( - mustache.render(_list, { - msg: strings['empty folder message'], - list, - }), - ); - $content.append($list); - $list.scrollTop = scroll; - } - - /** - * - * @param {String} name - * @param {String} sha - */ - async function navigate(name, sha) { - const $nav = $navigation.get(`[sha="${sha}"]`); - - if ($nav) { - let $topNav; - let oldsha = null; - while (($topNav = $navigation.lastChild) !== $nav) { - const sha = $topNav.getAttribute('sha'); - actionStack.remove(sha); - $topNav.remove(); - path.pop(); - - if (oldsha && oldsha in cachedTree) { - delete cachedTree[oldsha]; - } - - oldsha = sha; - } - - const tree = await getTree(name, sha); - if (tree) { - render(tree); - currentTree = tree; - return; - } - render({ list: [], scroll: 0 }); - return; - } - - const tree = await getTree(name, sha); - if (tree) { - const $list = $content.get('.list'); - if ($list) currentTree.scroll = $list.scrollTop; - - path.push(name); - $navigation.append( - tag('span', { - className: 'nav', - attr: { - sha, - action: 'navigate', - text: name, - name, - }, - }), - ); - $navigation.scrollLeft = $navigation.scrollWidth; - - const { sha: csha, name: cname } = currentTree; - if (csha && cname) { - actionStack.push({ - id: sha, - action: function () { - navigate(cname, csha); - }, - }); - } - - render(tree); - cachedTree[sha] = tree; - currentTree = tree; - } - } - - async function getTree(name, sha) { - if (sha in cachedTree) { - return cachedTree[sha]; - } - - let tree = null; - dialogs.loader.create(repoName, strings.loading + '...'); - try { - const res = await repo.getTree(sha); - let { tree: list } = res.data; - list = transofrmRepoList(list); - tree = { list, name, sha, scroll: 0 }; - } catch (err) { - error(err); - } - dialogs.loader.destroy(); - return tree; - } - - function transofrmRepoList(list) { - list.map((entry) => { - const { size, type } = entry; - entry.size = (size / 1024).toFixed(2) + 'KB'; - if (!entry.name && entry.path) entry.name = entry.path; - entry.isDirectory = type === 'dir' || type === 'tree'; - entry.isFile = !entry.isDirectory; - entry.type = entry.isDirectory - ? 'folder' - : helpers.getIconForFile(entry.name); - }); - - return helpers.sortDir(list, { - showHiddenFiles: 'on', - sortByName: 'on', - }); - } - - /** - * - * @param {string} action - * @param {HTMLElement} $el - */ - function performeAction(action, $el) { - const sha = $el.getAttribute('sha'); - const name = $el.getAttribute('name'); - - switch (action) { - case 'close': - $page.hide(); - break; - case 'navigate': - navigate(name, sha); - break; - - case 'file': - file(); - break; - - case 'info': - import(/* webpackChunkName: 'info' */ '../info/info').then((res) => { - res.default(repoName, owner); - }); - break; - - case 'search': - searchBar($content.get('.list')); - break; - } - - function file() { - dialogs.loader.create(name, strings.loading + '...'); - const ext = helpers.extname(name); - const mime = mimeType.lookup(ext); - const type = /image/i.test(mime) ? 'blob' : null; - repo - .getBlob(sha, 'blob') - .then(async (res) => { - let data = res.data; - if (!type) { - if (data instanceof Blob) { - try { - if (data.text) data = await data.text(); - else data = await helpers.blob2text(data); - } catch (error) { - console.error(error); - dialogs.alert(strings.error, strings['unable to open file']); - } - } - const record = gitRecord.add({ - sha, - data, - name, - branch, - repo: repoName, - path: path.slice(1).join('/'), - owner, - }); - - editorManager.addNewFile(name, { - type: 'git', - record, - text: data, - isUnsaved: false, - }); - - $page.hide(); - window.freeze = false; - actionStack.pop(); - actionStack.pop(); - window.freeze = true; - } else if (type === 'blob') { - dialogs.box(name, ``); - } else { - alert(strings.error.toUpperCase(), strings['file not supported']); - } - }) - .finally(() => { - dialogs.loader.destroy(); - }); - } - } - - function error(err) { - console.error(err); - actionStack.pop(); - dialogs.alert(strings.error, err.toString()); - } -} diff --git a/src/pages/repo/repo.js b/src/pages/repo/repo.js deleted file mode 100644 index 6bef4f0d4..000000000 --- a/src/pages/repo/repo.js +++ /dev/null @@ -1,8 +0,0 @@ -function Repo(owner, repoName) { - import(/* webpackChunkName: "repo" */ './repo.include').then((res) => { - const Repo = res.default; - Repo(owner, repoName); - }); -} - -export default Repo; diff --git a/src/pages/repo/repo.scss b/src/pages/repo/repo.scss deleted file mode 100644 index 714e59e1e..000000000 --- a/src/pages/repo/repo.scss +++ /dev/null @@ -1,21 +0,0 @@ -#repo-tree { - #repo-list { - height: calc(100% - 30px); - overflow-y: auto; - - .icon { - background-position: center; - background-size: 32px; - font-size: 2em; - color: rgb(65, 85, 133); - - &.code { - color: rgb(79, 155, 79); - } - - &.folder { - color: rgb(206, 206, 53); - } - } - } -} diff --git a/src/pages/repos/menu.hbs b/src/pages/repos/menu.hbs deleted file mode 100644 index 5ceeda9c6..000000000 --- a/src/pages/repos/menu.hbs +++ /dev/null @@ -1,4 +0,0 @@ -
  • - {{reload}} - -
  • \ No newline at end of file diff --git a/src/pages/repos/repos.hbs b/src/pages/repos/repos.hbs deleted file mode 100644 index dde0f56b1..000000000 --- a/src/pages/repos/repos.hbs +++ /dev/null @@ -1,26 +0,0 @@ -
    - {{#.}} -
    - -
    -
    - {{name}} -
    - -
    - - {{watchers}} -
    -
    - - {{forks}} -
    -
    - -
    -
    -
    - -
    - {{/.}} -
    \ No newline at end of file diff --git a/src/pages/repos/repos.include.js b/src/pages/repos/repos.include.js deleted file mode 100644 index 0ba4cb2f4..000000000 --- a/src/pages/repos/repos.include.js +++ /dev/null @@ -1,146 +0,0 @@ -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import helpers from '../../lib/utils/helpers'; -import GithubLogin from '../login/login'; -import Page from '../../components/page'; - -import _template from './repos.hbs'; -import _menu from './menu.hbs'; -import './repos.scss'; -import Repo from '../repo/repo'; -import contextMenu from '../../components/contextMenu'; -import fs from '../../lib/fileSystem/internalFs'; -import dialogs from '../../components/dialogs'; -import git from '../../lib/git'; -import searchBar from '../../components/searchbar'; -import Icon from '../../components/icon'; - -function ReposInclude() { - const $search = tag('span', { - className: 'icon search', - attr: { - action: 'search', - }, - }); - const $menuToggler = Icon('more_vert', 'toggle-menu'); - const $page = Page('Repositories'); - const { credentials } = helpers; - /** - * @type {Array} - */ - let repos = null; - const github = git.GitHub(); - const user = github.getUser(); - const githubFile = cordova.file.externalDataDirectory + '.github'; - const $cm = contextMenu(mustache.render(_menu, strings), { - top: '8px', - right: '8px', - toggle: $menuToggler, - transformOrigin: 'top right', - }); - - $cm.addEventListener('click', handleClick); - $page.querySelector('header').append($search, $menuToggler); - $search.onclick = () => { - searchBar($page.querySelector('#repos')); - }; - - dialogs.loader.create('GitHub', strings.loading + '...'); - fs.readFile(githubFile) - .then((res) => { - const text = credentials.decrypt(helpers.decodeText(res.data)); - const repos = JSON.parse(text); - render(repos); - }) - .catch((err) => { - loadRepos(); - }); - - /** - * - * @param {Array} res - */ - function render(res) { - repos = res; - - repos.map((repo) => { - const { language, size, updated_at } = repo; - - repo.size = (size / 1024).toFixed(2) + 'KB'; - repo.updated_at = new Date(updated_at).toLocaleDateString(); - repo.language = `file_type_${(language || 'text').toLowerCase()}`; - }); - const $content = tag.parse(mustache.render(_template, repos)); - - $content.addEventListener('click', handleClick); - - $page.append($content); - document.body.appendChild($page); - - actionStack.push({ - id: 'repos', - action: $page.hide, - }); - $page.onhide = function () { - actionStack.remove('repos'); - }; - - dialogs.loader.destroy(); - } - - /** - * - * @param {MouseEvent} e - */ - function handleClick(e) { - /** - * @type {HTMLElement} - */ - const $el = e.target; - const action = $el.getAttribute('action'); - - if (action === 'reload') $cm.hide(); - switch (action) { - case 'repo': - const name = $el.getAttribute('name'); - const owner = $el.getAttribute('owner'); - Repo(owner, name, $page); - break; - case 'reload': - $page.querySelector('#repos').remove(); - dialogs.loader.create('Repositories', strings.loading + '...'); - loadRepos(); - break; - case 'open': - system.openInBrowser($el.parentElement.getAttribute('data-url')); - break; - } - } - - function loadRepos() { - user - .listRepos() - .then((res) => { - const repos = res.data; - const data = credentials.encrypt(JSON.stringify(repos)); - fs.writeFile(githubFile, data, true, false).catch((err) => { - toast(strings.error); - console.error(err); - }); - - render(repos); - }) - .catch((err) => { - if (err.response) { - GithubLogin(); - } else { - console.error(err); - } - }) - .finally(() => { - dialogs.loader.destroy(); - }); - } -} - -export default ReposInclude; diff --git a/src/pages/repos/repos.js b/src/pages/repos/repos.js deleted file mode 100644 index d4545b48c..000000000 --- a/src/pages/repos/repos.js +++ /dev/null @@ -1,10 +0,0 @@ -//jshint ignore:start - -function Repos() { - import(/* webpackChunkName: "repos" */ './repos.include').then((res) => { - const Repos = res.default; - Repos(); - }); -} - -export default Repos; diff --git a/src/pages/repos/repos.scss b/src/pages/repos/repos.scss deleted file mode 100644 index 3c6efce1b..000000000 --- a/src/pages/repos/repos.scss +++ /dev/null @@ -1,60 +0,0 @@ -#repos { - .list-item { - .icon { - &.file { - background-size: 16px; - background-position: center; - } - } - - .octicon { - &.main-icon { - font-size: 1.8em; - color: rgb(106, 115, 125) !important; - - &::before { - content: '\f001'; - } - - &[private] { - color: rgb(219, 171, 9) !important; - - &::before { - content: '\f06a'; - } - } - } - } - - .value { - text-transform: unset; - display: flex; - - .group { - display: flex; - align-items: center; - margin-right: 15px; - - .octicon, - .icon { - height: 30px; - width: 30px; - font-size: 1em; - } - } - } - - .private { - > .text::after { - content: 'private'; - font-size: 0.6em; - border-radius: 4px; - background-color: rgb(204, 204, 204); - color: rgb(51, 51, 51); - border: solid 1px rgb(51, 51, 51); - margin: auto 5px; - padding: 0 2.5px; - } - } - } -} diff --git a/src/pages/settings/backup-restore.js b/src/pages/settings/backup-restore.js deleted file mode 100644 index 7b3c93891..000000000 --- a/src/pages/settings/backup-restore.js +++ /dev/null @@ -1,199 +0,0 @@ -import Page from '../../components/page'; -import tag from 'html-tag-js'; -import gen from '../../components/gen'; -import helpers from '../../lib/utils/helpers'; -import dialogs from '../../components/dialogs'; -import fsOperation from '../../lib/fileSystem/fsOperation'; -import URLParse from 'url-parse'; -import Url from '../../lib/utils/Url'; -import FileBrowser from '../fileBrowser/fileBrowser'; -import Uri from '../../lib/utils/Uri'; - -function backupRestore() { - const $page = Page( - strings.backup.capitalize() + '/' + strings.restore.capitalize(), - ); - const settingsList = tag('div', { - className: 'main list', - }); - - actionStack.push({ - id: 'backup-restore', - action: $page.hide, - }); - $page.onhide = function () { - actionStack.remove('backup-restore'); - }; - - const settingsOptions = [ - { - key: 'backup', - text: strings.backup.capitalize(), - icon: 'file_downloadget_app', - }, - { - key: 'restore', - text: strings.restore.capitalize(), - icon: 'historyrestore', - }, - ]; - - gen.listItems(settingsList, settingsOptions, changeSetting); - - $page.appendChild(settingsList); - document.body.append($page); - - function changeSetting() { - switch (this.key) { - case 'backup': - backup(); - break; - - case 'restore': - restore(); - break; - - default: - break; - } - } - - async function backup() { - try { - const settings = appSettings.value; - const keyBindings = window.customKeyBindings; - const storageList = JSON.parse(localStorage.storageList || '[]').filter( - (s) => /s?ftp/.test(s.storageType), - ); - - const backupStorage = ( - await FileBrowser( - 'folder', // - strings['select folder'], - ) - ).url; - - const backupFilename = 'Acode.backup'; - const backupDirname = 'Backup'; - const backupDir = Url.join(backupStorage, backupDirname); - const backupFile = Url.join(backupDir, backupFilename); - const backupStorageFS = fsOperation(backupStorage); - const backupDirFS = fsOperation(backupDir); - const backupFileFS = fsOperation(backupFile); - - if (!(await backupDirFS.exists())) { - await backupStorageFS.createDirectory(backupDirname); - } - - if (!(await backupFileFS.exists())) { - await backupDirFS.createFile(backupFilename); - } - - for (let storage of storageList) { - const url = URLParse(storage.uri, true); - const keyFile = decodeURIComponent(url.query['keyFile'] || ''); - if (keyFile) { - const srcFs = fsOperation(keyFile); - storage.keyFileData = await srcFs.readFile('utf-8'); - } - } - - const backupString = JSON.stringify({ - settings, - keyBindings, - storageList, - }); - - await backupFileFS.writeFile(backupString); - - dialogs.alert( - strings.success.toUpperCase(), - `${strings['backup successful']}\n${Uri.getVirtualAddress( - backupFile, - )}.`, - ); - } catch (error) { - console.error(error); - helpers.toast(error); - } - } - - function restore() { - sdcard.openDocumentFile( - (data) => { - backupRestore.restore(data.uri); - }, - helpers.toast, - 'application/octet-stream', - ); - } -} - -backupRestore.restore = async function (url) { - try { - let fs = fsOperation(url); - let backup = await fs.readFile('utf8'); - - try { - backup = JSON.parse(backup); - } catch (error) { - dialogs.alert( - strings.error.toUpperCase(), - strings['invalid backup file'], - ); - } - - try { - fs = fsOperation(window.KEYBINDING_FILE); - await fs.writeFile(JSON.stringify(backup.keyBindings, undefined, 2)); - } catch (error) {} - - const { settings, storageList } = backup; - const storedStorageList = JSON.parse(localStorage.storageList || '[]'); - for (let storage of storageList) { - if (!storedStorageList.find((st) => st.uuid === storage.uuid)) { - if ('keyFileData' in storage) { - const keyFileData = storage.keyFileData; - delete storage.keyFileData; - - const url = URLParse(storage.uri, true); - const { passPhrase, keyFile } = url.query; - const filename = Url.basename(decodeURIComponent(keyFile)); - const newKeyFile = Url.join(DATA_STORAGE, filename); - - const fs = fsOperation(newKeyFile); - if (!(await fs.exists())) { - const dirFs = fsOperation(DATA_STORAGE); - await dirFs.createFile(filename); - } - await fs.writeFile(keyFileData); - - url.set('query', { - passPhrase, - keyFile: encodeURIComponent(newKeyFile), - }); - - storage.uri = url.toString(true); - } - - storedStorageList.push(storage); - } - } - localStorage.storageList = JSON.stringify(storedStorageList); - - const settingsDir = Url.dirname(appSettings.settingsFile); - const settingsFileFS = fsOperation(settingsDir); - fs = fsOperation(appSettings.settingsFile); - - if (!(await fs.exists())) { - await settingsFileFS.createFile(Url.basename(appSettings.settingsFile)); - } - - await fs.writeFile(JSON.stringify(settings, undefined, 2)); - location.reload(); - } catch (err) { - helpers.toast(err); - } -}; - -export default backupRestore; diff --git a/src/pages/settings/editorSettings.js b/src/pages/settings/editorSettings.js deleted file mode 100644 index 274f2561a..000000000 --- a/src/pages/settings/editorSettings.js +++ /dev/null @@ -1,313 +0,0 @@ -import Page from '../../components/page'; -import gen from '../../components/gen'; -import dialogs from '../../components/dialogs'; -import constants from '../../lib/constants'; -import tag from 'html-tag-js'; - -export default function editorSettings() { - const $page = Page(strings['editor settings'].capitalize()); - const settingsList = tag('div', { - className: 'main list', - }); - - actionStack.push({ - id: 'settings-editor', - action: $page.hide, - }); - $page.onhide = function () { - actionStack.remove('settings-editor'); - }; - - let values = appSettings.value; - - appSettings.on('update', function (newValues) { - values = newValues; - }); - - const settingsOptions = [ - { - key: 'autosave', - text: strings.autosave.capitalize(), - subText: values.autosave ? values.autosave + '' : strings.no, - }, - { - key: 'fontSize', - text: strings['font size'], - subText: values.fontSize, - }, - { - key: 'textWrap', - text: strings['text wrap'], - checkbox: values.textWrap, - }, - { - key: 'softTab', - text: strings['soft tab'], - checkbox: values.softTab, - }, - { - key: 'tabSize', - text: strings['tab size'], - subText: values.tabSize, - }, - { - key: 'linenumbers', - text: strings['show line numbers'], - checkbox: values.linenumbers, - }, - { - key: 'lineHeight', - text: strings['line height'], - subText: values.lineHeight, - }, - { - key: 'beautify', - text: strings['beautify on save'], - subText: strings.except + ': ' + values.beautify.join(','), - }, - { - key: 'linting', - text: strings.linting, - checkbox: values.linting, - }, - { - key: 'showSpaces', - text: strings['show spaces'], - checkbox: values.showSpaces, - }, - { - key: 'openFileListPos', - text: strings['active files'], - subText: values.openFileListPos, - }, - { - key: 'editorFont', - text: strings['editor font'], - subText: values.editorFont, - }, - { - key: 'floatingButton', - text: strings['floating button'], - checkbox: values.floatingButton, - }, - { - key: 'quickTools', - text: strings['quick tools'], - checkbox: values.quickTools, - }, - { - key: 'fullscreen', - text: strings.fullscreen.capitalize(), - checkbox: values.fullscreen, - }, - { - key: 'liveAutoCompletion', - text: strings['live autocompletion'].capitalize(), - checkbox: values.liveAutoCompletion, - }, - { - key: 'showPrintMargin', - text: strings['show print margin'].capitalize(), - checkbox: values.showPrintMargin, - }, - { - key: 'cursorControllerSize', - text: strings['cursor controller size'], - subText: values.cursorControllerSize, - }, - { - key: 'scrollbarSize', - text: strings['scrollbar size'], - subText: values.scrollbarSize, - }, - ]; - - gen.listItems(settingsList, settingsOptions, changeSetting); - - function changeSetting() { - const settings = {}; - switch (this.key) { - case 'autosave': - dialogs - .prompt(strings.delay + ' (>1000)', values.autosave, 'number') - .then((res) => { - res = parseInt(res); - if (isNaN(res) || (res < 1000 && res !== 0)) - return dialogs.alert(strings.info, strings['invalid value']); - appSettings.update({ - autosave: res, - }); - this.changeSubText(res ? res + '' : strings.no); - - if (res) { - if (saveInterval) clearInterval(saveInterval); - saveInterval = setInterval(() => { - editorManager.files.map((file) => { - if (file.isUnsaved && file.location) - Acode.exec('save', false); - }); - }, res); - } else if (saveInterval) { - clearInterval(saveInterval); - } - }); - break; - - case 'fontSize': - dialogs - .prompt(this.text, values.fontSize, 'text', { - required: true, - match: constants.FONT_SIZE, - }) - .then((res) => { - if (res === values.fontSize) return; - - appSettings.update({ - fontSize: res, - }); - this.changeSubText(res); - }); - break; - - case 'lineHeight': - dialogs - .prompt(this.text, values.lineHeight, 'numberic', { - required: true, - }) - .then((res) => { - res = parseFloat(res); - if (res < 1 || res === values.lineHeight) return; - - appSettings.update({ - lineHeight: res, - }); - this.changeSubText(res); - }); - break; - - case 'tabSize': - dialogs - .prompt(this.text, appSettings.value.tabSize, 'number', { - required: true, - }) - .then((res) => { - if (res === values.tabSize) return; - appSettings.update({ - tabSize: res, - }); - this.changeSubText(res); - }); - break; - - case 'beautify': - dialogs - .prompt(strings.except + ' (eg. php,py)', values.beautify.join(',')) - .then((res) => { - const files = res.split(','); - files.map((file, i) => (files[i] = file.trim().toLowerCase())); - appSettings.update({ - beautify: files, - }); - this.changeSubText(strings.except + ': ' + res); - }); - break; - - case 'openFileListPos': - dialogs - .select(this.text, ['sidebar', 'header'], { - default: values.openFileListPos, - }) - .then((res) => { - if (res === values.openFileListPos) return; - appSettings.update({ - openFileListPos: res, - }); - this.changeSubText(res); - }); - break; - - case 'editorFont': - dialogs - .select(this.text, ['fira-code', 'default'], { - default: values.editorFont, - }) - .then((res) => { - if (res === values.editorFont) return; - appSettings.update({ - editorFont: res, - }); - this.changeSubText(res); - }); - break; - - case 'quickTools': - Acode.exec('toggle-quick-tools'); - this.value = values.quickTools; - break; - - case 'fullscreen': - appSettings.update({ - fullscreen: !values.fullscreen, - }); - - if (values.fullscreen) Acode.exec('enable-fullscreen'); - else Acode.exec('disable-fullscreen'); - - this.value = values.fullscreen; - break; - - case 'floatingButton': - appSettings.update({ - floatingButton: !values.floatingButton, - }); - root.classList.toggle('hide-floating-button'); - this.value = values.floatingButton; - break; - - case 'cursorControllerSize': - dialogs - .select( - strings['cursor controller size'], - [ - [strings.none, 'none'], - [strings.small, 'small'], - [strings.large, 'large'], - ], - { - default: values.cursorControllerSize, - }, - ) - .then((res) => { - appSettings.update({ - cursorControllerSize: res, - }); - this.value = res; - }); - break; - - case 'scrollbarSize': - dialogs - .select(strings['scrollbar size'], [5, 10, 15, 20], { - default: values.scrollbarSize, - }) - .then((res) => { - appSettings.update({ - scrollbarSize: res, - }); - this.value = res; - }); - break; - - default: - settings[this.key] = !values[this.key]; - appSettings.update(settings); - this.value = values[this.key]; - break; - } - } - - $page.appendChild(settingsList); - document.body.append($page); - - document.body.append($page); -} diff --git a/src/pages/settings/filesSettings.js b/src/pages/settings/filesSettings.js deleted file mode 100644 index 1413a9f49..000000000 --- a/src/pages/settings/filesSettings.js +++ /dev/null @@ -1,56 +0,0 @@ -import Page from '../../components/page'; -import tag from 'html-tag-js'; -import gen from '../../components/gen'; - -export default function filesSettings(callback) { - const page = Page(strings.settings.capitalize()); - const settingsList = tag('div', { - className: 'main list', - }); - - actionStack.push({ - id: 'settings-theme', - action: page.hide, - }); - page.onhide = function () { - actionStack.remove('settings-theme'); - }; - - const values = appSettings.value.fileBrowser; - - const settingsOptions = [ - { - key: 'sort', - text: strings['sort by name'], - checkbox: values.sortByName, - }, - { - key: 'show', - text: strings['show hidden files'], - checkbox: values.showHiddenFiles, - }, - ]; - - gen.listItems(settingsList, settingsOptions, changeSetting); - - function changeSetting() { - switch (this.key) { - case 'sort': - values.sortByName = !values.sortByName; - appSettings.update(); - this.value = values.sortByName; - if (callback) callback(); - break; - - case 'show': - values.showHiddenFiles = !values.showHiddenFiles; - appSettings.update(); - this.value = values.showHiddenFiles; - if (callback) callback(); - break; - } - } - - page.appendChild(settingsList); - document.body.append(page); -} diff --git a/src/pages/settings/mainSettings.js b/src/pages/settings/mainSettings.js deleted file mode 100644 index 760437b7b..000000000 --- a/src/pages/settings/mainSettings.js +++ /dev/null @@ -1,152 +0,0 @@ -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import Page from '../../components/page'; -import gen from '../../components/gen'; -import About from '../about/about'; -import editorSettings from './editorSettings'; -import constants from '../../lib/constants'; -import openFile from '../../lib/openFile'; -import backupRestore from './backup-restore'; -import themeSetting from '../themeSetting/themeSetting'; -import $_ad from '../../views/ad.hbs'; -import otherSettings from './otherSettings'; -import $_socialLinks from '../../views/social-links.hbs'; -import dialogs from '../../components/dialogs'; -import rateBox from '../../components/dialogboxes/rateBox'; -import Donate from '../donate/donate'; - -export default function settingsMain() { - const $page = Page(strings.settings.capitalize()); - const $settingsList = tag('div', { - className: 'main list', - style: { - textTransform: 'capitalize', - }, - }); - const $editSettings = tag('span', { - className: 'icon edit', - attr: { - style: 'font-size: 1.2em !important;', - action: 'edit-settings', - }, - onclick: () => { - openFile(appSettings.settingsFile, { - text: JSON.stringify(appSettings.value, undefined, 4), - render: true, - isUnsaved: false, - }).then(() => { - actionStack.pop(); - }); - }, - }); - - actionStack.push({ - id: 'settings-main', - action: $page.hide, - }); - $page.onhide = function () { - actionStack.remove('settings-main'); - }; - $page.querySelector('header').append($editSettings); - - const settingsOptions = [ - { - index: 0, - key: 'about', - text: strings.about, - icon: 'acode', - }, - { - index: 1, - key: 'donate', - text: strings.support, - icon: 'favorite', - color: 'orangered', - sake: true - }, - { - index: 2, - key: 'editor-settings', - text: strings['editor settings'], - icon: 'text_format', - }, - { - index: 3, - key: 'app-settings', - text: strings['app settings'], - icon: 'tune', - }, - { - index: 4, - key: 'theme', - text: strings.theme, - icon: 'color_lenspalette', - }, - { - index: 5, - key: 'backup-restore', - text: strings.backup.capitalize() + '/' + strings.restore.capitalize(), - icon: 'cached', - }, - { - index: 6, - key: 'rateapp', - text: strings['rate acode'], - icon: 'googleplay' - } - ]; - gen.listItems($settingsList, settingsOptions, changeSetting); - - function changeSetting() { - const lanuguages = []; - const langList = constants.langList; - for (let lang in langList) { - lanuguages.push([lang, langList[lang]]); - } - switch (this.key) { - case 'editor-settings': - editorSettings(); - break; - - case 'theme': - themeSetting(); - break; - - case 'about': - About(); - break; - - case 'app-settings': - otherSettings(); - break; - - case 'backup-restore': - backupRestore(); - break; - - case 'donate': - Donate(); - break; - - case 'rateapp': - rateBox(); - break; - } - } - - $page.appendChild($settingsList); - if (window.promotion && !localStorage.hideAd) { - const $ad = tag.parse(mustache.render($_ad, window.promotion)); - $ad.style.marginTop = '10px'; - $ad.onclick = function (e) { - const action = e.target.getAttribute('action'); - if (action === 'close') { - this.remove(); - localStorage.hideAd = true; - } - }; - $settingsList.append($ad); - } - $settingsList.appendChild(tag.parse($_socialLinks)); - document.body.append($page); -} diff --git a/src/pages/settings/otherSettings.js b/src/pages/settings/otherSettings.js deleted file mode 100644 index 6ebdfb4d1..000000000 --- a/src/pages/settings/otherSettings.js +++ /dev/null @@ -1,209 +0,0 @@ -import tag from 'html-tag-js'; -import Page from '../../components/page'; -import dialogs from '../../components/dialogs'; -import gen from '../../components/gen'; -import constants from '../../lib/constants'; -import helpers from '../../lib/utils/helpers'; -import openFile from '../../lib/openFile'; -import internalFs from '../../lib/fileSystem/internalFs'; -import fsOperation from '../../lib/fileSystem/fsOperation'; -import ajax from '@deadlyjack/ajax'; -import Url from '../../lib/utils/Url'; - -export default function otherSettings() { - const values = appSettings.value; - const $page = Page(strings['app settings'].capitalize()); - const $settingsList = tag('div', { - className: 'main list', - }); - - actionStack.push({ - id: 'other-settings', - action: $page.hide, - }); - $page.onhide = function () { - actionStack.remove('other-settings'); - }; - - const settingsOptions = [ - { - key: 'animation', - text: strings.animation.capitalize(), - checkbox: values.animation, - }, - { - key: 'language', - text: strings['change language'], - subText: strings.lang, - }, - { - key: 'previewMode', - text: strings['preview mode'], - subText: values.previewMode, - }, - { - key: 'keybindings', - text: strings['key bindings'], - }, - { - key: 'confirm-on-exit', - text: strings['confirm on exit'], - checkbox: values.confirmOnExit, - }, - { - key: 'check-files', - text: strings['check file changes'], - checkbox: values.checkFiles, - }, - { - key: 'console', - text: strings.console.capitalize(), - subText: values.console, - }, - { - key: 'keyboardMode', - text: strings['keyboard mode'], - subText: strings[values.keyboardMode.toLocaleLowerCase()], - }, - { - key: 'vibrateOnTap', - text: strings['vibrate on tap'], - checkbox: values.vibrateOnTap, - }, - ]; - - gen.listItems($settingsList, settingsOptions, changeSetting); - - function changeSetting() { - const lanuguages = []; - const langList = constants.langList; - for (let lang in langList) { - lanuguages.push([lang, langList[lang]]); - } - switch (this.key) { - case 'animation': - appSettings.update({ - animation: !values.animation, - }); - app.classList.toggle('no-animation'); - this.value = values.animation; - break; - - case 'language': - dialogs - .select(this.text, lanuguages, { - default: values.lang, - }) - .then((res) => { - if (res === values.lang) return; - appSettings.value.lang = res; - appSettings.update(); - internalFs - .readFile(`${ASSETS_DIRECTORY}/lang/${res}.json`) - .then((res) => { - const text = helpers.decodeText(res.data); - window.strings = JSON.parse(text); - if (actionStack.has('settings-main')) actionStack.pop(); - }); - }); - break; - - case 'keybindings': - dialogs - .select(strings['key bindings'], [ - ['edit', strings.edit], - ['reset', strings.reset], - ]) - .then((res) => { - if (res === 'edit') { - actionStack.pop(); - actionStack.pop(); - openFile(KEYBINDING_FILE, { - render: true, - isUnsaved: false, - }); - } else { - helpers.resetKeyBindings(); - } - }); - break; - - case 'previewMode': - dialogs - .select(this.text, ['browser', 'inapp'], { - default: values.previewMode, - }) - .then((res) => { - if (res === values.previewMode) return; - appSettings.value.previewMode = res; - appSettings.update(); - this.changeSubText(res); - }); - break; - - case 'confirm-on-exit': - this.value = values.confirmOnExit = !values.confirmOnExit; - appSettings.update(); - break; - - case 'check-files': - this.value = values.checkFiles = !values.checkFiles; - appSettings.update(); - break; - - case 'console': - dialogs.select(strings['console'], ['legacy', 'eruda'], { - default: values.console, - }) - .then(res => { - if (res === values.console) return; - (async () => { - if (res === 'eruda') { - const fs = fsOperation(Url.join(DATA_STORAGE, 'eruda.js')); - if (!(await fs.exists())) { - dialogs.loader.create( - strings['downloading file'].replace('{file}', 'eruda.js'), - strings['downloading...'] - ); - const erudaScript = await ajax({ url: constants.ERUDA_CDN, responseType: 'text' }); - await fsOperation(DATA_STORAGE).createFile('eruda.js', erudaScript); - dialogs.loader.destroy(); - } - } - appSettings.value.console = res; - appSettings.update(); - this.changeSubText(res); - })(); - }); - break; - - case 'keyboardMode': - dialogs.select(strings['keyboard mode'], [ - ['CODE', strings.code], - ['NORMAL', strings.normal], - ], { - default: values.keyboardMode, - }) - .then(res => { - if (res === values.keyboardMode) return; - system.setInputType(res); - appSettings.value.keyboardMode = res; - appSettings.update(); - this.changeSubText(strings[res.toLocaleLowerCase()]); - }); - break; - - case 'vibrateOnTap': - this.value = !values.vibrateOnTap; - values.vibrateOnTap = this.value; - appSettings.update(); - break; - - default: - break; - } - } - - $page.appendChild($settingsList); - document.body.append($page); -} diff --git a/src/pages/settings/searchSettings.js b/src/pages/settings/searchSettings.js deleted file mode 100644 index c2fedd6a2..000000000 --- a/src/pages/settings/searchSettings.js +++ /dev/null @@ -1,68 +0,0 @@ -import Page from '../../components/page'; -import tag from 'html-tag-js'; -import gen from '../../components/gen'; - -export default function searchSettings() { - const page = Page(strings.search.capitalize()); - const settingsList = tag('div', { - className: 'main list', - }); - - actionStack.push({ - id: 'settings-search', - action: page.hide, - }); - page.onhide = function () { - actionStack.remove('settings-search'); - }; - - const values = appSettings.value.search; - - const settingsOptions = [ - { - key: 'case sensitive', - text: 'Case sensitive', - checkbox: values.caseSensitive, - }, - { - key: 'regexp', - text: 'RegExp', - checkbox: values.regExp, - }, - { - key: 'wholeWord', - text: 'Whole word', - checkbox: values.wholeWord, - }, - ]; - - gen.listItems(settingsList, settingsOptions, changeSetting); - - function changeSetting() { - switch (this.key) { - case 'case sensitive': - values.caseSensitive = !values.caseSensitive; - appSettings.update(); - this.value = values.caseSensitive; - break; - - case 'regexp': - values.regExp = !values.regExp; - appSettings.update(); - this.value = values.regExp; - break; - - case 'wholeWord': - values.wholeWord = !values.wholeWord; - appSettings.update(); - this.value = values.wholeWord; - break; - - default: - break; - } - } - - page.appendChild(settingsList); - document.body.append(page); -} diff --git a/src/pages/sponsor/index.js b/src/pages/sponsor/index.js new file mode 100644 index 000000000..401c649e3 --- /dev/null +++ b/src/pages/sponsor/index.js @@ -0,0 +1,7 @@ +/** + * Sponsor page + * @param {() => void} onclose + */ +export default function Sponsor(onclose) { + import("./sponsor").then((res) => res.default(onclose)); +} diff --git a/src/pages/sponsor/sponsor.js b/src/pages/sponsor/sponsor.js new file mode 100644 index 000000000..9d83c79fb --- /dev/null +++ b/src/pages/sponsor/sponsor.js @@ -0,0 +1,283 @@ +import "./style.scss"; +import fsOperation from "fileSystem"; +import ajax from "@deadlyjack/ajax"; +import Logo from "components/logo"; +import Page from "components/page"; +import alert from "dialogs/alert"; +import box from "dialogs/box"; +import loader from "dialogs/loader"; +import multiPrompt from "dialogs/multiPrompt"; +import actionStack from "lib/actionStack"; +import constants from "lib/constants"; +import helpers from "utils/helpers"; + +//TODO: fix (-1 means, user is not logged in to any google account) + +/** + * Sponsor page + * @param {() => void} onclose + */ +export default function Sponsor(onclose) { + const BASE_URL = "https://acode.app/res/"; + const $page = Page(strings.sponsor); + let cancel = false; + + actionStack.push({ + id: "sponsor_page", + action: $page.hide, + }); + + $page.onhide = function () { + onclose?.(); + cancel = true; + actionStack.remove("sponsor_page"); + }; + + app.append($page); + + iap.setPurchaseUpdatedListener( + (purchases) => { + if (Array.isArray(purchases)) { + (async function () { + const promises = []; + for (let purchase of purchases) { + promises.push( + new Promise((resolve, reject) => { + iap.consume( + purchase.purchaseToken, + (resCode) => { + purchase.consumed = resCode === iap.OK ? true : false; + purchase.consumeCode = resCode; + resolve(purchase); + }, + (err) => { + reject(err); + }, + ); + }), + ); + } + + const settledPromises = await Promise.allSettled(promises); + const rejectedPromise = settledPromises.find( + (promise) => promise.status === "rejected", + ); + let msg = ""; + if (rejectedPromise) { + msg = "Something went wrong.\n"; + msg += `Error: ${rejectedPromise.reason}\n`; + msg += `Code: ${rejectedPromise.value.resCode}`; + } else { + const blob = await ajax({ + url: BASE_URL + "6.jpeg", + responseType: "blob", + }).catch((err) => { + helpers.error(err); + }); + const url = URL.createObjectURL(blob); + msg = ``; + msg += "

    Thank you for supporting Acode!

    "; + } + + const order = settledPromises[0].value; + const [productId] = order.productIds; + const sponsorDetails = JSON.parse( + localStorage.getItem(`sponsor_${productId}`), + ); + + try { + const res = await ajax.post(`${constants.API_BASE}/sponsor`, { + data: { + ...sponsorDetails, + tier: productId, + packageName: BuildInfo.packageName, + purchaseToken: order.purchaseToken, + }, + }); + if (res.error) { + helpers.error(res.error); + } else { + box(strings.info.toUpperCase(), msg); + localStorage.removeItem(`sponsor_${productId}`); + $page.hide(); + } + } catch (error) { + helpers.error(error); + } finally { + loader.removeTitleLoader(); + } + })(); + } + }, + (err) => { + if (err !== iap.USER_CANCELED) { + alert(strings.error.toUpperCase(), err); + } + loader.removeTitleLoader(); + }, + ); + + loader.showTitleLoader(); + render() + .catch((error) => { + actionStack.pop(); + helpers.error(error); + }) + .finally(() => { + loader.removeTitleLoader(); + }); + + async function render() { + let products = await new Promise((resolve, reject) => { + iap.getProducts( + constants.SKU_LIST, + (products) => { + resolve(products); + }, + (err) => { + reject(err); + }, + ); + }); + + if (cancel) return; + + products = products.sort((a, b) => { + const aPrice = Number.parseFloat(a.price.replace(/[^0-9.]/g, "")); + const bPrice = Number.parseFloat(b.price.replace(/[^0-9.]/g, "")); + return bPrice - aPrice; + }); + + $page.body = ( +
    +
    + +

    Sponsor Acode

    +

    Support the future of mobile coding

    +
    +
    + {products.map((product) => ( +
    +
    +
    + + {onlyTitle(product.title)} +
    +
    {product.price}/Month
    +
    +
    + +
    + ))} +
    +
    + ); + } +} + +async function handlePurchase(productId, title) { + let image; + let result; + const extraFields = []; + + if (["silver", "gold", "platinum", "titanium"].includes(productId)) { + extraFields.push({ + placeholder: "Website", + required: false, + id: "website", + type: "url", + }); + } + + if (productId === "titanium") { + extraFields.push({ + placeholder: "Tagline", + required: false, + id: "tagline", + type: "text", + }); + } + + if (["gold", "platinum", "titanium"].includes(productId)) { + extraFields.push({ + placeholder: "Logo/Image (500KB max)", + required: false, + type: "text", + id: "image", + onclick() { + sdcard.openDocumentFile(async (res) => { + if (res.length > 500000) { + this.setError("File size exceeds 500KB"); + return; + } + + this.setError(""); + this.value = res.filename; + const arraybuffer = await fsOperation(res.uri).readFile(); + const blob = new Blob([arraybuffer], { type: res.type }); + const reader = new FileReader(); + reader.onload = () => { + image = reader.result; + + if (result && typeof result === "object") { + result.image = image; + localStorage.setItem( + `sponsor_${productId}`, + JSON.stringify(result), + ); + } + }; + reader.readAsDataURL(blob); + }, "image/*"); + }, + }); + } + + result = await multiPrompt(onlyTitle(title), [ + { + placeholder: "Name", + required: true, + id: "name", + }, + { + placeholder: "Email", + required: false, + id: "email", + type: "email", + match: + /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, + }, + ...extraFields, + { + placeholder: "Show in sponsors list", + required: false, + id: "public", + type: "checkbox", + value: true, + }, + ]); + + if (!result) { + return; + } + + if (image) { + result.image = image; + } + + localStorage.setItem(`sponsor_${productId}`, JSON.stringify(result)); + loader.showTitleLoader(); + iap.purchase(productId); +} + +function onlyTitle(title) { + return title.replace(" (Acode - code editor | FOSS)", ""); +} diff --git a/src/pages/sponsor/style.scss b/src/pages/sponsor/style.scss new file mode 100644 index 000000000..c88196422 --- /dev/null +++ b/src/pages/sponsor/style.scss @@ -0,0 +1,128 @@ +#sponsor-page { + overflow: auto; + + .tier-icon { + display: inline-block; + width: 24px; + height: 24px; + margin-right: 8px; + border-radius: 50%; + + &.crystal { + background: linear-gradient(45deg, #95a5a6, #bdc3c7); + } + + &.bronze { + background: linear-gradient(45deg, #cd7f32, #ff8c42); + } + + &.silver { + background: linear-gradient(45deg, #c0c0c0, #e6e6fa); + } + + &.gold { + background: linear-gradient(45deg, #ffd700, #ffed4e); + } + + &.platinum { + background: linear-gradient(45deg, #e5e4e2, #ffffff); + } + + &.titanium { + background: linear-gradient(45deg, #878681, #c4c4b0); + } + } + + .header { + text-align: center; + margin-bottom: 10px; + animation: fadeInUp 0.8s ease-out; + } + + h1 { + font-size: 28px; + font-weight: 700; + } + + .subtitle { + font-size: 16px; + opacity: 0.9; + margin-bottom: 10px; + } + + .tier { + width: 90%; + max-width: 400px; + margin: 0 auto; + border-radius: 16px; + padding: 20px; + margin-bottom: 15px; + background-color: var(--popup-background-color); + color: var(--popup-text-color); + border: 1px solid var(--border-color); + transition: all 0.3s ease; + animation: fadeInUp 0.8s ease-out calc(0.6s + var(--delay, 0s)) both; + box-sizing: border-box; + } + + .tier-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 10px; + } + + .tier-name { + font-size: 18px; + font-weight: 600; + display: flex; + align-items: center; + } + + .tier-icon { + width: 24px; + height: 24px; + border-radius: 50%; + margin-right: 10px; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + } + + .tier-price { + font-size: 16px; + font-weight: 600; + opacity: 0.9; + } + + .tier-description { + font-size: 14px; + opacity: 0.8; + line-height: 1.4; + } + + .purchase-btn { + background: var(--button-background-color); + color: var(--button-text-color); + border: none; + padding: 10px 20px; + border-radius: 20px; + font-size: 14px; + font-weight: 600; + cursor: pointer; + transition: all 0.3s ease; + width: 100%; + margin-top: 10px; + } + + .purchase-btn:active { + background: linear-gradient(45deg, #44a08d, #4ecdc4); + } + + .purchase-btn:disabled { + opacity: 0.5; + cursor: not-allowed; + transform: none; + } +} \ No newline at end of file diff --git a/src/pages/sponsors/index.js b/src/pages/sponsors/index.js new file mode 100644 index 000000000..f32cf6be6 --- /dev/null +++ b/src/pages/sponsors/index.js @@ -0,0 +1,3 @@ +export default function Sponsors() { + import("./sponsors").then((res) => res.default()); +} diff --git a/src/pages/sponsors/sponsors.js b/src/pages/sponsors/sponsors.js new file mode 100644 index 000000000..b9e12f55c --- /dev/null +++ b/src/pages/sponsors/sponsors.js @@ -0,0 +1,216 @@ +import ajax from "@deadlyjack/ajax"; +import "./style.scss"; +import Page from "components/page"; +import toast from "components/toast"; +import Ref from "html-tag-js/ref"; +import actionStack from "lib/actionStack"; +import constants from "lib/constants"; +import Sponsor from "pages/sponsor"; +import helpers from "utils/helpers"; + +export default function Sponsors() { + const page = Page("Sponsors"); + const titaniumSponsors = Ref(); + const platinumSponsors = Ref(); + const goldSponsors = Ref(); + const silverSponsors = Ref(); + const bronzeSponsors = Ref(); + const crystalSponsors = Ref(); + let cancel = false; + + actionStack.push({ + id: "sponsors_page", + action: page.hide, + }); + + page.onhide = () => { + actionStack.remove("sponsors_page"); + cancel = true; + }; + + page.body = ( +
    +
    +

    + Join our community of supporters and help shape the future of mobile + development +

    + +
    +
    +

    Acode's Sponsors

    +
    +
    +
    + Titanium +
    +
    +
    +
    +
    + Platinum +
    +
    +
    +
    +
    + Gold +
    +
    +
    +
    +
    + Silver +
    +
    +
    +
    +
    + Bronze +
    +
    +
    +
    +
    + Crystal +
    +
    +
    +
    +
    +
    + ); + + render(); + app.append(page); + + async function render() { + let sponsors = []; + try { + const res = await ajax.get(`${constants.API_BASE}/sponsors`); + if (res.error) { + toast("Unable to load sponsors..."); + console.error("Error loading sponsors:", res.error); + } else { + sponsors = res; + localStorage.setItem("cached_sponsors", JSON.stringify(sponsors)); + } + } catch (error) { + toast("Unable to load sponsors..."); + console.error("Error loading sponsors:", error); + } + + if (!sponsors.length && "cached_sponsors" in localStorage) { + try { + sponsors = JSON.parse(localStorage.getItem("cached_sponsors")) || []; + } catch (error) { + console.error("Failed to parse cached sponsors", error); + } + } + + titaniumSponsors.content = ""; + platinumSponsors.content = ""; + goldSponsors.content = ""; + silverSponsors.content = ""; + bronzeSponsors.content = ""; + crystalSponsors.content = ""; + + for (const sponsor of sponsors) { + // Append each sponsor to the corresponding tier + switch (sponsor.tier) { + case "titanium": + titaniumSponsors.append(); + break; + case "platinum": + platinumSponsors.append(); + break; + case "gold": + goldSponsors.append(); + break; + case "silver": + silverSponsors.append(); + break; + case "bronze": + bronzeSponsors.append(); + break; + case "crystal": + crystalSponsors.append(); + break; + } + } + } +} + +/** + * Sponsor Card Component + * @param {object} props + * @param {string} props.name - The name of the sponsor + * @param {string} props.image - The image URL of the sponsor + * @param {string} props.website - The website URL of the sponsor + * @param {string} props.tier - The tier of the sponsor + * @param {string} props.tagline - The tagline of the sponsor + * @returns {JSX.Element} + */ +function SponsorCard({ name, image, website, tier, tagline }) { + // for crystal tier only text, for bronze slightly bigger text, for silver bigger clickable text, + // for gold text with image, for platinum and titanium text with big image + + return ( +
    + {image && ( +
    + +
    + )} +
    {name}
    + {tagline &&
    {tagline}
    } + {website && {website}} +
    + ); +} + +/** + * Handle link click + * @param {MouseEvent} e + * @returns + */ +function handleLinkClick(e) { + const target = e.target.closest(".sponsor-card"); + if (!target) return; + const { website } = target.dataset; + if (!website) return; + if (!website.startsWith("http")) { + website = "http://" + website; + } + system.openInBrowser(website); +} diff --git a/src/pages/sponsors/style.scss b/src/pages/sponsors/style.scss new file mode 100644 index 000000000..eb5f6ab89 --- /dev/null +++ b/src/pages/sponsors/style.scss @@ -0,0 +1,173 @@ +#sponsors-page { + .tier-icon { + display: inline-block; + width: 24px; + height: 24px; + border-radius: 50%; + margin-right: 8px; + + &.crystal { + background: linear-gradient(45deg, #95a5a6, #bdc3c7); + } + + &.bronze { + background: linear-gradient(45deg, #cd7f32, #ff8c42); + } + + &.silver { + background: linear-gradient(45deg, #c0c0c0, #e6e6fa); + } + + &.gold { + background: linear-gradient(45deg, #ffd700, #ffed4e); + } + + &.platinum { + background: linear-gradient(45deg, #e5e4e2, #ffffff); + } + + &.titanium { + background: linear-gradient(45deg, #878681, #c4c4b0); + } + } + + .cta-section { + text-align: center; + } + + .cta-button { + background: linear-gradient(45deg, #ff6b6b, #4ecdc4); + color: white; + border: none; + padding: 18px 40px; + border-radius: 30px; + font-size: 18px; + font-weight: 600; + cursor: pointer; + transition: all 0.3s ease; + margin-bottom: 15px; + width: 90%; + max-width: 400px; + display: flex; + align-items: center; + justify-content: center; + margin: auto; + + .icon { + margin-left: 10px; + } + } + + .cta-text { + font-size: 14px; + opacity: 0.8; + line-height: 1.4; + padding: 1rem; + } + + .sponsors-container { + padding: 1rem; + + h2 { + text-align: center; + font-weight: 700; + } + + .tier-name { + font-size: 18px; + font-weight: 600; + display: flex; + align-items: center; + margin: 1rem 0 0.5rem 0; + } + + .sponsors { + display: flex; + flex-wrap: wrap; + gap: 1rem; + + &:empty::after { + content: attr(data-empty-message); + display: block; + width: 100%; + padding: 2rem; + font-style: italic; + } + } + + .sponsor-card { + flex-grow: 1; + min-width: 150px; + background: var(--popup-background-color); + color: var(--popup-text-color); + border-radius: 12px; + padding: 15px; + text-align: center; + backdrop-filter: blur(10px); + border: 1px solid var(--border-color); + transition: all 0.3s ease; + + .sponsor-avatar { + width: 50px; + height: 50px; + border-radius: 50%; + display: flex; + margin: 0 auto 10px; + align-items: center; + justify-content: center; + font-weight: bold; + font-size: 18px; + overflow: hidden; + background-color: currentColor; + + img { + max-width: 100%; + max-height: 100%; + object-fit: cover; + } + } + + .sponsor-name { + font-size: 14px; + font-weight: 500; + margin-bottom: 5px; + } + + .sponsor-website { + opacity: 0.6; + font-size: 12px; + } + + &.crystal, + &.bronze, + &.silver { + .sponsor-avatar { + display: none; + } + } + + &.bronze, + &.crystal { + pointer-events: none; + } + + &.silver, + &.bronze, + &.gold, + &.platinum, + &.titanium { + .sponsor-name { + font-size: 16px; + } + } + + &.platinum, + &.titanium { + .sponsor-avatar { + width: 100px; + height: 100px; + } + } + } + } +} \ No newline at end of file diff --git a/src/pages/themeSetting/index.js b/src/pages/themeSetting/index.js new file mode 100644 index 000000000..259ffdd57 --- /dev/null +++ b/src/pages/themeSetting/index.js @@ -0,0 +1,7 @@ +export default function themeSetting(...args) { + import(/* webpackChunkName: "themeSetting" */ "./themeSetting").then( + (module) => { + module.default(...args); + }, + ); +} diff --git a/src/pages/themeSetting/list-item.hbs b/src/pages/themeSetting/list-item.hbs deleted file mode 100644 index 2a0274e7d..000000000 --- a/src/pages/themeSetting/list-item.hbs +++ /dev/null @@ -1,13 +0,0 @@ -
    - -
    - {{name}} -
    - {{#default}} - - {{/default}} - {{#paid}} - - {{/paid}} -
    \ No newline at end of file diff --git a/src/pages/themeSetting/themeSetting.hbs b/src/pages/themeSetting/themeSetting.hbs deleted file mode 100644 index 862955599..000000000 --- a/src/pages/themeSetting/themeSetting.hbs +++ /dev/null @@ -1,12 +0,0 @@ -
    -
    - App - Editor -
    -
    -
    \ No newline at end of file diff --git a/src/pages/themeSetting/themeSetting.include.js b/src/pages/themeSetting/themeSetting.include.js deleted file mode 100644 index 9941d2585..000000000 --- a/src/pages/themeSetting/themeSetting.include.js +++ /dev/null @@ -1,220 +0,0 @@ -import './themeSetting.scss'; -import tag from 'html-tag-js'; -import mustache from 'mustache'; -import Page from '../../components/page'; -import constants from '../../lib/constants'; -import $_template from './themeSetting.hbs'; -import $_list_item from './list-item.hbs'; -import searchBar from '../../components/searchbar'; -import dialogs from '../../components/dialogs'; -import CustomTheme from '../customTheme/customTheme'; - -export default function () { - const $page = Page(strings.theme.capitalize()); - const $container = tag.parse($_template, {}); - const $search = tag('i', { - className: 'icon search', - attr: { - action: 'search', - }, - }); - const $themePreview = tag('div', { - id: 'theme-preview', - }); - let editor = ace.edit($themePreview); - - editor.setTheme(appSettings.value.editorTheme); - editor.setFontSize(appSettings.value.fontSize); - editor.session.setOptions({ - mode: 'ace/mode/javascript', - }); - editor.setReadOnly(true); - editor.session.setValue( - 'function foo(){\n' + - '\tconst array = [1, 1, 2, 3, 5, 5, 1];\n' + - '\tconst uniqueArray = [...new Set(array)];\n' + - '\tconsole.log(uniqueArray);\n' + - '\tconsole.log(0.2 + 0.1 === 0.3);\n' + - "\tconsole.log('I love Acode editor')\n" + - '}\n' + - 'foo();', - ); - editor.gotoLine(8); - $themePreview.append( - tag('div', { - id: 'theme-preview-header', - }), - ); - $themePreview.classList.add(appSettings.value.editorFont); - - actionStack.push({ - id: 'appTheme', - action: () => { - editor.destroy(); - $page.hide(); - $page.removeEventListener('click', clickHandler); - }, - }); - - $page.onhide = () => actionStack.remove('appTheme'); - $page.append($container); - $page.querySelector('header').append($search); - - app.append($page); - - $page.addEventListener('click', clickHandler); - render(); - - function render(mode = 'app') { - let themeList = [], - html = '', - defaultValue = () => false; - - if (mode === 'editor' && innerHeight * 0.3 >= 120) - $container.append($themePreview); - else $themePreview.remove(); - - if (mode === 'app') { - if (!DOES_SUPPORT_THEME) - html = - '
    ' + - '' + - '
    ' + - '' + - strings['unsupported device'] + - '' + - '
    ' + - '
    '; - - themeList = constants.appThemeList; - defaultValue = (theme) => appSettings.value.appTheme === theme; - } else if (mode === 'editor') { - themeList = constants.editorThemeList; - defaultValue = (theme) => - appSettings.value.editorTheme === `ace/theme/${theme}`; - } else if (mode === 'md') { - } - - const themes = Object.keys(themeList).sort(); - for (let i = 0; i < themes.length; ++i) { - const theme = themes[i]; - let paid = false; - let disable = false; - const themeData = themeList[theme]; - - if (mode === 'app') { - paid = IS_FREE_VERSION && !themeData.isFree; - disable = !DOES_SUPPORT_THEME; - } - - html += mustache.render($_list_item, { - name: theme.replace(/_/g, ' ').capitalize(), - theme, - mode, - type: themeData.type, - default: defaultValue(theme), - disable, - paid, - }); - } - $page.get('#theme-list').innerHTML = html; - } - - /** - * - * @param {MouseEvent} e - */ - function clickHandler(e) { - const $target = e.target; - if (!($target instanceof HTMLElement)) return; - const action = $target.getAttribute('action'); - if (!action) return; - - switch (action) { - case 'select': - const $el = $page.get('.options>.active'); - if ($el) $el.classList.remove('active'); - $target.classList.add('active'); - render($target.getAttribute('value')); - break; - - case 'select-theme': - const mode = $target.getAttribute('mode'); - const theme = $target.getAttribute('name'); - const type = $target.getAttribute('type'); - if (mode === 'app') onSelectAppTheme(theme, type); - else if (mode === 'editor') onSelectEditorTheme(theme, type); - else if (mode === 'md') { - } - break; - - case 'search': - searchBar($page.get('#theme-list')); - break; - - default: - break; - } - } - - function onSelectEditorTheme(res) { - updateTheme('editor', res); - } - - /** - * Selects app theme - * - * @param {String} res - * @param {String} type - * @returns - */ - function onSelectAppTheme(res, type) { - const theme = constants.appThemeList[res]; - if (!theme) return; - - const link = - 'https://play.google.com/store/apps/details?id=com.foxdebug.acode'; - if (!theme.isFree && IS_FREE_VERSION) { - dialogs - .box( - strings.info.toUpperCase(), - 'Hi dear user, dark modes are available in paid version of the app. ' + - 'Please support this project by buying the paid version.', - ) - .onhide(() => { - system.openInBrowser(link); - }); - return; - } - - if (theme.name === 'custom') { - CustomTheme(); - return; - } - updateTheme('app', theme.name); - } - - function updateTheme(mode, theme) { - const setting = {}; - let oldTheme; - if (mode === 'app') { - setting.appTheme = theme; - oldTheme = appSettings.value.appTheme; - } else if (mode === 'editor') { - const themeId = 'ace/theme/' + theme; - editorManager.editor.setTheme(themeId); - editor.setTheme(themeId); - setting.editorTheme = themeId; - oldTheme = appSettings.value.editorTheme.split('/').pop(); - } else return; - - const $checkIcon = tag.get(`#theme-list>[name="${oldTheme}"]>.icon.check`); - if ($checkIcon) $checkIcon.remove(); - - appSettings.update(setting); - if (mode === 'app') window.restoreTheme(); - - tag.get(`#theme-list>[name="${theme}"]`).innerHTML += - ''; - } -} diff --git a/src/pages/themeSetting/themeSetting.js b/src/pages/themeSetting/themeSetting.js index 30b168c64..671f023d3 100644 --- a/src/pages/themeSetting/themeSetting.js +++ b/src/pages/themeSetting/themeSetting.js @@ -1,7 +1,264 @@ -export default function themeSetting(...args) { - import(/* webpackChunkName: "themeSetting" */ './themeSetting.include').then( - (module) => { - module.default(...args); - }, - ); -} +import "./themeSetting.scss"; +import Page from "components/page"; +import searchBar from "components/searchbar"; +import TabView from "components/tabView"; +import alert from "dialogs/alert"; +import Ref from "html-tag-js/ref"; +import actionStack from "lib/actionStack"; +import removeAds from "lib/removeAds"; +import appSettings from "lib/settings"; +import CustomTheme from "pages/customTheme"; +import ThemeBuilder from "theme/builder"; +import themes from "theme/list"; +import helpers from "utils/helpers"; + +export default function () { + const $page = Page(strings.theme.capitalize()); + const $search = ; + const $themePreview =
    ; + const list = new Ref(); + const editor = ace.edit($themePreview); + + const session = ace.createEditSession(""); + const activeFile = editorManager.activeFile; + + if (activeFile && activeFile.type === "editor") { + const currentSession = activeFile.session; + session.setMode(currentSession.getMode()); + session.setValue(currentSession.getValue()); + } else { + // Fallback content for preview + session.setMode("ace/mode/javascript"); + session.setValue(`// Acode is awesome! +const message = "Welcome to Acode"; +console.log(message);`); + } + + editor.setReadOnly(true); + editor.setSession(session); + editor.renderer.setMargin(0, 0, -16, 0); + + actionStack.push({ + id: "appTheme", + action: () => { + editor.destroy(); + $page.hide(); + $page.removeEventListener("click", clickHandler); + }, + }); + + $page.onhide = () => { + helpers.hideAd(); + actionStack.remove("appTheme"); + }; + + $page.body = ( + +
    + + App + + + Editor + +
    +
    +
    + ); + $page.querySelector("header").append($search); + + app.append($page); + renderAppThemes(); + helpers.showAd(); + + $page.addEventListener("click", clickHandler); + + function renderAppThemes() { + $themePreview.remove(); + const content = []; + + if (!DOES_SUPPORT_THEME) { + content.push( +
    + +
    + {strings["unsupported device"]} +
    +
    , + ); + } + + const currentTheme = appSettings.value.appTheme; + let $currentItem; + themes.list().forEach((theme) => { + const isCurrentTheme = theme.id === currentTheme; + const isPremium = theme.version === "paid" && IS_FREE_VERSION; + const $item = ( + setAppTheme(theme, isPremium)} + /> + ); + content.push($item); + if (isCurrentTheme) $currentItem = $item; + }); + + list.el.content = content; + $currentItem?.scrollIntoView(); + } + + function renderEditorThemes() { + const currentTheme = appSettings.value.editorTheme; + const themePrefix = "ace/theme/"; + const fullThemePath = currentTheme.startsWith(themePrefix) + ? currentTheme + : themePrefix + currentTheme; + + editor.setTheme(fullThemePath); + if (innerHeight * 0.3 >= 120) { + $page.body.append($themePreview); + editor.resize(); + } else { + $themePreview.remove(); + } + + const themeList = ace.require("ace/ext/themelist"); + let $currentItem; + list.el.content = themeList.themes.map((theme) => { + const isCurrent = theme.theme === fullThemePath; + const $item = ( + setEditorTheme(theme)} + /> + ); + if (isCurrent) $currentItem = $item; + return $item; + }); + $currentItem?.scrollIntoView(); + } + + /** + * + * @param {MouseEvent} e + */ + function clickHandler(e) { + const $target = e.target; + if (!($target instanceof HTMLElement)) return; + const action = $target.getAttribute("action"); + if (!action) return; + + switch (action) { + case "search": + searchBar(list.el); + break; + + default: + break; + } + } + + /** + * Sets the selected theme + * @param {ThemeBuilder} theme + */ + async function setAppTheme(theme, buy) { + if (!DOES_SUPPORT_THEME) return; + + if (buy) { + try { + await removeAds(); + renderAppThemes(); + } catch (e) { + return; + } + } + + if (theme.id === "custom") { + CustomTheme(); + return; + } + + themes.apply(theme.id, true); + updateCheckedItem(theme.name); + } + + /** + * Sets the selected editor theme + * @param {object} param0 + * @param {string} param0.theme + */ + function setEditorTheme({ caption, theme }) { + if (appSettings.value.appTheme.toLowerCase() === "system") { + alert( + "Info", + "App theme is set to 'System'. Changing the editor theme will not affect the editor appearance.", + ); + return; + } + editorManager.editor.setTheme(theme); + editor.setTheme(theme); // preview + appSettings.update( + { + editorTheme: theme, + }, + false, + ); + updateCheckedItem(caption); + } + + /** + * Updates the checked item + * @param {string} theme + */ + function updateCheckedItem(theme) { + list.get('[checked="true"]')?.uncheck(); + list.get(`[theme="${theme}"]`)?.check(); + } + + function Item({ name, color, isDark, onclick, isCurrent, isPremium }) { + const check = ; + const star = ; + let style = {}; + let className = "icon color"; + + if (color) { + style = { color }; + } else if (isDark) { + className += " dark"; + } else { + className += " light"; + } + + const $el = ( +
    + +
    + {name} +
    + {isCurrent && check} + {isPremium && star} +
    + ); + + $el.uncheck = () => { + check.remove(); + $el.removeAttribute("checked"); + }; + $el.check = () => { + $el.append(check); + $el.setAttribute("checked", true); + }; + return $el; + } +} diff --git a/src/pages/themeSetting/themeSetting.scss b/src/pages/themeSetting/themeSetting.scss index 3efe4fb30..f8328199c 100644 --- a/src/pages/themeSetting/themeSetting.scss +++ b/src/pages/themeSetting/themeSetting.scss @@ -4,7 +4,6 @@ #theme-preview:not(:empty) { height: 120px; - margin-top: 10px; box-shadow: 0 0 4px rgba(0, 0, 0, 0.2); box-shadow: 0 0 4px var(--box-shadow-color); pointer-events: none; @@ -14,56 +13,7 @@ background-color: var(--primary-color); } - #theme-preview-header { - position: fixed; - top: auto; - bottom: 120px; - left: 0; - height: 10px; - background-color: inherit; - } - - .options { - display: flex; - height: 40px; - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); - box-shadow: 0 1px 4px var(--box-shadow-color); - - [action='select'] { - position: relative; - display: flex; - flex: 1; - align-items: center; - justify-content: center; - box-sizing: border-box; - - &.active::after { - content: ''; - position: absolute; - bottom: 0; - left: 0; - height: 2px; - width: 100%; - animation: strech 300ms ease 1; - background-color: rgb(51, 153, 255); - background-color: var(--accent-color); - - @keyframes strech { - from { - opacity: 0; - transform: scale(0, 1); - } - - to { - opacity: 1; - transform: scale(1, 1); - } - } - } - } - } - #theme-list { flex: 1; } -} +} \ No newline at end of file diff --git a/src/pages/welcome/index.js b/src/pages/welcome/index.js new file mode 100644 index 000000000..4fd02fcb4 --- /dev/null +++ b/src/pages/welcome/index.js @@ -0,0 +1 @@ +export { default } from "./welcome"; diff --git a/src/pages/welcome/welcome.js b/src/pages/welcome/welcome.js new file mode 100644 index 000000000..53972af1b --- /dev/null +++ b/src/pages/welcome/welcome.js @@ -0,0 +1,173 @@ +import "./welcome.scss"; +import Logo from "components/logo"; +import actionStack from "lib/actionStack"; +import constants from "lib/constants"; +import EditorFile from "lib/editorFile"; + +/** + * Opens the Welcome tab as an EditorFile page + */ +export default function openWelcomeTab() { + // Check if welcome tab is already open + const existingFile = editorManager.files.find((f) => f.id === "welcome-tab"); + if (existingFile) { + existingFile.makeActive(); + return; + } + + const welcomeContent = createWelcomeContent(); + + const welcomeFile = new EditorFile("Welcome", { + id: "welcome-tab", + render: true, + type: "page", + content: welcomeContent, + tabIcon: "icon acode", + hideQuickTools: true, + }); + + // Set custom subtitle for the header + welcomeFile.setCustomTitle(() => "Get Started"); + + actionStack.push({ + id: "welcome-tab", + action: () => welcomeFile.remove(), + }); +} + +/** + * Creates the welcome tab content + * @returns {HTMLElement} + */ +function createWelcomeContent() { + return ( +
    + {/* Hero Section */} +
    + +
    +

    Welcome to Acode

    +

    Powerful code editor for Android

    +
    +
    + + {/* Get Started Section */} +
    +

    GET STARTED

    +
    + acode.exec("new-file")} + /> + acode.exec("open-folder")} + /> + acode.exec("recent")} + /> + acode.exec("command-palette")} + /> +
    +
    + + {/* Configure Section */} +
    +

    CONFIGURE

    +
    + acode.exec("open", "settings")} + /> + acode.exec("change-app-theme")} + /> + acode.exec("open", "plugins")} + /> +
    +
    + + {/* Learn Section */} +
    +

    LEARN

    +
    + acode.exec("open", "help")} + /> + acode.exec("open", "about")} + /> +
    +
    + + {/* Links Section */} +
    +

    CONNECT

    +
    + + + + +
    +
    +
    + ); +} + +/** + * Action row component + */ +function ActionRow({ icon, label, shortcut, onClick }) { + return ( +
    + + {label} + {shortcut && {shortcut}} +
    + ); +} + +/** + * Link item component - opens URL in external browser + */ +function LinkItem({ icon, label, url }) { + const handleClick = (e) => { + e.preventDefault(); + system.openInBrowser(url); + }; + + return ( + + + {label} + + ); +} diff --git a/src/pages/welcome/welcome.scss b/src/pages/welcome/welcome.scss new file mode 100644 index 000000000..ae94a415d --- /dev/null +++ b/src/pages/welcome/welcome.scss @@ -0,0 +1,224 @@ +#welcome-tab { + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + min-height: 100%; + height: auto; + padding: 32px 24px; + overflow-y: auto; + overflow-x: hidden; + background-color: var(--secondary-color); + + // Hero Header + .welcome-header { + display: flex; + align-items: center; + gap: 16px; + margin-bottom: 48px; + + .logo { + width: 64px; + height: 64px; + flex-shrink: 0; + + &::after { + background-size: 48px; + } + + &::before { + background: radial-gradient(circle, + color-mix(in srgb, var(--button-background-color) 30%, transparent) 0%, + transparent 70%); + } + } + + .welcome-header-text { + h1 { + font-size: 20px; + font-weight: 600; + color: var(--primary-text-color); + margin: 0 0 4px 0; + letter-spacing: -0.3px; + } + + .tagline { + font-size: 13px; + color: color-mix(in srgb, var(--secondary-text-color) 60%, transparent); + margin: 0; + } + } + } + + // Section Styles + .welcome-section { + width: 100%; + max-width: 400px; + margin-bottom: 32px; + + .section-label { + font-size: 11px; + font-weight: 600; + letter-spacing: 1px; + color: color-mix(in srgb, var(--secondary-text-color) 50%, transparent); + margin: 0 0 12px 0; + padding-left: 4px; + } + } + + // Action List + .action-list { + display: flex; + flex-direction: column; + gap: 2px; + } + + .action-row { + display: flex; + align-items: center; + gap: 12px; + padding: 10px 12px; + border-radius: 6px; + cursor: pointer; + transition: background-color 0.15s ease; + + &:hover, + &:active { + background-color: color-mix(in srgb, var(--popup-background-color) 40%, transparent); + } + + .icon { + font-size: 16px; + color: color-mix(in srgb, var(--secondary-text-color) 70%, transparent); + width: 20px; + text-align: center; + } + + .action-label { + flex: 1; + font-size: 14px; + color: var(--secondary-text-color); + } + + .action-shortcut { + font-size: 12px; + font-family: 'Roboto Mono', monospace; + color: color-mix(in srgb, var(--secondary-text-color) 40%, transparent); + letter-spacing: 0.5px; + } + } + + // Links Section + .welcome-links { + margin-top: 16px; + + .link-row { + display: flex; + flex-wrap: wrap; + gap: 8px; + justify-content: flex-start; + } + + .link-item { + display: inline-flex; + align-items: center; + gap: 8px; + padding: 10px 16px; + border-radius: 8px; + text-decoration: none; + color: var(--secondary-text-color); + font-size: 13px; + font-weight: 500; + transition: all 0.15s ease; + background-color: color-mix(in srgb, var(--popup-background-color) 25%, transparent); + border: 1px solid color-mix(in srgb, var(--border-color) 20%, transparent); + + &:hover, + &:active { + background-color: color-mix(in srgb, var(--popup-background-color) 50%, transparent); + border-color: color-mix(in srgb, var(--border-color) 40%, transparent); + transform: translateY(-1px); + } + + .icon { + font-size: 16px; + color: color-mix(in srgb, var(--secondary-text-color) 80%, transparent); + } + } + } +} + +// Responsive adjustments for smaller screens +@media (max-width: 360px) { + #welcome-tab { + padding: 24px 16px; + + .welcome-header { + flex-direction: column; + text-align: center; + margin-bottom: 36px; + + .logo { + width: 56px; + height: 56px; + + &::after { + background-size: 40px; + } + } + + .welcome-header-text h1 { + font-size: 18px; + } + } + + .welcome-section { + margin-bottom: 24px; + } + + .action-row { + padding: 8px 10px; + + .action-label { + font-size: 13px; + } + + .action-shortcut { + font-size: 11px; + } + } + + .welcome-links .link-row { + justify-content: center; + } + } +} + +// Larger screens - center content better +@media (min-width: 600px) { + #welcome-tab { + .welcome-section { + max-width: 480px; + } + + .action-row { + padding: 12px 16px; + } + } +} + +// Discord icon +.icon.discord { + position: relative; + + &::before { + content: ''; + display: block; + width: 16px; + height: 16px; + background-image: url(../../pages/about/discord.svg); + background-size: contain; + background-repeat: no-repeat; + background-position: center; + } +} \ No newline at end of file diff --git a/src/palettes/changeEncoding/index.js b/src/palettes/changeEncoding/index.js new file mode 100644 index 000000000..898ed5ab9 --- /dev/null +++ b/src/palettes/changeEncoding/index.js @@ -0,0 +1,45 @@ +import fsOperation from "fileSystem"; +import palette from "components/palette"; +import confirm from "dialogs/confirm"; +import encodings from "utils/encodings"; + +export default function changeEncoding() { + palette(generateHints, reopenWithNewEncoding, strings.encoding); +} + +function generateHints() { + return Object.keys(encodings).map((id) => { + const encoding = encodings[id]; + const aliases = encoding.aliases.join(", "); + return { + value: id, + text: `
    + ${encoding.label} + ${aliases} +
    `, + }; + }); +} + +export async function reopenWithNewEncoding(encoding) { + const file = editorManager.activeFile; + const editor = editorManager.editor; + const message = strings["change encoding"] + .replace("{file}", file.filename) + .replace("{encoding}", encoding); + const confirmation = await confirm(strings.warning, message); + + if (!confirmation) return; + + const text = await fsOperation(file.uri).readFile(encoding); + const cursorPosition = editor.getCursorPosition(); + + file.encoding = encoding; + file.session.setValue(text); + file.isUnsaved = false; + file.markChanged = false; + editor.moveCursorToPosition(cursorPosition); + + editorManager.onupdate("encoding"); + editorManager.emit("update", "encoding"); +} diff --git a/src/palettes/changeMode/index.js b/src/palettes/changeMode/index.js new file mode 100644 index 000000000..c2e3e2d96 --- /dev/null +++ b/src/palettes/changeMode/index.js @@ -0,0 +1,36 @@ +import palette from "components/palette"; +import Path from "utils/Path"; + +export default function changeMode() { + palette(generateHints, onselect, strings["syntax highlighting"]); +} + +function generateHints() { + const { modes } = ace.require("ace/ext/modelist"); + + return modes.map(({ caption, mode, extensions }) => { + return { + value: mode, + text: `
    + ${caption} + ${mode} +
    ${extensions}`, + }; + }); +} + +function onselect(mode) { + const activeFile = editorManager.activeFile; + + let modeAssociated; + try { + modeAssociated = JSON.parse(localStorage.modeassoc || "{}"); + } catch (error) { + modeAssociated = {}; + } + + modeAssociated[Path.extname(activeFile.filename)] = mode; + localStorage.modeassoc = JSON.stringify(modeAssociated); + + activeFile.setMode(mode); +} diff --git a/src/palettes/changeTheme/index.js b/src/palettes/changeTheme/index.js new file mode 100644 index 000000000..be76c6fa7 --- /dev/null +++ b/src/palettes/changeTheme/index.js @@ -0,0 +1,115 @@ +import "./style.scss"; +import palette from "components/palette"; +import appSettings from "lib/settings"; +import { isDeviceDarkTheme } from "lib/systemConfiguration"; +import themes from "theme/list"; +import { updateSystemTheme } from "theme/preInstalled"; + +export default function changeTheme(type = "editor") { + palette( + () => generateHints(type), + (value) => onselect(value), + strings[type === "editor" ? "editor theme" : "app theme"], + ); +} + +function generateHints(type) { + if (type === "editor") { + const themeList = ace.require("ace/ext/themelist"); + const currentTheme = appSettings.value.editorTheme; + const themePrefix = "ace/theme/"; + + return themeList.themes.map((theme) => { + const isCurrent = + theme.theme === + (currentTheme.startsWith(themePrefix) + ? currentTheme + : themePrefix + currentTheme); + + return { + value: JSON.stringify({ type: "editor", theme: theme.theme }), + text: `
    + ${theme.caption} + ${isCurrent ? 'current' : ""} +
    `, + }; + }); + } + + // App themes + const currentTheme = appSettings.value.appTheme; + const availableThemes = themes + .list() + .filter((theme) => !(theme.version === "paid" && IS_FREE_VERSION)); + + return availableThemes.map((theme) => { + const isCurrent = theme.id === currentTheme; + + return { + value: JSON.stringify({ + type: "app", + theme: theme.id, + }), + text: `
    + ${theme.name} + ${isCurrent ? 'current' : ""} +
    `, + }; + }); +} + +let previousDark = isDeviceDarkTheme(); +const updateTimeMs = 2000; + +let intervalId = setInterval(async () => { + if (appSettings.value.appTheme.toLowerCase() === "system") { + const isDark = isDeviceDarkTheme(); + if (isDark !== previousDark) { + previousDark = isDark; + updateSystemTheme(isDark); + } + } +}, updateTimeMs); + +function onselect(value) { + if (!value) return; + + const selection = JSON.parse(value); + + if (selection.theme === "system") { + // Start interval if not already started + if (!intervalId) { + intervalId = setInterval(async () => { + if (appSettings.value.appTheme.toLowerCase() === "system") { + const isDark = isDeviceDarkTheme(); + if (isDark !== previousDark) { + previousDark = isDark; + updateSystemTheme(isDark); + } + } + }, updateTimeMs); + } + } else { + // Cancel interval if it's running + if (intervalId) { + clearInterval(intervalId); + intervalId = null; + } + } + + if (selection.type === "editor") { + editorManager.editor.setTheme(selection.theme); + appSettings.update( + { + editorTheme: selection.theme, + }, + false, + ); + } else { + if (selection.theme === "custom") { + CustomTheme(); + return; + } + themes.apply(selection.theme, true); + } +} diff --git a/src/palettes/changeTheme/style.scss b/src/palettes/changeTheme/style.scss new file mode 100644 index 000000000..ff6b558ff --- /dev/null +++ b/src/palettes/changeTheme/style.scss @@ -0,0 +1,20 @@ +.theme-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 4px; + width: 100%; + + span { + font-size: 1rem; + } + + .current { + color: var(--error-text-color); + background-color: var(--primary-color); + border-radius: 5px; + padding: 2px 6px; + font-size: 0.8rem; + margin-left: 8px; + } +} diff --git a/src/palettes/commandPalette/index.js b/src/palettes/commandPalette/index.js new file mode 100644 index 000000000..e3cb90e46 --- /dev/null +++ b/src/palettes/commandPalette/index.js @@ -0,0 +1,72 @@ +import palette from "components/palette"; +import helpers from "utils/helpers"; + +export default async function commandPalette() { + const recentCommands = RecentlyUsedCommands(); + const { editor } = editorManager; + const commands = Object.values(editor.commands.commands); + + const isEditorFocused = editor.isFocused(); + + palette(generateHints, onselect, strings["type command"], () => { + if (isEditorFocused) editor.focus(); + }); + + function generateHints() { + const hints = []; + + commands.forEach(({ name, description, bindKey }) => { + /** + * @param {boolean} recentlyUsed Is the command recently used + * @returns {{value: string, text: string}} + */ + const item = (recentlyUsed) => ({ + value: name, + text: `${description ?? name}${bindKey?.win ?? ""}`, + }); + if (recentCommands.commands.includes(name)) { + hints.unshift(item(true)); + return; + } + hints.push(item()); + }); + + return hints; + } + + function onselect(value) { + const command = commands.find(({ name }) => name === value); + if (!command) return; + recentCommands.push(value); + command.exec(editorManager.editor); + } +} + +function RecentlyUsedCommands() { + return { + /** + * @returns {string[]} + */ + get commands() { + return ( + helpers.parseJSON(localStorage.getItem("recentlyUsedCommands")) || [] + ); + }, + /** + * Saves command to recently used commands + * @param {string} command Command name + * @returns {void} + */ + push(command) { + const { commands } = this; + if (commands.length > 10) { + commands.pop(); + } + if (commands.includes(command)) { + commands.splice(commands.indexOf(command), 1); + } + commands.unshift(command); + localStorage.setItem("recentlyUsedCommands", JSON.stringify(commands)); + }, + }; +} diff --git a/src/palettes/findFile/index.js b/src/palettes/findFile/index.js new file mode 100644 index 000000000..95dafb642 --- /dev/null +++ b/src/palettes/findFile/index.js @@ -0,0 +1,83 @@ +import palette from "components/palette"; +import files from "lib/fileList"; +import openFile from "lib/openFile"; +import recents from "lib/recents"; +import helpers from "utils/helpers"; + +/** + * @typedef {import('components/inputhints').HintModification} HintModification + */ + +/**@type {HintModification} */ +let hintsModification; + +export default async function findFile() { + palette(generateHints, onselect, strings["type filename"], () => { + files.off("add-file", onAddFile); + files.off("remove-file", onRemoveFile); + }); + + files.on("add-file", onAddFile); + files.on("remove-file", onRemoveFile); + + /** + * Generates hint for inputhints + * @param {HintModification} hints Hint modification object + */ + async function generateHints(hints) { + hintsModification = hints; + const list = []; + + editorManager.files.forEach((file) => { + const { uri, name } = file; + let { location = "" } = file; + + if (location) { + location = helpers.getVirtualPath(location); + } + + list.push(hintItem(name, location, uri)); + }); + + list.push(...files(hintItem)); + return list; + } + + function onselect(value) { + if (!value) return; + openFile(value); + } +} + +/** + * Generates hint item for inputhints + * @param {string|{name: string, path: string, url: string}} name Hint text + * @param {string} path Hint subtext + * @param {string} url Hint value + * @returns {{text: string, value: string}} + */ +function hintItem(name, path, url) { + if (typeof name === "object") { + ({ name, path, url } = name); + } + const recent = recents.files.find((file) => file === url); + let subText = (path || url) ?? strings["new file"]; + if (subText.length > 50) { + subText = `...${subText.slice(-50)}`; + } + return { + text: `
    + ${name} + ${subText} +
    `, + value: url, + }; +} + +function onAddFile({ name, url, path: visiblePath }) { + hintsModification?.add(hintItem(name, visiblePath, url)); +} + +function onRemoveFile({ name, url, path: visiblePath }) { + hintsModification?.remove(hintItem(name, visiblePath, url)); +} diff --git a/src/plugins/browser/android/com/foxdebug/browser/Browser.java b/src/plugins/browser/android/com/foxdebug/browser/Browser.java new file mode 100644 index 000000000..f12597159 --- /dev/null +++ b/src/plugins/browser/android/com/foxdebug/browser/Browser.java @@ -0,0 +1,764 @@ +package com.foxdebug.browser; + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.Color; +import android.graphics.drawable.GradientDrawable; +import android.net.Uri; +import android.os.Build; +import android.text.InputType; +import android.text.TextUtils; +import android.util.Log; +import android.view.Gravity; +import android.view.KeyEvent; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewTreeObserver; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputMethodManager; +import android.webkit.ConsoleMessage; +import android.webkit.ValueCallback; +import android.webkit.WebChromeClient; +import android.webkit.WebSettings; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.EditText; +import android.widget.FrameLayout; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.ProgressBar; +import android.widget.TextView; +import com.foxdebug.browser.Emulator; +import com.foxdebug.browser.Menu; +import com.foxdebug.system.Ui; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import android.app.AlertDialog; +import android.app.DownloadManager; +import android.content.Context; +import android.net.Uri; +import android.os.Environment; +import android.webkit.DownloadListener; +import android.webkit.URLUtil; +import android.webkit.WebView; +import android.widget.Toast; +import android.os.Handler; +import android.os.Looper; + + + + +public class Browser extends LinearLayout { + + public int FILE_SELECT_CODE = 1; + + public Menu menu; + public WebView webView; + private Ui.Theme theme; + public Context context; + private TextView urlText; + private LinearLayout main; + private ImageView favicon; + private TextView titleText; + private ProgressBar loading; + private Emulator deviceEmulator; + + public boolean emulator = false; + public boolean console = false; + public boolean desktopMode = false; + + private String url = ""; + private String title = "Browser"; + + private int padding; + private int fontSize; + private int imageSize; + private int titleHeight; + private int titleTextHeight; + private boolean onlyConsole; + + ValueCallback filePathCallback; + final int REQUEST_SELECT_FILE = 1; + + public Browser(Context context, Ui.Theme theme, Boolean onlyConsole) { + super(context); + this.theme = theme; + this.context = context; + this.onlyConsole = onlyConsole; + this.padding = Ui.dpToPixels(context, 5); + this.fontSize = Ui.dpToPixels(context, 5); + this.imageSize = Ui.dpToPixels(context, 35); + this.titleHeight = Ui.dpToPixels(context, 45); + this.titleTextHeight = Ui.dpToPixels(context, 35); + + this.init(); + } + + public void init() { + WebSettings settings; + ImageButton menuIcon; + ImageButton refreshIcon; + LinearLayout titleLayout; + FrameLayout faviconFrame; + LinearLayout webViewContainer; + LinearLayout.LayoutParams faviconFrameParams; + + favicon = createIcon(Ui.Icons.LOGO); + menuIcon = createIconButton(Ui.Icons.MORE_VERT); + menuIcon.setOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View view) { + menu.show(view); + } + } + ); + + refreshIcon = createIconButton(Ui.Icons.REFRESH); + refreshIcon.setOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View v) { + webView.reload(); + } + } + ); + + loading = new ProgressBar(context, null, android.R.attr.progressBarStyle); + loading.setLayoutParams( + new LinearLayout.LayoutParams(this.imageSize, this.imageSize, 0) + ); + + faviconFrame = new FrameLayout(context); + faviconFrameParams = new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.WRAP_CONTENT, + ViewGroup.LayoutParams.WRAP_CONTENT + ); + faviconFrameParams.gravity = Gravity.CENTER_VERTICAL; + faviconFrame.setLayoutParams(faviconFrameParams); + faviconFrame.addView(favicon); + faviconFrame.addView(loading); + + titleLayout = createTile(); + titleLayout.addView(faviconFrame); + titleText = onlyConsole ? createTextView(title) : createEditText(title); + titleLayout.addView(titleText); + if (!onlyConsole) { + titleLayout.addView(refreshIcon); + titleLayout.addView(menuIcon); + } + + webView = new WebView(context); + webView.setFocusable(true); + webView.setFocusableInTouchMode(true); + webView.setBackgroundColor(0xFFFFFFFF); + + + webView.setDownloadListener(new DownloadListener() { + @Override + public void onDownloadStart(String url, String userAgent, + String contentDisposition, String mimeType, + long contentLength) { + + String fileName = URLUtil.guessFileName(url, contentDisposition, mimeType); + + new Handler(Looper.getMainLooper()).post(() -> { + + new AlertDialog.Builder(getContext()) + .setTitle("Download file") + .setMessage("Do you want to download \"" + fileName + "\"?") + .setPositiveButton("Yes", (dialog, which) -> { + DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url)); + request.setMimeType(mimeType); + request.addRequestHeader("User-Agent", userAgent); + request.setDescription("Downloading file..."); + request.setTitle(fileName); + request.allowScanningByMediaScanner(); + request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); + request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName); + + DownloadManager dm = (DownloadManager) getContext().getSystemService(Context.DOWNLOAD_SERVICE); + dm.enqueue(request); + + Toast.makeText(getContext(), "Download started...", Toast.LENGTH_SHORT).show(); + }) + .setNegativeButton("Cancel", null) + .show(); + + + }); + + } + }); + + + fitWebViewTo(0, 0, 1); + + webView.setWebChromeClient(new BrowserChromeClient(this)); + webView.setWebViewClient(new BrowserWebViewClient(this)); + + settings = webView.getSettings(); + settings.setJavaScriptEnabled(true); + settings.setDomStorageEnabled(true); + settings.setAllowContentAccess(true); + settings.setDisplayZoomControls(false); + settings.setDomStorageEnabled(true); + + webViewContainer = new LinearLayout(context); + webViewContainer.setGravity(Gravity.CENTER); + webViewContainer.setLayoutParams( + new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT, + 1 + ) + ); + webViewContainer.setBackgroundColor(theme.get("primaryColor")); + webViewContainer.addView(webView); + + setOrientation(LinearLayout.VERTICAL); + setFocusableInTouchMode(true); + setFocusable(true); + createMenu(); + addView(titleLayout); + addView(webViewContainer); + } + + private void createMenu() { + Browser browser = this; + menu = new Menu(context, theme); + + menu.addItem(Ui.Icons.DEVICES, "Devices", false); + menu.addItem(Ui.Icons.NO_CACHE, "Disable Cache", false); + menu.addItem(Ui.Icons.TERMINAL, "Console", false); + menu.addItem(Ui.Icons.OPEN_IN_BROWSER, "Open in Browser"); + menu.addItem(Ui.Icons.EXIT, "Exit"); + + menu.setCallback( + new Menu.Callback() { + @Override + public void onSelect(String action, Boolean checked) { + switch (action) { + case "Devices": + if (deviceEmulator == null) { + createDeviceEmulatorLayout(); + } + + emulator = checked; + if (checked) { + setDesktopMode(true); + setConsoleVisible(false); + menu.setChecked("Console", false); + menu.setVisible("Console", false); + addView(deviceEmulator); + fitWebViewTo( + deviceEmulator.getWidthProgress(), + deviceEmulator.getHeightProgress(), + deviceEmulator.getScaleProgress() + ); + } else { + menu.setVisible("Console", true); + removeView(deviceEmulator); + fitWebViewTo(0, 0, 1); + webView + .getViewTreeObserver() + .addOnGlobalLayoutListener( + new ViewTreeObserver.OnGlobalLayoutListener() { + @Override + public void onGlobalLayout() { + webView + .getViewTreeObserver() + .removeOnGlobalLayoutListener(this); + setDesktopMode(false); + } + } + ); + } + + break; + case "Console": + setConsoleVisible(checked); + break; + case "Disable Cache": + webView + .getSettings() + .setCacheMode( + checked ? WebSettings.LOAD_NO_CACHE : WebSettings.LOAD_DEFAULT + ); + break; + case "Open in Browser": + Intent browserIntent = new Intent( + Intent.ACTION_VIEW, + Uri.parse(url) + ); + context.startActivity(browserIntent); + exit(); + break; + case "Exit": + exit(); + break; + } + } + } + ); + } + + private void createDeviceEmulatorLayout() { + Browser browser = this; + deviceEmulator = new Emulator(context, theme); + deviceEmulator.setReference(webView); + deviceEmulator.setChangeListener( + new Emulator.Callback() { + @Override + public void onChange(int width, int height, float scale) { + fitWebViewTo(width, height, scale); + } + } + ); + } + + private void setTextViewProperties(TextView textView, int height) { + LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.FILL_PARENT, + height, + 1 + ); + params.gravity = Gravity.CENTER_VERTICAL; + textView.setMaxLines(1); + textView.setEllipsize(TextUtils.TruncateAt.END); + textView.setSingleLine(true); + textView.setHorizontallyScrolling(true); + textView.setTextColor(theme.get("primaryTextColor")); + textView.setLayoutParams(params); + textView.setGravity(Gravity.CENTER_VERTICAL); + } + + private void setDesktopMode(boolean enabled) { + int width = 0; + int height = 0; + WebSettings webSettings = webView.getSettings(); + + desktopMode = enabled; + webSettings.setUserAgentString( + enabled + ? "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36" + : null + ); + + if (enabled) { + width = webView.getMeasuredWidth(); + height = webView.getMeasuredHeight(); + } + + webSettings.setLoadWithOverviewMode(enabled); + webSettings.setUseWideViewPort(enabled); + webSettings.setLoadWithOverviewMode(enabled); + webSettings.setSupportZoom(enabled); + webSettings.setBuiltInZoomControls(enabled); + webView.reload(); + } + + public void setDesktopMode() { + if (desktopMode) { + int width = webView.getMeasuredWidth(); + int height = webView.getMeasuredHeight(); + updateViewportDimension(width, height); + } + } + + public void setUrl(String url) { + this.url = url; + setTitle(url); + setProgressBarVisible(true); + webView.loadUrl(url); + } + + public void setTitle(String title) { + this.title = title; + titleText.setText(title); + } + + public void setFavicon(Bitmap icon) { + favicon.setImageBitmap(icon); + } + + public void setConsoleVisible(boolean visible) { + console = visible; + String javascript = "document.dispatchEvent(new CustomEvent('%sconsole'))"; + javascript = String.format(javascript, visible ? "show" : "hide"); + webView.evaluateJavascript(javascript, null); + } + + public void setProgressBarVisible(boolean visible) { + loading.setVisibility(visible ? View.VISIBLE : View.GONE); + } + + private void updateViewportDimension(int width, int height) { + String script = + "!function(){var e=document.head;if(e){e.querySelectorAll(\"meta[name=viewport]\").forEach(function(e){e.remove()});var t=document.createElement(\"meta\");t.name=\"viewport\",t.content=\"width=%s, height=%s, initial-scale=%s\",e.append(t)}}();"; + String w = "device-width"; + String h = "device-height"; + String r = "1"; + if (width > 0) { + w = String.valueOf(width); + r = "0.1"; + h = ""; + } + + if (height > 0) { + h = String.valueOf(height); + } + + webView.evaluateJavascript(String.format(script, w, h, r), null); + } + + private void fitWebViewTo(int width, int height, float scale) { + webView.setScaleX(scale); + webView.setScaleY(scale); + webView.setLayoutParams( + new LinearLayout.LayoutParams( + width == 0 ? ViewGroup.LayoutParams.MATCH_PARENT : width, + height == 0 ? ViewGroup.LayoutParams.MATCH_PARENT : height + ) + ); + if (width > 0 && height > 0) { + updateViewportDimension(width, height); + } + } + + private void styleIcon(ImageView view) { + int padding = Ui.dpToPixels(context, 7); + LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( + imageSize, + imageSize + ); + + params.gravity = Gravity.CENTER_VERTICAL; + view.setBackgroundDrawable(null); + view.setLayoutParams(params); + view.setScaleType(ImageView.ScaleType.FIT_CENTER); + view.setAdjustViewBounds(true); + view.setPadding(padding, padding, padding, padding); + } + + private void keyboardVisible(boolean visible) { + if (visible) { + InputMethodManager imm = (InputMethodManager) context.getSystemService( + Context.INPUT_METHOD_SERVICE + ); + imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); + } else { + InputMethodManager imm = (InputMethodManager) context.getSystemService( + Context.INPUT_METHOD_SERVICE + ); + imm.hideSoftInputFromWindow(webView.getWindowToken(), 0); + } + } + + public boolean goBack() { + if (console) { + menu.setChecked("Console", false); + setConsoleVisible(false); + return true; + } + + if (webView.canGoBack()) { + webView.goBack(); + url = webView.getOriginalUrl(); + return true; + } + + return false; + } + + private TextView createTextView(String text) { + TextView textView = new TextView(context); + setTextViewProperties(textView, this.titleHeight); + textView.setText(text); + return textView; + } + + private EditText createEditText(String text) { + EditText editText = new EditText(context); + GradientDrawable background = new GradientDrawable(); + String themeType = theme.getType(); + + int radius = this.titleTextHeight / 2; + background.setCornerRadius(radius); + background.setColor(themeType.equals("light") ? 0x11000000 : 0x11ffffff); + editText.setBackground(background); + + setTextViewProperties(editText, this.titleTextHeight); + editText.setText(text); + editText.setPadding(radius, 0, radius, 0); + editText.setTextSize(this.fontSize < 10 ? 10 : this.fontSize); + editText.setInputType(InputType.TYPE_TEXT_VARIATION_URI); + editText.setImeOptions(EditorInfo.IME_ACTION_GO); + + editText.setOnFocusChangeListener( + new View.OnFocusChangeListener() { + @Override + public void onFocusChange(View v, boolean hasFocus) { + if (hasFocus) { + titleText.setText(url); + keyboardVisible(true); + } else { + titleText.setText(title); + keyboardVisible(false); + } + } + } + ); + + editText.setOnEditorActionListener( + new EditText.OnEditorActionListener() { + @Override + public boolean onEditorAction( + TextView v, + int actionId, + KeyEvent event + ) { + if (actionId == EditorInfo.IME_ACTION_GO) { + String url = v.getText().toString(); + if (!url.startsWith("http://") && !url.startsWith("https://")) { + url = "http://" + url; + } + + title = url; + setUrl(url); + editText.clearFocus(); + keyboardVisible(false); + return true; + } + return false; + } + } + ); + + return editText; + } + + private LinearLayout createTile() { + return createTile(titleHeight); + } + + private LinearLayout createTile(int height) { + LinearLayout tile = new LinearLayout(context); + tile.setOrientation(LinearLayout.HORIZONTAL); + tile.setBackgroundColor(theme.get("primaryColor")); + tile.setLayoutParams( + new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, height) + ); + tile.setHorizontalGravity(Gravity.LEFT); + tile.setVerticalGravity(Gravity.TOP); + return tile; + } + + private ImageButton createIconButton(String icon) { + Bitmap bitmap = Ui.Icons.get(context, icon, theme.get("primaryTextColor")); + ImageButton button = createIconButton(bitmap); + return button; + } + + private ImageButton createIconButton(Bitmap icon) { + ImageButton button = new ImageButton(context); + button.setImageBitmap(icon); + styleIcon(button); + return button; + } + + private ImageView createIcon(String code) { + Bitmap bitmap = Ui.Icons.get(context, code, theme.get("primaryTextColor")); + ImageView icon = new ImageView(context); + icon.setImageBitmap(bitmap); + styleIcon(icon); + return icon; + } + + public void exit() { + if (console) { + setConsoleVisible(false); + return; + } + + if (webView.canGoBack()) { + webView.goBack(); + return; + } + + webView.destroy(); + ((Activity) context).finish(); + } +} + +class BrowserChromeClient extends WebChromeClient { + + Browser browser; + + public BrowserChromeClient(Browser browser) { + super(); + this.browser = browser; + } + + @Override + public void onReceivedTitle(WebView view, String title) { + super.onReceivedTitle(view, title); + browser.setTitle(title); + } + + @Override + public void onReceivedIcon(WebView view, Bitmap icon) { + super.onReceivedIcon(view, icon); + browser.setFavicon(icon); + } + + public boolean onShowFileChooser( + WebView webView, + ValueCallback filePathCallback, + WebChromeClient.FileChooserParams fileChooserParams + ) { + if (browser.filePathCallback != null) { + browser.filePathCallback.onReceiveValue(null); + } + browser.filePathCallback = filePathCallback; + + String[] acceptTypes = fileChooserParams.getAcceptTypes(); + String mimeType = "*/*"; // default if empty or null + if (acceptTypes != null && acceptTypes.length > 0) { + String firstType = acceptTypes[0]; + if (firstType != null && !firstType.trim().isEmpty()) { + mimeType = firstType; + } + } + + Intent selectDocument = new Intent(Intent.ACTION_GET_CONTENT); + selectDocument.addCategory(Intent.CATEGORY_OPENABLE); + selectDocument.setType(mimeType); + + boolean isMultiple = + (fileChooserParams.getMode() == + WebChromeClient.FileChooserParams.MODE_OPEN_MULTIPLE); + if (isMultiple) { + selectDocument.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); + } + + ((Activity) webView.getContext()).startActivityForResult( + Intent.createChooser(selectDocument, "Select File"), + browser.FILE_SELECT_CODE + ); + + return true; + } +} + +class BrowserWebViewClient extends WebViewClient { + + private Browser browser; + + public BrowserWebViewClient(Browser browser) { + super(); + this.browser = browser; + } + + @Override + public boolean shouldOverrideUrlLoading(WebView view, String url) { + browser.setUrl(url); + browser.setProgressBarVisible(true); + return false; + } + + @Override + public void onPageStarted(WebView view, String url, Bitmap icon) { + super.onPageStarted(view, url, icon); + browser.setProgressBarVisible(true); + } + + @Override + public void onPageFinished(WebView view, String url) { + super.onPageFinished(view, url); + browser.setProgressBarVisible(false); + + // Inject console for external sites + // this is not a good solution but for now its good, later we'll improve this + if (!url.startsWith("http://localhost")) { + try { + File eruaFile = new File(browser.context.getFilesDir(), "eruda.js"); + StringBuilder scriptContent = new StringBuilder(); + BufferedReader reader = new BufferedReader(new FileReader(eruaFile)); + String line; + while ((line = reader.readLine()) != null) { + scriptContent.append(line); + scriptContent.append("\n"); + } + reader.close(); + + // Inject the script content directly + String script = + "if(!window.eruda){" + + " var script = document.createElement('script');" + + " script.textContent = `" + + scriptContent.toString() + + "`;" + + " document.head.appendChild(script);" + + " eruda.init({" + + " theme: 'dark'" + + " });" + + " eruda._shadowRoot.querySelector('.eruda-entry-btn').style.display = 'none';" + + " sessionStorage.setItem('__console_available', true);" + + " document.addEventListener('showconsole', function() { eruda.show(); });" + + " document.addEventListener('hideconsole', function() { eruda.hide(); });" + + "}"; + + browser.webView.evaluateJavascript(script, null); + } catch (IOException e) { + e.printStackTrace(); + // Fallback to CDN if local file fails + String fallbackScript = + "if(!window.eruda){" + + " var script = document.createElement('script');" + + " script.src = 'https://cdn.jsdelivr.net/npm/eruda';" + + " script.crossOrigin = 'anonymous';" + + " script.onload = function() {" + + " eruda.init({" + + " theme: 'dark'" + + " });" + + " eruda._shadowRoot.querySelector('.eruda-entry-btn').style.display = 'none';" + + " sessionStorage.setItem('__console_available', true);" + + " document.addEventListener('showconsole', function() { eruda.show(); });" + + " document.addEventListener('hideconsole', function() { eruda.hide(); });" + + " };" + + " document.head.appendChild(script);" + + "}"; + browser.webView.evaluateJavascript(fallbackScript, null); + } + browser.menu.setChecked("Console", false); + } else { + browser.webView.evaluateJavascript( + "sessionStorage.getItem('__console_available')", + new ValueCallback() { + @Override + public void onReceiveValue(String value) { + boolean show = !value.equals("null"); + browser.menu.setVisible("Console", show && !browser.emulator); + + // If user had toggled "Console" on before, re-show it + if (browser.console && show) { + browser.setConsoleVisible(true); + browser.menu.setChecked("Console", true); + } + } + } + ); + } + } + + @Override + public void onLoadResource(WebView view, String url) { + browser.setDesktopMode(); + } +} diff --git a/src/plugins/browser/android/com/foxdebug/browser/BrowserActivity.java b/src/plugins/browser/android/com/foxdebug/browser/BrowserActivity.java new file mode 100644 index 000000000..eaec867f1 --- /dev/null +++ b/src/plugins/browser/android/com/foxdebug/browser/BrowserActivity.java @@ -0,0 +1,136 @@ +package com.foxdebug.browser; + +import android.app.Activity; +import android.content.Intent; +import android.graphics.Color; +import android.os.Build; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.view.Window; +import android.view.WindowInsetsController; +import android.webkit.WebChromeClient; +import com.foxdebug.system.Ui; +import org.json.JSONObject; + +public class BrowserActivity extends Activity { + + private Browser browser; + private Ui.Theme theme; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + Intent intent = getIntent(); + String url = intent.getStringExtra("url"); + String themeString = intent.getStringExtra("theme"); + boolean onlyConsole = intent.getBooleanExtra("onlyConsole", false); + + try { + JSONObject obj = new JSONObject(themeString); + theme = new Ui.Theme(obj); + } catch (Exception e) { + theme = new Ui.Theme(new JSONObject()); + } + + browser = new Browser(this, theme, onlyConsole); + browser.setUrl(url); + setContentView(browser); + setSystemTheme(theme.get("primaryColor")); + } + + @Override + public void onBackPressed() { + boolean didGoBack = browser.goBack(); + + if (!didGoBack) { + browser.exit(); + } + } + + private void setSystemTheme(int systemBarColor) { + try { + Ui.Icons.setSize(Ui.dpToPixels(this, 18)); + final Window window = getWindow(); + // Method and constants not available on all SDKs but we want to be able to compile this code with any SDK + window.clearFlags(0x04000000); // SDK 19: WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); + window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + try { + // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21 + + window + .getClass() + .getMethod("setNavigationBarColor", int.class) + .invoke(window, systemBarColor); + + window + .getClass() + .getMethod("setStatusBarColor", int.class) + .invoke(window, systemBarColor); + + if (Build.VERSION.SDK_INT < 30) { + setStatusBarStyle(window); + setNavigationBarStyle(window); + } else { + String themeType = theme.getType(); + WindowInsetsController controller = window.getInsetsController(); + int appearance = + WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS | + WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS; + + if (themeType.equals("light")) { + controller.setSystemBarsAppearance(appearance, appearance); + } else { + controller.setSystemBarsAppearance(0, appearance); + } + } + } catch (IllegalArgumentException ignore) {} catch (Exception ignore) {} + } catch (Exception e) {} + } + + private void setStatusBarStyle(final Window window) { + View decorView = window.getDecorView(); + int uiOptions = decorView.getSystemUiVisibility(); + String themeType = theme.getType(); + + if (themeType.equals("light")) { + decorView.setSystemUiVisibility( + uiOptions | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR + ); + return; + } + } + + private void setNavigationBarStyle(final Window window) { + View decorView = window.getDecorView(); + int uiOptions = decorView.getSystemUiVisibility(); + String themeType = theme.getType(); + + if (themeType.equals("light")) { + decorView.setSystemUiVisibility(uiOptions | 0x80000000 | 0x00000010); + return; + } + } + + @Override + protected void onActivityResult( + int requestCode, + int resultCode, + Intent data + ) { + super.onActivityResult(requestCode, resultCode, data); + + if (requestCode == browser.FILE_SELECT_CODE) { + if (browser.filePathCallback == null) { + return; + } + + browser.filePathCallback.onReceiveValue( + WebChromeClient.FileChooserParams.parseResult(resultCode, data) + ); + + browser.filePathCallback = null; + } + } +} diff --git a/src/plugins/browser/android/com/foxdebug/browser/Emulator.java b/src/plugins/browser/android/com/foxdebug/browser/Emulator.java new file mode 100644 index 000000000..adb65f2b1 --- /dev/null +++ b/src/plugins/browser/android/com/foxdebug/browser/Emulator.java @@ -0,0 +1,507 @@ +package com.foxdebug.browser; + +import android.content.Context; +import android.graphics.Typeface; +import android.util.Log; +import android.view.View; +import android.view.ViewTreeObserver; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.ScrollView; +import android.widget.SeekBar; +import android.widget.TextView; +import com.foxdebug.system.Ui; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; + +public class Emulator extends LinearLayout { + + private Ui.Theme theme; + private View reference; + private Context context; + private Callback listener; + private Device customDevice; + private Device selectedDevice; + private boolean initialized = false; + private LinearLayout seekBarsLayout; + private DeviceListView deviceListView; + private HashMap seekBars = new HashMap(); + + public abstract static class Callback { + + public abstract void onChange(int width, int height, float scale); + } + + public Emulator(Context context, Ui.Theme theme) { + super(context); + View border; + LinearLayout main; + + this.context = context; + this.theme = theme; + + customDevice = new Device("Custom", 0, 0, Ui.Icons.TUNE, false); + deviceListView = new DeviceListView(context, theme); + deviceListView.setLayoutParams( + new LinearLayout.LayoutParams( + Ui.dpToPixels(context, 100), + LinearLayout.LayoutParams.MATCH_PARENT + ) + ); + + deviceListView.setOnSelect( + new DeviceListView.Callback() { + @Override + public void onSelect(Device device) { + selectDevice(device); + } + } + ); + + deviceListView.add( + customDevice, + new Device("iPhone SE", 320, 568, Ui.Icons.PHONE_APPLE), + new Device("iPhone 8", 375, 667, Ui.Icons.PHONE_APPLE), + new Device("iPhone 8+", 414, 736, Ui.Icons.PHONE_APPLE), + new Device("iPhone X", 375, 812, Ui.Icons.PHONE_APPLE), + new Device("iPad", 768, 1024, Ui.Icons.TABLET_APPLE), + new Device("iPad Pro", 1024, 1366, Ui.Icons.TABLET_APPLE), + new Device("Galaxy S5", 360, 640, Ui.Icons.PHONE_ANDROID), + new Device("Pixel 2", 411, 731, Ui.Icons.PHONE_ANDROID), + new Device("Pixel 2 XL", 411, 823, Ui.Icons.PHONE_ANDROID), + new Device("Nexus 5X", 411, 731, Ui.Icons.PHONE_ANDROID), + new Device("Nexus 6P", 411, 731, Ui.Icons.PHONE_ANDROID), + new Device("Nexus 7", 600, 960, Ui.Icons.TABLET_ANDROID), + new Device("Nexus 10", 800, 1280, Ui.Icons.TABLET_ANDROID), + new Device("Laptop", 1280, 800, Ui.Icons.LAPTOP), + new Device("Laptop L", 1440, 900, Ui.Icons.LAPTOP), + new Device("Laptop XL", 1680, 1050, Ui.Icons.LAPTOP), + new Device("UHD 4k", 3840, 2160, Ui.Icons.TV) + ); + + deviceListView.select(customDevice); + + seekBarsLayout = new LinearLayout(context); + seekBarsLayout.setPadding(0, 10, 0, 0); + seekBarsLayout.setOrientation(LinearLayout.VERTICAL); + seekBarsLayout.setLayoutParams( + new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT, + 1 + ) + ); + + border = new View(context); + border.setBackgroundColor(theme.get("borderColor")); + border.setLayoutParams( + new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 1) + ); + + main = new LinearLayout(context); + main.setOrientation(LinearLayout.HORIZONTAL); + main.setBackgroundColor(theme.get("primaryColor")); + main.addView(seekBarsLayout); + main.addView(deviceListView); + main.setLayoutParams( + new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT + ) + ); + + addControl("width", 50, "Width"); + addControl("height", 50, "Height"); + addControl("scale", 50, "Scale"); + addView(border); + addView(main); + setOrientation(LinearLayout.VERTICAL); + } + + public void setChangeListener(Callback listener) { + this.listener = listener; + } + + public void setReference(View view) { + SeekBar widthSeekBar = seekBars.get("width"); + SeekBar heightSeekBar = seekBars.get("height"); + SeekBar scaleSeekBar = seekBars.get("scale"); + int maxWidth = view.getMeasuredWidth(); + int maxHeight = view.getMeasuredHeight(); + int width = widthSeekBar.getProgress(); + int height = heightSeekBar.getProgress(); + int minWidth = widthSeekBar.getMin(); + int minHeight = heightSeekBar.getMin(); + + getViewTreeObserver() + .addOnGlobalLayoutListener( + new ViewTreeObserver.OnGlobalLayoutListener() { + @Override + public void onGlobalLayout() { + getViewTreeObserver().removeOnGlobalLayoutListener(this); + int correctedHeight = maxHeight - getHeight(); + int iHeight = height; + int iWidth = width; + + widthSeekBar.setMax(maxWidth); + heightSeekBar.setMax(correctedHeight); + if (width > maxWidth || !initialized) { + heightSeekBar.setProgress(maxHeight); + iHeight = maxHeight; + } + + if (height > correctedHeight || !initialized) { + widthSeekBar.setProgress(maxWidth); + iWidth = maxWidth; + } + + setMaxScale(iWidth, iHeight); + scaleSeekBar.setMin(100); + scaleSeekBar.setProgress(100); + if (listener != null) { + listener.onChange(iWidth, correctedHeight, 1); + } + } + } + ); + } + + public int getWidthProgress() { + return seekBars.get("width").getProgress(); + } + + public int getHeightProgress() { + return seekBars.get("height").getProgress(); + } + + public float getScaleProgress() { + return seekBars.get("scale").getProgress() / 100f; + } + + private void addControl(String id, int height, String label) { + LinearLayout linearLayout = new LinearLayout(context); + TextView textView = new TextView(context); + SeekBar seekBar = new SeekBar(context); + + linearLayout.setOrientation(LinearLayout.VERTICAL); + linearLayout.setLayoutParams( + new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT + ) + ); + + seekBar.setMin(300); + seekBar.setLayoutParams( + new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.MATCH_PARENT, + height, + 1 + ) + ); + + textView.setText(String.format(label, 0)); + textView.setPadding(10, 0, 0, 0); + + linearLayout.addView(textView); + linearLayout.addView(seekBar); + seekBarsLayout.addView(linearLayout); + seekBars.put(id, seekBar); + + seekBar.setOnSeekBarChangeListener( + new SeekBar.OnSeekBarChangeListener() { + @Override + public void onProgressChanged( + SeekBar seekBar, + int progress, + boolean fromUser + ) { + if (!fromUser || listener == null) { + return; + } + + String seekBarName = seekBar == seekBars.get("width") + ? "width" // + : seekBar == seekBars.get("height") // + ? "height" // + : "scale"; // + + Log.d("Emulator", seekBarName); + + int height = getHeightProgress(); + int width = getWidthProgress(); + float scale = getScaleProgress(); + + if (seekBarName != "scale") { + SeekBar scaleSeekBar = seekBars.get("scale"); + setMaxScale(width, height); + scale = 1; + } + + listener.onChange(width, height, scale); + + if ( + seekBarName == "scale" || + selectedDevice == null || + selectedDevice.id == customDevice.id + ) { + return; + } + + selectDevice(customDevice); + } + + @Override + public void onStartTrackingTouch(SeekBar seekBar) {} + + @Override + public void onStopTrackingTouch(SeekBar seekBar) {} + } + ); + } + + private void selectDevice(Device device) { + if (selectedDevice != null) selectedDevice.deselect(); + device.select(); + + selectedDevice = device; + if (device.id == customDevice.id) { + return; + } + + SeekBar widthSeekBar = seekBars.get("width"); + SeekBar heightSeekBar = seekBars.get("height"); + SeekBar scaleSeekBar = seekBars.get("scale"); + + int maxWidth = widthSeekBar.getMax(); + int maxHeight = heightSeekBar.getMax(); + int maxScale; + + int width = device.width; + int height = device.height; + + if (width > maxWidth) { + float ratio = (width - maxWidth) / (float) width; + width = maxWidth; + height = (int) (height - (height * ratio)); + } + + if (height > maxHeight) { + float ratio = (height - maxHeight) / (float) height; + height = maxHeight; + width = (int) (width - (width * ratio)); + } + + widthSeekBar.setProgress(width); + heightSeekBar.setProgress(height); + setMaxScale(width, height); + maxScale = scaleSeekBar.getMax(); + scaleSeekBar.setProgress(maxScale); + listener.onChange(width, height, maxScale / 100f); + } + + private void setMaxScale(int width, int height) { + SeekBar scaleSeekBar = seekBars.get("scale"); + SeekBar widthSeekBar = seekBars.get("width"); + SeekBar heightSeekBar = seekBars.get("height"); + int maxWidth = widthSeekBar.getMax(); + int maxHeight = heightSeekBar.getMax(); + + float scaleX = maxWidth / (float) width; + float scaleY = maxHeight / (float) height; + int scale = (int) (Math.min(scaleX, scaleY) * 100); + + scaleSeekBar.setMax(scale); + scaleSeekBar.setProgress(100); + } +} + +class Device { + + public int id; + public int width; + public int height; + public String name; + public String icon; + public DeviceView view; + public boolean isDesktop; + + public Device( + String name, + int width, + int height, + String icon, + boolean isDesktop + ) { + this.id = View.generateViewId(); + this.name = name; + this.icon = icon; + this.width = width; + this.height = height; + this.isDesktop = isDesktop; + } + + public Device(String name, int width, int height, String icon) { + this(name, width, height, icon, true); + } + + public Device(String name, int width, int height) { + this(name, width, height, Ui.Icons.TUNE, true); + } + + public void select() { + if (view != null) { + view.select(); + } + } + + public void deselect() { + if (view != null) { + view.deselect(); + } + } +} + +class DeviceListView extends ScrollView { + + DeviceView selectedDeviceView; + LinearLayout deviceListLayout; + Callback callback; + Context context; + Ui.Theme theme; + + public abstract static class Callback { + + public abstract void onSelect(Device device); + } + + public DeviceListView(Context context, Ui.Theme theme) { + super(context); + this.context = context; + this.theme = theme; + + deviceListLayout = new LinearLayout(context); + deviceListLayout.setOrientation(LinearLayout.VERTICAL); + deviceListLayout.setLayoutParams( + new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.MATCH_PARENT, + LinearLayout.LayoutParams.WRAP_CONTENT + ) + ); + + addView(deviceListLayout); + } + + public void add(Device... devices) { + for (Device device : devices) { + add(device); + } + } + + public void select(Device device) { + DeviceView deviceView = (DeviceView) findViewById(device.id); + deviceView.select(); + selectedDeviceView = deviceView; + } + + public void add(Device device) { + DeviceView deviceView = new DeviceView(context, device, theme); + deviceListLayout.addView(deviceView); + + deviceView.setOnSelect( + new DeviceView.Callback() { + @Override + public void onSelect(DeviceView view) { + if (callback == null) return; + + if (selectedDeviceView != null) selectedDeviceView.deselect(); + view.select(); + + callback.onSelect(view.device); + selectedDeviceView = view; + } + } + ); + } + + public void setOnSelect(Callback callback) { + this.callback = callback; + } +} + +class DeviceView extends LinearLayout { + + Ui.Theme theme; + Device device; + TextView label; + ImageView icon; + Context context; + boolean isSelected = false; + + public abstract static class Callback { + + public abstract void onSelect(DeviceView device); + } + + public DeviceView(Context context, Device device, Ui.Theme theme) { + super(context); + int primaryTextColor = theme.get("primaryTextColor"); + this.theme = theme; + this.device = device; + this.context = context; + this.device.view = this; + + setId(device.id); + setClickable(true); + setPadding(0, 5, 0, 5); + setOrientation(LinearLayout.HORIZONTAL); + + icon = new ImageView(context); + icon.setImageBitmap(Ui.Icons.get(context, device.icon, primaryTextColor)); + icon.setPadding(0, 0, 5, 0); + icon.setLayoutParams( + new LinearLayout.LayoutParams( + LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.WRAP_CONTENT + ) + ); + + label = new TextView(context); + label.setSingleLine(true); + label.setText(device.name); + label.setTextColor(primaryTextColor); + + addView(icon); + addView(label); + } + + public void setOnSelect(Callback callback) { + DeviceView self = this; + setOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View view) { + callback.onSelect(self); + } + } + ); + } + + public void deselect() { + int primaryTextColor = theme.get("primaryTextColor"); + icon.setImageBitmap(Ui.Icons.get(context, device.icon, primaryTextColor)); + label.setTextColor(primaryTextColor); + label.setTypeface(null, Typeface.NORMAL); + isSelected = false; + } + + public void select() { + int activeTextColor = theme.get("activeTextColor"); + icon.setImageBitmap(Ui.Icons.get(context, device.icon, activeTextColor)); + label.setTextColor(activeTextColor); + label.setTypeface(null, Typeface.BOLD); + isSelected = true; + } +} diff --git a/src/plugins/browser/android/com/foxdebug/browser/Menu.java b/src/plugins/browser/android/com/foxdebug/browser/Menu.java new file mode 100644 index 000000000..8b5bbb544 --- /dev/null +++ b/src/plugins/browser/android/com/foxdebug/browser/Menu.java @@ -0,0 +1,268 @@ +package com.foxdebug.browser; + +import android.content.Context; +import android.content.res.ColorStateList; +import android.graphics.Bitmap; +import android.graphics.drawable.GradientDrawable; +import android.util.Log; +import android.view.Gravity; +import android.view.View; +import android.view.ViewGroup; +import android.widget.CheckBox; +import android.widget.FrameLayout; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.PopupWindow; +import android.widget.ScrollView; +import android.widget.TextView; +import com.foxdebug.acode.R; +import com.foxdebug.system.Ui; + +public class Menu extends PopupWindow { + + private Ui.Theme theme; + private LinearLayout list; + private Callback callback; + + Context context; + int itemHeight; + int imageSize; + int padding; + + public abstract static class Callback { + + public abstract void onSelect(String action, Boolean checked); + } + + public Menu(Context context, Ui.Theme theme) { + super(context); + this.theme = theme; + this.context = context; + + padding = Ui.dpToPixels(context, 5); + imageSize = Ui.dpToPixels(context, 30); + itemHeight = Ui.dpToPixels(context, 40); + + MenuItem exit; + GradientDrawable border; + MenuItem toggleDisableCache; + + border = new GradientDrawable(); + border.setColor(theme.get("popupBackgroundColor")); + border.setCornerRadius(Ui.dpToPixels(context, 8)); + + list = new LinearLayout(context); + list.setOrientation(LinearLayout.VERTICAL); + list.setBackgroundDrawable(border); + list.setPadding(padding, padding, padding, padding); + list.setLayoutParams( + new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.WRAP_CONTENT, + ViewGroup.LayoutParams.WRAP_CONTENT + ) + ); + + ScrollView scrollView = new ScrollView(context); + scrollView.addView(list); + + setElevation(10f); + setFocusable(true); + setContentView(scrollView); + setBackgroundDrawable(border); + setAnimationStyle(R.style.MenuAnimation); + } + + public void setCallback(Callback callback) { + this.callback = callback; + } + + public void addItem(String icon, String text) { + addItem(icon, text, null); + } + + public void addItem(String icon, String text, Boolean toggle) { + int textColor = theme.get("popupTextColor"); + int background = theme.get("popupBackgroundColor"); + MenuItem menuItem = new MenuItem(this, text); + menuItem.setBackgroundColor(background); + menuItem.setIcon(icon, textColor); + menuItem.setText(text, textColor); + menuItem.setOnClickListener( + new MenuItemCallback() { + @Override + public void onClick(MenuItem menuItem) { + callback.onSelect(menuItem.action, menuItem.checked); + hide(); + } + } + ); + + if (toggle != null) { + menuItem.setChecked(toggle); + } + + list.addView(menuItem); + } + + public void setChecked(String action, Boolean checked) { + for (int i = 0; i < list.getChildCount(); i++) { + MenuItem menuItem = (MenuItem) list.getChildAt(i); + if (menuItem.action == action) { + menuItem.setChecked(checked); + break; + } + } + } + + public void setVisible(String action, Boolean visible) { + for (int i = 0; i < list.getChildCount(); i++) { + MenuItem menuItem = (MenuItem) list.getChildAt(i); + if (menuItem.action == action) { + menuItem.setVisibility(visible ? View.VISIBLE : View.GONE); + break; + } + } + } + + public void show(View view) { + int x = view.getLeft(); + int y = view.getTop(); + showAtLocation(view, Gravity.TOP | Gravity.RIGHT, padding, padding); + } + + public void hide() { + dismiss(); + } +} + +abstract class MenuItemCallback { + + public abstract void onClick(MenuItem menuItem); +} + +class MenuItem extends LinearLayout { + + private Context context; + + public Boolean checked; + public CheckBox checkBox; + public String action; + private int textColor; + private int itemHeight; + private int imageSize; + private int padding; + private int iconSize; + private int paddingLeft = 0; + private int paddingRight = 0; + private int paddingVertical = 0; + + public MenuItem(Menu menu, String action) { + super(menu.context); + this.action = action; + + context = menu.context; + padding = menu.padding; + imageSize = menu.imageSize; + itemHeight = menu.itemHeight; + iconSize = Ui.dpToPixels(context, 10); + paddingRight = imageSize; + paddingVertical = Ui.dpToPixels(context, 5); + + setPadding(); + setClickable(true); + setLayoutParams( + new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + itemHeight + ) + ); + setGravity(Gravity.CENTER_VERTICAL); + setOrientation(LinearLayout.HORIZONTAL); + addView(new TextView(context)); + } + + public void setPadding() { + setPadding(paddingLeft, paddingVertical, paddingRight, paddingVertical); + } + + public void setIcon(String icon, int iconColor) { + ImageView imageView = new ImageView(context); + Bitmap iconBitmap = Ui.Icons.get(context, icon, iconColor); + imageView.setImageBitmap(iconBitmap); + imageView.setBackgroundDrawable(null); + imageView.setLayoutParams( + new LinearLayout.LayoutParams(imageSize, imageSize) + ); + imageView.setScaleType(ImageView.ScaleType.FIT_CENTER); + imageView.setAdjustViewBounds(true); + imageView.setPadding(padding, padding, padding, padding); + addView(imageView, 0); + } + + public void setText(String text, int color) { + textColor = color; + TextView textView = new TextView(context); + LinearLayout.LayoutParams textViewParams = new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.FILL_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT, + 1 + ); + textView.setText(text); + textView.setTextColor(textColor); + textView.setGravity(Gravity.CENTER_VERTICAL); + textView.setLayoutParams(textViewParams); + addView(textView, 1); + } + + public void setChecked(boolean checked) { + this.checked = checked; + if (checkBox != null) { + checkBox.setChecked(checked); + return; + } + + checkBox = new CheckBox(context); + checkBox.setChecked(checked); + checkBox.setEnabled(false); + checkBox.setClickable(false); + checkBox.setButtonTintList( + new ColorStateList( + new int[][] { + new int[] { android.R.attr.state_checked }, + new int[] { -android.R.attr.state_checked }, + }, + new int[] { textColor, textColor } + ) + ); + + FrameLayout container = new FrameLayout(context); + FrameLayout.LayoutParams containerParams = new FrameLayout.LayoutParams( + imageSize, + imageSize + ); + containerParams.gravity = Gravity.CENTER_VERTICAL; + container.setLayoutParams(containerParams); + container.addView(checkBox); + + paddingRight = 0; + setPadding(); + addView(container); + } + + public void setOnClickListener(MenuItemCallback listener) { + MenuItem self = this; + this.setOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View v) { + if (checkBox != null) { + checked = !checked; + checkBox.setChecked(checked); + } + + listener.onClick(self); + } + } + ); + } +} diff --git a/src/plugins/browser/android/com/foxdebug/browser/Plugin.java b/src/plugins/browser/android/com/foxdebug/browser/Plugin.java new file mode 100644 index 000000000..16c342ffe --- /dev/null +++ b/src/plugins/browser/android/com/foxdebug/browser/Plugin.java @@ -0,0 +1,35 @@ +package com.foxdebug.browser; + +import android.content.Intent; +import com.foxdebug.browser.BrowserActivity; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +public class Plugin extends CordovaPlugin { + + @Override + public boolean execute( + String action, + JSONArray args, + CallbackContext callbackContext + ) throws JSONException { + if (action.equals("open")) { + String url = args.getString(0); + JSONObject theme = args.getJSONObject(1); + boolean onlyConsole = args.optBoolean(2, false); + String themeString = theme.toString(); + Intent intent = new Intent(cordova.getActivity(), BrowserActivity.class); + + intent.putExtra("url", url); + intent.putExtra("theme", themeString); + intent.putExtra("onlyConsole", onlyConsole); + cordova.getActivity().startActivity(intent); + callbackContext.success("Opened browser"); + return true; + } + return false; + } +} diff --git a/src/plugins/browser/index.js b/src/plugins/browser/index.js new file mode 100644 index 000000000..0670ef9fd --- /dev/null +++ b/src/plugins/browser/index.js @@ -0,0 +1,16 @@ +import settings from 'lib/settings'; +import themes from 'theme/list'; + +const SERVICE = 'Browser'; + +function open(url, isConsole = false) { + const ACTION = 'open'; + const success = () => { }; + const error = () => { }; + const theme = themes.get(settings.value.appTheme).toJSON('hex'); + cordova.exec(success, error, SERVICE, ACTION, [url, theme, isConsole]); +} + +export default { + open, +}; \ No newline at end of file diff --git a/src/plugins/browser/package.json b/src/plugins/browser/package.json new file mode 100644 index 000000000..4ead02980 --- /dev/null +++ b/src/plugins/browser/package.json @@ -0,0 +1,11 @@ +{ + "name": "cordova-plugin-browser", + "version": "1.0.0", + "description": "", + "main": "", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC" +} \ No newline at end of file diff --git a/src/plugins/browser/plugin.xml b/src/plugins/browser/plugin.xml new file mode 100644 index 000000000..5c513784d --- /dev/null +++ b/src/plugins/browser/plugin.xml @@ -0,0 +1,33 @@ + + + cordova-plugin-browser + In app browser + Apache 2.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/plugins/browser/res/android/menu_enter.xml b/src/plugins/browser/res/android/menu_enter.xml new file mode 100644 index 000000000..78e4d5811 --- /dev/null +++ b/src/plugins/browser/res/android/menu_enter.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/plugins/browser/res/android/menu_exit.xml b/src/plugins/browser/res/android/menu_exit.xml new file mode 100644 index 000000000..e3cc5a248 --- /dev/null +++ b/src/plugins/browser/res/android/menu_exit.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/plugins/browser/res/android/styles.xml b/src/plugins/browser/res/android/styles.xml new file mode 100644 index 000000000..cbb3c0013 --- /dev/null +++ b/src/plugins/browser/res/android/styles.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/plugins/browser/utils/updatePackage.js b/src/plugins/browser/utils/updatePackage.js new file mode 100644 index 000000000..2850414a7 --- /dev/null +++ b/src/plugins/browser/utils/updatePackage.js @@ -0,0 +1,30 @@ +const fs = require('fs'); +const path = require('path'); + +const configXML = path.resolve(__dirname, "../../../config.xml"); +const menuJava = path.resolve(__dirname, "../../../platforms/android/app/src/main/java/com/foxdebug/browser/Menu.java"); +const repeatChar = (char, times) => { + let res = ""; + while (--times >= 0) res += char; + return res; +}; + +try { + const config = fs.readFileSync(configXML, "utf8"); + const fileData = fs.readFileSync(menuJava, "utf8"); + const appName = /widget id="([0-9a-zA-Z\.\-_]*)"/.exec(config)[1].split(".").pop(); + const newFileData = fileData.replace(/(import com\.foxdebug\.)(acode|acodefree)(.R;)/, `$1${appName}$3`); + fs.writeFileSync(menuJava, newFileData); + + const msg = `==== Changed package to com.foxdebug.${appName} ====`; + + console.log(""); + console.log(repeatChar("=", msg.length)); + console.log(msg); + console.log(repeatChar("=", msg.length)); + console.log(""); + +} catch (error) { + console.error(error); + process.exit(1); +} \ No newline at end of file diff --git a/src/plugins/cordova-plugin-buildinfo/.gitignore b/src/plugins/cordova-plugin-buildinfo/.gitignore new file mode 100644 index 000000000..f4734b89a --- /dev/null +++ b/src/plugins/cordova-plugin-buildinfo/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +ignore/ +node_modules diff --git a/src/plugins/cordova-plugin-buildinfo/.npmignore b/src/plugins/cordova-plugin-buildinfo/.npmignore new file mode 100644 index 000000000..1b335cfb5 --- /dev/null +++ b/src/plugins/cordova-plugin-buildinfo/.npmignore @@ -0,0 +1,5 @@ +.npmignore +.travis.yml +.DS_Store +ignore/ +node_modules \ No newline at end of file diff --git a/src/plugins/cordova-plugin-buildinfo/.travis.yml b/src/plugins/cordova-plugin-buildinfo/.travis.yml new file mode 100644 index 000000000..c9d186a34 --- /dev/null +++ b/src/plugins/cordova-plugin-buildinfo/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +sudo: false +node_js: + - "4.2" diff --git a/plugins/cordova-plugin-buildinfo/LICENSE b/src/plugins/cordova-plugin-buildinfo/LICENSE similarity index 100% rename from plugins/cordova-plugin-buildinfo/LICENSE rename to src/plugins/cordova-plugin-buildinfo/LICENSE diff --git a/src/plugins/cordova-plugin-buildinfo/package.json b/src/plugins/cordova-plugin-buildinfo/package.json new file mode 100644 index 000000000..e44f7c3fd --- /dev/null +++ b/src/plugins/cordova-plugin-buildinfo/package.json @@ -0,0 +1,51 @@ +{ + "name": "cordova-plugin-buildinfo", + "version": "4.0.0", + "description": "Cordova/PhoneGap Build Information Plugin. Get PackageName, Version, Debug and more...", + "cordova": { + "id": "cordova-plugin-buildinfo", + "platforms": [ + "android" + ] + }, + "keywords": [ + "debug", + "buildconfig", + "buildinfo", + "phonegap", + "cordova", + "ecosystem:cordova", + "cordova-android" + ], + "scripts": { + "test": "npm run jshint", + "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests" + }, + "engines": { + "cordovaDependencies": { + "0.0.0": { + "cordova": ">=4.0.0" + }, + "2.0.0": { + "cordova": ">=5.4.0", + "cordova-android": ">=5.0.0" + }, + "3.0.0": { + "cordova": ">=5.4.0", + "cordova-android": ">=5.0.0" + }, + "4.0.0": { + "cordova": ">=5.4.0", + "cordova-android": ">=5.0.0" + }, + "5.0.0": { + "cordova": ">100" + } + } + }, + "author": "Mikihiro Hayashi", + "license": "MIT", + "devDependencies": { + "jshint": "^2.6.0" + } +} diff --git a/src/plugins/cordova-plugin-buildinfo/plugin.xml b/src/plugins/cordova-plugin-buildinfo/plugin.xml new file mode 100755 index 000000000..ed4320771 --- /dev/null +++ b/src/plugins/cordova-plugin-buildinfo/plugin.xml @@ -0,0 +1,69 @@ + + + BuildInfo + Cordova/Phonegap Build Information Plugin. Get PackageName, Version, Debug and more... + MIT + debug,buildconfig,buildinfo,phonegap,cordova + Mikihiro Hayashi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/cordova-plugin-buildinfo/scripts/after_install.js b/src/plugins/cordova-plugin-buildinfo/scripts/after_install.js similarity index 100% rename from plugins/cordova-plugin-buildinfo/scripts/after_install.js rename to src/plugins/cordova-plugin-buildinfo/scripts/after_install.js diff --git a/plugins/cordova-plugin-buildinfo/scripts/before_uninstall.js b/src/plugins/cordova-plugin-buildinfo/scripts/before_uninstall.js similarity index 100% rename from plugins/cordova-plugin-buildinfo/scripts/before_uninstall.js rename to src/plugins/cordova-plugin-buildinfo/scripts/before_uninstall.js diff --git a/plugins/cordova-plugin-buildinfo/scripts/browser_after_prepare.js b/src/plugins/cordova-plugin-buildinfo/scripts/browser_after_prepare.js similarity index 98% rename from plugins/cordova-plugin-buildinfo/scripts/browser_after_prepare.js rename to src/plugins/cordova-plugin-buildinfo/scripts/browser_after_prepare.js index 0a83da4ff..59247efdf 100644 --- a/plugins/cordova-plugin-buildinfo/scripts/browser_after_prepare.js +++ b/src/plugins/cordova-plugin-buildinfo/scripts/browser_after_prepare.js @@ -48,7 +48,6 @@ function rewriteBuildInfoProxy(context, pathPrefix) { const json = { debug: debug, - buildDate: new Date(), packageName: cfg.packageName(), basePackageName: cfg.packageName(), name: cfg.name(), diff --git a/src/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.gradle b/src/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.gradle new file mode 100644 index 000000000..381bd7be6 --- /dev/null +++ b/src/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.gradle @@ -0,0 +1,5 @@ +android { + defaultConfig { + //buildConfigField "long", "_BUILDINFO_TIMESTAMP", System.currentTimeMillis() + "L" + } +} \ No newline at end of file diff --git a/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.java b/src/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.java similarity index 97% rename from plugins/cordova-plugin-buildinfo/src/android/BuildInfo.java rename to src/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.java index b4dade1dd..98a1d6784 100644 --- a/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.java +++ b/src/plugins/cordova-plugin-buildinfo/src/android/BuildInfo.java @@ -149,7 +149,7 @@ private void init(String buildConfigClassName, CallbackContext callbackContext) mBuildInfoCache.put("version" , getClassFieldString(c, "VERSION_NAME", "")); mBuildInfoCache.put("versionCode" , getClassFieldInt(c, "VERSION_CODE", 0)); mBuildInfoCache.put("debug" , debug); - mBuildInfoCache.put("buildDate" , convertLongToDateTimeString(getClassFieldLong(c, "_BUILDINFO_TIMESTAMP", 0L))); + //mBuildInfoCache.put("buildDate" , convertLongToDateTimeString(getClassFieldLong(c, "_BUILDINFO_TIMESTAMP", 0L))); mBuildInfoCache.put("installDate" , convertLongToDateTimeString(firstInstallTime)); mBuildInfoCache.put("buildType" , getClassFieldString(c, "BUILD_TYPE", "")); mBuildInfoCache.put("flavor" , getClassFieldString(c, "FLAVOR", "")); @@ -164,7 +164,7 @@ private void init(String buildConfigClassName, CallbackContext callbackContext) Log.d(TAG, "debug : " + (mBuildInfoCache.getBoolean("debug") ? "true" : "false")); Log.d(TAG, "buildType : \"" + mBuildInfoCache.getString("buildType") + "\""); Log.d(TAG, "flavor : \"" + mBuildInfoCache.getString("flavor") + "\""); - Log.d(TAG, "buildDate : \"" + mBuildInfoCache.getString("buildDate") + "\""); + //Log.d(TAG, "buildDate : \"" + mBuildInfoCache.getString("buildDate") + "\""); Log.d(TAG, "installDate : \"" + mBuildInfoCache.getString("installDate") + "\""); } } catch (JSONException e) { diff --git a/plugins/cordova-plugin-buildinfo/www/buildinfo.js b/src/plugins/cordova-plugin-buildinfo/www/buildinfo.js similarity index 98% rename from plugins/cordova-plugin-buildinfo/www/buildinfo.js rename to src/plugins/cordova-plugin-buildinfo/www/buildinfo.js index b1f090ab1..a31ed20f5 100644 --- a/plugins/cordova-plugin-buildinfo/www/buildinfo.js +++ b/src/plugins/cordova-plugin-buildinfo/www/buildinfo.js @@ -34,7 +34,7 @@ module.exports = { version: '', versionCode: 0, debug: false, - buildDate: null, + //buildDate: null, installDate: null, buildType: '', flavor: '' @@ -130,13 +130,13 @@ if (_buldinfoCheckCordovaPlatform()) { module.exports.flavor = res.flavor; } - if ('undefined' !== typeof res.buildDate) { + /*if ('undefined' !== typeof res.buildDate) { if (res.buildDate instanceof Date) { module.exports.buildDate = res.buildDate; } else { module.exports.buildDate = new Date(res.buildDate); } - } + }*/ if ('undefined' !== typeof res.installDate) { if (res.installDate instanceof Date) { diff --git a/src/plugins/custom-tabs/package.json b/src/plugins/custom-tabs/package.json new file mode 100644 index 000000000..eeea20401 --- /dev/null +++ b/src/plugins/custom-tabs/package.json @@ -0,0 +1,17 @@ +{ + "name": "com.foxdebug.acode.rk.customtabs", + "version": "1.0.0", + "description": "Custom tabs api", + "cordova": { + "id": "com.foxdebug.acode.rk.customtabs", + "platforms": [ + "android" + ] + }, + "keywords": [ + "ecosystem:cordova", + "cordova-android" + ], + "author": "@RohitKushvaha01", + "license": "MIT" +} \ No newline at end of file diff --git a/src/plugins/custom-tabs/plugin.xml b/src/plugins/custom-tabs/plugin.xml new file mode 100644 index 000000000..39d5b9b97 --- /dev/null +++ b/src/plugins/custom-tabs/plugin.xml @@ -0,0 +1,36 @@ + + + Custom Tabs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/plugins/custom-tabs/src/CustomTabsPlugin.java b/src/plugins/custom-tabs/src/CustomTabsPlugin.java new file mode 100644 index 000000000..a7ee4cc2a --- /dev/null +++ b/src/plugins/custom-tabs/src/CustomTabsPlugin.java @@ -0,0 +1,79 @@ +package com.foxdebug.acode.rk.customtabs; + +import android.content.ActivityNotFoundException; +import android.content.Intent; +import android.net.Uri; +import android.graphics.Color; + +import androidx.browser.customtabs.CustomTabsIntent; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; +import org.json.JSONArray; +import org.json.JSONObject; + +public class CustomTabsPlugin extends CordovaPlugin { + + @Override + public boolean execute( + String action, + JSONArray args, + CallbackContext callbackContext + ) { + + if ("open".equals(action)) { + try { + final String url = args.getString(0); + final JSONObject options = args.optJSONObject(1) != null + ? args.optJSONObject(1) + : new JSONObject(); + + cordova.getActivity().runOnUiThread(() -> { + try { + openCustomTab(url, options); + callbackContext.success(); + } catch (Exception e) { + callbackContext.error(e.getMessage()); + } + }); + + return true; + + } catch (Exception e) { + callbackContext.error(e.getMessage()); + return true; + } + } + + return false; + } + + private void openCustomTab(String url, JSONObject options) { + CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); + + String toolbarColor = options.optString("toolbarColor", null); + if (toolbarColor != null && !toolbarColor.isEmpty()) { + builder.setToolbarColor(Color.parseColor(toolbarColor)); + } + + CustomTabsIntent customTabsIntent = builder.build(); + + if (options.optBoolean("showTitle", true)) { + customTabsIntent.intent.putExtra(CustomTabsIntent.EXTRA_TITLE_VISIBILITY_STATE, CustomTabsIntent.SHOW_PAGE_TITLE); + } + + try { + customTabsIntent.launchUrl( + cordova.getActivity(), + Uri.parse(url) + ); + } catch (ActivityNotFoundException e) { + // Fallback to default browser + Intent fallback = new Intent( + Intent.ACTION_VIEW, + Uri.parse(url) + ); + cordova.getActivity().startActivity(fallback); + } + } +} diff --git a/src/plugins/custom-tabs/www/customtabs.js b/src/plugins/custom-tabs/www/customtabs.js new file mode 100644 index 000000000..f87bb60f0 --- /dev/null +++ b/src/plugins/custom-tabs/www/customtabs.js @@ -0,0 +1,11 @@ +var exec = require('cordova/exec'); + +exports.open = function (url, options, success, error) { + exec( + success, + error, + 'CustomTabs', + 'open', + [url, options || {}] + ); +}; diff --git a/src/plugins/ftp/index.d.ts b/src/plugins/ftp/index.d.ts index 1434208cf..4cde35a1b 100644 --- a/src/plugins/ftp/index.d.ts +++ b/src/plugins/ftp/index.d.ts @@ -1,13 +1,123 @@ -interface Ftp{ - connect( - hostname: String, - username: String, - password: String, - type: String, - mode: 'ftp' | 'ftps', - successCallback: ()=>void, - errorCallback: ()=>void - ): void; -} - +interface FtpOptions { + connectionMode: 'passive' | 'active'; + securityType: 'ftp' | 'ftps'; + encoding: 'utf8' | 'binary'; +} + +type SuccessCallback = (res: any) => void; +type ErrorCallback = (err: any) => void; + +interface Ftp{ + connect( + host: string, + port: number, + username: string, + password: string, + options: FtpOptions, + onSuccess: SuccessCallback, + onError: ErrorCallback + ): void; + listDirectory( + id: string, // connection id + path: string, + onSuccess: SuccessCallback, + onError: ErrorCallback + ): void; + execCommand( + id: string, // connection id + command: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ...args: string, + ): void; + isConnected( + id: string, // connection id + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + disconnect( + id: string, // connection id + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + downloadFile( + id: string, // connection id + remotePath: string, + localPath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + uploadFile( + id: string, // connection id + localPath: string, + remotePath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + deleteFile( + id: string, // connection id + remotePath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + deleteDirectory( + id: string, // connection id + remotePath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + createDirectory( + id: string, // connection id + remotePath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + createFile( + id: string, // connection id + remotePath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + getStat( + id: string, // connection id + remotePath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + exists( + id: string, // connection id + remotePath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + changeDirectory( + id: string, // connection id + remotePath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + changeToParentDirectory( + id: string, // connection id + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + getWorkingDirectory( + id: string, // connection id + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + rename( + id: string, // connection id + oldPath: string, + newPath: string, + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; + sendNoOp( + id: string, // connection id + onSuccess: SuccessCallback, + onError: ErrorCallback, + ): void; +} + declare var ftp: Ftp; \ No newline at end of file diff --git a/src/plugins/ftp/plugin.xml b/src/plugins/ftp/plugin.xml index a604bad83..d3bb93c21 100644 --- a/src/plugins/ftp/plugin.xml +++ b/src/plugins/ftp/plugin.xml @@ -1,31 +1,10 @@ - - - Ftp Cordova Ftp Plugin - Apache 2.0 + MIT cordova,ftp - https://github.com/xfally/cordova-plugin-ftp.git @@ -35,13 +14,12 @@ - + - - - + + diff --git a/src/plugins/ftp/src/android/CDVFtp.java b/src/plugins/ftp/src/android/CDVFtp.java deleted file mode 100644 index fefb2a1e3..000000000 --- a/src/plugins/ftp/src/android/CDVFtp.java +++ /dev/null @@ -1,767 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -package io.github.xfally.cordova.plugin.ftp; - -import android.util.Log; -import it.sauronsoftware.ftp4j.FTPClient; -import it.sauronsoftware.ftp4j.FTPConnector; -import it.sauronsoftware.ftp4j.FTPDataTransferListener; -import it.sauronsoftware.ftp4j.FTPFile; -import it.sauronsoftware.ftp4j.FTPReply; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.text.SimpleDateFormat; -import java.util.Date; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.PluginResult; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public class CDVFtp extends CordovaPlugin { - - public static final String TAG = CDVFtp.class.getSimpleName(); - private String rootPath = "/"; - private FTPClient client = null; - private String homeDirectoryPath = null; - - @Override - public boolean execute( - String action, - final JSONArray args, - final CallbackContext callbackContext - ) - throws JSONException { - if (action.equals("connect")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - connect( - args.getString(0), - args.getString(1), - args.getString(2), - args.getString(3), - args.getString(4), - callbackContext - ); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("list")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - list(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("createDirectory")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - createDirectory(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("deleteDirectory")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - deleteDirectory(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("deleteFile")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - deleteFile(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("uploadFile")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - uploadFile( - args.getString(0), - args.getString(1), - callbackContext - ); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("downloadFile")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - downloadFile( - args.getString(0), - args.getString(1), - callbackContext - ); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("cancelAllRequests")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - cancelAllRequests(callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("disconnect")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - disconnect(callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("rename")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - rename(args.getString(0), args.getString(1), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("currentDirectory")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - currentDirectory(callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("homeDirectory")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - homeDirectory(callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else if (action.equals("exists")) { - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - try { - exists(args.getString(0), callbackContext); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - ); - } else { - return false; - } - // This action/cmd is found/supported - return true; - } - - private void connect( - String hostname, - String username, - String password, - String mode, - String type, - CallbackContext callbackContext - ) { - if (hostname == null || hostname.length() <= 0) { - callbackContext.error("Expected hostname."); - } else { - if (username == null && password == null) { - username = "anonymous"; - password = "anonymous@"; - } - - try { - String[] address = hostname.split(":"); - int port = 21; - String host = null; - - if (address.length == 2) { - port = Integer.parseInt(address[1]); - host = address[0]; - } else { - host = hostname; - } - - if (client != null && client.isConnected()) { - String cUsername = client.getUsername(); - String cHost = client.getHost(); - String cPass = client.getPassword(); - int cPort = client.getPort(); - - Boolean isAlreadyConnected = - host.equals(cHost) && - username.equals(cUsername) && - password.equals(cPass) && - port == cPort; - - if (isAlreadyConnected) { - callbackContext.success("OK"); - return; - } else { - client.disconnect(true); - client.setAutoNoopTimeout(0); - } - } - - client = new FTPClient(); - client.setAutoNoopTimeout(30000); - - if (type.equals("ftps")) client.setSecurity( - FTPClient.SECURITY_FTPS - ); else if (type.equals("ftpes")) client.setSecurity( - FTPClient.SECURITY_FTPES - ); - - if (mode.equals("active")) client.setPassive(false); else if ( - mode.equals("passive") - ) client.setPassive(true); - - client.connect(host, port); - client.login(username, password); - - this.homeDirectoryPath = client.currentDirectory(); - callbackContext.success(homeDirectoryPath); - } catch (Exception e) { - client = null; - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void list(String path, CallbackContext callbackContext) { - try { - String currentDirectory = client.currentDirectory(); - - if (path.equals("") || path == null) path = currentDirectory; - - if (!currentDirectory.equals(path)) { - if (!path.endsWith("/")) path = path.concat("/"); - client.changeDirectory(path); - } - - FTPFile[] list = client.list(); - JSONArray fileList = new JSONArray(); - for (FTPFile file : list) { - String name = file.getName(); - Number type = file.getType(); - String link = file.getLink(); - Number size = file.getSize(); - Date modifiedDate = file.getModifiedDate(); - String modifiedDateString = - (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzz")).format( - modifiedDate - ); - - JSONObject fileData = new JSONObject(); - fileData.put("name", name); - fileData.put("type", type); - fileData.put("link", link); - fileData.put("size", size); - fileData.put("modifiedDate", modifiedDateString); - fileData.put( - "absolutePath", - path + (path.endsWith("/") ? "" : "/") + name - ); - fileList.put(fileData); - } - callbackContext.success(fileList); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - - private void createDirectory(String path, CallbackContext callbackContext) { - if (path == null) { - callbackContext.error("Expected path."); - } else { - if (!path.endsWith("/")) { - path = path.concat("/"); - } - - try { - client.changeDirectory(this.rootPath); - client.createDirectory(path); - callbackContext.success("Create directory OK"); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void deleteDirectory(String path, CallbackContext callbackContext) { - if (path == null) { - callbackContext.error("Expected path."); - } else { - if (!path.endsWith("/")) { - path = path.concat("/"); - } - - try { - client.changeDirectory(this.rootPath); - client.deleteDirectory(path); - callbackContext.success("Delete directory OK"); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void deleteFile(String file, CallbackContext callbackContext) { - if (file == null) { - callbackContext.error("Expected file."); - } else { - try { - client.changeDirectory(this.rootPath); - client.deleteFile(file); - callbackContext.success("Delete file OK"); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void uploadFile( - String localFile, - String remoteFile, - CallbackContext callbackContext - ) { - if (localFile == null || remoteFile == null) { - callbackContext.error("Expected localFile and remoteFile."); - } else { - try { - String remoteFilePath = remoteFile.substring( - 0, - remoteFile.lastIndexOf('/') + 1 - ); - String remoteFileName = remoteFile.substring( - remoteFile.lastIndexOf('/') + 1 - ); - String localFilePath = localFile.substring( - 0, - localFile.lastIndexOf('/') + 1 - ); - String localFileName = localFile.substring( - localFile.lastIndexOf('/') + 1 - ); - client.changeDirectory(remoteFilePath); - File file = new File(localFile); - InputStream in = new FileInputStream(file); - long size = file.length(); - client.upload( - remoteFileName, - in, - 0, - 0, - new CDVFtpTransferListener(size, callbackContext) - ); - // refer to CDVFtpTransferListener for transfer percent and completed - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void downloadFile( - String localFile, - String remoteFile, - CallbackContext callbackContext - ) { - if (localFile == null || remoteFile == null) { - callbackContext.error("Expected localFile and remoteFile."); - } else { - try { - String remoteFilePath = remoteFile.substring( - 0, - remoteFile.lastIndexOf('/') + 1 - ); - String remoteFileName = remoteFile.substring( - remoteFile.lastIndexOf('/') + 1 - ); - client.changeDirectory(remoteFilePath); - FTPFile[] list = client.list(); - JSONArray fileList = new JSONArray(); - for (FTPFile file : list) { - String name = file.getName(); - // Number type = file.getType(); - // String link = file.getLink(); - Number size = file.getSize(); - if (remoteFileName.equals(name)) { - client.download( - remoteFileName, - new File(localFile), - new CDVFtpTransferListener(size.longValue(), callbackContext) - ); - // refer to CDVFtpTransferListener for transfer percent and completed - return; - } - } - callbackContext.error("File not found"); - // should never reach here! - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void exists(String remoteFile, CallbackContext callbackContext) { - if (remoteFile == null) { - callbackContext.error("Expected remoteFile path."); - } else { - try { - String remoteFilePath = remoteFile.substring( - 0, - remoteFile.lastIndexOf('/') + 1 - ); - String remoteFileName = remoteFile.substring( - remoteFile.lastIndexOf('/') + 1 - ); - client.changeDirectory(remoteFilePath); - FTPFile[] list = client.list(); - JSONArray fileList = new JSONArray(); - for (FTPFile file : list) { - String name = file.getName(); - if (remoteFileName.equals(name)) { - callbackContext.success(1); - return; - } - } - callbackContext.success(0); - // should never reach here! - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void rename( - String path, - String newPath, - CallbackContext callbackContext - ) { - if (path == null || newPath == null) { - callbackContext.error("Expected localFile and remoteFile."); - } else { - try { - client.rename(path, newPath); - callbackContext.success("Rename OK"); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - } - - private void currentDirectory(CallbackContext callbackContext) { - try { - String dir = client.currentDirectory(); - callbackContext.success(dir); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - - private void homeDirectory(CallbackContext callbackContext) { - try { - callbackContext.success(this.homeDirectoryPath); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - - private void cancelAllRequests(CallbackContext callbackContext) { - try { - // `true` to perform a legal abort procedure (an ABOR command is sent to the - // server), - // `false` to abruptly close the transfer without advice. - client.abortCurrentDataTransfer(true); - callbackContext.success("Cancel OK."); - } catch (Exception e) { - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } - - private void disconnect(CallbackContext callbackContext) { - try { - // `true` to perform a legal disconnect procedure (an QUIT command is sent to - // the server), - // `false` to break the connection without advice. - client.disconnect(true); - client.setAutoNoopTimeout(0); - callbackContext.success("Disconnect OK."); - } catch (Exception e) { - client = null; - String message = e.getMessage(); - if (message == null) { - message = e.toString(); - } - callbackContext.error(message); - } - } -} - -class CDVFtpTransferListener implements FTPDataTransferListener { - - public static final String TAG = CDVFtpTransferListener.class.getSimpleName(); - private long totalSize = 0; - private long curSize = 0; - private CallbackContext callbackContext = null; - private PluginResult pluginResult = null; - - public CDVFtpTransferListener(long size, CallbackContext callbackContext) { - this.totalSize = size; - this.callbackContext = callbackContext; - } - - public void started() { - // Transfer started - Log.i(TAG, "Transfer started"); - this.curSize = 0; - } - - public void transferred(int length) { - // Yet other length bytes has been transferred since the last time this - // method was called - this.curSize += length; - float percent = (float) this.curSize / (float) this.totalSize; - Log.d( - TAG, - "Transferred, totalSize=" + - this.totalSize + - ", curSize=" + - this.curSize + - ", percent=" + - percent - ); - // Tip: just return if percent < 1, to prevent js:successCallback() invoked - // twice, as completed() will also return 1. - if (percent >= 0 && percent < 1) { - this.pluginResult = new PluginResult(PluginResult.Status.OK, percent); - this.pluginResult.setKeepCallback(true); - this.callbackContext.sendPluginResult(this.pluginResult); - } - } - - public void completed() { - // Transfer completed - Log.i(TAG, "Transfer completed"); - this.pluginResult = new PluginResult(PluginResult.Status.OK, 1); - this.pluginResult.setKeepCallback(false); - this.callbackContext.sendPluginResult(this.pluginResult); - } - - public void aborted() { - // Transfer aborted - Log.w(TAG, "Transfer aborted"); - this.pluginResult = new PluginResult(PluginResult.Status.NO_RESULT); - this.pluginResult.setKeepCallback(false); - this.callbackContext.sendPluginResult(this.pluginResult); - } - - public void failed() { - // Transfer failed - Log.e(TAG, "Transfer failed"); - this.pluginResult = new PluginResult(PluginResult.Status.ERROR); - this.pluginResult.setKeepCallback(false); - this.callbackContext.sendPluginResult(this.pluginResult); - } -} diff --git a/src/plugins/ftp/src/android/com/foxdebug/ftp/Ftp.java b/src/plugins/ftp/src/android/com/foxdebug/ftp/Ftp.java new file mode 100644 index 000000000..92c5a2f19 --- /dev/null +++ b/src/plugins/ftp/src/android/com/foxdebug/ftp/Ftp.java @@ -0,0 +1,1092 @@ +package com.foxdebug.ftp; + +import android.app.Activity; +import android.content.Context; +import android.util.Log; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; +import java.lang.SecurityException; +import java.lang.reflect.Method; +import java.net.SocketException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URISyntaxException; +import java.net.URLDecoder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import org.apache.commons.net.ftp.*; +import org.apache.commons.net.ftp.parser.ParserInitializationException; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +public class Ftp extends CordovaPlugin { + + HashMap ftpProfiles = new HashMap(); + Context context; + Activity activity; + String connectionID; + + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + context = cordova.getContext(); + activity = cordova.getActivity(); + } + + public boolean execute( + String action, + JSONArray args, + CallbackContext callback + ) { + try { + Method method = + this.getClass() + .getDeclaredMethod(action, JSONArray.class, CallbackContext.class); + if (method != null) { + method.invoke(this, args, callback); + return true; + } + return false; + } catch (NoSuchMethodException e) { + callback.error(e.getMessage()); + return false; + } catch (SecurityException e) { + callback.error(e.getMessage()); + return false; + } catch (Exception e) { + callback.error(e.getMessage()); + return false; + } + } + + public void connect(JSONArray args, CallbackContext callback) { + connect(args, callback, false); + } + + public void connect( + JSONArray args, + CallbackContext callback, + boolean isRetry + ) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + int reply; + int port = args.optInt(1); + String host = args.optString(0); + String username = args.optString(2); + String password = args.optString(3); + String defaultPath = args.optString(4); + String securityType = args.optString(5); + String connectionMode = args.optString(6); + String encryption = args.optString(7); + String encoding = args.optString(8); + String ftpId = getFtpId(host, port, username); + FTPClient ftp = null; + + try { + if (ftpProfiles.containsKey(ftpId)) { + ftp = ftpProfiles.get(ftpId); + reply = ftp.getReplyCode(); + if (ftp.isConnected() && FTPReply.isPositiveCompletion(reply)) { + ftp.setControlEncoding("UTF-8"); + ftp.setAutodetectUTF8(true); + System.setProperty("ftp.client.encoding", "UTF-8"); + // test if connection is still valid + ftp.sendNoOp(); + Log.d("FTP", "FTPClient (" + ftpId + ") is connected"); + callback.success(ftpId); + return; + } + Log.d("FTP", "FTPClient (" + ftpId + ") is not connected"); + ftp.disconnect(); + Log.d("FTP", "FTPClient (" + ftpId + ") disconnecting..."); + } else { + Log.d("FTP", "Creating new FTPClient (" + ftpId + ")"); + ftp = new FTPClient(); + ftpProfiles.put(ftpId, ftp); + } + + Log.d("FTP", "FTPClient (" + ftpId + ") connecting..."); + ftp.connect(host, port); + ftp.setControlKeepAliveTimeout(300); + if (connectionMode.equals("active")) { + Log.d("FTP", "Entering Local Active mode"); + ftp.enterLocalActiveMode(); + } else { + Log.d("FTP", "Entering Passive Active mode"); + ftp.enterLocalPassiveMode(); + } + + Log.d("FTP", "FTPClient (" + ftpId + ") logging in..."); + ftp.login(username, password); + + reply = ftp.getReplyCode(); + if (!FTPReply.isPositiveCompletion(reply)) { + ftp.disconnect(); + Log.d( + "FTP", + "FTPClient (" + ftpId + ") server refused connection." + ); + callback.error("FTP server refused connection."); + return; + } + + ftp.setListHiddenFiles(true); + ftpProfiles.put(ftpId, ftp); + Log.d("FTP", "FTPClient (" + ftpId + ") connected"); + callback.success(ftpId); + } catch (IOException e) { + Log.e("FTP", "FTPClient (" + ftpId + ")", e); + if (ftp != null) { + ftpProfiles.remove(ftpId); + } + + if (!isRetry) { + connect(args, callback, true); + return; + } + + callback.error(e.getMessage()); + } catch (Exception e) { + Log.e("FTP", "FTPClient (" + ftpId + ")", e); + + if (ftp != null) { + ftpProfiles.remove(ftpId); + } + + if (!isRetry) { + connect(args, callback, true); + return; + } + + callback.error(e.getMessage()); + } + } + } + ); + } + + private static String getBaseName(String path) { + int lastSepIndex = path.lastIndexOf('/'); + if (lastSepIndex == path.length() - 1) { + return getBaseName(path.substring(0, lastSepIndex)); + } + + return path.substring(lastSepIndex + 1); + } + + private static String getParentPath(String path) { + int lastSepIndex = path.lastIndexOf('/'); + if (lastSepIndex == path.length() - 1) { + lastSepIndex = path.substring(0, lastSepIndex).lastIndexOf('/'); + } + + return path.substring(0, lastSepIndex); + } + + public void listDirectory(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String path = args.optString(1); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (path == null || path.isEmpty()) { + path = "/"; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + FTPFile[] files = ftp.listFiles(path); + Log.d( + "FTP", + "FTPClient (" + ftpId + ") Listing files in " + path + ); + Log.d( + "FTP", + "FTPClient (" + ftpId + ") Found " + files.length + " files." + ); + + JSONArray jsonFiles = new JSONArray(); + + for (FTPFile file : files) { + String filename = file.getName(); + if (filename.equals(".") || filename.equals("..")) { + continue; + } + + JSONObject jsonFile = new JSONObject(); + jsonFile.put("name", filename); + jsonFile.put("length", file.getSize()); + jsonFile.put("url", joinPath(path, filename)); + + if (file.isSymbolicLink()) { + jsonFile.put("isLink", true); + String linkTarget = file.getLink(); + jsonFile.put("link", linkTarget); + String linkPath = linkTarget.startsWith("/") + ? linkTarget + : joinPath(path, linkTarget); + try { + FTPFile[] targetFiles = ftp.listFiles(linkPath); + if (targetFiles.length > 0) { + FTPFile targetFile = targetFiles[0]; + jsonFile.put("isFile", targetFile.isFile()); + jsonFile.put("isDirectory", targetFile.isDirectory()); + jsonFile.put("url", linkPath); + } else { + jsonFile.put("isFile", false); + jsonFile.put("isDirectory", false); + } + } catch (Exception e) { + // Handle broken symlink + jsonFile.put("isFile", false); + jsonFile.put("isDirectory", false); + } + } else { + jsonFile.put("isLink", false); + jsonFile.put("isDirectory", file.isDirectory()); + jsonFile.put("isFile", file.isFile()); + jsonFile.put("link", null); + } + + jsonFile.put( + "lastModified", + file.getTimestamp().getTimeInMillis() + ); + jsonFile.put( + "canWrite", + file.hasPermission( + FTPFile.USER_ACCESS, + FTPFile.WRITE_PERMISSION + ) + ); + jsonFile.put( + "canRead", + file.hasPermission( + FTPFile.USER_ACCESS, + FTPFile.READ_PERMISSION + ) + ); + jsonFiles.put(jsonFile); + } + callback.success(jsonFiles); + } catch (ParserInitializationException e) { + callback.error(e.getMessage()); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (IOException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void exists(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + String ftpId = args.optString(0); + String path = args.optString(1); + try { + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (path == null || path.isEmpty()) { + path = "/"; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + // check if file or directory exists + FTPFile[] ftpFiles = ftp.listFiles(path); + if (ftpFiles.length > 0) { + callback.success(1); + } else { + callback.success(0); + } + } catch (ParserInitializationException e) { + Log.e("FTP", "FTPClient (" + ftpId + ") path: " + path, e); + callback.error(e.getMessage()); + Log.e("FTP", "FTPClient (" + ftpId + ") path: " + path, e); + } catch (FTPConnectionClosedException e) { + Log.e("FTP", "FTPClient (" + ftpId + ") path: " + path, e); + callback.error(e.getMessage()); + } catch (IOException e) { + Log.e("FTP", "FTPClient (" + ftpId + ") path: " + path, e); + callback.error(e.getMessage()); + } catch (Exception e) { + Log.e("FTP", "FTPClient (" + ftpId + ") path: " + path, e); + callback.error(e.getMessage()); + } + } + } + ); + } + + public void sendNoOp(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + ftp.sendNoOp(); + callback.success(); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void deleteFile(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String path = args.optString(1); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (path == null || path.isEmpty()) { + callback.error("Path is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + ftp.deleteFile(path); + callback.success(); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (IOException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void deleteDirectory(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String path = args.optString(1); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (path == null || path.isEmpty()) { + callback.error("Path is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + Log.d("FTP", "Deleting directory " + path); + // delete all files in the directory + emptyDirectory(path, ftp); + + callback.success(); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (IOException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void rename(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String oldPath = args.optString(1); + String newPath = args.optString(2); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (oldPath == null || oldPath.isEmpty()) { + callback.error("Old path is required."); + return; + } + + if (newPath == null || newPath.isEmpty()) { + callback.error("New path is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + // get list of files in the parent directory + String parentPath = getParentPath(oldPath); + FTPFile[] ftpFiles = ftp.listFiles(parentPath); + + Log.d("FTP", "Renaming " + oldPath + " to " + newPath); + ftp.rename(oldPath, newPath); + + // check if file is renamed successfully + FTPFile[] newFile = ftp.listFiles(newPath); + if (newFile.length > 0) { + callback.success(newPath); + } else { + // get latest list of files in the parent directory + FTPFile[] latestFtpFiles = ftp.listFiles(parentPath); + // some time src file is renamed and not moved to destination + // check if for changed file and rename it original name + FTPFile changedFile = null; + for (FTPFile file : latestFtpFiles) { + boolean found = false; + for (FTPFile oldFile : ftpFiles) { + if (oldFile.getName().equals(file.getName())) { + found = true; + break; + } + } + if (!found) { + changedFile = file; + break; + } + } + + if (changedFile != null) { + String changedFilePath = joinPath( + parentPath, + changedFile.getName() + ); + ftp.rename(changedFilePath, oldPath); + } + callback.error("Failed to rename file"); + } + + callback.success(); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (IOException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void downloadFile(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String path = args.optString(1); + String localFilePath = args.optString(2); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (path == null || path.isEmpty()) { + callback.error("Path is required."); + return; + } + + if (localFilePath == null || localFilePath.isEmpty()) { + callback.error("Local file is required."); + return; + } + + URI uri = new URI(localFilePath); + File localFile = new File(uri); + FTPClient ftp = ftpProfiles.get(ftpId); + + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + ftp.setFileType(FTP.BINARY_FILE_TYPE); + + InputStream inputStream = ftp.retrieveFileStream(path); + if (inputStream == null) { + Log.d( + "FTP", + "FTPClient (" + ftpId + ") path: " + path + " - not found" + ); + callback.error("File not found."); + return; + } + + FileOutputStream outputStream = new FileOutputStream(localFile); + byte[] buffer = new byte[1024]; + int bytesRead = -1; + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + outputStream.close(); + inputStream.close(); + + if (!ftp.completePendingCommand()) { + ftp.logout(); + ftp.disconnect(); + callback.error("File transfer failed."); + return; + } + + callback.success(); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (URISyntaxException e) { + callback.error(e.getMessage()); + } catch (IOException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void uploadFile(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String localFilePath = args.optString(1); + String remoteFilePath = args.optString(2); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (remoteFilePath == null || remoteFilePath.isEmpty()) { + callback.error("Path is required."); + return; + } + + if (localFilePath == null || localFilePath.isEmpty()) { + callback.error("Local file is required."); + return; + } + + Log.d("FTPUpload", "uploadFile: " + localFilePath); + URI uri = new URI(localFilePath); + File localFile = new File(uri); + FTPClient ftp = ftpProfiles.get(ftpId); + + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + ftp.setFileType(FTP.BINARY_FILE_TYPE); + + Log.d("FTPUpload", "Destination " + remoteFilePath); + OutputStream outputStream = ftp.storeFileStream(remoteFilePath); + if (outputStream == null) { + callback.error("File not found."); + return; + } + + InputStream inputStream = new FileInputStream(localFile); + byte[] buffer = new byte[1024]; + int bytesRead = -1; + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + outputStream.close(); + inputStream.close(); + + if (!ftp.completePendingCommand()) { + ftp.logout(); + ftp.disconnect(); + callback.error("File transfer failed."); + return; + } + + callback.success(); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (URISyntaxException e) { + callback.error(e.getMessage()); + } catch (IOException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void getKeepAlive(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + callback.success((int) ftp.getControlKeepAliveTimeout()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void execCommand(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String command = args.optString(1); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (command == null || command.isEmpty()) { + callback.error("Command is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + ftp.sendCommand(command); + String reply = ftp.getReplyString(); + callback.success(reply); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void isConnected(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + boolean connected = ftp.isConnected(); + callback.success(connected ? 1 : 0); + } catch (Exception e) { + Log.e("FTP", "FTPClient", e); + callback.error(e.getMessage()); + } + } + } + ); + } + + public void disconnect(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp != null) { + ftp.disconnect(); + ftpProfiles.remove(ftpId); + } + callback.success(); + } catch (IOException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void createDirectory(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String path = args.optString(1); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (path == null || path.isEmpty()) { + callback.error("Path is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + ftp.makeDirectory(path); + callback.success(); + } catch (IOException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void changeDirectory(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String path = args.optString(1); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (path == null || path.isEmpty()) { + callback.error("Path is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + ftp.changeWorkingDirectory(path); + callback.success(); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void changeToParentDirectory( + JSONArray args, + CallbackContext callback + ) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + ftp.changeToParentDirectory(); + callback.success(); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void getWorkingDirectory(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + String workingDirectory = ftp.printWorkingDirectory(); + callback.success(workingDirectory); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + public void getStat(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String ftpId = args.optString(0); + String path = args.optString(1); + + if (ftpId == null || ftpId.isEmpty()) { + callback.error("FTP ID is required."); + return; + } + + if (path == null || path.isEmpty()) { + callback.error("Path is required."); + return; + } + + FTPClient ftp = ftpProfiles.get(ftpId); + if (ftp == null) { + callback.error("FTP client not found."); + return; + } + + FTPFile[] files = ftp.listFiles(path); + if (files == null || files.length == 0) { + callback.error("File not found."); + return; + } + + FTPFile file = files[0]; + JSONObject stat = new JSONObject(); + stat.put("isFile", file.isFile()); + stat.put("isValid", file.isValid()); + stat.put("isUnknown", file.isUnknown()); + stat.put("isDirectory", file.isDirectory()); + stat.put("isLink", file.isSymbolicLink()); + stat.put("linkCount", file.getHardLinkCount()); + stat.put("length", file.getSize()); + stat.put("name", getBaseName(file.getName())); + stat.put("lastModified", file.getTimestamp().getTimeInMillis()); + stat.put("link", file.getLink()); + stat.put("group", file.getGroup()); + stat.put("user", file.getUser()); + stat.put( + "canWrite", + file.hasPermission( + FTPFile.USER_ACCESS, + FTPFile.WRITE_PERMISSION + ) + ); + stat.put( + "canRead", + file.hasPermission(FTPFile.USER_ACCESS, FTPFile.READ_PERMISSION) + ); + + callback.success(stat); + } catch (ParserInitializationException e) { + callback.error(e.getMessage()); + } catch (FTPConnectionClosedException e) { + callback.error(e.getMessage()); + } catch (IOException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + private String getFtpId(String host, int port, String username) { + return username + "@" + host + ":" + port; + } + + private String errMessage(Exception e) { + String res = e.getMessage(); + if (res == null || res.equals("")) { + return e.toString(); + } + + return res; + } + + private void emptyDirectory(String directory, FTPClient client) + throws FTPConnectionClosedException, IOException { + FTPFile[] files = client.listFiles(directory); + for (FTPFile file : files) { + String filename = file.getName(); + if (filename.equals(".") || filename.equals("..")) { + continue; + } + if (file.isDirectory()) { + Log.d("FTP", "Removing directory: " + file.getName()); + emptyDirectory(directory + "/" + file.getName(), client); + } else { + Log.d("FTP", "Removing file: " + file.getName()); + client.deleteFile(directory + "/" + file.getName()); + } + } + client.removeDirectory(directory); + } + + private String joinPath(String p1, String p2) { + if (!p1.endsWith("/")) { + p1 += "/"; + } + return p1 + p2; + } +} diff --git a/src/plugins/ftp/src/android/libs/ftp4j-1.7.2.jar b/src/plugins/ftp/src/android/libs/ftp4j-1.7.2.jar deleted file mode 100644 index fca26eca2..000000000 Binary files a/src/plugins/ftp/src/android/libs/ftp4j-1.7.2.jar and /dev/null differ diff --git a/src/plugins/ftp/www/ftp.js b/src/plugins/ftp/www/ftp.js index fd06e58f0..b8fffeb3c 100644 --- a/src/plugins/ftp/www/ftp.js +++ b/src/plugins/ftp/www/ftp.js @@ -1,225 +1,94 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -var exec = require('cordova/exec'); -/** - * Util to remove path protocol prefix. - */ - - -function removePathProtocolPrefix(path) { - if (path.indexOf("file://") === 0) { - return path.substring(7); - } else if (path.indexOf("file:") === 0) { - return path.substring(5); - } else { - return path; - } -} -/** - * Ftp class - * @constructor - */ - - -function Ftp() {} -/** - * Connect to one ftp server. - * - * Just need to init the connection once. If success, you can do any ftp actions later. - * - * @param {string} hostname The ftp server address. The address without protocol prefix, e.g. "192.168.1.1:21", "ftp.xfally.github.io" - * Notice: address port is only supported for Android, if not given, default port 21 will be used. - * @param {string} username The ftp login username. If both `username` and `password` are empty, the default username "anonymous" will be used. - * @param {string} password The ftp login password. If both `username` and `password` are empty, the default password "anonymous@" will be used. - * @param {"ftps"|"ftpes"} type FTP security type - * @param {"active"|"passive"} mode FTP connect mode - * @param {function} successCallback The success callback. - * Notice: For iOS, if triggered, means `init` success. But NOT means the later action, e.g. `ls`... `download` will success! - * @param {function} errorCallback The error callback. If triggered, means init fail. - */ - - -Ftp.prototype.connect = function (hostname, username, password, type, mode, successCallback, errorCallback) { - if (typeof mode === "function") successCallback = mode; - if (typeof type === "function") errorCallback = type; - exec(successCallback, errorCallback, "Ftp", "connect", [hostname, username, password, mode, type]); -}; -/** - * List files (with info of `name`, `type`, `link`, `size`, `modifiedDate`) under one directory on the ftp server. - * - * You can get one file's name using `fileList[x].name` (`x` is the location in the array). - * - * Explain file property: - * - name: The file name (utf-8). - * - type: The file type. number `0` means regular file, `1` means directory, `2` means symbolic link, `-1` means unknown type (maybe block dev, char dev...). - * - link: If the file is a symbolic link, then this field stores symbolic link information (utf-8), else it's an empty string. - * - size: The file size in bytes. - * - modifiedDate: The modified date of this file. Format is `yyyy-MM-dd HH:mm:ss zzz`, e.g "2015-12-01 20:45:00 GMT+8". - * - * @param {string} path The path on the ftp server. e.g. "/remotePath/". - * @param {function} successCallback The success callback, invoked with arg `{array} fileList`. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ - - -Ftp.prototype.ls = function (path, successCallback, errorCallback) { - exec(function (fileList) { - if (fileList instanceof Array) { - successCallback(fileList); - } - }, errorCallback, "Ftp", "list", [removePathProtocolPrefix(path)]); -}; -/** - * Create one directory on the ftp server. - * - * @param {string} path The directory you want to create. e.g. "/remotePath/newDir/". - * @param {function} successCallback The success callback. If triggered, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ - - -Ftp.prototype.mkdir = function (path, successCallback, errorCallback) { - exec(successCallback, errorCallback, "Ftp", "createDirectory", [removePathProtocolPrefix(path)]); -}; -/** - * Delete one directory on the ftp server. - * - * Notice: As many ftp server could not rm dir when it's not empty, so always recommended to `rm` all files under the dir at first before `rmdir`. - * - * @param {string} path The directory you want to delete. e.g. "/remotePath/newDir/". - * @param {function} successCallback The success callback. If triggered, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ - - -Ftp.prototype.rmdir = function (path, successCallback, errorCallback) { - exec(successCallback, errorCallback, "Ftp", "deleteDirectory", [removePathProtocolPrefix(path)]); -}; -/** - * Delete one file on the ftp server. - * - * @param {string} file The file (with full path) you want to delete. e.g. "/remotePath/remoteFile". - * @param {function} successCallback The success callback. If triggered, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ - - -Ftp.prototype.rm = function (file, successCallback, errorCallback) { - exec(successCallback, errorCallback, "Ftp", "deleteFile", [removePathProtocolPrefix(file)]); -}; -/** - * Upload one local file to the ftp server. - * - * @param {string} localFile The file (with full path) you want to upload. e.g. "/localPath/localFile". - * @param {string} remoteFile The file (with full path) you want to located on the ftp server. e.g. "/remotePath/remoteFile". - * You can see, "localFile" is also renamed to "remoteFile". - * @param {function} successCallback The success callback. It will be triggered many times according the file's size. - * The arg `0`, `0.11..`, `0.23..` ... `1` means the upload percent. When it reach `1`, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ - - -Ftp.prototype.upload = function (localFile, remoteFile, successCallback, errorCallback) { - exec(successCallback, errorCallback, "Ftp", "uploadFile", [removePathProtocolPrefix(localFile), removePathProtocolPrefix(remoteFile)]); -}; -/** - * Download one remote file on the ftp server to local path. - * - * @param {string} localFile The file (with full path) you want to located on the local device. e.g. "/localPath/localFile". - * @param {string} remoteFile The file (with full path) you want to download on the ftp server. e.g. "/remotePath/remoteFile". - * You can see, "remoteFile" is also renamed to "localFile". - * @param {function} successCallback The success callback. It will be triggered many times according the file's size. - * The arg `0`, `0.11..`, `0.23..` ... `1` means the download percent. When it reach `1`, means success. - * @param {function} errorCallback The error callback. If triggered, means fail. - */ - - -Ftp.prototype.download = function (localFile, remoteFile, successCallback, errorCallback) { - exec(successCallback, errorCallback, "Ftp", "downloadFile", [removePathProtocolPrefix(localFile), removePathProtocolPrefix(remoteFile)]); -}; -/** - * Rename or move old-path to new-path - * @param {string} path Old path - * @param {string} newPath New path - * @param {function} success New path - * @param {function} error New path - */ - - -Ftp.prototype.rename = function (path, newPath, success, error) { - exec(success, error, "Ftp", "rename", [removePathProtocolPrefix(path), removePathProtocolPrefix(newPath)]); -}; -/** - * This method asks and returns the current working directory. - * @param {function} success New path - * @param {function} error New path - */ - - -Ftp.prototype.currentDirectory = function (success, error) { - exec(success, error, "Ftp", "currentDirectory", []); -}; -/** - * This method asks and returns the current working directory. - * @param {function} success New path - * @param {function} error New path - */ - - -Ftp.prototype.homeDirectory = function (success, error) { - exec(success, error, "Ftp", "homeDirectory", []); -}; -/** - * Cancel all requests. Always success. - * - * @param {function} successCallback The success callback. If triggered, means `cancel` success. - * @param {function} errorCallback The error callback. If triggered, means cancel fail. - */ - - -Ftp.prototype.cancel = function (successCallback, errorCallback) { - exec(successCallback, errorCallback, "Ftp", "cancelAllRequests", []); -}; -/** - * Disconnect from ftp server. - * - * @param {function} successCallback The success callback. If triggered, means `disconnect` success. - * @param {function} errorCallback The error callback. If triggered, means disconnect fail. - */ - - -Ftp.prototype.disconnect = function (successCallback, errorCallback) { - exec(successCallback, errorCallback, "Ftp", "disconnect", []); -}; -/** - * Check if file exists - * - * @param {string} path file or directory path. - * @param {function} successCallback The success callback. If triggered, means `disconnect` success. - * @param {function} errorCallback The error callback. If triggered, means disconnect fail. - */ - - -Ftp.prototype.exists = function (path, successCallback, errorCallback) { - exec(successCallback, errorCallback, "Ftp", "exists", [path]); -}; - -module.exports = new Ftp(); \ No newline at end of file +module.exports = { + connect: function (host, port, username, password, options, onSuccess, onFail) { + if (typeof port != 'number') { + throw new Error('Port must be number'); + } + port = Number.parseInt(port); + + var connectionMode = "passive"; + var securityType = "ftp"; + var encoding = "utf8"; + + if (typeof options === 'function') { + onFail = onSuccess; + onSuccess = options; + options = {}; + } + + if (options) { + if (options.connectionMode) { + connectionMode = options.connectionMode; + } + if (options.securityType) { + securityType = options.securityType; + } + if (options.encoding) { + encoding = options.encoding; + } + } + + cordova.exec(onSuccess, onFail, 'Ftp', 'connect', [ + host, + port, + username, + password, + connectionMode, + securityType, + encoding + ]); + }, + listDirectory: function (id, path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'listDirectory', [id, path]); + }, + execCommand: function (id, command, onSuccess, onFail, args) { + cordova.exec(onSuccess, onFail, 'Ftp', 'execCommand', [id, command, args]); + }, + isConnected: function (id, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'isConnected', [id]); + }, + disconnect: function (id, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'disconnect', [id]); + }, + downloadFile: function (id, remotePath, localPath, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'downloadFile', [id, remotePath, localPath]); + }, + uploadFile: function (id, localPath, remotePath, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'uploadFile', [id, localPath, remotePath]); + }, + deleteFile: function (id, path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'deleteFile', [id, path]); + }, + deleteDirectory: function (id, path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'deleteDirectory', [id, path]); + }, + createDirectory: function (id, path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'createDirectory', [id, path]); + }, + createFile: function (id, path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'createFile', [id, path]); + }, + getStat: function (id, path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'getStat', [id, path]); + }, + exists: function (id, path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'exists', [id, path]); + }, + changeDirectory: function (id, path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'changeDirectory', [id, path]); + }, + changeToParentDirectory: function (id, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'changeToParentDirectory', [id]); + }, + getWorkingDirectory: function (id, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'getWorkingDirectory', [id]); + }, + rename: function (id, oldPath, newPath, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'rename', [id, oldPath, newPath]); + }, + getKeepAlive: function (id, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'getKeepAlive', [id]); + }, + sendNoOp: function (id, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Ftp', 'sendNoOp', [id]); + } +} \ No newline at end of file diff --git a/src/plugins/iap/index.d.ts b/src/plugins/iap/index.d.ts index b7cca4800..4fa6ee167 100644 --- a/src/plugins/iap/index.d.ts +++ b/src/plugins/iap/index.d.ts @@ -1,9 +1,32 @@ -interface Iap{ - getProducts(skuList: Array, onSuccess: (skuList: Array)=>void, onError:(err: String)=>error): void; - setPurchaseUpdatedListener(onSuccess: (purchase: Object)=>void, onError:(err: string)=>void): void; - startConnection(onSuccess: (responseCode: number)=>void, onError: (err: string)=>void): void; - consume(purchaseToken: string, onSuccess: (responseCode: number)=>void, onError: (err: string)=>void): void; - purchase(skuId: string, onSuccess: (responseCode: number)=>void, onError: (err: string)=>void): void; +interface Iap { + getProducts( + skuList: Array, + onSuccess: (skuList: Array) => void, + onError: (err: String) => Error, + ): void; + setPurchaseUpdatedListener( + onSuccess: (purchase: Object) => void, + onError: (err: string) => void, + ): void; + startConnection( + onSuccess: (responseCode: number) => void, + onError: (err: string) => void, + ): void; + consume( + purchaseToken: string, + onSuccess: (responseCode: number) => void, + onError: (err: string) => void, + ): void; + purchase( + skuId: string, + onSuccess: (responseCode: number) => void, + onError: (err: string) => void, + ): void; + getPurchases( + onSuccess: (purchaseList: Array) => void, + onError: (err: string) => void, + ): void; + OK: 0; BILLING_UNAVAILABLE: 3; DEVELOPER_ERROR: 5; ERROR: 6; @@ -11,11 +34,13 @@ interface Iap{ ITEM_ALREADY_OWNED: 7; ITEM_NOT_OWNED: 8; ITEM_UNAVAILABLE: 4; - OK: 0; SERVICE_DISCONNECTED: -1; SERVICE_TIMEOUT: -3; - SERVICE_TIMEOUT: 2; + SERVICE_UNAVAILABLE: 2; USER_CANCELED: 1; + PURCHASE_STATE_PURCHASED: 1; + PURCHASE_STATE_PENDING: 2; + PURCHASE_STATE_UNKNOWN: 0; } -declare var iap: Iap; \ No newline at end of file +declare var iap: Iap; diff --git a/src/plugins/iap/plugin.xml b/src/plugins/iap/plugin.xml index efc89ab88..f1d6300c1 100644 --- a/src/plugins/iap/plugin.xml +++ b/src/plugins/iap/plugin.xml @@ -22,6 +22,6 @@ - + \ No newline at end of file diff --git a/src/plugins/iap/src/com/foxdebug/iap/Iap.java b/src/plugins/iap/src/com/foxdebug/iap/Iap.java index 4d1035238..469443986 100644 --- a/src/plugins/iap/src/com/foxdebug/iap/Iap.java +++ b/src/plugins/iap/src/com/foxdebug/iap/Iap.java @@ -3,22 +3,25 @@ import android.app.Activity; import android.content.Context; import android.util.Log; +import com.android.billingclient.api.AcknowledgePurchaseParams; +import com.android.billingclient.api.AcknowledgePurchaseResponseListener; import com.android.billingclient.api.BillingClient; import com.android.billingclient.api.BillingClient.BillingResponseCode; -import com.android.billingclient.api.BillingClient.SkuType; import com.android.billingclient.api.BillingClientStateListener; import com.android.billingclient.api.BillingFlowParams; import com.android.billingclient.api.BillingResult; import com.android.billingclient.api.ConsumeParams; import com.android.billingclient.api.ConsumeResponseListener; +import com.android.billingclient.api.PendingPurchasesParams; +import com.android.billingclient.api.ProductDetails; +import com.android.billingclient.api.ProductDetailsResponseListener; import com.android.billingclient.api.Purchase; -import com.android.billingclient.api.PurchaseHistoryRecord; -import com.android.billingclient.api.PurchaseHistoryResponseListener; import com.android.billingclient.api.PurchasesResponseListener; import com.android.billingclient.api.PurchasesUpdatedListener; -import com.android.billingclient.api.SkuDetails; -import com.android.billingclient.api.SkuDetailsParams; -import com.android.billingclient.api.SkuDetailsResponseListener; +import com.android.billingclient.api.QueryProductDetailsParams; +import com.android.billingclient.api.QueryProductDetailsResult; +import com.android.billingclient.api.QueryPurchasesParams; +import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -34,14 +37,14 @@ public class Iap extends CordovaPlugin { private BillingClient billingClient; - private Context context; - private Activity activity; + private WeakReference contextRef; + private WeakReference activityRef; private CallbackContext purchaseUpdated; public void initialize(CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); - context = cordova.getContext(); - activity = cordova.getActivity(); + contextRef = new WeakReference<>(cordova.getContext()); + activityRef = new WeakReference<>(cordova.getActivity()); billingClient = getBillingClient(); } @@ -50,8 +53,7 @@ public boolean execute( String action, JSONArray args, CallbackContext callbackContext - ) - throws JSONException { + ) throws JSONException { String arg1 = getString(args, 0); switch (action) { case "startConnection": @@ -60,6 +62,7 @@ public boolean execute( case "purchase": case "consume": case "getPurchases": + case "acknowledgePurchase": break; default: return false; @@ -89,6 +92,9 @@ public void run() { case "getPurchases": getPurchases(callbackContext); break; + case "acknowledgePurchase": + acknowledgePurchase(arg1, callbackContext); + break; } } } @@ -98,9 +104,10 @@ public void run() { } private BillingClient getBillingClient() { - return BillingClient - .newBuilder(this.context) - .enablePendingPurchases() + return BillingClient.newBuilder(this.contextRef.get()) + .enablePendingPurchases( + PendingPurchasesParams.newBuilder().enableOneTimeProducts().build() + ) .setListener( new PurchasesUpdatedListener() { public void onPurchasesUpdated( @@ -112,21 +119,7 @@ public void onPurchasesUpdated( if (responseCode == BillingResponseCode.OK) { JSONArray result = new JSONArray(); for (Purchase purchase : purchases) { - JSONObject item = new JSONObject(); - List skuList = purchase.getSkus(); - JSONArray skuArray = new JSONArray(); - for (String sku : skuList) { - skuArray.put(sku); - } - item.put("productIds", skuArray); - item.put("purchaseToken", purchase.getPurchaseToken()); - item.put("signature", purchase.getSignature()); - item.put("orderId", purchase.getOrderId()); - item.put("purchaseTime", purchase.getPurchaseTime()); - item.put("purchaseState", purchase.getPurchaseState()); - item.put("developerPayload", purchase.getDeveloperPayload()); - item.put("isAcknowledged", purchase.isAcknowledged()); - result.put(item); + result.put(purchaseToJson(purchase)); } sendPurchasePluginResult( new PluginResult(PluginResult.Status.OK, result) @@ -152,8 +145,7 @@ private void setPurchaseUpdatedListener(CallbackContext callbackContext) { } private void consume(String token, CallbackContext callbackContext) { - ConsumeParams consumeParams = ConsumeParams - .newBuilder() + ConsumeParams consumeParams = ConsumeParams.newBuilder() .setPurchaseToken(token) .build(); billingClient.consumeAsync( @@ -175,25 +167,29 @@ public void onConsumeResponse( } private void startConnection(CallbackContext callbackContext) { - if (billingClient == null) { - billingClient = getBillingClient(); - } - billingClient.startConnection( - new BillingClientStateListener() { - public void onBillingSetupFinished(BillingResult billingResult) { - int responseCode = billingResult.getResponseCode(); - if (responseCode == BillingResponseCode.OK) { - callbackContext.success(responseCode); - } else { - callbackContext.error(responseCode); + try { + if (billingClient == null) { + billingClient = getBillingClient(); + } + billingClient.startConnection( + new BillingClientStateListener() { + public void onBillingSetupFinished(BillingResult billingResult) { + int responseCode = billingResult.getResponseCode(); + if (responseCode == BillingResponseCode.OK) { + callbackContext.success(responseCode); + } else { + callbackContext.error(responseCode); + } } - } - public void onBillingServiceDisconnected() { - callbackContext.error("Billing service disconnected"); + public void onBillingServiceDisconnected() { + callbackContext.error("Billing service disconnected"); + } } - } - ); + ); + } catch (SecurityException e) { + callbackContext.error(e.getMessage()); + } } private void getProducts( @@ -205,37 +201,49 @@ private void getProducts( callbackContext.error("Billing client is not connected"); return; } - SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder(); - params.setSkusList(idList).setType(SkuType.INAPP); + List productList = new ArrayList<>(); + for (String productId : idList) { + productList.add( + QueryProductDetailsParams.Product.newBuilder() + .setProductId(productId) + .setProductType(BillingClient.ProductType.INAPP) + .build() + ); + } + QueryProductDetailsParams params = QueryProductDetailsParams.newBuilder() + .setProductList(productList) + .build(); - billingClient.querySkuDetailsAsync( - params.build(), - new SkuDetailsResponseListener() { - public void onSkuDetailsResponse( + billingClient.queryProductDetailsAsync( + params, + new ProductDetailsResponseListener() { + public void onProductDetailsResponse( BillingResult billingResult, - List skuDetailsList + QueryProductDetailsResult queryProductDetailsResult ) { try { int responseCode = billingResult.getResponseCode(); if (responseCode == BillingResponseCode.OK) { + List productDetailsList = queryProductDetailsResult.getProductDetailsList(); JSONArray products = new JSONArray(); - Log.d("IAP", "Got " + skuDetailsList.size() + " products"); - for (SkuDetails skuDetails : skuDetailsList) { + for (ProductDetails productDetails : productDetailsList) { JSONObject product = new JSONObject(); - product.put("json", skuDetails.getOriginalJson()); - product.put("productId", skuDetails.getSku()); - product.put("title", skuDetails.getTitle()); - product.put("description", skuDetails.getDescription()); - product.put("price", skuDetails.getPrice()); - product.put( - "priceAmountMicros", - skuDetails.getPriceAmountMicros() - ); - product.put( - "priceCurrencyCode", - skuDetails.getPriceCurrencyCode() - ); - product.put("type", skuDetails.getType()); + ProductDetails.OneTimePurchaseOfferDetails offerDetails = productDetails.getOneTimePurchaseOfferDetails(); + if (offerDetails != null) { + product.put("productId", productDetails.getProductId()); + product.put("title", productDetails.getTitle()); + product.put("description", productDetails.getDescription()); + product.put("price", offerDetails.getFormattedPrice()); + product.put( + "priceAmountMicros", + offerDetails.getPriceAmountMicros() + ); + product.put( + "priceCurrencyCode", + offerDetails.getPriceCurrencyCode() + ); + product.put("type", productDetails.getProductType()); + } products.put(product); } callbackContext.success(products); @@ -250,21 +258,64 @@ public void onSkuDetailsResponse( ); } - private void purchase(String json, CallbackContext callbackContext) { + private void purchase(String productIdOrJson, CallbackContext callbackContext) { try { - SkuDetails skuDetails = new SkuDetails(json); - BillingResult result = billingClient.launchBillingFlow( - activity, - BillingFlowParams.newBuilder().setSkuDetails(skuDetails).build() - ); - int responseCode = result.getResponseCode(); - if (responseCode == BillingResponseCode.OK) { - callbackContext.success(); - } else { - callbackContext.error(responseCode); + if (productIdOrJson == null || productIdOrJson.trim().isEmpty()) { + callbackContext.error("Product ID cannot be null or empty"); + return; } - } catch (JSONException e) { - callbackContext.error(e.getMessage()); + + final String productId = productIdOrJson; + + List productList = new ArrayList<>(); + productList.add( + QueryProductDetailsParams.Product.newBuilder() + .setProductId(productId) + .setProductType(BillingClient.ProductType.INAPP) + .build() + ); + QueryProductDetailsParams params = QueryProductDetailsParams.newBuilder() + .setProductList(productList) + .build(); + + billingClient.queryProductDetailsAsync( + params, + new ProductDetailsResponseListener() { + public void onProductDetailsResponse( + BillingResult billingResult, + QueryProductDetailsResult queryProductDetailsResult + ) { + if (billingResult.getResponseCode() == BillingResponseCode.OK) { + List productDetailsList = queryProductDetailsResult.getProductDetailsList(); + if (!productDetailsList.isEmpty()) { + ProductDetails productDetails = productDetailsList.get(0); + BillingResult result = billingClient.launchBillingFlow( + activityRef.get(), + BillingFlowParams.newBuilder().setProductDetailsParamsList( + Arrays.asList( + BillingFlowParams.ProductDetailsParams.newBuilder() + .setProductDetails(productDetails) + .build() + ) + ).build() + ); + int responseCode = result.getResponseCode(); + if (responseCode == BillingResponseCode.OK) { + callbackContext.success(); + } else { + callbackContext.error(responseCode); + } + } else { + callbackContext.error("No product details found for: " + productId); + } + } else { + callbackContext.error(billingResult.getResponseCode()); + } + } + } + ); + } catch (Exception e) { + callbackContext.error("Purchase error: " + e.getMessage()); } } @@ -275,34 +326,24 @@ private void getPurchases(CallbackContext callbackContext) { return; } - billingClient.queryPurchaseHistoryAsync( - SkuType.INAPP, - new PurchaseHistoryResponseListener() { - public void onPurchaseHistoryResponse( + QueryPurchasesParams params = QueryPurchasesParams.newBuilder() + .setProductType(BillingClient.ProductType.INAPP) + .build(); + billingClient.queryPurchasesAsync( + params, + new PurchasesResponseListener() { + public void onQueryPurchasesResponse( BillingResult billingResult, - List purchases + List purchasesList ) { try { int responseCode = billingResult.getResponseCode(); if (responseCode == BillingResponseCode.OK) { - JSONArray result = new JSONArray(); - for (PurchaseHistoryRecord purchase : purchases) { - JSONObject item = new JSONObject(); - List skuList = purchase.getSkus(); - JSONArray skuArray = new JSONArray(); - for (String sku : skuList) { - skuArray.put(sku); - } - item.put("productIds", skuArray); - item.put("purchaseToken", purchase.getPurchaseToken()); - item.put("purchaseTime", purchase.getPurchaseTime()); - item.put("signature", purchase.getSignature()); - item.put("developerPayload", purchase.getDeveloperPayload()); - item.put("quantity", purchase.getQuantity()); - item.put("json", purchase.getOriginalJson()); - result.put(item); + JSONArray purchases = new JSONArray(); + for (Purchase purchase : purchasesList) { + purchases.put(purchaseToJson(purchase)); } - callbackContext.success(result); + callbackContext.success(purchases); } else { callbackContext.error(responseCode); } @@ -314,6 +355,53 @@ public void onPurchaseHistoryResponse( ); } + private void acknowledgePurchase( + String purchaseToken, + CallbackContext callbackContext + ) { + if (billingClient == null) { + billingClient = getBillingClient(); + callbackContext.error("Billing client is not connected"); + return; + } + + AcknowledgePurchaseParams params = AcknowledgePurchaseParams.newBuilder() + .setPurchaseToken(purchaseToken) + .build(); + + billingClient.acknowledgePurchase( + params, + new AcknowledgePurchaseResponseListener() { + public void onAcknowledgePurchaseResponse(BillingResult billingResult) { + int responseCode = billingResult.getResponseCode(); + if (responseCode == BillingResponseCode.OK) { + callbackContext.success(); + } else { + callbackContext.error(responseCode); + } + } + } + ); + } + + private JSONObject purchaseToJson(Purchase purchase) throws JSONException { + JSONObject item = new JSONObject(); + List skuList = purchase.getSkus(); + JSONArray skuArray = new JSONArray(); + for (String sku : skuList) { + skuArray.put(sku); + } + item.put("productIds", skuArray); + item.put("orderId", purchase.getOrderId()); + item.put("signature", purchase.getSignature()); + item.put("purchaseTime", purchase.getPurchaseTime()); + item.put("purchaseToken", purchase.getPurchaseToken()); + item.put("purchaseState", purchase.getPurchaseState()); + item.put("isAcknowledged", purchase.isAcknowledged()); + item.put("developerPayload", purchase.getDeveloperPayload()); + return item; + } + private void sendPurchasePluginResult(PluginResult result) { if (purchaseUpdated != null) { result.setKeepCallback(true); @@ -329,22 +417,6 @@ private String getString(JSONArray args, int index) { } } - private int getInt(JSONArray args, int index) { - try { - return args.getInt(index); - } catch (JSONException e) { - return 0; - } - } - - private boolean getBoolean(JSONArray args, int index) { - try { - return args.getBoolean(index); - } catch (JSONException e) { - return false; - } - } - private List getStringList(JSONArray args, int index) { try { JSONArray array = args.getJSONArray(index); diff --git a/src/plugins/iap/www/plugin.js b/src/plugins/iap/www/plugin.js index 27bb3c9d8..a83ff9d97 100644 --- a/src/plugins/iap/www/plugin.js +++ b/src/plugins/iap/www/plugin.js @@ -8,8 +8,8 @@ module.exports = { startConnection: function (onSuccess, onFail) { cordova.exec(onSuccess, onFail, 'Iap', 'startConnection', []); }, - consume: function (productId, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Iap', 'consume', [productId]); + consume: function (purchaseToken, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Iap', 'consume', [purchaseToken]); }, purchase: function (productId, onSuccess, onFail) { cordova.exec(onSuccess, onFail, 'Iap', 'purchase', [productId]); @@ -17,6 +17,9 @@ module.exports = { getPurchases: function (onSuccess, onFail) { cordova.exec(onSuccess, onFail, 'Iap', 'getPurchases', []); }, + acknowledgePurchase: function (purchaseToken, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Iap', 'acknowledgePurchase', [purchaseToken]); + }, BILLING_UNAVAILABLE: 3, DEVELOPER_ERROR: 5, ERROR: 6, @@ -28,5 +31,8 @@ module.exports = { SERVICE_DISCONNECTED: -1, SERVICE_TIMEOUT: -3, SERVICE_TIMEOUT: 2, - USER_CANCELED: 1 + USER_CANCELED: 1, + PURCHASE_STATE_PURCHASED: 1, + PURCHASE_STATE_PENDING: 2, + PURCHASE_STATE_UNKNOWN: 0, }; \ No newline at end of file diff --git a/src/plugins/proot/libs/arm32/libproot-xed.so b/src/plugins/proot/libs/arm32/libproot-xed.so new file mode 100755 index 000000000..182e02d01 Binary files /dev/null and b/src/plugins/proot/libs/arm32/libproot-xed.so differ diff --git a/src/plugins/proot/libs/arm32/libproot.so b/src/plugins/proot/libs/arm32/libproot.so new file mode 100755 index 000000000..2357584b8 Binary files /dev/null and b/src/plugins/proot/libs/arm32/libproot.so differ diff --git a/src/plugins/proot/libs/arm32/libtalloc.so b/src/plugins/proot/libs/arm32/libtalloc.so new file mode 100755 index 000000000..2e1923474 Binary files /dev/null and b/src/plugins/proot/libs/arm32/libtalloc.so differ diff --git a/src/plugins/proot/libs/arm64/libproot-xed.so b/src/plugins/proot/libs/arm64/libproot-xed.so new file mode 100755 index 000000000..e9f9105a5 Binary files /dev/null and b/src/plugins/proot/libs/arm64/libproot-xed.so differ diff --git a/src/plugins/proot/libs/arm64/libproot.so b/src/plugins/proot/libs/arm64/libproot.so new file mode 100755 index 000000000..9a6719916 Binary files /dev/null and b/src/plugins/proot/libs/arm64/libproot.so differ diff --git a/src/plugins/proot/libs/arm64/libproot32.so b/src/plugins/proot/libs/arm64/libproot32.so new file mode 100755 index 000000000..e353a6c35 Binary files /dev/null and b/src/plugins/proot/libs/arm64/libproot32.so differ diff --git a/src/plugins/proot/libs/arm64/libtalloc.so b/src/plugins/proot/libs/arm64/libtalloc.so new file mode 100755 index 000000000..b058a5618 Binary files /dev/null and b/src/plugins/proot/libs/arm64/libtalloc.so differ diff --git a/src/plugins/proot/libs/x64/libproot-xed.so b/src/plugins/proot/libs/x64/libproot-xed.so new file mode 100755 index 000000000..807f1587d Binary files /dev/null and b/src/plugins/proot/libs/x64/libproot-xed.so differ diff --git a/src/plugins/proot/libs/x64/libproot.so b/src/plugins/proot/libs/x64/libproot.so new file mode 100755 index 000000000..f6364b46c Binary files /dev/null and b/src/plugins/proot/libs/x64/libproot.so differ diff --git a/src/plugins/proot/libs/x64/libproot32.so b/src/plugins/proot/libs/x64/libproot32.so new file mode 100755 index 000000000..7c5ffc519 Binary files /dev/null and b/src/plugins/proot/libs/x64/libproot32.so differ diff --git a/src/plugins/proot/libs/x64/libtalloc.so b/src/plugins/proot/libs/x64/libtalloc.so new file mode 100755 index 000000000..3e87f9aaf Binary files /dev/null and b/src/plugins/proot/libs/x64/libtalloc.so differ diff --git a/src/plugins/proot/package.json b/src/plugins/proot/package.json new file mode 100644 index 000000000..518c42865 --- /dev/null +++ b/src/plugins/proot/package.json @@ -0,0 +1,17 @@ +{ + "name": "com.foxdebug.acode.rk.exec.proot", + "version": "1.0.0", + "description": "Proot stuff", + "cordova": { + "id": "com.foxdebug.acode.rk.exec.proot", + "platforms": [ + "android" + ] + }, + "keywords": [ + "ecosystem:cordova", + "cordova-android" + ], + "author": "@RohitKushvaha01", + "license": "MIT" +} diff --git a/src/plugins/proot/plugin.xml b/src/plugins/proot/plugin.xml new file mode 100644 index 000000000..3eb98d623 --- /dev/null +++ b/src/plugins/proot/plugin.xml @@ -0,0 +1,29 @@ + + + Proot + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/plugins/sdcard/index.d.ts b/src/plugins/sdcard/index.d.ts new file mode 100644 index 000000000..41b4484fb --- /dev/null +++ b/src/plugins/sdcard/index.d.ts @@ -0,0 +1,260 @@ +interface Storage { + /** + * Name of the storage + */ + name: string; + /** + * UUID of the storage + */ + uuid: string; +} + +interface DirListItem { + name: string; + mime: string; + isDirectory: Boolean; + isFile: Boolean; + uri: string; +} + +interface Stats { + canRead: boolean; + canWrite: boolean; + exists: boolean; //indicates if file can be found on device storage + isDirectory: boolean; + isFile: boolean; + isVirtual: boolean; + lastModified: number; + length: number; + name: string; + type: string; + uri: string; +} + +interface DocumentFile { + canWrite: boolean; + filename: string; + length: number; + type: string; + uri: string; +} + +interface SDcard { + /** + * Copy file/directory to given destination + * @param src Source url + * @param dest Destination url + * @param onSuccess Callback function on success returns url of copied file/dir + * @param onFail Callback function on error returns error object + */ + copy( + src: string, + dest: string, + onSuccess: (url: string) => void, + onFail: (err: any) => void, + ): void; + /** + * Creates new directory at given source url. + * @param src Source url + * @param dirName New directory name + * @param onSuccess Callback function on success returns url of new directory + * @param onFail callback function on error returns error object + */ + createDir( + src: string, + dirName: string, + onSuccess: (url: string) => void, + onFail: (err: any) => void, + ): void; + /** + * Creates new file at given source url. + * @param src Source url + * @param fileName New file name + * @param onSuccess Callback function on success returns url of new directory + * @param onFail Callback function on error returns error object + */ + createFile( + src: string, + fileName: string, + onSuccess: (url: string) => void, + onFail: (err: any) => void, + ): void; + /** + * Deletes file/directory + * @param src Source url of file/directory + * @param onSuccess Callback function on success returns source url + * @param onFail Callback function on error returns error object + */ + delete( + src: string, + onSuccess: (url: string) => void, + onFail: (err: any) => void, + ): void; + /** + * Checks if given file/directory + * @param src File/Directory url + * @param onSuccess Callback function on success returns string "TRUE" or "FALSE" + * @param onFail Callback function on error returns error object + */ + exists( + src: string, + onSuccess: (exists: 'TRUE' | 'FALSE') => void, + onFail: (err: any) => void, + ): void; + /** + * Converts virtual URL to actual url + * @param src Virtual address returned by other methods + * @param onSuccess Callback function on success returns actual url + * @param onFail Callback function on error returns error object + */ + formatUri( + src: string, + onSuccess: (url: string) => void, + onFail: (err: any) => void, + ): void; + /** + * Gets actual url for relative path to src + * e.g. getPath(src, "../path/to/file.txt") => actual url + * @param src Directory url + * @param path Relative file/directory path + * @param onSuccess Callback function on success returns actual url + * @param onFail Callback function on error returns error object + */ + getPath( + src: string, + path: string, + onSuccess: (url: string) => void, + onFail: (err: any) => void, + ): void; + /** + * Requests user for storage permission + * @param uuid UUID returned from listStorages method + * @param onSuccess Callback function on success returns url for the storage root + * @param onFail Callback function on error returns error object + */ + getStorageAccessPermission( + uuid: string, + onSuccess: (url: string) => void, + onFail: (err: any) => void, + ): void; + /** + * Lists all the storages + * @param onSuccess Callback function on success returns list of storages + * @param onFail Callback function on error returns error object + */ + listStorages( + onSuccess: (storages: Array) => void, + onFail: (err: any) => void, + ): void; + /** + * Gets list of files/directory in the given directory + * @param src Directory url + * @param onSuccess Callback function on success returns list of files/directory + * @param onFail Callback function on error returns error object + */ + listDir( + src: string, + onSuccess: (list: Array) => void, + onFail: (err: any) => void, + ): void; + /** + * Move file/directory to given destination + * @param src Source url + * @param dest Destination url + * @param onSuccess Callback function on success returns url of moved file/dir + * @param onFail Callback function on error returns error object + */ + move( + src: string, + dest: string, + onSuccess: (url: string) => void, + onFail: (err: any) => void, + ): void; + /** + * Opens file provider to select file + * @param onSuccess Callback function on success returns url of selected file + * @param onFail Callback function on error returns error object + * @param mimeType MimeType of file to be selected + */ + openDocumentFile( + onSuccess: (url: DocumentFile) => void, + onFail: (err: any) => void, + mimeType: string, + ): void; + /** + * Opens gallery to select image + * @param onSuccess Callback function on success returns url of selected file + * @param onFail Callback function on error returns error object + * @param mimeType MimeType of file to be selected + */ + getImage( + onSuccess: (url: DocumentFile) => void, + onFail: (err: any) => void, + mimeType: string, + ): void; + /** + * Renames the given file/directory to given new name + * @param src Url of file/directory + * @param newname New name + * @param onSuccess Callback function on success returns url of renamed file + * @param onFail Callback function on error returns error object + */ + rename( + src: string, + newname: string, + onSuccess: (url: string) => void, + onFail: (err: any) => void, + ): void; + /** + * Writes new content to the given file. + * @param src file url + * @param content new file content + * @param onSuccess Callback function on success returns "OK" + * @param onFail Callback function on error returns error object + */ + write( + src: string, + content: string, + onSuccess: (res: 'OK') => void, + onFail: (err: any) => void, + ): void; + /** + * Writes new content to the given file. + * @param src file url + * @param content new file content + * @param isBinary is data binary + * @param onSuccess Callback function on success returns "OK" + * @param onFail Callback function on error returns error object + */ + write( + src: string, + content: string, + isBinary: Boolean, + onSuccess: (res: 'OK') => void, + onFail: (err: any) => void, + ): void; + /** + * Gets stats of given file + * @param src file/directory url + * @param onSuccess Callback function on success returns file/directory stats + * @param onFail Callback function on error returns error object + */ + stats( + src: string, + onSuccess: (stats: Stats) => void, + onFail: (err: any) => void, + ): void; + /** + * Listens for file changes + * @param src File url + * @param listener Callback function on file change returns file stats + */ + watchFile( + src: string, + listener: () => void, + ): { + unwatch: () => void; + }; +} + +declare var sdcard: SDcard; diff --git a/src/plugins/sdcard/package.json b/src/plugins/sdcard/package.json new file mode 100644 index 000000000..78ae844cc --- /dev/null +++ b/src/plugins/sdcard/package.json @@ -0,0 +1,21 @@ +{ + "author": "", + "bundleDependencies": false, + "deprecated": false, + "description": "Using this plugin, cordova apps can check for external storages and write/modify files.", + "keywords": [ + "cordova", + "plugin", + "sdcard", + "external storage", + "access external storage", + "android" + ], + "license": "ISC", + "main": "index.js", + "name": "cordova-plugin-sdcard", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "1.1.0" +} \ No newline at end of file diff --git a/plugins/cordova-plugin-sdcard/plugin.xml b/src/plugins/sdcard/plugin.xml similarity index 100% rename from plugins/cordova-plugin-sdcard/plugin.xml rename to src/plugins/sdcard/plugin.xml diff --git a/plugins/cordova-plugin-sdcard/readme.md b/src/plugins/sdcard/readme.md similarity index 100% rename from plugins/cordova-plugin-sdcard/readme.md rename to src/plugins/sdcard/readme.md diff --git a/src/plugins/sdcard/src/android/SDcard.java b/src/plugins/sdcard/src/android/SDcard.java new file mode 100644 index 000000000..19447a0b0 --- /dev/null +++ b/src/plugins/sdcard/src/android/SDcard.java @@ -0,0 +1,1056 @@ +package com.foxdebug.sdcard; + +import android.app.Activity; +import android.content.ContentResolver; +import android.content.Context; +import android.content.Intent; +import android.database.Cursor; +import android.net.Uri; +import android.os.Build; +import android.os.Environment; +import android.os.FileObserver; +import android.os.storage.StorageManager; +import android.os.storage.StorageVolume; +import android.provider.DocumentsContract; +import android.provider.DocumentsContract.Document; +import android.text.TextUtils; +import android.util.Base64; +import android.util.Log; +import androidx.documentfile.provider.DocumentFile; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.IOUtils; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.PluginResult; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +public class SDcard extends CordovaPlugin { + + private int mode; + private int SDK_INT = android.os.Build.VERSION.SDK_INT; + private int REQUEST_CODE; + private final int ACCESS_INTENT = 6000; + private final int DOCUMENT_TREE = 6001; + private final int OPEN_DOCUMENT = 6002; + private final int PICK_FROM_GALLERY = 6003; + private final String SEPARATOR = "::"; + private StorageManager storageManager; + private Context context; + private Activity activity; + private ContentResolver contentResolver; + private DocumentFile originalRootFile; + private CallbackContext activityResultCallback; + private HashMap fileObservers = new HashMap(); + + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + this.REQUEST_CODE = this.ACCESS_INTENT; + this.context = cordova.getContext(); + this.activity = cordova.getActivity(); + this.storageManager = (StorageManager) this.activity.getSystemService( + Context.STORAGE_SERVICE + ); + } + + public boolean execute( + String action, + JSONArray args, + CallbackContext callback + ) throws JSONException { + String arg1 = null, arg2 = null, arg3 = null, arg4 = null; + int argLen = args.length(); + + if (argLen > 0) arg1 = args.getString(0); + + if (argLen > 1) arg2 = args.getString(1); + + if (argLen > 2) arg3 = args.getString(2); + + switch (action) { + case "create directory": + createDir(arg1, arg2, callback); + break; + case "create file": + createFile(arg1, arg2, callback); + break; + case "open document file": + openDocumentFile(arg1, callback); + break; + case "get image": + getImage(arg1, callback); + break; + case "list volumes": + getStorageVolumes(callback); + break; + case "storage permission": + getStorageAccess(arg1, callback); + break; + case "read": + readFile(arg1, callback); + break; + case "write": + writeFile( + formatUri(arg1), + args.optString(1), + args.optBoolean(2), + callback + ); + break; + case "rename": + rename(arg1, arg2, callback); + break; + case "delete": + delete(formatUri(arg1), callback); + break; + case "copy": + copy(arg1, arg2, callback); + break; + case "move": + move(arg1, arg2, callback); + break; + case "get path": + getPath(formatUri(arg1), arg2, callback); + break; + case "exists": + exists(formatUri(arg1), callback); + break; + case "format uri": + callback.success(formatUri(arg1)); + break; + case "list directory": + if (arg1.contains(SEPARATOR)) { + String splittedStr[] = arg1.split(SEPARATOR, 2); + arg1 = splittedStr[0]; + arg2 = splittedStr[1]; + } + + listDir(arg1, arg2, callback); + + break; + case "stats": + getStats(arg1, callback); + break; + case "watch file": + watchFile(arg1, arg2, callback); + break; + case "unwatch file": + unwatchFile(arg1); + break; + default: + return false; + } + + return true; + } + + private String formatUri(String filename) { + if (filename.contains(SEPARATOR)) { + String splittedStr[] = filename.split(SEPARATOR, 2); + String rootUri = splittedStr[0]; + String docId = splittedStr[1]; + + Uri uri = getUri(rootUri, docId); + + return uri.toString(); + } else { + return filename; + } + } + + private void watchFile( + final String fileUri, + final String id, + final CallbackContext listener + ) { + activity.runOnUiThread( + new Runnable() { + @Override + public void run() { + MyFileObserver observer; + Uri uri = Uri.parse(fileUri); + File file = new File(uri.getPath()); + + if (!file.exists()) { + listener.error("File not found"); + return; + } + + if (SDK_INT >= 29) { + observer = new MyFileObserver(file, listener); + } else { + observer = new MyFileObserver(fileUri, listener); + } + + observer.startObserving(); + fileObservers.put(id, observer); + } + } + ); + } + + private void unwatchFile(String id) { + MyFileObserver observer = fileObservers.get(id); + if (observer == null) return; + observer.stopObserving(); + fileObservers.remove(id); + } + + public void openDocumentFile(String mimeType, CallbackContext callback) { + Intent intent = new Intent(); + if (mimeType == null) mimeType = "*/*"; + intent.setAction(Intent.ACTION_OPEN_DOCUMENT); + intent.addCategory(Intent.CATEGORY_OPENABLE); + intent.setType(mimeType); + activityResultCallback = callback; + cordova.startActivityForResult(this, intent, this.OPEN_DOCUMENT); + } + + public void getImage(String mimeType, CallbackContext callback) { + Intent intent = new Intent(Intent.ACTION_GET_CONTENT); + if (mimeType == null) mimeType = "image/*"; + + intent.setType(mimeType); + activityResultCallback = callback; + cordova.startActivityForResult(this, intent, this.PICK_FROM_GALLERY); + } + + public void getStorageVolumes(CallbackContext callback) { + try { + JSONArray result = new JSONArray(); + + if (SDK_INT >= 24) { + for (StorageVolume volume : this.storageManager.getStorageVolumes()) { + String name = volume.getDescription(this.context); + String uuid = volume.getUuid(); + JSONObject volumeData = new JSONObject(); + if (name != null && uuid != null) { + volumeData.put("uuid", uuid); + volumeData.put("name", name); + + if (SDK_INT >= 30) { + File file = volume.getDirectory(); + String path = file.getAbsolutePath(); + volumeData.put("path", path); + } + + result.put(volumeData); + } + } + } else { + File file = Environment.getExternalStorageDirectory(); + if ( + Environment.getExternalStorageState(file) == Environment.MEDIA_MOUNTED + ) { + String name = file.getName(); + String path = file.getPath(); + String absolutePath = file.getAbsolutePath(); + JSONObject volumeData = new JSONObject(); + volumeData.put("name", name); + volumeData.put("path", path); + volumeData.put("absolutePath", absolutePath); + result.put(volumeData); + } + } + + callback.success(result); + } catch (JSONException e) { + callback.error(e.toString()); + } + } + + public void getStorageAccess(String SDCardUUID, CallbackContext callback) { + Intent intent = null; + + if (SDK_INT >= 24) { + StorageVolume sdCard = null; + + for (StorageVolume volume : this.storageManager.getStorageVolumes()) { + String uuid = volume.getUuid(); + if (uuid != null && uuid.equals(SDCardUUID)) { + sdCard = volume; + } + } + + if (sdCard != null) { + if (SDK_INT < 29) { + intent = sdCard.createAccessIntent(null); + } else if (SDK_INT >= 29) { + intent = sdCard.createOpenDocumentTreeIntent(); + } + } + } + + if (intent == null) { + REQUEST_CODE = DOCUMENT_TREE; + intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE); + } + + activityResultCallback = callback; + cordova.startActivityForResult(this, intent, REQUEST_CODE); + } + + public void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + + if (activityResultCallback == null) { + Log.e("SDcard", "activityResultCallback is null"); + return; + } + + if (data == null) return; + + if (resultCode == Activity.RESULT_CANCELED) { + activityResultCallback.error("Operation cancelled"); + return; + } + + if (requestCode == PICK_FROM_GALLERY) { + if (resultCode == Activity.RESULT_OK) { + Uri uri = data.getData(); + if (uri == null) { + activityResultCallback.error("No file selected"); + } else { + try { + takePermission(uri); + activityResultCallback.success(uri.toString()); + } catch (Exception e) { + activityResultCallback.error( + "Error taking permission: " + e.getMessage() + ); + } + } + //activityResultCallback.success(uri.toString()); + } else { + activityResultCallback.error("Operation cancelled"); + } + return; + } + + if (requestCode == OPEN_DOCUMENT) { + if (resultCode == Activity.RESULT_OK) { + try { + Uri uri = data.getData(); + + if (uri == null) { + activityResultCallback.error("No file selected"); + return; + } + + takePermission(uri); + DocumentFile file = DocumentFile.fromSingleUri(context, uri); + JSONObject res = new JSONObject(); + + res.put("length", file.length()); + res.put("type", file.getType()); + res.put("filename", file.getName()); + res.put("canWrite", canWrite(file.getUri())); + res.put("uri", uri.toString()); + activityResultCallback.success(res); + } catch (JSONException e) { + activityResultCallback.error(e.toString()); + } + } + + return; + } + + if (requestCode == DOCUMENT_TREE || requestCode == ACCESS_INTENT) { + if ( + requestCode == ACCESS_INTENT && resultCode == Activity.RESULT_CANCELED + ) { + activityResultCallback.error("Canceled"); + return; + } + + try { + Uri uri = data.getData(); + if (uri == null) { + activityResultCallback.error("Empty uri"); + return; + } + + takePermission(uri); + DocumentFile file = DocumentFile.fromTreeUri(context, uri); + if (file != null && file.canWrite()) { + activityResultCallback.success(uri.toString()); + } else { + activityResultCallback.error( + "No write permission: " + uri.toString() + ); + } + } catch (Exception error) { + activityResultCallback.error(error.toString()); + } + + return; + } + } + + private void readFile(String filename, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + Uri uri = Uri.parse(filename); + InputStream is = context + .getContentResolver() + .openInputStream(uri); + + if (is == null) { + callback.error("File not found"); + return; + } + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + final int bufferSize = 1024; + byte[] buffer = new byte[bufferSize]; + int bytesRead = 0; + while ((bytesRead = is.read(buffer, 0, bufferSize)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + is.close(); + callback.success(outputStream.toByteArray()); + } catch (Exception e) { + callback.error(e.toString()); + } + } + } + ); + } + + private void writeFile( + final String filename, + final String content, + final Boolean isArrayBuffer, + final CallbackContext callback + ) { + final Context context = this.context; + + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + DocumentFile file = getFile(filename); + if (file == null) { + callback.error("File not found."); + return; + } + if (canWrite(file.getUri())) { + OutputStream op = context + .getContentResolver() + .openOutputStream(file.getUri(), "rwt"); + + PrintWriter pw = new PrintWriter(op, true); + + if (isArrayBuffer) { + byte[] bytes = Base64.decode(content, Base64.DEFAULT); + // write bytes to file + op.write(bytes); + } else { + pw.print(content); + } + + pw.flush(); + pw.close(); + op.close(); + callback.success("OK"); + } else { + callback.error("No write permission"); + } + } catch (Exception e) { + callback.error(e.toString()); + } + } + } + ); + } + + private void createDir(String parent, String name, CallbackContext callback) { + create(parent, name, Document.MIME_TYPE_DIR, callback); + } + + private void createFile( + String parent, + String name, + CallbackContext callback + ) { + String mimeType = URLConnection.guessContentTypeFromName(name); + String ext = FilenameUtils.getExtension(name); + + if (mimeType == null && ext != null) mimeType = "text/" + ext; + else mimeType = "text/plain"; + + create(parent, name, mimeType, callback); + } + + private void create( + String parent, + String name, + String mimeType, + CallbackContext callback + ) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String srcUri = null, docId = null; + Uri parentUri = null; + + if (parent.contains(SEPARATOR)) { + String splittedStr[] = parent.split(SEPARATOR, 2); + srcUri = splittedStr[0]; + docId = splittedStr[1]; + parentUri = getUri(srcUri, docId); + } else { + srcUri = parent; + parentUri = Uri.parse(srcUri); + docId = DocumentsContract.getTreeDocumentId(parentUri); + parentUri = DocumentsContract.buildDocumentUriUsingTree( + parentUri, + docId + ); + } + + ContentResolver contentResolver = context.getContentResolver(); + Uri newDocumentUri = DocumentsContract.createDocument( + contentResolver, + parentUri, + mimeType, + name + ); + DocumentFile file = DocumentFile.fromTreeUri( + context, + newDocumentUri + ); + Log.i("SDcard", "Uri: " + newDocumentUri.toString()); + if (!name.equals(file.getName()) && file.renameTo(name)) { + newDocumentUri = file.getUri(); + } + + docId = DocumentsContract.getDocumentId(newDocumentUri); + if (newDocumentUri != null) { + callback.success(srcUri + SEPARATOR + docId); + } else { + callback.error("Unable to create " + parent); + } + } catch (Exception e) { + Log.e("CREATE_FILE", "Unable to create file", e); + callback.error(e.toString()); + } + } + } + ); + } + + private void rename( + String filename, + String newFile, + CallbackContext callback + ) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + String srcUri = null, docId = null; + Uri fileUri = null; + if (filename.contains(SEPARATOR)) { + String splittedStr[] = filename.split(SEPARATOR, 2); + srcUri = splittedStr[0]; + docId = splittedStr[1]; + fileUri = getUri(srcUri, docId); + } else { + srcUri = filename; + fileUri = Uri.parse(filename); + } + + try { + DocumentFile file = DocumentFile.fromTreeUri(context, fileUri); + // If only case change, OS adds '()' as suffix, to avoid that we need to rename to a temporary name first + if (newFile.equalsIgnoreCase(file.getName())) { + file.renameTo(newFile + "_temp"); + } + + if (file.renameTo(newFile)) { + String name = file.getName(); + docId = DocumentsContract.getDocumentId(file.getUri()); + callback.success(srcUri + SEPARATOR + docId); + return; + } + + callback.error("Unable to rename: " + filename); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + private void delete(String filename, CallbackContext callback) { + final ContentResolver contentResolver = context.getContentResolver(); + + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + Uri fileUri = Uri.parse(filename); + + try { + boolean fileDeleted = DocumentsContract.deleteDocument( + contentResolver, + fileUri + ); + + if (fileDeleted) { + callback.success(filename); + } else { + callback.error("Unable to delete file " + filename); + } + } catch (FileNotFoundException e) { + callback.error(e.toString()); + } + } + } + ); + } + + private void move(String src, String dest, final CallbackContext callback) { + final ContentResolver contentResolver = this.context.getContentResolver(); + final String splittedStr[] = src.split(SEPARATOR, 2); + final String rootUri = splittedStr[0]; + final String srcId = splittedStr[1]; + final String destId = dest.split(SEPARATOR, 2)[1]; + + cordova + .getThreadPool() + .execute( + new Runnable() { + @Override + public void run() { + try { + Uri newUri = copy(rootUri, srcId, destId); + if (newUri == null) callback.error("Unable to copy " + src); + else { + DocumentsContract.deleteDocument( + contentResolver, + getUri(rootUri, srcId) + ); + callback.success( + rootUri + SEPARATOR + DocumentsContract.getDocumentId(newUri) + ); + } + } catch (Exception e) { + callback.error(e.toString()); + } + } + } + ); + } + + private void copy(String src, String dest, final CallbackContext callback) { + final String splittedStr[] = src.split(SEPARATOR, 2); + final String srcUri = splittedStr[0]; + final String srcId = splittedStr[1]; + final String destId = dest.split(SEPARATOR, 2)[1]; + + cordova + .getThreadPool() + .execute( + new Runnable() { + @Override + public void run() { + try { + Uri newUri = copy(srcUri, srcId, destId); + if (newUri == null) { + callback.error("Unable to copy " + src); + } else { + callback.success( + srcUri + SEPARATOR + DocumentsContract.getDocumentId(newUri) + ); + } + } catch (Exception e) { + callback.error(e.toString()); + } + } + } + ); + } + + private Uri copy(String root, String srcId, String destId) + throws IOException, FileNotFoundException { + Uri srcUri = getUri(root, srcId); + Uri destUri = getUri(root, destId); + DocumentFile src = getFile(srcUri); + DocumentFile dest = getFile(destUri); + ContentResolver contentResolver = context.getContentResolver(); + + if (src.isFile()) { + Uri newUri = copyFile(src, dest); + if (newUri == null) return null; + else return newUri; + } else { + destUri = DocumentsContract.createDocument( + contentResolver, + destUri, + Document.MIME_TYPE_DIR, + src.getName() + ); + destId = DocumentsContract.getDocumentId(destUri); + + Uri childrenUri = DocumentsContract.buildChildDocumentsUriUsingTree( + Uri.parse(root), + srcId + ); + Cursor c = contentResolver.query( + childrenUri, + new String[] { Document.COLUMN_DOCUMENT_ID }, + null, + null, + null + ); + if (c != null) { + while (c.moveToNext()) { + String docId = c.getString(0); + copy(root, docId, destId); + } + c.close(); + return destUri; + } else { + DocumentsContract.deleteDocument(contentResolver, destUri); + return null; + } + } + } + + private Uri copyFile(DocumentFile src, DocumentFile dest) + throws IOException, FileNotFoundException { + ContentResolver contentResolver = this.context.getContentResolver(); + + Uri newFileUri = DocumentsContract.createDocument( + contentResolver, + dest.getUri(), + src.getType(), + src.getName() + ); + DocumentFile newFile = getFile(newFileUri); + InputStream is = contentResolver.openInputStream(src.getUri()); + OutputStream os = contentResolver.openOutputStream(newFile.getUri(), "rwt"); + + if (is == null || os == null) { + DocumentsContract.deleteDocument(contentResolver, newFileUri); + return null; + } + + IOUtils.copy(is, os); + + is.close(); + os.close(); + + if (src.length() == newFile.length()) return newFile.getUri(); + else { + DocumentsContract.deleteDocument(contentResolver, newFileUri); + return null; + } + } + + private void listDir(String src, String parentId, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + Uri srcUri = Uri.parse(src); + ContentResolver contentResolver = context.getContentResolver(); + String parentDocId = parentId; + + if (parentDocId == null) { + parentDocId = DocumentsContract.getTreeDocumentId(srcUri); + } + + Uri childrenUri = DocumentsContract.buildChildDocumentsUriUsingTree( + srcUri, + parentDocId + ); + + JSONArray result = new JSONArray(); + Cursor cursor = null; + + try { + cursor = contentResolver.query( + childrenUri, + new String[] { + Document.COLUMN_DOCUMENT_ID, + Document.COLUMN_DISPLAY_NAME, + Document.COLUMN_MIME_TYPE, + }, + null, + null, + null + ); + } catch ( + NullPointerException + | SecurityException + | IllegalArgumentException + | Error e + ) { + Log.d("sdCard", "lsDir: " + src); + Log.e("sdCard", "lsDir", e); + callback.error("Cannot read directory."); + return; + } + + if (cursor == null) { + callback.error("Cannot read directory."); + return; + } + + try { + while (cursor.moveToNext()) { + JSONObject fileData = new JSONObject(); + String docId = cursor.getString(0); + String name = cursor.getString(1); + String mime = cursor.getString(2); + boolean isDirectory = isDirectory(mime); + + fileData.put("name", name); + fileData.put("mime", mime); + fileData.put("isDirectory", isDirectory); + fileData.put("isFile", !isDirectory); + fileData.put("uri", src + SEPARATOR + docId); // TODO: Deprecate in future + fileData.put("url", src + SEPARATOR + docId); + result.put(fileData); + } + + callback.success(result); + } catch (JSONException e) { + callback.error(e.toString()); + } finally { + if (cursor != null) { + try { + cursor.close(); + } catch (RuntimeException re) { + throw re; + } catch (Exception ignore) { + // ignore exception + } + } + } + } + } + ); + } + + private boolean isDirectory(String mimeType) { + return DocumentsContract.Document.MIME_TYPE_DIR.equals(mimeType); + } + + private void getStats(String filename, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + String fileUri = formatUri(filename); + + try { + DocumentFile file = getFile(fileUri); + + JSONObject result = new JSONObject(); + result.put("exists", file.exists()); + result.put("canRead", file.canRead()); + result.put("canWrite", canWrite(file.getUri())); + result.put("name", file.getName()); + result.put("length", file.length()); + result.put("type", file.getType()); + result.put("isFile", file.isFile()); + result.put("isDirectory", file.isDirectory()); + result.put("isVirtual", file.isVirtual()); + result.put("lastModified", file.lastModified()); + result.put("url", file.getUri().toString()); + + callback.success(result); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + } + ); + } + + private Uri getUri(String src, String docId) { + Uri srcUri = Uri.parse(src); + String srcId = DocumentsContract.getTreeDocumentId(srcUri); + srcUri = DocumentsContract.buildDocumentUriUsingTree(srcUri, srcId); + return DocumentsContract.buildDocumentUriUsingTree(srcUri, docId); + } + + private void exists(String path, CallbackContext callback) { + DocumentFile file = DocumentFile.fromSingleUri(context, Uri.parse(path)); + + if (file == null) { + callback.error("Unable to get file"); + } else { + if (file.exists()) { + callback.success("TRUE"); + } else { + callback.success("FALSE"); + } + } + } + + private void error(String err, CallbackContext callback) { + callback.error("ERROR: " + err); + } + + private void getPath(String uriString, String src, CallbackContext callback) { + try { + DocumentFile file = geRelativeDocumentFile(uriString, src); + + if (file == null) { + callback.error("Unable to get file"); + } else { + Uri uri = file.getUri(); + String path = uri.getPath(); + + if (path != null) { + callback.success(uri.toString()); + } else { + callback.error("Unable to get path"); + } + } + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + + private DocumentFile geRelativeDocumentFile(String uri, String filename) { + List paths = new ArrayList(); + DocumentFile file = null; + + file = DocumentFile.fromTreeUri(context, Uri.parse(uri)); + if (!canWrite(file.getUri())) { + throw new RuntimeException("Cannot write file"); + } + + paths.addAll(Arrays.asList(filename.split("/"))); + + while (paths.size() > 0) { + String path = paths.remove(0); + filename = TextUtils.join("/", paths); + + if (!path.equals("")) { + file = file.findFile(path); + + if (file == null) return null; + } + } + + return file; + } + + private DocumentFile getFile(Uri uri) { + return getFile(uri.toString()); + } + + private DocumentFile getFile(String filePath) { + Uri fileUri = Uri.parse(filePath); + DocumentFile documentFile = null; + + if (filePath.matches("file:///(.*)")) { + File file = new File(fileUri.getPath()); + documentFile = DocumentFile.fromFile(file); + } else { + documentFile = DocumentFile.fromSingleUri(context, fileUri); + } + + return documentFile; + } + + private void takePermission(Uri uri) { + contentResolver = context.getContentResolver(); + contentResolver.takePersistableUriPermission( + uri, + Intent.FLAG_GRANT_WRITE_URI_PERMISSION | + Intent.FLAG_GRANT_READ_URI_PERMISSION + ); + } + + public boolean canWrite(Uri uri) { + boolean canWrite = false; + try { + // if the file is not writable this throws a SecurityException + OutputStream os = context + .getContentResolver() + .openOutputStream(uri, "wa"); + + if (os == null) return false; + + os.close(); // we don't actually want to write anything, so we close immediately + canWrite = true; + } catch ( + SecurityException | IllegalArgumentException | IOException ignored + ) { + // if we don't have write-permission or the file doesn't exist, canWrite can stay on false + } + return canWrite; + } +} + +class MyFileObserver extends FileObserver { + + private CallbackContext listener; + private static final int mask = + (FileObserver.DELETE_SELF | FileObserver.MODIFY | FileObserver.MOVE_SELF); + + public MyFileObserver(String path, CallbackContext listener) { + super(path, mask); + this.listener = listener; + Log.d("MyFileObserver", "MyFileObserver: " + path); + } + + public MyFileObserver(File file, CallbackContext listener) { + super(file, mask); + this.listener = listener; + Log.d("MyFileObserver", "MyFileObserver: " + file.getAbsolutePath()); + } + + @Override + public void onEvent(int event, String path) { + Log.d("MyFileObserver", "onEvent: " + event); + PluginResult result = new PluginResult(PluginResult.Status.OK); + result.setKeepCallback(true); + listener.sendPluginResult(result); + } + + public void startObserving() { + startWatching(); + } + + public void stopObserving() { + stopWatching(); + } +} diff --git a/src/plugins/sdcard/www/plugin.js b/src/plugins/sdcard/www/plugin.js new file mode 100644 index 000000000..ed6761e71 --- /dev/null +++ b/src/plugins/sdcard/www/plugin.js @@ -0,0 +1,66 @@ +module.exports = { + copy: function (srcPathname, destPathname, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'copy', [srcPathname, destPathname]); + }, + createDir: function (pathname, dir, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'create directory', [pathname, dir]); + }, + createFile: function (pathname, file, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'create file', [pathname, file]); + }, + delete: function (pathname, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'delete', [pathname]); + }, + exists: function (pathName, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'exists', [pathName]); + }, + formatUri: function (pathName, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'format uri', [pathName]); + }, + getPath: function (uri, filename, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'get path', [uri, filename]); + }, + getStorageAccessPermission: function (uuid, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'storage permission', [uuid]); + }, + listStorages: function (onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'list volumes', []); + }, + listDir: function (src, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'list directory', [src]); + }, + move: function (srcPathname, destPathname, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'move', [srcPathname, destPathname]); + }, + openDocumentFile: function (onSuccess, onFail, mimeType) { + cordova.exec(onSuccess, onFail, 'SDcard', 'open document file', mimeType ? [mimeType] : []); + }, + getImage: function (onSuccess, onFail, mimeType) { + cordova.exec(onSuccess, onFail, 'SDcard', 'get image', mimeType ? [mimeType] : []); + }, + rename: function (pathname, newFilename, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'rename', [pathname, newFilename]); + }, + read: function (filename, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'read', [filename]); + }, + write: function (filename, content, onSuccess, onFail) { + var _isBuffer = content instanceof ArrayBuffer; + cordova.exec(onSuccess, onFail, 'SDcard', 'write', [filename, content, _isBuffer]); + }, + stats: function (filename, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'stats', [filename]); + }, + watchFile: function (filename, listener, onFail) { + var id = parseInt(Date.now() + Math.random() * 1000000) + ''; + cordova.exec(listener, onFail, 'SDcard', 'watch file', [filename, id]); + return { + unwatch: function () { + cordova.exec(null, null, 'SDcard', 'unwatch file', [id]); + } + }; + }, + listEncodings: function (onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'SDcard', 'list encodings', []); + } +}; \ No newline at end of file diff --git a/src/plugins/server/index.d.ts b/src/plugins/server/index.d.ts new file mode 100644 index 000000000..28b8834d7 --- /dev/null +++ b/src/plugins/server/index.d.ts @@ -0,0 +1,7 @@ +interface Server{ + stop(onSuccess: () => void, onError: (error: any) => void): void; + send(id: string, data: any, onSuccess: () => void, onError: (error: any) => void): void; + port: number; +} + +declare var CreateServer: (port: number, onSuccess: (msg: any) => void, onError: (err: any) => void) => Server; \ No newline at end of file diff --git a/src/plugins/server/package.json b/src/plugins/server/package.json new file mode 100644 index 000000000..0932bef87 --- /dev/null +++ b/src/plugins/server/package.json @@ -0,0 +1,6 @@ +{ + "name": "cordova-plugin-server", + "version": "1.0.0", + "main": "index.js", + "license": "MIT" +} \ No newline at end of file diff --git a/src/plugins/server/plugin.xml b/src/plugins/server/plugin.xml new file mode 100644 index 000000000..574909cc8 --- /dev/null +++ b/src/plugins/server/plugin.xml @@ -0,0 +1,26 @@ + + + + + + + Webserver for Cordova Apps + HTTP server, webserver + + + + + + + + + + + + + + + + + diff --git a/src/plugins/server/src/android/com/foxdebug/server/NanoHTTPDWebserver.java b/src/plugins/server/src/android/com/foxdebug/server/NanoHTTPDWebserver.java new file mode 100644 index 000000000..05887c4a6 --- /dev/null +++ b/src/plugins/server/src/android/com/foxdebug/server/NanoHTTPDWebserver.java @@ -0,0 +1,344 @@ +package com.foxdebug.server; + +import android.content.ContentResolver; +import android.content.Context; +import android.net.Uri; +import android.util.Log; +import androidx.documentfile.provider.DocumentFile; +import fi.iki.elonen.NanoHTTPD; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Method; +import java.net.URLConnection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.UUID; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.PluginResult; +import org.json.JSONException; +import org.json.JSONObject; + +public class NanoHTTPDWebserver extends NanoHTTPD { + + public HashMap responses; + public CallbackContext onRequestCallbackContext; + Context context; + + public NanoHTTPDWebserver(int port, Context context) { + super(port); + this.context = context; + this.responses = new HashMap(); + } + + private String getBodyText(IHTTPSession session) { + Map files = new HashMap(); + Method method = session.getMethod(); + if (Method.PUT.equals(method) || Method.POST.equals(method)) { + try { + session.parseBody(files); + } catch (IOException ioe) { + return "{}"; + } catch (ResponseException re) { + return "{}"; + } + } + // get the POST body + return files.get("postData"); + } + + /** + * Create a request object + *

    + * [ "requestId": requestUUID, " body": request.jsonObject ?? "", " headers": + * request.headers, " method": request.method, " path": request.url.path, " + * query": request.url.query ?? "" ] + * + * @param session + * @return + */ + private JSONObject createJSONRequest(String requestId, IHTTPSession session) + throws JSONException { + JSONObject jsonRequest = new JSONObject(); + jsonRequest.put("requestId", requestId); + jsonRequest.put("body", this.getBodyText(session)); + jsonRequest.put("headers", session.getHeaders()); + jsonRequest.put("method", session.getMethod()); + jsonRequest.put("path", session.getUri()); + jsonRequest.put("query", session.getQueryParameterString()); + return jsonRequest; + } + + private String getContentType(JSONObject responseObject) + throws JSONException { + if ( + responseObject.has("headers") && + responseObject.getJSONObject("headers").has("Content-Type") + ) { + return responseObject.getJSONObject("headers").getString("Content-Type"); + } else { + return "text/plain"; + } + } + + private Response newFixedFileResponse(DocumentFile file, String mime) + throws FileNotFoundException, IOException { + Response res; + res = + newFixedLengthResponse( + Response.Status.OK, + mime, + getInputStream(file), + (int) file.length() + ); + res.addHeader("Accept-Ranges", "bytes"); + return res; + } + + Response serveFile( + Map header, + DocumentFile file, + String mime + ) { + Response res; + try { + // Calculate etag + long fileLen = file.length(); + String path = file.getUri().toString(); + String etag = Integer.toHexString( + (path + file.lastModified() + "" + fileLen).hashCode() + ); + + // Support (simple) skipping: + long startFrom = 0; + long endAt = -1; + String range = header.get("range"); + if (range != null) { + if (range.startsWith("bytes=")) { + range = range.substring("bytes=".length()); + int minus = range.indexOf('-'); + try { + if (minus > 0) { + startFrom = Long.parseLong(range.substring(0, minus)); + endAt = Long.parseLong(range.substring(minus + 1)); + } + } catch (NumberFormatException ignored) {} + } + } + + // get if-range header. If present, it must match etag or else we + // should ignore the range request + String ifRange = header.get("if-range"); + boolean headerIfRangeMissingOrMatching = + (ifRange == null || etag.equals(ifRange)); + + String ifNoneMatch = header.get("if-none-match"); + boolean headerIfNoneMatchPresentAndMatching = + ifNoneMatch != null && + ("*".equals(ifNoneMatch) || ifNoneMatch.equals(etag)); + + if ( + headerIfRangeMissingOrMatching && + range != null && + startFrom >= 0 && + startFrom < fileLen + ) { + // range request that matches current etag + // and the startFrom of the range is satisfiable + if (headerIfNoneMatchPresentAndMatching) { + // range request that matches current etag + // and the startFrom of the range is satisfiable + // would return range from file + // respond with not-modified + res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, ""); + res.addHeader("ETag", etag); + } else { + if (endAt < 0) { + endAt = fileLen - 1; + } + long newLen = endAt - startFrom + 1; + if (newLen < 0) { + newLen = 0; + } + + InputStream is = getInputStream(file); + is.skip(startFrom); + + res = + newFixedLengthResponse( + Response.Status.PARTIAL_CONTENT, + mime, + is, + newLen + ); + res.addHeader("Accept-Ranges", "bytes"); + res.addHeader("Content-Length", "" + newLen); + + String contentRange = + "bytes " + startFrom + "-" + endAt + "/" + fileLen; + res.addHeader("Content-Range", contentRange); + res.addHeader("ETag", etag); + } + } else { + if ( + headerIfRangeMissingOrMatching && + range != null && + startFrom >= fileLen + ) { + // return the size of the file + // 4xx responses are not trumped by if-none-match + res = + newFixedLengthResponse( + Response.Status.RANGE_NOT_SATISFIABLE, + NanoHTTPD.MIME_PLAINTEXT, + "" + ); + res.addHeader("Content-Range", "bytes */" + fileLen); + res.addHeader("ETag", etag); + } else if (range == null && headerIfNoneMatchPresentAndMatching) { + // full-file-fetch request + // would return entire file + // respond with not-modified + res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, ""); + res.addHeader("ETag", etag); + } else if ( + !headerIfRangeMissingOrMatching && headerIfNoneMatchPresentAndMatching + ) { + // range request that doesn't match current etag + // would return entire (different) file + // respond with not-modified + + res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, ""); + res.addHeader("ETag", etag); + } else { + // supply the file + res = newFixedFileResponse(file, mime); + res.addHeader("Content-Length", "" + fileLen); + res.addHeader("ETag", etag); + } + } + } catch (Exception e) { + Log.d("ServeFileError", e.getMessage()); + String type = e.getClass().getName(); + if (type.equals("FileNotFoundException")) res = + newFixedLengthResponse( + Response.Status.NOT_FOUND, + NanoHTTPD.MIME_PLAINTEXT, + e.getMessage() + ); else res = + newFixedLengthResponse( + Response.Status.FORBIDDEN, + NanoHTTPD.MIME_PLAINTEXT, + e.getMessage() + ); + } + + return res; + } + + @Override + public Response serve(IHTTPSession session) { + String requestUUID = UUID.randomUUID().toString(); + + PluginResult pluginResult = null; + try { + pluginResult = + new PluginResult( + PluginResult.Status.OK, + this.createJSONRequest(requestUUID, session) + ); + } catch (JSONException e) { + e.printStackTrace(); + } + pluginResult.setKeepCallback(true); + this.onRequestCallbackContext.sendPluginResult(pluginResult); + + while (!this.responses.containsKey(requestUUID)) { + try { + Thread.sleep(1); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + JSONObject responseObject = (JSONObject) this.responses.get(requestUUID); + Response response = null; + + if (responseObject.has("path")) { + try { + String path = responseObject.getString("path"); + DocumentFile file = getFile(path); + String mimeType = URLConnection.guessContentTypeFromName(path); + Response res = serveFile(session.getHeaders(), file, mimeType); + JSONObject headers = getJSONObject(responseObject, "headers"); + // JSONObject headers = responseObject.getJSONObject("headers"); + if (headers != null) { + Iterator keys = headers.keys(); + while (keys.hasNext()) { + String key = (String) keys.next(); + res.addHeader( + key, + responseObject.getJSONObject("headers").getString(key) + ); + } + } + return res; + } catch (JSONException e) { + e.printStackTrace(); + } + return response; + } else { + try { + response = + newFixedLengthResponse( + Response.Status.lookup(responseObject.getInt("status")), + getContentType(responseObject), + responseObject.getString("body") + ); + + Iterator keys = responseObject.getJSONObject("headers").keys(); + while (keys.hasNext()) { + String key = (String) keys.next(); + response.addHeader( + key, + responseObject.getJSONObject("headers").getString(key) + ); + } + } catch (JSONException e) { + e.printStackTrace(); + } + return response; + } + } + + private DocumentFile getFile(String filePath) { + Uri fileUri = Uri.parse(filePath); + DocumentFile documentFile = null; + if (filePath.matches("file:///(.*)")) { + File file = new File(fileUri.getPath()); + documentFile = DocumentFile.fromFile(file); + } else { + documentFile = + DocumentFile.fromSingleUri(this.context, Uri.parse(filePath)); + } + + return documentFile; + } + + private InputStream getInputStream(DocumentFile file) + throws FileNotFoundException, IOException { + Uri uri = file.getUri(); + ContentResolver contentResolver = context.getContentResolver(); + return contentResolver.openInputStream(uri); + } + + private JSONObject getJSONObject(JSONObject ob, String key) { + JSONObject jsonObject = null; + try { + jsonObject = ob.getJSONObject(key); + } catch (JSONException e) {} + return jsonObject; + } +} diff --git a/src/plugins/server/src/android/com/foxdebug/server/Server.java b/src/plugins/server/src/android/com/foxdebug/server/Server.java new file mode 100644 index 000000000..fac18e6ea --- /dev/null +++ b/src/plugins/server/src/android/com/foxdebug/server/Server.java @@ -0,0 +1,134 @@ +package com.foxdebug.server; + +import java.io.IOException; +import java.util.HashMap; +import org.apache.cordova.*; +import org.json.JSONArray; +import org.json.JSONException; + +public class Server extends CordovaPlugin { + + public HashMap servers; + + @Override + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + servers = new HashMap(); + } + + @Override + public boolean execute( + String action, + JSONArray args, + CallbackContext callbackContext + ) + throws JSONException { + if ("start".equals(action)) { + try { + this.start(args, callbackContext); + } catch (IOException e) { + e.printStackTrace(); + } + return true; + } + if ("setOnRequestHandler".equals(action)) { + this.setOnRequestHandler(args, callbackContext); + return true; + } + if ("stop".equals(action)) { + this.stop(args, callbackContext); + return true; + } + if ("send".equals(action)) { + this.send(args, callbackContext); + return true; + } + return false; // Returning false results in a "MethodNotFound" error. + } + + /** + * Starts the server + * + * @param args + * @param callbackContext + */ + private void start(JSONArray args, CallbackContext callbackContext) + throws JSONException, IOException { + Integer port = 8080; + + if (args.length() == 1) { + port = args.getInt(0); + } + + NanoHTTPDWebserver server = servers.get(port); + if (server != null) { + callbackContext.success("Server started on port " + port); + return; + } + + try { + server = new NanoHTTPDWebserver(port, cordova.getContext()); + server.start(); + servers.put(port, server); + callbackContext.success("Server started on port " + port); + } catch (Exception e) { + callbackContext.sendPluginResult( + new PluginResult(PluginResult.Status.ERROR, e.getMessage()) + ); + } + } + + private void setOnRequestHandler( + JSONArray args, + CallbackContext callbackContext + ) + throws JSONException { + Integer port = args.getInt(0); + NanoHTTPDWebserver server = servers.get(port); + if (server == null) { + callbackContext.error("Server not started on port " + port); + return; + } + server.onRequestCallbackContext = callbackContext; + } + + /** + * Stops the server + * + * @param args + * @param callbackContext + */ + private void stop(JSONArray args, CallbackContext callbackContext) + throws JSONException { + Integer port = args.getInt(0); + NanoHTTPDWebserver server = servers.get(port); + if (server == null) { + callbackContext.error("Server not started on port " + port); + return; + } + server.stop(); + servers.remove(port); + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK)); + } + + /** + * Will be called if the js context sends an response to the webserver + * + * @param args {UUID: {...}} + * @param callbackContext + * @throws JSONException + */ + private void send(JSONArray args, CallbackContext callbackContext) + throws JSONException { + Integer port = args.getInt(0); + NanoHTTPDWebserver server = this.servers.get(port); + if (server == null) { + callbackContext.sendPluginResult( + new PluginResult(PluginResult.Status.ERROR, "Server not running") + ); + return; + } + server.responses.put(args.getString(1), args.get(2)); + callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK)); + } +} diff --git a/src/plugins/server/www/server.js b/src/plugins/server/www/server.js new file mode 100644 index 000000000..c297d4e99 --- /dev/null +++ b/src/plugins/server/www/server.js @@ -0,0 +1,20 @@ +module.exports = function (port, onRequest, onError) { + cordova.exec(onRequest, onError, 'Server', 'start', [port]); + return { + stop: function (onSuccess, onError) { + onSuccess = onSuccess || function () { }; + onError = onError || console.error.bind(console); + cordova.exec(onSuccess, onError, 'Server', 'stop', [port]); + }, + send: function (req_id, data, onSuccess, onError) { + onSuccess = onSuccess || function () { }; + onError = onError || console.error.bind(console); + cordova.exec(onSuccess, onError, 'Server', 'send', [port, req_id, data]); + }, + setOnRequestHandler: function (onRequest, onError) { + onError = onError || console.error.bind(console); + cordova.exec(onRequest, onError, 'Server', 'setOnRequestHandler', [port]); + }, + port: port + } +} \ No newline at end of file diff --git a/src/plugins/sftp/plugin.xml b/src/plugins/sftp/plugin.xml index 0dde7997d..e9d37d67e 100644 --- a/src/plugins/sftp/plugin.xml +++ b/src/plugins/sftp/plugin.xml @@ -25,5 +25,8 @@ - + + + + diff --git a/src/plugins/sftp/src/com/foxdebug/sftp/Sftp.java b/src/plugins/sftp/src/com/foxdebug/sftp/Sftp.java index fdb96828b..ce5f46687 100644 --- a/src/plugins/sftp/src/com/foxdebug/sftp/Sftp.java +++ b/src/plugins/sftp/src/com/foxdebug/sftp/Sftp.java @@ -1,296 +1,777 @@ -package com.foxdebug.sftp; - -import android.app.Activity; -import android.content.ContentResolver; -import android.content.Context; -import android.net.Uri; -import android.util.Log; -import androidx.documentfile.provider.DocumentFile; -import com.sshtools.client.SshClient; -import com.sshtools.common.publickey.InvalidPassphraseException; -import com.sshtools.common.publickey.SshKeyUtils; -import com.sshtools.common.ssh.SshException; -import com.sshtools.common.util.FileUtils; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintWriter; -import java.lang.SecurityException; -import java.net.URI; -import java.net.URISyntaxException; -import java.nio.channels.UnresolvedAddressException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.apache.commons.io.IOUtils; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaWebView; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public class Sftp extends CordovaPlugin { - - private SshClient ssh; - private Context context; - private Activity activity; - private String connectionID; - - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - context = cordova.getContext(); - activity = cordova.getActivity(); - } - - public boolean execute( - final String action, - final JSONArray args, - final CallbackContext callbackContext - ) - throws JSONException { - final String arg1 = getJSONValueString(args, 0); - final String arg2 = getJSONValueString(args, 1); - final String arg3 = getJSONValueString(args, 2); - final String arg4 = getJSONValueString(args, 3); - final String arg5 = getJSONValueString(args, 4); - - switch (action) { - case "connect-pass": - case "connect-key": - case "getfile": - case "putfile": - case "close": - case "exec": - case "isconnected": - break; - default: - return false; - } - - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - switch (action) { - case "connect-pass": - connectUsingPassword( - arg1, - getJSONValueInt(args, 1), - arg3, - arg4, - callbackContext - ); - break; - case "connect-key": - connectUsingKeyFile( - arg1, - getJSONValueInt(args, 1), - arg3, - arg4, - arg5, - callbackContext - ); - break; - case "getfile": - getFile(arg1, arg2, callbackContext); - break; - case "putfile": - putFile(arg1, arg2, callbackContext); - break; - case "exec": - exec(arg1, callbackContext); - break; - case "close": - close(callbackContext); - break; - case "isconnected": - isConnected(callbackContext); - break; - default: - break; - } - } - } - ); - - return true; - } - - private void connectUsingPassword( - String host, - int port, - String username, - String password, - CallbackContext callback - ) { - try { - ssh = new SshClient(host, port, username, password.toCharArray()); - if (ssh.isConnected()) { - connectionID = username + "@" + host; - callback.success(); - Log.d("connectUsingPassword", "Connected successfully"); - return; - } - - callback.error("Cannot connect"); - } catch (UnresolvedAddressException | SshException | IOException e) { - callback.error(errMessage(e)); - Log.e("connectUsingPassword", "Cannot connect", e); - } - } - - private void connectUsingKeyFile( - String host, - int port, - String username, - String keyFile, - String passphrase, - CallbackContext callback - ) { - try { - DocumentFile file = DocumentFile.fromSingleUri( - context, - Uri.parse(keyFile) - ); - Uri uri = file.getUri(); - ContentResolver contentResolver = context.getContentResolver(); - InputStream in = contentResolver.openInputStream(uri); - - ssh = - new SshClient( - host, - port, - username, - SshKeyUtils.getPrivateKey(in, passphrase) - ); - - if (ssh.isConnected()) { - connectionID = username + "@" + host; - callback.success(); - return; - } - - callback.error("Cannot connect"); - } catch ( - InvalidPassphraseException - | UnresolvedAddressException - | SshException - | IOException - | SecurityException e - ) { - callback.error(errMessage(e)); - Log.e("connectUsingKeyFile", "Cannot connect", e); - } - } - - private void exec(String command, CallbackContext callback) { - try { - if (ssh != null) { - JSONObject res = new JSONObject(); - StringBuffer buffer = new StringBuffer(); - int code = ssh.executeCommandWithResult(command, buffer); - String result = buffer.toString(); - res.put("code", code); - res.put("result", result); - callback.success(res); - return; - } - callback.error("Not connected"); - } catch (IOException | JSONException e) { - callback.error(errMessage(e)); - } - } - - private void getFile( - String filename, - String localFilename, - CallbackContext callback - ) { - try { - if (ssh != null) { - URI uri = new URI(localFilename); - File file = new File(uri); - file.createNewFile(); - ssh.getFile(filename, file); - callback.success(); - return; - } - Log.d("getFile", "ssh is null"); - callback.error("Not connected"); - } catch (IOException | URISyntaxException e) { - callback.error(errMessage(e)); - } - } - - private void putFile( - String filename, - String localFilename, - CallbackContext callback - ) { - try { - if (ssh != null) { - URI uri = new URI(localFilename); - File file = new File(uri); - ssh.putFile(file, filename); - callback.success(); - return; - } - callback.error("Not connected"); - } catch (IOException | URISyntaxException e) { - callback.error(errMessage(e)); - } - } - - private void close(CallbackContext callback) { - try { - if (ssh != null) { - ssh.close(); - callback.success(); - return; - } - callback.error("Not connected"); - } catch (IOException e) { - callback.error(errMessage(e)); - } - } - - private void isConnected(CallbackContext callback) { - if (ssh != null && ssh.isConnected()) { - callback.success(connectionID); - return; - } - - callback.success(0); - } - - private String getJSONValueString(JSONArray ar, int index) { - try { - return ar.getString(index); - } catch (JSONException e) { - return null; - } - } - - private int getJSONValueInt(JSONArray ar, int index) { - try { - return ar.getInt(index); - } catch (JSONException e) { - return 0; - } - } - - private String errMessage(Exception e) { - String res = e.getMessage(); - if (res == null || res.equals("")) { - return e.toString(); - } - - return res; - } -} +package com.foxdebug.sftp; + +import android.app.Activity; +import android.content.ContentResolver; +import android.content.Context; +import android.net.Uri; +import android.util.Log; +import androidx.documentfile.provider.DocumentFile; +import com.sshtools.client.SshClient; +import com.sshtools.client.SshClient.SshClientBuilder; +import com.sshtools.client.sftp.SftpClient; +import com.sshtools.client.sftp.SftpClient.SftpClientBuilder; +import com.sshtools.client.sftp.SftpFile; +import com.sshtools.client.sftp.TransferCancelledException; +import com.sshtools.common.permissions.PermissionDeniedException; +import com.sshtools.common.publickey.InvalidPassphraseException; +import com.sshtools.common.publickey.SshKeyUtils; +import com.sshtools.common.sftp.SftpFileAttributes; +import com.sshtools.common.sftp.SftpStatusException; +import com.sshtools.common.ssh.SshException; +import com.sshtools.common.ssh.components.SshKeyPair; +import com.sshtools.common.ssh.components.jce.JCEProvider; +import com.sshtools.common.util.FileUtils; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.SecurityException; +import java.lang.reflect.Method; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URLDecoder; +import java.net.URLEncoder; +import java.nio.channels.UnresolvedAddressException; +import java.nio.charset.StandardCharsets; +import java.security.Security; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import java.util.Arrays; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + +public class Sftp extends CordovaPlugin { + + private static final String TAG = "SFTP"; + private SshClient ssh; + private SftpClient sftp; + private Context context; + private Activity activity; + private String connectionID; + + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + context = cordova.getContext(); + activity = cordova.getActivity(); + System.setProperty("maverick.log.nothread", "true"); + } + + public boolean execute( + String action, + JSONArray args, + CallbackContext callback + ) { + try { + Method method = getClass() + .getDeclaredMethod(action, JSONArray.class, CallbackContext.class); + + if (method != null) { + method.invoke(this, args, callback); + return true; + } + } catch (NoSuchMethodException e) { + callback.error("Method not found: " + action); + return false; + } catch (SecurityException e) { + callback.error("Security exception: " + e.getMessage()); + return false; + } catch (Exception e) { + callback.error("Exception: " + e.getMessage()); + return false; + } + + return false; + } + + public void connectUsingPassword(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String host = args.optString(0); + int port = args.optInt(1); + String username = args.optString(2); + String password = args.optString(3); + JCEProvider.enableBouncyCastle(true); + Log.d( + TAG, + "Connecting to " + host + ":" + port + " as " + username + ); + ssh = SshClientBuilder.create() + .withHostname(host) + .withPort(port) + .withUsername(username) + .withPassword(password) + .build(); + + if (ssh.isConnected()) { + connectionID = username + "@" + host; + + try { + sftp = SftpClientBuilder.create().withClient(ssh).build(); + } catch (IOException | SshException e) { + ssh.close(); + callback.error( + "Failed to initialize SFTP subsystem: " + errMessage(e) + ); + Log.e(TAG, "Failed to initialize SFTP subsystem", e); + return; + } + + try { + sftp.getSubsystemChannel().setCharsetEncoding("UTF-8"); + } catch (UnsupportedEncodingException | SshException e) { + // Fallback to default encoding if UTF-8 fails + Log.w( + TAG, + "Failed to set UTF-8 encoding, falling back to default", + e + ); + } + callback.success(); + Log.d(TAG, "Connected successfully to " + connectionID); + return; + } + + callback.error("Failed to establish SSH connection"); + } catch (UnresolvedAddressException e) { + callback.error("Cannot resolve host address"); + Log.e(TAG, "Cannot resolve host address", e); + } catch (PermissionDeniedException e) { + callback.error("Authentication failed: " + e.getMessage()); + Log.e(TAG, "Authentication failed", e); + } catch (SshException e) { + callback.error("SSH error: " + errMessage(e)); + Log.e(TAG, "SSH error", e); + } catch (IOException e) { + callback.error("I/O error: " + errMessage(e)); + Log.e(TAG, "I/O error", e); + } catch (Exception e) { + callback.error("Unexpected error: " + errMessage(e)); + Log.e(TAG, "Unexpected error", e); + } + } + } + ); + } + + public void connectUsingKeyFile(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String host = args.optString(0); + int port = args.optInt(1); + String username = args.optString(2); + String keyFile = args.optString(3); + String passphrase = args.optString(4); + DocumentFile file = DocumentFile.fromSingleUri( + context, + Uri.parse(keyFile) + ); + Uri uri = file.getUri(); + ContentResolver contentResolver = context.getContentResolver(); + InputStream in = contentResolver.openInputStream(uri); + +// for `appDataDirectory`, Ref: https://developer.android.com/reference/android/content/Context#getExternalFilesDir(java.lang.String) +// the absolute path to application-specific directory. May return *null* if shared storage is not currently available. + File appDataDirectory = context.getExternalFilesDir(null); + if (appDataDirectory != null) { + com.sshtools.common.logger.Log.getDefaultContext().enableFile(com.sshtools.common.logger.Log.Level.DEBUG, new File(appDataDirectory,"synergy.log")); + } +// JCEProvider.enableBouncyCastle(false); + + Log.i(TAG, "All Available Security Providers (Security.getProviders() : " + Arrays.toString(Security.getProviders())); + Log.i(TAG, "All Available Security Providers for ED25519 (Security.getProviders(\"KeyPairGenerator.Ed25519\"\") : " + Arrays.toString(Security.getProviders("KeyPairGenerator.Ed25519"))); + Log.i(TAG, "BC Security Provider Name (`Security.getProvider(BouncyCastleProvider.PROVIDER_NAME)`) : " + Security.getProvider(BouncyCastleProvider.PROVIDER_NAME)); + Security.removeProvider("BC"); + Security.insertProviderAt(new BouncyCastleProvider(), 1); + + Log.i(TAG, "(After Inserting BC) All Available Security Providers (Security.getProviders() : " + Arrays.toString(Security.getProviders())); + Log.i(TAG, "(After Inserting BC) All Available Security Providers for ED25519 (Security.getProviders(\"KeyPairGenerator.Ed25519\"\") : " + Arrays.toString(Security.getProviders("KeyPairGenerator.Ed25519"))); + Log.i(TAG, "(After Inserting BC) BC Security Provider Name (`Security.getProvider(BouncyCastleProvider.PROVIDER_NAME)`) : " + Security.getProvider(BouncyCastleProvider.PROVIDER_NAME)); + + SshKeyPair keyPair = null; + try { + keyPair = SshKeyUtils.getPrivateKey(in, passphrase); + } catch (InvalidPassphraseException e) { + callback.error("Invalid passphrase for key file"); + Log.e(TAG, "Invalid passphrase for key file", e); + return; + } catch (IOException e) { + callback.error("Could not read key file: " + errMessage(e)); + Log.e(TAG, "Could not read key file", e); + return; + } + + ssh = SshClientBuilder.create() + .withHostname(host) + .withPort(port) + .withUsername(username) + .withIdentities(keyPair) + .build(); + + if (ssh.isConnected()) { + connectionID = username + "@" + host; + try { + sftp = SftpClientBuilder.create().withClient(ssh).build(); + } catch (IOException | SshException e) { + ssh.close(); + callback.error( + "Failed to initialize SFTP subsystem: " + errMessage(e) + ); + Log.e(TAG, "Failed to initialize SFTP subsystem", e); + return; + } + + try { + sftp.getSubsystemChannel().setCharsetEncoding("UTF-8"); + } catch (UnsupportedEncodingException | SshException e) { + // Fallback to default encoding if UTF-8 fails + Log.w( + TAG, + "Failed to set UTF-8 encoding, falling back to default", + e + ); + } + callback.success(); + Log.d(TAG, "Connected successfully to " + connectionID); + return; + } + + callback.error("Failed to establish SSH connection"); + } catch (UnresolvedAddressException e) { + callback.error("Cannot resolve host address"); + Log.e(TAG, "Cannot resolve host address", e); + } catch (PermissionDeniedException e) { + callback.error("Authentication failed: " + e.getMessage()); + Log.e(TAG, "Authentication failed", e); + } catch (SshException e) { + callback.error("SSH error: " + errMessage(e)); + Log.e(TAG, "SSH error", e); + } catch (IOException e) { + callback.error("I/O error: " + errMessage(e)); + Log.e(TAG, "I/O error", e); + } catch (SecurityException e) { + callback.error("Security error: " + errMessage(e)); + Log.e(TAG, "Security error", e); + } catch (Exception e) { + callback.error("Unexpected error: " + errMessage(e)); + Log.e(TAG, "Unexpected error", e); + } + } + } + ); + } + + public void exec(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String command = args.optString(0); + if (ssh != null) { + JSONObject res = new JSONObject(); + StringBuffer buffer = new StringBuffer(); + int code = ssh.executeCommandWithResult(command, buffer); + String result = buffer.toString(); + res.put("code", code); + res.put("result", result); + callback.success(res); + return; + } + callback.error("Not connected"); + } catch (IOException | JSONException e) { + callback.error(errMessage(e)); + } + } + } + ); + } + + public void getFile(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String filename = args.optString(0); + String localFilename = args.optString(1); + if (ssh != null && sftp != null) { + URI uri = new URI(localFilename); + DocumentFile file = DocumentFile.fromSingleUri( + context, + Uri.parse(localFilename) + ); + Uri fileUri = file.getUri(); + ContentResolver contentResolver = context.getContentResolver(); + + try ( + InputStream inputStream = sftp.getInputStream(filename); + java.io.OutputStream outputStream = + contentResolver.openOutputStream(fileUri) + ) { + byte[] buffer = new byte[32768]; + int bytesRead; + + while ((bytesRead = inputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + } + + outputStream.flush(); + callback.success(); + return; + } catch (SftpStatusException e) { + callback.error("SFTP transfer error: " + errMessage(e)); + return; + } + } + Log.d("getFile", "ssh or sftp is null"); + callback.error("Not connected"); + } catch ( + IOException + | URISyntaxException + | SecurityException + | SshException e + ) { + Log.e("getFile", "Error downloading file", e); + callback.error("File transfer error: " + errMessage(e)); + } + } + } + ); + } + + public void putFile(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String remoteFilename = args.optString(0); + String localFilename = args.optString(1); + + if (ssh == null || sftp == null) { + callback.error("Not connected"); + return; + } + + if (remoteFilename == null || remoteFilename.isEmpty()) { + callback.error("Remote filename is required"); + return; + } + + if (localFilename == null || localFilename.isEmpty()) { + callback.error("Local filename is required"); + return; + } + + File localFile; + try { + URI uri = new URI(localFilename); + localFile = new File(uri); + } catch (URISyntaxException e) { + callback.error("Invalid local URI: " + errMessage(e)); + return; + } + + if (!localFile.exists() || !localFile.canRead()) { + callback.error("Local file does not exist or is not readable"); + return; + } + + try { + sftp.put(localFile.getAbsolutePath(), remoteFilename); + callback.success("File uploaded successfully"); + } catch (IOException e) { + callback.error("Error uploading file: " + errMessage(e)); + } + } catch (Exception e) { + callback.error(errMessage(e)); + } + } + } + ); + } + + public void lsDir(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String path = args.optString(0); + if (ssh != null && sftp != null) { + JSONArray files = new JSONArray(); + for (SftpFile file : sftp.ls(path)) { + String filename = file.getFilename(); + if (filename.equals(".") || filename.equals("..")) { + continue; + } + SftpFileAttributes fileAttributes = file.attributes(); + JSONObject fileInfo = new JSONObject(); + fileInfo.put("name", filename); + fileInfo.put("exists", true); + + if (fileAttributes != null) { + String permissions = fileAttributes.toPermissionsString(); + boolean canRead = permissions.charAt(1) == 'r'; + boolean canWrite = permissions.charAt(2) == 'w'; + fileInfo.put("canRead", canRead); + fileInfo.put("canWrite", canWrite); + fileInfo.put("permissions", permissions); + fileInfo.put("length", fileAttributes.size()); + fileInfo.put("url", file.getAbsolutePath()); + fileInfo.put( + "lastModified", + fileAttributes.lastModifiedTime() + ); + + if (permissions.charAt(0) == 'l') { + fileInfo.put("isLink", true); + try { + String linkTarget = sftp.getSymbolicLinkTarget( + file.getAbsolutePath() + ); + fileInfo.put("linkTarget", linkTarget); + SftpFileAttributes linkAttributes = sftp.stat( + linkTarget + ); + fileInfo.put("isFile", linkAttributes.isFile()); + fileInfo.put( + "isDirectory", + linkAttributes.isDirectory() + ); + } catch (SftpStatusException | SshException e) { + // Handle broken symlink + fileInfo.put("isFile", false); + fileInfo.put("isDirectory", false); + fileInfo.put("isLink", false); + } + } else { + fileInfo.put("isLink", false); + fileInfo.put("isDirectory", fileAttributes.isDirectory()); + fileInfo.put("isFile", fileAttributes.isFile()); + } + } + + files.put(fileInfo); + } + callback.success(files); + return; + } + callback.error("Not connected"); + } catch (SftpStatusException | JSONException | SshException e) { + callback.error(errMessage(e)); + } + } + } + ); + } + + public void stat(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String path = sanitizePath(args.optString(0)); + if (ssh != null && sftp != null) { + URI uri = new URI(path); + JSONObject fileStat = new JSONObject(); + + try { + SftpFileAttributes fileAttributes = sftp.stat(uri.getPath()); + if (fileAttributes != null) { + String permissions = fileAttributes.toPermissionsString(); + boolean canRead = permissions.charAt(1) == 'r'; + boolean canWrite = permissions.charAt(2) == 'w'; + + fileStat.put("exists", true); + fileStat.put("canRead", canRead); + fileStat.put("canWrite", canWrite); + fileStat.put("isLink", fileAttributes.isLink()); + fileStat.put("isDirectory", fileAttributes.isDirectory()); + fileStat.put("isFile", fileAttributes.isFile()); + fileStat.put("length", fileAttributes.size()); + fileStat.put( + "permissions", + fileAttributes.toPermissionsString() + ); + fileStat.put( + "lastModified", + fileAttributes.lastModifiedTime() + ); + String[] pathSegments = uri.getPath().split("/"); + String filename = pathSegments[pathSegments.length - 1]; + + fileStat.put("name", filename); + fileStat.put("url", uri.getPath()); + if (permissions.charAt(0) == 'l') { + fileStat.put("isLink", true); + try { + String linkTarget = sftp.getSymbolicLinkTarget( + uri.getPath() + ); + fileStat.put("linkTarget", linkTarget); + SftpFileAttributes linkAttributes = sftp.stat( + linkTarget + ); + fileStat.put("isFile", linkAttributes.isFile()); + fileStat.put( + "isDirectory", + linkAttributes.isDirectory() + ); + } catch (SftpStatusException | SshException e) { + // Handle broken symlink + fileStat.put("isFile", false); + fileStat.put("isDirectory", false); + fileStat.put("isLink", false); + fileStat.put("exists", false); + } + } else { + fileStat.put("isLink", false); + fileStat.put("isDirectory", fileAttributes.isDirectory()); + fileStat.put("isFile", fileAttributes.isFile()); + } + } + } catch (SftpStatusException e) { + fileStat.put("exists", false); + fileStat.put("url", uri.getPath()); + } + + callback.success(fileStat); + return; + } + callback.error("Not connected"); + } catch (URISyntaxException | JSONException | SshException e) { + callback.error(errMessage(e)); + } + } + } + ); + } + + public void mkdir(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String path = args.optString(0); + if (ssh != null && sftp != null) { + sftp.mkdir(path); + callback.success(); + return; + } + callback.error("Not connected"); + } catch (SftpStatusException | SshException e) { + callback.error(errMessage(e)); + } + } + } + ); + } + + public void rm(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String path = args.optString(0); + boolean force = args.optBoolean(1, false); + boolean recurse = args.optBoolean(2, false); + + if (ssh != null && sftp != null) { + sftp.rm(path, force, recurse); + callback.success(); + return; + } + callback.error("Not connected"); + } catch (SftpStatusException | SshException e) { + callback.error(errMessage(e)); + } + } + } + ); + } + + public void createFile(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String path = args.optString(0); + String content = args.optString(1, ""); + + if (ssh != null && sftp != null) { + try { + SftpFileAttributes attrs = sftp.stat(path); + if (attrs != null && attrs.isFile()) { + callback.error("File already exists"); + return; + } + } catch (SftpStatusException e) { + // File doesn't exist, continue with creation + } + + java.io.ByteArrayInputStream inputStream; + if (content.isEmpty()) { + inputStream = new java.io.ByteArrayInputStream(new byte[0]); + } else { + inputStream = new java.io.ByteArrayInputStream( + content.getBytes(StandardCharsets.UTF_8) + ); + } + sftp.put(inputStream, path); + callback.success(); + return; + } + callback.error("Not connected"); + } catch ( + SftpStatusException | SshException | TransferCancelledException e + ) { + callback.error(errMessage(e)); + } + } + } + ); + } + + public void rename(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + String oldpath = args.optString(0); + String newpath = args.optString(1); + + if (ssh != null && sftp != null) { + sftp.rename(oldpath, newpath); + callback.success(); + return; + } + callback.error("Not connected"); + } catch (SftpStatusException | SshException e) { + callback.error(errMessage(e)); + } + } + } + ); + } + + public void pwd(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + if (ssh != null && sftp != null) { + String pwd = sftp.pwd(); + callback.success(pwd); + return; + } + callback.error("Not connected"); + } catch (SftpStatusException | SshException e) { + callback.error(errMessage(e)); + } + } + } + ); + } + + private String sanitizePath(String path) { + try { + String decodedPath = URLDecoder.decode( + path, + StandardCharsets.UTF_8.toString() + ); + String encodedPath = URLEncoder.encode( + decodedPath, + StandardCharsets.UTF_8.toString() + ) + .replace("+", "%20") // Replace + with %20 for spaces + .replace("%2F", "/") // Preserve forward slashes + .replace("%5C", "\\"); // Preserve backslashes if needed + + return encodedPath; + } catch (UnsupportedEncodingException e) { + return path; // Return original if encoding fails + } + } + + public void close(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + try { + if (ssh != null) { + ssh.close(); + sftp.quit(); + callback.success(); + return; + } + callback.error("Not connected"); + } catch (IOException | SshException e) { + callback.error(errMessage(e)); + } + } + } + ); + } + + public void isConnected(JSONArray args, CallbackContext callback) { + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + if ( + ssh != null && + ssh.isConnected() && + sftp != null && + !sftp.isClosed() + ) { + callback.success(connectionID); + return; + } + + callback.success(0); + } + } + ); + } + + public String errMessage(Exception e) { + String res = e.getMessage(); + if (res == null || res.equals("")) { + return e.toString(); + } + + return res; + } +} diff --git a/src/plugins/sftp/www/sftp.js b/src/plugins/sftp/www/sftp.js index b29a462ec..cd1859ea6 100644 --- a/src/plugins/sftp/www/sftp.js +++ b/src/plugins/sftp/www/sftp.js @@ -8,7 +8,7 @@ module.exports = { } port = Number.parseInt(port); - cordova.exec(onSuccess, onFail, 'Sftp', 'connect-pass', [host, port, username, password]); + cordova.exec(onSuccess, onFail, 'Sftp', 'connectUsingPassword', [host, port, username, password]); }, connectUsingKeyFile: function (host, port, username, keyFile, passphrase, onSuccess, onFail) { if (typeof port != 'number') { @@ -16,18 +16,39 @@ module.exports = { } port = Number.parseInt(port); - cordova.exec(onSuccess, onFail, 'Sftp', 'connect-key', [host, port, username, keyFile, passphrase]); + cordova.exec(onSuccess, onFail, 'Sftp', 'connectUsingKeyFile', [host, port, username, keyFile, passphrase]); }, getFile: function (filename, localFilename, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Sftp', 'getfile', [filename, localFilename]); + cordova.exec(onSuccess, onFail, 'Sftp', 'getFile', [filename, localFilename]); }, putFile: function (filename, localFilename, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Sftp', 'putfile', [filename, localFilename]); + cordova.exec(onSuccess, onFail, 'Sftp', 'putFile', [filename, localFilename]); + }, + lsDir: function (path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Sftp', 'lsDir', [path]); + }, + stat: function (path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Sftp', 'stat', [path]); + }, + mkdir: function (path, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Sftp', 'mkdir', [path]); + }, + rm: function (path, force, recurse, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Sftp', 'rm', [path, force, recurse]); + }, + createFile: function (path, content, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Sftp', 'createFile', [path, content]); + }, + rename: function (oldpath, newpath, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Sftp', 'rename', [oldpath, newpath]); + }, + pwd: function (onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'Sftp', 'pwd', []); }, close: function (onSuccess, onFail) { cordova.exec(onSuccess, onFail, 'Sftp', 'close', []); }, isConnected: function (onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'Sftp', 'isconnected', []); + cordova.exec(onSuccess, onFail, 'Sftp', 'isConnected', []); } -}; \ No newline at end of file +}; diff --git a/src/plugins/system/android/com/foxdebug/system/System.java b/src/plugins/system/android/com/foxdebug/system/System.java new file mode 100644 index 000000000..517550fc4 --- /dev/null +++ b/src/plugins/system/android/com/foxdebug/system/System.java @@ -0,0 +1,1523 @@ +package com.foxdebug.system; + +import static android.os.Build.VERSION.SDK_INT; + +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.io.IOException; +import android.app.Activity; +import android.app.PendingIntent; +import android.content.ClipData; +import android.content.Context; +import android.content.Intent; +import android.content.res.Configuration; +import android.content.*; +import android.content.pm.*; +import java.util.*; +import android.graphics.Bitmap; +import android.graphics.Color; +import android.graphics.ImageDecoder; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; +import android.os.PowerManager; +import android.provider.Settings.Global; +import android.util.Base64; +import android.view.View; +import android.view.Window; +import android.view.WindowInsetsController; +import android.view.inputmethod.InputMethodManager; +import android.webkit.WebView; +import androidx.core.content.FileProvider; +import androidx.core.content.pm.ShortcutInfoCompat; +import androidx.core.content.pm.ShortcutManagerCompat; +import androidx.core.graphics.drawable.IconCompat; +import com.foxdebug.system.Ui.Theme; +import java.io.File; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaInterface; +import org.apache.cordova.CordovaPlugin; +import org.apache.cordova.CordovaWebView; +import org.apache.cordova.PluginResult; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import java.nio.file.Files; +import java.nio.file.LinkOption; +import java.nio.file.Path; +import android.content.Context; +import android.net.Uri; +import android.util.Log; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.IOException; +import android.webkit.MimeTypeMap; + +// DocumentFile import (AndroidX library) +import androidx.documentfile.provider.DocumentFile; + +// Java I/O imports +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.IOException; + +import android.os.Build; +import android.os.Environment; +import android.Manifest; +import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.net.Uri; +import android.provider.Settings; + +import androidx.core.content.ContextCompat; + + + +public class System extends CordovaPlugin { + + private CallbackContext requestPermissionCallback; + private Activity activity; + private Context context; + private int REQ_PERMISSIONS = 1; + private int REQ_PERMISSION = 2; + private int systemBarColor = 0xFF000000; + private Theme theme; + private CallbackContext intentHandler; + private CordovaWebView webView; + private String fileProviderAuthority; + + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + this.context = cordova.getContext(); + this.activity = cordova.getActivity(); + this.webView = webView; + + // Set up global exception handler + Thread.setDefaultUncaughtExceptionHandler( + new Thread.UncaughtExceptionHandler() { + @Override + public void uncaughtException(Thread thread, Throwable ex) { + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + ex.printStackTrace(pw); + String stackTrace = sw.toString(); + + String errorMsg = String.format( + "Uncaught Exception: %s\nStack trace: %s", + ex.getMessage(), + stackTrace + ); + + sendLogToJavaScript("error", errorMsg); + + // rethrow to the default handler + Thread.getDefaultUncaughtExceptionHandler() + .uncaughtException(thread, ex); + } + } + ); + } + + public boolean execute( + String action, + final JSONArray args, + final CallbackContext callbackContext + ) throws JSONException { + final String arg1 = args.optString(0); + final String arg2 = args.optString(1); + final String arg3 = args.optString(2); + final String arg4 = args.optString(3); + final String arg5 = args.optString(4); + final String arg6 = args.optString(5); + + switch (action) { + case "get-webkit-info": + case "file-action": + case "is-powersave-mode": + case "get-app-info": + case "add-shortcut": + case "remove-shortcut": + case "pin-shortcut": + case "get-android-version": + case "request-permissions": + case "request-permission": + case "has-permission": + case "open-in-browser": + case "launch-app": + case "get-global-setting": + case "get-available-encodings": + case "decode": + case "encode": + case "copyToUri": + break; + case "get-configuration": + getConfiguration(callbackContext); + return true; + case "set-input-type": + setInputType(arg1); + callbackContext.success(); + return true; + case "get-cordova-intent": + getCordovaIntent(callbackContext); + return true; + case "set-intent-handler": + setIntentHandler(callbackContext); + return true; + case "set-ui-theme": + this.cordova.getActivity() + .runOnUiThread( + new Runnable() { + public void run() { + setUiTheme(arg1, args.optJSONObject(1), callbackContext); + } + } + ); + return true; + case "clear-cache": + this.cordova.getActivity() + .runOnUiThread( + new Runnable() { + public void run() { + clearCache(callbackContext); + } + } + ); + return true; + case "fileExists": + callbackContext.success(fileExists(args.getString(0), args.getString(1)) ? 1 : 0); + return true; + + case "createSymlink": + boolean success = createSymlink(args.getString(0), args.getString(1)); + callbackContext.success(success ? 1 : 0); + return true; + + case "getNativeLibraryPath": + callbackContext.success(getNativeLibraryPath()); + return true; + + case "getFilesDir": + callbackContext.success(getFilesDir()); + return true; + + case "getParentPath": + callbackContext.success(getParentPath(args.getString(0))); + return true; + + case "listChildren": + callbackContext.success(listChildren(args.getString(0))); + return true; + case "writeText": + { + try { + String filePath = args.getString(0); + String content = args.getString(1); + + Files.write(Paths.get(filePath), + Collections.singleton(content), + StandardOpenOption.CREATE, + StandardOpenOption.TRUNCATE_EXISTING); + + callbackContext.success("File written successfully"); + } catch (Exception e) { + callbackContext.error("Failed to write file: " + e.getMessage()); + } + return true; + } + + case "getArch": + String arch; + + if (android.os.Build.VERSION.SDK_INT >= 21) { + arch = android.os.Build.SUPPORTED_ABIS[0]; + } else { + arch = android.os.Build.CPU_ABI; + } + + callbackContext.success(arch); + return true; + + case "requestStorageManager": + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + try { + Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION); + intent.setData(Uri.parse("package:" + context.getPackageName())); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + context.startActivity(intent); + callbackContext.success("true"); + } catch (Exception e) { + // Fallback to general settings if specific one fails + Intent intent = new Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + context.startActivity(intent); + callbackContext.success("true"); + } + } else { + callbackContext.success("false"); // Not needed on Android < 11 + } + return true; + + + case "hasGrantedStorageManager": + boolean granted; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + granted = Environment.isExternalStorageManager(); + } else { + // Fallback for Android 10 and below + granted = ContextCompat.checkSelfPermission( + context, + Manifest.permission.READ_EXTERNAL_STORAGE + ) == PackageManager.PERMISSION_GRANTED; + } + callbackContext.success(String.valueOf(granted)); + return true; + + case "isManageExternalStorageDeclared": + PackageManager pm = context.getPackageManager(); + try { + PackageInfo info = pm.getPackageInfo(context.getPackageName(), PackageManager.GET_PERMISSIONS); + String[] permissions = info.requestedPermissions; + String isDeclared = "false"; + + if (permissions != null) { + for (String perm: permissions) { + if (perm.equals("android.permission.MANAGE_EXTERNAL_STORAGE")) { + isDeclared = "true"; + break; + } + } + } + callbackContext.success(isDeclared); + + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + callbackContext.error(e.toString()); + } + + return true; + case "mkdirs": + if (new File(args.getString(0)).mkdirs()) { + callbackContext.success(); + } else { + callbackContext.error("mkdirs failed"); + } + return true; + case "deleteFile": + if (new File(args.getString(0)).delete()) { + callbackContext.success(); + } else { + callbackContext.error("delete failed"); + } + return true; + case "setExec": + if (new File(args.getString(0)).setExecutable(Boolean.parseBoolean(args.getString(1)))) { + callbackContext.success(); + } else { + callbackContext.error("set exec faild"); + } + + return true; + default: + return false; + } + + cordova + .getThreadPool() + .execute( + new Runnable() { + public void run() { + switch (action) { + case "copyToUri": + try { + //srcUri is a file + Uri srcUri = Uri.parse(args.getString(0)); + + //destUri is a directory + Uri destUri = Uri.parse(args.getString(1)); + + //create a file named this into the dest Directory and copy the srcUri into it + String fileName = args.getString(2); + + InputStream in = null; + OutputStream out = null; + try { + // Open input stream from the source URI + if ("file".equalsIgnoreCase(srcUri.getScheme())) { + File file = new File(srcUri.getPath()); in = new FileInputStream(file); + } else { in = context.getContentResolver().openInputStream(srcUri); + } + + // Create the destination file using DocumentFile for better URI handling + DocumentFile destFile = null; + + if ("file".equalsIgnoreCase(destUri.getScheme())) { + // Handle file:// scheme using DocumentFile + File destDir = new File(destUri.getPath()); + if (!destDir.exists()) { + destDir.mkdirs(); // Create directory if it doesn't exist + } + DocumentFile destDocDir = DocumentFile.fromFile(destDir); + + // Check if file already exists and delete it + DocumentFile existingFile = destDocDir.findFile(fileName); + if (existingFile != null && existingFile.exists()) { + existingFile.delete(); + } + + // Create new file + String mimeType = getMimeTypeFromExtension(fileName); + destFile = destDocDir.createFile(mimeType, fileName); + } else { + // Handle content:// scheme using DocumentFile + DocumentFile destDocDir = DocumentFile.fromTreeUri(context, destUri); + + if (destDocDir == null || !destDocDir.exists() || !destDocDir.isDirectory()) { + callbackContext.error("Destination directory does not exist or is not accessible"); + return; + } + + // Check if file already exists and delete it + DocumentFile existingFile = destDocDir.findFile(fileName); + if (existingFile != null && existingFile.exists()) { + existingFile.delete(); + } + + // Create new file + String mimeType = getMimeTypeFromExtension(fileName); + destFile = destDocDir.createFile(mimeType, fileName); + } + + if (destFile == null || !destFile.exists()) { + callbackContext.error("Failed to create destination file"); + return; + } + + // Open output stream to the created file + out = context.getContentResolver().openOutputStream(destFile.getUri()); + + if ( in == null || out == null) { + callbackContext.error("uri streams are null"); + return; + } + + // Copy stream + byte[] buffer = new byte[8192]; + int len; + while ((len = in .read(buffer)) > 0) { + out.write(buffer, 0, len); + } + + out.flush(); + callbackContext.success(); + } catch (IOException e) { + e.printStackTrace(); + callbackContext.error(e.toString()); + } finally { + try { + if ( in != null) in .close(); + if (out != null) out.close(); + } catch (IOException e) { + e.printStackTrace(); + callbackContext.error(e.toString()); + } + } + } catch (Exception e) { + e.printStackTrace(); + callbackContext.error(e.toString()); + } + break; + case "get-webkit-info": + getWebkitInfo(callbackContext); + break; + case "file-action": + fileAction(arg1, arg2, arg3, arg4, callbackContext); + break; + case "is-powersave-mode": + isPowerSaveMode(callbackContext); + break; + case "get-app-info": + getAppInfo(callbackContext); + break; + case "add-shortcut": + addShortcut( + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + callbackContext + ); + break; + case "remove-shortcut": + removeShortcut(arg1, callbackContext); + break; + case "pin-shortcut": + pinShortcut(arg1, callbackContext); + break; + case "get-android-version": + getAndroidVersion(callbackContext); + break; + case "request-permissions": + requestPermissions(args.optJSONArray(0), callbackContext); + break; + case "request-permission": + requestPermission(arg1, callbackContext); + break; + case "has-permission": + hasPermission(arg1, callbackContext); + break; + case "open-in-browser": + openInBrowser(arg1, callbackContext); + break; + case "launch-app": + launchApp(arg1, arg2, arg3, callbackContext); + break; + case "get-global-setting": + getGlobalSetting(arg1, callbackContext); + break; + case "get-available-encodings": + getAvailableEncodings(callbackContext); + break; + case "decode": + decode(arg1, arg2, callbackContext); + break; + case "encode": + encode(arg1, arg2, callbackContext); + break; + default: + break; + } + } + } + ); + + return true; + } + + private void sendLogToJavaScript(String level, String message) { + final String js = + "window.log('" + level + "', " + JSONObject.quote(message) + ");"; + cordova + .getActivity() + .runOnUiThread( + new Runnable() { + @Override + public void run() { + webView.loadUrl("javascript:" + js); + } + } + ); + } + + // Helper method to determine MIME type using Android's built-in MimeTypeMap + private String getMimeTypeFromExtension(String fileName) { + String extension = ""; + int lastDotIndex = fileName.lastIndexOf('.'); + if (lastDotIndex > 0 && lastDotIndex < fileName.length() - 1) { + extension = fileName.substring(lastDotIndex + 1).toLowerCase(); + } + + String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); + return mimeType != null ? mimeType : "application/octet-stream"; + } + + private void getConfiguration(CallbackContext callback) { + try { + JSONObject result = new JSONObject(); + Configuration config = context.getResources().getConfiguration(); + InputMethodManager imm = (InputMethodManager) context.getSystemService( + Context.INPUT_METHOD_SERVICE + ); + Method method = + InputMethodManager.class.getMethod("getInputMethodWindowVisibleHeight"); + + result.put("isAcceptingText", imm.isAcceptingText()); + result.put("keyboardHeight", method.invoke(imm)); + result.put("locale", config.locale.toString()); + result.put("fontScale", config.fontScale); + result.put("keyboard", config.keyboard); + result.put("keyboardHidden", config.keyboardHidden); + result.put("hardKeyboardHidden", config.hardKeyboardHidden); + result.put("navigationHidden", config.navigationHidden); + result.put("navigation", config.navigation); + result.put("orientation", config.orientation); + callback.success(result); + } catch ( + JSONException | + NoSuchMethodException | + IllegalAccessException | + InvocationTargetException error + ) { + callback.error(error.toString()); + } + } + + private void decode( + String content, // base64 encoded string + String charSetName, + CallbackContext callback + ) { + try { + byte[] bytes = Base64.decode(content, Base64.DEFAULT); + + if (Charset.isSupported(charSetName) == false) { + callback.error("Charset not supported: " + charSetName); + return; + } + + Charset charSet = Charset.forName(charSetName); + CharBuffer charBuffer = charSet.decode(ByteBuffer.wrap(bytes)); + String result = String.valueOf(charBuffer); + callback.success(result); + } catch (Exception e) { + callback.error(e.toString()); + } + } + + private void encode( + String content, // string to encode + String charSetName, + CallbackContext callback + ) { + try { + if (Charset.isSupported(charSetName) == false) { + callback.error("Charset not supported: " + charSetName); + return; + } + + Charset charSet = Charset.forName(charSetName); + ByteBuffer byteBuffer = charSet.encode(content); + byte[] bytes = new byte[byteBuffer.remaining()]; + byteBuffer.get(bytes); + callback.success(bytes); + } catch (Exception e) { + callback.error(e.toString()); + } + } + + private void getAvailableEncodings(CallbackContext callback) { + try { + Map < String, Charset > charsets = Charset.availableCharsets(); + JSONObject result = new JSONObject(); + for (Map.Entry < String, Charset > entry: charsets.entrySet()) { + JSONObject obj = new JSONObject(); + Charset charset = entry.getValue(); + obj.put("label", charset.displayName()); + obj.put("aliases", new JSONArray(charset.aliases())); + obj.put("name", charset.name()); + result.put(charset.name(), obj); + } + callback.success(result); + } catch (Exception e) { + callback.error(e.toString()); + } + } + + private void requestPermissions(JSONArray arr, CallbackContext callback) { + try { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + int[] res = new int[arr.length()]; + for (int i = 0; i < res.length; ++i) { + res[i] = 1; + } + callback.success(1); + return; + } + + String[] permissions = checkPermissions(arr); + + if (permissions.length > 0) { + requestPermissionCallback = callback; + cordova.requestPermissions(this, REQ_PERMISSIONS, permissions); + return; + } + callback.success(new JSONArray()); + } catch (Exception e) { + callback.error(e.toString()); + } + } + + private void requestPermission(String permission, CallbackContext callback) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + callback.success(1); + return; + } + + if (permission != null || !permission.equals("")) { + if (!cordova.hasPermission(permission)) { + requestPermissionCallback = callback; + cordova.requestPermission(this, REQ_PERMISSION, permission); + return; + } + + callback.success(1); + return; + } + + callback.error("No permission passed to request."); + } + + private void hasPermission(String permission, CallbackContext callback) { + if (permission != null || !permission.equals("")) { + int res = 0; + if (cordova.hasPermission(permission)) { + res = 1; + } + + callback.success(res); + return; + } + callback.error("No permission passed to check."); + } + + public boolean fileExists(String path, String countSymlinks) { + boolean followSymlinks = !Boolean.parseBoolean(countSymlinks); + File file = new File(path); + + // Android < O does not implement File#toPath(), fall back to legacy checks + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + if (!file.exists()) return false; + if (followSymlinks) { + try { + // If canonical and absolute paths differ, it's a symlink + return file.getCanonicalPath().equals(file.getAbsolutePath()); + } catch (IOException ignored) { + return false; + } + } + return true; + } + + Path p = file.toPath(); + try { + if (followSymlinks) { + return Files.exists(p) && !Files.isSymbolicLink(p); + } else { + return Files.exists(p, LinkOption.NOFOLLOW_LINKS); + } + } catch (Exception e) { + return false; + } + } + + public boolean createSymlink(String target, String linkPath) { + try { + Process process = Runtime.getRuntime().exec(new String[] { + "ln", + "-s", + target, + linkPath + }); + return process.waitFor() == 0; + } catch (Exception e) { + return false; + } + } + + public String getNativeLibraryPath() { + ApplicationInfo appInfo = context.getApplicationInfo(); + return appInfo.nativeLibraryDir; + } + + public String getFilesDir() { + return context.getFilesDir().getAbsolutePath(); + } + + public String getParentPath(String path) { + File file = new File(path); + File parent = file.getParentFile(); + return parent != null ? parent.getAbsolutePath() : null; + } + + public JSONArray listChildren(String path) throws JSONException { + File dir = new File(path); + JSONArray result = new JSONArray(); + if (dir.exists() && dir.isDirectory()) { + File[] files = dir.listFiles(); + if (files != null) { + for (File file: files) { + result.put(file.getAbsolutePath()); + } + } + } + return result; + } + + public void onRequestPermissionResult( + int code, + String[] permissions, + int[] resCodes + ) { + if (requestPermissionCallback == null) return; + + if (code == REQ_PERMISSIONS) { + JSONArray resAr = new JSONArray(); + for (int res: resCodes) { + if (res == PackageManager.PERMISSION_DENIED) { + resAr.put(0); + } + resAr.put(1); + } + + requestPermissionCallback.success(resAr); + requestPermissionCallback = null; + return; + } + + if ( + resCodes.length >= 1 && resCodes[0] == PackageManager.PERMISSION_DENIED + ) { + requestPermissionCallback.success(0); + requestPermissionCallback = null; + return; + } + requestPermissionCallback.success(1); + requestPermissionCallback = null; + return; + } + + private String[] checkPermissions(JSONArray arr) throws Exception { + List < String > list = new ArrayList < String > (); + for (int i = 0; i < arr.length(); i++) { + try { + String permission = arr.getString(i); + if (permission != null || !permission.equals("")) { + throw new Exception("Permission cannot be null or empty"); + } + if (!cordova.hasPermission(permission)) { + list.add(permission); + } + } catch (JSONException e) {} + } + + String[] res = new String[list.size()]; + return list.toArray(res); + } + + private void getAndroidVersion(CallbackContext callback) { + callback.success(Build.VERSION.SDK_INT); + } + + private void getWebkitInfo(CallbackContext callback) { + PackageInfo info = null; + JSONObject res = new JSONObject(); + + try { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + info = WebView.getCurrentWebViewPackage(); + } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + Class webViewFactory = Class.forName("android.webkit.WebViewFactory"); + Method method = webViewFactory.getMethod("getLoadedPackageInfo"); + info = (PackageInfo) method.invoke(null); + } else { + PackageManager packageManager = activity.getPackageManager(); + + try { + info = packageManager.getPackageInfo("com.google.android.webview", 0); + } catch (PackageManager.NameNotFoundException e) { + callback.error("Package not found"); + } + + return; + } + + res.put("packageName", info.packageName); + res.put("versionName", info.versionName); + res.put("versionCode", info.versionCode); + + callback.success(res); + } catch ( + JSONException | + InvocationTargetException | + ClassNotFoundException | + NoSuchMethodException | + IllegalAccessException e + ) { + callback.error( + "Cannot determine current WebView engine. (" + e.getMessage() + ")" + ); + + return; + } + } + + private void isPowerSaveMode(CallbackContext callback) { + PowerManager powerManager = (PowerManager) context.getSystemService( + Context.POWER_SERVICE + ); + boolean powerSaveMode = powerManager.isPowerSaveMode(); + + callback.success(powerSaveMode ? 1 : 0); + } + + private void fileAction( + String fileURI, + String filename, + String action, + String mimeType, + CallbackContext callback + ) { + Activity activity = this.activity; + Context context = this.context; + Uri uri = this.getContentProviderUri(fileURI, filename); + if (uri == null) { + callback.error("Unable to access file for action " + action); + return; + } + try { + Intent intent = new Intent(action); + + if (mimeType.equals("")) { + mimeType = "text/plain"; + } + + mimeType = resolveMimeType(mimeType, uri, filename); + + String clipLabel = null; + if (filename != null && !filename.isEmpty()) { + clipLabel = new File(filename).getName(); + } + if (clipLabel == null || clipLabel.isEmpty()) { + clipLabel = uri.getLastPathSegment(); + } + if (clipLabel == null || clipLabel.isEmpty()) { + clipLabel = "shared-file"; + } + if (action.equals(Intent.ACTION_SEND)) { + intent.setType(mimeType); + intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + intent.setClipData( + ClipData.newUri( + context.getContentResolver(), + clipLabel, + uri + ) + ); + intent.putExtra(Intent.EXTRA_STREAM, uri); + intent.putExtra(Intent.EXTRA_TITLE, clipLabel); + intent.putExtra(Intent.EXTRA_SUBJECT, clipLabel); + if (filename != null && !filename.isEmpty()) { + intent.putExtra(Intent.EXTRA_TEXT, filename); + } + } else { + int flags = + Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION | + Intent.FLAG_GRANT_READ_URI_PERMISSION; + + if (action.equals(Intent.ACTION_EDIT)) { + flags |= Intent.FLAG_GRANT_WRITE_URI_PERMISSION; + } + + intent.setFlags(flags); + intent.setDataAndType(uri, mimeType); + intent.setClipData( + ClipData.newUri( + context.getContentResolver(), + clipLabel, + uri + ) + ); + intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + if (!clipLabel.equals("shared-file")) { + intent.putExtra(Intent.EXTRA_TITLE, clipLabel); + } + if (action.equals(Intent.ACTION_EDIT)) { + intent.putExtra(Intent.EXTRA_STREAM, uri); + } + } + + int permissionFlags = Intent.FLAG_GRANT_READ_URI_PERMISSION; + if (action.equals(Intent.ACTION_EDIT)) { + permissionFlags |= Intent.FLAG_GRANT_WRITE_URI_PERMISSION; + } + grantUriPermissions(intent, uri, permissionFlags); + + if (action.equals(Intent.ACTION_SEND)) { + Intent chooserIntent = Intent.createChooser(intent, null); + chooserIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + activity.startActivity(chooserIntent); + } else if (action.equals(Intent.ACTION_EDIT) || action.equals(Intent.ACTION_VIEW)) { + Intent chooserIntent = Intent.createChooser(intent, null); + chooserIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + if (action.equals(Intent.ACTION_EDIT)) { + chooserIntent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); + } + activity.startActivity(chooserIntent); + } else { + activity.startActivity(intent); + } + callback.success(uri.toString()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + + private void getAppInfo(CallbackContext callback) { + JSONObject res = new JSONObject(); + try { + PackageManager pm = activity.getPackageManager(); + PackageInfo pInfo = pm.getPackageInfo(context.getPackageName(), 0); + ApplicationInfo appInfo = context.getApplicationInfo(); + int isDebuggable = appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE; + + res.put("firstInstallTime", pInfo.firstInstallTime); + res.put("lastUpdateTime", pInfo.lastUpdateTime); + res.put("label", appInfo.loadLabel(pm).toString()); + res.put("packageName", pInfo.packageName); + res.put("versionName", pInfo.versionName); + res.put("versionCode", pInfo.getLongVersionCode()); + res.put("isDebuggable", isDebuggable); + + callback.success(res); + } catch (JSONException e) { + callback.error(e.getMessage()); + } catch (Exception e) { + callback.error(e.getMessage()); + } + } + + private void openInBrowser(String src, CallbackContext callback) { + Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(src)); + activity.startActivity(browserIntent); + } + + private void launchApp( + String appId, + String className, + String data, + CallbackContext callback + ) { + if (appId == null || appId.equals("")) { + callback.error("No package name provided."); + return; + } + + if (className == null || className.equals("")) { + callback.error("No activity class name provided."); + return; + } + + try { + Intent intent = new Intent(Intent.ACTION_MAIN); + intent.addCategory(Intent.CATEGORY_LAUNCHER); + intent.setPackage(appId); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + + if (data != null && !data.equals("")) { + intent.putExtra("acode_data", data); + } + + intent.setClassName(appId, className); + activity.startActivity(intent); + callback.success("Launched " + appId); + } catch (Exception e) { + callback.error(e.toString()); + return; + } + + + + } + + + private void addShortcut( + String id, + String label, + String description, + String iconSrc, + String action, + String data, + CallbackContext callback + ) { + try { + Intent intent; + ImageDecoder.Source imgSrc; + Bitmap bitmap; + IconCompat icon; + + imgSrc = ImageDecoder.createSource( + context.getContentResolver(), + Uri.parse(iconSrc) + ); + bitmap = ImageDecoder.decodeBitmap(imgSrc); + icon = IconCompat.createWithBitmap(bitmap); + intent = activity + .getPackageManager() + .getLaunchIntentForPackage(activity.getPackageName()); + intent.putExtra("action", action); + intent.putExtra("data", data); + + ShortcutInfoCompat shortcut = new ShortcutInfoCompat.Builder(context, id) + .setShortLabel(label) + .setLongLabel(description) + .setIcon(icon) + .setIntent(intent) + .build(); + + ShortcutManagerCompat.pushDynamicShortcut(context, shortcut); + callback.success(); + } catch (Exception e) { + callback.error(e.toString()); + } + } + + private void pinShortcut(String id, CallbackContext callback) { + ShortcutManager shortcutManager = context.getSystemService( + ShortcutManager.class + ); + + if (shortcutManager.isRequestPinShortcutSupported()) { + ShortcutInfo pinShortcutInfo = new ShortcutInfo.Builder( + context, + id + ).build(); + + Intent pinnedShortcutCallbackIntent = + shortcutManager.createShortcutResultIntent(pinShortcutInfo); + + PendingIntent successCallback = PendingIntent.getBroadcast( + context, + 0, + pinnedShortcutCallbackIntent, + PendingIntent.FLAG_IMMUTABLE + ); + + shortcutManager.requestPinShortcut( + pinShortcutInfo, + successCallback.getIntentSender() + ); + + callback.success(); + return; + } + + callback.error("Not supported"); + } + + private void removeShortcut(String id, CallbackContext callback) { + try { + List < String > list = new ArrayList < String > (); + list.add(id); + ShortcutManagerCompat.removeDynamicShortcuts(context, list); + callback.success(); + } catch (Exception e) { + callback.error(e.toString()); + } + } + + private void setUiTheme( + final String systemBarColor, + final JSONObject scheme, + final CallbackContext callback + ) { + this.systemBarColor = Color.parseColor(systemBarColor); + this.theme = new Theme(scheme); + + final Window window = activity.getWindow(); + // Method and constants not available on all SDKs but we want to be able to compile this code with any SDK + window.clearFlags(0x04000000); // SDK 19: WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); + window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); + try { + // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21 + + window + .getClass() + .getMethod("setNavigationBarColor", int.class) + .invoke(window, this.systemBarColor); + + window + .getClass() + .getMethod("setStatusBarColor", int.class) + .invoke(window, this.systemBarColor); + + window.getDecorView().setBackgroundColor(this.systemBarColor); + + if (Build.VERSION.SDK_INT < 30) { + setStatusBarStyle(window); + setNavigationBarStyle(window); + } else { + String themeType = theme.getType(); + WindowInsetsController controller = window.getInsetsController(); + int appearance = + WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS | + WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS; + + if (themeType.equals("light")) { + controller.setSystemBarsAppearance(appearance, appearance); + } else { + controller.setSystemBarsAppearance(0, appearance); + } + } + callback.success("OK"); + } catch (IllegalArgumentException error) { + callback.error(error.toString()); + } catch (Exception error) { + callback.error(error.toString()); + } + } + + private void setStatusBarStyle(final Window window) { + String themeType = theme.getType(); + View decorView = window.getDecorView(); + int uiOptions; + int lightStatusBar; + + if (SDK_INT <= 30) { + uiOptions = getDeprecatedSystemUiVisibility(decorView); + lightStatusBar = deprecatedFlagUiLightStatusBar(); + + if (themeType.equals("light")) { + setDeprecatedSystemUiVisibility(decorView, uiOptions | lightStatusBar); + return; + } + setDeprecatedSystemUiVisibility(decorView, uiOptions & ~lightStatusBar); + return; + } + + uiOptions = Objects.requireNonNull(decorView.getWindowInsetsController()).getSystemBarsAppearance(); + lightStatusBar = WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS; + + if (themeType.equals("light")) { + decorView.getWindowInsetsController().setSystemBarsAppearance(uiOptions | lightStatusBar, lightStatusBar); + return; + } + + decorView.getWindowInsetsController().setSystemBarsAppearance(uiOptions & ~lightStatusBar, lightStatusBar); + } + + private void setNavigationBarStyle(final Window window) { + String themeType = theme.getType(); + View decorView = window.getDecorView(); + int uiOptions; + + if (SDK_INT <= 30) { + uiOptions = getDeprecatedSystemUiVisibility(decorView); + // 0x80000000 FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS + // 0x00000010 SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR + + if (themeType.equals("light")) { + setDeprecatedSystemUiVisibility(decorView, uiOptions | 0x80000000 | 0x00000010); + return; + } + setDeprecatedSystemUiVisibility(decorView, uiOptions | (0x80000000 & ~0x00000010)); + return; + } + + uiOptions = Objects.requireNonNull(decorView.getWindowInsetsController()).getSystemBarsAppearance(); + int lightNavigationBar = WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS; + + if (themeType.equals("light")) { + decorView.getWindowInsetsController().setSystemBarsAppearance(uiOptions | lightNavigationBar, lightNavigationBar); + return; + } + + decorView.getWindowInsetsController().setSystemBarsAppearance(uiOptions & ~lightNavigationBar, lightNavigationBar); + } + + private int deprecatedFlagUiLightStatusBar() { + return View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; + } + + private int getDeprecatedSystemUiVisibility(View decorView) { + return decorView.getSystemUiVisibility(); + } + + private void setDeprecatedSystemUiVisibility(View decorView, int visibility) { + decorView.setSystemUiVisibility(visibility); + } + + private void getCordovaIntent(CallbackContext callback) { + Intent intent = activity.getIntent(); + callback.sendPluginResult( + new PluginResult(PluginResult.Status.OK, getIntentJson(intent)) + ); + } + + private void setIntentHandler(CallbackContext callback) { + intentHandler = callback; + PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT); + result.setKeepCallback(true); + callback.sendPluginResult(result); + } + + @Override + public void onNewIntent(Intent intent) { + if (intentHandler != null) { + PluginResult result = new PluginResult( + PluginResult.Status.OK, + getIntentJson(intent) + ); + result.setKeepCallback(true); + intentHandler.sendPluginResult(result); + } + } + + private JSONObject getIntentJson(Intent intent) { + JSONObject json = new JSONObject(); + try { + json.put("action", intent.getAction()); + json.put("data", intent.getDataString()); + json.put("type", intent.getType()); + json.put("package", intent.getPackage()); + json.put("extras", getExtrasJson(intent.getExtras())); + } catch (JSONException e) { + e.printStackTrace(); + } + return json; + } + + private JSONObject getExtrasJson(Bundle extras) { + JSONObject json = new JSONObject(); + if (extras != null) { + for (String key: extras.keySet()) { + try { + Object value = extras.get(key); + if (value instanceof String) { + json.put(key, (String) value); + } else if (value instanceof Integer) { + json.put(key, (Integer) value); + } else if (value instanceof Long) { + json.put(key, (Long) value); + } else if (value instanceof Double) { + json.put(key, (Double) value); + } else if (value instanceof Float) { + json.put(key, (Float) value); + } else if (value instanceof Boolean) { + json.put(key, (Boolean) value); + } else if (value instanceof Bundle) { + json.put(key, getExtrasJson((Bundle) value)); + } else { + json.put(key, value.toString()); + } + } catch (JSONException e) { + e.printStackTrace(); + } + } + } + return json; + } + + private Uri getContentProviderUri(String fileUri) { + return this.getContentProviderUri(fileUri, ""); + } + + private Uri getContentProviderUri(String fileUri, String filename) { + if (fileUri == null || fileUri.isEmpty()) { + return null; + } + + Uri uri = Uri.parse(fileUri); + if (uri == null) { + return null; + } + + if ("file".equalsIgnoreCase(uri.getScheme())) { + File originalFile = new File(uri.getPath()); + if (!originalFile.exists()) { + Log.e("System", "File does not exist for URI: " + fileUri); + return null; + } + + String authority = getFileProviderAuthority(); + if (authority == null) { + Log.e("System", "No FileProvider authority available."); + return null; + } + + try { + return FileProvider.getUriForFile(context, authority, originalFile); + } catch (IllegalArgumentException | SecurityException ex) { + try { + File cacheCopy = ensureShareableCopy(originalFile, filename); + return FileProvider.getUriForFile(context, authority, cacheCopy); + } catch (Exception copyError) { + Log.e("System", "Failed to expose file via FileProvider", copyError); + return null; + } + } + } + return uri; + } + + private File ensureShareableCopy(File source, String displayName) throws IOException { + File cacheRoot = new File(context.getCacheDir(), "shared"); + if (!cacheRoot.exists() && !cacheRoot.mkdirs()) { + throw new IOException("Unable to create shared cache directory"); + } + + if (displayName != null && !displayName.isEmpty()) { + displayName = new File(displayName).getName(); + } + if (displayName == null || displayName.isEmpty()) { + displayName = source.getName(); + } + if (displayName == null || displayName.isEmpty()) { + displayName = "shared-file"; + } + + File target = new File(cacheRoot, displayName); + target = ensureUniqueFile(target); + copyFile(source, target); + return target; + } + + private File ensureUniqueFile(File target) { + if (!target.exists()) { + return target; + } + + String name = target.getName(); + String prefix = name; + String suffix = ""; + int dotIndex = name.lastIndexOf('.'); + if (dotIndex > 0) { + prefix = name.substring(0, dotIndex); + suffix = name.substring(dotIndex); + } + + int index = 1; + File candidate = target; + while (candidate.exists()) { + candidate = new File(target.getParentFile(), prefix + "-" + index + suffix); + index++; + } + return candidate; + } + + private void copyFile(File source, File destination) throws IOException { + try ( + InputStream in = new FileInputStream(source); + OutputStream out = new FileOutputStream(destination) + ) { + byte[] buffer = new byte[8192]; + int length; + while ((length = in.read(buffer)) != -1) { + out.write(buffer, 0, length); + } + out.flush(); + } + } + + private void grantUriPermissions(Intent intent, Uri uri, int flags) { + if (uri == null) return; + PackageManager pm = context.getPackageManager(); + List resInfoList = pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); + for (ResolveInfo resolveInfo: resInfoList) { + String packageName = resolveInfo.activityInfo.packageName; + context.grantUriPermission(packageName, uri, flags); + } + } + + private String resolveMimeType(String currentMime, Uri uri, String filename) { + if (currentMime != null && !currentMime.isEmpty() && !currentMime.equals("*/*")) { + return currentMime; + } + + String mime = null; + if (uri != null) { + mime = context.getContentResolver().getType(uri); + } + + if ((mime == null || mime.isEmpty()) && filename != null) { + mime = getMimeTypeFromExtension(filename); + } + + if ((mime == null || mime.isEmpty()) && uri != null) { + String path = uri.getPath(); + if (path != null) { + mime = getMimeTypeFromExtension(path); + } + } + + return (mime != null && !mime.isEmpty()) ? mime : "*/*"; + } + + private String getFileProviderAuthority() { + if (fileProviderAuthority != null && !fileProviderAuthority.isEmpty()) { + return fileProviderAuthority; + } + + try { + PackageManager pm = context.getPackageManager(); + PackageInfo packageInfo = pm.getPackageInfo( + context.getPackageName(), + PackageManager.GET_PROVIDERS + ); + if (packageInfo.providers != null) { + for (ProviderInfo providerInfo: packageInfo.providers) { + if ( + providerInfo != null && + providerInfo.name != null && + providerInfo.name.equals(FileProvider.class.getName()) + ) { + fileProviderAuthority = providerInfo.authority; + break; + } + } + } + } catch (PackageManager.NameNotFoundException ignored) {} + + if (fileProviderAuthority == null || fileProviderAuthority.isEmpty()) { + fileProviderAuthority = context.getPackageName() + ".provider"; + } + + return fileProviderAuthority; + } + + private boolean isPackageInstalled( + String packageName, + PackageManager packageManager, + CallbackContext callback + ) { + try { + packageManager.getPackageInfo(packageName, 0); + return true; + } catch (PackageManager.NameNotFoundException e) { + return false; + } + } + + private void getGlobalSetting(String setting, CallbackContext callback) { + int value = (int) Global.getFloat( + context.getContentResolver(), + setting, -1 + ); + callback.success(value); + } + + private void clearCache(CallbackContext callback) { + webView.clearCache(true); + callback.success("Cache cleared"); + } + + private void setInputType(String type) { + int mode = -1; + if (type.equals("NO_SUGGESTIONS")) { + mode = 0; + } else if (type.equals("NO_SUGGESTIONS_AGGRESSIVE")) { + mode = 1; + } + webView.setInputType(mode); + } +} diff --git a/src/plugins/system/android/com/foxdebug/system/Ui.java b/src/plugins/system/android/com/foxdebug/system/Ui.java new file mode 100644 index 000000000..4cdf19c63 --- /dev/null +++ b/src/plugins/system/android/com/foxdebug/system/Ui.java @@ -0,0 +1,135 @@ +package com.foxdebug.system; + +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; +import android.graphics.Typeface; +import android.util.Log; +import android.util.TypedValue; +import org.json.JSONObject; + +public class Ui { + + public static class Icons { + + public static final String LOGO = "\uE922"; + public static final String TUNE = "\uE927"; + public static final String EXIT = "\uE902"; + public static final String REFRESH = "\uE91B"; + public static final String TERMINAL = "\uE923"; + public static final String NO_CACHE = "\uE901"; + public static final String MORE_VERT = "\uE91A"; + public static final String OPEN_IN_BROWSER = "\uE91f"; + + public static final String PHONE_APPLE = "\uE928"; + public static final String PHONE_ANDROID = "\uE90E"; + public static final String TABLET_ANDROID = "\uE90F"; + public static final String TABLET_APPLE = "\uE92A"; + public static final String DESKTOP = "\uE90A"; + public static final String DEVICES = "\uE907"; + public static final String LAPTOP = "\uE90D"; + public static final String TV = "\uE929"; + + private static Paint paint; + private static int size = 24; + private static int color = Color.parseColor("#FFFFFF"); + private static final String FONT_PATH = "font/icon.ttf"; + + public static Bitmap get( + Context context, + String code, + int size, + int color + ) { + if (paint == null) { + paint = new Paint(); + paint.setAntiAlias(true); + paint.setTypeface( + Typeface.createFromAsset(context.getAssets(), FONT_PATH) + ); + paint.setTextAlign(Paint.Align.CENTER); + } + + paint.setTextSize(size); + paint.setColor(color); + + float baseline = -paint.ascent(); + int width = (int) paint.measureText(code, 0, code.length()); + int height = (int) (baseline + paint.descent()); + Bitmap bitmap = Bitmap.createBitmap( + width, + height, + Bitmap.Config.ARGB_8888 + ); + Canvas canvas = new Canvas(bitmap); + + canvas.drawText(code, width / 2, baseline, paint); + return bitmap; + } + + public static Bitmap get( + Context context, + String code, + int size, + String color + ) { + int intColor = Color.parseColor(color); + return get(context, code, size, intColor); + } + + public static Bitmap get(Context context, String code) { + return get(context, code, size, color); + } + + public static Bitmap get(Context context, String code, String color) { + int intColor = Color.parseColor(color); + return get(context, code, size, intColor); + } + + public static Bitmap get(Context context, String code, int color) { + return get(context, code, size, color); + } + + public static void setSize(int size) { + Icons.size = size; + } + + public static void setColor(int color) { + Icons.color = color; + } + } + + public static class Theme { + + private JSONObject theme; + + public Theme(JSONObject theme) { + this.theme = theme; + } + + public int get(String color) { + return get(color, "#000000"); + } + + public int get(String color, String fallback) { + String hex = theme.optString(color, fallback); + return Color.parseColor(hex); + } + + public String getType() { + return theme.optString("type", "light"); + } + } + + public static int dpToPixels(Context context, int dipValue) { + int value = (int) TypedValue.applyDimension( + TypedValue.COMPLEX_UNIT_DIP, + (float) dipValue, + context.getResources().getDisplayMetrics() + ); + + return value; + } +} diff --git a/src/plugins/system/file_provider.xml b/src/plugins/system/file_provider.xml deleted file mode 100644 index 90b6dbe9c..000000000 --- a/src/plugins/system/file_provider.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/plugins/system/index.d.ts b/src/plugins/system/index.d.ts deleted file mode 100644 index 881ed0ed5..000000000 --- a/src/plugins/system/index.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -interface Info { - versionName: string; - packageName: string; - versionCode: number; -} - -interface AppInfo { - label: String; - packageName: String; - versionCode: Number; - versionName: String; - firstInstallTime: Number; - lastUpdateTime: Number; -} - -interface ShortCut { - id: String; - label: String; - description: String; - icon: String; - action: String; - data: String; -} - -interface System { - /** - * Get informartion about current webview - */ - getWebviewInfo( - onSuccess: (res: Info) => void, - onFail: (err: String) => void, - ): void; - /** - * Checks if power saving mode is on - * @param onSuccess - * @param onFail - */ - isPowerSaveMode( - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Shares file using Apps content provider - * @param fileUri File to share - * @param onSuccess - * @param onFail - */ - shareFile( - fileUri: String, - onSuccess: () => void, - onFail: (err: String) => void, - ): void; - /** - * Gets app infomartion - * @param onSuccess - * @param onFail - */ - getAppInfo( - onSuccess: (info: AppInfo) => void, - onFail: (err: String) => void, - ): void; - /** - * Add shortcut to app context menu - * @param shortCut - * @param onSuccess - * @param onFail - */ - addShortcut( - shortCut: ShortCut, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Removes shortcut - * @param id - * @param onSuccess - * @param onFail - */ - removeShortcut( - id: String, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Pins a shortcut - * @param id - * @param onSuccess - * @param onFail - */ - pinShortcut( - id: String, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Gets android version - * @param onSuccess - * @param onFail - */ - getAndroidVersion( - onSuccess: (res: Number) => void, - onFail: (err: String) => void, - ): void; - /** - * Open settings which lets user change app settings to manage all files - * @param onSuccess - * @param onFail - */ - manageAllFiles(onSuccess: () => void, onFail: (err: String) => void): void; - /** - * Opens settings to allow to grant the app permission manage all files on device - * @param onSuccess - * @param onFail - */ - isExternalStorageManager( - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Requests user to grant the provided permissions - * @param permissions constant value of the permision required @see https://developer.android.com/reference/android/Manifest.permission - * @param onSuccess - * @param onFail - */ - requestPermissions( - permissions: String[], - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Requests user to grant the provided permission - * @param permission constant value of the permision required @see https://developer.android.com/reference/android/Manifest.permission - * @param onSuccess - * @param onFail - */ - requestPermission( - permission: String, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Checks whether the app has provided permission - * @param permission constant value of the permision required @see https://developer.android.com/reference/android/Manifest.permission - * @param onSuccess - * @param onFail - */ - hasPermission( - permission: String, - onSuccess: (res: Boolean) => void, - onFail: (err: String) => void, - ): void; - /** - * Opens src in browser - * @param src - */ - openInBrowser(src: String): void; - /** - * Launches and app - * @param app - * @param action - * @param value - * @param onSuccess - * @param onfail - */ - launchApp( - app: String, - action: String, - value: String, - onSuccess: (arg: any) => void, - onfail: (arg: any) => void, - ): void; - - /** - * Opens a link within the app - * @param url Url to open - * @param title Title of the page - * @param showButtons Set to true to show buttons like console, open in browser, etc - */ - inAppBrowser(url: string, title: string, showButtons: boolean): void; - /** - * Sets the color of status bar and navigation bar - * @param theme Color of status bar and navigation bar - * @param type Type of theme foe e.g. light or dark - * @param onSuccess Callback on success - * @param onFail Callback on fail - */ - setUiTheme(theme: string, type: string, onSuccess:()=>void, onFail: (err: String)=>void): void; -} - -declare var system: System; diff --git a/src/plugins/system/plugin.xml b/src/plugins/system/plugin.xml index fb76ec332..2ddfb25a1 100644 --- a/src/plugins/system/plugin.xml +++ b/src/plugins/system/plugin.xml @@ -33,13 +33,13 @@ - - - - + + + + - + \ No newline at end of file diff --git a/src/plugins/system/readme.md b/src/plugins/system/readme.md index f64b04704..b0cca56d2 100644 --- a/src/plugins/system/readme.md +++ b/src/plugins/system/readme.md @@ -1,8 +1,8 @@ -# Utitly plugin for cordova apps. +# Util plugin for cordova apps Using this plugin, cordova apps can: -- Enable/disable fullscreen +- Enable/disable full screen - Share file - Get webview information - Send email diff --git a/plugins/cordova-plugin-system/file_provider.xml b/src/plugins/system/res/android/file_provider.xml similarity index 100% rename from plugins/cordova-plugin-system/file_provider.xml rename to src/plugins/system/res/android/file_provider.xml diff --git a/src/plugins/system/res/android/icon.ttf b/src/plugins/system/res/android/icon.ttf new file mode 100644 index 000000000..370e87edf Binary files /dev/null and b/src/plugins/system/res/android/icon.ttf differ diff --git a/src/plugins/system/src/android/com/foxdebug/system/Base64Icons.java b/src/plugins/system/src/android/com/foxdebug/system/Base64Icons.java deleted file mode 100644 index 94ee2a4ac..000000000 --- a/src/plugins/system/src/android/com/foxdebug/system/Base64Icons.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.foxdebug.system; - -public class Base64Icons { - - static final String BROWSER = - "iVBORw0KGgoAAAANSUhEUgAAABsAAAAbAQMAAAC3GmYWAAAABlBMVEX///////9VfPVsAAAAAnRSTlMT4y5/P2gAAABUSURBVAjXY2BAADkQUX+AgYHx/wcGBubfPxgY2A3nMDDwFZ5jYOApPM7AIP//P5SwePC4AUIYgFkJD6FchBIZkA6wXrApYPPAJjP8fwAk5JFsZgAA+wQmU/03zRYAAAAASUVORK5CYII="; - static final String BROWSER_DARK = - "iVBORw0KGgoAAAANSUhEUgAAABsAAAAbAQMAAAC3GmYWAAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlPdDqW9W20AAABSSURBVAjXY/j///8DBgjxEEQwyD9g+MfA/4DhBws7kDiX/IDhY1/hA4bHfRYPGB4wMECJ4/IyCSiEHJSFUALWAdYLNuUHCzPUZLAd/x/A7QUSADsQQTqX/buZAAAAAElFTkSuQmCC"; - static final String CONSOLE = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAVYDMRO4Nb7cy2o1YrudXAAAAfElEQVQY02NgQAZsjoJQIJLAkHUGDpYx1CA4xxl0EJxDaJwlLlDgBeQYwMxlBnHSyxMQHPYzZggOQ83hBAQHKgXhMNScQOJMPYXgcMZEIjhTj05g3727AMwBSXCdORMA5mR0TGDg7uhoYMZwDhKn5mgoFMQcR/U2SoAgAwCAL1lFSHzHNAAAAABJRU5ErkJggg=="; - static final String CONSOLE_DARK = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAATlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADEoqZZAAAAGXRSTlMAVYDM7kQyC9m7dWgPiEjFcKn05eC6uJ8Wj0P+nQAAAHtJREFUKM990t0OwiAMhuG6IXQtTuf/d/83KiHGJrbsPeQBTloaV9aDay1ElRHElRRhSlMM0x7w0cUdZnLNX3iLSImALsC5BGDigLSLh/7mGUK+4h5BTkj5H+xcTi35gd1ntG4GdVse/Z/X0toMXLugQHIBOhztcBmGfQA6KhNn3QJcawAAAABJRU5ErkJggg=="; - static final String DESKTOP = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMAd5argMxDJRVl4XjMnU8AAABbSURBVBjTY2BABuwTBaFAsoChejccbGeQXmwMBVYbGbwVYBqYtgw2zuyloVAQtZOhC+GFFQwMaWlpmbt3TwNSENUcu3c3wH1uvHu3cQGMA9IA43CAgqOBAQ0AAIO4Nctfo3mWAAAAAElFTkSuQmCC"; - static final String DESKTOP_DARK = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAP1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACzJYIvAAAAFHRSTlMAd5aAqsxEFW0lIPTq3dyyVTwvCWCOBRgAAABiSURBVCjP7cxZDoAgDEXRomgRlfHtf62CQ2Io7sDz1fQmj74tRgnGlv+KjnUhBacFB0UjBhIGjH+QwWCbhA2GeEfHzkQ5zqeAIlx3zK9droGpZbWvwWvbhPSspyawujVj0gEMrgn4/pb/5QAAAABJRU5ErkJggg=="; - static final String OPEN_IN_APP = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAM4HhDiVIV2+dCalj4jEMAAAAe0lEQVQY02NgQAGBglAgysDAeQYOJjDkIDjHGHQQnENonMPGUGAD5ByBGeuDjcMagMQJNkVwWG0OB8A5wWfOmMI4rDZnzgClIBwOpT2nlRrgBuQcQzKNCM7x8nKHnGMs5eU1h8CeC8g5xgr2HCeCMwEcIAscRbjAAYIMACsNY9BBwawqAAAAAElFTkSuQmCC"; - static final String OPEN_IN_APP_DARK = - "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAPFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQLyYwAAAAE3RSTlMAgDMO3kfnVSomiE0bnqlvXgmbO8RSQQAAAHlJREFUKM+10ksOgCAMRdEn9QMo/rr/vYqhkQQqceKdQHoGDCgaLaZqQSywUgBmVpvR6dA1oa8SIBTRV3BOBzeOtgCZM4tkkLlIBpknKWDzfmVevd/qxwfmIR7/wD7FKAHd9z3C81E2gX0+CkGDMy/DATKGcMgyvHcBbpYR4uDLR8oAAAAASUVORK5CYII="; -} diff --git a/src/plugins/system/src/android/com/foxdebug/system/BrowserDialog.java b/src/plugins/system/src/android/com/foxdebug/system/BrowserDialog.java deleted file mode 100644 index 194eb8a05..000000000 --- a/src/plugins/system/src/android/com/foxdebug/system/BrowserDialog.java +++ /dev/null @@ -1,603 +0,0 @@ -package com.foxdebug.system; - -import android.app.Activity; -import android.app.Dialog; -import android.content.Context; -import android.content.Intent; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.drawable.GradientDrawable; -import android.net.Uri; -import android.os.Build; -import android.text.TextUtils.TruncateAt; -import android.util.Base64; -import android.util.Log; -import android.util.TypedValue; -import android.view.Gravity; -import android.view.KeyEvent; -import android.view.View; -import android.view.ViewGroup; -import android.view.ViewGroup.LayoutParams; -import android.view.Window; -import android.view.WindowManager; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.InputMethodManager; -import android.webkit.ValueCallback; -import android.webkit.WebChromeClient; -import android.webkit.WebSettings; -import android.webkit.WebView; -import android.webkit.WebViewClient; -import android.widget.EditText; -import android.widget.FrameLayout; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.ProgressBar; -import android.widget.TextView; -import com.foxdebug.system.Base64Icons; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaPlugin; - -public class BrowserDialog extends Dialog { - - public int FILE_SELECT_CODE = 1; - public ValueCallback webViewFilePathCallback; - private CallbackContext callbackContext; - private CordovaPlugin plugin; - private Context context; - private WebView webView; - private TextView titleText; - private ImageButton icon; - private boolean desktopMode = false; - private boolean consoleEnabled = false; - private boolean showButtons = true; - private String url = ""; - private String title = "Browser"; - private String themeType = "light"; - private int backgroundColor = 0xFF000000; - private int textColor = 0xFFFFFFFF; - private Bitmap browserIcon; - private TextView urlText; - private int padding = 5; - private int titleHeight = 45; - private int titleTextHeight = 35; - private int fontSize = 5; - private int imageSize = 35; - - public BrowserDialog( - CordovaPlugin plugin, - int bgColor, - String type, - boolean showButtons, - CallbackContext callbackContext - ) { - super(plugin.cordova.getContext(), android.R.style.Theme_NoTitleBar); - this.callbackContext = callbackContext; - this.plugin = plugin; - this.context = plugin.cordova.getContext(); - this.showButtons = showButtons; - this.padding = this.dpToPixels(this.padding); - this.titleHeight = this.dpToPixels(this.titleHeight); - this.imageSize = this.dpToPixels(this.imageSize); - this.titleTextHeight = this.dpToPixels(this.titleTextHeight); - this.fontSize = this.dpToPixels(this.fontSize); - - Log.d("BrowserDialog", "fontSize: 5dp = " + this.fontSize + "px"); - - this.requestWindowFeature(Window.FEATURE_NO_TITLE); - this.setCancelable(true); - this.setTheme(bgColor, type); - this.init(); - } - - public void onBackPressed() { - if (consoleEnabled) { - consoleEnabled = false; - webView.loadUrl( - "javascript:document.dispatchEvent(new CustomEvent('hideconsole'))" - ); - return; - } - - if (webView.canGoBack()) { - icon.setImageBitmap(browserIcon); - webView.goBack(); - url = webView.getOriginalUrl(); - } else { - dismiss(); - } - } - - public void init() { - browserIcon = - convertBase64ToBitmap( - themeType.equals("light") - ? Base64Icons.BROWSER_DARK - : Base64Icons.BROWSER - ); - - //main - LinearLayout main = new LinearLayout(context); - main.setOrientation(LinearLayout.VERTICAL); - main.setFocusable(true); - main.setFocusableInTouchMode(true); - - //title - LinearLayout titleLayout = new LinearLayout(context); - titleLayout.setOrientation(LinearLayout.HORIZONTAL); - titleLayout.setBackgroundColor(backgroundColor); - titleLayout.setLayoutParams( - new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, this.titleHeight) - ); - titleLayout.setHorizontalGravity(Gravity.LEFT); - titleLayout.setVerticalGravity(Gravity.TOP); - - //stack progressbar on top of icon - //progress bar - ProgressBar progressBar = new ProgressBar( - context, - null, - android.R.attr.progressBarStyle - ); - progressBar.setLayoutParams( - new LinearLayout.LayoutParams(this.imageSize, this.imageSize, 0) - ); - - //icon - icon = createIcon(browserIcon, "Favicon"); - icon.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - //refresh webview - webView.reload(); - } - } - ); - - //stack progressbar on top of icon - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( - LayoutParams.WRAP_CONTENT, - LayoutParams.WRAP_CONTENT - ); - FrameLayout frame = new FrameLayout(context); - params.gravity = Gravity.CENTER_VERTICAL; - frame.setLayoutParams(params); - frame.addView(icon); - frame.addView(progressBar); - - //title text - if (showButtons) { - titleText = createEditText(title); - } else { - titleText = createTextView(title); - } - - //toggle console icon - ImageButton toggleConsoleButton = createIcon( - themeType.equals("light") - ? Base64Icons.CONSOLE_DARK - : Base64Icons.CONSOLE, - "toggle console" - ); - toggleConsoleButton.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - consoleEnabled = !consoleEnabled; - String event = consoleEnabled ? "show" : "hide"; - webView.loadUrl( - "javascript:document.dispatchEvent(new CustomEvent('" + - event + - "console'))" - ); - setActive(toggleConsoleButton, consoleEnabled); - } - } - ); - - //toggle desktopmode icon - ImageButton toggleDesktopModeButton = createIcon( - themeType.equals("light") - ? Base64Icons.DESKTOP_DARK - : Base64Icons.DESKTOP, - "toggle desktop mode" - ); - toggleDesktopModeButton.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - desktopMode = !desktopMode; - setDesktopMode(desktopMode); - setActive(toggleDesktopModeButton, desktopMode); - } - } - ); - - //open in browser icon - ImageButton openInBrowserButton = createIcon( - themeType.equals("light") - ? Base64Icons.OPEN_IN_APP_DARK - : Base64Icons.OPEN_IN_APP, - "open in browser" - ); - openInBrowserButton.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - dismiss(); - Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); - context.startActivity(browserIntent); - if (callbackContext != null) { - callbackContext.success("onOpenExternalBrowser: " + url); - } - } - } - ); - - titleLayout.addView(frame); - titleLayout.addView(titleText); - if (showButtons) { - titleLayout.addView(toggleDesktopModeButton); - titleLayout.addView(openInBrowserButton); - } - - //webview - webView = new WebView(context); - webView.setFocusable(true); - webView.setFocusableInTouchMode(true); - webView.setLayoutParams( - new LinearLayout.LayoutParams( - LayoutParams.MATCH_PARENT, - LayoutParams.MATCH_PARENT - ) - ); - - webView.setWebChromeClient( - new WebChromeClient() { - @Override - public void onReceivedTitle(WebView view, String title) { - super.onReceivedTitle(view, title); - setTitle(title); - } - - @Override - public void onReceivedIcon(WebView view, Bitmap favicon) { - super.onReceivedIcon(view, favicon); - icon.setImageBitmap(favicon); - } - - public boolean onShowFileChooser( - WebView webView, - ValueCallback filePathCallback, - WebChromeClient.FileChooserParams fileChooserParams - ) { - if (webViewFilePathCallback != null) { - webViewFilePathCallback.onReceiveValue(null); - } - - Intent selectDocument = new Intent(Intent.ACTION_GET_CONTENT); - Boolean isMultiple = - ( - fileChooserParams.getMode() == - WebChromeClient.FileChooserParams.MODE_OPEN_MULTIPLE - ); - - webViewFilePathCallback = filePathCallback; - selectDocument.addCategory(Intent.CATEGORY_OPENABLE); - selectDocument.setType("*/*"); - - if (isMultiple) { - selectDocument.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); - } - - plugin.cordova.startActivityForResult( - plugin, - Intent.createChooser(selectDocument, "Select File"), - FILE_SELECT_CODE - ); - - return true; - } - } - ); - - webView.setWebViewClient( - new WebViewClient() { - @Override - public boolean shouldOverrideUrlLoading(WebView view, String url) { - setUrl(url); - icon.setImageBitmap(browserIcon); - // show progress bar - progressBar.setVisibility(View.VISIBLE); - return false; - } - - @Override - public void onPageStarted(WebView view, String url, Bitmap favicon) { - super.onPageStarted(view, url, favicon); - // show progress bar - progressBar.setVisibility(View.VISIBLE); - } - - @Override - public void onPageFinished(WebView view, String url) { - super.onPageFinished(view, url); - // hide progress bar - progressBar.setVisibility(View.GONE); - } - - @Override - public void onLoadResource(WebView view, String url) { - if (!showButtons) return; - setDesktopMode(desktopMode); - webView.evaluateJavascript( - "sessionStorage.getItem('__console_available')", - new ValueCallback() { - @Override - public void onReceiveValue(String value) { - titleLayout.post( - new Runnable() { - @Override - public void run() { - if (!value.equals("null")) { - if ( - toggleConsoleButton.getParent() == null - ) titleLayout.addView(toggleConsoleButton); - return; - } - - titleLayout.removeView(toggleConsoleButton); - } - } - ); - } - } - ); - } - } - ); - - WebSettings settings = webView.getSettings(); - - settings.setJavaScriptEnabled(true); - settings.setDomStorageEnabled(true); - settings.setAllowContentAccess(true); - settings.setDisplayZoomControls(false); - - main.addView(titleLayout); - main.addView(webView); - setContentView(main); - } - - private TextView createTextView(String text) { - TextView textView = new TextView(context); - setTextViewProperties(textView, this.titleHeight); - textView.setText(text); - return textView; - } - - private EditText createEditText(String text) { - EditText editText = new EditText(context); - GradientDrawable background = new GradientDrawable(); - - int radius = this.titleTextHeight / 2; - background.setCornerRadius(radius); - background.setColor(themeType.equals("light") ? 0x11000000 : 0x11ffffff); - editText.setBackground(background); - - setTextViewProperties(editText, this.titleTextHeight); - editText.setText(text); - editText.setPadding(radius, 0, radius, 0); - editText.setTextSize(this.fontSize < 10 ? 10 : this.fontSize); - editText.setInputType(android.text.InputType.TYPE_TEXT_VARIATION_URI); - editText.setImeOptions(EditorInfo.IME_ACTION_GO); - - editText.setOnFocusChangeListener( - new View.OnFocusChangeListener() { - @Override - public void onFocusChange(View v, boolean hasFocus) { - if (hasFocus) { - titleText.setText(url); - } else { - titleText.setText(title); - } - } - } - ); - - editText.setOnEditorActionListener( - new EditText.OnEditorActionListener() { - @Override - public boolean onEditorAction( - TextView v, - int actionId, - android.view.KeyEvent event - ) { - if ( - actionId == EditorInfo.IME_ACTION_GO || - event.getKeyCode() == KeyEvent.KEYCODE_ENTER - ) { - String url = v.getText().toString(); - if (url.startsWith("http://") || url.startsWith("https://")) { - title = url; - setUrl(url); - editText.clearFocus(); - InputMethodManager imm = (InputMethodManager) getContext() - .getSystemService(Context.INPUT_METHOD_SERVICE); - imm.hideSoftInputFromWindow(editText.getWindowToken(), 0); - return true; - } - } - return false; - } - } - ); - - return editText; - } - - private TextView setTextViewProperties(TextView textView, int height) { - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( - LayoutParams.FILL_PARENT, - height, - 1 - ); - params.gravity = Gravity.CENTER_VERTICAL; - textView.setMaxLines(1); - textView.setEllipsize(TruncateAt.END); - textView.setSingleLine(true); - textView.setHorizontallyScrolling(true); - textView.setTextColor(textColor); - textView.setLayoutParams(params); - textView.setGravity(Gravity.CENTER_VERTICAL); - return textView; - } - - private void setTheme(int bgColor, String type) { - try { - if (type != null) themeType = type; - textColor = type.equals("light") ? 0xFF000000 : 0xFFFFFFFF; - backgroundColor = bgColor; - - if (Build.VERSION.SDK_INT >= 21) { - final Window window = getWindow(); - // Method and constants not available on all SDKs but we want to be able to compile this code with any SDK - window.clearFlags(0x04000000); // SDK 19: WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); - window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - try { - // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21 - - window - .getClass() - .getMethod("setNavigationBarColor", int.class) - .invoke(window, backgroundColor); - - window - .getClass() - .getMethod("setStatusBarColor", int.class) - .invoke(window, backgroundColor); - - setStatusBarStyle(window); - setNavigationBarStyle(window); - } catch (IllegalArgumentException ignore) {} catch (Exception ignore) {} - } - } catch (Exception e) {} - } - - private void setStatusBarStyle(final Window window) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - View decorView = window.getDecorView(); - int uiOptions = decorView.getSystemUiVisibility(); - - if (themeType.equals("light")) { - decorView.setSystemUiVisibility( - uiOptions | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR - ); - return; - } - } - } - - private void setNavigationBarStyle(final Window window) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - View decorView = window.getDecorView(); - int uiOptions = decorView.getSystemUiVisibility(); - - // 0x80000000 FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS - // 0x00000010 SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR - - if (themeType.equals("light")) { - decorView.setSystemUiVisibility(uiOptions | 0x80000000 | 0x00000010); - return; - } - } - } - - private void setDesktopMode(boolean enabled) { - final WebSettings webSettings = webView.getSettings(); - - webView.loadUrl( - "javascript:!function(e){var t,n,o;window.innerWidth>=window.innerHeight||(t=1024/innerWidth,(n=document.querySelector(\"meta[name=viewport]\"))||((n=document.createElement(\"meta\")).name=\"viewport\",document.head.appenChild(n)),e?(o=window.innerHeight*t,sessionStorage.setItem(\"__old_viewport_content\",n.content),n.content=\"width=1024, height=\"+o):(o=sessionStorage.__old_viewport_content)&&(n.content=o))}(" + - desktopMode + - ");" - ); - - webSettings.setUseWideViewPort(enabled); - webSettings.setLoadWithOverviewMode(enabled); - webSettings.setSupportZoom(enabled); - webSettings.setBuiltInZoomControls(enabled); - } - - public void setUrl(String url) { - this.url = url; - setTitle(url); - webView.loadUrl(url); - } - - public void setTitle(String title) { - this.title = title; - titleText.setText(title); - } - - @Override - public void dismiss() { - super.dismiss(); - if (webView != null) webView.destroy(); - } - - public void show(String url, String title) { - setUrl(url); - setTitle(title); - super.show(); - } - - private ImageButton createIcon(String icon, String contentDescription) { - return createIcon(convertBase64ToBitmap(icon), contentDescription); - } - - private ImageButton createIcon(Bitmap icon, String contentDescription) { - ImageButton button = new ImageButton(context); - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( - this.imageSize, - this.imageSize, - 0 - ); - params.gravity = Gravity.CENTER_VERTICAL; - params.setMargins(0, 0, this.dpToPixels(2), 0); - button.setBackgroundDrawable(null); - button.setImageBitmap(icon); - button.setContentDescription(contentDescription); - button.setLayoutParams(params); - button.setScaleType(ImageView.ScaleType.FIT_CENTER); - return button; - } - - private Bitmap convertBase64ToBitmap(String icon) { - byte[] decodedIcon = Base64.decode(icon, Base64.DEFAULT); - Bitmap bitmap = BitmapFactory.decodeByteArray( - decodedIcon, - 0, - decodedIcon.length - ); - return bitmap; - } - - private void setActive(View view, boolean active) { - GradientDrawable border = new GradientDrawable(); - border.setCornerRadius(8); - border.setColor(0x00FFFFFF); //white background - border.setStroke(4, 0xFF3399ff); //black border with full opacity - view.setBackground(active ? border : null); - } - - private int dpToPixels(int dipValue) { - int value = (int) TypedValue.applyDimension( - TypedValue.COMPLEX_UNIT_DIP, - (float) dipValue, - this.context.getResources().getDisplayMetrics() - ); - - return value; - } -} diff --git a/src/plugins/system/src/android/com/foxdebug/system/System.java b/src/plugins/system/src/android/com/foxdebug/system/System.java deleted file mode 100644 index 111b7363f..000000000 --- a/src/plugins/system/src/android/com/foxdebug/system/System.java +++ /dev/null @@ -1,737 +0,0 @@ -package com.foxdebug.system; - -import android.app.Activity; -import android.app.PendingIntent; -import android.content.ClipData; -import android.content.Context; -import android.content.Intent; -import android.content.pm.ApplicationInfo; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.content.pm.ShortcutInfo; -import android.content.pm.ShortcutManager; -import android.graphics.Bitmap; -import android.graphics.Color; -import android.graphics.ImageDecoder; -import android.net.Uri; -import android.os.Build; -import android.os.Bundle; -import android.os.Environment; -import android.os.PowerManager; -import android.text.InputType; -import android.view.View; -import android.view.Window; -import android.webkit.WebView; -import androidx.core.content.FileProvider; -import androidx.core.content.pm.ShortcutInfoCompat; -import androidx.core.content.pm.ShortcutManagerCompat; -import androidx.core.graphics.drawable.IconCompat; -import com.foxdebug.system.BrowserDialog; -import java.io.File; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; -import org.apache.cordova.CallbackContext; -import org.apache.cordova.CordovaInterface; -import org.apache.cordova.CordovaPlugin; -import org.apache.cordova.CordovaWebView; -import org.apache.cordova.PluginResult; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -public class System extends CordovaPlugin { - - // private WebviewActivity webviewActivity; - private BrowserDialog browserDialog; - private CallbackContext requestPermissionCallback; - private Activity activity; - private Context context; - private int REQ_PERMISSIONS = 1; - private int REQ_PERMISSION = 2; - private int themeColor = 0xFF000000; - private String themeType = "dark"; - private CallbackContext intentHandler; - private CordovaWebView webView; - - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - this.context = cordova.getContext(); - this.activity = cordova.getActivity(); - this.webView = webView; - } - - public boolean execute( - String action, - final JSONArray args, - final CallbackContext callbackContext - ) - throws JSONException { - final String arg1 = getString(args, 0); - final String arg2 = getString(args, 1); - final String arg3 = getString(args, 2); - final String arg4 = getString(args, 3); - final String arg5 = getString(args, 4); - final String arg6 = getString(args, 5); - - switch (action) { - case "get-webkit-info": - case "share-file": - case "is-powersave-mode": - case "get-app-info": - case "add-shortcut": - case "remove-shortcut": - case "pin-shortcut": - case "get-android-version": - case "request-permissions": - case "request-permission": - case "has-permission": - case "open-in-browser": - case "launch-app": - break; - case "set-input-type": - setInputType(arg1); - callbackContext.success(); - return true; - case "set-intent-handler": - setIntentHandler(callbackContext); - return true; - case "set-ui-theme": - this.cordova.getActivity() - .runOnUiThread( - new Runnable() { - public void run() { - setUiTheme(arg1, arg2, callbackContext); - } - } - ); - return true; - case "in-app-browser": - this.cordova.getActivity() - .runOnUiThread( - new Runnable() { - public void run() { - inAppBrowser(arg1, arg2, getBoolean(args, 2), callbackContext); - } - } - ); - return true; - default: - return false; - } - - cordova - .getThreadPool() - .execute( - new Runnable() { - public void run() { - switch (action) { - case "get-webkit-info": - getWebkitInfo(callbackContext); - break; - case "share-file": - shareFile(arg1, arg2, callbackContext); - break; - case "is-powersave-mode": - isPowerSaveMode(callbackContext); - break; - case "get-app-info": - getAppInfo(callbackContext); - break; - case "add-shortcut": - addShortcut( - arg1, - arg2, - arg3, - arg4, - arg5, - arg6, - callbackContext - ); - break; - case "remove-shortcut": - removeShortcut(arg1, callbackContext); - break; - case "pin-shortcut": - pinShortcut(arg1, callbackContext); - break; - case "get-android-version": - getAndroidVersion(callbackContext); - break; - case "request-permissions": - requestPermissions(getJSONArray(args, 0), callbackContext); - break; - case "request-permission": - requestPermission(arg1, callbackContext); - break; - case "has-permission": - hasPermission(arg1, callbackContext); - break; - case "open-in-browser": - openInBrowser(arg1, callbackContext); - break; - case "launch-app": - launchApp(arg1, arg2, arg3, callbackContext); - break; - default: - break; - } - } - } - ); - - return true; - } - - private void requestPermissions(JSONArray arr, CallbackContext callback) { - try { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { - int[] res = new int[arr.length()]; - for (int i = 0; i < res.length; ++i) { - res[i] = 1; - } - callback.success(1); - return; - } - - String[] permissions = checkPermissions(arr); - - if (permissions.length > 0) { - requestPermissionCallback = callback; - cordova.requestPermissions(this, REQ_PERMISSIONS, permissions); - return; - } - callback.success(new JSONArray()); - } catch (Exception e) { - callback.error(e.toString()); - } - } - - private void requestPermission(String permission, CallbackContext callback) { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { - callback.success(1); - return; - } - - if (permission != null || !permission.equals("")) { - if (!cordova.hasPermission(permission)) { - requestPermissionCallback = callback; - cordova.requestPermission(this, REQ_PERMISSION, permission); - return; - } - - callback.success(1); - } - - callback.error("No permission passed to request."); - } - - private void hasPermission(String permission, CallbackContext callback) { - if (permission != null || !permission.equals("")) { - int res = 0; - if (cordova.hasPermission(permission)) { - res = 1; - } - - callback.success(res); - return; - } - callback.error("No permission passed to check."); - } - - public void onRequestPermissionResult( - int code, - String[] permissions, - int[] resCodes - ) { - if (requestPermissionCallback == null) return; - - if (code == REQ_PERMISSIONS) { - JSONArray resAr = new JSONArray(); - for (int res : resCodes) { - if (res == PackageManager.PERMISSION_DENIED) { - resAr.put(0); - } - resAr.put(1); - } - - requestPermissionCallback.success(resAr); - requestPermissionCallback = null; - return; - } - - if ( - resCodes.length >= 1 && resCodes[0] == PackageManager.PERMISSION_DENIED - ) { - requestPermissionCallback.success(0); - requestPermissionCallback = null; - return; - } - requestPermissionCallback.success(1); - requestPermissionCallback = null; - return; - } - - private String[] checkPermissions(JSONArray arr) throws Exception { - List list = new ArrayList(); - for (int i = 0; i < arr.length(); i++) { - try { - String permission = arr.getString(i); - if (permission != null || !permission.equals("")) { - throw new Exception("Permission cannot be null or empty"); - } - if (!cordova.hasPermission(permission)) { - list.add(permission); - } - } catch (JSONException e) {} - } - - String[] res = new String[list.size()]; - return list.toArray(res); - } - - private void getAndroidVersion(CallbackContext callback) { - callback.success(Build.VERSION.SDK_INT); - } - - private void getWebkitInfo(CallbackContext callback) { - PackageInfo info = null; - JSONObject res = new JSONObject(); - - try { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - info = WebView.getCurrentWebViewPackage(); - } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - Class webViewFactory = Class.forName("android.webkit.WebViewFactory"); - Method method = webViewFactory.getMethod("getLoadedPackageInfo"); - info = (PackageInfo) method.invoke(null); - } else { - PackageManager packageManager = activity.getPackageManager(); - - try { - info = packageManager.getPackageInfo("com.google.android.webview", 0); - } catch (PackageManager.NameNotFoundException e) { - callback.error("Package not found"); - } - - return; - } - - res.put("packageName", info.packageName); - res.put("versionName", info.versionName); - res.put("versionCode", info.versionCode); - - callback.success(res); - } catch ( - JSONException - | InvocationTargetException - | ClassNotFoundException - | NoSuchMethodException - | IllegalAccessException e - ) { - callback.error( - "Cannot determine current WebView engine. (" + e.getMessage() + ")" - ); - - return; - } - } - - private void isPowerSaveMode(CallbackContext callback) { - PowerManager powerManager = (PowerManager) context.getSystemService( - Context.POWER_SERVICE - ); - boolean powerSaveMode = powerManager.isPowerSaveMode(); - - callback.success(powerSaveMode ? 1 : 0); - } - - private void shareFile( - String fileURI, - String filename, - CallbackContext callback - ) { - Activity activity = this.activity; - Context context = this.context; - Uri uri = this.getContentProviderUri(fileURI); - try { - Intent intent = new Intent(Intent.ACTION_SEND); - intent.putExtra(Intent.EXTRA_STREAM, uri); - if (!filename.equals("")) intent.putExtra(Intent.EXTRA_TEXT, filename); - intent.setType("application/octet-stream"); - activity.startActivity(intent); - callback.success(uri.toString()); - } catch (Exception e) { - callback.error(e.getMessage()); - } - } - - private void getAppInfo(CallbackContext callback) { - JSONObject res = new JSONObject(); - try { - PackageManager pm = activity.getPackageManager(); - PackageInfo pInfo = pm.getPackageInfo(context.getPackageName(), 0); - ApplicationInfo appInfo = context.getApplicationInfo(); - - res.put("firstInstallTime", pInfo.firstInstallTime); - res.put("lastUpdateTime", pInfo.lastUpdateTime); - res.put("label", appInfo.loadLabel(pm).toString()); - res.put("packageName", pInfo.packageName); - res.put("versionName", pInfo.versionName); - res.put("versionCode", pInfo.getLongVersionCode()); - - callback.success(res); - } catch (JSONException e) { - callback.error(e.getMessage()); - } catch (Exception e) { - callback.error(e.getMessage()); - } - } - - private void openInBrowser(String src, CallbackContext callback) { - Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(src)); - activity.startActivity(browserIntent); - } - - private void launchApp( - String appId, - String action, - String value, - CallbackContext callback - ) { - Intent intent = context - .getPackageManager() - .getLaunchIntentForPackage(appId); - if (intent == null) { - callback.error("App not found"); - return; - } - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - context.startActivity(intent); - callback.success("Launched " + appId); - } - - private void inAppBrowser( - String url, - String title, - boolean showButtons, - CallbackContext callback - ) { - BrowserDialog browserDialog = new BrowserDialog( - this, - themeColor, - themeType, - showButtons, - callback - ); - browserDialog.show(url, title); - this.browserDialog = browserDialog; - } - - public void onActivityResult(int requestCode, int resultCode, Intent intent) { - if ( - requestCode != browserDialog.FILE_SELECT_CODE || - browserDialog.webViewFilePathCallback == null - ) { - super.onActivityResult(requestCode, resultCode, intent); - return; - } - ArrayList uris = new ArrayList(); - ClipData clipData = intent.getClipData(); - if (clipData != null) { - for (int i = 0; i < clipData.getItemCount(); i++) { - ClipData.Item item = clipData.getItemAt(i); - Uri uri = item.getUri(); - uris.add(uri); - } - } else { - Uri uri = intent.getData(); - uris.add(uri); - } - - browserDialog.webViewFilePathCallback.onReceiveValue( - uris.toArray(new Uri[uris.size()]) - ); - browserDialog.webViewFilePathCallback = null; - } - - private void addShortcut( - String id, - String label, - String description, - String iconSrc, - String action, - String data, - CallbackContext callback - ) { - try { - Intent intent; - ImageDecoder.Source imgSrc; - Bitmap bitmap; - IconCompat icon; - - imgSrc = - ImageDecoder.createSource( - context.getContentResolver(), - Uri.parse(iconSrc) - ); - bitmap = ImageDecoder.decodeBitmap(imgSrc); - icon = IconCompat.createWithBitmap(bitmap); - intent = - activity - .getPackageManager() - .getLaunchIntentForPackage(activity.getPackageName()); - intent.putExtra("action", action); - intent.putExtra("data", data); - - ShortcutInfoCompat shortcut = new ShortcutInfoCompat.Builder(context, id) - .setShortLabel(label) - .setLongLabel(description) - .setIcon(icon) - .setIntent(intent) - .build(); - - ShortcutManagerCompat.pushDynamicShortcut(context, shortcut); - callback.success(); - } catch (Exception e) { - callback.error(e.toString()); - } - } - - private void pinShortcut(String id, CallbackContext callback) { - ShortcutManager shortcutManager = context.getSystemService( - ShortcutManager.class - ); - - if (shortcutManager.isRequestPinShortcutSupported()) { - ShortcutInfo pinShortcutInfo = new ShortcutInfo.Builder(context, id) - .build(); - - Intent pinnedShortcutCallbackIntent = shortcutManager.createShortcutResultIntent( - pinShortcutInfo - ); - - PendingIntent successCallback = PendingIntent.getBroadcast( - context, - 0, - pinnedShortcutCallbackIntent, - 0 - ); - - shortcutManager.requestPinShortcut( - pinShortcutInfo, - successCallback.getIntentSender() - ); - - callback.success(); - } - - callback.error("Not suppported"); - } - - private void removeShortcut(String id, CallbackContext callback) { - try { - List list = new ArrayList(); - list.add(id); - ShortcutManagerCompat.removeDynamicShortcuts(context, list); - callback.success(); - } catch (Exception e) { - callback.error(e.toString()); - } - } - - private void setUiTheme( - final String color, - final String type, - final CallbackContext callback - ) { - if (Build.VERSION.SDK_INT >= 21) { - final int bgColor = Color.parseColor(color); - final Window window = activity.getWindow(); - themeColor = bgColor; - themeType = type.toLowerCase(); - // Method and constants not available on all SDKs but we want to be able to compile this code with any SDK - window.clearFlags(0x04000000); // SDK 19: WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); - window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - try { - // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21 - - window - .getClass() - .getMethod("setNavigationBarColor", int.class) - .invoke(window, themeColor); - - window - .getClass() - .getMethod("setStatusBarColor", int.class) - .invoke(window, themeColor); - - setStatusBarStyle(window); - setNavigationBarStyle(window); - } catch (IllegalArgumentException ignore) {} catch (Exception ignore) {} - } - } - - private void setStatusBarStyle(final Window window) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - View decorView = window.getDecorView(); - int uiOptions = decorView.getSystemUiVisibility(); - - if (themeType.equals("light")) { - decorView.setSystemUiVisibility( - uiOptions | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR - ); - return; - } - decorView.setSystemUiVisibility( - uiOptions & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR - ); - } - } - - private void setNavigationBarStyle(final Window window) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - View decorView = window.getDecorView(); - int uiOptions = decorView.getSystemUiVisibility(); - - // 0x80000000 FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS - // 0x00000010 SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR - - if (themeType.equals("light")) { - decorView.setSystemUiVisibility(uiOptions | 0x80000000 | 0x00000010); - return; - } - decorView.setSystemUiVisibility(uiOptions | 0x80000000 & ~0x00000010); - } - } - - private void setIntentHandler(CallbackContext callbackContext) { - intentHandler = callbackContext; - } - - @Override - public void onNewIntent(Intent intent) { - if (intentHandler != null) { - PluginResult result = new PluginResult( - PluginResult.Status.OK, - getIntentJson(intent) - ); - result.setKeepCallback(true); - intentHandler.sendPluginResult(result); - } - } - - private JSONObject getIntentJson(Intent intent) { - JSONObject json = new JSONObject(); - try { - json.put("action", intent.getAction()); - json.put("data", intent.getDataString()); - json.put("type", intent.getType()); - json.put("package", intent.getPackage()); - json.put("extras", getExtrasJson(intent.getExtras())); - } catch (JSONException e) { - e.printStackTrace(); - } - return json; - } - - private JSONObject getExtrasJson(Bundle extras) { - JSONObject json = new JSONObject(); - if (extras != null) { - for (String key : extras.keySet()) { - try { - Object value = extras.get(key); - if (value instanceof String) { - json.put(key, (String) value); - } else if (value instanceof Integer) { - json.put(key, (Integer) value); - } else if (value instanceof Long) { - json.put(key, (Long) value); - } else if (value instanceof Double) { - json.put(key, (Double) value); - } else if (value instanceof Float) { - json.put(key, (Float) value); - } else if (value instanceof Boolean) { - json.put(key, (Boolean) value); - } else if (value instanceof Bundle) { - json.put(key, getExtrasJson((Bundle) value)); - } else { - json.put(key, value.toString()); - } - } catch (JSONException e) { - e.printStackTrace(); - } - } - } - return json; - } - - private Uri getContentProviderUri(String fileUri) { - Uri uri = Uri.parse(fileUri); - String Id = context.getPackageName(); - if (fileUri.matches("file:///(.*)")) { - File file = new File(uri.getPath()); - uri = FileProvider.getUriForFile(context, Id + ".provider", file); - } - return uri; - } - - private boolean isPackageInstalled( - String packageName, - PackageManager packageManager, - CallbackContext callback - ) { - try { - packageManager.getPackageInfo(packageName, 0); - return true; - } catch (PackageManager.NameNotFoundException e) { - return false; - } - } - - private void setInputType(String type) { - if (type.equals("CODE")) { - webView.setInputType( - InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | - InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD - ); - } else { - webView.setInputType( - InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL - ); - } - } - - private String getString(JSONArray ar, int index) { - try { - return ar.getString(index); - } catch (JSONException e) { - return null; - } - } - - private boolean getBoolean(JSONArray ar, int index) { - try { - return ar.getBoolean(index); - } catch (JSONException e) { - return false; - } - } - - private int getInt(JSONArray ar, int index) { - try { - return ar.getInt(index); - } catch (JSONException e) { - return 0; - } - } - - private JSONArray getJSONArray(JSONArray ar, int index) { - try { - return ar.getJSONArray(index); - } catch (JSONException e) { - return null; - } - } -} diff --git a/src/plugins/system/system.d.ts b/src/plugins/system/system.d.ts new file mode 100644 index 000000000..05b1a9888 --- /dev/null +++ b/src/plugins/system/system.d.ts @@ -0,0 +1,242 @@ +interface Info { + versionName: string; + packageName: string; + versionCode: number; +} + +interface AppInfo extends Info { + label: string; + firstInstallTime: number; + lastUpdateTime: number; +} + +interface ShortCut { + id: string; + label: string; + description: string; + icon: string; + action: string; + data: string; +} + +interface Intent { + action: string; + data: string; + type: string; + package: string; + extras: { + [key: string]: any; + }; +} + +type FileAction = 'VIEW' | 'EDIT' | 'SEND' | 'RUN'; +type OnFail = (err: string) => void; +type OnSuccessBool = (res: boolean) => void; + +interface System { + /** + * Get information about current webview + */ + getWebviewInfo(onSuccess: (res: Info) => void, onFail: OnFail): void; + /** + * Checks if power saving mode is on + * @param onSuccess + * @param onFail + */ + isPowerSaveMode(onSuccess: OnSuccessBool, onFail: OnFail): void; + /** + * File action using Apps content provider + * @param fileUri File uri + * @param filename file name + * @param action file name + * @param onFail + */ + fileAction( + fileUri: string, + filename: string, + action: FileAction, + mimeType: string, + onFail: OnFail, + ): void; + /** + * File action using Apps content provider + * @param fileUri File uri + * @param filename file name + * @param action file name + */ + fileAction( + fileUri: string, + filename: string, + action: FileAction, + mimeType: string, + ): void; + /** + * File action using Apps content provider + * @param fileUri File uri + * @param action file name + * @param onFail + */ + fileAction( + fileUri: string, + action: FileAction, + mimeType: string, + onFail: OnFail, + ): void; + /** + * File action using Apps content provider + * @param fileUri File uri + * @param action file name + */ + fileAction(fileUri: string, action: FileAction, mimeType: string): void; + /** + * File action using Apps content provider + * @param fileUri File uri + * @param action file name + */ + fileAction(fileUri: string, action: FileAction, onFail: OnFail): void; + /** + * File action using Apps content provider + * @param fileUri File uri + * @param action file name + */ + fileAction(fileUri: string, action: FileAction): void; + /** + * Gets app information + * @param onSuccess + * @param onFail + */ + getAppInfo(onSuccess: (info: AppInfo) => void, onFail: OnFail): void; + /** + * Add shortcut to app context menu + * @param shortCut + * @param onSuccess + * @param onFail + */ + addShortcut( + shortCut: ShortCut, + onSuccess: OnSuccessBool, + onFail: OnFail, + ): void; + /** + * Removes shortcut + * @param id + * @param onSuccess + * @param onFail + */ + removeShortcut(id: string, onSuccess: OnSuccessBool, onFail: OnFail): void; + /** + * Pins a shortcut + * @param id + * @param onSuccess + * @param onFail + */ + pinShortcut(id: string, onSuccess: OnSuccessBool, onFail: OnFail): void; + /** + * Gets android version + * @param onSuccess + * @param onFail + */ + getAndroidVersion(onSuccess: (res: Number) => void, onFail: OnFail): void; + /** + * Open settings which lets user change app settings to manage all files + * @param onSuccess + * @param onFail + */ + manageAllFiles(onSuccess: OnSuccessBool, onFail: OnFail): void; + /** + * Opens settings to allow to grant the app permission manage all files on device + * @param onSuccess + * @param onFail + */ + isExternalStorageManager(onSuccess: OnSuccessBool, onFail: OnFail): void; + /** + * Requests user to grant the provided permissions + * @param permissions constant value of the permission required @see https://developer.android.com/reference/android/Manifest.permission + * @param onSuccess + * @param onFail + */ + requestPermissions( + permissions: string[], + onSuccess: OnSuccessBool, + onFail: OnFail, + ): void; + /** + * Requests user to grant the provided permission + * @param permission constant value of the permission required @see https://developer.android.com/reference/android/Manifest.permission + * @param onSuccess + * @param onFail + */ + requestPermission( + permission: string, + onSuccess: OnSuccessBool, + onFail: OnFail, + ): void; + /** + * Checks whether the app has provided permission + * @param permission constant value of the permission required @see https://developer.android.com/reference/android/Manifest.permission + * @param onSuccess + * @param onFail + */ + hasPermission( + permission: string, + onSuccess: OnSuccessBool, + onFail: OnFail, + ): void; + /** + * Opens src in browser + * @param src + */ + openInBrowser(src: string): void; + /** + * Launches and app + * @param app the package name of the app + * @param className the full class name of the activity + * @param data Data to pass to the app + * @param onSuccess + * @param onFail + */ + launchApp( + app: string, + className: string, + data: string, + onSuccess: OnSuccessBool, + onFail: OnFail, + ): void; + + /** + * Opens a link within the app + * @param url Url to open + * @param title Title of the page + * @param showButtons Set to true to show buttons like console, open in browser, etc + */ + inAppBrowser(url: string, title: string, showButtons: boolean): void; + /** + * Sets the color of status bar and navigation bar + * @param systemBarColor Color of status bar and navigation bar + * @param theme Theme as object + * @param onSuccess Callback on success + * @param onFail Callback on fail + */ + setUiTheme( + systemBarColor: string, + theme: object, + onSuccess: OnSuccessBool, + onFail: OnFail, + ): void; + /** + * Sets intent handler for the app + * @param onSuccess + * @param onFail + */ + setIntentHandler(onSuccess: (intent: Intent) => void, onFail: OnFail): void; + /** + * Gets the launch intent + * @param onSuccess + * @param onFail + */ + getCordovaIntent(onSuccess: (intent: Intent) => void, onFail: OnFail): void; +} + +interface Window{ + system: System; +} diff --git a/src/plugins/system/utils/changeProvider.js b/src/plugins/system/utils/changeProvider.js index f5bc4a367..45095aa8d 100644 --- a/src/plugins/system/utils/changeProvider.js +++ b/src/plugins/system/utils/changeProvider.js @@ -5,6 +5,7 @@ module.exports = { const androidManifest = path.resolve(__dirname, "../../../platforms/android/app/src/main/AndroidManifest.xml"); + const configXML = path.resolve(__dirname, "../../../config.xml"); const repeatChar = (char, times) => { let res = ""; while (--times >= 0) res += char; @@ -12,11 +13,12 @@ module.exports = { }; try { - const fileData = fs.readFileSync(androidManifest, "utf-8"); - const ID = reset ? "com.foxdebug" : /package="([0-9a-zA-Z\.\-_]*)"/.exec(fileData)[1]; - const newFileData = fileData.replace( + const fileData = fs.readFileSync(configXML, "utf8"); + const manifest = fs.readFileSync(androidManifest, "utf8"); + const ID = reset ? "com.foxdebug" : /widget id="([0-9a-zA-Z\.\-_]*)"/.exec(fileData)[1]; + const newFileData = manifest.replace( /(android:authorities=")([0-9a-zA-Z\.\-_]*)(")/, - `$1${reset?"com.foxdebug":ID}.provider$3` + `$1${reset ? "com.foxdebug" : ID}.provider$3` ); fs.writeFileSync(androidManifest, newFileData); diff --git a/src/plugins/system/www/plugin.js b/src/plugins/system/www/plugin.js index 773678e15..d63af6ddc 100644 --- a/src/plugins/system/www/plugin.js +++ b/src/plugins/system/www/plugin.js @@ -1,19 +1,81 @@ module.exports = { + isManageExternalStorageDeclared: function (success, error) { + cordova.exec(success, error, 'System', 'isManageExternalStorageDeclared', []); + }, + hasGrantedStorageManager: function (success, error) { + cordova.exec(success, error, 'System', 'hasGrantedStorageManager', []); + }, + requestStorageManager: function (success, error) { + cordova.exec(success, error, 'System', 'requestStorageManager', []); + }, + copyToUri: function (srcUri, destUri, fileName, success, error) { + cordova.exec(success, error, 'System', 'copyToUri', [srcUri, destUri, fileName]); + }, + fileExists: function (path, countSymlinks, success, error) { + cordova.exec(success, error, 'System', 'fileExists', [path, String(countSymlinks)]); + }, + + createSymlink: function (target, linkPath, success, error) { + cordova.exec(success, error, 'System', 'createSymlink', [target, linkPath]); + }, + writeText: function (path, content, success, error) { + cordova.exec(success, error, 'System', 'writeText', [path, content]); + }, + deleteFile: function (path, success, error) { + cordova.exec(success, error, 'System', 'deleteFile', [path]); + }, + setExec: function (path, executable, success, error) { + cordova.exec(success, error, 'System', 'setExec', [path, String(executable)]); + }, + + + getNativeLibraryPath: function (success, error) { + cordova.exec(success, error, 'System', 'getNativeLibraryPath', []); + }, + + getFilesDir: function (success, error) { + cordova.exec(success, error, 'System', 'getFilesDir', []); + }, + + getParentPath: function (path, success, error) { + cordova.exec(success, error, 'System', 'getParentPath', [path]); + }, + + listChildren: function (path, success, error) { + cordova.exec(success, error, 'System', 'listChildren', [path]); + }, + mkdirs: function (path, success, error) { + cordova.exec(success, error, 'System', 'mkdirs', [path]); + }, + getArch: function (success, error) { + cordova.exec(success, error, 'System', 'getArch', []); + }, + + clearCache: function (success, fail) { + return cordova.exec(success, fail, "System", "clearCache", []); + }, getWebviewInfo: function (onSuccess, onFail) { cordova.exec(onSuccess, onFail, 'System', 'get-webkit-info', []); }, isPowerSaveMode: function (onSuccess, onFail) { cordova.exec(onSuccess, onFail, 'System', 'is-powersave-mode', []); }, - shareFile: function (fileUri, filename, onSuccess, onFail) { - if (typeof filename === 'function') { - onSuccess = filename; - onFail = onSuccess; + fileAction: function (fileUri, filename, action, mimeType, onFail) { + if (typeof action !== 'string') { + onFail = action || function () { }; + action = filename; filename = ''; + } else if (typeof mimeType !== 'string') { + onFail = mimeType || function () { }; + mimeType = action; + action = filename; + filename = ''; + } else if (typeof onFail !== 'function') { + onFail = function () { }; } - if (!filename) filename = ''; - cordova.exec(onSuccess, onFail, 'System', 'share-file', [fileUri, filename]); + action = "android.intent.action." + action; + cordova.exec(function () { }, onFail, 'System', 'file-action', [fileUri, filename, action, mimeType]); }, getAppInfo: function (onSuccess, onFail) { cordova.exec(onSuccess, onFail, 'System', 'get-app-info', []); @@ -55,10 +117,10 @@ module.exports = { openInBrowser: function (src) { cordova.exec(null, null, 'System', 'open-in-browser', [src]); }, - launchApp: function (app, action, value, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'launch-app', [app, action, value]); + launchApp: function (app, className, data, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'System', 'launch-app', [app, className, data]); }, - inAppBrowser: function (url, title, showButtons) { + inAppBrowser: function (url, title, showButtons, disableCache) { var myInAppBrowser = { onOpenExternalBrowser: null, onError: null, @@ -76,16 +138,22 @@ module.exports = { try { onError(err); } catch (error) { } - }, 'System', 'in-app-browser', [url, title, !!showButtons]); + }, 'System', 'in-app-browser', [url, title, !!showButtons, disableCache]); return myInAppBrowser; }, - setUiTheme: function (theme, type, onSuccess, onFail) { - cordova.exec(onSuccess, onFail, 'System', 'set-ui-theme', [theme, type]); + setUiTheme: function (systemBarColor, theme, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'System', 'set-ui-theme', [systemBarColor, theme]); }, setIntentHandler: function (handler, onerror) { cordova.exec(handler, onerror, 'System', 'set-intent-handler', []); }, + getCordovaIntent: function (onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'System', 'get-cordova-intent', []); + }, setInputType: function (type, onSuccess, onFail) { cordova.exec(onSuccess, onFail, 'System', 'set-input-type', [type]); + }, + getGlobalSetting: function (key, onSuccess, onFail) { + cordova.exec(onSuccess, onFail, 'System', 'get-global-setting', [key]); } }; \ No newline at end of file diff --git a/src/plugins/terminal/package.json b/src/plugins/terminal/package.json new file mode 100644 index 000000000..45ca86173 --- /dev/null +++ b/src/plugins/terminal/package.json @@ -0,0 +1,17 @@ +{ + "name": "com.foxdebug.acode.rk.exec.terminal", + "version": "1.0.0", + "description": "Terminal stuff", + "cordova": { + "id": "com.foxdebug.acode.rk.exec.terminal", + "platforms": [ + "android" + ] + }, + "keywords": [ + "ecosystem:cordova", + "cordova-android" + ], + "author": "@RohitKushvaha01", + "license": "MIT" +} diff --git a/src/plugins/terminal/plugin.xml b/src/plugins/terminal/plugin.xml new file mode 100644 index 000000000..72273257f --- /dev/null +++ b/src/plugins/terminal/plugin.xml @@ -0,0 +1,74 @@ + + + Terminal + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/plugins/terminal/scripts/init-alpine.sh b/src/plugins/terminal/scripts/init-alpine.sh new file mode 100644 index 000000000..f16ad6993 --- /dev/null +++ b/src/plugins/terminal/scripts/init-alpine.sh @@ -0,0 +1,239 @@ +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/share/bin:/usr/share/sbin:/usr/local/bin:/usr/local/sbin:/system/bin:/system/xbin:$PREFIX/local/bin +export PS1="\[\e[38;5;46m\]\u\[\033[39m\]@localhost \[\033[39m\]\w \[\033[0m\]\\$ " +export HOME=/home +export TERM=xterm-256color + + +required_packages="bash command-not-found tzdata wget" +missing_packages="" + +for pkg in $required_packages; do + if ! apk info -e "$pkg" >/dev/null 2>&1; then + missing_packages="$missing_packages $pkg" + fi +done + +if [ -n "$missing_packages" ]; then + echo -e "\e[34;1m[*] \e[0mInstalling important packages\e[0m" + apk update && apk upgrade + apk add $missing_packages + if [ $? -eq 0 ]; then + echo -e "\e[32;1m[+] \e[0mSuccessfully installed\e[0m" + fi + echo -e "\e[34m[*] \e[0mUse \e[32mapk\e[0m to install new packages\e[0m" +fi + + +if [ ! -f /linkerconfig/ld.config.txt ]; then + mkdir -p /linkerconfig + touch /linkerconfig/ld.config.txt +fi + + +if [ "$1" = "--installing" ]; then + echo "Configuring timezone..." + + if [ -n "$ANDROID_TZ" ] && [ -f "/usr/share/zoneinfo/$ANDROID_TZ" ]; then + ln -sf "/usr/share/zoneinfo/$ANDROID_TZ" /etc/localtime + echo "$ANDROID_TZ" > /etc/timezone + echo "Timezone set to: $ANDROID_TZ" + else + echo "Failed to detect timezone" + fi + + mkdir -p "$PREFIX/.configured" + echo "Installation completed." + exit 0 +fi + + +if [ "$#" -eq 0 ]; then + echo "$$" > "$PREFIX/pid" + chmod +x "$PREFIX/axs" + + if [ ! -e "$PREFIX/alpine/etc/acode_motd" ]; then + cat < "$PREFIX/alpine/etc/acode_motd" +Welcome to Alpine Linux in Acode! + +Working with packages: + + - Search: apk search + - Install: apk add + - Uninstall: apk del + - Upgrade: apk update && apk upgrade + +EOF + fi + + # Create acode CLI tool + if [ ! -e "$PREFIX/alpine/usr/local/bin/acode" ]; then + mkdir -p "$PREFIX/alpine/usr/local/bin" + cat <<'ACODE_CLI' > "$PREFIX/alpine/usr/local/bin/acode" +#!/bin/bash +# acode - Open files/folders in Acode editor +# Uses OSC escape sequences to communicate with the Acode terminal + +usage() { + echo "Usage: acode [file/folder...]" + echo "" + echo "Open files or folders in Acode editor." + echo "" + echo "Examples:" + echo " acode file.txt # Open a file" + echo " acode . # Open current folder" + echo " acode ~/project # Open a folder" + echo " acode -h, --help # Show this help" +} + +get_abs_path() { + local path="$1" + local abs_path + abs_path=$(realpath -- "$path" 2>/dev/null) + if [[ $? -ne 0 ]]; then + if [[ "$path" == /* ]]; then + abs_path="$path" + else + abs_path="$PWD/$path" + fi + fi + echo "$abs_path" +} + +open_in_acode() { + local path=$(get_abs_path "$1") + local type="file" + [[ -d "$path" ]] && type="folder" + + # Send OSC 7777 escape sequence: \e]7777;cmd;type;path\a + # The terminal component will intercept and handle this + printf '\e]7777;open;%s;%s\a' "$type" "$path" +} + +if [[ $# -eq 0 ]]; then + open_in_acode "." + exit 0 +fi + +for arg in "$@"; do + case "$arg" in + -h|--help) + usage + exit 0 + ;; + *) + if [[ -e "$arg" ]]; then + open_in_acode "$arg" + else + echo "Error: '$arg' does not exist" >&2 + exit 1 + fi + ;; + esac +done +ACODE_CLI + chmod +x "$PREFIX/alpine/usr/local/bin/acode" + fi + + # Create initrc if it doesn't exist + #initrc runs in bash so we can use bash features +if [ ! -e "$PREFIX/alpine/initrc" ]; then + cat <<'EOF' > "$PREFIX/alpine/initrc" +# Source rc files if they exist + +if [ -f "/etc/profile" ]; then + source "/etc/profile" +fi + + +if [ -f "$HOME/.bashrc" ]; then + source "$HOME/.bashrc" +fi + +if [ -f /etc/bash/bashrc ]; then + source /etc/bash/bashrc +fi + +# Environment setup +export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/share/bin:/usr/share/sbin:/usr/local/bin:/usr/local/sbin + +export HOME=/home +export TERM=xterm-256color +SHELL=/bin/bash +export PIP_BREAK_SYSTEM_PACKAGES=1 + +# Smart path shortening function (fish-style: ~/p/s/components) +_shorten_path() { + local path="$PWD" + + if [[ "$HOME" != "/" && "$path" == "$HOME" ]]; then + echo "~" + return + elif [[ "$HOME" != "/" && "$path" == "$HOME/"* ]]; then + path="~${path#$HOME}" + fi + + [[ "$path" == "~" ]] && echo "~" && return + + local parts result="" + IFS='/' read -ra parts <<< "$path" + local len=${#parts[@]} + + for ((i=0; i/dev/null | awk -F'-[0-9]' '{print $1}' | head -n 1) + + if [ -n "$pkg" ]; then + echo -e "The program '$cmd' is not installed.\nInstall it by executing:\n ${green}apk add $pkg${reset}" >&2 + else + echo "The program '$cmd' is not installed and no package provides it." >&2 + fi + + return 127 +} + +EOF +fi + +# Add PS1 only if not already present +if ! grep -q 'PS1=' "$PREFIX/alpine/initrc"; then + # Smart path shortening (fish-style: ~/p/s/components) + echo 'PS1="\[\033[1;32m\]\u\[\033[0m\]@localhost \[\033[1;34m\]\$_PS1_PATH\[\033[0m\] \[\$([ \$_PS1_EXIT -ne 0 ] && echo \"\033[31m\")\]\$\[\033[0m\] "' >> "$PREFIX/alpine/initrc" + # Simple prompt (uncomment below and comment above if you prefer full paths) + # echo 'PS1="\[\033[1;32m\]\u\[\033[0m\]@localhost \[\033[1;34m\]\w\[\033[0m\] \$ "' >> "$PREFIX/alpine/initrc" +fi + +chmod +x "$PREFIX/alpine/initrc" + +#actual source +#everytime a terminal is started initrc will run +"$PREFIX/axs" -c "bash --rcfile /initrc -i" + +else + exec "$@" +fi \ No newline at end of file diff --git a/src/plugins/terminal/scripts/init-sandbox.sh b/src/plugins/terminal/scripts/init-sandbox.sh new file mode 100644 index 000000000..3b8a7c3d8 --- /dev/null +++ b/src/plugins/terminal/scripts/init-sandbox.sh @@ -0,0 +1,93 @@ +export LD_LIBRARY_PATH=$PREFIX + +mkdir -p "$PREFIX/tmp" +mkdir -p "$PREFIX/alpine/tmp" +mkdir -p "$PREFIX/public" + +export PROOT_TMP_DIR=$PREFIX/tmp + +if [ "$FDROID" = "true" ]; then + + if [ -f "$PREFIX/libproot.so" ]; then + export PROOT_LOADER="$PREFIX/libproot.so" + fi + + if [ -f "$PREFIX/libproot32.so" ]; then + export PROOT_LOADER32="$PREFIX/libproot32.so" + fi + + + export PROOT="$PREFIX/libproot-xed.so" + chmod +x $PREFIX/* +else + if [ -f "$NATIVE_DIR/libproot.so" ]; then + export PROOT_LOADER="$NATIVE_DIR/libproot.so" + fi + + if [ -f "$NATIVE_DIR/libproot32.so" ]; then + export PROOT_LOADER32="$NATIVE_DIR/libproot32.so" + fi + + + if [ -e "$PREFIX/libtalloc.so.2" ] || [ -L "$PREFIX/libtalloc.so.2" ]; then + rm "$PREFIX/libtalloc.so.2" + fi + + ln -s "$NATIVE_DIR/libtalloc.so" "$PREFIX/libtalloc.so.2" + export PROOT="$NATIVE_DIR/libproot-xed.so" +fi + +ARGS="--kill-on-exit" + + + +for system_mnt in /apex /odm /product /system /system_ext /vendor /linkerconfig/ld.config.txt /linkerconfig/com.android.art/ld.config.txt /plat_property_contexts /property_contexts; do + + if [ -e "$system_mnt" ]; then + system_mnt=$(realpath "$system_mnt") + ARGS="$ARGS -b ${system_mnt}" + fi +done + + + + +unset system_mnt + +ARGS="$ARGS -b /sdcard" +ARGS="$ARGS -b /storage" +ARGS="$ARGS -b /dev" +ARGS="$ARGS -b /data" +ARGS="$ARGS -b /dev/urandom:/dev/random" +ARGS="$ARGS -b /proc" +ARGS="$ARGS -b /sys" +ARGS="$ARGS -b $PREFIX" +ARGS="$ARGS -b $PREFIX/public:/public" +ARGS="$ARGS -b $PREFIX/alpine/tmp:/dev/shm" + + +if [ -e "/proc/self/fd" ]; then + ARGS="$ARGS -b /proc/self/fd:/dev/fd" +fi + +if [ -e "/proc/self/fd/0" ]; then + ARGS="$ARGS -b /proc/self/fd/0:/dev/stdin" +fi + +if [ -e "/proc/self/fd/1" ]; then + ARGS="$ARGS -b /proc/self/fd/1:/dev/stdout" +fi + +if [ -e "/proc/self/fd/2" ]; then + ARGS="$ARGS -b /proc/self/fd/2:/dev/stderr" +fi + + +ARGS="$ARGS -r $PREFIX/alpine" +ARGS="$ARGS -0" +ARGS="$ARGS --link2symlink" +ARGS="$ARGS --sysvipc" +ARGS="$ARGS -L" + + +$PROOT $ARGS /bin/sh $PREFIX/init-alpine.sh "$@" diff --git a/src/plugins/terminal/scripts/rm-wrapper.sh b/src/plugins/terminal/scripts/rm-wrapper.sh new file mode 100644 index 000000000..07d195fdc --- /dev/null +++ b/src/plugins/terminal/scripts/rm-wrapper.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +unlink_recursive() { + path="$1" + + # Try to recurse into it as a directory first + for entry in "$path"/* "$path"/.[!.]* "$path"/..?*; do + case "$entry" in + *'*'*|*'?'*) continue ;; + esac + unlink_recursive "$entry" + done 2>/dev/null + + unlink "$path" 2>/dev/null || : +} + +for target in "$@"; do + unlink_recursive "$target" +done + +# Run busybox rm, capture stderr, and filter out the "No such file or directory" message +err="$(busybox rm "$@" 2>&1 >/dev/null)" + +# Print only real errors +printf "%s\n" "$err" | grep -v "No such file or directory" \ No newline at end of file diff --git a/src/plugins/terminal/src/android/AlpineDocumentProvider.java b/src/plugins/terminal/src/android/AlpineDocumentProvider.java new file mode 100644 index 000000000..97a4dd50a --- /dev/null +++ b/src/plugins/terminal/src/android/AlpineDocumentProvider.java @@ -0,0 +1,386 @@ +package com.foxdebug.acode.rk.exec.terminal; + +import android.content.ComponentName; +import android.content.Context; +import android.content.pm.PackageManager; +import android.content.res.AssetFileDescriptor; +import android.database.Cursor; +import android.database.MatrixCursor; +import android.graphics.Point; +import android.os.CancellationSignal; +import android.os.ParcelFileDescriptor; +import android.provider.DocumentsContract; +import android.provider.DocumentsProvider; +import android.util.Log; +import android.webkit.MimeTypeMap; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Collections; +import java.util.LinkedList; +import java.util.Locale; +import com.foxdebug.acode.R; +import com.foxdebug.acode.rk.exec.terminal.*; + +public class AlpineDocumentProvider extends DocumentsProvider { + + private static final String ALL_MIME_TYPES = "*/*"; + + + // The default columns to return information about a root if no specific + // columns are requested in a query. + private static final String[] DEFAULT_ROOT_PROJECTION = new String[]{ + DocumentsContract.Root.COLUMN_ROOT_ID, + DocumentsContract.Root.COLUMN_MIME_TYPES, + DocumentsContract.Root.COLUMN_FLAGS, + DocumentsContract.Root.COLUMN_ICON, + DocumentsContract.Root.COLUMN_TITLE, + DocumentsContract.Root.COLUMN_SUMMARY, + DocumentsContract.Root.COLUMN_DOCUMENT_ID, + DocumentsContract.Root.COLUMN_AVAILABLE_BYTES + }; + + // The default columns to return information about a document if no specific + // columns are requested in a query. + private static final String[] DEFAULT_DOCUMENT_PROJECTION = new String[]{ + DocumentsContract.Document.COLUMN_DOCUMENT_ID, + DocumentsContract.Document.COLUMN_MIME_TYPE, + DocumentsContract.Document.COLUMN_DISPLAY_NAME, + DocumentsContract.Document.COLUMN_LAST_MODIFIED, + DocumentsContract.Document.COLUMN_FLAGS, + DocumentsContract.Document.COLUMN_SIZE + }; + + @Override + public Cursor queryRoots(String[] projection) { + File BASE_DIR = new File(getContext().getFilesDir(),"public"); + if (!BASE_DIR.exists()) { + BASE_DIR.mkdirs(); + } + + MatrixCursor result = new MatrixCursor( + projection != null ? projection : DEFAULT_ROOT_PROJECTION + ); + String applicationName = getApplicationLabel(); + + MatrixCursor.RowBuilder row = result.newRow(); + row.add(DocumentsContract.Root.COLUMN_ROOT_ID, getDocIdForFile(BASE_DIR)); + row.add(DocumentsContract.Root.COLUMN_DOCUMENT_ID, getDocIdForFile(BASE_DIR)); + row.add(DocumentsContract.Root.COLUMN_SUMMARY, null); + row.add( + DocumentsContract.Root.COLUMN_FLAGS, + DocumentsContract.Root.FLAG_SUPPORTS_CREATE | + DocumentsContract.Root.FLAG_SUPPORTS_SEARCH | + DocumentsContract.Root.FLAG_SUPPORTS_IS_CHILD + ); + row.add(DocumentsContract.Root.COLUMN_TITLE, applicationName); + row.add(DocumentsContract.Root.COLUMN_MIME_TYPES, ALL_MIME_TYPES); + row.add(DocumentsContract.Root.COLUMN_AVAILABLE_BYTES, BASE_DIR.getFreeSpace()); + row.add(DocumentsContract.Root.COLUMN_ICON, resolveLauncherIcon()); + return result; + } + + @Override + public Cursor queryDocument(String documentId, String[] projection) throws FileNotFoundException { + MatrixCursor result = new MatrixCursor( + projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION + ); + includeFile(result, documentId, null); + return result; + } + + @Override + public Cursor queryChildDocuments( + String parentDocumentId, + String[] projection, + String sortOrder + ) throws FileNotFoundException { + MatrixCursor result = new MatrixCursor( + projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION + ); + File parent = getFileForDocId(parentDocumentId); + File[] files = parent.listFiles(); + if (files != null) { + for (File file : files) { + includeFile(result, null, file); + } + } else { + Log.e("DocumentsProvider", "Unable to list files in " + parentDocumentId); + } + return result; + } + + @Override + public ParcelFileDescriptor openDocument( + String documentId, + String mode, + CancellationSignal signal + ) throws FileNotFoundException { + File file = getFileForDocId(documentId); + int accessMode = ParcelFileDescriptor.parseMode(mode); + return ParcelFileDescriptor.open(file, accessMode); + } + + @Override + public AssetFileDescriptor openDocumentThumbnail( + String documentId, + Point sizeHint, + CancellationSignal signal + ) throws FileNotFoundException { + File file = getFileForDocId(documentId); + ParcelFileDescriptor pfd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY); + return new AssetFileDescriptor(pfd, 0, file.length()); + } + + @Override + public boolean onCreate() { + return true; + } + + @Override + public String createDocument( + String parentDocumentId, + String mimeType, + String displayName + ) throws FileNotFoundException { + File parent = getFileForDocId(parentDocumentId); + File newFile = new File(parent, displayName); + int noConflictId = 2; + while (newFile.exists()) { + newFile = new File(parent, displayName + " (" + noConflictId++ + ")"); + } + try { + boolean succeeded; + if (DocumentsContract.Document.MIME_TYPE_DIR.equals(mimeType)) { + succeeded = newFile.mkdir(); + } else { + succeeded = newFile.createNewFile(); + } + if (!succeeded) { + throw new FileNotFoundException("Failed to create document with id " + newFile.getAbsolutePath()); + } + } catch (IOException e) { + throw new FileNotFoundException("Failed to create document with id " + newFile.getAbsolutePath()); + } + return getDocIdForFile(newFile); + } + + @Override + public void deleteDocument(String documentId) throws FileNotFoundException { + File file = getFileForDocId(documentId); + if (!file.delete()) { + throw new FileNotFoundException("Failed to delete document with id " + documentId); + } + } + + @Override + public String renameDocument(String documentId, String displayName) throws FileNotFoundException { + File file = getFileForDocId(documentId); + File parent = file.getParentFile(); + if (parent == null) { + throw new FileNotFoundException("Failed to rename root document with id " + documentId); + } + if (displayName == null || displayName.trim().isEmpty()) { + throw new FileNotFoundException("Failed to rename document with id " + documentId); + } + if (displayName.equals(file.getName())) { + return documentId; + } + if (displayName.contains(File.separator)) { + throw new FileNotFoundException("Invalid display name for rename: " + displayName); + } + + File target = new File(parent, displayName); + if (target.exists()) { + throw new FileNotFoundException("Target already exists: " + target.getAbsolutePath()); + } + if (!file.renameTo(target)) { + throw new FileNotFoundException("Failed to rename document with id " + documentId); + } + return getDocIdForFile(target); + } + + @Override + public String getDocumentType(String documentId) throws FileNotFoundException { + File file = getFileForDocId(documentId); + return getMimeType(file); + } + + @Override + public Cursor querySearchDocuments( + String rootId, + String query, + String[] projection + ) throws FileNotFoundException { + File BASE_DIR = new File(getContext().getFilesDir(),"public"); + if (!BASE_DIR.exists()) { + BASE_DIR.mkdirs(); + } + MatrixCursor result = new MatrixCursor( + projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION + ); + File parent = getFileForDocId(rootId); + + // This example implementation searches file names for the query and doesn't rank search + // results, so we can stop as soon as we find a sufficient number of matches. Other + // implementations might rank results and use other data about files, rather than the file + // name, to produce a match. + LinkedList pending = new LinkedList<>(); + pending.add(parent); + + final int MAX_SEARCH_RESULTS = 50; + while (!pending.isEmpty() && result.getCount() < MAX_SEARCH_RESULTS) { + File file = pending.removeFirst(); + // Avoid directories outside the $HOME directory linked with symlinks (to avoid e.g. search + // through the whole SD card). + boolean isInsideHome; + try { + isInsideHome = file.getCanonicalPath().startsWith(BASE_DIR.getCanonicalPath()); + } catch (IOException e) { + isInsideHome = true; + } + if (isInsideHome) { + if (file.isDirectory()) { + File[] files = file.listFiles(); + if (files != null) { + Collections.addAll(pending, files); + } + } else { + if (file.getName().toLowerCase(Locale.getDefault()).contains(query)) { + includeFile(result, null, file); + } + } + } + } + + return result; + } + + @Override + public boolean isChildDocument(String parentDocumentId, String documentId) { + return documentId.startsWith(parentDocumentId); + } + + /** + * Add a representation of a file to a cursor. + * + * @param result the cursor to modify + * @param docId the document ID representing the desired file (may be null if given file) + * @param file the File object representing the desired file (may be null if given docID) + */ + private void includeFile(MatrixCursor result, String docId, File file) throws FileNotFoundException { + if (docId == null) { + docId = getDocIdForFile(file); + } else { + file = getFileForDocId(docId); + } + + int flags = 0; + if (file.isDirectory()) { + if (file.canWrite()) { + flags = flags | DocumentsContract.Document.FLAG_DIR_SUPPORTS_CREATE; + } + } else if (file.canWrite()) { + flags = flags | DocumentsContract.Document.FLAG_SUPPORTS_WRITE; + } + File parentFile = file.getParentFile(); + if (parentFile != null && parentFile.canWrite()) { + flags = flags | DocumentsContract.Document.FLAG_SUPPORTS_DELETE; + flags = flags | DocumentsContract.Document.FLAG_SUPPORTS_RENAME; + } + + String displayName = file.getName(); + String mimeType = getMimeType(file); + if (mimeType.startsWith("image/")) { + flags = flags | DocumentsContract.Document.FLAG_SUPPORTS_THUMBNAIL; + } + + MatrixCursor.RowBuilder row = result.newRow(); + row.add(DocumentsContract.Document.COLUMN_DOCUMENT_ID, docId); + row.add(DocumentsContract.Document.COLUMN_DISPLAY_NAME, displayName); + row.add(DocumentsContract.Document.COLUMN_SIZE, file.length()); + row.add(DocumentsContract.Document.COLUMN_MIME_TYPE, mimeType); + row.add(DocumentsContract.Document.COLUMN_LAST_MODIFIED, file.lastModified()); + row.add(DocumentsContract.Document.COLUMN_FLAGS, flags); + row.add(DocumentsContract.Document.COLUMN_ICON, R.mipmap.ic_launcher); + } + + public static boolean isDocumentProviderEnabled(Context context) { + ComponentName componentName = new ComponentName(context, AlpineDocumentProvider.class); + int state = context.getPackageManager().getComponentEnabledSetting(componentName); + return state == PackageManager.COMPONENT_ENABLED_STATE_ENABLED || + state == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; + } + + public static void setDocumentProviderEnabled(Context context, boolean enabled) { + if (isDocumentProviderEnabled(context) == enabled) { + return; + } + ComponentName componentName = new ComponentName(context, AlpineDocumentProvider.class); + int newState = enabled ? + PackageManager.COMPONENT_ENABLED_STATE_ENABLED : + PackageManager.COMPONENT_ENABLED_STATE_DISABLED; + + context.getPackageManager().setComponentEnabledSetting( + componentName, + newState, + PackageManager.DONT_KILL_APP + ); + } + + /** + * Get the document id given a file. This document id must be consistent across time as other + * applications may save the ID and use it to reference documents later. + * + * The reverse of {@link #getFileForDocId}. + */ + private static String getDocIdForFile(File file) { + return file.getAbsolutePath(); + } + + /** + * Get the file given a document id (the reverse of {@link #getDocIdForFile}). + */ + private static File getFileForDocId(String docId) throws FileNotFoundException { + File f = new File(docId); + if (!f.exists()) { + throw new FileNotFoundException(f.getAbsolutePath() + " not found"); + } + return f; + } + + private static String getMimeType(File file) { + if (file.isDirectory()) { + return DocumentsContract.Document.MIME_TYPE_DIR; + } else { + String name = file.getName(); + int lastDot = name.lastIndexOf('.'); + if (lastDot >= 0) { + String extension = name.substring(lastDot + 1).toLowerCase(Locale.getDefault()); + String mime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); + if (mime != null) { + return mime; + } + } + return "application/octet-stream"; + } + } + private int resolveLauncherIcon() { + Context context = getContext(); + if (context == null) return android.R.mipmap.sym_def_app_icon; + int icon = context.getResources().getIdentifier("ic_launcher", "mipmap", context.getPackageName()); + return icon != 0 ? icon : android.R.mipmap.sym_def_app_icon; + } + + private String getApplicationLabel() { + Context context = getContext(); + if (context == null) return "Acode"; + PackageManager pm = context.getPackageManager(); + try { + CharSequence label = pm.getApplicationLabel(context.getApplicationInfo()); + return label != null ? label.toString() : "Acode"; + } catch (Exception ignored) { + return "Acode"; + } + } +} diff --git a/src/plugins/terminal/src/android/BackgroundExecutor.java b/src/plugins/terminal/src/android/BackgroundExecutor.java new file mode 100644 index 000000000..79e3f33ad --- /dev/null +++ b/src/plugins/terminal/src/android/BackgroundExecutor.java @@ -0,0 +1,164 @@ +package com.foxdebug.acode.rk.exec.terminal; + +import org.apache.cordova.*; +import org.json.*; +import java.io.*; +import java.util.*; +import java.util.concurrent.*; +import com.foxdebug.acode.rk.exec.terminal.*; + +public class BackgroundExecutor extends CordovaPlugin { + + private final Map processes = new ConcurrentHashMap<>(); + private final Map processInputs = new ConcurrentHashMap<>(); + private final Map processCallbacks = new ConcurrentHashMap<>(); + private ProcessManager processManager; + + @Override + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + this.processManager = new ProcessManager(cordova.getContext()); + } + + @Override + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + switch (action) { + case "start": + String pid = UUID.randomUUID().toString(); + startProcess(pid, args.getString(0), args.getString(1).equals("true"), callbackContext); + return true; + case "write": + writeToProcess(args.getString(0), args.getString(1), callbackContext); + return true; + case "stop": + stopProcess(args.getString(0), callbackContext); + return true; + case "exec": + exec(args.getString(0), args.getString(1).equals("true"), callbackContext); + return true; + case "isRunning": + isProcessRunning(args.getString(0), callbackContext); + return true; + case "loadLibrary": + loadLibrary(args.getString(0), callbackContext); + return true; + default: + callbackContext.error("Unknown action: " + action); + return false; + } + } + + private void exec(String cmd, boolean useAlpine, CallbackContext callbackContext) { + cordova.getThreadPool().execute(() -> { + try { + ProcessManager.ExecResult result = processManager.executeCommand(cmd, useAlpine); + + if (result.isSuccess()) { + callbackContext.success(result.stdout); + } else { + callbackContext.error(result.getErrorMessage()); + } + } catch (Exception e) { + callbackContext.error("Exception: " + e.getMessage()); + } + }); + } + + private void startProcess(String pid, String cmd, boolean useAlpine, CallbackContext callbackContext) { + cordova.getThreadPool().execute(() -> { + try { + ProcessBuilder builder = processManager.createProcessBuilder(cmd, useAlpine); + Process process = builder.start(); + + processes.put(pid, process); + processInputs.put(pid, process.getOutputStream()); + processCallbacks.put(pid, callbackContext); + + sendPluginResult(callbackContext, pid, true); + + // Stream stdout + new Thread(() -> StreamHandler.streamOutput( + process.getInputStream(), + line -> sendPluginMessage(pid, "stdout:" + line) + )).start(); + + // Stream stderr + new Thread(() -> StreamHandler.streamOutput( + process.getErrorStream(), + line -> sendPluginMessage(pid, "stderr:" + line) + )).start(); + + int exitCode = process.waitFor(); + sendPluginMessage(pid, "exit:" + exitCode); + cleanup(pid); + } catch (Exception e) { + callbackContext.error("Failed to start process: " + e.getMessage()); + } + }); + } + + private void writeToProcess(String pid, String input, CallbackContext callbackContext) { + try { + OutputStream os = processInputs.get(pid); + if (os != null) { + StreamHandler.writeToStream(os, input); + callbackContext.success("Written to process"); + } else { + callbackContext.error("Process not found or closed"); + } + } catch (IOException e) { + callbackContext.error("Write error: " + e.getMessage()); + } + } + + private void stopProcess(String pid, CallbackContext callbackContext) { + Process process = processes.get(pid); + if (process != null) { + ProcessUtils.killProcessTree(process); + cleanup(pid); + callbackContext.success("Process terminated"); + } else { + callbackContext.error("No such process"); + } + } + + private void isProcessRunning(String pid, CallbackContext callbackContext) { + Process process = processes.get(pid); + + if (process != null) { + String status = ProcessUtils.isAlive(process) ? "running" : "exited"; + if (status.equals("exited")) cleanup(pid); + callbackContext.success(status); + } else { + callbackContext.success("not_found"); + } + } + + private void loadLibrary(String path, CallbackContext callbackContext) { + try { + System.load(path); + callbackContext.success("Library loaded successfully."); + } catch (Exception e) { + callbackContext.error("Failed to load library: " + e.getMessage()); + } + } + + private void sendPluginResult(CallbackContext ctx, String message, boolean keepCallback) { + PluginResult result = new PluginResult(PluginResult.Status.OK, message); + result.setKeepCallback(keepCallback); + ctx.sendPluginResult(result); + } + + private void sendPluginMessage(String pid, String message) { + CallbackContext ctx = processCallbacks.get(pid); + if (ctx != null) { + sendPluginResult(ctx, message, true); + } + } + + private void cleanup(String pid) { + processes.remove(pid); + processInputs.remove(pid); + processCallbacks.remove(pid); + } +} \ No newline at end of file diff --git a/src/plugins/terminal/src/android/Executor.java b/src/plugins/terminal/src/android/Executor.java new file mode 100644 index 000000000..5d0e90777 --- /dev/null +++ b/src/plugins/terminal/src/android/Executor.java @@ -0,0 +1,416 @@ +package com.foxdebug.acode.rk.exec.terminal; + +import org.apache.cordova.*; +import org.json.*; + +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.ServiceConnection; +import android.os.Bundle; +import android.os.Handler; +import android.os.IBinder; +import android.os.Message; +import android.os.Messenger; +import android.os.RemoteException; +import android.util.Log; + +import java.util.UUID; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import android.Manifest; +import android.content.pm.PackageManager; +import android.os.Build; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import android.app.Activity; +import com.foxdebug.acode.rk.exec.terminal.*; + +public class Executor extends CordovaPlugin { + + private Messenger serviceMessenger; + private boolean isServiceBound; + private boolean isServiceBinding; // Track if binding is in progress + private Context context; + private Activity activity; + private final Messenger handlerMessenger = new Messenger(new IncomingHandler()); + private CountDownLatch serviceConnectedLatch; + private final java.util.Map callbackContextMap = new java.util.concurrent.ConcurrentHashMap<>(); + + private static final int REQUEST_POST_NOTIFICATIONS = 1001; + + private void askNotificationPermission(Activity context) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + if (ContextCompat.checkSelfPermission( + context, Manifest.permission.POST_NOTIFICATIONS) == + PackageManager.PERMISSION_GRANTED) { + } else if (ActivityCompat.shouldShowRequestPermissionRationale( + context, Manifest.permission.POST_NOTIFICATIONS)) { + ActivityCompat.requestPermissions( + context, + new String[]{Manifest.permission.POST_NOTIFICATIONS}, + REQUEST_POST_NOTIFICATIONS + ); + } else { + ActivityCompat.requestPermissions( + context, + new String[]{Manifest.permission.POST_NOTIFICATIONS}, + REQUEST_POST_NOTIFICATIONS + ); + } + } + } + + @Override + public void initialize(CordovaInterface cordova, CordovaWebView webView) { + super.initialize(cordova, webView); + this.context = cordova.getContext(); + this.activity = cordova.getActivity(); + askNotificationPermission(activity); + + // Don't bind service immediately - wait until needed + Log.d("Executor", "Plugin initialized - service will be started when needed"); + } + + /** + * Ensure service is bound and ready for communication + * Returns true if service is ready, false if binding failed + */ + private boolean ensureServiceBound(CallbackContext callbackContext) { + // If already bound, return immediately + if (isServiceBound && serviceMessenger != null) { + return true; + } + + // If binding is already in progress, wait for it + if (isServiceBinding) { + try { + if (serviceConnectedLatch != null && + serviceConnectedLatch.await(10, TimeUnit.SECONDS)) { + return isServiceBound; + } else { + callbackContext.error("Service binding timeout"); + return false; + } + } catch (InterruptedException e) { + callbackContext.error("Service binding interrupted: " + e.getMessage()); + return false; + } + } + + // Start binding process + Log.d("Executor", "Starting service binding..."); + return bindServiceNow(callbackContext); + } + + /** + * Immediately bind to service + */ + private boolean bindServiceNow(CallbackContext callbackContext) { + if (isServiceBinding) { + return false; // Already binding + } + + isServiceBinding = true; + serviceConnectedLatch = new CountDownLatch(1); + + Intent intent = new Intent(context, TerminalService.class); + + // Start the service first + context.startService(intent); + + // Then bind to it + boolean bindResult = context.bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE); + + if (!bindResult) { + Log.e("Executor", "Failed to bind to service"); + isServiceBinding = false; + callbackContext.error("Failed to bind to service"); + return false; + } + + // Wait for connection + try { + if (serviceConnectedLatch.await(10, TimeUnit.SECONDS)) { + Log.d("Executor", "Service bound successfully"); + return isServiceBound; + } else { + Log.e("Executor", "Service binding timeout"); + callbackContext.error("Service binding timeout"); + isServiceBinding = false; + return false; + } + } catch (InterruptedException e) { + Log.e("Executor", "Service binding interrupted: " + e.getMessage()); + callbackContext.error("Service binding interrupted: " + e.getMessage()); + isServiceBinding = false; + return false; + } + } + + private final ServiceConnection serviceConnection = new ServiceConnection() { + @Override + public void onServiceConnected(ComponentName name, IBinder service) { + Log.d("Executor", "Service connected"); + serviceMessenger = new Messenger(service); + isServiceBound = true; + isServiceBinding = false; + if (serviceConnectedLatch != null) { + serviceConnectedLatch.countDown(); + } + } + + @Override + public void onServiceDisconnected(ComponentName name) { + Log.w("Executor", "Service disconnected"); + serviceMessenger = null; + isServiceBound = false; + isServiceBinding = false; + serviceConnectedLatch = new CountDownLatch(1); + } + }; + + private class IncomingHandler extends Handler { + @Override + public void handleMessage(Message msg) { + Bundle bundle = msg.getData(); + String id = bundle.getString("id"); + String action = bundle.getString("action"); + String data = bundle.getString("data"); + + if (action.equals("exec_result")) { + CallbackContext callbackContext = getCallbackContext(id); + if (callbackContext != null) { + if (bundle.getBoolean("isSuccess", false)) { + callbackContext.success(data); + } else { + callbackContext.error(data); + } + cleanupCallback(id); + } + } else { + String pid = id; + CallbackContext callbackContext = getCallbackContext(pid); + + if (callbackContext != null) { + switch (action) { + case "stdout": + case "stderr": + PluginResult result = new PluginResult(PluginResult.Status.OK, action + ":" + data); + result.setKeepCallback(true); + callbackContext.sendPluginResult(result); + break; + case "exit": + cleanupCallback(pid); + callbackContext.success("exit:" + data); + break; + case "isRunning": + callbackContext.success(data); + cleanupCallback(pid); + break; + } + } + } + } + } + + @Override + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { + // For actions that don't need the service, handle them directly + if (action.equals("loadLibrary")) { + try { + System.load(args.getString(0)); + callbackContext.success("Library loaded successfully."); + } catch (Exception e) { + callbackContext.error("Failed to load library: " + e.getMessage()); + } + return true; + } + + if (action.equals("stopService")) { + stopServiceNow(); + callbackContext.success("Service stopped"); + return true; + } + + if (action.equals("moveToBackground")) { + Intent intent = new Intent(context, TerminalService.class); + intent.setAction(TerminalService.MOVE_TO_BACKGROUND); + context.startService(intent); + callbackContext.success("Service moved to background mode"); + return true; + } + + if (action.equals("moveToForeground")) { + Intent intent = new Intent(context, TerminalService.class); + intent.setAction(TerminalService.MOVE_TO_FOREGROUND); + context.startService(intent); + callbackContext.success("Service moved to foreground mode"); + return true; + } + + // For all other actions, ensure service is bound first + if (!ensureServiceBound(callbackContext)) { + // Error already sent by ensureServiceBound + return false; + } + + switch (action) { + case "start": + String cmdStart = args.getString(0); + String pid = UUID.randomUUID().toString(); + callbackContextMap.put(pid, callbackContext); + startProcess(pid, cmdStart, args.getString(1)); + return true; + case "write": + String pidWrite = args.getString(0); + String input = args.getString(1); + writeToProcess(pidWrite, input, callbackContext); + return true; + case "stop": + String pidStop = args.getString(0); + stopProcess(pidStop, callbackContext); + return true; + case "exec": + String execId = UUID.randomUUID().toString(); + callbackContextMap.put(execId, callbackContext); + exec(execId, args.getString(0), args.getString(1)); + return true; + case "isRunning": + String pidCheck = args.getString(0); + callbackContextMap.put(pidCheck, callbackContext); + isProcessRunning(pidCheck); + return true; + default: + callbackContext.error("Unknown action: " + action); + return false; + } + } + + private void stopServiceNow() { + if (isServiceBound) { + try { + context.unbindService(serviceConnection); + Log.d("Executor", "Service unbound"); + } catch (IllegalArgumentException ignored) { + // already unbound + } + isServiceBound = false; + } + isServiceBinding = false; + + Intent intent = new Intent(context, TerminalService.class); + boolean stopped = context.stopService(intent); + Log.d("Executor", "Service stop result: " + stopped); + + serviceMessenger = null; + if (serviceConnectedLatch == null) { + serviceConnectedLatch = new CountDownLatch(1); + } + } + + private void startProcess(String pid, String cmd, String alpine) { + CallbackContext callbackContext = getCallbackContext(pid); + if (callbackContext != null) { + PluginResult result = new PluginResult(PluginResult.Status.OK, pid); + result.setKeepCallback(true); + callbackContext.sendPluginResult(result); + } + + Message msg = Message.obtain(null, TerminalService.MSG_START_PROCESS); + msg.replyTo = handlerMessenger; + Bundle bundle = new Bundle(); + bundle.putString("id", pid); + bundle.putString("cmd", cmd); + bundle.putString("alpine", alpine); + msg.setData(bundle); + try { + serviceMessenger.send(msg); + } catch (RemoteException e) { + CallbackContext errorContext = getCallbackContext(pid); + if (errorContext != null) { + errorContext.error("Failed to start process: " + e.getMessage()); + cleanupCallback(pid); + } + } + } + + private void exec(String execId, String cmd, String alpine) { + Message msg = Message.obtain(null, TerminalService.MSG_EXEC); + msg.replyTo = handlerMessenger; + Bundle bundle = new Bundle(); + bundle.putString("id", execId); + bundle.putString("cmd", cmd); + bundle.putString("alpine", alpine); + msg.setData(bundle); + try { + serviceMessenger.send(msg); + } catch (RemoteException e) { + CallbackContext callbackContext = getCallbackContext(execId); + if (callbackContext != null) { + callbackContext.error("Failed to execute command: " + e.getMessage()); + cleanupCallback(execId); + } + } + } + + private void writeToProcess(String pid, String input, CallbackContext callbackContext) { + Message msg = Message.obtain(null, TerminalService.MSG_WRITE_TO_PROCESS); + Bundle bundle = new Bundle(); + bundle.putString("id", pid); + bundle.putString("input", input); + msg.setData(bundle); + try { + serviceMessenger.send(msg); + callbackContext.success("Written to process"); + } catch (RemoteException e) { + callbackContext.error("Write error: " + e.getMessage()); + } + } + + private void stopProcess(String pid, CallbackContext callbackContext) { + Message msg = Message.obtain(null, TerminalService.MSG_STOP_PROCESS); + Bundle bundle = new Bundle(); + bundle.putString("id", pid); + msg.setData(bundle); + try { + serviceMessenger.send(msg); + callbackContext.success("Process terminated"); + } catch (RemoteException e) { + callbackContext.error("Stop error: " + e.getMessage()); + } + } + + private void isProcessRunning(String pid) { + Message msg = Message.obtain(null, TerminalService.MSG_IS_RUNNING); + msg.replyTo = handlerMessenger; + Bundle bundle = new Bundle(); + bundle.putString("id", pid); + msg.setData(bundle); + try { + serviceMessenger.send(msg); + } catch (RemoteException e) { + CallbackContext callbackContext = getCallbackContext(pid); + if (callbackContext != null) { + callbackContext.error("Check running error: " + e.getMessage()); + cleanupCallback(pid); + } + } + } + + private CallbackContext getCallbackContext(String id) { + return callbackContextMap.get(id); + } + + private void cleanupCallback(String id) { + callbackContextMap.remove(id); + } + + @Override + public void onDestroy() { + super.onDestroy(); + } +} \ No newline at end of file diff --git a/src/plugins/terminal/src/android/ProcessManager.java b/src/plugins/terminal/src/android/ProcessManager.java new file mode 100644 index 000000000..fe7be24ba --- /dev/null +++ b/src/plugins/terminal/src/android/ProcessManager.java @@ -0,0 +1,100 @@ +package com.foxdebug.acode.rk.exec.terminal; + +import android.content.Context; +import android.content.pm.PackageManager; +import java.io.*; +import java.util.Map; +import java.util.TimeZone; +import com.foxdebug.acode.rk.exec.terminal.*; + +public class ProcessManager { + + private final Context context; + + public ProcessManager(Context context) { + this.context = context; + } + + /** + * Creates a ProcessBuilder with common environment setup + */ + public ProcessBuilder createProcessBuilder(String cmd, boolean useAlpine) { + String xcmd = useAlpine ? "source $PREFIX/init-sandbox.sh " + cmd : cmd; + ProcessBuilder builder = new ProcessBuilder("sh", "-c", xcmd); + setupEnvironment(builder.environment()); + return builder; + } + + /** + * Sets up common environment variables + */ + private void setupEnvironment(Map env) { + env.put("PREFIX", context.getFilesDir().getAbsolutePath()); + env.put("NATIVE_DIR", context.getApplicationInfo().nativeLibraryDir); + + TimeZone tz = TimeZone.getDefault(); + env.put("ANDROID_TZ", tz.getID()); + + try { + int target = context.getPackageManager() + .getPackageInfo(context.getPackageName(), 0) + .applicationInfo.targetSdkVersion; + env.put("FDROID", String.valueOf(target <= 28)); + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + } + + /** + * Reads all output from a stream + */ + public static String readStream(InputStream stream) throws IOException { + BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); + StringBuilder output = new StringBuilder(); + String line; + while ((line = reader.readLine()) != null) { + output.append(line).append("\n"); + } + return output.toString(); + } + + /** + * Executes a command and returns the result + */ + public ExecResult executeCommand(String cmd, boolean useAlpine) throws Exception { + ProcessBuilder builder = createProcessBuilder(cmd, useAlpine); + Process process = builder.start(); + + String stdout = readStream(process.getInputStream()); + String stderr = readStream(process.getErrorStream()); + int exitCode = process.waitFor(); + + return new ExecResult(exitCode, stdout.trim(), stderr.trim()); + } + + /** + * Result container for command execution + */ + public static class ExecResult { + public final int exitCode; + public final String stdout; + public final String stderr; + + public ExecResult(int exitCode, String stdout, String stderr) { + this.exitCode = exitCode; + this.stdout = stdout; + this.stderr = stderr; + } + + public boolean isSuccess() { + return exitCode == 0; + } + + public String getErrorMessage() { + if (!stderr.isEmpty()) { + return stderr; + } + return "Command exited with code: " + exitCode; + } + } +} \ No newline at end of file diff --git a/src/plugins/terminal/src/android/ProcessUtils.java b/src/plugins/terminal/src/android/ProcessUtils.java new file mode 100644 index 000000000..10ccc4034 --- /dev/null +++ b/src/plugins/terminal/src/android/ProcessUtils.java @@ -0,0 +1,45 @@ +package com.foxdebug.acode.rk.exec.terminal; + +import java.lang.reflect.Field; +import com.foxdebug.acode.rk.exec.terminal.*; + +public class ProcessUtils { + + /** + * Gets the PID of a process using reflection + */ + public static long getPid(Process process) { + try { + Field f = process.getClass().getDeclaredField("pid"); + f.setAccessible(true); + return f.getLong(process); + } catch (Exception e) { + return -1; + } + } + + /** + * Checks if a process is still alive + */ + public static boolean isAlive(Process process) { + try { + process.exitValue(); + return false; + } catch(IllegalThreadStateException e) { + return true; + } + } + + /** + * Forcefully kills a process and its children + */ + public static void killProcessTree(Process process) { + try { + long pid = getPid(process); + if (pid > 0) { + Runtime.getRuntime().exec("kill -9 -" + pid); + } + } catch (Exception ignored) {} + process.destroy(); + } +} \ No newline at end of file diff --git a/src/plugins/terminal/src/android/StreamHandler.java b/src/plugins/terminal/src/android/StreamHandler.java new file mode 100644 index 000000000..ab4c643c7 --- /dev/null +++ b/src/plugins/terminal/src/android/StreamHandler.java @@ -0,0 +1,31 @@ +package com.foxdebug.acode.rk.exec.terminal; + +import java.io.*; +import com.foxdebug.acode.rk.exec.terminal.*; +public class StreamHandler { + + public interface OutputListener { + void onLine(String line); + } + + /** + * Streams output from an InputStream to a listener + */ + public static void streamOutput(InputStream inputStream, OutputListener listener) { + try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) { + String line; + while ((line = reader.readLine()) != null) { + listener.onLine(line); + } + } catch (IOException ignored) { + } + } + + /** + * Writes input to an OutputStream + */ + public static void writeToStream(OutputStream outputStream, String input) throws IOException { + outputStream.write((input + "\n").getBytes()); + outputStream.flush(); + } +} \ No newline at end of file diff --git a/src/plugins/terminal/src/android/TerminalService.java b/src/plugins/terminal/src/android/TerminalService.java new file mode 100644 index 000000000..1d8281ee8 --- /dev/null +++ b/src/plugins/terminal/src/android/TerminalService.java @@ -0,0 +1,343 @@ +package com.foxdebug.acode.rk.exec.terminal; + +import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.app.Service; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import android.os.Bundle; +import android.os.Handler; +import android.os.IBinder; +import android.os.Message; +import android.os.Messenger; +import android.os.PowerManager; +import android.os.RemoteException; +import androidx.core.app.NotificationCompat; +import java.io.IOException; +import java.io.OutputStream; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executors; +import com.foxdebug.acode.rk.exec.terminal.*; + + +public class TerminalService extends Service { + + public static final int MSG_START_PROCESS = 1; + public static final int MSG_WRITE_TO_PROCESS = 2; + public static final int MSG_STOP_PROCESS = 3; + public static final int MSG_IS_RUNNING = 4; + public static final int MSG_EXEC = 5; + + public static final String CHANNEL_ID = "terminal_exec_channel"; + + public static final String ACTION_EXIT_SERVICE = "com.foxdebug.acode.ACTION_EXIT_SERVICE"; + public static final String MOVE_TO_BACKGROUND = "com.foxdebug.acode.MOVE_TO_BACKGROUND"; + public static final String MOVE_TO_FOREGROUND = "com.foxdebug.acode.MOVE_TO_FOREGROUND"; + public static final String ACTION_TOGGLE_WAKE_LOCK = "com.foxdebug.acode.ACTION_TOGGLE_WAKE_LOCK"; + public static boolean Default_Foreground = true; + + private final Map processes = new ConcurrentHashMap<>(); + private final Map processInputs = new ConcurrentHashMap<>(); + private final Map clientMessengers = new ConcurrentHashMap<>(); + private final java.util.concurrent.ExecutorService threadPool = Executors.newCachedThreadPool(); + + private final Messenger serviceMessenger = new Messenger(new ServiceHandler()); + + private PowerManager.WakeLock wakeLock; + private boolean isWakeLockHeld = false; + private ProcessManager processManager; + + @Override + public void onCreate() { + super.onCreate(); + processManager = new ProcessManager(this); + if(Default_Foreground){ + createNotificationChannel(); + updateNotification(); + } + } + + @Override + public IBinder onBind(Intent intent) { + return serviceMessenger.getBinder(); + } + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + if (intent != null) { + String action = intent.getAction(); + if (ACTION_EXIT_SERVICE.equals(action)) { + stopForeground(true); + stopSelf(); + return START_NOT_STICKY; + } else if (ACTION_TOGGLE_WAKE_LOCK.equals(action)) { + toggleWakeLock(); + } else if(MOVE_TO_BACKGROUND.equals(action)){ + Default_Foreground = false; + stopForeground(true); + } else if(MOVE_TO_FOREGROUND.equals(action)){ + Default_Foreground = true; + createNotificationChannel(); + updateNotification(); + } + } + return START_STICKY; + } + + private class ServiceHandler extends Handler { + @Override + public void handleMessage(Message msg) { + Bundle bundle = msg.getData(); + String id = bundle.getString("id"); + Messenger clientMessenger = msg.replyTo; + + switch (msg.what) { + case MSG_START_PROCESS: + String cmd = bundle.getString("cmd"); + String alpine = bundle.getString("alpine"); + clientMessengers.put(id, clientMessenger); + startProcess(id, cmd, "true".equals(alpine)); + break; + case MSG_WRITE_TO_PROCESS: + String input = bundle.getString("input"); + writeToProcess(id, input); + break; + case MSG_STOP_PROCESS: + stopProcess(id); + break; + case MSG_IS_RUNNING: + isProcessRunning(id, clientMessenger); + break; + case MSG_EXEC: + String execCmd = bundle.getString("cmd"); + String execAlpine = bundle.getString("alpine"); + clientMessengers.put(id, clientMessenger); + exec(id, execCmd, "true".equals(execAlpine)); + break; + } + } + } + + private void toggleWakeLock() { + if (isWakeLockHeld) { + releaseWakeLock(); + } else { + acquireWakeLock(); + } + updateNotification(); + } + + private void acquireWakeLock() { + if (wakeLock == null) { + PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE); + wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "AcodeTerminal:WakeLock"); + } + + if (!isWakeLockHeld) { + wakeLock.acquire(); + isWakeLockHeld = true; + } + } + + private void releaseWakeLock() { + if (wakeLock != null && isWakeLockHeld) { + wakeLock.release(); + isWakeLockHeld = false; + } + } + + private void startProcess(String pid, String cmd, boolean useAlpine) { + threadPool.execute(() -> { + try { + ProcessBuilder builder = processManager.createProcessBuilder(cmd, useAlpine); + Process process = builder.start(); + + processes.put(pid, process); + processInputs.put(pid, process.getOutputStream()); + + // Stream stdout + threadPool.execute(() -> + StreamHandler.streamOutput(process.getInputStream(), + line -> sendMessageToClient(pid, "stdout", line)) + ); + + // Stream stderr + threadPool.execute(() -> + StreamHandler.streamOutput(process.getErrorStream(), + line -> sendMessageToClient(pid, "stderr", line)) + ); + + // Wait for process completion + threadPool.execute(() -> { + try { + int exitCode = process.waitFor(); + sendMessageToClient(pid, "exit", String.valueOf(exitCode)); + cleanup(pid); + } catch (InterruptedException e) { + e.printStackTrace(); + } + }); + } catch (IOException e) { + e.printStackTrace(); + sendMessageToClient(pid, "stderr", "Failed to start process: " + e.getMessage()); + sendMessageToClient(pid, "exit", "1"); + cleanup(pid); + } + }); + } + + private void exec(String execId, String cmd, boolean useAlpine) { + threadPool.execute(() -> { + try { + ProcessManager.ExecResult result = processManager.executeCommand(cmd, useAlpine); + + if (result.isSuccess()) { + sendExecResultToClient(execId, true, result.stdout); + } else { + sendExecResultToClient(execId, false, result.getErrorMessage()); + } + + cleanup(execId); + } catch (Exception e) { + sendExecResultToClient(execId, false, "Exception: " + e.getMessage()); + cleanup(execId); + } + }); + } + + private void sendMessageToClient(String id, String action, String data) { + Messenger clientMessenger = clientMessengers.get(id); + if (clientMessenger != null) { + try { + Message msg = Message.obtain(); + Bundle bundle = new Bundle(); + bundle.putString("id", id); + bundle.putString("action", action); + bundle.putString("data", data); + msg.setData(bundle); + clientMessenger.send(msg); + } catch (RemoteException e) { + cleanup(id); + } + } + } + + private void sendExecResultToClient(String id, boolean isSuccess, String data) { + Messenger clientMessenger = clientMessengers.get(id); + if (clientMessenger != null) { + try { + Message msg = Message.obtain(); + Bundle bundle = new Bundle(); + bundle.putString("id", id); + bundle.putString("action", "exec_result"); + bundle.putString("data", data); + bundle.putBoolean("isSuccess", isSuccess); + msg.setData(bundle); + clientMessenger.send(msg); + } catch (RemoteException e) { + cleanup(id); + } + } + } + + private void writeToProcess(String pid, String input) { + try { + OutputStream os = processInputs.get(pid); + if (os != null) { + StreamHandler.writeToStream(os, input); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + private void stopProcess(String pid) { + Process process = processes.get(pid); + if (process != null) { + ProcessUtils.killProcessTree(process); + cleanup(pid); + } + } + + private void isProcessRunning(String pid, Messenger clientMessenger) { + Process process = processes.get(pid); + String status = process != null && ProcessUtils.isAlive(process) ? "running" : "not_found"; + sendMessageToClient(pid, "isRunning", status); + } + + private void cleanup(String id) { + processes.remove(id); + processInputs.remove(id); + clientMessengers.remove(id); + } + + private void createNotificationChannel() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + NotificationChannel serviceChannel = new NotificationChannel( + CHANNEL_ID, + "Terminal Executor Channel", + NotificationManager.IMPORTANCE_LOW + ); + NotificationManager manager = getSystemService(NotificationManager.class); + if (manager != null) { + manager.createNotificationChannel(serviceChannel); + } + } + } + + private void updateNotification() { + Intent exitIntent = new Intent(this, TerminalService.class); + exitIntent.setAction(ACTION_EXIT_SERVICE); + PendingIntent exitPendingIntent = PendingIntent.getService(this, 0, exitIntent, + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); + + Intent wakeLockIntent = new Intent(this, TerminalService.class); + wakeLockIntent.setAction(ACTION_TOGGLE_WAKE_LOCK); + PendingIntent wakeLockPendingIntent = PendingIntent.getService(this, 1, wakeLockIntent, + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); + + String contentText = "Executor service" + (isWakeLockHeld ? " (wakelock held)" : ""); + String wakeLockButtonText = isWakeLockHeld ? "Release Wake Lock" : "Acquire Wake Lock"; + + int notificationIcon = resolveDrawableId("ic_notification", "ic_launcher_foreground", "ic_launcher"); + + Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID) + .setContentTitle("Acode Service") + .setContentText(contentText) + .setSmallIcon(notificationIcon) + .setOngoing(true) + .addAction(notificationIcon, wakeLockButtonText, wakeLockPendingIntent) + .addAction(notificationIcon, "Exit", exitPendingIntent) + .build(); + + startForeground(1, notification); + } + + @Override + public void onDestroy() { + stopForeground(true); + super.onDestroy(); + releaseWakeLock(); + + for (Process process : processes.values()) { + ProcessUtils.killProcessTree(process); + } + + processes.clear(); + processInputs.clear(); + clientMessengers.clear(); + threadPool.shutdown(); + } + + private int resolveDrawableId(String... names) { + for (String name : names) { + int id = getResources().getIdentifier(name, "drawable", getPackageName()); + if (id != 0) return id; + } + return android.R.drawable.sym_def_app_icon; + } +} \ No newline at end of file diff --git a/src/plugins/terminal/www/Executor.js b/src/plugins/terminal/www/Executor.js new file mode 100644 index 000000000..419713e6d --- /dev/null +++ b/src/plugins/terminal/www/Executor.js @@ -0,0 +1,201 @@ +/** + * @class Executor + * @description + * This class provides an interface to run shell commands from a Cordova app. + * It supports real-time process streaming, writing input to running processes, + * stopping them, and executing one-time commands. + */ + +const exec = require('cordova/exec'); + +class Executor { + constructor(BackgroundExecutor = false) { + this.ExecutorType = BackgroundExecutor ? "BackgroundExecutor" : "Executor"; + } + /** + * Starts a shell process and enables real-time streaming of stdout, stderr, and exit status. + * + * @param {string} command - The shell command to run (e.g., `"sh"`, `"ls -al"`). + * @param {(type: 'stdout' | 'stderr' | 'exit', data: string) => void} onData - Callback that receives real-time output: + * - `"stdout"`: Standard output line. + * - `"stderr"`: Standard error line. + * - `"exit"`: Exit code of the process. + * @param {boolean} [alpine=false] - Whether to run the command inside the Alpine sandbox environment (`true`) or on Android directly (`false`). + * @returns {Promise} Resolves with a unique process ID (UUID) used for future references like `write()` or `stop()`. + * + * @example + * const executor = new Executor(); + * executor.start('sh', (type, data) => { + * //console.log(`[${type}] ${data}`); + * }).then(uuid => { + * executor.write(uuid, 'echo Hello World'); + * executor.stop(uuid); + * }); + */ + start(command, onData, alpine = false) { + return new Promise((resolve, reject) => { + let first = true; + exec( + async (message) => { + //console.log(message); + if (first) { + first = false; + await new Promise(resolve => setTimeout(resolve, 100)); + // First message is always the process UUID + resolve(message); + } else { + const match = message.match(/^([^:]+):(.*)$/); + if (match) { + const prefix = match[1]; // e.g. "stdout" + const content = match[2].trim(); // output + onData(prefix, content); + } else { + onData("unknown", message); + } + } + }, + reject, + this.ExecutorType, + "start", + [command, String(alpine)] + ); + }); + } + + /** + * Sends input to a running process's stdin. + * + * @param {string} uuid - The process ID returned by {@link Executor#start}. + * @param {string} input - Input string to send (e.g., shell commands). + * @returns {Promise} Resolves once the input is written. + * + * @example + * executor.write(uuid, 'ls /sdcard'); + */ + write(uuid, input) { + //console.log("write: " + input + " to " + uuid); + return new Promise((resolve, reject) => { + exec(resolve, reject, this.ExecutorType, "write", [uuid, input]); + }); + } + + /** + * Moves the executor service to the background (stops foreground notification). + * + * @returns {Promise} Resolves when the service is moved to background. + * + * @example + * executor.moveToBackground(); + */ + moveToBackground() { + return new Promise((resolve, reject) => { + exec(resolve, reject, this.ExecutorType, "moveToBackground", []); + }); + } + + /** + * Moves the executor service to the foreground (shows notification). + * + * @returns {Promise} Resolves when the service is moved to foreground. + * + * @example + * executor.moveToForeground(); + */ + moveToForeground() { + return new Promise((resolve, reject) => { + exec(resolve, reject, this.ExecutorType, "moveToForeground", []); + }); + } + + /** + * Terminates a running process. + * + * @param {string} uuid - The process ID returned by {@link Executor#start}. + * @returns {Promise} Resolves when the process has been stopped. + * + * @example + * executor.stop(uuid); + */ + stop(uuid) { + return new Promise((resolve, reject) => { + exec(resolve, reject, this.ExecutorType, "stop", [uuid]); + }); + } + + /** + * Checks if a process is still running. + * + * @param {string} uuid - The process ID returned by {@link Executor#start}. + * @returns {Promise} Resolves `true` if the process is running, `false` otherwise. + * + * @example + * const isAlive = await executor.isRunning(uuid); + */ + isRunning(uuid) { + return new Promise((resolve, reject) => { + exec( + (result) => { + resolve(result === "running"); + }, + reject, + this.ExecutorType, + "isRunning", + [uuid] + ); + }); + } + + /** + * Stops the executor service completely. + * + * @returns {Promise} Resolves when the service has been stopped. + * + * @example + * executor.stopService(); + */ + stopService() { + return new Promise((resolve, reject) => { + exec(resolve, reject, this.ExecutorType, "stopService", []); + }); + } + + /** + * Executes a shell command once and waits for it to finish. + * Unlike {@link Executor#start}, this does not stream output. + * + * @param {string} command - The shell command to execute. + * @param {boolean} [alpine=false] - Whether to run the command in the Alpine sandbox (`true`) or Android environment (`false`). + * @returns {Promise} Resolves with standard output on success, rejects with an error or standard error on failure. + * + * @example + * executor.execute('ls -l') + * .then(//console.log) + * .catch(console.error); + */ + execute(command, alpine = false) { + return new Promise((resolve, reject) => { + exec(resolve, reject, this.ExecutorType, "exec", [command, String(alpine)]); + }); + } + + /** + * Loads a native library from the specified path. + * + * @param {string} path - The path to the native library to load. + * @returns {Promise} Resolves when the library has been loaded. + * + * @example + * executor.loadLibrary('/path/to/library.so'); + */ + loadLibrary(path) { + return new Promise((resolve, reject) => { + exec(resolve, reject, this.ExecutorType, "loadLibrary", [path]); + }); + } +} + +//backward compatibility +const executorInstance = new Executor(); +executorInstance.BackgroundExecutor = new Executor(true); + +module.exports = executorInstance; \ No newline at end of file diff --git a/src/plugins/terminal/www/Terminal.js b/src/plugins/terminal/www/Terminal.js new file mode 100644 index 000000000..d63c29c16 --- /dev/null +++ b/src/plugins/terminal/www/Terminal.js @@ -0,0 +1,463 @@ +const Executor = require("./Executor"); + +const Terminal = { + /** + * Starts the AXS environment by writing init scripts and executing the sandbox. + * @param {boolean} [installing=false] - Whether AXS is being started during installation. + * @param {Function} [logger=console.log] - Function to log standard output. + * @param {Function} [err_logger=console.error] - Function to log errors. + * @returns {Promise} - Returns true if installation completes with exit code 0, void if not installing + */ + async startAxs(installing = false, logger = console.log, err_logger = console.error) { + const filesDir = await new Promise((resolve, reject) => { + system.getFilesDir(resolve, reject); + }); + + if (installing) { + return new Promise((resolve, reject) => { + readAsset("init-alpine.sh", async (content) => { + system.writeText(`${filesDir}/init-alpine.sh`, content, logger, err_logger); + }); + + readAsset("rm-wrapper.sh", async (content) => { + system.deleteFile(`${filesDir}/alpine/bin/rm`, logger, err_logger); + system.writeText(`${filesDir}/alpine/bin/rm`, content, logger, err_logger); + system.setExec(`${filesDir}/alpine/bin/rm`, true, logger, err_logger); + }); + + readAsset("init-sandbox.sh", (content) => { + system.writeText(`${filesDir}/init-sandbox.sh`, content, logger, err_logger); + + Executor.start("sh", (type, data) => { + logger(`${type} ${data}`); + + // Check for exit code during installation + if (type === "exit") { + resolve(data === "0"); + } + }).then(async (uuid) => { + await Executor.write(uuid, `source ${filesDir}/init-sandbox.sh ${installing ? "--installing" : ""}; exit`); + }).catch((error) => { + err_logger("Failed to start AXS:", error); + resolve(false); + }); + }); + }); + } else { + readAsset("rm-wrapper.sh", async (content) => { + system.deleteFile(`${filesDir}/alpine/bin/rm`, logger, err_logger); + system.writeText(`${filesDir}/alpine/bin/rm`, content, logger, err_logger); + system.setExec(`${filesDir}/alpine/bin/rm`, true, logger, err_logger); + }); + + readAsset("init-alpine.sh", async (content) => { + system.writeText(`${filesDir}/init-alpine.sh`, content, logger, err_logger); + }); + + readAsset("init-sandbox.sh", (content) => { + system.writeText(`${filesDir}/init-sandbox.sh`, content, logger, err_logger); + + Executor.start("sh", (type, data) => { + logger(`${type} ${data}`); + }).then(async (uuid) => { + await Executor.write(uuid, `source ${filesDir}/init-sandbox.sh ${installing ? "--installing" : ""}; exit`); + }); + }); + } + }, + + /** + * Stops the AXS process by forcefully killing it. + * @returns {Promise} + */ + async stopAxs() { + await Executor.execute(`kill -KILL $(cat $PREFIX/pid)`); + }, + + /** + * Checks if the AXS process is currently running. + * @returns {Promise} - `true` if AXS is running, `false` otherwise. + */ + async isAxsRunning() { + const filesDir = await new Promise((resolve, reject) => { + system.getFilesDir(resolve, reject); + }); + + const pidExists = await new Promise((resolve, reject) => { + system.fileExists(`${filesDir}/pid`, false, (result) => { + resolve(result == 1); + }, reject); + }); + + if (!pidExists) return false; + + const result = await Executor.BackgroundExecutor.execute(`kill -0 $(cat $PREFIX/pid) 2>/dev/null && echo "true" || echo "false"`); + return String(result).toLowerCase() === "true"; + }, + + /** + * Installs Alpine by downloading binaries and extracting the root filesystem. + * Also sets up additional dependencies for F-Droid variant. + * @param {Function} [logger=console.log] - Function to log standard output. + * @param {Function} [err_logger=console.error] - Function to log errors. + * @returns {Promise} - Returns true if installation completes with exit code 0 + */ + async install(logger = console.log, err_logger = console.error) { + if (!(await this.isSupported())) return false; + + try { + //cleanup before insatll + await this.uninstall(); + } catch (e) { + //supress error + } + + const filesDir = await new Promise((resolve, reject) => { + system.getFilesDir(resolve, reject); + }); + + const arch = await new Promise((resolve, reject) => { + system.getArch(resolve, reject); + }); + + try { + let alpineUrl; + let axsUrl; + let prootUrl; + let libTalloc; + let libproot = null; + let libproot32 = null; + + if (arch === "arm64-v8a") { + libproot = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm64/libproot.so"; + libproot32 = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm64/libproot32.so"; + libTalloc = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm64/libtalloc.so"; + prootUrl = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm64/libproot-xed.so"; + axsUrl = `https://github.com/bajrangCoder/acodex_server/releases/latest/download/axs-musl-android-arm64`; + alpineUrl = "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/aarch64/alpine-minirootfs-3.21.0-aarch64.tar.gz"; + } else if (arch === "armeabi-v7a") { + libproot = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm32/libproot.so"; + libTalloc = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm32/libtalloc.so"; + prootUrl = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/arm32/libproot-xed.so"; + axsUrl = `https://github.com/bajrangCoder/acodex_server/releases/latest/download/axs-musl-android-armv7`; + alpineUrl = "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/armhf/alpine-minirootfs-3.21.0-armhf.tar.gz"; + } else if (arch === "x86_64") { + libproot = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/x64/libproot.so"; + libproot32 = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/x64/libproot32.so"; + libTalloc = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/x64/libtalloc.so"; + prootUrl = "https://raw.githubusercontent.com/Acode-Foundation/Acode/main/src/plugins/proot/libs/x64/libproot-xed.so"; + axsUrl = `https://github.com/bajrangCoder/acodex_server/releases/latest/download/axs-musl-android-x86_64`; + alpineUrl = "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/x86_64/alpine-minirootfs-3.21.0-x86_64.tar.gz"; + } else { + throw new Error(`Unsupported architecture: ${arch}`); + } + + + logger("⬇️ Downloading sandbox filesystem..."); + await new Promise((resolve, reject) => { + cordova.plugin.http.downloadFile( + alpineUrl, {}, {}, + cordova.file.dataDirectory + "alpine.tar.gz", + resolve, reject + ); + }); + + logger("⬇️ Downloading axs..."); + await new Promise((resolve, reject) => { + cordova.plugin.http.downloadFile( + axsUrl, {}, {}, + cordova.file.dataDirectory + "axs", + resolve, reject + ); + }); + + const isFdroid = await Executor.execute("echo $FDROID"); + if (isFdroid === "true") { + logger("🐧 F-Droid flavor detected, downloading additional files..."); + logger("⬇️ Downloading compatibility layer..."); + await new Promise((resolve, reject) => { + cordova.plugin.http.downloadFile( + prootUrl, {}, {}, + cordova.file.dataDirectory + "libproot-xed.so", + resolve, reject + ); + }); + + logger("⬇️ Downloading supporting library..."); + await new Promise((resolve, reject) => { + cordova.plugin.http.downloadFile( + libTalloc, {}, {}, + cordova.file.dataDirectory + "libtalloc.so.2", + resolve, reject + ); + }); + + if (libproot != null) { + await new Promise((resolve, reject) => { + cordova.plugin.http.downloadFile( + libproot, {}, {}, + cordova.file.dataDirectory + "libproot.so", + resolve, reject + ); + }); + } + + if (libproot32 != null) { + await new Promise((resolve, reject) => { + cordova.plugin.http.downloadFile( + libproot32, {}, {}, + cordova.file.dataDirectory + "libproot32.so", + resolve, reject + ); + }); + } + + } + + logger("✅ All downloads completed"); + + logger("📁 Setting up directories..."); + + await new Promise((resolve, reject) => { + system.mkdirs(`${filesDir}/.downloaded`, resolve, reject); + }); + + const alpineDir = `${filesDir}/alpine`; + + await new Promise((resolve, reject) => { + system.mkdirs(alpineDir, resolve, reject); + }); + + logger("📦 Extracting sandbox filesystem..."); + await Executor.execute(`tar --no-same-owner -xf ${filesDir}/alpine.tar.gz -C ${alpineDir}`); + + logger("⚙️ Applying basic configuration..."); + system.writeText(`${alpineDir}/etc/resolv.conf`, `nameserver 8.8.4.4 \nnameserver 8.8.8.8`); + + readAsset("rm-wrapper.sh", async (content) => { + system.deleteFile(`${alpineDir}/bin/rm`, logger, err_logger); + system.writeText(`${alpineDir}/bin/rm`, content, logger, err_logger); + system.setExec(`${alpineDir}/bin/rm`, true, logger, err_logger); + }); + + logger("✅ Extraction complete"); + await new Promise((resolve, reject) => { + system.mkdirs(`${filesDir}/.extracted`, resolve, reject); + }); + + logger("⚙️ Updating sandbox enviroment..."); + const installResult = await this.startAxs(true, logger, err_logger); + return installResult; + + } catch (e) { + err_logger("Installation failed:", e); + console.error("Installation failed:", e); + return false; + } + }, + + /** + * Checks if alpine is already installed. + * @returns {Promise} - Returns true if all required files and directories exist. + */ + isInstalled() { + return new Promise(async (resolve, reject) => { + const filesDir = await new Promise((resolve, reject) => { + system.getFilesDir(resolve, reject); + }); + + const alpineExists = await new Promise((resolve, reject) => { + system.fileExists(`${filesDir}/alpine`, false, (result) => { + resolve(result == 1); + }, reject); + }); + + const downloaded = alpineExists && await new Promise((resolve, reject) => { + system.fileExists(`${filesDir}/.downloaded`, false, (result) => { + resolve(result == 1); + }, reject); + }); + + const extracted = alpineExists && await new Promise((resolve, reject) => { + system.fileExists(`${filesDir}/.extracted`, false, (result) => { + resolve(result == 1); + }, reject); + }); + + const configured = alpineExists && await new Promise((resolve, reject) => { + system.fileExists(`${filesDir}/.configured`, false, (result) => { + resolve(result == 1); + }, reject); + }); + + resolve(alpineExists && downloaded && extracted && configured); + }); + }, + + /** + * Checks if the current device architecture is supported. + * @returns {Promise} - `true` if architecture is supported, otherwise `false`. + */ + isSupported() { + return new Promise((resolve, reject) => { + system.getArch((arch) => { + resolve(["arm64-v8a", "armeabi-v7a", "x86_64"].includes(arch)); + }, reject); + }); + }, + /** + * Creates a backup of the Alpine Linux installation + * @async + * @function backup + * @description Creates a compressed tar archive of the Alpine installation + * @returns {Promise} Promise that resolves to the file URI of the created backup file (aterm_backup.tar) + * @throws {string} Rejects with "Alpine is not installed." if Alpine is not currently installed + * @throws {string} Rejects with command output if backup creation fails + * @example + * try { + * const backupPath = await backup(); + * console.log(`Backup created at: ${backupPath}`); + * } catch (error) { + * console.error(`Backup failed: ${error}`); + * } + */ + backup() { + return new Promise(async (resolve, reject) => { + if (!await this.isInstalled()) { + reject("Alpine is not installed."); + return; + } + + const cmd = ` + set -e + + INCLUDE_FILES="alpine .downloaded .extracted axs" + if [ "$FDROID" = "true" ]; then + INCLUDE_FILES="$INCLUDE_FILES libtalloc.so.2 libproot-xed.so" + fi + + EXCLUDE="--exclude=alpine/data --exclude=alpine/system --exclude=alpine/vendor --exclude=alpine/sdcard --exclude=alpine/storage --exclude=alpine/public" + + tar -cf "$PREFIX/aterm_backup.tar" -C "$PREFIX" $EXCLUDE $INCLUDE_FILES + echo "ok" + `; + + const result = await Executor.execute(cmd); + if (result === "ok") { + resolve(cordova.file.dataDirectory + "aterm_backup.tar"); + } else { + reject(result); + } + }); + }, + /** + * Restores Alpine Linux installation from a backup file + * @async + * @function restore + * @description Restores the Alpine installation from a previously created backup file (aterm_backup.tar). + * This function stops any running Alpine processes, removes existing installation files, and extracts + * the backup to restore the previous state. The backup file must exist in the expected location. + * @returns {Promise} Promise that resolves to "ok" when restoration completes successfully + * @throws {string} Rejects with "Backup File does not exist" if aterm_backup.tar is not found + * @throws {string} Rejects with command output if restoration fails + * @example + * try { + * await restore(); + * console.log("Alpine installation restored successfully"); + * } catch (error) { + * console.error(`Restore failed: ${error}`); + * } + */ + restore() { + return new Promise(async (resolve, reject) => { + if (await this.isAxsRunning()) { + await this.stopAxs(); + } + + const cmd = ` + sleep 2 + + INCLUDE_FILES="$PREFIX/alpine $PREFIX/.downloaded $PREFIX/.extracted $PREFIX/axs" + + if [ "$FDROID" = "true" ]; then + INCLUDE_FILES="$INCLUDE_FILES $PREFIX/libtalloc.so.2 $PREFIX/libproot-xed.so" + fi + + for item in $INCLUDE_FILES; do + rm -rf -- "$item" + done + + tar -xf "$PREFIX/aterm_backup.bin" -C "$PREFIX" + echo "ok" + `; + + const result = await Executor.execute(cmd); + if (result === "ok") { + resolve(result); + } else { + reject(result); + } + }); + }, + /** + * Uninstalls the Alpine Linux installation + * @async + * @function uninstall + * @description Completely removes the Alpine Linux installation from the device by deleting all + * Alpine-related files and directories. This function stops any running Alpine processes before + * removal. NOTE: This does not perform cleanup of $PREFIX + * @returns {Promise} Promise that resolves to "ok" when uninstallation completes successfully + * @throws {string} Rejects with command output if uninstallation fails + * @example + * try { + * await uninstall(); + * console.log("Alpine installation removed successfully"); + * } catch (error) { + * console.error(`Uninstall failed: ${error}`); + * } + */ + uninstall() { + return new Promise(async (resolve, reject) => { + if (await this.isAxsRunning()) { + await this.stopAxs(); + } + + const cmd = ` + set -e + + INCLUDE_FILES="$PREFIX/alpine $PREFIX/.downloaded $PREFIX/.extracted $PREFIX/axs" + + if [ "$FDROID" = "true" ]; then + INCLUDE_FILES="$INCLUDE_FILES $PREFIX/libtalloc.so.2 $PREFIX/libproot-xed.so" + fi + + for item in $INCLUDE_FILES; do + rm -rf -- "$item" + done + + echo "ok" + `; + const result = await Executor.execute(cmd); + if (result === "ok") { + resolve(result); + } else { + reject(result); + } + }); + } +}; + + +function readAsset(assetPath, callback) { + const assetUrl = "file:///android_asset/" + assetPath; + + window.resolveLocalFileSystemURL(assetUrl, fileEntry => { + fileEntry.file(file => { + const reader = new FileReader(); + reader.onloadend = () => callback(reader.result); + reader.readAsText(file); + }, console.error); + }, console.error); +} + +module.exports = Terminal; \ No newline at end of file diff --git a/src/plugins/webserver/package.json b/src/plugins/webserver/package.json deleted file mode 100644 index ffd2ece18..000000000 --- a/src/plugins/webserver/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "cordova-plugin-webserver", - "version": "1.0.0", - "main": "index.js", - "license": "MIT" -} diff --git a/src/plugins/webserver/plugin.xml b/src/plugins/webserver/plugin.xml deleted file mode 100644 index 3ace78ab5..000000000 --- a/src/plugins/webserver/plugin.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - Webserver for Cordova Apps - webserver,cordova,http, request, response,server - - - - - - - - - - - - - - - - - diff --git a/src/plugins/webserver/src/android/NanoHTTPDWebserver.java b/src/plugins/webserver/src/android/NanoHTTPDWebserver.java deleted file mode 100644 index e1415f2b2..000000000 --- a/src/plugins/webserver/src/android/NanoHTTPDWebserver.java +++ /dev/null @@ -1,330 +0,0 @@ -package org.apache.cordova.plugin; - -import android.content.ContentResolver; -import android.content.Context; -import android.net.Uri; -import androidx.documentfile.provider.DocumentFile; -import fi.iki.elonen.NanoHTTPD; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.lang.reflect.Method; -import java.net.URLConnection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.UUID; -import org.apache.cordova.PluginResult; -import org.json.JSONException; -import org.json.JSONObject; - -public class NanoHTTPDWebserver extends NanoHTTPD { - - Webserver webserver; - Context context; - - public NanoHTTPDWebserver(int port, Webserver webserver, Context context) { - super(port); - this.webserver = webserver; - this.context = context; - } - - private String getBodyText(IHTTPSession session) { - Map files = new HashMap(); - Method method = session.getMethod(); - if (Method.PUT.equals(method) || Method.POST.equals(method)) { - try { - session.parseBody(files); - } catch (IOException ioe) { - return "{}"; - } catch (ResponseException re) { - return "{}"; - } - } - // get the POST body - return files.get("postData"); - } - - /** - * Create a request object - *

    - * [ "requestId": requestUUID, " body": request.jsonObject ?? "", " headers": - * request.headers, " method": request.method, " path": request.url.path, " - * query": request.url.query ?? "" ] - * - * @param session - * @return - */ - private JSONObject createJSONRequest(String requestId, IHTTPSession session) - throws JSONException { - JSONObject jsonRequest = new JSONObject(); - jsonRequest.put("requestId", requestId); - jsonRequest.put("body", this.getBodyText(session)); - jsonRequest.put("headers", session.getHeaders()); - jsonRequest.put("method", session.getMethod()); - jsonRequest.put("path", session.getUri()); - jsonRequest.put("query", session.getQueryParameterString()); - return jsonRequest; - } - - private String getContentType(JSONObject responseObject) - throws JSONException { - if ( - responseObject.has("headers") && - responseObject.getJSONObject("headers").has("Content-Type") - ) { - return responseObject.getJSONObject("headers").getString("Content-Type"); - } else { - return "text/plain"; - } - } - - private Response newFixedFileResponse(DocumentFile file, String mime) - throws FileNotFoundException, IOException { - Response res; - res = - newFixedLengthResponse( - Response.Status.OK, - mime, - getInputStream(file), - (int) file.length() - ); - res.addHeader("Accept-Ranges", "bytes"); - return res; - } - - Response serveFile( - Map header, - DocumentFile file, - String mime - ) { - Response res; - try { - // Calculate etag - long fileLen = file.length(); - String path = file.getUri().toString(); - String etag = Integer.toHexString( - (path + file.lastModified() + "" + fileLen).hashCode() - ); - - // Support (simple) skipping: - long startFrom = 0; - long endAt = -1; - String range = header.get("range"); - if (range != null) { - if (range.startsWith("bytes=")) { - range = range.substring("bytes=".length()); - int minus = range.indexOf('-'); - try { - if (minus > 0) { - startFrom = Long.parseLong(range.substring(0, minus)); - endAt = Long.parseLong(range.substring(minus + 1)); - } - } catch (NumberFormatException ignored) {} - } - } - - // get if-range header. If present, it must match etag or else we - // should ignore the range request - String ifRange = header.get("if-range"); - boolean headerIfRangeMissingOrMatching = - (ifRange == null || etag.equals(ifRange)); - - String ifNoneMatch = header.get("if-none-match"); - boolean headerIfNoneMatchPresentAndMatching = - ifNoneMatch != null && - ("*".equals(ifNoneMatch) || ifNoneMatch.equals(etag)); - - if ( - headerIfRangeMissingOrMatching && - range != null && - startFrom >= 0 && - startFrom < fileLen - ) { - // range request that matches current etag - // and the startFrom of the range is satisfiable - if (headerIfNoneMatchPresentAndMatching) { - // range request that matches current etag - // and the startFrom of the range is satisfiable - // would return range from file - // respond with not-modified - res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, ""); - res.addHeader("ETag", etag); - } else { - if (endAt < 0) { - endAt = fileLen - 1; - } - long newLen = endAt - startFrom + 1; - if (newLen < 0) { - newLen = 0; - } - - InputStream is = getInputStream(file); - is.skip(startFrom); - - res = - newFixedLengthResponse( - Response.Status.PARTIAL_CONTENT, - mime, - is, - newLen - ); - res.addHeader("Accept-Ranges", "bytes"); - res.addHeader("Content-Length", "" + newLen); - res.addHeader( - "Content-Range", - "bytes " + startFrom + "-" + endAt + "/" + fileLen - ); - res.addHeader("ETag", etag); - } - } else { - if ( - headerIfRangeMissingOrMatching && - range != null && - startFrom >= fileLen - ) { - // return the size of the file - // 4xx responses are not trumped by if-none-match - res = - newFixedLengthResponse( - Response.Status.RANGE_NOT_SATISFIABLE, - NanoHTTPD.MIME_PLAINTEXT, - "" - ); - res.addHeader("Content-Range", "bytes */" + fileLen); - res.addHeader("ETag", etag); - } else if (range == null && headerIfNoneMatchPresentAndMatching) { - // full-file-fetch request - // would return entire file - // respond with not-modified - res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, ""); - res.addHeader("ETag", etag); - } else if ( - !headerIfRangeMissingOrMatching && headerIfNoneMatchPresentAndMatching - ) { - // range request that doesn't match current etag - // would return entire (different) file - // respond with not-modified - - res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, ""); - res.addHeader("ETag", etag); - } else { - // supply the file - res = newFixedFileResponse(file, mime); - res.addHeader("Content-Length", "" + fileLen); - res.addHeader("ETag", etag); - } - } - } catch (Exception e) { - String type = e.getClass().getName(); - if (type.equals("FileNotFoundException")) res = - newFixedLengthResponse( - Response.Status.NOT_FOUND, - NanoHTTPD.MIME_PLAINTEXT, - e.getMessage() - ); else res = - newFixedLengthResponse( - Response.Status.FORBIDDEN, - NanoHTTPD.MIME_PLAINTEXT, - e.getMessage() - ); - } - - return res; - } - - @Override - public Response serve(IHTTPSession session) { - String requestUUID = UUID.randomUUID().toString(); - - PluginResult pluginResult = null; - try { - pluginResult = - new PluginResult( - PluginResult.Status.OK, - this.createJSONRequest(requestUUID, session) - ); - } catch (JSONException e) { - e.printStackTrace(); - } - pluginResult.setKeepCallback(true); - this.webserver.onRequestCallbackContext.sendPluginResult(pluginResult); - - while (!this.webserver.responses.containsKey(requestUUID)) { - try { - Thread.sleep(1); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - JSONObject responseObject = (JSONObject) this.webserver.responses.get( - requestUUID - ); - Response response = null; - - if (responseObject.has("path")) { - try { - String path = responseObject.getString("path"); - DocumentFile file = getFile(path); - String mimeType = URLConnection.guessContentTypeFromName(path); - Response res = serveFile(session.getHeaders(), file, mimeType); - Iterator keys = responseObject.getJSONObject("headers").keys(); - while (keys.hasNext()) { - String key = (String) keys.next(); - res.addHeader( - key, - responseObject.getJSONObject("headers").getString(key) - ); - } - return res; - } catch (JSONException e) { - e.printStackTrace(); - } - return response; - } else { - try { - response = - newFixedLengthResponse( - Response.Status.lookup(responseObject.getInt("status")), - getContentType(responseObject), - responseObject.getString("body") - ); - - Iterator keys = responseObject.getJSONObject("headers").keys(); - while (keys.hasNext()) { - String key = (String) keys.next(); - response.addHeader( - key, - responseObject.getJSONObject("headers").getString(key) - ); - } - } catch (JSONException e) { - e.printStackTrace(); - } - return response; - } - } - - private DocumentFile getFile(String filePath) { - Uri fileUri = Uri.parse(filePath); - DocumentFile documentFile = null; - if (filePath.matches("file:///(.*)")) { - File file = new File(fileUri.getPath()); - documentFile = DocumentFile.fromFile(file); - } else { - documentFile = - DocumentFile.fromSingleUri(this.context, Uri.parse(filePath)); - } - - return documentFile; - } - - private InputStream getInputStream(DocumentFile file) - throws FileNotFoundException, IOException { - Uri uri = file.getUri(); - ContentResolver contentResolver = context.getContentResolver(); - return contentResolver.openInputStream(uri); - } -} diff --git a/src/plugins/webserver/src/android/Webserver.java b/src/plugins/webserver/src/android/Webserver.java deleted file mode 100644 index d738d6e64..000000000 --- a/src/plugins/webserver/src/android/Webserver.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.apache.cordova.plugin; - -import java.io.IOException; -import java.util.HashMap; -import org.apache.cordova.*; -import org.json.JSONArray; -import org.json.JSONException; - -public class Webserver extends CordovaPlugin { - - public HashMap responses; - public CallbackContext onRequestCallbackContext; - public NanoHTTPDWebserver nanoHTTPDWebserver; - - @Override - public void initialize(CordovaInterface cordova, CordovaWebView webView) { - super.initialize(cordova, webView); - this.responses = new HashMap(); - } - - @Override - public boolean execute( - String action, - JSONArray args, - CallbackContext callbackContext - ) - throws JSONException { - if ("start".equals(action)) { - try { - this.start(args, callbackContext); - } catch (IOException e) { - e.printStackTrace(); - } - return true; - } - if ("stop".equals(action)) { - this.stop(args, callbackContext); - return true; - } - if ("onRequest".equals(action)) { - this.onRequest(args, callbackContext); - return true; - } - if ("sendResponse".equals(action)) { - this.sendResponse(args, callbackContext); - return true; - } - return false; // Returning false results in a "MethodNotFound" error. - } - - /** - * Starts the server - * - * @param args - * @param callbackContext - */ - private void start(JSONArray args, CallbackContext callbackContext) - throws JSONException, IOException { - int port = 8080; - - if (args.length() == 1) { - port = args.getInt(0); - } - - if (this.nanoHTTPDWebserver != null) { - callbackContext.sendPluginResult( - new PluginResult(PluginResult.Status.ERROR, "Server already running") - ); - return; - } - - try { - this.nanoHTTPDWebserver = - new NanoHTTPDWebserver(port, this, cordova.getContext()); - this.nanoHTTPDWebserver.start(); - } catch (Exception e) { - callbackContext.sendPluginResult( - new PluginResult(PluginResult.Status.ERROR, e.getMessage()) - ); - return; - } - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK)); - } - - /** - * Stops the server - * - * @param args - * @param callbackContext - */ - private void stop(JSONArray args, CallbackContext callbackContext) - throws JSONException { - if (this.nanoHTTPDWebserver != null) { - this.nanoHTTPDWebserver.stop(); - this.nanoHTTPDWebserver = null; - } - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK)); - } - - /** - * Will be called if the js context sends an response to the webserver - * - * @param args {UUID: {...}} - * @param callbackContext - * @throws JSONException - */ - private void sendResponse(JSONArray args, CallbackContext callbackContext) - throws JSONException { - this.responses.put(args.getString(0), args.get(1)); - callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK)); - } - - /** - * Just register the onRequest and send no result. This is needed to save the - * callbackContext to invoke it later - * - * @param args - * @param callbackContext - */ - private void onRequest(JSONArray args, CallbackContext callbackContext) { - this.onRequestCallbackContext = callbackContext; - PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT); - pluginResult.setKeepCallback(true); - this.onRequestCallbackContext.sendPluginResult(pluginResult); - } -} diff --git a/src/plugins/webserver/www/webserver.js b/src/plugins/webserver/www/webserver.js deleted file mode 100644 index 15770ddcb..000000000 --- a/src/plugins/webserver/www/webserver.js +++ /dev/null @@ -1,27 +0,0 @@ -var WEBSERVER_CLASS = 'Webserver'; -var START_FUNCTION = 'start'; -var ONREQUEST_FUNCTION = 'onRequest'; -var SENDRESPONSE_FUNCION = 'sendResponse'; -var STOP_FUNCTION = 'stop'; -module.exports = { - start: function (success_callback, error_callback, port) { - var params = []; - - if (port) { - params.push(port); - } - - cordova.exec(success_callback, error_callback, WEBSERVER_CLASS, START_FUNCTION, params); - }, - onRequest: function (success_callback) { - cordova.exec(success_callback, function (error) { - console.error(error); - }, WEBSERVER_CLASS, ONREQUEST_FUNCTION, []); - }, - sendResponse: function (requestId, params, success_callback, error_callback) { - cordova.exec(success_callback, error_callback, WEBSERVER_CLASS, SENDRESPONSE_FUNCION, [requestId, params]); - }, - stop: function (success_callback, error_callback) { - cordova.exec(success_callback, error_callback, WEBSERVER_CLASS, STOP_FUNCTION, []); - } -}; \ No newline at end of file diff --git a/src/plugins/websocket/README.md b/src/plugins/websocket/README.md new file mode 100644 index 000000000..5805a0142 --- /dev/null +++ b/src/plugins/websocket/README.md @@ -0,0 +1,135 @@ +# Cordova Plugin: OkHttp WebSocket + +A Cordova plugin that uses [OkHttp](https://square.github.io/okhttp/) to provide WebSocket support in your Cordova app. +It aims to mimic the [WebSocket API](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) in JavaScript, with additional features. + +## Features + +* ✅ WebSocket API-like interface +* ✅ Event support: `onopen`, `onmessage`, `onerror`, `onclose` +* ✅ `extensions` and `readyState` properties +* ✅ `listClients()` to list active connections +* ✅ Support for protocols +* ✅ Support for Custom Headers. +* ✅ Compatible with Cordova for Android + +--- + +## Usage + +### Import + +```javascript +const WebSocketPlugin = cordova.websocket; +``` + +### Connect to WebSocket + +```javascript +WebSocketPlugin.connect("wss://example.com/socket", ["protocol1", "protocol2"], headers) + .then(ws => { + ws.onopen = (e) => console.log("Connected!", e); + ws.onmessage = (e) => console.log("Message:", e.data); + ws.onerror = (e) => console.error("Error:", e); + ws.onclose = (e) => console.log("Closed:", e); + + ws.send("Hello from Cordova!"); + ws.close(); + }) + .catch(err => console.error("WebSocket connection failed:", err)); +``` + +--- + +## API Reference + +### Methods + +* `WebSocketPlugin.connect(url, protocols, headers, binaryType)` + * Connects to a WebSocket server. + * `url`: The WebSocket server URL. + * `protocols`: (Optional) An array of subprotocol strings. + * `headers`: (Optional) Custom headers as key-value pairs. + * `binaryType`: (Optional) Initial binary type setting. + * **Returns:** A Promise that resolves to a `WebSocketInstance`. + +* `WebSocketPlugin.listClients()` + * Lists all stored webSocket instance IDs. + * **Returns:** `Promise` that resolves to an array of `instanceId` strings. + +* `WebSocketPlugin.send(instanceId, message, binary)` + * Sends a message to the server using an instance ID. + * `instanceId`: The ID of the WebSocket instance. + * `message`: The message to send (string or ArrayBuffer/ArrayBufferView). + * `binary`: (Optional) Whether to send the message as binary, accepts `boolean` + * **Returns:** `Promise` that resolves when the message is sent. + +* `WebSocketPlugin.close(instanceId, code, reason)` + * same as `WebSocketInstance.close(code, reason)` but needs `instanceId`. + * **Returns:** `Promise` that resolves. + +### WebSocketInstance Methods + +* `WebSocketInstance.send(message, binary)` + * Sends a message to the server. + * `message`: The message to send (string or ArrayBuffer/ArrayBufferView). + * `binary`: (Optional) Whether to send the message as binary. accepts `boolean` + * Throws an error if the connection is not open. + +* `WebSocketInstance.close(code, reason)` + * Closes the connection. + * `code`: (Optional) If unspecified, a close code for the connection is automatically set: to 1000 for a normal closure, or otherwise to [another standard value in the range 1001-1015](https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1) that indicates the actual reason the connection was closed. + * `reason`: A string providing a [custom WebSocket connection close reason](https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.6) (a concise human-readable prose explanation for the closure). The value must be no longer than 123 bytes (encoded in UTF-8). + +--- + +### Properties of `WebSocketInstance` + +* `onopen`: Event listener for connection open. +* `onmessage`: Event listener for messages received. +* `onclose`: Event listener for connection close. +* `onerror`: Event listener for errors. +* `readyState`: (number) The state of the connection. + * 0 (`CONNECTING`): Socket created, not yet open. + * 1 (`OPEN`): Connection is open and ready. + * 2 (`CLOSING`): Connection is closing. + * 3 (`CLOSED`): Connection is closed or couldn't be opened. +* `extensions`: (string) Extensions negotiated by the server. +* `binaryType`: (string) Type of binary data to use ('arraybuffer' or '' (binary payload returned as strings.)). +* `url`: (string) The WebSocket server URL. +* `instanceId`: (string) Unique identifier for this WebSocket instance. + +### Event Handling + +`WebSocketInstance` extends `EventTarget`, providing standard event handling methods: + +* `addEventListener(type, listener)`: Registers an event listener. +* `removeEventListener(type, listener)`: Removes an event listener. +* `dispatchEvent(event)`: Dispatches an event to the object. + +Example of using event listeners: +```javascript +const ws = await WebSocketPlugin.connect("wss://example.com/socket"); + +// Using on* properties +ws.onmessage = (event) => console.log("Message:", event.data); + +// Using addEventListener +ws.addEventListener('message', (event) => console.log("Message:", event.data)); +``` + +### Constants + +* `WebSocketInstance.CONNECTING`: 0 +* `WebSocketInstance.OPEN`: 1 +* `WebSocketInstance.CLOSING`: 2 +* `WebSocketInstance.CLOSED`: 3 + +--- + +## Notes + +* Only supported on Android (via OkHttp). +* Make sure to handle connection lifecycle properly (close sockets when done). +* `listClients()` is useful for debugging and management. +--- \ No newline at end of file diff --git a/src/plugins/websocket/package.json b/src/plugins/websocket/package.json new file mode 100644 index 000000000..6277a9c93 --- /dev/null +++ b/src/plugins/websocket/package.json @@ -0,0 +1,22 @@ +{ + "name": "cordova-plugin-websocket", + "version": "0.0.1", + "description": "This cordova plugin is created to use WebSocket (client) in web/js.", + "cordova": { + "id": "cordova-plugin-websocket", + "platforms": [ + "android" + ] + }, + "keywords": [ + "cordova", + "websocket", + "cordova-android", + "ws" + ], + "author": "Acode-Foundation (created by UnschooledGamer)", + "license": "Apache-2.0", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + } +} \ No newline at end of file diff --git a/src/plugins/websocket/plugin.xml b/src/plugins/websocket/plugin.xml new file mode 100644 index 000000000..ad7b68421 --- /dev/null +++ b/src/plugins/websocket/plugin.xml @@ -0,0 +1,21 @@ + + + cordova-plugin-websocket + Cordova Websocket + MIT + cordova,ws,WebSocket + + + + + + + + + + + + + + + diff --git a/src/plugins/websocket/src/android/WebSocketInstance.java b/src/plugins/websocket/src/android/WebSocketInstance.java new file mode 100644 index 000000000..dd9241aea --- /dev/null +++ b/src/plugins/websocket/src/android/WebSocketInstance.java @@ -0,0 +1,217 @@ +package com.foxdebug.websocket; + +import android.util.Base64; +import android.util.Log; + +import androidx.annotation.NonNull; + +import org.apache.cordova.*; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.util.Iterator; +import java.util.concurrent.TimeUnit; + +import okhttp3.*; + +import okio.ByteString; + +public class WebSocketInstance extends WebSocketListener { + private static final String TAG = "WebSocketInstance"; + private static final int DEFAULT_CLOSE_CODE = 1000; + private static final String DEFAULT_CLOSE_REASON = "Normal closure"; + + private WebSocket webSocket; + private CallbackContext callbackContext; + private final CordovaInterface cordova; + private final String instanceId; + private String extensions = ""; + private String protocol = ""; + private String binaryType = ""; + private int readyState = 0; // CONNECTING + + // okHttpMainClient parameter is used. To have a single main client(singleton), with per-websocket configuration using newBuilder method. + public WebSocketInstance(String url, JSONArray protocols, JSONObject headers, String binaryType, OkHttpClient okHttpMainClient, CordovaInterface cordova, String instanceId) { + this.cordova = cordova; + this.instanceId = instanceId; + this.binaryType = binaryType; + + OkHttpClient client = okHttpMainClient.newBuilder() + .connectTimeout(10, TimeUnit.SECONDS) + .build(); + + Request.Builder requestBuilder = new Request.Builder().url(url); + + // custom headers support. + if (headers != null) { + Iterator keys = headers.keys(); + while (keys.hasNext()) { + String key = keys.next(); + String value = headers.optString(key); + requestBuilder.addHeader(key, value); + } + } + + // adds Sec-WebSocket-Protocol header if protocols is present. + if (protocols != null) { + StringBuilder protocolHeader = new StringBuilder(); + for (int i = 0; i < protocols.length(); i++) { + protocolHeader.append(protocols.optString(i)).append(","); + } + if (protocolHeader.length() > 0) { + protocolHeader.setLength(protocolHeader.length() - 1); + requestBuilder.addHeader("Sec-WebSocket-Protocol", protocolHeader.toString()); + } + } + + client.newWebSocket(requestBuilder.build(), this); + } + + public void setCallback(CallbackContext callbackContext) { + this.callbackContext = callbackContext; + PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT); + result.setKeepCallback(true); + callbackContext.sendPluginResult(result); + } + + public void send(String message, boolean isBinary) { + if (this.webSocket != null) { + Log.d(TAG, "websocket instanceId=" + this.instanceId + " received send(..., isBinary=" + isBinary + ") action call, sending message=" + message); + if(isBinary) { + this.sendBinary(message); + return; + } + this.webSocket.send(message); + } else { + Log.d(TAG, "websocket instanceId=" + this.instanceId + " received send(..., isBinary=" + isBinary + ") ignoring... as webSocket is null (not present/connected)"); + } + } + + /** + * Sends bytes as the data of a binary (type 0x2) message. + * @param base64Data Binary Data received from JS bridge encoded as base64 String + */ + private void sendBinary(String base64Data) { + byte[] data = Base64.decode(base64Data, Base64.DEFAULT); + this.webSocket.send(ByteString.of(data)); + } + + public String close(int code, String reason) { + if (this.webSocket != null) { + this.readyState = 2; // CLOSING + try { + boolean result = this.webSocket.close(code, reason); + Log.d(TAG, "websocket instanceId=" + this.instanceId + " received close() action call, code=" + code + " reason=" + reason + " close method result: " + result); + + // if a graceful shutdown was already underway... + // or if the web socket is already closed or canceled. do nothing. + if(!result) { + return null; + } + } catch (Exception e) { + return e.getMessage(); + } + + return null; + } else { + Log.d(TAG, "websocket instanceId=" + this.instanceId + " received close() action call, ignoring... as webSocket is null (not present)"); + // TODO: finding a better way of telling it wasn't successful. + return ""; + } + } + + public String close() { + Log.d(TAG, "WebSocket instanceId=" + this.instanceId + " close() called with no arguments. Using defaults."); + // Calls the more specific version with default values + return close(DEFAULT_CLOSE_CODE, DEFAULT_CLOSE_REASON); + } + + @Override + public void onOpen(@NonNull WebSocket webSocket, Response response) { + this.webSocket = webSocket; + this.readyState = 1; // OPEN + this.extensions = response.headers("Sec-WebSocket-Extensions").toString(); + this.protocol = response.header("Sec-WebSocket-Protocol"); + Log.i(TAG, "websocket instanceId=" + this.instanceId + " Opened" + "received extensions=" + this.extensions); + sendEvent("open", null, false, false); + } + + @Override + public void onMessage(@NonNull WebSocket webSocket, @NonNull String text) { + Log.d(TAG, "websocket instanceId=" + this.instanceId + " Received message: " + text); + sendEvent("message", text, false, false); + } + + // This is called when the Websocket server sends a binary(type 0x2) message. + @Override + public void onMessage(@NonNull WebSocket webSocket, @NonNull ByteString bytes) { + Log.d(TAG, "websocket instanceId=" + this.instanceId + " Received message(bytes/binary payload): " + bytes.toString()); + + try { + if ("arraybuffer".equals(this.binaryType)) { + String base64 = bytes.base64(); + sendEvent("message", base64, true, false); + } else { + sendEvent("message", bytes.utf8(), true, true); + } + } catch (Exception e) { + Log.e(TAG, "Error sending message", e); + } + + } + + @Override + public void onClosing(@NonNull WebSocket webSocket, int code, @NonNull String reason) { + this.readyState = 2; // CLOSING + Log.i(TAG, "websocket instanceId=" + this.instanceId + " is Closing code: " + code + " reason: " + reason); + this.webSocket.close(code, reason); + } + + @Override + public void onClosed(@NonNull WebSocket webSocket, int code, @NonNull String reason) { + this.readyState = 3; // CLOSED + Log.i(TAG, "websocket instanceId=" + this.instanceId + " Closed code: " + code + " reason: " + reason); + JSONObject closedEvent = new JSONObject(); + try { + closedEvent.put("code", code); + closedEvent.put("reason", reason); + } catch (JSONException e) { + Log.e(TAG, "Error creating close event", e); + } + sendEvent("close", closedEvent.toString(), false, false); + // remove instance after receiving close. + WebSocketPlugin.removeInstance(this.instanceId); + } + + @Override + public void onFailure(@NonNull WebSocket webSocket, Throwable t, Response response) { + this.readyState = 3; // CLOSED + sendEvent("error", t.getMessage(), false, false); + Log.e(TAG, "websocket instanceId=" + this.instanceId + " Error: " + t.getMessage()); + } + + public void setBinaryType(String binaryType) { + this.binaryType = binaryType; + } + + private void sendEvent(String type, String data, boolean isBinary, boolean parseAsText) { + if (callbackContext != null) { + try { + JSONObject event = new JSONObject(); + event.put("type", type); + event.put("extensions", this.extensions); + event.put("readyState", this.readyState); + event.put("isBinary", isBinary); + event.put("parseAsText", parseAsText); + if (data != null) event.put("data", data); + Log.d(TAG, "sending event: " + type + " eventObj " + event.toString()); + PluginResult result = new PluginResult(PluginResult.Status.OK, event); + result.setKeepCallback(true); + callbackContext.sendPluginResult(result); + } catch (Exception e) { + Log.e(TAG, "Error sending event", e); + } + } + } +} diff --git a/src/plugins/websocket/src/android/WebSocketPlugin.java b/src/plugins/websocket/src/android/WebSocketPlugin.java new file mode 100644 index 000000000..c8fb832f3 --- /dev/null +++ b/src/plugins/websocket/src/android/WebSocketPlugin.java @@ -0,0 +1,130 @@ +package com.foxdebug.websocket; + +import android.util.Log; + +import org.apache.cordova.*; +import org.json.*; + +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; + +import okhttp3.OkHttpClient; + +// TODO: plugin init & plugin destroy(closing okhttp clients) lifecycles. (✅) +public class WebSocketPlugin extends CordovaPlugin { + private static final ConcurrentHashMap instances = new ConcurrentHashMap<>(); + public OkHttpClient okHttpMainClient = null; + + @Override + protected void pluginInitialize() { + this.okHttpMainClient = new OkHttpClient(); + } + + @Override + public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException { + cordova.getThreadPool().execute(new Runnable() { + @Override + public void run() { + + switch (action) { + case "connect": + String url = args.optString(0); + JSONArray protocols = args.optJSONArray(1); + JSONObject headers = args.optJSONObject(2); + String binaryType = args.optString(3, null); + String id = UUID.randomUUID().toString(); + WebSocketInstance instance = new WebSocketInstance(url, protocols, headers, binaryType, okHttpMainClient, cordova, id); + instances.put(id, instance); + callbackContext.success(id); + return; + + case "send": + String instanceId = args.optString(0); + String message = args.optString(1); + boolean isBinary = args.optBoolean(2, false); + + WebSocketInstance inst = instances.get(instanceId); + Log.d("WebSocketPlugin", "send called"); + if (inst != null) { + inst.send(message, isBinary); + callbackContext.success(); + } else { + callbackContext.error("Invalid instance ID"); + } + return; + + case "close": + instanceId = args.optString(0); + // defaults code to 1000 & reason to "Normal closure" + int code = args.optInt(1, 1000); + String reason = args.optString(2, "Normal closure"); + inst = instances.get(instanceId); + if (inst != null) { + String error = inst.close(code, reason); + + if(error == null) { + callbackContext.success(); + return; + } else if(!error.isEmpty()) { + // if error is empty means the websocket is not ready/open. + callbackContext.error(error); + return; + } + } else { + callbackContext.error("Invalid instance ID"); + } + return; + + case "registerListener": + instanceId = args.optString(0); + inst = instances.get(instanceId); + if (inst != null) { + inst.setCallback(callbackContext); + } else { + callbackContext.error("Invalid instance ID"); + } + return; + + case "setBinaryType": + instanceId = args.optString(0); + String type = args.optString(1); + + inst = instances.get(instanceId); + if (inst != null) { + inst.setBinaryType(type); + } else { + Log.d("WebSocketPlugin", "setBinaryType called for instanceId=" + instanceId + " but It's not found. ignoring...."); + } + return; + + case "listClients": + JSONArray clientIds = new JSONArray(); + for (String clientId : instances.keySet()) { + clientIds.put(clientId); + } + callbackContext.success(clientIds); + return; + default: + return; + } + } + }); + return true; + } + + @Override + public void onDestroy() { + // clear all. + for (WebSocketInstance instance : instances.values()) { + // Closing them gracefully. + instance.close(); + } + instances.clear(); + okHttpMainClient.dispatcher().executorService().shutdown(); + Log.i("WebSocketPlugin", "cleaned up... on destroy"); + } + + public static void removeInstance(String instanceId) { + instances.remove(instanceId); + } +} diff --git a/src/plugins/websocket/www/websocket.js b/src/plugins/websocket/www/websocket.js new file mode 100644 index 000000000..acf883149 --- /dev/null +++ b/src/plugins/websocket/www/websocket.js @@ -0,0 +1,188 @@ +var exec = require('cordova/exec'); +/** + * Whether to log debug messages + */ +let DEBUG = false; + +const logIfDebug = (...args) => { + console.log("DEBUG flag -> ", cordova.websocket.DEBUG) + if (cordova.websocket.DEBUG) { + console.log(...args); + } +}; + +class WebSocketInstance extends EventTarget { + constructor(url, instanceId, binaryType) { + super(); + this.instanceId = instanceId; + this.extensions = ''; + this.readyState = WebSocketInstance.CONNECTING; + this.onopen = null; + this.onmessage = null; + this.onclose = null; + this.onerror = null; + this.url = url; + // NOTE: blob is not supported currently. + this._binaryType = binaryType ? binaryType : ''; // empty as Default is string (Same Plugins might require this behavior) + + exec((event) => { + logIfDebug(`[Cordova WebSocket - ID=${this.instanceId}] Event from native:`, event); + + if (event.type === 'open') { + this.readyState = WebSocketInstance.OPEN; + this.extensions = event.extensions || ''; + if (this.onopen) this.onopen(event); + this.dispatchEvent(new Event('open')); + } + + if (event.type === 'message') { + let msgData = event.data; + // parseAsText solely takes care of the state of binaryType, + // sometimes, syncing binaryType to Java side might take longer. it's there to not wrongly pass normal string as base64. + if (event.isBinary && this.binaryType === 'arraybuffer' && !event.parseAsText) { + let binary = atob(msgData); + let bytes = new Uint8Array(binary.length); + for (let i = 0; i < binary.length; i++) { + bytes[i] = binary.charCodeAt(i); + } + msgData = bytes.buffer; + } + logIfDebug(`[Cordova WebSocket - ID=${this.instanceId}] msg Event:`, event, msgData); + const msgEvent = new MessageEvent('message', { data: msgData }); + + Object.defineProperty(msgEvent, "binary", { enumerable: true, value: event.isBinary }) + + if (this.onmessage) this.onmessage(msgEvent); + this.dispatchEvent(msgEvent); + } + + if (event.type === 'close') { + this.readyState = WebSocketInstance.CLOSED; + const closeData = event && event.data ? event.data : {}; + const closeEvent = new CloseEvent('close', { + code: closeData.code, + reason: closeData.reason, + }); + if (this.onclose) this.onclose(closeEvent); + this.dispatchEvent(closeEvent); + } + + if (event.type === 'error') { + const errorMessage = event && event.data ? event.data : undefined; + const errorEvent = new Event('error'); + if (errorMessage !== undefined) { + errorEvent.message = errorMessage; + } + if (this.onerror) this.onerror(errorEvent); + this.dispatchEvent(errorEvent); + } + }, null, "WebSocketPlugin", "registerListener", [this.instanceId]); + } + + get binaryType() { + return this._binaryType || ''; + } + + set binaryType(type) { + // blob isn't supported but checked as browser compatibility, & it default to empty string + if (type === 'blob' || type === 'arraybuffer' || type === '') { + this._binaryType = type !== 'blob' ? type : ''; + + exec(null, null, "WebSocketPlugin", "setBinaryType", [this.instanceId, type]); + } else { + console.warn('Invalid binaryType, expected "blob" or "arraybuffer"'); + } + } + + + send(message, binary) { + if (this.readyState !== WebSocketInstance.OPEN) { + throw new Error(`WebSocket is not open/connected`); + } + + let finalMessage = null; + if (message instanceof ArrayBuffer || ArrayBuffer.isView(message)) { + const uint8Array = message instanceof ArrayBuffer ? new Uint8Array(message) : message; + finalMessage = btoa(String.fromCharCode.apply(null, uint8Array)); + + // set to true as it's the data of a binary (type 0x2) message. + binary = true; + + exec(() => logIfDebug(`[Cordova WebSocket - ID=${this.instanceId}] Sent message(binary payload):`, finalMessage), (err) => console.error(`[Cordova WebSocket - ID=${this.instanceId}] Send error:`, err), "WebSocketPlugin", "send", [this.instanceId, finalMessage, binary]); + } else if (typeof message === 'string') { + finalMessage = message; + + // maybe a String to be sent as Binary (if it's true) + if(binary) finalMessage = btoa(message) + + exec(() => logIfDebug(`[Cordova WebSocket - ID=${this.instanceId}] Sent message(binary=${binary}):`, finalMessage), (err) => console.error(`[Cordova WebSocket - ID=${this.instanceId}] Send error:`, err), "WebSocketPlugin", "send", [this.instanceId, finalMessage, binary]); + } else { + throw new Error(`Unsupported message type: ${typeof message}`); + } + } + + /** + * Closes the WebSocket connection. + * + * @param {number} code The status code explaining why the connection is being closed. + * @param {string} reason A human-readable string explaining why the connection is being closed. + */ + close(code, reason) { + this.readyState = WebSocketInstance.CLOSING; + exec(() => logIfDebug(`[Cordova WebSocket - ID=${this.instanceId}] Close requested`, code, reason), (err) => console.error(`[Cordova WebSocket - ID=${this.instanceId}] Close error`, err), "WebSocketPlugin", "close", [this.instanceId, code, reason]); + } +} + +WebSocketInstance.CONNECTING = 0; +WebSocketInstance.OPEN = 1; +WebSocketInstance.CLOSING = 2; +WebSocketInstance.CLOSED = 3; + +const connect = function(url, protocols = null, headers = null, binaryType) { + return new Promise((resolve, reject) => { + exec(instanceId => resolve(new WebSocketInstance(url, instanceId)), reject, "WebSocketPlugin", "connect", [url, protocols, binaryType, headers]); + }); +}; + +const listClients = function() { + return new Promise((resolve, reject) => { + exec(resolve, reject, "WebSocketPlugin", "listClients", []); + }); +}; + +/** Utility functions, in-case you lost the websocketInstance returned from the connect function */ + +const send = function(instanceId, message, binary) { + return new Promise((resolve, reject) => { + if (typeof message === 'string') { + + if(binary) message = btoa(message); + + exec(resolve, reject, "WebSocketPlugin", "send", [instanceId, message, binary]); + } else if (message instanceof ArrayBuffer || ArrayBuffer.isView(message)) { + const uint8Array = message instanceof ArrayBuffer ? new Uint8Array(message) : message; + const base64Message = btoa(String.fromCharCode.apply(null, uint8Array)); + + exec(resolve, reject, "WebSocketPlugin", "send", [instanceId, base64Message, true]); + } else { + reject(`Unsupported message type: ${typeof message}`); + } + }); +}; + +/** + * Closes the WebSocket connection. + * + * @param {string} instanceId The ID of the WebSocketInstance to close. + * @param {number} [code] (optional) The status code explaining why the connection is being closed. + * @param {string} [reason] (optional) A human-readable string explaining why the connection is being closed. + * + * @returns {Promise} A promise that resolves when the close operation has completed. + */ +const close = function(instanceId, code, reason) { + return new Promise((resolve, reject) => { + exec(resolve, reject, "WebSocketPlugin", "close", [instanceId, code, reason]); + }); +}; + +module.exports = { connect, listClients, send, close, DEBUG }; diff --git a/src/res/file-icons/file-icons.ttf b/src/res/file-icons/file-icons.ttf new file mode 100644 index 000000000..a65986400 Binary files /dev/null and b/src/res/file-icons/file-icons.ttf differ diff --git a/src/res/file-icons/style.css b/src/res/file-icons/style.css new file mode 100644 index 000000000..e845690ad --- /dev/null +++ b/src/res/file-icons/style.css @@ -0,0 +1,1771 @@ +@font-face { + font-family: 'file-icons'; + src: url('file-icons.ttf?ujkkfk') format('truetype'); + font-weight: normal; + font-style: normal; + font-display: block; +} + +.file { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'file-icons' !important; + speak: never; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.file_type_default:before { + content: "\e91a"; + color: #c5c5c5; +} + +.file_type_text:before { + content: "\e985"; + color: #8fa5c2; +} + +.file_type_txt:before { + content: "\e985"; + color: #8fa5c2; +} + +.file_type_image:before { + content: "\e934"; + color: #96e5cf; +} + +.file_type_video:before { + content: "\e991"; + color: #e75749; +} + +.file_type_astro:before { + content: "\e9a4"; + color: #fff; +} + +.file_type_music:before { + content: "\e950"; +} + +.file_type_zip:before { + content: "\e99b"; + color: #a08a00; +} + +.file_type_compressed:before { + content: "\e99b"; + color: #a08a00; +} + +.file_type_android:before { + content: "\e99e"; + color: #3ddc84; +} + +.file_type_smali:before { + content: "\e99e"; + color: #3ddc84; +} + +.file_type_rhtml:before { + content: "\e9a0"; + color: #c00; +} + +.file_type_forth:before { + content: "\e9a1"; + color: #35c0ed; +} + +.file_type_frt:before { + content: "\e9a1"; + color: #35c0ed; +} + +.file_type_fs:before { + content: "\e9a1"; + color: #35c0ed; +} + +.file_type_ldr:before { + content: "\e9a1"; + color: #35c0ed; +} + +.file_type_fth:before { + content: "\e9a1"; + color: #35c0ed; +} + +.file_type_4th:before { + content: "\e9a1"; + color: #35c0ed; +} + +.file_type_alda:before { + content: "\e99f"; + color: #35c0ed; +} + +.file_type_abc:before { + content: "\e9ea"; + color: #00aeef; +} + +.file_type_sap:before { + content: "\e9eb"; + color: #00aeef; +} + +.file_type_abap:before { + content: "\e9eb"; + color: #00aeef; +} + +.file_type_apache:before { + content: "\e900"; + color: #d22128; +} + +.file_type_apache_conf:before { + content: "\e900"; + color: #d22128; +} + +.file_type_htaccess:before { + content: "\e900"; + color: #d22128; +} + +.file_type_htgroups:before { + content: "\e900"; + color: #d22128; +} + +.file_type_conf:before { + content: "\e900"; + color: #d22128; +} + +.file_type_htpasswd:before { + content: "\e900"; + color: #d22128; +} + +.file_type_apex:before { + content: "\e901"; + color: #0072a0; +} + +.file_type_cls:before { + content: "\e901"; + color: #0072a0; +} + +.file_type_trigger:before { + content: "\e901"; + color: #0072a0; +} + +.file_type_tgr:before { + content: "\e901"; + color: #0072a0; +} + +.file_type_asciidoc:before { + content: "\e902"; + color: #e40046; +} + +.file_type_adoc:before { + content: "\e902"; + color: #e40046; +} + +.file_type_asl:before { + content: "\e903"; + color: #65bed9; +} + +.file_type_dsl:before { + content: "\e903"; + color: #65bed9; +} + +.file_type_assembly:before { + content: "\e904"; + color: #0000bf; +} + +.file_type_a:before { + content: "\e904"; + color: #0000bf; +} + +.file_type_asm:before { + content: "\e904"; + color: #0000bf; +} + +.file_type_assembly_x86:before { + content: "\e904"; + color: #0000bf; +} + +.file_type_autohotkey:before { + content: "\e905"; + color: #44a915; +} + +.file_type_ahk:before { + content: "\e905"; + color: #44a915; +} + +.file_type_babel:before { + content: "\e906"; + color: #f9dc3e; +} + +.file_type_babelrc:before { + content: "\e906"; + color: #f9dc3e; +} + +.file_type_bibtex:before { + content: "\e907"; +} + +.file_type_bib:before { + content: "\e907"; +} + +.file_type_blade:before { + content: "\e908"; + color: #ff2d20; +} + +.file_type_php_laravel_blade:before { + content: "\e908"; + color: #ff2d20; +} + +.file_type_c:before { + content: "\e909"; + color: #005f91; +} + +.file_type_cabal:before { + content: "\e90a"; + color: #6bc9dd; +} + +.file_type_haskell_cabal:before { + content: "\e90a"; + color: #6bc9dd; +} + +.file_type_cheader:before { + content: "\e90b"; + color: #005f91; +} + +.file_type_clojure:before { + content: "\e90c"; + color: #5881d8; +} + +.file_type_clj:before { + content: "\e90c"; + color: #5881d8; +} + +.file_type_clojurescript:before { + content: "\e90d"; + color: #5f7fbf; +} + +.file_type_cljs:before { + content: "\e90d"; + color: #5f7fbf; +} + +.file_type_cmake:before { + content: "\e90e"; + color: #064f8c; +} + +.file_type_cobol:before { + content: "\e90f"; + color: #005ca5; +} + +.file_type_cbl:before { + content: "\e90f"; + color: #005ca5; +} + +.file_type_cob:before { + content: "\e90f"; + color: #005ca5; +} + +.file_type_coffeescript:before { + content: "\e910"; +} + +.file_type_coffee:before { + content: "\e910"; +} + +.file_type_cf:before { + content: "\e910"; +} + +.file_type_cson:before { + content: "\e910"; +} + +.file_type_cakefile:before { + content: "\e910"; +} + +.file_type_coldfussion:before { + content: "\e911"; + color: #859aa5; +} + +.file_type_cfm:before { + content: "\e911"; + color: #859aa5; +} + +.file_type_cfc:before { + content: "\e911"; + color: #859aa5; +} + +.file_type_cpp:before { + content: "\e912"; + color: #984c93; +} + +.file_type_cc:before { + content: "\e912"; + color: #984c93; +} + +.file_type_cxx:before { + content: "\e912"; + color: #984c93; +} + +.file_type_ino:before { + content: "\e912"; + color: #984c93; +} + +.file_type_cppheader:before { + content: "\e913"; + color: #984c93; +} + +.file_type_hh:before { + content: "\e913"; + color: #984c93; +} + +.file_type_hpp:before { + content: "\e913"; + color: #984c93; +} + +.file_type_crystal:before { + content: "\e914"; + color: #c8c8c8; +} + +.file_type_cr:before { + content: "\e914"; + color: #c8c8c8; +} + +.file_type_csharp:before { + content: "\e915"; + color: #368832; +} + +.file_type_cs:before { + content: "\e915"; + color: #368832; +} + +.file_type_css:before { + content: "\e916"; + color: #1572b6; +} + +.file_type_cssmap:before { + content: "\e917"; + color: #33a9dc; +} + +.file_type_dartlang:before { + content: "\e918"; + color: #0175c2; +} + +.file_type_dart:before { + content: "\e918"; + color: #0175c2; +} + +.file_type_db:before { + content: "\e919"; + color: #c4c7ce; +} + +.file_type_aql:before { + content: "\e919"; + color: #c4c7ce; +} + +.file_type_diff:before { + content: "\e91b"; + color: #536653; +} + +.file_type_patch:before { + content: "\e91b"; + color: #536653; +} + +.file_type_django:before { + content: "\e91c"; + color: #44b78b; +} + +.file_type_dlang:before { + content: "\e91d"; + color: #b03931; +} + +.file_type_d:before { + content: "\e91d"; + color: #b03931; +} + +.file_type_di:before { + content: "\e91d"; + color: #b03931; +} + +.file_type_docker:before { + content: "\e91e"; + color: #00aada; +} + +.file_type_dockerfile:before { + content: "\e91e"; + color: #00aada; +} + +.file_type_docz:before { + content: "\e91f"; + color: #5f5846; +} + +.file_type_drools:before { + content: "\e920"; + color: #0095dd; +} + +.file_type_drl:before { + content: "\e920"; + color: #0095dd; +} + +.file_type_ejs:before { + content: "\e921"; + color: #90a93a; +} + +.file_type_elixir:before { + content: "\e922"; + color: #7c648f; +} + +.file_type_ex:before { + content: "\e922"; + color: #7c648f; +} + +.file_type_exs:before { + content: "\e922"; + color: #7c648f; +} + +.file_type_html_elixir:before { + content: "\e922"; + color: #7c648f; +} + +.file_type_elm:before { + content: "\e923"; + color: #8cd636; +} + +.file_type_erlang:before { + content: "\e924"; + color: #a2003e; +} + +.file_type_erl:before { + content: "\e924"; + color: #a2003e; +} + +.file_type_hrl:before { + content: "\e924"; + color: #a2003e; +} + +.file_type_eslint:before { + content: "\e925"; + color: #4b32c3; +} + +.file_type_fortran:before { + content: "\e926"; + color: #9e564c; +} + +.file_type_f:before { + content: "\e926"; + color: #9e564c; +} + +.file_type_f90:before { + content: "\e926"; + color: #9e564c; +} + +.file_type_fsharp:before { + content: "\e927"; + color: #378bba; +} + +.file_type_fs1:before { + content: "\e927"; + color: #378bba; +} + +.file_type_fsi:before { + content: "\e927"; + color: #378bba; +} + +.file_type_fsx:before { + content: "\e927"; + color: #378bba; +} + +.file_type_fsscript:before { + content: "\e927"; + color: #378bba; +} + +.file_type_gcode:before { + content: "\e928"; + color: #ba0000; +} + +.file_type_git:before { + content: "\e929"; + color: #f05032; +} + +.file_type_gitignore:before { + content: "\e929"; + color: #f05032; +} + +.file_type_golang:before { + content: "\e92a"; + color: #00add8; +} + +.file_type_go:before { + content: "\e92a"; + color: #00add8; +} + +.file_type_gradle:before { + content: "\e92b"; + color: #136a7d; +} + +.file_type_graphql:before { + content: "\e92c"; + color: #e10098; +} + +.file_type_gql:before { + content: "\e92c"; + color: #e10098; +} + +.file_type_graphqlschema:before { + content: "\e92c"; + color: #e10098; +} + +.file_type_prql:before { + content: "\e9a3"; + color: #dfb13c; +} + +.file_type_groovy:before { + content: "\e92d"; +} + +.file_type_haml:before { + content: "\e92e"; +} + +.file_type_handlebars:before { + content: "\e92f"; + color: #c19770; +} + +.file_type_hbs:before { + content: "\e92f"; + color: #c19770; +} + +.file_type_tpl:before { + content: "\e92f"; + color: #c19770; +} + +.file_type_mustache:before { + content: "\e92f"; + color: #c19770; +} + +.file_type_haskell:before { + content: "\e930"; + color: #5d4f85; +} + +.file_type_hs:before { + content: "\e930"; + color: #5d4f85; +} + +.file_type_haxe:before { + content: "\e931"; + color: #ea8220; +} + +.file_type_hx:before { + content: "\e931"; + color: #ea8220; +} + +.file_type_hjson:before { + content: "\e932"; + color: #01ca24; +} + +.file_type_html:before { + content: "\e933"; + color: #e34f26; +} + +.file_type_htm:before { + content: "\e933"; + color: #e34f26; +} + +.file_type_xhtml:before { + content: "\e933"; + color: #e34f26; +} + +.file_type_we:before { + content: "\e933"; + color: #e34f26; +} + +.file_type_wpy:before { + content: "\e933"; + color: #e34f26; +} + +.file_type_ini:before { + content: "\e935"; + color: #99b8c4; +} + +.file_type_conf1:before { + content: "\e935"; + color: #99b8c4; +} + +.file_type_cfg:before { + content: "\e935"; + color: #99b8c4; +} + +.file_type_prefs:before { + content: "\e935"; + color: #99b8c4; +} + +.file_type_io:before { + content: "\e936"; + color: #c2c2c2; +} + +.file_type_java:before { + content: "\e937"; + color: #007396; +} + +.file_type_javascript:before { + content: "\e938"; + color: #f5de19; +} + +.file_type_js:before { + content: "\e938"; + color: #f5de19; +} + +.file_type_jsm:before { + content: "\e938"; + color: #f5de19; +} + +.file_type_jsx:before { + content: "\e938"; + color: #f5de19; +} + +.file_type_mjs:before { + content: "\e938"; + color: #f5de19; +} + +.file_type_cjs:before { + content: "\e938"; + color: #f5de19; +} + +.file_type_jsbeautify:before { + content: "\e939"; + color: #f1662a; +} + +.file_type_jsconfig:before { + content: "\e93a"; + color: #f5de19; +} + +.file_type_jsmap:before { + content: "\e93b"; + color: #f5de19; +} + +.file_type_json:before { + content: "\e93c"; + color: #f5de19; +} + +.file_type_curly:before { + content: "\e93c"; + color: #f5de19; +} + +.file_type_json5:before { + content: "\e93c"; + color: #f5de19; +} + +.file_type_jsp:before { + content: "\e93d"; + color: #e56f14; +} + +.file_type_julia:before { + content: "\e93e"; + color: #aa79c1; +} + +.file_type_jl:before { + content: "\e93e"; + color: #aa79c1; +} + +.file_type_jupyter:before { + content: "\e93f"; + color: #f37626; +} + +.file_type_kotlin:before { + content: "\e940"; + color: #0095d5; +} + +.file_type_kt:before { + content: "\e940"; + color: #0095d5; +} + +.file_type_kts:before { + content: "\e940"; + color: #0095d5; +} + +.file_type_latex:before { + content: "\e941"; + color: #008080; +} + +.file_type_less:before { + content: "\e942"; + color: #294e82; +} + +.file_type_license:before { + content: "\e943"; + color: #aa79c1; +} + +.file_type_odin:before { + content: "\e9a2"; + color: #00f3ff; +} + +.file_type_liquid:before { + content: "\e944"; + color: #004999; +} + +.file_type_lisp:before { + content: "\e945"; + color: #c40804; +} + +.file_type_livescript:before { + content: "\e946"; + color: #317eac; +} + +.file_type_log:before { + content: "\e947"; + color: #00bd02; +} + +.file_type_lsl:before { + content: "\e948"; + color: #7fadb2; +} + +.file_type_lua:before { + content: "\e949"; + color: #2c2d72; +} + +.file_type_lp:before { + content: "\e949"; + color: #2c2d72; +} + +.file_type_luapage:before { + content: "\e949"; + color: #2c2d72; +} + +.file_type_makefile:before { + content: "\e94a"; + color: #a42e2b; +} + +.file_type_gnumakefile:before { + content: "\e94a"; + color: #a42e2b; +} + +.file_type_ocamlmakefile:before { + content: "\e94a"; + color: #a42e2b; +} + +.file_type_make:before { + content: "\e94a"; + color: #a42e2b; +} + +.file_type_map:before { + content: "\e94b"; + color: #45d339; +} + +.file_type_mariadb:before { + content: "\e94c"; + color: #c49a6c; +} + +.file_type_markdown:before { + content: "\e94d"; +} + +.file_type_md:before { + content: "\e94d"; +} + +.file_type_matlab:before { + content: "\e94e"; + color: #ff8d10; +} + +.file_type_mediawiki:before { + content: "\e94f"; + color: #ffd800; +} + +.file_type_wiki:before { + content: "\e94f"; + color: #ffd800; +} + +.file_type_mysql:before { + content: "\e951"; + color: #4479a1; +} + +.file_type_mysqlserver:before { + content: "\e951"; + color: #4479a1; +} + +.file_type_nginx:before { + content: "\e952"; + color: #269539; +} + +.file_type_nim:before { + content: "\e953"; + color: #ffe953; +} + +.file_type_npm:before { + content: "\e954"; + color: #cb3837; +} + +.file_type_nunjucks:before { + content: "\e955"; + color: #486411; +} + +.file_type_nunjs:before { + content: "\e955"; + color: #486411; +} + +.file_type_nj:before { + content: "\e955"; + color: #486411; +} + +.file_type_njk:before { + content: "\e955"; + color: #486411; +} + +.file_type_objectivec:before { + content: "\e956"; + color: #c2c2c2; +} + +.file_type_m:before { + content: "\e956"; + color: #c2c2c2; +} + +.file_type_objectivecpp:before { + content: "\e957"; + color: #c2c2c2; +} + +.file_type_mm:before { + content: "\e957"; + color: #c2c2c2; +} + +.file_type_ocaml:before { + content: "\e958"; + color: #ec6813; +} + +.file_type_ml:before { + content: "\e958"; + color: #ec6813; +} + +.file_type_mli:before { + content: "\e958"; + color: #ec6813; +} + +.file_type_opengl:before { + content: "\e959"; + color: #4386b5; +} + +.file_type_glsl:before { + content: "\e959"; + color: #4386b5; +} + +.file_type_frag:before { + content: "\e959"; + color: #4386b5; +} + +.file_type_vert:before { + content: "\e959"; + color: #4386b5; +} + +.file_type_perl:before { + content: "\e95a"; + color: #3a3c5b; +} + +.file_type_pl:before { + content: "\e95a"; + color: #3a3c5b; +} + +.file_type_pm:before { + content: "\e95a"; + color: #3a3c5b; +} + +.file_type_p6:before { + content: "\e95a"; + color: #3a3c5b; +} + +.file_type_pl6:before { + content: "\e95a"; + color: #3a3c5b; +} + +.file_type_pm6:before { + content: "\e95a"; + color: #3a3c5b; +} + +.file_type_pgsql:before { + content: "\e95b"; + color: #336791; +} + +.file_type_php:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_inc:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_phtml:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_shtml:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_php3:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_php4:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_php5:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_phps:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_aw:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_ctp:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_module:before { + content: "\e95c"; + color: #777bb4; +} + +.file_type_plsql:before { + content: "\e95d"; + color: #f00; +} + +.file_type_postcss:before { + content: "\e95e"; + color: #dd3735; +} + +.file_type_postcssconfig:before { + content: "\e95f"; + color: #dd3735; +} + +.file_type_postgresql:before { + content: "\e960"; + color: #336791; +} + +.file_type_powershell:before { + content: "\e961"; + color: #5391fe; +} + +.file_type_ps1:before { + content: "\e961"; + color: #5391fe; +} + +.file_type_batchfile:before { + content: "\e961"; + color: #5391fe; +} + +.file_type_bat:before { + content: "\e961"; + color: #5391fe; +} + +.file_type_cmd:before { + content: "\e961"; + color: #5391fe; +} + +.file_type_prettier:before { + content: "\e962"; + color: #f7b93e; +} + +.file_type_prisma:before { + content: "\e963"; + color: #d2d2d2; +} + +.file_type_prolog:before { + content: "\e964"; + color: #ec1c24; +} + +.file_type_plg:before { + content: "\e964"; + color: #ec1c24; +} + +.file_type_protobuf:before { + content: "\e965"; + color: #ff5c77; +} + +.file_type_proto:before { + content: "\e965"; + color: #ff5c77; +} + +.file_type_puppet:before { + content: "\e966"; + color: #ffae1a; +} + +.file_type_epp:before { + content: "\e966"; + color: #ffae1a; +} + +.file_type_pp:before { + content: "\e966"; + color: #ffae1a; +} + +.file_type_python:before { + content: "\e967"; + color: #3776ab; +} + +.file_type_py:before { + content: "\e967"; + color: #3776ab; +} + +.file_type_pyc:before { + content: "\e967"; + color: #3776ab; +} + +.file_type_pyd:before { + content: "\e967"; + color: #3776ab; +} + +.file_type_pyo:before { + content: "\e967"; + color: #3776ab; +} + +.file_type_pyw:before { + content: "\e967"; + color: #3776ab; +} + +.file_type_pyz:before { + content: "\e967"; + color: #3776ab; +} + +.file_type_gyp:before { + content: "\e967"; + color: #3776ab; +} + +.file_type_q:before { + content: "\e968"; + color: #1e78b3; +} + +.file_type_qml:before { + content: "\e969"; + color: #41cd52; +} + +.file_type_qsharp:before { + content: "\e96a"; + color: #33c; +} + +.file_type_rlang:before { + content: "\e96b"; + color: #276dc3; +} + +.file_type_r:before { + content: "\e96b"; + color: #276dc3; +} + +.file_type_razor:before { + content: "\e96c"; + color: #368832; +} + +.file_type_cshtml:before { + content: "\e96c"; + color: #368832; +} + +.file_type_asp:before { + content: "\e96c"; + color: #368832; +} + +.file_type_red:before { + content: "\e96d"; + color: #b32629; +} + +.file_type_reds:before { + content: "\e96d"; + color: #b32629; +} + +.file_type_rest:before { + content: "\e96e"; + color: #ce3f31; +} + +.file_type_robot:before { + content: "\e96f"; + color: #00b0d8; +} + +.file_type_resource:before { + content: "\e96f"; + color: #00b0d8; +} + +.file_type_rollup:before { + content: "\e970"; + color: #ec4a3f; +} + +.file_type_ruby:before { + content: "\e971"; + color: #cc342d; +} + +.file_type_rakefile:before { + content: "\e971"; + color: #cc342d; +} + +.file_type_guardfile:before { + content: "\e971"; + color: #cc342d; +} + +.file_type_gemfile:before { + content: "\e971"; + color: #cc342d; +} + +.file_type_rb:before { + content: "\e971"; + color: #cc342d; +} + +.file_type_ru:before { + content: "\e971"; + color: #cc342d; +} + +.file_type_gemspec:before { + content: "\e971"; + color: #cc342d; +} + +.file_type_rake:before { + content: "\e971"; + color: #cc342d; +} + +.file_type_rust:before { + content: "\e972"; +} + +.file_type_rs:before { + content: "\e972"; +} + +.file_type_sass:before { + content: "\e973"; + color: #cd6799; +} + +.file_type_scala:before { + content: "\e974"; + color: #dc322f; +} + +.file_type_sbt:before { + content: "\e974"; + color: #dc322f; +} + +.file_type_scss:before { + content: "\e975"; + color: #cd6799; +} + +.file_type_shell:before { + content: "\e976"; + color: #d9b400; +} + +.file_type_sh:before { + content: "\e976"; + color: #d9b400; +} + +.file_type_bash:before { + content: "\e976"; + color: #d9b400; +} + +.file_type_bashrc:before { + content: "\e976"; + color: #d9b400; +} + +.file_type_slim:before { + content: "\e977"; + color: #5b4a8f; +} + +.file_type_skim:before { + content: "\e977"; + color: #5b4a8f; +} + +.file_type_smarty:before { + content: "\e978"; + color: #fdf700; +} + +.file_type_tpl1:before { + content: "\e978"; + color: #fdf700; +} + +.file_type_sql:before { + content: "\e979"; + color: #ffda44; +} + +.file_type_sqlserver:before { + content: "\e979"; + color: #ffda44; +} + +.file_type_sqlite:before { + content: "\e97a"; + color: #0f80cc; +} + +.file_type_sqlite3:before { + content: "\e97a"; + color: #0f80cc; +} + +.file_type_stylus:before { + content: "\e97b"; +} + +.file_type_styl:before { + content: "\e97b"; +} + +.file_type_svelte:before { + content: "\e97c"; + color: #ff3e00; +} + +.file_type_svg:before { + content: "\e97d"; + color: #ffb13b; +} + +.file_type_swift:before { + content: "\e97e"; + color: #fa7343; +} + +.file_type_tailwind:before { + content: "\e97f"; + color: #44a8b3; +} + +.file_type_tcl:before { + content: "\e980"; + color: #c3b15f; +} + +.file_type_terraform:before { + content: "\e981"; + color: #623ce4; +} + +.file_type_tf:before { + content: "\e981"; + color: #623ce4; +} + +.file_type_tfvars:before { + content: "\e981"; + color: #623ce4; +} + +.file_type_terragrunt:before { + content: "\e981"; + color: #623ce4; +} + +.file_type_testjs:before { + content: "\e982"; + color: #f5de19; +} + +.file_type_testts:before { + content: "\e983"; + color: #007acc; +} + +.file_type_tex:before { + content: "\e984"; + color: #cfcfcf; +} + +.file_type_textile:before { + content: "\e986"; + color: #ffe7ac; +} + +.file_type_toml:before { + content: "\e987"; + color: #aaa; +} + +.file_type_tsconfig:before { + content: "\e988"; + color: #007acc; +} + +.file_type_twig:before { + content: "\e989"; + color: #78dc50; +} + +.file_type_swig:before { + content: "\e989"; + color: #78dc50; +} + +.file_type_typescript:before { + content: "\e98a"; + color: #007acc; +} + +.file_type_ts:before { + content: "\e98a"; + color: #007acc; +} + +.file_type_typescriptdef:before { + content: "\e98b"; + color: #007acc; +} + +.file_type_types:before { + content: "\e98b"; + color: #007acc; +} + +.file_type_typings:before { + content: "\e98b"; + color: #007acc; +} + +.file_type_vala:before { + content: "\e98c"; + color: #403757; +} + +.file_type_vb:before { + content: "\e98d"; + color: #00519a; +} + +.file_type_vbs:before { + content: "\e98d"; + color: #00519a; +} + +.file_type_velocity:before { + content: "\e98e"; + color: #262693; +} + +.file_type_vm:before { + content: "\e98e"; + color: #262693; +} + +.file_type_verilog:before { + content: "\e98f"; + color: #1a348f; +} + +.file_type_v:before { + content: "\e98f"; + color: #1a348f; +} + +.file_type_vh:before { + content: "\e98f"; + color: #1a348f; +} + +.file_type_sv:before { + content: "\e98f"; + color: #1a348f; +} + +.file_type_svh:before { + content: "\e98f"; + color: #1a348f; +} + +.file_type_vhdl:before { + content: "\e990"; + color: #0d9b35; +} + +.file_type_vhd:before { + content: "\e990"; + color: #0d9b35; +} + +.file_type_view:before { + content: "\e992"; + color: #e44f26; +} + +.file_type_vue:before { + content: "\e993"; + color: #41b883; +} + +.file_type_wasm:before { + content: "\e994"; + color: #654ff0; +} + +.file_type_webpack:before { + content: "\e995"; + color: #8dd6f9; +} + +.file_type_xml:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_rdf:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_rss:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_wsdl:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_xslt:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_xamlatom:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_mathml:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_mml:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_xul:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_xbl:before { + content: "\e996"; + color: #f1662a; +} + +.file_type:before { + content: "\e996"; + color: #f1662a; +} + +.file_type_xquery:before { + content: "\e997"; + color: #f1662a; +} + +.file_type_xsl:before { + content: "\e998"; + color: #33a9dc; +} + +.file_type_yaml:before { + content: "\e999"; + color: #ffe885; +} + +.file_type_yml:before { + content: "\e999"; + color: #ffe885; +} + +.file_type_yarn:before { + content: "\e99a"; + color: #2188b6; +} + +.file_type_actionscript:before { + content: "\e99c"; + color: #c41718; +} + +.file_type_as:before { + content: "\e99c"; + color: #c41718; +} + +.file_type_ada:before { + content: "\e99d"; + color: #0f23c3; +} + +.file_type_adb:before { + content: "\e99d"; + color: #0f23c3; +} + +.file_type_zig:before { + content: "\e9a5"; + color: #f7a41d; +} \ No newline at end of file diff --git a/src/res/fonts/FiraCode.ttf b/src/res/fonts/FiraCode.ttf new file mode 100644 index 000000000..c05ac827c Binary files /dev/null and b/src/res/fonts/FiraCode.ttf differ diff --git a/src/res/fonts/MesloLGSNFRegular.ttf b/src/res/fonts/MesloLGSNFRegular.ttf new file mode 100644 index 000000000..b829758ea Binary files /dev/null and b/src/res/fonts/MesloLGSNFRegular.ttf differ diff --git a/www/res/fonts/Roboto_Mono/RobotoMono-Regular.ttf b/src/res/fonts/RobotoMono.ttf similarity index 100% rename from www/res/fonts/Roboto_Mono/RobotoMono-Regular.ttf rename to src/res/fonts/RobotoMono.ttf diff --git a/www/res/icons/fonts/code-editor-icon.ttf b/src/res/icons/icons.ttf similarity index 100% rename from www/res/icons/fonts/code-editor-icon.ttf rename to src/res/icons/icons.ttf diff --git a/src/res/icons/li-icon.ttf b/src/res/icons/li-icon.ttf new file mode 100644 index 000000000..6627c9325 Binary files /dev/null and b/src/res/icons/li-icon.ttf differ diff --git a/src/res/icons/style.css b/src/res/icons/style.css new file mode 100644 index 000000000..cae1ff314 --- /dev/null +++ b/src/res/icons/style.css @@ -0,0 +1,1220 @@ +@font-face { + font-family: "code-editor-icon"; + src: url("icons.ttf?r1lwvj") format("truetype"); + font-weight: normal; + font-style: normal; + font-display: block; +} + +@font-face { + font-family: "li-icon"; + src: url("li-icon.ttf") format("truetype"); + font-weight: normal; + font-style: normal; + font-display: block; +} + +.icon { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: "code-editor-icon" !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.licons { + /* Use !important to prevent extensions from overriding this font. */ + font-family: "li-icon" !important; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.licons.scale:before { + content: "\f006"; +} + +.licons.cart:before { + content: "\f005"; +} + +.licons.zap:before { + content: "\f000"; +} + +.licons.verified:before { + content: "\f001"; +} + +.licons.terminal:before { + content: "\f002"; +} + +.licons.tag:before { + content: "\f003"; +} + +.icon.acode:before { + content: "\ea0d"; + color: #3499fe; +} + +.icon.shift:before { + content: "\ea06"; +} + +.icon.replace:before { + content: "\ea07"; +} + +.icon.replace_all:before { + content: "\ea08"; +} + +.icon.moveline-up:before { + content: "\ea09"; +} + +.icon.moveline-down:before { + content: "\ea0a"; +} + +.icon.copyline-up:before { + content: "\ea0b"; +} + +.icon.copyline-down:before { + content: "\ea0c"; +} + +.icon.android:before { + content: "\e92e"; + color: #a4c639; +} + +.icon.angular:before { + content: "\e92f"; + color: #dd0031; +} + +.icon.angularuniversal:before { + content: "\e9ff"; + color: #00acc1; +} + +.icon.css3:before { + content: "\e930"; + color: #1572b6; +} + +.icon.dev-dot-to:before { + content: "\e931"; +} + +.icon.facebook:before { + content: "\e932"; + color: #4172b8; +} + +.icon.git:before { + content: "\e933"; + color: #f05032; +} + +.icon.github:before { + content: "\e934"; +} + +.icon.gmail:before { + content: "\e935"; + color: #d14836; +} + +.icon.googlechrome:before { + content: "\e936"; + color: #4285f4; +} + +.icon.googledrive:before { + content: "\e937"; + color: #4285f4; +} + +.icon.googleplay:before { + content: "\e938"; + color: #607d8b; +} + +.icon.html5:before { + content: "\e939"; + color: #e34f26; +} + +.icon.instagram:before { + content: "\e93a"; + color: #e4405f; +} + +.icon.ionic:before { + content: "\e93b"; + color: #3880ff; +} + +.icon.javascript:before { + content: "\e93c"; + color: #f7df1e; +} + +.icon.jekyll:before { + content: "\e93d"; + color: #c00; +} + +.icon.linkedin:before { + content: "\e93e"; + color: #0077b5; +} + +.icon.markdown:before { + content: "\e93f"; +} + +.icon.npm:before { + content: "\e940"; + color: #cb3837; +} + +.icon.patreon:before { + content: "\ea0f"; + color: #f96854; +} + +.icon.paypal:before { + content: "\ea10"; + color: #00457c; +} + +.icon.python:before { + content: "\e941"; + color: #3776ab; +} + +.icon.react:before { + content: "\e942"; + color: #61dafb; +} + +.icon.ruby:before { + content: "\ea11"; + color: #cc342d; +} + +.icon.stackexchange:before { + content: "\e943"; + color: #1e5397; +} + +.icon.stackoverflow:before { + content: "\e944"; + color: #fe7a16; +} + +.icon.telegram:before { + content: "\e945"; + color: #2ca5e0; +} + +.icon.twitter:before { + content: "\e946"; + color: #1da1f2; +} + +.icon.visualstudiocode:before { + content: "\e947"; + color: #007acc; +} + +.icon.vue:before { + content: "\e9fe"; + color: #4fc08d; +} + +.icon.webpack:before { + content: "\e948"; + color: #8dd6f9; +} + +.icon.yarn:before { + content: "\e949"; + color: #2c8ebb; +} + +.icon.youtube:before { + content: "\e94a"; + color: #f00; +} + +.icon.zip:before { + content: "\e9f8"; +} + +.icon.zip-outline:before { + content: "\e9f9"; +} + +.icon.document-information:before { + content: "\e900"; +} + +.icon.document-information-outline:before { + content: "\e901"; +} + +.icon.document-forbidden:before { + content: "\e902"; +} + +.icon.document-forbidden-outline:before { + content: "\e903"; +} + +.icon.document-remove:before { + content: "\e904"; +} + +.icon.document-remove-outline:before { + content: "\e905"; +} + +.icon.document-checked:before { + content: "\e906"; +} + +.icon.document-checked-outline:before { + content: "\e907"; +} + +.icon.document-cancel:before { + content: "\e908"; +} + +.icon.document-cancel-outline:before { + content: "\e909"; +} + +.icon.document-error:before { + content: "\e90a"; +} + +.icon.document-error-outline:before { + content: "\e90b"; +} + +.icon.document-locked:before { + content: "\e90c"; +} + +.icon.document-locked-outline:before { + content: "\e90d"; +} + +.icon.document-unlocked:before { + content: "\e90e"; +} + +.icon.document-unlocked-outline:before { + content: "\e90f"; +} + +.icon.document-search:before { + content: "\e910"; +} + +.icon.document-search-outline:before { + content: "\e911"; +} + +.icon.document-code:before { + content: "\e912"; +} + +.icon.document-code-outline:before { + content: "\e913"; +} + +.icon.document-text:before { + content: "\e914"; +} + +.icon.document-text-outline:before { + content: "\e915"; +} + +.icon.document-text2:before { + content: "\ea01"; +} + +.icon.document-text2-outline:before { + content: "\ea02"; +} + +.icon.document-text4:before { + content: "\ea03"; +} + +.icon.document-text5:before { + content: "\ea04"; +} + +.icon.document-add:before { + content: "\e91a"; +} + +.icon.document-add-outline:before { + content: "\e91b"; +} + +.icon.documents:before { + content: "\e91c"; +} + +.icon.documents-outline:before { + content: "\e91d"; +} + +.icon.folder-information:before { + content: "\e91e"; +} + +.icon.folder-information-outline:before { + content: "\e91f"; +} + +.icon.folder-remove:before { + content: "\e920"; +} + +.icon.folder-remove-outline:before { + content: "\e921"; +} + +.icon.folder-add:before { + content: "\e922"; +} + +.icon.folder-add-outline:before { + content: "\e923"; +} + +.icon.folder-upload:before { + content: "\e924"; +} + +.icon.folder-upload-outline:before { + content: "\e925"; +} + +.icon.folder-download:before { + content: "\e926"; +} + +.icon.folder-download-outline:before { + content: "\e927"; +} + +.icon.folder-search:before { + content: "\e928"; +} + +.icon.folder-search-outline:before { + content: "\e929"; +} + +.icon.folder:before { + content: "\e92a"; +} + +.icon.folder-outline:before { + content: "\e92b"; +} + +.icon.folder2:before { + content: "\e92c"; +} + +.icon.folder2-outline:before { + content: "\e92d"; +} + +.icon.error:before { + content: "\e94b"; +} + +.icon.error_outline:before { + content: "\e94c"; +} + +.icon.warningreport_problem:before { + content: "\e94d"; +} + +.icon.movie:before { + content: "\e918"; +} + +.icon.library_addqueueadd_to_photos:before { + content: "\e94e"; +} + +.icon.library_music:before { + content: "\e94f"; +} + +.icon.new_releases:before { + content: "\e950"; +} + +.icon.not_interesteddo_not_disturb:before { + content: "\e951"; +} + +.icon.pause:before { + content: "\e952"; +} + +.icon.pause_circle_filled:before { + content: "\e953"; +} + +.icon.pause_circle_outline:before { + content: "\e954"; +} + +.icon.play_arrow:before { + content: "\e955"; +} + +.icon.play_circle_filled:before { + content: "\e956"; +} + +.icon.play_circle_outline:before { + content: "\e957"; +} + +.icon.repeat:before { + content: "\e958"; +} + +.icon.repeat_one:before { + content: "\e959"; +} + +.icon.replay:before { + content: "\e95a"; +} + +.icon.shuffle:before { + content: "\e95b"; +} + +.icon.skip_next:before { + content: "\e95c"; +} + +.icon.skip_previous:before { + content: "\e95d"; +} + +.icon.videocam:before { + content: "\e919"; +} + +.icon.music_video:before { + content: "\e978"; +} + +.icon.emailmailmarkunreadlocal_post_office:before { + content: "\e95e"; +} + +.icon.chat_bubble:before { + content: "\e917"; +} + +.icon.vpn_key:before { + content: "\e95f"; +} + +.icon.add:before { + content: "\e960"; +} + +.icon.add_box:before { + content: "\e961"; +} + +.icon.add_circle:before { + content: "\e962"; +} + +.icon.add_circle_outlinecontrol_point:before { + content: "\e963"; +} + +.icon.block:before { + content: "\e964"; +} + +.icon.clearclose:before { + content: "\e965"; +} + +.icon.copy:before { + content: "\e966"; +} + +.icon.cut:before { + content: "\e967"; +} + +.icon.paste:before { + content: "\e968"; +} + +.icon.edit:before { + content: "\e969"; +} + +.icon.drafts:before { + content: "\e96a"; +} + +.icon.forward:before { + content: "\e96b"; +} + +.icon.linkinsert_link:before { + content: "\ea00"; +} + +.icon.redo:before { + content: "\e9f6"; +} + +.icon.remove:before { + content: "\e96c"; +} + +.icon.remove_circledo_not_disturb_on:before { + content: "\e96d"; +} + +.icon.remove_circle_outline:before { + content: "\e96e"; +} + +.icon.save:before { + content: "\e9f7"; +} + +.icon.send:before { + content: "\e96f"; +} + +.icon.text_format:before { + content: "\e916"; +} + +.icon.undo:before { + content: "\e970"; +} + +.icon.font_download:before { + content: "\ea12"; +} + +.icon.save_alt:before { + content: "\e971"; +} + +.icon.file_copy:before { + content: "\e972"; +} + +.icon.sd_storagesd_card:before { + content: "\e973"; +} + +.icon.attach_file:before { + content: "\e974"; +} + +.icon.attach_money:before { + content: "\e975"; +} + +.icon.format_bold:before { + content: "\e976"; +} + +.icon.format_color_fill:before { + content: "\e977"; +} + +.icon.format_size:before { + content: "\e979"; +} + +.icon.format_underlined:before { + content: "\e97a"; +} + +.icon.insert_chartpollassessment:before { + content: "\e97b"; +} + +.icon.insert_emoticontag_facesmood:before { + content: "\e97c"; +} + +.icon.insert_invitationevent:before { + content: "\e97d"; +} + +.icon.image:before { + content: "\e97e"; +} + +.icon.publish:before { + content: "\e97f"; +} + +.icon.vertical_align_bottom:before { + content: "\e980"; +} + +.icon.vertical_align_top:before { + content: "\e981"; +} + +.icon.monetization_on:before { + content: "\e982"; +} + +.icon.notes:before { + content: "\ea13"; +} + +.icon.cloud:before { + content: "\e983"; +} + +.icon.cloud_done:before { + content: "\e984"; +} + +.icon.cloud_download:before { + content: "\e985"; +} + +.icon.cloud_uploadbackup:before { + content: "\e986"; +} + +.icon.file_downloadget_app:before { + content: "\e987"; +} + +.icon.file_upload:before { + content: "\e988"; +} + +.icon.folder4:before { + content: "\ea05"; +} + +.icon.folder_open:before { + content: "\e9fb"; +} + +.icon.keyboard_arrow_down:before { + content: "\e98d"; +} + +.icon.keyboard_arrow_left:before { + content: "\e98e"; +} + +.icon.keyboard_arrow_right:before { + content: "\e98f"; +} + +.icon.keyboard_arrow_up:before { + content: "\e990"; +} + +.icon.keyboard_backspace:before { + content: "\e991"; +} + +.icon.keyboard_capslock:before { + content: "\e992"; +} + +.icon.keyboard_hide:before { + content: "\e993"; +} + +.icon.keyboard_tab:before { + content: "\e994"; +} + +.icon.keyboard_voice:before { + content: "\e995"; +} + +.icon.laptop_chromebook:before { + content: "\e996"; +} + +.icon.laptop_mac:before { + content: "\e997"; +} + +.icon.laptop_windows:before { + content: "\e998"; +} + +.icon.phone_android:before { + content: "\e999"; +} + +.icon.phone_iphone:before { + content: "\e99a"; +} + +.icon.audiotrack:before { + content: "\e989"; +} + +.icon.color_lenspalette:before { + content: "\e99b"; +} + +.icon.colorize:before { + content: "\e99c"; +} + +.icon.music_note:before { + content: "\e98a"; +} + +.icon.navigate_beforechevron_left:before { + content: "\e99d"; +} + +.icon.navigate_nextchevron_right:before { + content: "\e99e"; +} + +.icon.remove_red_eyevisibility:before { + content: "\e99f"; +} + +.icon.tune:before { + content: "\e9a0"; +} + +.icon.movie_filter:before { + content: "\e98b"; +} + +.icon.add_photo_alternate:before { + content: "\e9a1"; +} + +.icon.image_search:before { + content: "\e9a2"; +} + +.icon.beenhere:before { + content: "\e9a3"; +} + +.icon.local_moviestheaters:before { + content: "\e98c"; +} + +.icon.apps:before { + content: "\e9a4"; +} + +.icon.arrow_back:before { + content: "\e9a5"; +} + +.icon.arrow_drop_down:before { + content: "\e9a6"; +} + +.icon.arrow_drop_down_circle:before { + content: "\e9a7"; +} + +.icon.arrow_drop_up:before { + content: "\e9a8"; +} + +.icon.arrow_forward:before { + content: "\e9a9"; +} + +.icon.cancel:before { + content: "\e9aa"; +} + +.icon.check:before { + content: "\e9ab"; +} + +.icon.expand_less:before { + content: "\e9ac"; +} + +.icon.expand_more:before { + content: "\e9ad"; +} + +.icon.fullscreen:before { + content: "\e9ae"; +} + +.icon.fullscreen_exit:before { + content: "\e9af"; +} + +.icon.menu:before { + content: "\e9b0"; +} + +.icon.keyboard_control:before { + content: "\e9b1"; +} + +.icon.more_vert:before { + content: "\e9b2"; +} + +.icon.refresh:before { + content: "\e9b3"; +} + +.icon.unfold_less:before { + content: "\e9b4"; +} + +.icon.unfold_more:before { + content: "\e9b5"; +} + +.icon.arrow_upward:before { + content: "\e9b6"; +} + +.icon.subdirectory_arrow_left:before { + content: "\e9b7"; +} + +.icon.subdirectory_arrow_right:before { + content: "\e9b8"; +} + +.icon.arrow_downward:before { + content: "\e9b9"; +} + +.icon.first_page:before { + content: "\e9ba"; +} + +.icon.last_page:before { + content: "\e9bb"; +} + +.icon.arrow_left:before { + content: "\e9bc"; +} + +.icon.arrow_right:before { + content: "\e9bd"; +} + +.icon.arrow_back_ios:before { + content: "\e9be"; +} + +.icon.arrow_forward_ios:before { + content: "\e9bf"; +} + +.icon.folder_special:before { + content: "\e9c0"; +} + +.icon.priority_high:before { + content: "\e9c1"; +} + +.icon.notifications:before { + content: "\e9c2"; +} + +.icon.notifications_none:before { + content: "\e9c3"; +} + +.icon.person:before { + content: "\e9c4"; +} + +.icon.public:before { + content: "\e9c5"; +} + +.icon.share:before { + content: "\e9c6"; +} + +.icon.sentiment_dissatisfied:before { + content: "\e9c7"; +} + +.icon.sentiment_neutral:before { + content: "\e9c8"; +} + +.icon.sentiment_satisfied:before { + content: "\e9c9"; +} + +.icon.sentiment_very_dissatisfied:before { + content: "\e9ca"; +} + +.icon.sentiment_very_satisfied:before { + content: "\e9cb"; +} + +.icon.stargrade:before { + content: "\e9cc"; +} + +.icon.star_half:before { + content: "\e9cd"; +} + +.icon.star_outline:before { + content: "\e9ce"; +} + +.icon.account_box:before { + content: "\e9cf"; +} + +.icon.account_circle:before { + content: "\e9d0"; +} + +.icon.android-full:before { + content: "\e9d1"; +} + +.icon.autorenew:before { + content: "\e9d2"; +} + +.icon.cached:before { + content: "\e9d3"; +} + +.icon.check_circle:before { + content: "\e9d4"; +} + +.icon.code:before { + content: "\e9d5"; +} + +.icon.delete:before { + content: "\e9d6"; +} + +.icon.exit_to_app:before { + content: "\e9d7"; +} + +.icon.extension:before { + content: "\e9d8"; +} + +.icon.favorite:before { + content: "\e9d9"; +} + +.icon.favorite_outline:before { + content: "\e9da"; +} + +.icon.help:before { + content: "\e9db"; +} + +.icon.highlight_remove:before { + content: "\e9dc"; +} + +.icon.historyrestore:before { + content: "\e9dd"; +} + +.icon.home:before { + content: "\e9de"; +} + +.icon.httpslock:before { + content: "\e9df"; +} + +.icon.info:before { + content: "\e9e0"; +} + +.icon.info_outline:before { + content: "\e9e1"; +} + +.icon.input:before { + content: "\e9e2"; +} + +.icon.label:before { + content: "\e9e3"; +} + +.icon.label_outline:before { + content: "\e9e4"; +} + +.icon.launchopen_in_new:before { + content: "\e9fc"; +} + +.icon.open_in_browser:before { + content: "\e9fd"; +} + +.icon.perm_media:before { + content: "\e9e5"; +} + +.icon.power_settings_new:before { + content: "\e9e6"; +} + +.icon.search:before { + content: "\e9e7"; +} + +.icon.settings:before { + content: "\e9e8"; +} + +.icon.settings_applications:before { + content: "\e9e9"; +} + +.icon.shop:before { + content: "\e9ea"; +} + +.icon.spellcheck:before { + content: "\e9eb"; +} + +.icon.stars:before { + content: "\e9ec"; +} + +.icon.translate:before { + content: "\e9ed"; +} + +.icon.visibility_off:before { + content: "\e9ee"; +} + +.icon.http:before { + content: "\ea14"; +} + +.icon.compare_arrows:before { + content: "\ea15"; +} + +.icon.update:before { + content: "\e9ef"; +} + +.icon.g_translate:before { + content: "\e9f0"; +} + +.icon.check_circle_outline:before { + content: "\e9f1"; +} + +.icon.delete_outline:before { + content: "\e9f2"; +} + +.icon.drive_folder_upload:before { + content: "\e9f3"; +} + +.icon.home_filled:before { + content: "\ea16"; +} + +.icon.library_add_check:before { + content: "\e9f4"; +} + +.icon.logout:before { + content: "\e9fa"; +} + +.icon.replay_circle_filled:before { + content: "\e9f5"; +} + +.icon.height:before { + content: "\ea17"; +} + +.icon.all_inclusive:before { + content: "\ea18"; +} \ No newline at end of file diff --git a/www/res/tail-spin.svg b/src/res/tail-spin.svg similarity index 100% rename from www/res/tail-spin.svg rename to src/res/tail-spin.svg diff --git a/src/settings/appSettings.js b/src/settings/appSettings.js new file mode 100644 index 000000000..b9f20f628 --- /dev/null +++ b/src/settings/appSettings.js @@ -0,0 +1,324 @@ +import fsOperation from "fileSystem"; +import ajax from "@deadlyjack/ajax"; +import { resetKeyBindings } from "ace/commands"; +import settingsPage from "components/settingsPage"; +import loader from "dialogs/loader"; +import actions from "handlers/quickTools"; +import actionStack from "lib/actionStack"; +import constants from "lib/constants"; +import lang from "lib/lang"; +import openFile from "lib/openFile"; +import appSettings from "lib/settings"; +import FontManager from "pages/fontManager"; +import QuickToolsSettings from "pages/quickTools"; +import encodings, { getEncoding } from "utils/encodings"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; + +export default function otherSettings() { + const values = appSettings.value; + const title = strings["app settings"].capitalize(); + const items = [ + { + key: "retryRemoteFsAfterFail", + text: strings["retry ftp/sftp when fail"], + checkbox: values.retryRemoteFsAfterFail, + }, + { + key: "animation", + text: strings.animation, + value: values.animation, + valueText: (value) => strings[value], + select: [ + ["no", strings.no], + ["yes", strings.yes], + ["system", strings.system], + ], + }, + { + key: "fullscreen", + text: strings.fullscreen.capitalize(), + checkbox: values.fullscreen, + }, + { + key: "lang", + text: strings["change language"], + value: values.lang, + select: lang.list, + valueText: (value) => lang.getName(value), + }, + { + key: "keybindings", + text: strings["key bindings"], + select: [ + ["edit", strings.edit], + ["reset", strings.reset], + ], + }, + { + key: "confirmOnExit", + text: strings["confirm on exit"], + checkbox: values.confirmOnExit, + }, + { + key: "checkFiles", + text: strings["check file changes"], + checkbox: values.checkFiles, + }, + { + key: "checkForAppUpdates", + text: strings["check for app updates"], + checkbox: values.checkForAppUpdates, + info: strings["info-checkForAppUpdates"], + }, + { + key: "console", + text: strings.console, + value: values.console, + select: [appSettings.CONSOLE_LEGACY, appSettings.CONSOLE_ERUDA], + }, + { + key: "cleanInstallState", + text: strings["clean install state"], + }, + { + key: "keyboardMode", + text: strings["keyboard mode"], + value: values.keyboardMode, + valueText(mode) { + return strings[mode.replace(/_/g, " ").toLocaleLowerCase()]; + }, + select: [ + [appSettings.KEYBOARD_MODE_NORMAL, strings.normal], + [appSettings.KEYBOARD_MODE_NO_SUGGESTIONS, strings["no suggestions"]], + [ + appSettings.KEYBOARD_MODE_NO_SUGGESTIONS_AGGRESSIVE, + strings["no suggestions aggressive"], + ], + ], + }, + { + key: "vibrateOnTap", + text: strings["vibrate on tap"], + checkbox: values.vibrateOnTap, + }, + { + key: "rememberFiles", + text: strings["remember opened files"], + checkbox: values.rememberFiles, + }, + { + key: "rememberFolders", + text: strings["remember opened folders"], + checkbox: values.rememberFolders, + }, + { + key: "floatingButton", + text: strings["floating button"], + checkbox: values.floatingButton, + }, + { + key: "openFileListPos", + text: strings["active files"], + value: values.openFileListPos, + valueText: (value) => strings[value], + select: [ + [appSettings.OPEN_FILE_LIST_POS_SIDEBAR, strings.sidebar], + [appSettings.OPEN_FILE_LIST_POS_HEADER, strings.header], + [appSettings.OPEN_FILE_LIST_POS_BOTTOM, strings.bottom], + ], + }, + { + key: "quickTools", + text: strings["quick tools"], + checkbox: !!values.quickTools, + info: strings["info-quickTools"], + }, + { + key: "quickToolsTriggerMode", + text: strings["quicktools trigger mode"], + value: values.quickToolsTriggerMode, + select: [ + [appSettings.QUICKTOOLS_TRIGGER_MODE_CLICK, "click"], + [appSettings.QUICKTOOLS_TRIGGER_MODE_TOUCH, "touch"], + ], + }, + { + key: "touchMoveThreshold", + text: strings["touch move threshold"], + value: values.touchMoveThreshold, + prompt: strings["touch move threshold"], + promptType: "number", + promptOptions: { + test(value) { + return value >= 0; + }, + }, + }, + { + key: "quickToolsSettings", + text: strings["shortcut buttons"], + index: 0, + }, + { + key: "fontManager", + text: strings["fonts"], + index: 1, + }, + { + key: "showSideButtons", + text: strings["show side buttons"], + checkbox: values.showSideButtons, + }, + { + key: "excludeFolders", + text: strings["exclude files"], + value: values.excludeFolders.join("\n"), + prompt: strings["exclude files"], + promptType: "textarea", + promptOptions: { + test(value) { + return value.split("\n").every((item) => { + return item.trim().length > 0; + }); + }, + }, + }, + { + key: "defaultFileEncoding", + text: strings["default file encoding"], + value: values.defaultFileEncoding, + valueText: (value) => + value === "auto" ? strings.auto || "Auto" : getEncoding(value).label, + select: [ + ["auto", strings.auto || "Auto"], + ...Object.keys(encodings).map((id) => { + const encoding = encodings[id]; + return [id, encoding.label]; + }), + ], + }, + ]; + + return settingsPage(title, items, callback); + + async function callback(key, value) { + switch (key) { + case "keybindings": { + if (value === "edit") { + actionStack.pop(2); + openFile(KEYBINDING_FILE); + } else { + resetKeyBindings(); + } + return; + } + + case "quickToolsSettings": + QuickToolsSettings(); + return; + + case "fontManager": + FontManager(); + return; + + case "console": { + if (value !== "eruda") { + break; + } + + const fs = fsOperation(Url.join(DATA_STORAGE, "eruda.js")); + if (await fs.exists()) { + break; + } + + loader.create( + strings["downloading file"].replace("{file}", "eruda.js"), + strings["downloading..."], + ); + try { + const erudaScript = await ajax({ + url: constants.ERUDA_CDN, + responseType: "text", + contentType: "application/x-www-form-urlencoded", + }); + await fsOperation(DATA_STORAGE).createFile("eruda.js", erudaScript); + loader.destroy(); + } catch (error) { + helpers.error(error); + } + } + + case "cleanInstallState": { + const INSTALL_STATE_STORAGE = Url.join(DATA_STORAGE, ".install-state"); + + const fs = fsOperation(INSTALL_STATE_STORAGE); + + if (!(await fs.exists())) { + toast(strings["no such file or directory"]); + break; + } + + loader.create("loading..."); + + try { + await fs.delete(); + loader.destroy(); + toast(strings["success"]); + } catch (error) { + helpers.error(error); + loader.destroy(); + } + } + + case "rememberFiles": + if (!value) { + delete localStorage.files; + } + break; + + case "rememberFolders": + if (!value) { + delete localStorage.folders; + } + break; + + case "floatingButton": + root.classList.toggle("hide-floating-button"); + break; + + case "keyboardMode": + system.setInputType(value); + break; + + case "fullscreen": + if (value) acode.exec("enable-fullscreen"); + else acode.exec("disable-fullscreen"); + break; + + case "quickTools": + if (value) { + value = 1; + actions("set-height", 1); + } else { + value = 0; + actions("set-height", 0); + } + break; + + case "excludeFolders": + value = value + .split("\n") + .map((item) => item.trim()) + .filter((item) => item.length > 0); + break; + + default: + break; + } + + appSettings.update({ + [key]: value, + }); + } +} diff --git a/src/settings/backupRestore.js b/src/settings/backupRestore.js new file mode 100644 index 000000000..a181c2d47 --- /dev/null +++ b/src/settings/backupRestore.js @@ -0,0 +1,692 @@ +import fsOperation from "fileSystem"; +import settingsPage from "components/settingsPage"; +import toast from "components/toast"; +import alert from "dialogs/alert"; +import confirm from "dialogs/confirm"; +import loader from "dialogs/loader"; +import constants from "lib/constants"; +import appSettings from "lib/settings"; +import FileBrowser from "pages/fileBrowser"; +import helpers from "utils/helpers"; +import Uri from "utils/Uri"; +import Url from "utils/Url"; + +// Backup format version for future compatibility +const BACKUP_VERSION = 2; + +/** + * CRC32 lookup table for checksum calculation + */ +const CRC32_TABLE = (() => { + const table = new Uint32Array(256); + for (let i = 0; i < 256; i++) { + let crc = i; + for (let j = 0; j < 8; j++) { + crc = crc & 1 ? 0xedb88320 ^ (crc >>> 1) : crc >>> 1; + } + table[i] = crc >>> 0; + } + return table; +})(); + +/** + * Generates a CRC32 checksum for data integrity verification + * More robust than simple hash for detecting corrupted data + * @param {string} data + * @returns {string} + */ +function generateChecksum(data) { + let crc = 0xffffffff; + for (let i = 0; i < data.length; i++) { + const byte = data.charCodeAt(i) & 0xff; + crc = CRC32_TABLE[(crc ^ byte) & 0xff] ^ (crc >>> 8); + } + return ((crc ^ 0xffffffff) >>> 0).toString(16).padStart(8, "0"); +} + +/** + * Validates the structure of a backup object + * Supports both v1 (legacy) and v2 (new) backup formats + * @param {object} backup + * @returns {{valid: boolean, errors: string[], warnings: string[], isLegacy: boolean}} + */ +function validateBackupStructure(backup) { + const errors = []; + const warnings = []; + + if (!backup || typeof backup !== "object") { + errors.push(strings["backup not valid object"]); + return { valid: false, errors, warnings, isLegacy: false }; + } + + // Determine if this is a legacy (v1) backup + const isLegacy = !backup.version; + + if (isLegacy) { + // Legacy backup (v1) - just needs settings or installedPlugins to be valid + const hasData = + backup.settings || backup.keyBindings || backup.installedPlugins; + if (!hasData) { + errors.push(strings["backup no data"]); + } + warnings.push(strings["backup legacy warning"]); + } else { + // Version 2+ backup + if (backup.version >= 2) { + if (!backup.metadata) { + warnings.push(strings["backup missing metadata"]); + } + + // Verify checksum if present + if (backup.checksum) { + try { + const dataToCheck = JSON.stringify({ + settings: backup.settings, + keyBindings: backup.keyBindings, + installedPlugins: backup.installedPlugins, + }); + const expectedChecksum = generateChecksum(dataToCheck); + if (backup.checksum !== expectedChecksum) { + warnings.push(strings["backup checksum mismatch"]); + } + } catch (e) { + warnings.push(strings["backup checksum verify failed"]); + } + } + } + } + + // Validate settings (both versions) + if (backup.settings !== undefined && typeof backup.settings !== "object") { + errors.push(strings["backup invalid settings"]); + } + + // Validate keyBindings (both versions) + if ( + backup.keyBindings !== undefined && + typeof backup.keyBindings !== "object" + ) { + errors.push(strings["backup invalid keybindings"]); + } + + // Validate installedPlugins (both versions) + if ( + backup.installedPlugins !== undefined && + !Array.isArray(backup.installedPlugins) + ) { + errors.push(strings["backup invalid plugins"]); + } + + return { valid: errors.length === 0, errors, warnings, isLegacy }; +} + +/** + * Formats a date for backup filename + * @param {Date} date + * @returns {string} + */ +function formatDateForFilename(date) { + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, "0"); + const day = String(date.getDate()).padStart(2, "0"); + const hours = String(date.getHours()).padStart(2, "0"); + const minutes = String(date.getMinutes()).padStart(2, "0"); + return `${year}${month}${day}_${hours}${minutes}`; +} + +function backupRestore() { + const title = + strings.backup.capitalize() + "/" + strings.restore.capitalize(); + const items = [ + { + key: "backup", + text: strings.backup.capitalize(), + icon: "file_downloadget_app", + }, + { + key: "restore", + text: strings.restore.capitalize(), + icon: "historyrestore", + }, + { + note: strings["backup/restore note"], + }, + ]; + + return settingsPage(title, items, callback); + + function callback(key) { + switch (key) { + case "backup": + backup(); + return; + + case "restore": + restore(); + return; + + default: + break; + } + } + + async function backup() { + const loaderDialog = loader.create( + strings.backup.capitalize(), + strings["preparing backup"], + ); + + try { + loaderDialog.show(); + loaderDialog.setMessage(strings["collecting settings"]); + + const settings = appSettings.value; + + // Read keybindings with fallback + loaderDialog.setMessage(strings["collecting key bindings"]); + let keyBindings = null; + try { + const keybindingsFS = fsOperation(KEYBINDING_FILE); + if (await keybindingsFS.exists()) { + keyBindings = await keybindingsFS.readFile("json"); + } + } catch (error) { + console.warn("Could not read keybindings:", error); + } + + // Collect plugin information + loaderDialog.setMessage(strings["collecting plugins"]); + const installedPlugins = []; + const pluginDetails = []; + + try { + const pluginsDir = fsOperation(window.PLUGIN_DIR); + if (await pluginsDir.exists()) { + const plugins = await pluginsDir.lsDir(); + + for (const plugin of plugins) { + try { + const pluginJsonPath = Url.join( + window.PLUGIN_DIR, + plugin.name, + "plugin.json", + ); + const pluginJson = + await fsOperation(pluginJsonPath).readFile("json"); + + // Store detailed plugin info for better restore + const pluginInfo = { + id: pluginJson.id || plugin.name, + name: pluginJson.name || plugin.name, + version: pluginJson.version || "unknown", + source: pluginJson.source || null, + }; + pluginDetails.push(pluginInfo); + + if (pluginJson.source) { + installedPlugins.push(pluginJson.source); + } else { + installedPlugins.push(pluginJson.id || plugin.name); + } + } catch (error) { + // Fallback to just plugin name + installedPlugins.push(plugin.name); + pluginDetails.push({ + id: plugin.name, + name: plugin.name, + version: "unknown", + source: null, + }); + } + } + } + } catch (error) { + console.warn("Could not read plugins directory:", error); + } + + loaderDialog.hide(); + + // Get destination folder + const { url } = await FileBrowser("folder", strings["select folder"]); + + loaderDialog.show(); + loaderDialog.setMessage( + strings["creating backup"] || "Creating backup file...", + ); + + const timestamp = formatDateForFilename(new Date()); + const backupFilename = `Acode_backup_${timestamp}.backup`; + const backupDirname = "Backup"; + const backupDir = Url.join(url, backupDirname); + const backupFile = Url.join(backupDir, backupFilename); + const backupStorageFS = fsOperation(url); + const backupDirFS = fsOperation(backupDir); + const backupFileFS = fsOperation(backupFile); + + // Create backup directory if needed + if (!(await backupDirFS.exists())) { + await backupStorageFS.createDirectory(backupDirname); + } + + // Create backup file + if (!(await backupFileFS.exists())) { + await backupDirFS.createFile(backupFilename); + } + + // Prepare backup data with checksum + const backupData = { + settings, + keyBindings, + installedPlugins, + }; + + const checksum = generateChecksum(JSON.stringify(backupData)); + + const backupObject = { + version: BACKUP_VERSION, + metadata: { + createdAt: new Date().toISOString(), + appVersion: BuildInfo?.version || "unknown", + pluginCount: installedPlugins.length, + hasSettings: !!settings, + hasKeyBindings: !!keyBindings, + }, + checksum, + settings, + keyBindings, + installedPlugins, + pluginDetails, // Extra detail for better restoration info + }; + + const backupString = JSON.stringify(backupObject, null, 2); + await backupFileFS.writeFile(backupString); + + loaderDialog.destroy(); + + const message = [ + strings["backup successful"], + `
    ${Uri.getVirtualAddress(backupFile)}
    `, + `${strings.settings || "Settings"}: ✓`, + `${strings["key bindings"] || "Key Bindings"}: ${keyBindings ? "✓" : "-"}`, + `${strings.plugins || "Plugins"}: ${installedPlugins.length}`, + ].join("
    "); + + alert(strings.success.toUpperCase(), message); + } catch (error) { + loaderDialog.destroy(); + console.error("Backup error:", error); + alert( + strings.error.toUpperCase(), + `${strings["error details"] || "Error"}: ${error.message || error}`, + ); + } + } + + function restore() { + sdcard.openDocumentFile( + (data) => { + backupRestore.restore(data.uri); + }, + (error) => { + console.error("File picker error:", error); + toast(strings.error || "Error selecting file"); + }, + "application/octet-stream", + ); + } +} + +backupRestore.restore = async function (url) { + const loaderDialog = loader.create( + strings.restore.capitalize(), + strings["please wait..."], + ); + + const restoreResults = { + settings: { attempted: false, success: false, error: null }, + keyBindings: { attempted: false, success: false, error: null }, + plugins: { attempted: false, success: [], failed: [], skipped: [] }, + }; + + try { + loaderDialog.show(); + + // Read and parse backup file + const fs = fsOperation(url); + let backupContent; + + try { + backupContent = await fs.readFile("utf8"); + } catch (error) { + throw new Error(`Could not read backup file: ${error.message}`); + } + + let backup; + try { + backup = JSON.parse(backupContent); + } catch (error) { + loaderDialog.destroy(); + alert(strings.error.toUpperCase(), strings["invalid backup file"]); + return; + } + + // Validate backup structure + loaderDialog.setMessage(strings["validating backup"]); + const validation = validateBackupStructure(backup); + + if (!validation.valid) { + loaderDialog.destroy(); + const errorMessage = [ + strings["invalid backup file"], + "", + `${strings["issues found"]}:`, + ...validation.errors.map((e) => `• ${e}`), + ].join("\n"); + alert(strings.error.toUpperCase(), errorMessage); + return; + } + + loaderDialog.hide(); + + // Show backup info and ask for confirmation + const backupInfo = backup.metadata || {}; + const confirmParts = [ + `${strings["restore will include"]}

    `, + `${strings.settings}: ${backup.settings ? strings.yes : strings.no}
    `, + `${strings["key bindings"]}: ${backup.keyBindings ? strings.yes : strings.no}
    `, + `${strings.plugins}: ${backup.installedPlugins?.length || 0}
    `, + ]; + + if (backupInfo.createdAt) { + confirmParts.push( + `
    ${strings["last modified"]}: ${new Date(backupInfo.createdAt).toLocaleString()}
    `, + ); + } + + // Show warnings if any (legacy backup, checksum issues, etc.) + if (validation.warnings && validation.warnings.length > 0) { + confirmParts.push(`
    ${strings.warning}:
    `); + for (const warning of validation.warnings) { + confirmParts.push(`- ${warning}
    `); + } + } + + confirmParts.push(`
    ${strings["restore warning"]}`); + + const shouldContinue = await confirm( + strings.restore.capitalize(), + confirmParts.join(""), + true, + ); + + if (!shouldContinue) { + return; + } + + // What to restore - restore everything available + const selectedOptions = []; + if (backup.settings) selectedOptions.push("settings"); + if (backup.keyBindings) selectedOptions.push("keyBindings"); + if (backup.installedPlugins?.length) selectedOptions.push("plugins"); + + loaderDialog.show(); + + // Restore key bindings first (before settings, in case of reload) + if (selectedOptions.includes("keyBindings") && backup.keyBindings) { + restoreResults.keyBindings.attempted = true; + loaderDialog.setMessage(strings["restoring key bindings"]); + + try { + const keybindingsFS = fsOperation(window.KEYBINDING_FILE); + + // Ensure file exists + if (!(await keybindingsFS.exists())) { + const parentDir = fsOperation(DATA_STORAGE); + await parentDir.createFile(".key-bindings.json"); + } + + const text = JSON.stringify(backup.keyBindings, undefined, 2); + await keybindingsFS.writeFile(text); + restoreResults.keyBindings.success = true; + } catch (error) { + console.error("Error restoring key bindings:", error); + restoreResults.keyBindings.error = error.message; + } + } + + // Restore plugins + if ( + selectedOptions.includes("plugins") && + Array.isArray(backup.installedPlugins) && + backup.installedPlugins.length > 0 + ) { + restoreResults.plugins.attempted = true; + const { default: installPlugin } = await import("lib/installPlugin"); + + const totalPlugins = backup.installedPlugins.length; + let currentPlugin = 0; + + for (const id of backup.installedPlugins) { + currentPlugin++; + + if (!id) { + restoreResults.plugins.skipped.push({ + id: "(empty)", + reason: "Empty plugin ID", + }); + continue; + } + + const pluginName = + backup.pluginDetails?.find((p) => p.id === id || p.source === id) + ?.name || id; + + loaderDialog.setMessage( + `${strings["restoring plugins"]} (${currentPlugin}/${totalPlugins}): ${pluginName}`, + ); + + try { + if ( + id.startsWith("content://") || + id.startsWith("file://") || + id.includes("/") + ) { + // Local plugin case + try { + // Check if the source file still exists + const sourceFS = fsOperation(id); + if (!(await sourceFS.exists())) { + restoreResults.plugins.skipped.push({ + id: pluginName, + reason: strings["source not found"], + }); + continue; + } + await installPlugin(id); + restoreResults.plugins.success.push(pluginName); + } catch (error) { + restoreResults.plugins.failed.push({ + id: pluginName, + reason: error.message, + }); + } + } else { + // Remote plugin case - fetch from API + const pluginUrl = Url.join(constants.API_BASE, `plugin/${id}`); + let remotePlugin = null; + + try { + remotePlugin = await fsOperation(pluginUrl).readFile("json"); + } catch (error) { + restoreResults.plugins.failed.push({ + id: pluginName, + reason: strings["plugin not found"], + }); + continue; + } + + if (remotePlugin) { + let purchaseToken = null; + const isPaid = Number.parseFloat(remotePlugin.price) > 0; + + if (isPaid) { + try { + const [product] = await helpers.promisify(iap.getProducts, [ + remotePlugin.sku, + ]); + if (product) { + const purchases = await helpers.promisify(iap.getPurchases); + const purchase = purchases.find((p) => + p.productIds.includes(product.productId), + ); + purchaseToken = purchase?.purchaseToken; + } + + if (!purchaseToken) { + restoreResults.plugins.skipped.push({ + id: pluginName, + reason: strings["paid plugin skipped"], + }); + continue; + } + } catch (error) { + restoreResults.plugins.skipped.push({ + id: pluginName, + reason: `Paid plugin - ${error.message}`, + }); + continue; + } + } + + try { + await installPlugin(id, remotePlugin.name, purchaseToken); + restoreResults.plugins.success.push(pluginName); + } catch (error) { + restoreResults.plugins.failed.push({ + id: pluginName, + reason: error.message, + }); + } + } + } + } catch (error) { + console.error(`Error restoring plugin ${id}:`, error); + restoreResults.plugins.failed.push({ + id: pluginName, + reason: error.message, + }); + } + } + } + + // Restore settings last (may trigger reload) + if (selectedOptions.includes("settings") && backup.settings) { + restoreResults.settings.attempted = true; + loaderDialog.setMessage(strings["restoring settings"]); + + try { + // Validate and merge settings carefully + const currentSettings = appSettings.value; + const restoredSettings = backup.settings; + + // Only restore known settings keys to prevent issues with outdated backups + const validSettings = {}; + for (const key of Object.keys(currentSettings)) { + if (key in restoredSettings) { + // Type check before applying + if (typeof restoredSettings[key] === typeof currentSettings[key]) { + validSettings[key] = restoredSettings[key]; + } + } + } + + await appSettings.update(validSettings, false); + restoreResults.settings.success = true; + } catch (error) { + console.error("Error restoring settings:", error); + restoreResults.settings.error = error.message; + } + } + + loaderDialog.destroy(); + + // Build restore summary + const summaryParts = [ + `${strings["restore completed"]}

    `, + ]; + + if (restoreResults.settings.attempted) { + const status = restoreResults.settings.success + ? `✓ ${strings.restored}` + : `✗ ${strings.failed}`; + summaryParts.push(`${strings.settings}: ${status}
    `); + } + + if (restoreResults.keyBindings.attempted) { + const status = restoreResults.keyBindings.success + ? `✓ ${strings.restored}` + : `✗ ${strings.failed}`; + summaryParts.push(`${strings["key bindings"]}: ${status}
    `); + } + + if (restoreResults.plugins.attempted) { + summaryParts.push(`
    ${strings.plugins}
    `); + + if (restoreResults.plugins.success.length > 0) { + summaryParts.push( + `✓ ${strings.restored}: ${restoreResults.plugins.success.length}
    `, + ); + } + + if (restoreResults.plugins.failed.length > 0) { + summaryParts.push( + `✗ ${strings.failed}: ${restoreResults.plugins.failed.length}
    `, + ); + for (const f of restoreResults.plugins.failed.slice(0, 3)) { + summaryParts.push(`- ${f.id}: ${f.reason}
    `); + } + if (restoreResults.plugins.failed.length > 3) { + summaryParts.push( + `...${strings.more || "and"} ${restoreResults.plugins.failed.length - 3} ${strings.more || "more"}
    `, + ); + } + } + + if (restoreResults.plugins.skipped.length > 0) { + summaryParts.push( + `${strings.skipped}: ${restoreResults.plugins.skipped.length}
    `, + ); + for (const s of restoreResults.plugins.skipped.slice(0, 3)) { + summaryParts.push(`- ${s.id}: ${s.reason}
    `); + } + if (restoreResults.plugins.skipped.length > 3) { + summaryParts.push( + `...${strings.more} ${restoreResults.plugins.skipped.length - 3} ${strings.more}
    `, + ); + } + } + } + + summaryParts.push(`
    ${strings["reload to apply"]}`); + + const shouldReload = await confirm( + strings["restore completed"], + summaryParts.join(""), + true, + ); + + // Reload only if user confirms + if (shouldReload) { + location.reload(); + } + } catch (err) { + loaderDialog.destroy(); + console.error("Restore error:", err); + alert( + strings.error.toUpperCase(), + `${strings["error details"]}: ${err.message || err}`, + ); + } +}; + +export default backupRestore; diff --git a/src/settings/editorSettings.js b/src/settings/editorSettings.js new file mode 100644 index 000000000..966efe57e --- /dev/null +++ b/src/settings/editorSettings.js @@ -0,0 +1,196 @@ +import settingsPage from "components/settingsPage"; +import constants from "lib/constants"; +import fonts from "lib/fonts"; +import appSettings from "lib/settings"; +import scrollSettings from "./scrollSettings"; + +export default function editorSettings() { + const title = strings["editor settings"]; + const values = appSettings.value; + const items = [ + { + key: "autosave", + text: strings.autosave, + value: values.autosave, + valueText: (value) => (value ? value : strings.no), + prompt: strings.delay + " (>=1000 || 0)", + promptType: "number", + promptOptions: { + test(value) { + value = Number.parseInt(value); + return value >= 1000 || value === 0; + }, + }, + }, + { + key: "fontSize", + text: strings["font size"], + value: values.fontSize, + prompt: strings["font size"], + promptOptions: { + required: true, + match: constants.FONT_SIZE, + }, + }, + { + key: "softTab", + text: strings["soft tab"], + checkbox: values.softTab, + }, + { + key: "tabSize", + text: strings["tab size"], + value: values.tabSize, + prompt: strings["tab size"], + promptType: "number", + promptOptions: { + test(value) { + value = Number.parseInt(value); + return value >= 1 && value <= 8; + }, + }, + }, + { + key: "linenumbers", + text: strings["show line numbers"], + checkbox: values.linenumbers, + }, + { + key: "lineHeight", + text: strings["line height"], + value: values.lineHeight, + prompt: strings["line height"], + promptType: "number", + promptOptions: { + test(value) { + value = Number.parseFloat(value); + return value >= 1 && value <= 2; + }, + }, + }, + { + key: "formatOnSave", + text: strings["format on save"], + checkbox: values.formatOnSave, + }, + { + key: "showSpaces", + text: strings["show spaces"], + checkbox: values.showSpaces, + }, + { + key: "editorFont", + text: strings["editor font"], + value: values.editorFont, + get select() { + return fonts.getNames(); + }, + }, + { + key: "liveAutoCompletion", + text: strings["live autocompletion"], + checkbox: values.liveAutoCompletion, + }, + { + key: "showPrintMargin", + text: strings["show print margin"], + checkbox: values.showPrintMargin, + }, + { + key: "textWrap", + text: strings["text wrap"], + checkbox: values.textWrap, + }, + { + key: "printMargin", + text: strings["print margin"], + value: values.printMargin, + prompt: strings["print margin"], + promptType: "number", + promptOptions: { + test(value) { + value = Number.parseInt(value); + return value >= 10 && value <= 200; + }, + }, + }, + { + key: "teardropSize", + text: strings["cursor controller size"], + value: values.teardropSize, + valueText(value) { + return this.select.find(([v]) => v === value)[1]; + }, + select: [ + [0, strings.none], + [20, strings.small], + [30, strings.medium], + [60, strings.large], + ], + }, + { + key: "relativeLineNumbers", + text: strings["relative line numbers"], + checkbox: values.relativeLineNumbers, + }, + { + key: "elasticTabstops", + text: strings["elastic tabstops"], + checkbox: values.elasticTabstops, + }, + { + key: "rtlText", + text: strings["line based rtl switching"], + checkbox: values.rtlText, + }, + { + key: "hardWrap", + text: strings["hard wrap"], + checkbox: values.hardWrap, + }, + { + key: "useTextareaForIME", + text: strings["use textarea for ime"], + checkbox: values.useTextareaForIME, + }, + { + key: "fadeFoldWidgets", + text: strings["fade fold widgets"], + checkbox: values.fadeFoldWidgets, + }, + { + index: 0, + key: "scroll-settings", + text: strings["scroll settings"], + }, + { + key: "colorPreview", + text: strings["color preview"], + checkbox: values.colorPreview, + }, + ]; + + return settingsPage(title, items, callback); + + /** + * Callback for settings page when an item is clicked + * @param {string} key + * @param {string} value + */ + function callback(key, value) { + switch (key) { + case "scroll-settings": + appSettings.uiSettings[key].show(); + break; + + case "editorFont": + fonts.setFont(value); + + default: + appSettings.update({ + [key]: value, + }); + break; + } + } +} diff --git a/src/settings/filesSettings.js b/src/settings/filesSettings.js new file mode 100644 index 000000000..c45a82b05 --- /dev/null +++ b/src/settings/filesSettings.js @@ -0,0 +1,28 @@ +import settingsPage from "components/settingsPage"; +import appSettings from "lib/settings"; + +export default function filesSettings() { + const title = strings.settings; + const values = appSettings.value.fileBrowser; + + const items = [ + { + key: "sortByName", + text: strings["sort by name"], + checkbox: values.sortByName, + }, + { + key: "showHiddenFiles", + text: strings["show hidden files"], + checkbox: values.showHiddenFiles, + info: strings["info-showHiddenFiles"], + }, + ]; + + return settingsPage(title, items, callback); + + function callback(key, value) { + appSettings.value.fileBrowser[key] = value; + appSettings.update(); + } +} diff --git a/src/settings/formatterSettings.js b/src/settings/formatterSettings.js new file mode 100644 index 000000000..25dae3911 --- /dev/null +++ b/src/settings/formatterSettings.js @@ -0,0 +1,44 @@ +import settingsPage from "components/settingsPage"; +import appSettings from "lib/settings"; + +export default function formatterSettings(languageName) { + const title = strings.formatter; + const values = appSettings.value; + const { formatters } = acode; + const { modes } = ace.require("ace/ext/modelist"); + + const items = modes.map((mode) => { + const { name, caption } = mode; + const formatterID = values.formatter[name] || null; + const extensions = mode.extensions.split("|"); + const options = acode.getFormatterFor(extensions); + + return { + key: name, + text: caption, + icon: `file file_type_default file_type_${name}`, + value: formatterID, + valueText: (value) => { + const formatter = formatters.find(({ id }) => id === value); + if (formatter) { + return formatter.name; + } + return strings.none; + }, + select: options, + }; + }); + + const page = settingsPage(title, items, callback, "separate"); + page.show(languageName); + + function callback(key, value) { + if (value === null) { + // Delete the key when "none" is selected + delete values.formatter[key]; + } else { + values.formatter[key] = value; + } + appSettings.update(); + } +} diff --git a/src/settings/helpSettings.js b/src/settings/helpSettings.js new file mode 100644 index 000000000..5263ae65a --- /dev/null +++ b/src/settings/helpSettings.js @@ -0,0 +1,31 @@ +import settingsPage from "components/settingsPage"; +import constants from "lib/constants"; + +export default function help() { + const title = strings.help; + const items = [ + { + key: "docs", + text: strings.documentation, + link: constants.DOCS_URL, + }, + { + key: "help", + text: strings.help, + link: constants.TELEGRAM_URL, + }, + { + key: "faqs", + text: strings.faqs, + link: `${constants.WEBSITE_URL}/faqs`, + }, + { + key: "bug_report", + text: strings.bug_report, + link: `${constants.GITHUB_URL}/issues`, + }, + ]; + + const page = settingsPage(title, items, () => {}, "separate"); + page.show(); +} diff --git a/src/settings/mainSettings.js b/src/settings/mainSettings.js new file mode 100644 index 000000000..3df4c3dfc --- /dev/null +++ b/src/settings/mainSettings.js @@ -0,0 +1,202 @@ +import settingsPage from "components/settingsPage"; +import confirm from "dialogs/confirm"; +import rateBox from "dialogs/rateBox"; +import actionStack from "lib/actionStack"; +import openFile from "lib/openFile"; +import removeAds from "lib/removeAds"; +import appSettings from "lib/settings"; +import settings from "lib/settings"; +import Changelog from "pages/changelog/changelog"; +import plugins from "pages/plugins"; +import Sponsors from "pages/sponsors"; +import themeSetting from "pages/themeSetting"; +import helpers from "utils/helpers"; +import About from "../pages/about"; +import otherSettings from "./appSettings"; +import backupRestore from "./backupRestore"; +import editorSettings from "./editorSettings"; +import filesSettings from "./filesSettings"; +import formatterSettings from "./formatterSettings"; +import previewSettings from "./previewSettings"; +import scrollSettings from "./scrollSettings"; +import searchSettings from "./searchSettings"; +import terminalSettings from "./terminalSettings"; + +export default function mainSettings() { + const title = strings.settings.capitalize(); + const items = [ + { + key: "about", + text: strings.about, + icon: "acode", + index: 0, + }, + { + key: "sponsors", + text: strings.sponsor, + icon: "favorite", + iconColor: "orangered", + index: 1, + }, + { + key: "editor-settings", + text: strings["editor settings"], + icon: "text_format", + index: 3, + }, + { + key: "app-settings", + text: strings["app settings"], + icon: "tune", + index: 2, + }, + { + key: "formatter", + text: strings.formatter, + icon: "stars", + }, + { + key: "theme", + text: strings.theme, + icon: "color_lenspalette", + }, + { + key: "backup-restore", + text: strings.backup.capitalize() + "/" + strings.restore.capitalize(), + icon: "cached", + }, + { + key: "rateapp", + text: strings["rate acode"], + icon: "googleplay", + }, + { + key: "plugins", + text: strings["plugins"], + icon: "extension", + }, + { + key: "reset", + text: strings["restore default settings"], + icon: "historyrestore", + index: 6, + }, + { + key: "preview-settings", + text: strings["preview settings"], + icon: "play_arrow", + index: 4, + }, + { + key: "terminal-settings", + text: `${strings["terminal settings"]}`, + icon: "licons terminal", + index: 5, + }, + { + key: "editSettings", + text: `${strings["edit"]} settings.json`, + icon: "edit", + }, + { + key: "changeLog", + text: `${strings["changelog"]}`, + icon: "update", + }, + ]; + + if (IS_FREE_VERSION) { + items.push({ + key: "removeads", + text: strings["remove ads"], + icon: "cancel", + }); + } + + /** + * Callback for settings page for handling click event + * @this {HTMLElement} + * @param {string} key + */ + async function callback(key) { + switch (key) { + case "app-settings": + case "backup-restore": + case "editor-settings": + case "preview-settings": + case "terminal-settings": + appSettings.uiSettings[key].show(); + break; + + case "theme": + themeSetting(); + break; + + case "about": + About(); + break; + + case "sponsors": + Sponsors(); + break; + + case "rateapp": + rateBox(); + break; + + case "plugins": + plugins(); + break; + + case "formatter": + formatterSettings(); + break; + + case "editSettings": { + actionStack.pop(); + openFile(settings.settingsFile); + break; + } + + case "reset": + const confirmation = await confirm( + strings.warning, + strings["restore default settings"], + ); + if (confirmation) { + await appSettings.reset(); + location.reload(); + } + break; + + case "removeads": + try { + await removeAds(); + this.remove(); + } catch (error) { + helpers.error(error); + } + break; + + case "changeLog": + Changelog(); + break; + + default: + break; + } + } + + const page = settingsPage(title, items, callback); + page.show(); + + appSettings.uiSettings["main-settings"] = page; + appSettings.uiSettings["app-settings"] = otherSettings(); + appSettings.uiSettings["file-settings"] = filesSettings(); + appSettings.uiSettings["backup-restore"] = backupRestore(); + appSettings.uiSettings["editor-settings"] = editorSettings(); + appSettings.uiSettings["scroll-settings"] = scrollSettings(); + appSettings.uiSettings["search-settings"] = searchSettings(); + appSettings.uiSettings["preview-settings"] = previewSettings(); + appSettings.uiSettings["terminal-settings"] = terminalSettings(); +} diff --git a/src/settings/previewSettings.js b/src/settings/previewSettings.js new file mode 100644 index 000000000..d9529f92e --- /dev/null +++ b/src/settings/previewSettings.js @@ -0,0 +1,88 @@ +import Checkbox from "components/checkbox"; +import settingsPage from "components/settingsPage"; +import appSettings from "lib/settings"; + +export default function previewSettings() { + const values = appSettings.value; + const title = strings["preview settings"]; + const PORT_REGEX = + /^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/; + const items = [ + { + key: "previewPort", + text: strings["preview port"], + value: values.previewPort, + prompt: strings["preview port"], + promptType: "number", + promptOptions: { + test(value) { + return PORT_REGEX.test(value); + }, + }, + }, + { + key: "serverPort", + text: strings["server port"], + value: values.serverPort, + prompt: strings["server port"], + promptType: "number", + promptOptions: { + test(value) { + return PORT_REGEX.test(value); + }, + }, + }, + { + key: "previewMode", + text: strings["preview mode"], + value: values.previewMode, + select: [ + [appSettings.PREVIEW_MODE_BROWSER, strings.browser], + [appSettings.PREVIEW_MODE_INAPP, strings.inapp], + ], + }, + { + key: "host", + text: strings.host, + value: values.host, + prompt: strings.host, + promptType: "text", + promptOptions: { + test(value) { + try { + new URL(`http://${value}:${values.previewPort}`); + return true; + } catch (error) { + return false; + } + }, + }, + }, + { + key: "disableCache", + text: strings["disable in-app-browser caching"], + checkbox: values.disableCache, + }, + { + key: "useCurrentFileForPreview", + text: strings["should_use_current_file_for_preview"], + checkbox: !!values.useCurrentFileForPreview, + }, + { + key: "showConsoleToggler", + text: strings["show console toggler"], + checkbox: values.showConsoleToggler, + }, + { + note: strings["preview settings note"], + }, + ]; + + return settingsPage(title, items, callback); + + function callback(key, value) { + appSettings.update({ + [key]: value, + }); + } +} diff --git a/src/settings/scrollSettings.js b/src/settings/scrollSettings.js new file mode 100644 index 000000000..ca3ab78b9 --- /dev/null +++ b/src/settings/scrollSettings.js @@ -0,0 +1,63 @@ +import settingsPage from "components/settingsPage"; +import constants from "lib/constants"; +import appSettings from "lib/settings"; + +export default function scrollSettings() { + const values = appSettings.value; + const title = strings["scroll settings"]; + + const items = [ + { + key: "scrollSpeed", + text: strings["scroll speed"], + value: values.scrollSpeed, + valueText: getScrollSpeedString, + select: [ + [constants.SCROLL_SPEED_FAST_X2, `${strings.fast} x2`], + [constants.SCROLL_SPEED_FAST, strings.fast], + [constants.SCROLL_SPEED_NORMAL, strings.normal], + [constants.SCROLL_SPEED_SLOW, strings.slow], + ], + }, + { + key: "reverseScrolling", + text: strings["reverse scrolling"], + checkbox: values.reverseScrolling, + }, + { + key: "diagonalScrolling", + text: strings["diagonal scrolling"], + checkbox: values.diagonalScrolling, + }, + { + key: "scrollbarSize", + text: strings["scrollbar size"], + value: values.scrollbarSize, + valueText: (size) => `${size}px`, + select: [5, 10, 15, 20], + }, + ]; + + return settingsPage(title, items, callback); + + function callback(key, value) { + appSettings.update({ + [key]: value, + }); + } +} + +function getScrollSpeedString(speed) { + switch (speed) { + case constants.SCROLL_SPEED_FAST: + return strings.fast; + case constants.SCROLL_SPEED_SLOW: + return strings.slow; + case constants.SCROLL_SPEED_FAST_X2: + return `${strings.fast} x2`; + case constants.SCROLL_SPEED_NORMAL: + return strings.normal; + default: + return strings.normal; + } +} diff --git a/src/settings/searchSettings.js b/src/settings/searchSettings.js new file mode 100644 index 000000000..485b9b907 --- /dev/null +++ b/src/settings/searchSettings.js @@ -0,0 +1,31 @@ +import settingsPage from "../components/settingsPage"; +import appSettings from "../lib/settings"; + +export default function searchSettings() { + const title = strings.search; + const values = appSettings.value.search; + const items = [ + { + key: "caseSensitive", + text: strings["case sensitive"], + checkbox: values.caseSensitive, + }, + { + key: "regExp", + text: strings["regular expression"], + checkbox: values.regExp, + }, + { + key: "wholeWord", + text: strings["whole word"], + checkbox: values.wholeWord, + }, + ]; + + return settingsPage(title, items, callback); + + function callback(key, value) { + values[key] = value; + appSettings.update(); + } +} diff --git a/src/settings/terminalSettings.js b/src/settings/terminalSettings.js new file mode 100644 index 000000000..8821658c9 --- /dev/null +++ b/src/settings/terminalSettings.js @@ -0,0 +1,405 @@ +import fsOperation from "fileSystem"; +import settingsPage from "components/settingsPage"; +import { + DEFAULT_TERMINAL_SETTINGS, + TerminalThemeManager, +} from "components/terminal"; +import toast from "components/toast"; +import alert from "dialogs/alert"; +import confirm from "dialogs/confirm"; +import loader from "dialogs/loader"; +import fonts from "lib/fonts"; +import appSettings from "lib/settings"; +import FileBrowser from "pages/fileBrowser"; +import helpers from "utils/helpers"; + +export default function terminalSettings() { + const title = strings["terminal settings"]; + const values = appSettings.value; + + // Initialize terminal settings with defaults if not present + if (!values.terminalSettings) { + values.terminalSettings = { + ...DEFAULT_TERMINAL_SETTINGS, + fontFamily: + DEFAULT_TERMINAL_SETTINGS.fontFamily || appSettings.value.fontFamily, + }; + } + + const terminalValues = values.terminalSettings; + + const items = [ + { + key: "all_file_access", + text: strings["allFileAccess"], + info: strings["info-all_file_access"], + }, + { + key: "fontSize", + text: strings["font size"], + value: terminalValues.fontSize, + prompt: strings["font size"], + promptType: "number", + promptOptions: { + test(value) { + value = Number.parseInt(value); + return value >= 8 && value <= 32; + }, + }, + info: strings["info-fontSize"], + }, + { + key: "fontFamily", + text: strings["terminal:font family"], + value: terminalValues.fontFamily, + get select() { + return fonts.getNames(); + }, + info: strings["info-fontFamily"], + }, + { + key: "theme", + text: strings["theme"], + value: terminalValues.theme, + info: strings["info-theme"], + get select() { + return TerminalThemeManager.getThemeNames().map((name) => [ + name, + name.charAt(0).toUpperCase() + name.slice(1), + ]); + }, + valueText(value) { + const option = this.select.find(([v]) => v === value); + return option ? option[1] : value; + }, + }, + { + key: "cursorStyle", + text: strings["terminal:cursor style"], + value: terminalValues.cursorStyle, + select: ["block", "underline", "bar"], + info: strings["info-cursorStyle"], + }, + { + key: "cursorInactiveStyle", + text: strings["terminal:cursor inactive style"], + value: terminalValues.cursorInactiveStyle, + select: ["outline", "block", "bar", "underline", "none"], + info: strings["info-cursorInactiveStyle"], + }, + { + key: "fontWeight", + text: strings["terminal:font weight"], + value: terminalValues.fontWeight, + select: [ + "normal", + "bold", + "100", + "200", + "300", + "400", + "500", + "600", + "700", + "800", + "900", + ], + info: strings["info-fontWeight"], + }, + { + key: "cursorBlink", + text: strings["terminal:cursor blink"], + checkbox: terminalValues.cursorBlink, + info: strings["info-cursorBlink"], + }, + { + key: "scrollback", + text: strings["terminal:scrollback"], + value: terminalValues.scrollback, + prompt: strings["terminal:scrollback"], + promptType: "number", + promptOptions: { + test(value) { + value = Number.parseInt(value); + return value >= 100 && value <= 10000; + }, + }, + info: strings["info-scrollback"], + }, + { + key: "tabStopWidth", + text: strings["terminal:tab stop width"], + value: terminalValues.tabStopWidth, + prompt: strings["terminal:tab stop width"], + promptType: "number", + promptOptions: { + test(value) { + value = Number.parseInt(value); + return value >= 1 && value <= 8; + }, + }, + info: strings["info-tabStopWidth"], + }, + { + key: "letterSpacing", + text: strings["letter spacing"], + value: terminalValues.letterSpacing, + prompt: strings["letter spacing"], + promptType: "number", + info: strings["info-letterSpacing"], + }, + { + key: "convertEol", + text: strings["terminal:convert eol"], + checkbox: terminalValues.convertEol, + }, + { + key: "imageSupport", + text: strings["terminal:image support"], + checkbox: terminalValues.imageSupport, + info: strings["info-imageSupport"], + }, + { + key: "fontLigatures", + text: strings["font ligatures"], + checkbox: terminalValues.fontLigatures, + info: strings["info-fontLigatures"], + }, + { + key: "confirmTabClose", + text: strings["terminal:confirm tab close"], + checkbox: terminalValues.confirmTabClose !== false, + info: strings["info-confirmTabClose"], + }, + { + key: "backup", + text: strings.backup, + info: strings["info-backup"], + }, + { + key: "restore", + text: strings.restore, + info: strings["info-restore"], + }, + { + key: "uninstall", + text: strings.uninstall, + info: strings["info-uninstall"], + }, + ]; + + return settingsPage(title, items, callback, undefined, { + preserveOrder: true, + }); + + /** + * Callback for settings page when an item is clicked + * @param {string} key + * @param {string} value + */ + async function callback(key, value) { + switch (key) { + case "all_file_access": + if (ANDROID_SDK_INT >= 30) { + system.isManageExternalStorageDeclared((boolStr) => { + if (boolStr === "true") { + system.requestStorageManager(console.log, console.error); + } else { + alert("This feature is not available."); + } + }, alert); + } else { + alert("This feature is not available."); + } + + return; + case "backup": + terminalBackup(); + return; + + case "restore": + terminalRestore(); + return; + + case "uninstall": + const confirmation = await confirm( + strings.confirm, + "Are you sure you want to uninstall the terminal?", + ); + if (confirmation) { + loader.showTitleLoader(); + Terminal.uninstall() + .then(() => { + loader.removeTitleLoader(); + alert( + strings.success.toUpperCase(), + "Terminal uninstalled successfully.", + ); + }) + .catch((error) => { + loader.removeTitleLoader(); + console.error("Terminal uninstall failed:", error); + helpers.error(error); + }); + } + return; + + default: + appSettings.update({ + terminalSettings: { + ...values.terminalSettings, + [key]: value, + }, + }); + + // Update any active terminal instances + updateActiveTerminals(key, value); + break; + } + } + + /** + * Creates a backup of the terminal installation + */ + async function terminalBackup() { + try { + // Ask user to select backup location + const { url } = await FileBrowser("folder", strings["select folder"]); + + loader.showTitleLoader(); + + // Create backup + const backupPath = await Terminal.backup(); + await system.copyToUri( + backupPath, + url, + "aterm_backup.tar", + console.log, + console.error, + ); + loader.removeTitleLoader(); + alert(strings.success.toUpperCase(), `${strings["backup successful"]}.`); + } catch (error) { + loader.removeTitleLoader(); + console.error("Terminal backup failed:", error); + toast(error.toString()); + } + } + + /** + * Restores terminal installation + */ + async function terminalRestore() { + try { + sdcard.openDocumentFile( + async (data) => { + loader.showTitleLoader(); + //this will create a file at $PREFIX/atem_backup.bin + await system.copyToUri( + data.uri, + cordova.file.dataDirectory, + "aterm_backup", + console.log, + console.error, + ); + + // Restore + await Terminal.restore(); + + // Clean up + const backupFilename = "aterm_backup.bin"; + const tempBackupPath = cordova.file.dataDirectory + backupFilename; + const tempFS = fsOperation(tempBackupPath); + await tempFS.delete(); + loader.removeTitleLoader(); + alert( + strings.success.toUpperCase(), + "Terminal restored successfully", + ); + }, + toast, + "application/x-tar", + ); + } catch (error) { + loader.removeTitleLoader(); + console.error("Terminal restore failed:", error); + toast(error.toString()); + } + } +} + +/** + * Update active terminal instances with new settings + * @param {string} key + * @param {any} value + */ +async function updateActiveTerminals(key, value) { + // Find all terminal tabs and update their settings + const terminalTabs = editorManager.files.filter( + (file) => file.type === "terminal", + ); + + terminalTabs.forEach(async (tab) => { + if (tab.terminalComponent) { + const terminalOptions = {}; + + switch (key) { + case "fontSize": + tab.terminalComponent.terminal.options.fontSize = value; + break; + case "fontFamily": + // Load font if it's not already loaded + try { + await fonts.loadFont(value); + } catch (error) { + console.warn(`Failed to load font ${value}:`, error); + } + tab.terminalComponent.terminal.options.fontFamily = value; + tab.terminalComponent.terminal.refresh( + 0, + tab.terminalComponent.terminal.rows - 1, + ); + break; + case "fontWeight": + tab.terminalComponent.terminal.options.fontWeight = value; + break; + case "cursorBlink": + tab.terminalComponent.terminal.options.cursorBlink = value; + break; + case "cursorStyle": + tab.terminalComponent.terminal.options.cursorStyle = value; + break; + case "cursorInactiveStyle": + tab.terminalComponent.terminal.options.cursorInactiveStyle = value; + break; + case "scrollback": + tab.terminalComponent.terminal.options.scrollback = value; + break; + case "tabStopWidth": + tab.terminalComponent.terminal.options.tabStopWidth = value; + break; + case "convertEol": + tab.terminalComponent.terminal.options.convertEol = value; + break; + case "letterSpacing": + tab.terminalComponent.terminal.options.letterSpacing = value; + break; + case "theme": + tab.terminalComponent.terminal.options.theme = + TerminalThemeManager.getTheme(value); + // Update container background to match new theme + if (tab.terminalComponent.container) { + tab.terminalComponent.container.style.background = + tab.terminalComponent.terminal.options.theme.background; + } + break; + case "imageSupport": + tab.terminalComponent.updateImageSupport(value); + break; + case "fontLigatures": + tab.terminalComponent.updateFontLigatures(value); + break; + } + } + }); +} diff --git a/src/sidebarApps/extensions/index.js b/src/sidebarApps/extensions/index.js new file mode 100644 index 000000000..3daaf7b06 --- /dev/null +++ b/src/sidebarApps/extensions/index.js @@ -0,0 +1,989 @@ +import "./style.scss"; + +import fsOperation from "fileSystem"; +import ajax from "@deadlyjack/ajax"; +import collapsableList from "components/collapsableList"; +import Sidebar from "components/sidebar"; +import alert from "dialogs/alert"; +import prompt from "dialogs/prompt"; +import select from "dialogs/select"; +import purchaseListener from "handlers/purchase"; +import constants from "lib/constants"; +import InstallState from "lib/installState"; +import loadPlugin from "lib/loadPlugin"; +import settings from "lib/settings"; +import FileBrowser from "pages/fileBrowser"; +import plugin from "pages/plugin"; +import helpers from "utils/helpers"; +import Url from "utils/Url"; + +/** @type {HTMLElement} */ +let $installed = null; +/** @type {HTMLElement} */ +let $explore = null; +/** @type {HTMLElement} */ +let container = null; +/** @type {HTMLElement} */ +let $searchResult = null; + +const LIMIT = 50; +let currentPage = 1; +let hasMore = true; +let isLoading = false; +let currentFilter = null; +let filterHasMore = true; +let isFilterLoading = false; + +const $header = ( +

    +
    + {strings.plugins} +
    + + +
    +
    + +
    +); + +const $style = ; +/** @type {Set} */ +const $scrollableLists = new Set(); + +let searchTimeout = null; +let installedPlugins = []; + +export default [ + "extension", // icon + "extensions", // id + strings.plugins, // title + initApp, // init function + false, // prepend + onSelected, // onSelected function +]; + +/** + * On selected handler for files app + * @param {HTMLElement} el + */ +function onSelected(el) { + const $scrollableLists = container.getAll(":scope .scroll[data-scroll-top]"); + for (const $el of $scrollableLists) { + $el.scrollTop = $el.dataset.scrollTop; + } +} + +/** + * Initialize extension app + * @param {HTMLElement} el + */ +function initApp(el) { + container = el; + container.classList.add("extensions"); + container.content = $header; + + if (!$searchResult) { + $searchResult =
      ; + container.append($searchResult); + } + + if (!$explore) { + $explore = collapsableList(strings.explore); + $explore.ontoggle = loadExplore; + $explore.$ul.onscroll = handleScroll; + container.append($explore); + } + + if (!$installed) { + $installed = collapsableList(strings.installed); + $installed.ontoggle = loadInstalled; + container.append($installed); + } + + Sidebar.on("show", onSelected); + document.head.append($style); +} + +async function handleScroll(e) { + if (isLoading || !hasMore) return; + + const { scrollTop, scrollHeight, clientHeight } = e.target; + + if (scrollTop + clientHeight >= scrollHeight - 50) { + await loadMorePlugins(); + } +} + +async function handleFilterScroll(e) { + if (isFilterLoading || !filterHasMore || !currentFilter) return; + + const { scrollTop, scrollHeight, clientHeight } = e.target; + + if (scrollTop + clientHeight >= scrollHeight - 50) { + await loadFilteredPlugins(currentFilter, false); + } +} + +async function loadMorePlugins() { + try { + isLoading = true; + startLoading($explore); + + const response = await fetch( + `${constants.API_BASE}/plugins?page=${currentPage}&limit=${LIMIT}`, + ); + const newPlugins = await response.json(); + + if (newPlugins.length < LIMIT) { + hasMore = false; + } + + installedPlugins = await listInstalledPlugins(); + const pluginElements = newPlugins.map(ListItem); + $explore.$ul.append(...pluginElements); + + currentPage++; + updateHeight($explore); + } catch (error) { + window.log("error", error); + } finally { + isLoading = false; + stopLoading($explore); + } +} + +async function loadFilteredPlugins(filterState, isInitial = false) { + if (isFilterLoading || !filterHasMore || !filterState) return; + + try { + isFilterLoading = true; + + const { items, hasMore } = await getFilteredPlugins(filterState); + + if (currentFilter !== filterState) { + return; + } + + installedPlugins = await listInstalledPlugins(); + const pluginElements = items.map(ListItem); + if (pluginElements.length) { + $searchResult.append(...pluginElements); + } else if (isInitial) { + $searchResult.append( + + {strings["no plugins found"] || strings.empty || "No plugins found"} + , + ); + } + + filterHasMore = hasMore; + if (!filterHasMore) { + $searchResult.onscroll = null; + } + + updateHeight($searchResult); + } catch (error) { + window.log("error", "Error loading filtered plugins:"); + window.log("error", error); + } finally { + isFilterLoading = false; + } +} + +async function searchPlugin() { + clearTimeout(searchTimeout); + searchTimeout = setTimeout(async () => { + // Clear filter when searching + currentFilter = null; + filterHasMore = true; + isFilterLoading = false; + $searchResult.onscroll = null; + + $searchResult.content = ""; + const status = helpers.checkAPIStatus(); + if (!status) { + $searchResult.content = ( + {strings.api_error} + ); + return; + } + + const query = this.value; + if (!query) return; + + try { + $searchResult.classList.add("loading"); + const plugins = await fsOperation( + Url.join(constants.API_BASE, `plugins?name=${query}`), + ).readFile("json"); + + installedPlugins = await listInstalledPlugins(); + $searchResult.content = plugins.map(ListItem); + updateHeight($searchResult); + } catch (error) { + window.log("error", error); + $searchResult.content = {strings.error}; + } finally { + $searchResult.classList.remove("loading"); + } + }, 500); +} + +async function filterPlugins() { + const verifiedLabel = strings["verified publisher"]; + const authorLabel = strings.author || strings.name; + const keywordsLabel = strings.keywords; + + const filterItems = [ + { value: "orderBy:top_rated", text: strings.top_rated }, + { value: "orderBy:newest", text: strings.newly_added }, + { value: "orderBy:downloads", text: strings.most_downloaded }, + { value: "attribute:verified", text: verifiedLabel }, + { value: "attribute:author", text: authorLabel }, + { value: "attribute:keywords", text: keywordsLabel }, + ]; + + const filterConfig = { + "orderBy:top_rated": { + type: "orderBy", + value: "top_rated", + baseLabel: strings.top_rated, + }, + "orderBy:newest": { + type: "orderBy", + value: "newest", + baseLabel: strings.newly_added, + }, + "orderBy:downloads": { + type: "orderBy", + value: "downloads", + baseLabel: strings.most_downloaded, + }, + "attribute:verified": { + type: "verified", + baseLabel: verifiedLabel, + value: true, + }, + "attribute:author": { type: "author", baseLabel: authorLabel }, + "attribute:keywords": { type: "keywords", baseLabel: keywordsLabel }, + }; + + const selection = await select("Filter", filterItems); + if (!selection) return; + + const option = filterConfig[selection]; + if (!option) return; + + const filterState = { + ...option, + nextPage: 1, + buffer: [], + hasMoreSource: true, + displayLabel: option.baseLabel, + }; + + if (option.type === "author") { + const authorName = (await prompt("Enter author name", "", "text"))?.trim(); + if (!authorName) return; + filterState.value = authorName.toLowerCase(); + filterState.originalValue = authorName; + filterState.displayLabel = `${option.baseLabel}: ${authorName}`; + } else if (option.type === "keywords") { + const rawKeywords = (await prompt("Enter keywords", "", "text"))?.trim(); + if (!rawKeywords) return; + const keywordList = rawKeywords + .split(",") + .map((item) => item.trim()) + .filter(Boolean); + if (!keywordList.length) return; + filterState.value = keywordList.map((item) => item.toLowerCase()); + filterState.originalValue = keywordList.join(", "); + filterState.displayLabel = `${option.baseLabel}: ${filterState.originalValue}`; + } + + currentFilter = filterState; + filterHasMore = true; + isFilterLoading = false; + $searchResult.content = ""; + + try { + $searchResult.classList.add("loading"); + const filterMessage = ( +
      + + {strings["filtered by"]} {filterState.displayLabel} + + clearFilter()} + /> +
      + ); + $searchResult.content = [filterMessage]; + $searchResult.onscroll = handleFilterScroll; + await loadFilteredPlugins(currentFilter, true); + updateHeight($searchResult); + + function clearFilter() { + currentFilter = null; + filterHasMore = true; + isFilterLoading = false; + $searchResult.content = ""; + $searchResult.onscroll = null; + updateHeight($searchResult); + } + } catch (error) { + window.log("error", "Error filtering plugins:"); + window.log("error", error); + $searchResult.content = {strings.error}; + } finally { + $searchResult.classList.remove("loading"); + } +} + +async function addSource() { + const sourceOption = [ + ["remote", strings.remote], + ["local", strings.local], + ]; + const sourceType = await select("Select Source", sourceOption); + + if (!sourceType) return; + let source; + if (sourceType === "remote") { + source = await prompt("Enter plugin source", "https://", "url"); + } else { + source = (await FileBrowser("file", "Select plugin source")).url; + } + + if (!source) return; + + try { + const { default: installPlugin } = await import("lib/installPlugin"); + await installPlugin(source); + if (!$explore.collapsed) { + $explore.ontoggle(); + } + if (!$installed.collapsed) { + $installed.ontoggle(); + } + } catch (error) { + console.error(error); + window.toast(helpers.errorMessage(error)); + addSource(sourceType, source); + } +} + +async function loadInstalled() { + if (this.collapsed) return; + + const plugins = await listInstalledPlugins(); + if (!plugins.length) { + $installed.collapse(); + } + $installed.$ul.content = plugins.map(ListItem); + updateHeight($installed); +} + +async function loadExplore() { + if (this.collapsed) return; + + const status = helpers.checkAPIStatus(); + if (!status) { + $explore.$ul.content = {strings.api_error}; + return; + } + + try { + startLoading($explore); + currentPage = 1; + hasMore = true; + + const response = await fetch( + `${constants.API_BASE}/plugins?page=${currentPage}&limit=${LIMIT}`, + ); + const plugins = await response.json(); + + if (plugins.length < LIMIT) { + hasMore = false; + } + + installedPlugins = await listInstalledPlugins(); + $explore.$ul.content = plugins.map(ListItem); + currentPage++; + updateHeight($explore); + } catch (error) { + $explore.$ul.content = {strings.error}; + } finally { + stopLoading($explore); + } +} + +async function listInstalledPlugins() { + const plugins = await Promise.all( + (await fsOperation(PLUGIN_DIR).lsDir()).map(async (item) => { + const id = Url.basename(item.url); + const url = Url.join(item.url, "plugin.json"); + const plugin = await fsOperation(url).readFile("json"); + const iconUrl = getLocalRes(id, plugin.icon); + plugin.icon = await helpers.toInternalUri(iconUrl); + plugin.installed = true; + return plugin; + }), + ); + return plugins; +} + +async function getFilteredPlugins(filterState) { + if (!filterState) return { items: [], hasMore: false }; + + if (filterState.type === "orderBy") { + const page = filterState.nextPage || 1; + try { + let response; + if (filterState.value === "top_rated") { + response = await fetch( + `${constants.API_BASE}/plugins?explore=random&page=${page}&limit=${LIMIT}`, + ); + } else { + response = await fetch( + `${constants.API_BASE}/plugin?orderBy=${filterState.value}&page=${page}&limit=${LIMIT}`, + ); + } + const items = await response.json(); + if (!Array.isArray(items)) { + return { items: [], hasMore: false }; + } + filterState.nextPage = page + 1; + const hasMore = items.length === LIMIT; + return { items, hasMore }; + } catch (error) { + console.error(`Failed to get Filtered Plugins: `, error); + return { items: [], hasMore: false }; + } + } + + if (!Array.isArray(filterState.buffer)) { + filterState.buffer = []; + } + if (filterState.hasMoreSource === undefined) { + filterState.hasMoreSource = true; + } + if (!filterState.nextPage) { + filterState.nextPage = 1; + } + + const items = []; + + while (items.length < LIMIT) { + if (filterState.buffer.length) { + items.push(filterState.buffer.shift()); + continue; + } + + if (filterState.hasMoreSource === false) break; + + try { + const page = filterState.nextPage; + const response = await fetch( + `${constants.API_BASE}/plugins?page=${page}&limit=${LIMIT}`, + ); + const data = await response.json(); + filterState.nextPage = page + 1; + + if (!Array.isArray(data) || !data.length) { + filterState.hasMoreSource = false; + break; + } + + if (data.length < LIMIT) { + filterState.hasMoreSource = false; + } + + const matched = data.filter((plugin) => + doesPluginMatchFilter(plugin, filterState), + ); + filterState.buffer.push(...matched); + } catch (error) { + window.log("error", "Failed to fetch filtered plugins:"); + window.log("error", error); + filterState.hasMoreSource = false; + break; + } + } + + while (items.length < LIMIT && filterState.buffer.length) { + items.push(filterState.buffer.shift()); + } + + const hasMore = + (filterState.hasMoreSource !== false && filterState.nextPage) || + filterState.buffer.length > 0; + + return { items, hasMore: Boolean(hasMore) }; +} + +function doesPluginMatchFilter(plugin, filterState) { + if (!plugin) return false; + + switch (filterState.type) { + case "verified": + return Boolean(plugin.author_verified); + case "author": { + const authorName = getPluginAuthorName(plugin); + if (!authorName) return false; + return authorName.toLowerCase().includes(filterState.value); + } + case "keywords": { + const pluginKeywords = getPluginKeywords(plugin) + .map((keyword) => keyword.toLowerCase()) + .filter(Boolean); + if (!pluginKeywords.length) return false; + return filterState.value.some((keyword) => + pluginKeywords.some((pluginKeyword) => pluginKeyword.includes(keyword)), + ); + } + default: + return true; + } +} + +function getPluginAuthorName(plugin) { + const { author } = plugin || {}; + if (!author) return ""; + if (typeof author === "string") return author; + if (typeof author === "object") { + return author.name || author.username || author.github || ""; + } + return ""; +} + +function getPluginKeywords(plugin) { + const { keywords } = plugin || {}; + if (!keywords) return []; + if (Array.isArray(keywords)) return keywords; + if (typeof keywords === "string") { + try { + const parsed = JSON.parse(keywords); + if (Array.isArray(parsed)) return parsed; + } catch (error) { + return keywords + .split(",") + .map((item) => item.trim()) + .filter(Boolean); + } + } + return []; +} + +function startLoading($list) { + $list.$title.classList.add("loading"); +} + +function stopLoading($list) { + $list.$title.classList.remove("loading"); +} + +/** + * Update the height of the element + * @param {HTMLElement} $el + */ +function updateHeight($el) { + removeHeight($installed, $el !== $installed); + removeHeight($explore, $el !== $explore); + + try { + let height = $header?.getBoundingClientRect().height; + const tileHeight = $el.get(":scope>.tile")?.getBoundingClientRect().height; + if ($el === $searchResult) { + height += 60; + } else { + height += $searchResult?.getBoundingClientRect().height + tileHeight; + } + + setHeight($el, height); + } catch (error) { + console.error(error); + } +} + +/** + * Remove height styles from an element + * @param {HTMLElement} $el + * @param {Boolean} collapse + */ +function removeHeight($el, collapse = false) { + if (collapse) $el.collapse?.(); + + $scrollableLists.delete($el); + updateStyle(); +} + +/** + * Change the height of an element + * @param {HTMLElement} $el + * @param {Number} height + */ +function setHeight($el, height) { + $scrollableLists.add($el); + + const calcHeight = height ? `calc(100% - ${height}px)` : "100%"; + $el.dataset.height = calcHeight; + if ($el === $searchResult) { + $el.style.height = "fit-content"; + return; + } + + updateStyle(); +} + +function updateStyle() { + let style = ""; + + $scrollableLists.forEach(($el) => { + style += ` + .list.collapsible[data-id="${$el.dataset.id}"] { + max-height: ${$el.dataset.height} !important; + } + `; + }); + + $style.innerHTML = style; +} + +function getLocalRes(id, name) { + return Url.join(PLUGIN_DIR, id, name); +} + +function ListItem({ icon, name, id, version, downloads, installed, source }) { + if (installed === undefined) { + installed = !!installedPlugins.find(({ id: _id }) => _id === id); + } + const disabledMap = settings.value.pluginsDisabled || {}; + const enabled = disabledMap[id] !== true; + const $el = ( +
      + + + {name} + + {installed + ? <> + {source + ? + : null} + + + : } +
      + ); + + $el.onclick = async (event) => { + const morePluginActionButton = event.target.closest( + '[data-action="more-plugin-action"]', + ); + const installPluginBtn = event.target.closest( + '[data-action="install-plugin"]', + ); + const rebuildPluginBtn = event.target.closest( + '[data-action="rebuild-plugin"]', + ); + if (morePluginActionButton) { + more_plugin_action(id, name); + return; + } + if (installPluginBtn) { + try { + let purchaseToken; + let product; + const pluginUrl = Url.join(constants.API_BASE, `plugin/${id}`); + const remotePlugin = await fsOperation(pluginUrl) + .readFile("json") + .catch(() => { + throw new Error("Failed to fetch plugin details"); + }); + + const isPaid = remotePlugin.price > 0; + if (isPaid) { + [product] = await helpers.promisify(iap.getProducts, [ + remotePlugin.sku, + ]); + if (product) { + const purchase = await getPurchase(product.productId); + purchaseToken = purchase?.purchaseToken; + } + } + + if (isPaid && !purchaseToken) { + if (!product) throw new Error("Product not found"); + const apiStatus = await helpers.checkAPIStatus(); + + if (!apiStatus) { + alert(strings.error, strings.api_error); + return; + } + + iap.setPurchaseUpdatedListener( + ...purchaseListener(onpurchase, onerror), + ); + await helpers.promisify(iap.purchase, product.productId); + + async function onpurchase(e) { + const purchase = await getPurchase(product.productId); + await ajax.post(Url.join(constants.API_BASE, "plugin/order"), { + data: { + id: remotePlugin.id, + token: purchase?.purchaseToken, + package: BuildInfo.packageName, + }, + }); + purchaseToken = purchase?.purchaseToken; + } + + async function onerror(error) { + throw error; + } + } + + const { default: installPlugin } = await import("lib/installPlugin"); + await installPlugin( + id, + remotePlugin.name, + purchaseToken ? purchaseToken : undefined, + ); + + const searchInput = container.querySelector('input[name="search-ext"]'); + if (searchInput) { + searchInput.value = ""; + $searchResult.content = ""; + // Reset filter state when clearing search results + currentFilter = null; + filterHasMore = true; + isFilterLoading = false; + $searchResult.onscroll = null; + updateHeight($searchResult); + $installed.expand(); + } + + window.toast(strings.success, 3000); + if (!$explore.collapsed) { + $explore.ontoggle(); + } + if (!$installed.collapsed) { + $installed.ontoggle(); + } + + async function getPurchase(sku) { + const purchases = await helpers.promisify(iap.getPurchases); + const purchase = purchases.find((p) => p.productIds.includes(sku)); + return purchase; + } + } catch (err) { + console.error(err); + window.toast(helpers.errorMessage(err), 3000); + } + return; + } + if (rebuildPluginBtn) { + try { + const { default: installPlugin } = await import("lib/installPlugin"); + await installPlugin(source); + window.toast(strings.success, 3000); + } catch (err) { + console.error(err); + window.toast(helpers.errorMessage(err), 3000); + } + return; + } + + plugin( + { id, installed }, + () => { + if (!$explore.collapsed) { + $explore.ontoggle(); + } + if (!$installed.collapsed) { + $installed.ontoggle(); + } + }, + () => { + if (!$explore.collapsed) { + $explore.ontoggle(); + } + if (!$installed.collapsed) { + $installed.ontoggle(); + } + }, + ); + }; + + return $el; +} + +async function loadAd(el) { + if (!IS_FREE_VERSION) return; + try { + if (!(await window.iad?.isLoaded())) { + const oldText = el.textContent; + el.textContent = strings["loading..."]; + await window.iad.load(); + el.textContent = oldText; + } + } catch (error) { + console.error(error); + } +} + +async function uninstall(id) { + try { + const pluginDir = Url.join(PLUGIN_DIR, id); + const state = await InstallState.new(id); + await Promise.all([ + loadAd(this), + fsOperation(pluginDir).delete(), + state.delete(state.storeUrl), + ]); + acode.unmountPlugin(id); + + const searchInput = container.querySelector('input[name="search-ext"]'); + if (searchInput) { + searchInput.value = ""; + $searchResult.content = ""; + // Reset filter state when clearing search results + currentFilter = null; + filterHasMore = true; + isFilterLoading = false; + $searchResult.onscroll = null; + updateHeight($searchResult); + if ($installed.collapsed) { + $installed.expand(); + } + } + + // Show Ad If Its Free Version, interstitial Ad(iad) is loaded. + if (IS_FREE_VERSION && (await window.iad?.isLoaded())) { + window.iad.show(); + } + } catch (err) { + helpers.error(err); + } +} + +async function more_plugin_action(id, pluginName) { + const disabledMap = settings.value.pluginsDisabled || {}; + const enabled = disabledMap[id] !== true; + let actions = []; + const pluginSettings = settings.uiSettings[`plugin-${id}`]; + + if (pluginSettings) { + actions.push(strings.settings); + } + + actions.push( + enabled ? strings.disable || "Disable" : strings.enable || "Enable", + ); + + actions.push(strings.uninstall); + const action = await select("Action", actions); + if (!action) return; + switch (action) { + case strings.settings: + pluginSettings.setTitle(pluginName); + pluginSettings.show(); + break; + case strings.uninstall: + await uninstall(id); + if (!$explore.collapsed) { + $explore.ontoggle(); + } + if (!$installed.collapsed) { + $installed.ontoggle(); + } + break; + case strings.disable || "Disable": + // fallthrough + case strings.enable || "Enable": + if (enabled) { + disabledMap[id] = true; // Disabling + } else { + delete disabledMap[id]; // Enabling + } + + settings.update({ pluginsDisabled: disabledMap }, false); + + // INFO: I don't know how to get all loaded plugins(not installed). + const choice = await select( + strings.info, + [ + // { value: "reload_plugins", text: strings["reload_plugins"] || "Reload Plugins" }, + { + value: "restart_app", + text: strings["restart_app"] || "Restart App", + }, + { + value: "single", + text: enabled + ? strings["disable_plugin"] || "Disable this Plugin" + : strings["enable_plugin"] || "Enable this Plugin", + }, + ], + { + default: "single", + }, + ); + + // if (choice === "reload_plugins") { + // // Unmount all currently loaded plugins before reloading + // if (window.acode && typeof window.acode.getLoadedPluginIds === "function") { + // for (const pluginId of window.acode.getLoadedPluginIds()) { + // window.acode.unmountPlugin(pluginId); + // } + // } + // await window.loadPlugins?.(); + // window.toast(strings.success); + // } + if (choice === "restart_app") { + location.reload(); + } else if (choice === "single") { + if (enabled) { + window.acode.unmountPlugin(id); + window.toast(strings["plugin_disabled"] || "Plugin Disabled"); + } else { + await loadPlugin(id); + window.toast(strings["plugin_enabled"] || "Plugin enabled"); + } + if (!$explore.collapsed) { + $explore.ontoggle(); + } + if (!$installed.collapsed) { + $installed.ontoggle(); + } + } + break; + } +} diff --git a/src/sidebarApps/extensions/style.scss b/src/sidebarApps/extensions/style.scss new file mode 100644 index 000000000..18d79cfde --- /dev/null +++ b/src/sidebarApps/extensions/style.scss @@ -0,0 +1,176 @@ +@use "../../styles/mixins.scss"; + +.container.extensions { + .header { + padding: 10px; + display: flex; + flex-direction: column; + border-bottom: 1px solid var(--border-color); + box-sizing: border-box; + + .title { + font-weight: 600; + display: flex; + justify-content: space-between !important; + align-items: center; + width: 100%; + color: var(--primary-text-color); + margin-bottom: 8px; + + .actions { + display: flex; + align-items: center; + } + + .icon-button { + background: none; + border: none; + cursor: pointer; + color: var(--primary-text-color); + margin-left: 0.4rem; + border-radius: 6px; + transition: all 0.2s ease; + display: flex; + align-items: center; + justify-content: center; + min-width: 32px; + min-height: 32px; + font-size: 1.1em; + + &:hover { + background-color: var(--primary-color); + } + } + } + + input[type="search"] { + width: 100% !important; + padding: 0.5rem !important; + border: 1px solid var(--border-color); + border-radius: 6px; + background: var(--secondary-color); + color: var(--primary-text-color); + font-size: 0.875rem; + transition: all 0.2s ease; + margin: 0 !important; + + &:focus { + outline: none; + border-color: var(--active-color); + box-shadow: 0 0 0 2px rgba(51, 153, 255, 0.1); + } + + &::placeholder { + color: var(--secondary-text-color); + } + } + } + + .list.search-result { + min-height: 0; + + &.loading { + @include mixins.loader(20px); + } + + .filter-message { + display: flex; + justify-content: space-between; + align-items: center; + background: var(--primary-color); + padding: 0.5rem 0.75rem; + border-bottom: 1px solid var(--border-color); + font-size: 0.875rem; + color: var(--primary-text-color); + + strong { + color: var(--active-color); + margin-left: 0.25rem; + } + + .close-button { + background: none; + border: none; + cursor: pointer; + padding: 0.25rem; + border-radius: 4px; + transition: all 0.2s ease; + color: var(--secondary-text-color); + + &:hover { + background-color: var(--error-text-color); + color: white; + } + } + } + } + + .tile { + display: flex; + justify-content: space-between; + align-items: center; + min-height: 30px; + padding: 6px 8px; + + .text { + &.sub-text { + font-size: 0.8rem; + + &::after { + font-size: 0.7rem; + } + } + } + + .more_vert { + display: flex; + align-items: center; + cursor: pointer; + justify-content: center; + transition: background-color 0.3s ease; + margin-left: 10px; + + &:hover { + background-color: var(--active-icon-color); + } + } + + .replay { + display: flex; + align-items: center; + cursor: pointer; + justify-content: center; + transition: background-color 0.3s ease; + + &:hover { + background-color: var(--active-icon-color); + } + } + + .install-btn { + background: none; + border: none; + margin-left: 10px; + border-radius: 50%; + cursor: pointer; + color: var(--primary-text-color); + transition: all 0.3s ease; + display: flex; + align-items: center; + justify-content: center; + + &:hover { + background-color: var(--active-icon-color); + } + + &:active { + transform: scale(0.95); + } + } + } + + .icon { + background-size: 24px !important; + background-position: center !important; + } +} \ No newline at end of file diff --git a/src/sidebarApps/files/index.js b/src/sidebarApps/files/index.js new file mode 100644 index 000000000..1c9e900ec --- /dev/null +++ b/src/sidebarApps/files/index.js @@ -0,0 +1,132 @@ +import "./style.scss"; +import Sidebar from "components/sidebar"; +import settings from "lib/settings"; + +/**@type {HTMLElement} */ +let container; + +export default [ + "documents", // icon + "files", // id + strings["files"], // title + initApp, // init function + false, // prepend + onSelected, // onSelected function +]; + +/** + * Initialize files app + * @param {HTMLElement} el + */ +function initApp(el) { + container = el; + container.classList.add("files"); + container.setAttribute("data-msg", strings["open folder"]); + container.style.overflowX = "auto"; + container.addEventListener("click", clickHandler); + editorManager.on( + ["new-file", "int-open-file-list", "remove-file"], + (position) => { + if ( + typeof position === "string" && + position !== settings.OPEN_FILE_LIST_POS_SIDEBAR + ) + return; + const fileList = container.get(":scope > div.file-list"); + if (fileList) fixHeight(fileList); + }, + ); + editorManager.on("add-folder", fixHeight); + Sidebar.on("show", onSelected); +} + +/** + * On selected handler for files app + * @param {HTMLElement} el + */ +function onSelected(el) { + const $scrollableLists = container.getAll(":scope .scroll[data-scroll-top]"); + $scrollableLists.forEach(($el) => { + $el.scrollTop = $el.dataset.scrollTop; + }); +} + +/** + * Click handler for files app + * @param {MouseEvent} e + * @returns + */ +function clickHandler(e) { + if (!container.children.length) { + acode.exec("open-folder"); + return; + } + + const { target } = e; + if (target.matches(".files>.list>.tile")) { + fixHeight(target.parentElement); + } +} + +/** + * Update list height + * @param {HTMLElement} target Target element + */ +export function fixHeight(target) { + const lists = Array.from(container.getAll(":scope > div")); + const ITEM_HEIGHT = 30; + + let height = (lists.length - 1) * ITEM_HEIGHT; + let activeFileList; + + if (settings.value.openFileListPos === settings.OPEN_FILE_LIST_POS_SIDEBAR) { + const [firstList] = lists; + if (firstList.classList.contains("file-list")) { + activeFileList = firstList; + if (firstList.unclasped) { + const heightOffset = height - ITEM_HEIGHT; + const totalHeight = + ITEM_HEIGHT * activeFileList.$ul.children.length + ITEM_HEIGHT; + const maxHeight = + lists.length === 1 || !lists.slice(1).find((list) => list.unclasped) + ? window.innerHeight + : window.innerHeight / 2; + const minHeight = Math.min(totalHeight, maxHeight - heightOffset); + + activeFileList.style.maxHeight = `${minHeight}px`; + activeFileList.style.height = `${minHeight}px`; + height += minHeight - ITEM_HEIGHT; + } + } + } + + lists.forEach((list) => { + if (list === activeFileList) return; + + if (target === activeFileList) { + if (list.collapsed) { + list.style.removeProperty("max-height"); + list.style.removeProperty("height"); + return; + } + target = list; + } + + if (list === target && target.unclasped) { + list.style.maxHeight = `calc(100% - ${height}px)`; + list.style.height = `calc(100% - ${height}px)`; + return; + } + + if (list.collapsed) { + list.style.removeProperty("max-height"); + list.style.removeProperty("height"); + return; + } + + list.collapse(); + list.style.removeProperty("max-height"); + list.style.removeProperty("height"); + return; + }); +} diff --git a/src/sidebarApps/files/style.scss b/src/sidebarApps/files/style.scss new file mode 100644 index 000000000..906d1d647 --- /dev/null +++ b/src/sidebarApps/files/style.scss @@ -0,0 +1,99 @@ +.container.files { + &:empty { + height: 100%; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + + &::after { + content: attr(data-msg); + font-weight: 600; + } + } + + /* Make the container horizontally scrollable */ + overflow-x: auto !important; + max-width: 100%; + + &::-webkit-scrollbar { + height: 5px; + width: 5px; + } + + &::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, 0.3); + border-radius: 3px; + } + + &::-webkit-scrollbar-corner { + background: transparent; + } + + scrollbar-width: thin; + scrollbar-color: rgba(0, 0, 0, 0.3) transparent; + + .list { + min-width: 100%; + width: max-content; + max-width: none; + } + + ul { + min-width: 100%; + width: max-content; + overflow-x: visible !important; + max-width: none; + margin-left: 0; + &::-webkit-scrollbar-corner { + background: transparent; + } + } + + li { + min-width: 100%; + width: max-content; + } + + .tile { + > .text { + white-space: nowrap !important; + overflow: visible !important; + width: max-content !important; + text-overflow: clip !important; + } + } + + /* Add indent guides for folders (excluding first level) */ + .list.collapsible > ul > .collapsible > ul { + position: relative; + padding-left: 24px; + + &::before { + content: ""; + position: absolute; + left: 14px; + top: 0; + height: 100%; + width: 1px; + background: var(--border-color); + z-index: 0; + } + + /* Add guides for deeper nesting */ + .collapsible > ul { + padding-left: 24px; + + &::before { + content: ""; + position: absolute; + left: 14px; + top: 0; + height: 100%; + width: 1px; + background: var(--border-color); + z-index: 0; + } + } + } +} diff --git a/src/sidebarApps/index.js b/src/sidebarApps/index.js new file mode 100644 index 000000000..c08636c84 --- /dev/null +++ b/src/sidebarApps/index.js @@ -0,0 +1,134 @@ +import Sponsors from "pages/sponsors"; +import SidebarApp from "./sidebarApp"; + +const SIDEBAR_APPS_LAST_SECTION = "sidebarAppsLastSection"; + +/**@type {HTMLElement} */ +let $apps; +/**@type {HTMLElement} */ +let $sidebar; +/**@type {string} */ +let currentSection = localStorage.getItem(SIDEBAR_APPS_LAST_SECTION); +/**@type {SidebarApp[]} */ +const apps = []; + +/** + * @param {string} icon icon of the app + * @param {string} id id of the app + * @param {HTMLElement} el element to show in sidebar + * @param {string} title title of the app + * @param {(container:HTMLElement)=>void} initFunction + * @param {boolean} prepend weather to show this app at the top of the sidebar or not + * @param {(container:HTMLElement)=>void} onSelected + * @returns {void} + */ +function add( + icon, + id, + title, + initFunction, + prepend = false, + onSelected = () => {}, +) { + currentSection ??= id; + + const active = currentSection === id; + const app = new SidebarApp(icon, id, title, initFunction, onSelected); + + app.active = active; + app.install(prepend); + apps.push(app); +} + +/** + * Removes a sidebar app with the given ID. + * @param {string} id - The ID of the sidebar app to remove. + * @returns {void} + */ +function remove(id) { + const app = apps.find((app) => app.id === id); + if (!app) return; + const wasActive = app.active; + app.remove(); + apps.splice(apps.indexOf(app), 1); + if (wasActive && apps.length > 0) { + const firstApp = apps[0]; + firstApp.active = true; + currentSection = firstApp.id; + localStorage.setItem(SIDEBAR_APPS_LAST_SECTION, firstApp.id); + } +} + +/** + * Initialize sidebar apps + * @param {HTMLElement} $el + */ +function init($el) { + $sidebar = $el; + $apps = $sidebar.get(".app-icons-container"); + $apps.addEventListener("click", onclick); + SidebarApp.init($el, $apps); +} + +/** + * Loads all sidebar apps. + */ +async function loadApps() { + add(...(await import("./files")).default); + add(...(await import("./searchInFiles")).default); + add(...(await import("./extensions")).default); + add(...(await import("./notification")).default); + $apps.append(); +} + +/** + * Ensures that at least one app is active. + * Call this AFTER all plugins have been loaded to handle cases where + * the stored section was from an uninstalled plugin. + * @returns {void} + */ +function ensureActiveApp() { + const hasActiveApp = apps.some((app) => app.active); + if (!hasActiveApp && apps.length > 0) { + const firstApp = apps[0]; + firstApp.active = true; + currentSection = firstApp.id; + localStorage.setItem(SIDEBAR_APPS_LAST_SECTION, firstApp.id); + } +} + +/** + * Gets the container of the app with the given ID. + * @param {string} id + * @returns + */ +function get(id) { + const app = apps.find((app) => app.id === id); + return app.container; +} + +/** + * Handles click on sidebar apps + * @param {MouseEvent} e + */ +function onclick(e) { + const target = e.target; + const { action, id } = target.dataset; + + if (action !== "sidebar-app") return; + + localStorage.setItem(SIDEBAR_APPS_LAST_SECTION, id); + const activeApp = apps.find((app) => app.active); + const app = apps.find((app) => app.id === id); + if (activeApp) activeApp.active = false; + if (app) app.active = true; +} + +export default { + init, + add, + get, + remove, + loadApps, + ensureActiveApp, +}; diff --git a/src/sidebarApps/notification/index.js b/src/sidebarApps/notification/index.js new file mode 100644 index 000000000..fb823d613 --- /dev/null +++ b/src/sidebarApps/notification/index.js @@ -0,0 +1,63 @@ +import NotificationManager from "lib/notificationManager"; +import "./style.scss"; +import Sidebar from "components/sidebar"; + +/**@type {HTMLElement} */ +let container; +/** @type {HTMLElement} */ +let $notificationContainer = null; + +let notificationManager; + +export default [ + "notifications", // icon + "notification", // id + strings["notifications"], // title + initApp, // init function + false, // prepend + onSelected, // onSelected function +]; + +const $header = ( +
      +
      + {strings["notifications"]} + +
      +
      +); + +/** + * Initialize files app + * @param {HTMLElement} el + */ +function initApp(el) { + container = el; + container.classList.add("notifications"); + container.content = $header; + $notificationContainer = ( +
      + ); + container.append($notificationContainer); + + notificationManager = new NotificationManager(); + + Sidebar.on("show", onSelected); +} + +/** + * On selected handler for files app + * @param {HTMLElement} el + */ +function onSelected(el) { + const $scrollableLists = container.getAll(":scope .scroll[data-scroll-top]"); + $scrollableLists.forEach(($el) => { + $el.scrollTop = $el.dataset.scrollTop; + }); +} diff --git a/src/sidebarApps/notification/style.scss b/src/sidebarApps/notification/style.scss new file mode 100644 index 000000000..1ca2e0866 --- /dev/null +++ b/src/sidebarApps/notification/style.scss @@ -0,0 +1,167 @@ +.container.notifications { + display: flex; + flex-direction: column; + + .header { + padding: 10px; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1px solid var(--border-color); + + .title { + gap: 4px; + display: flex; + font-weight: 600; + align-items: center; + color: var(--primary-text-color); + justify-content: space-between !important; + + .icon-button { + border: none; + background: none; + cursor: pointer; + color: var(--primary-text-color); + margin-left: 0.4rem; + border-radius: 6px; + transition: all 0.2s ease; + display: flex; + align-items: center; + justify-content: center; + min-width: 32px; + min-height: 32px; + font-size: 1.1em; + + &:hover { + background-color: var(--primary-color); + } + } + } + } + + .notifications-container { + flex: 1; + overflow-y: auto; + padding: 12px; + display: flex; + flex-direction: column; + gap: 8px; + + .empty-state { + text-align: center; + color: var(--secondary-text-color); + padding: 20px; + font-size: 14px; + } + + .notification-item { + padding: 10px 12px; + border-radius: 6px; + background: var(--popup-background-color); + display: flex; + gap: 10px; + align-items: flex-start; + animation: slideIn 0.3s ease-out; + border: 1px solid var(--popup-border-color); + transition: all 0.2s ease; + + &:hover { + background: rgba($color: #000000, $alpha: 0.2); + border-color: var(--popup-border-color); + } + + .notification-icon { + width: 20px; + height: 20px; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + color: var(--primary-text-color); + } + + .notification-content { + flex: 1; + min-width: 0; + + .notification-title { + font-size: 13px; + font-weight: 500; + margin-bottom: 4px; + white-space: nowrap; + overflow: hidden; + word-wrap: break-word; + color: var(--primary-text-color); + display: flex; + justify-content: space-between; + align-items: center; + + .notification-time { + font-size: 11px; + color: var(--secondary-text-color); + } + } + + .notification-message { + font-size: 12px; + color: var(--secondary-text-color); + line-height: 1.4; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + word-break: break-word; + } + + .notification-actions { + margin-top: 8px; + display: flex; + justify-content: flex-end; + + .action-button { + font-size: 11px; + padding: 6px 12px; + border-radius: 4px; + background: transparent; + color: var(--secondary-text-color); + cursor: pointer; + transition: all 0.2s ease; + border: 1px solid var(--border-color); + display: flex; + align-items: center; + gap: 4px; + + &:hover { + background: rgba($color: var(--border-color), $alpha: 0.6); + color: var(--primary-text-color); + border-color: var(--border-color); + } + + &:active { + transform: translateY(1px); + } + + &::before { + content: '×'; + font-size: 14px; + line-height: 1; + opacity: 0.8; + } + } + } + } + } + } +} + + +@keyframes slideIn { + from { + transform: translateX(100%); + opacity: 0; + } + + to { + transform: translateX(0); + opacity: 1; + } +} diff --git a/src/sidebarApps/searchInFiles/index.js b/src/sidebarApps/searchInFiles/index.js new file mode 100644 index 000000000..5fc682911 --- /dev/null +++ b/src/sidebarApps/searchInFiles/index.js @@ -0,0 +1,779 @@ +import "./styles.scss"; +import fsOperation from "fileSystem"; +import addTouchListeners from "ace/touchHandler"; +import autosize from "autosize"; +import Checkbox from "components/checkbox"; +import Sidebar, { preventSlide } from "components/sidebar"; +import escapeStringRegexp from "escape-string-regexp"; +import Reactive from "html-tag-js/reactive"; +import Ref from "html-tag-js/ref"; +import files, { Tree } from "lib/fileList"; +import openFile from "lib/openFile"; +import settings from "lib/settings"; +import helpers from "utils/helpers"; +import { fileNames, words } from "./searchResultMode"; + +const workers = []; +const results = []; +const filesSearched = []; +const filesReplaced = []; + +const $container = Ref(); +const $regExp = Ref(); +const $search = Ref(); +const $replace = Ref(); +const $exclude = Ref(); +const $include = Ref(); +const $wholeWord = Ref(); +const $caseSensitive = Ref(); +const $btnReplaceAll = Ref(); +const $resultOverview = Ref(); +const $error = Reactive(); +const $progress = Reactive(); + +const resultOverview = { + filesCount: 0, + matchesCount: 0, + reset() { + this.filesCount = 0; + this.matchesCount = 0; + $resultOverview.innerHTML = searchResultText(0, 0); + $resultOverview.classList.remove("error"); + }, +}; + +const CASE_SENSITIVE = "search-in-files-case-sensitive"; +const WHOLE_WORD = "search-in-files-whole-word"; +const REG_EXP = "search-in-files-reg-exp"; +const EXCLUDE = "search-in-files-exclude"; +const INCLUDE = "search-in-files-include"; + +const store = { + get caseSensitive() { + return localStorage.getItem(CASE_SENSITIVE) === "true"; + }, + set caseSensitive(value) { + localStorage.setItem(CASE_SENSITIVE, value); + }, + get wholeWord() { + return localStorage.getItem(WHOLE_WORD) === "true"; + }, + set wholeWord(value) { + return localStorage.setItem(WHOLE_WORD, value); + }, + get regExp() { + return localStorage.getItem(REG_EXP) === "true"; + }, + set regExp(value) { + return localStorage.setItem(REG_EXP, value); + }, + get exclude() { + return localStorage.getItem(EXCLUDE); + }, + set exclude(value) { + return localStorage.setItem(EXCLUDE, value); + }, + get include() { + return localStorage.getItem(INCLUDE); + }, + set include(value) { + return localStorage.setItem(INCLUDE, value); + }, +}; + +const debounceSearch = helpers.debounce(searchAll, 500); + +let useIncludeAndExclude = false; +/**@type {AceAjax.Editor} */ +let searchResult = null; +let replacing = false; +let newFiles = 0; +let searching = false; + +addEventListener($regExp, "change", onInput); +addEventListener($wholeWord, "change", onInput); +addEventListener($caseSensitive, "change", onInput); +addEventListener($search, "input", onInput); +addEventListener($include, "input", onInput); +addEventListener($exclude, "input", onInput); +addEventListener($btnReplaceAll, "click", replaceAll); + +files.on("push-file", () => { + if (!searching) return; + $error.value = strings["missed files"].replace("{count}", ++newFiles); +}); + +$container.onref = ($el) => { + searchResult = ace.edit($el, { + readOnly: true, + useWorker: false, + showLineNumbers: false, + fontSize: "14px", + mode: "ace/mode/search_result", + }); + searchResult.focus = () => {}; + $container.style.lineHeight = "1.5"; + searchResult.session.setTabSize(1); + searchResult.renderer.setMargin(0, 0, -20, 0); + addTouchListeners(searchResult, true, onCursorChange); + searchResult.session.setUseWrapMode(true); +}; + +preventSlide((target) => { + return $container.el?.contains(target); +}); + +export default [ + "search", + "searchInFiles", + strings["search in files"], + (/**@type {HTMLElement} */ el) => { + el.classList.add("search-in-files"); + + el.content = ( + <> +
      +
      + + + +
      +
      + + , + ); +} + +/** + * Converts a search string and options into a regular expression. + * + * @param {string} search - The search string. + * @param {object} options - The search options. + * @param {boolean} [options.caseSensitive=false] - Whether the search is case-sensitive. + * @param {boolean} [options.wholeWord=false] - Whether to match whole words only. + * @param {boolean} [options.regExp=false] - Whether the search string is a regular expression. + * @returns {RegExp} - The regular expression created from the search string and options. + */ +function toRegex(search, options) { + const { caseSensitive = false, wholeWord = false, regExp = false } = options; + + let flags = caseSensitive ? "gm" : "gim"; + let regexString = regExp ? search : escapeStringRegexp(search); + + if (wholeWord) { + const wordBoundary = "\\b"; + regexString = `${wordBoundary}${regexString}${wordBoundary}`; + } + + try { + return new RegExp(regexString, flags); + } catch (error) { + const [, message] = error.message.split(/:(.*)/); + $resultOverview.classList.add("error"); + $resultOverview.textContent = strings["invalid regex"].replace( + "{message}", + message || error.message, + ); + return null; + } +} + +/** + * On cursor change event handler + */ +async function onCursorChange() { + const line = searchResult.selection.getCursor().row; + const result = results[line]; + if (!result) return; + const { file, position } = result; + if (!position) { + // fold the file + searchResult.execCommand("toggleFoldWidget"); + return; + } + + Sidebar.hide(); + const { url } = filesSearched[file]; + await openFile(url, { render: true }); + const { editor } = editorManager; + editor.moveCursorTo(position.start.row, position.start.column, false); + editor.selection.setRange(position); + editor.centerSelection(); + editor.focus(); +} + +/** + * When a file is added or removed from the file list + * @param {import('lib/fileList').Tree} tree + */ +function onFileUpdate(tree) { + if (!tree || tree?.children) return; + onInput(); +} + +/** + * Add event listeners to file changes + */ +function addEvents() { + files.on("add-file", onFileUpdate); + files.on("remove-file", onFileUpdate); + files.on("add-folder", onInput); + files.on("remove-folder", onInput); + files.on("refresh", onInput); + editorManager.on("rename-file", onInput); + editorManager.on("file-content-changed", onInput); +} + +/** + * Remove event listeners to file changes + */ +function removeEvents() { + files.off("add-file", onFileUpdate); + files.off("remove-file", onFileUpdate); + files.off("add-folder", onInput); + files.off("remove-folder", onInput); + files.off("refresh", onInput); + editorManager.off("rename-file", onInput); + editorManager.off("file-content-changed", onInput); +} + +function forceTokenizer() { + const { session } = searchResult; + // force recreation of tokenizer + session.$mode.$tokenizer = null; + session.bgTokenizer.setTokenizer(session.$mode.getTokenizer()); + // force re-highlight whole document + const row = session.getLength() - 1; + session.bgTokenizer.start(row); +} diff --git a/src/sidebarApps/searchInFiles/searchResultMode.js b/src/sidebarApps/searchInFiles/searchResultMode.js new file mode 100644 index 000000000..2260c502f --- /dev/null +++ b/src/sidebarApps/searchInFiles/searchResultMode.js @@ -0,0 +1,223 @@ +export const words = []; +export const fileNames = []; + +ace.define( + "ace/mode/search_result_highlight_rules", + [ + "require", + "exports", + "module", + "ace/lib/oop", + "ace/mode/text_highlight_rules", + ], + function (require, exports, module) { + const oop = require("../lib/oop"); + const { TextHighlightRules } = require("./text_highlight_rules"); + + function SearchHighlightRules() { + this.$rules = { + start: [ + { + token: "file_name", + get regex() { + return fileNames.join("|"); + }, + }, + { + token: "highlight", + get regex() { + return words.join("|"); + }, + }, + { + 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 = Number.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", + }, + ], + 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", + }, + ], + 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", + }, + ], + }; + this.normalizeRules(); + } + oop.inherits(SearchHighlightRules, TextHighlightRules); + exports.SearchHighlightRules = SearchHighlightRules; + }, +); + +define("ace/mode/folding/search_result_fold", [ + "require", + "exports", + "module", + "ace/lib/oop", + "ace/mode/folding/fold_mode", + "ace/range", +], function (require, exports, module) { + const oop = require("ace/lib/oop"); + const { FoldMode: BaseFoldMode } = require("./fold_mode"); + const { Range } = require("ace/range"); + + function FoldMode() {} + oop.inherits(FoldMode, BaseFoldMode); + exports.FoldMode = FoldMode; + + (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); +}); + +ace.define( + "ace/mode/search_result", + [ + "require", + "exports", + "module", + "ace/lib/oop", + "ace/mode/text", + "ace/mode/folding/search_result_fold", + "ace/search_result_highlight_rules", + ], + function (require, exports, module) { + const oop = require("ace/lib/oop"); + const { Mode: TextMode } = require("./text"); + const { SearchHighlightRules } = require("./search_result_highlight_rules"); + const { FoldMode } = require("./folding/search_result_fold"); + + function Mode() { + this.$id = "ace/mode/search_result"; + this.HighlightRules = SearchHighlightRules; + this.foldingRules = new FoldMode(); + } + oop.inherits(Mode, TextMode); + exports.Mode = Mode; + }, +); diff --git a/src/sidebarApps/searchInFiles/styles.scss b/src/sidebarApps/searchInFiles/styles.scss new file mode 100644 index 000000000..f4d704728 --- /dev/null +++ b/src/sidebarApps/searchInFiles/styles.scss @@ -0,0 +1,138 @@ +.search-in-files { + width: calc(100% - 40px - 20px) !important; + margin: 0 auto; + overflow: visible !important; + + [is='details'] { + width: 100%; + + >[is='summary'] { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + + textarea, + input { + margin: 0 !important; + white-space: nowrap; + overflow-x: auto !important; + } + + .marker::after { + width: 10px; + font-size: 1rem; + content: '\25B6'; + } + } + + >[is='summary']~* { + display: none; + margin: 0 0 5px auto !important; + } + + &[open] { + >[is='summary'] { + .marker::after { + content: '\25BC'; + } + } + + >[is='summary']~* { + display: block; + } + + >[is='summary']~div { + display: flex !important; + justify-content: space-between; + align-items: center; + + >* { + margin: 0 !important; + } + } + } + } + + .ace_editor { + height: 100%; + width: calc(100% + 18px); + margin-left: -8px; + background-color: rgb(153, 153, 255); + background-color: var(--primary-color); + color: rgb(255, 255, 255); + color: var(--primary-text-color); + + .ace_gutter, + .ace_gutter-cell { + background-color: inherit !important; + color: inherit !important; + } + + .ace_fold { + display: none !important; + } + + .ace_bracket { + display: none !important; + } + + .ace_cursor { + display: none !important; + } + + .ace_marker-layer { + display: none !important; + } + + .ace_highlight { + border: solid 1px rgba(122, 122, 122, 0.2); + border: solid 1px var(--border-color); + border-radius: 2px; + background-color: rgb(255, 255, 255); + background-color: var(--secondary-color); + color: rgb(37, 37, 37); + color: var(--secondary-text-color); + } + + .ace_file_name { + color: rgb(255, 215, 0); + color: var(--active-text-color); + } + + .ace_gutter-cell:nth-child(odd), + .ace_line_group:nth-child(odd) { + background-color: rgba(0, 0, 0, 0.2) !important; + } + } + + .extras { + display: block !important; + line-height: 0px !important; + margin-bottom: 10px !important; + text-align: right !important; + } + + .options { + width: 100%; + margin-bottom: 10px; + text-align: right; + } + + button { + display: inline-block; + background-color: transparent; + border: none; + color: rgb(37, 37, 37); + color: var(--secondary-text-color); + } + + .error { + color: orangered; + } + + .search-result { + position: relative; + padding-bottom: 5px; + } +} \ No newline at end of file diff --git a/src/sidebarApps/searchInFiles/worker.js b/src/sidebarApps/searchInFiles/worker.js new file mode 100644 index 000000000..3798715fc --- /dev/null +++ b/src/sidebarApps/searchInFiles/worker.js @@ -0,0 +1,260 @@ +import "core-js/stable"; +import { minimatch } from "minimatch"; + +const resolvers = {}; + +self.onmessage = (ev) => { + const { action, data, error, id } = ev.data; + switch (action) { + case "search-files": + processFiles(data, "search"); + break; + + case "replace-files": + processFiles(data, "replace"); + break; + + case "get-file": { + if (!resolvers[id]) return; + const cb = resolvers[id]; + cb(data, error); + delete resolvers[id]; + break; + } + + default: + return false; + } +}; + +/** + * Process files for search or replace operations. + * + * @param {object} data - The data containing files, search, replace, and options. + * @param {'search' | 'replace'} [mode='search'] - The mode of operation (search or replace). + */ +function processFiles(data, mode = "search") { + const process = mode === "search" ? searchInFile : replaceInFile; + const { files, search, replace, options } = data; + const { test: skip } = Skip(options); + const total = files.length; + let count = 0; + + files.forEach(processFile); + + /** + * Process a file for search or replace operation. + * + * @param {object} file - The file object to process. + * @param {string} file.url - The URL of the file. + */ + function processFile(file) { + if (skip(file)) { + done(++count / total, mode); + return; + } + + getFile(file.url, (res, err) => { + if (err) { + done(++count / total, mode); + throw err; + } + + process({ file, content: res, search, replace, options }); + done(++count / total, mode); + }); + } +} + +/** + * Search for a string in the content of a file. + * @param {object} arg - The content of the file to search. + * @param {import('lib/fileList').Tree} arg.file - The file. + * @param {string} arg.content - The file content. + * @param {RegExp} arg.search - The string to search for. + */ +function searchInFile({ file, content, search }) { + const matches = []; + + let text = `${file.name}`; + let match; + + if (text.length > 30) { + text = `...${text.slice(-30)}`; + } + + while ((match = search.exec(content))) { + const [word] = match; + const start = match.index; + const end = start + word.length; + const position = { + start: getLineColumn(content, start), + end: getLineColumn(content, end), + }; + const [line, renderText] = getSurrounding(content, word, start, end); + text += `\n\t${line.trim()}`; + matches.push({ match: word, position, renderText }); + } + + self.postMessage({ + action: "search-result", + data: { + file, + matches, + text, + }, + }); +} + +/** + * Replace a string in the content of a file. + * @param {object} arg - The content of the file to search. + * @param {import('lib/fileList').Tree} arg.file - The content of the file to search. + * @param {string} content - The content of the file to search. + * @param {RegExp} arg.search - The string to search for. + * @param {string} arg.replace - The string to replace with. + */ +function replaceInFile({ file, content, search, replace }) { + const text = content.replace(search, replace); + + self.postMessage({ + action: "replace-result", + data: { file, text }, + }); +} + +/** + * Gets surrounding text of a match. + * @param {string} content + * @param {string} word + * @param {number} start + * @param {number} end + */ +function getSurrounding(content, word, start, end) { + const max = 50; + const remaining = max - (end - start); + let result = []; + + if (remaining <= 0) { + word = word.slice(-max); + result = [`...${word}`, word]; + } else { + let left = Math.floor(remaining / 2); + let right = left; + + let leftText = content.substring(start - left, start); + let rightText = content.substring(end, end + right); + + result = [`${leftText}${word}${rightText}`, word]; + } + + return result.map((text) => text.replace(/[\r\n]+/g, " ⏎ ")); +} + +/** + * Determines the line and column numbers for a given position in the file. + * + * @param {string} file - The file content as a string. + * @param {number} position - The position in the file for which line and column + * numbers are to be determined. + * + * @returns {Object} An object with 'line' and 'column' properties, representing + * the line and column numbers respectively for the given position. + * + * @example + * + * const file = 'Hello, this is a test.\nAnother test is here.'; + * const position = 15; + * const lineColumn = getLineColumn(file, position); + * + * // lineColumn: { line: 1, column: 16 } + */ +function getLineColumn(file, position) { + const lines = file.substring(0, position).split("\n"); + const lineNumber = lines.length - 1; + const columnNumber = lines[lineNumber].length; + return { row: lineNumber, column: columnNumber }; +} + +/** + * Retrieves the contents of a file from the main thread. + * @param {string} url + * @param {function} cb + */ +function getFile(url, cb) { + const id = Number.parseInt(Date.now() + Math.random() * 1000000); + resolvers[id] = cb; + self.postMessage({ + action: "get-file", + data: url, + id, + }); +} + +/** + * Sends a message to the main thread to indicate that the worker is done searching + * or replacing. + * @param {boolean} ratio + * @param {'search'|'replace'} mode + */ +function done(ratio, mode) { + if (ratio === 1) { + self.postMessage({ + action: "progress", + data: 100, + }); + self.postMessage({ + action: `done-${mode === "search" ? "searching" : "replacing"}`, + }); + } else { + self.postMessage({ + action: "progress", + data: Math.floor(ratio * 100), + }); + } +} + +/** + * Creates a skip function that filters files based on exclusion and inclusion patterns. + * + * @param {object} arg - The exclusion patterns separated by commas. + * @param {string} arg.exclude - The exclusion patterns separated by commas. + * @param {string} arg.include - The inclusion patterns separated by commas. + */ +function Skip({ exclude, include }) { + const excludeFiles = (exclude ? exclude.split(",") : []).map((p) => p.trim()); + const includeFiles = (include ? include.split(",") : ["**"]).map((p) => + p.trim(), + ); + + /** + * Tests whether a file should be skipped based on exclusion and inclusion patterns. + * + * @param {object} file - The file to be tested. + * @param {string} file.path - The relative URL of the file. + * @returns {boolean} - Returns true if the file should be skipped, false otherwise. + */ + function test(file) { + if (!file.path) return false; + const match = (pattern) => + minimatch(file.path, pattern, { matchBase: true }); + return excludeFiles.some(match) || !includeFiles.some(match); + } + + return { + test, + }; +} + +/** + * @typedef {Object} Match + * @property {string} line - The line of the file where the match was found. + * @property {string} text - Match result converted to a string. + * @property {Object} position - An object representing the start and end positions of the match. + * @property {Object} position.start - An object with properties line and column representing the start position. + * @property {number} position.start.line - The line number of the start position. + * @property {number} position.start.column - The column number of the start position. + * @property {Object} position.end - An object with properties line and column representing the end position. + * @property {number} position.end.line - The line number of the end position. + * @property {number} position.end.column - The column number of the end position. + */ diff --git a/src/sidebarApps/sidebarApp.js b/src/sidebarApps/sidebarApp.js new file mode 100644 index 000000000..df147dcdd --- /dev/null +++ b/src/sidebarApps/sidebarApp.js @@ -0,0 +1,178 @@ +/**@type {HTMLElement} */ +let $apps; +/**@type {HTMLElement} */ +let $sidebar; +/**@type {HTMLElement} */ +let $contaienr; + +export default class SidebarApp { + /**@type {HTMLSpanElement} */ + #icon; + /**@type {string} */ + #id; + /**@type {string} */ + #init; + /**@type {string} */ + #title; + /**@type {boolean} */ + #active; + /**@type {(el:HTMLElement)=>void} */ + #onselect; + /**@type {HTMLElement} */ + #container; + + /** + * Creates a new sidebar app. + * @param {string} icon + * @param {string} id + * @param {string} title + * @param {(el:HTMLElement)=>void} init + * @param {(el:HTMLElement)=>void} onselect + */ + constructor(icon, id, title, init, onselect) { + const emptyFunc = () => {}; + this.#container =
      ; + this.#icon = ; + this.#id = id; + this.#title = title; + this.#init = init || emptyFunc; + this.#onselect = onselect || emptyFunc; + this.#init(this.#container); + } + + /** + * Installs the app in the sidebar. + * @param {boolean} prepend + * @returns {void} + */ + install(prepend = false) { + if (prepend) { + $apps.prepend(this.#icon); + return; + } + + $apps.append(this.#icon); + } + + /** + * Initialize the sidebar element. + * @param {HTMLElement} $el sidebar element + * @param {HTMLElement} $el2 apps element + */ + static init($el, $el2) { + $sidebar = $el; + $apps = $el2; + } + + /**@type {HTMLSpanElement} */ + get icon() { + return this.#icon; + } + + /**@type {string} */ + get id() { + return this.#id; + } + + /**@type {string} */ + get title() { + return this.#title; + } + + /**@type {boolean} */ + get active() { + return !!this.#active; + } + + /**@param {boolean} value */ + set active(value) { + this.#active = !!value; + this.#icon.classList.toggle("active", this.#active); + if (this.#active) { + const oldContainer = getContainer(this.#container); + // Try to replace the old container, or append if it's not in the DOM + try { + if (oldContainer && oldContainer.parentNode === $sidebar) { + $sidebar.replaceChild($contaienr, oldContainer); + } else { + // Old container not in sidebar, just append the new one + const existingContainer = $sidebar.get(".container"); + if (existingContainer) { + $sidebar.replaceChild($contaienr, existingContainer); + } else { + $sidebar.appendChild($contaienr); + } + } + } catch (error) { + // Fallback: append the new container + console.warn("Error switching sidebar container:", error); + const existingContainer = $sidebar.get(".container"); + if (existingContainer) { + existingContainer.remove(); + } + $sidebar.appendChild($contaienr); + } + this.#onselect(this.#container); + } + } + + /**@type {HTMLElement} */ + get container() { + return this.#container; + } + + /**@type {(el:HTMLElement)=>void} */ + get init() { + return this.#init; + } + + /**@type {(el:HTMLElement)=>void} */ + get onselect() { + return this.#onselect; + } + + remove() { + if (this.#icon) { + this.#icon.remove(); + this.#icon = null; + } + if (this.#container) { + this.#container.remove(); + this.#container = null; + } + } +} + +/** + * Creates a icon element for a sidebar app. + * @param {object} param0 + * @param {string} param0.icon + * @param {string} param0.id + * @returns {HTMLElement} + */ +function Icon({ icon, id, title }) { + const className = `icon ${icon}`; + return ( + + ); +} + +/** + * Gets the container or sets it if it's not set. + * @param {HTMLElement} $el + * @returns {HTMLElement} + */ +function getContainer($el) { + const res = $contaienr; + + if ($el) { + $contaienr = $el; + } + + return res || $sidebar.get(".container"); +} diff --git a/src/styles/console.m.scss b/src/styles/console.m.scss new file mode 100644 index 000000000..dba6fed98 --- /dev/null +++ b/src/styles/console.m.scss @@ -0,0 +1,321 @@ +c-toggler { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAE9JREFUOMtjYBh0gBHO+k+cSkYilcPVMpHqpIHRwIgUFERp+I8SekQ5CY8WXH7AqYWJyGglqIERV3QykaYcV7DiSSwsODw8yJIGdTPQIAQAg9gKJl7UINwAAAAASUVORK5CYII=); + background-position: center; + background-repeat: no-repeat; + background-size: 24px; + position: fixed; + top: 0; + left: 0; + height: 30px; + width: 30px; + background-color: #fff; + transform-origin: center; + border-radius: 50%; + box-shadow: -2px 2px 8px rgba(0, 0, 0, .4); + z-index: 99999; + opacity: 0.5; +} + +c-object { + color: #9999ff; + text-decoration: underline; +} + +c-toggler:active { + box-shadow: -1px 1px 4px rgba(0, 0, 0, .4) +} + +c-line { + display: block; +} + +c-console { + box-sizing: border-box; + overflow-y: auto; + position: fixed; + top: 0; + left: 0; + height: 100vh; + width: 100vw; + background-color: #313131; + z-index: 99998; + color: #eeeeee; + font-family: "Roboto", sans-serif; +} + +c-console[title] { + padding-top: 65px; + animation: --page-transition .1s ease 1; +} + +c-console br:last-of-type { + display: none; +} + +c-console textarea { + color: white; + caret-color: currentColor !important; + background-color: inherit; +} + +c-input { + display: flex; + width: 100%; + height: fit-content; +} + +c-input::before { + content: '>>'; + margin: 0 5px; + height: 100%; +} + +#__c-input { + width: 100%; + border: none; + resize: none; + height: 200px; + position: relative; + background-color: transparent; + overflow: visible; +} + +#__c-input:focus { + outline: none; +} + +c-console[title]::before { + position: fixed; + top: 0; + left: 0; + width: 100vw; + background-color: inherit; + z-index: 999999; + content: attr(title); + display: flex; + height: 44px; + align-items: center; + justify-content: center; + font-family: Verdana, Geneva, Tahoma, sans-serif; + font-weight: 900; + box-shadow: 0 2px 4px rgba(0, 0, 0, .2); + margin-bottom: 10px; + color: white; + font-size: medium; +} + +c-message { + position: relative; + display: flex; + border-bottom: solid 1px rgba(204, 204, 204, 0.4); + margin-bottom: 35px; + font-size: .9rem; + flex-wrap: wrap; +} + +c-code { + position: relative; + color: rgb(214, 211, 211); + font-size: 1em; + font-family: 'Courier New', Courier, monospace; + overflow-x: auto; + white-space: pre; + margin-bottom: 0px; + border: 'none'; +} + +c-code::after { + content: 'use'; + background-color: #666; + color: inherit; + border-radius: 4px; + padding: 0 0.4rem; + font-size: 0.6rem; +} + +c-code::before { + content: '>>'; + padding: 0 5px; + font-style: italic; +} + +c-key { + font-size: 0.9rem; + color: #cc66ff; +} + +c-message[log-level=error] { + border-bottom: solid 1px rgba(255, 255, 255, 0.4); + background-color: #422; + color: inherit; +} + +c-message[log-level=error]::after { + background-color: #cc4343; + color: inherit +} + +c-message[log-level=warn] { + border-bottom: solid 1px rgba(255, 255, 255, 0.4); + background-color: #633; + color: inherit; +} + +c-message[log-level=warn]::after { + background-color: #cc6969; + color: inherit +} + +c-stack:not(:empty) { + content: attr(data-stack); + font-family: Verdana, Geneva, Tahoma, sans-serif; + position: absolute; + top: 100%; + right: 0; + display: flex; + height: 20px; + align-items: center; + justify-content: space-between; + width: 100vw; + background-color: inherit; + padding: 0 5px; + box-sizing: border-box; + font-size: .8rem; + color: inherit; +} + +c-text { + padding: 2px; + white-space: pre; + font-family: Verdana, Geneva, Tahoma, sans-serif; + overflow: auto; + box-sizing: border-box; + max-width: 100vw; + font-size: 0.9rem; + width: 100%; + padding-left: 10px; + white-space: break-spaces; +} + +c-text.__c-boolean { + color: rgb(130, 80, 177); +} + +c-text.__c-number { + color: rgb(97, 88, 221); +} + +c-text.__c-symbol { + color: rgb(111, 89, 172); +} + +c-text.__c-function { + color: rgb(145, 136, 168); + font-family: 'Courier New', Courier, monospace; + font-size: 0.9rem; +} + +c-text.__c-function::before { + content: 'ƒ'; + margin: 0 2px; + font-style: italic; + color: #9999ff; +} + +c-text.__c-object, +c-text.__c-undefined { + color: rgb(118, 163, 118); +} + +c-text.__c-string { + color: rgb(59, 161, 59); +} + +c-text.__c-string:not(.no-quotes)::before { + content: '"'; + margin-right: 2px; +} + +c-text.__c-string:not(.no-quotes)::after { + content: '"'; + margin-left: 2px; +} + +c-message.error c-text { + overflow: unset; + white-space: pre-wrap; + word-break: break-word; + color: white; +} + +c-group { + display: none; + margin-left: 14px; +} + +c-type[type="body-toggler"].__show-data+c-group { + display: block; +} + +c-type[type="body-toggler"]::before { + display: inline-block; + content: '▸'; + margin-right: 2.5px; +} + +c-type[type="body-toggler"]::after { + content: '{...}'; +} + +c-type[type="body-toggler"].__show-data::before { + content: '▾'; +} + +c-type[type="body-toggler"].__show-data::after { + display: none; +} + +c-table { + display: table; + width: 100%; + border-collapse: collapse; + border-spacing: 0; + font-size: 0.9rem; + color: rgb(214, 211, 211); + border: solid 1px rgba(204, 204, 204, 0.4); +} + +c-table c-row { + display: table-row; + border-bottom: solid 1px rgba(204, 204, 204, 0.4); +} + +c-table c-row:last-child { + border-bottom: none; +} + +c-table c-row:first-child { + font-weight: bold; +} + +c-table c-cell { + display: table-cell; + padding: 5px; + border-bottom: solid 1px rgba(204, 204, 204, 0.4); +} + +c-table c-cell:not(:last-child) { + border-left: solid 1px rgba(204, 204, 204, 0.4); +} + +@keyframes --page-transition { + 0% { + opacity: 0; + transform: translate3d(0, 50%, 0) + } + + 100% { + opacity: 1; + transform: translate3d(0, 0, 0) + } +} \ No newline at end of file diff --git a/src/styles/contextMenu.scss b/src/styles/contextMenu.scss deleted file mode 100644 index 1a976cf31..000000000 --- a/src/styles/contextMenu.scss +++ /dev/null @@ -1,108 +0,0 @@ -body.no-animation { - .context-menu { - border: solid 1px rgba($color: #000000, $alpha: 0.2); - } -} - -.context-menu { - z-index: 111; - box-sizing: border-box; - position: fixed; - width: fit-content; - min-width: 220px; - max-width: 320px; - min-height: 40px; - max-height: calc(100vh - 38px); - overflow-y: auto; - user-select: none; - background-color: rgb(255, 255, 255); - background-color: var(--menu-background-color); - box-shadow: 0 0 4px rgba(0, 0, 0, 0.2); - box-shadow: 0 0 4px var(--box-shadow-color); - border-radius: 4px; - - transform-origin: top center; - animation: menu-grow 100ms ease 1; - - list-style: none; - padding: 0; - border: solid 1px transparent; - border: solid 1px var(--popup-border-color); - - & + .mask { - z-index: 110; - } - - hr { - border: none; - border-bottom: solid 1px rgba(122, 122, 122, 0.227); - border-bottom: solid 1px var(--border-color); - } - - li { - display: flex; - height: 50px; - align-items: center; - padding: 0 10px; - user-select: none; - - &.notice::after { - content: '•'; - color: rgb(255, 218, 12); - font-size: 1.2em; - margin-left: 2.5px; - text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.5); - } - - &:focus { - background-color: rgba($color: #000000, $alpha: 0.1); - } - - :not([action]) { - pointer-events: none; - } - - .text { - flex: 1; - text-transform: capitalize; - color: rgb(37, 37, 37); - color: var(--menu-text-color); - - .value { - display: block; - opacity: 0.6; - font-size: 0.8em; - } - } - - .icon { - color: rgb(153, 153, 255); - color: var(--menu-icon-color); - } - - &.disabled { - pointer-events: none; - opacity: 0.5; - } - } - - &.hide { - transition: all 100ms ease; - opacity: 0; - } -} - -@keyframes menu-grow { - 0% { - transform: scale(0) translateZ(0); - opacity: 0; - } - - 80% { - opacity: 1; - } - - 100% { - transform: scale(1) translateZ(0); - } -} diff --git a/src/styles/dialogs.scss b/src/styles/dialogs.scss deleted file mode 100644 index 420f6f0e1..000000000 --- a/src/styles/dialogs.scss +++ /dev/null @@ -1,296 +0,0 @@ -.prompt { - position: fixed; - left: 50%; - top: 50%; - transform: translate(-50%, -50%) scale(1) translateZ(0); - z-index: 112; - height: fit-content; - max-height: 80vh; - width: 100vw; - max-width: 320px; - background-color: rgb(255, 255, 255); - background-color: var(--dialogbox-background-color); - box-shadow: 0 0 16px rgba(0, 0, 0, 0.2); - box-shadow: 0 0 16px var(--box-shadow-color); - border-radius: 2px !important; - border-radius: var(--dialogbox-border-radius) !important; - overflow: hidden; - - border: solid 1px transparent; - border: solid 1px var(--popup-border-color); - - display: flex; - flex-direction: column; - - &.box { - z-index: 113; - } - - &.multi { - textarea:not(:first-of-type) { - margin-top: 20px; - } - } - - &.confirm, - &.alert { - .title { - text-transform: uppercase; - } - } - - &.select { - min-width: 220px; - width: fit-content; - max-width: 320px; - - ul li :nth-child(2) { - display: block; - overflow: hidden; - text-overflow: ellipsis; - } - - .title { - justify-content: center; - } - - .no-text-transform { - li { - text-transform: unset !important; - } - - .file { - background-position: center; - } - } - } - - ul { - overflow-y: auto; - padding: 10px; - list-style: none; - - li { - &.selected span { - color: rgb(169, 0, 0) !important; - color: var(--dialogbox-selected-option-color) !important; - } - - &:not(:last-child) { - border-bottom: 0.02rem solid rgba(122, 122, 122, 0.227); - border-bottom: 0.02rem solid var(--border-color); - } - - &:focus { - background-color: rgba($color: #000000, $alpha: 0.1); - } - - height: 40px; - text-transform: uppercase; - - display: flex; - align-items: center; - justify-content: center; - color: rgb(37, 37, 37); - color: var(--dialogbox-text-color); - } - } - - & + .mask { - z-index: 111; - background-color: rgb(0, 0, 0); - opacity: 0.4; - } - - &.hide { - transition: all 200ms ease-out; - transform: translate(-50%, -50%) scale(0.95) translateZ(0); - opacity: 0; - - & + .mask { - opacity: 0; - } - } - - .title { - display: flex; - align-items: center; - font-size: 1.25em; - color: rgb(37, 37, 37); - color: var(--text-color); - word-wrap: break-word; - - &:not(:empty) { - min-height: 40px; - margin: 5px 10px 0 10px; - } - } - - .message { - overflow: auto; - font-size: 0.9em; - - &.color-picker { - .button-container { - margin: 0; - } - } - - .picker_wrapper { - background-color: inherit; - box-shadow: none; - margin: auto; - - .picker_selector { - border: solid 1px rgb(37, 37, 37); - border: solid 1px var(--dialogbox-text-color); - box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2); - box-shadow: 0 0 2px 0 var(--box-shadow-color); - } - - .picker_hue { - .picker_selector { - border-radius: 0; - padding: 10px 2px; - } - } - - .picker_alpha { - .picker_selector { - border-radius: 0; - padding: 2px 10px; - } - } - - .picker_sample, - .picker_done { - display: none; - } - - .picker_editor { - width: 100%; - - input { - text-align: center; - background-color: rgb(0, 0, 0) !important; - mix-blend-mode: difference; - color: unset !important; - } - } - } - - img { - max-width: 100%; - max-height: 100%; - margin: auto; - display: flex; - } - - &.loader { - display: flex; - align-items: center; - - .loader { - height: 30px; - width: 30px; - border-radius: 50%; - border: solid 4px rgb(37, 37, 37); - border: solid 4px var(--dialogbox-text-color); - border-bottom: solid 4px rgba($color: #000000, $alpha: 0) !important; - margin: 15px; - animation: rotate 1s linear infinite !important; - - @keyframes rotate { - 0% { - transform: rotate(0deg) translateZ(0); - } - - 100% { - transform: rotate(360deg) translateZ(0); - } - } - } - - .message { - display: flex; - align-items: center; - overflow: auto; - font-size: 0.9em; - } - } - - .message, - &:not(.loader) { - color: #252525; - color: var(--dialogbox-text-color); - padding: 10px; - min-height: 40px; - font-size: 1.2em; - } - } - - .input-group { - display: flex; - min-height: 40px; - margin: 2.5px auto; - width: 100%; - flex-wrap: wrap; - max-width: 300px; - - .hero { - display: flex; - align-items: center; - height: 40px; - width: 100%; - font-size: 1.2em; - } - - .input-checkbox { - height: 40px; - width: 50%; - } - } - - .input { - max-height: calc(100vh - 80px); - width: 100%; - max-width: 300px; - background-color: inherit; - border: none; - color: rgb(37, 37, 37); - color: var(--dialogbox-text-color); - border-bottom: solid 1px currentColor; - text-indent: 0; - font-size: 1em; - margin: 2.5px auto; - - &::placeholder { - opacity: 0.4; - } - - &:focus { - border-bottom: solid 1px rgb(51, 153, 255); - border-bottom: solid 1px var(--accent-color); - } - } - - li { - .icon { - font-size: 0.85em; - } - } - - .error-msg { - color: rgb(255, 185, 92) !important; - color: var(--error-text-color) !important; - height: fit-content; - - &:not(:empty) { - margin: 10px auto 0 auto; - } - } - - .button-container { - margin-top: 20px; - } -} diff --git a/src/styles/fileInfo.scss b/src/styles/fileInfo.scss index 81c68ee88..9b3bc2397 100644 --- a/src/styles/fileInfo.scss +++ b/src/styles/fileInfo.scss @@ -1,63 +1,96 @@ -#file-info { - .name { - min-height: 40px; - display: flex; - flex-direction: row; - align-items: center; - - .text { - font-size: 1.5rem; - font-weight: bold; - opacity: 1; - } - } - - .share-button { - border: none; - box-sizing: border-box; - background-color: rgb(51, 153, 255); - background-color: var(--button-background-color); - color: rgb(255, 255, 255); - color: var(--text-main-color); - display: flex; - justify-content: center; - align-items: center; - height: 30px; - width: fit-content; - margin: 5px auto; - padding: 0 5px; - border-radius: 20px; - max-width: 90%; - * { - pointer-events: none; - } - - .text { - overflow: hidden; - text-overflow: ellipsis; - text-align: left; - } - - .icon { - height: 30px; - margin-right: 10px; - } - } - - > div { - display: flex; - flex-direction: column; - margin-bottom: 10px; - - > span:first-child { - font-size: 0.95rem; - opacity: 0.5; - margin-right: 10px; - } - - > span:last-child { - max-width: 100%; - overflow: auto; - } - } -} +#file-info { + overflow-x: hidden; + padding: 0.8rem; + + .file-header { + margin-bottom: 1.5rem; + + .file-name { + font-size: 1.25rem; + font-weight: 500; + color: var(--popup-text-color); + display: flex; + align-items: center; + gap: 0.5rem; + flex-wrap: wrap; + + .name-part { + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + position: relative; + + &:hover { + overflow: visible; + white-space: normal; + word-break: break-all; + z-index: 1; + border-radius: 4px; + background: var(--popup-background-color); + } + } + .file-extension { + background: color-mix( + in srgb, + var(--button-background-color) 40%, + transparent + ); + padding: 0.25rem 0.5rem; + border-radius: 4px; + font-size: 0.875rem; + color: var(--active-color); + font-weight: 600; + letter-spacing: 0.5px; + text-transform: uppercase; + flex-shrink: 0; + } + } + } + + .info-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 1.5rem; + } + + .info-item { + display: flex; + flex-direction: column; + gap: 0.5rem; + + .info-label { + font-size: 0.875rem; + color: color-mix(in srgb, var(--popup-text-color) 60%, transparent); + text-transform: uppercase; + letter-spacing: 0.5px; + } + + .info-value { + font-size: 1rem; + color: var(--popup-text-color); + font-weight: 500; + } + } + + .path-section { + margin-top: 1.5rem; + padding-top: 1.5rem; + border-top: 1px solid var(--border-color); + + .path-value { + word-break: break-all; + } + } + + @media (max-width: 480px) { + .file-card { + padding: 1.5rem; + } + + .info-grid { + grid-template-columns: 1fr; + gap: 1rem; + } + } +} diff --git a/src/styles/fonts.scss b/src/styles/fonts.scss new file mode 100644 index 000000000..fb540a5c5 --- /dev/null +++ b/src/styles/fonts.scss @@ -0,0 +1,91 @@ +@font-face { + font-family: 'Fira Code'; + src: url('../res/fonts/FiraCode.ttf') format('truetype'); + font-weight: 300 700; + font-style: normal; +} + +@font-face { + font-family: 'Roboto Mono'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url('../res/fonts/RobotoMono.ttf') format('truetype'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} + +@font-face { + font-family: 'Source Code'; + src: url('../res/fonts/SourceCodePro.ttf') format('truetype'); + font-weight: 300 700; + font-style: normal; +} + +@font-face { + font-family: 'Cascadia Code'; + src: url('../res/fonts/CascadiaCode.ttf') format('truetype'); + font-weight: 300 700; + font-style: normal; +} + +@font-face { + font-family: 'Proggy Clean'; + src: url('../res/fonts/ProggyClean.ttf') format('truetype'); + font-weight: 300 700; + font-style: normal; +} + +@font-face { + font-family: 'JetBrains Mono Bold'; + src: url('../res/fonts/JetBrainsMono-Bold.ttf') format('truetype'); + font-weight: 300 700; +} + +@font-face { + font-family: 'JetBrains Mono Regular'; + src: url('../res/fonts/JetBrainsMono-Regular.ttf') format('truetype'); + font-weight: 300 700; + font-style: normal; +} + +@font-face { + font-display: swap; + font-family: Poppins; + font-style: normal; + font-weight: 400; + src: local('Poppins-Regular'), url('../res/fonts/Poppins-Regular.woff2') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-display: swap; + font-family: Poppins; + font-style: normal; + font-weight: 500; + src: local('Poppins-Medium'), url('../res/fonts/Poppins-Medium.woff2') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: Righteous; + font-style: normal; + font-weight: 400; + src: url('../res/fonts/righteous-latin-regular.woff') format('woff'); +} + +@font-face { + font-display: swap; + font-family: NotoMono; + src: url('../res/fonts/NotoMono-Regular.woff') format("woff"); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-display: swap; + font-family: NotoMono; + src: url('../res/fonts/CourierNew-Regular.woff2') format("woff2"); + font-weight: 400; + font-style: normal; + unicode-range: U+0590-06FF; +} \ No newline at end of file diff --git a/src/styles/help.scss b/src/styles/help.scss deleted file mode 100644 index a95e41d34..000000000 --- a/src/styles/help.scss +++ /dev/null @@ -1,17 +0,0 @@ -.main.grid { - .icon { - display: inline-block; - border: none; - background-color: inherit; - font-size: 1.3em; - } - - .undo, - .redo { - font-size: 0.8em; - } - - .save { - font-size: 1em; - } -} diff --git a/src/styles/hints.scss b/src/styles/hints.scss deleted file mode 100644 index 5b8ff0251..000000000 --- a/src/styles/hints.scss +++ /dev/null @@ -1,80 +0,0 @@ -#hints { - position: fixed; - top: 0; - left: 0; - padding: 0; - margin: 0; - border-radius: 0 0 4px 4px; - background-color: rgb(255, 255, 255); - background-color: var(--secondary-color); - color: rgb(37, 37, 37); - color: var(--text-color); - box-shadow: 0 0 4px rgba(0, 0, 0, 0.2); - box-shadow: 0 0 4px var(--box-shadow-color); - border: solid 1px transparent; - border: solid 1px var(--popup-border-color); - height: fit-content; - min-height: 30px; - z-index: 999; - overflow-y: auto; - - &.bottom { - border-radius: 4px 4px 0 0; - } - - [action='hint'] { - height: 30px; - display: flex; - align-items: center; - box-sizing: border-box; - padding: 0 10px; - overflow-x: hidden; - text-overflow: ellipsis; - - &.active { - background-color: rgb(51, 153, 255); - color: rgb(255, 255, 255); - } - - &:not(:last-child) { - border-bottom: solid 1px rgb(204, 204, 204); - } - } - - &.loading { - min-height: 40px; - padding: 10px; - box-sizing: border-box; - overflow: hidden; - display: flex; - align-items: center; - justify-content: center; - - &::after { - content: ''; - display: block; - height: 18px; - width: 18px; - border-radius: 50%; - border: solid 4px rgb(37, 37, 37); - border: solid 4px var(--text-color); - border-bottom: solid 4px rgba($color: #000000, $alpha: 0) !important; - margin: auto; - animation: rotate 1s linear infinite !important; - - @keyframes rotate { - 0% { - transform: rotate(0deg) translateZ(0); - } - - 100% { - transform: rotate(360deg) translateZ(0); - } - } - } - } - - &:empty { - display: none; - } -} diff --git a/src/styles/keyframes.scss b/src/styles/keyframes.scss new file mode 100644 index 000000000..64ce29af4 --- /dev/null +++ b/src/styles/keyframes.scss @@ -0,0 +1,204 @@ +@keyframes circular-loader-animation { + to { + transform: rotate(360deg); + } +} + +@keyframes linear-loader-animation { + 0% { + background-color: rgb(0, 0, 0); + transform: scale3d(0, 1, 1); + } + + 50% { + background-color: rgb(255, 255, 255); + transform: scale3d(4, 1, 1); + } + + 100% { + background-color: rgb(0, 0, 0); + transform: scale3d(0, 1, 1); + } +} + +@keyframes show-searchbar { + from { + opacity: 0; + transform: translate3d(0, -100%, 0); + } + + to { + opacity: 1; + transform: translate3d(0, 0, 0); + } +} + +@keyframes show-sidebar { + 0% { + transform: translate(-100%, 0); + } + + 100% { + transform: translate(0, 0); + } +} + +@keyframes menu-grow { + 0% { + transform: scale(0) translateZ(0); + opacity: 0; + } + + 80% { + opacity: 1; + } + + 100% { + transform: scale(1) translateZ(0); + } +} + +@keyframes scrollbar-show { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes slide-up { + 0% { + transform: translateY(100%); + } + + 100% { + transform: translateY(0); + } +} + +@keyframes hide-loader { + from { + transform: translateX(-50%) translateY(0) scale3d(1, 1, 1); + opacity: 1; + } + + to { + transform: translateX(-50%) translateY(-100%) scale3d(0.5, 0.5, 1); + opacity: 0; + } +} + +@keyframes appear { + from { + transform: translateX(-50%) translateY(-100%) scale3d(0.5, 0.5, 1); + opacity: 0.5; + } + + to { + transform: translateX(-50%) translateY(0) scale3d(1, 1, 1); + opacity: 1; + } +} + +@keyframes sake { + 90% { + transform: translate3d(0, 0, 0); + } + + 93% { + transform: translate3d(-10px, 0, 0); + } + + 97% { + transform: translate3d(10px, 0, 0); + } + + 100% { + transform: translate3d(0, 0, 0); + } +} + +@keyframes move-around { + 0% { + transform: scaleX(1) translate3d(-100px, 0, 0); + background-color: rgb(211, 106, 106); + } + + 25% { + background-color: rgb(157, 211, 106); + } + + 50% { + transform: scaleX(1) translate3d(100px, 0, 0); + background-color: rgb(211, 106, 197); + } + + 75% { + background-color: rgb(130, 106, 211); + } + + 100% { + transform: scaleX(1) translate3d(-100px, 0, 0); + background-color: rgb(211, 106, 106); + } +} + +@keyframes slow-appear { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes strech { + from { + opacity: 0; + transform: scale(0, 1); + } + + to { + opacity: 1; + transform: scale(1, 1); + } +} + +@keyframes page-transition { + 0% { + opacity: 0; + transform: translate3d(0, 50%, 0); + } + + 100% { + opacity: 1; + transform: translate3d(0, 0, 0); + } +} + +@keyframes page-transition-opacity { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes float-appear { + 0% { + opacity: 0; + box-shadow: none; + transform: scale(0.6) rotate(360deg) translateZ(0); + } + + 100% { + opacity: 1; + box-shadow: none; + transform: scale(1) rotate(0deg) translateZ(0); + } +} \ No newline at end of file diff --git a/src/styles/list.scss b/src/styles/list.scss index e47c71c80..3de6ea01e 100644 --- a/src/styles/list.scss +++ b/src/styles/list.scss @@ -1,272 +1,280 @@ -.list { - width: 100%; - - &:not(.collaspable) { - overflow-y: auto; - } - - &.collaspable { - &.hidden { - ul { - display: none; - } - - > .tile { - > .folder::before { - content: '\e92c' !important; - } - - > .indicator::before { - content: '\e9bd' !important; - } - } - } - - > .tile { - position: relative; - height: 30px; - font-size: 1em; - - background-color: rgba($color: #000000, $alpha: 0.1); - - &.loading::after { - content: ''; - position: absolute; - bottom: 0; - left: 0; - right: 0; - margin: 0 auto; - width: 30%; - height: 2px; - background-color: rgb(0, 0, 0); - animation: move ease 1s infinite; - border-radius: 1px; - - @keyframes move { - 0% { - background-color: rgb(0, 0, 0); - transform: scale3d(0, 1, 1); - } - - 50% { - background-color: rgb(255, 255, 255); - transform: scale3d(4, 1, 1); - } - - 100% { - background-color: rgb(0, 0, 0); - transform: scale3d(0, 1, 1); - } - } - } - - > .folder::before { - content: '\e92d'; - } - - > .indicator::before { - content: '\e9a6'; - } - - .octicon, - .icon { - height: 30px; - min-width: 30px; - } - } - - ul { - list-style: none; - padding-left: 10px; - box-sizing: border-box; - - > .tile { - height: 30px; - - .octicon, - .icon { - height: 28px; - min-width: 28px; - font-size: 1em; - } - } - - .collaspable { - > .tile { - background-color: transparent; - } - } - } - - .icon.lang { - padding-right: 5px; - font-family: 'Roboto', sans-serif; - font-weight: bolder; - color: rgb(37, 37, 37); - color: var(--text-color); - font-weight: 900; - text-transform: uppercase; - } - } - - > .list-item { - display: flex; - min-height: 60px; - text-decoration: none; - max-width: 600px; - margin: auto; - box-sizing: border-box; - - &.disabled { - pointer-events: none; - opacity: 0.8; - } - - &.no-transform { - .value { - text-transform: none !important; - } - } - - &:not(:last-of-type) { - border-bottom: solid 1px rgba(122, 122, 122, 0.227); - border-bottom: solid 1px var(--border-color); - } - - &:first-child { - .container .value { - text-transform: none; - } - } - - .container { - flex: 1; - display: flex; - flex-direction: column; - overflow: hidden; - - .text { - flex: 1.2; - display: flex; - align-items: center; - - span { - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - } - } - - .value { - flex: 0.8; - display: flex; - align-items: center; - opacity: 0.6; - text-transform: capitalize; - - &.nc { - text-transform: none; - } - } - } - - .octicon, - .icon { - height: 60px; - width: 60px; - - &.no-icon { - width: 20px; - } - } - - .icon { - font-size: 1.4em; - } - - *:not([action]) { - pointer-events: none; - } - } -} - -ul { - list-style: none; - - &.list { - overflow-x: hidden; - overflow-y: auto; - - li { - max-width: 600px; - margin: auto; - box-sizing: border-box; - - &.tile { - .icon { - &.file { - background-position: center; - background-size: 30px; - } - - &.folder { - color: rgb(206, 206, 53); - } - } - - .text { - span { - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - } - } - } - - *:not([action]) { - pointer-events: none; - overflow: hidden; - } - - &.tile:active { - transition: all 300ms ease; - background-color: rgba($color: #000000, $alpha: 0.2); - } - - &:last-child { - border-bottom: solid 4px rgba(122, 122, 122, 0.227); - border-bottom: solid 4px var(--border-color); - } - } - - li:last-child { - border-bottom: none; - } - } -} - -.list { - &:empty, - &.empty { - display: flex; - align-items: center; - justify-content: center; - min-height: 40px; - - &::after { - content: attr(empty-msg); - color: rgb(37, 37, 37); - color: var(--text-color); - text-align: center; - font-weight: 900; - background: transparent; - } - } -} - -.list-item, -.tile { - &:focus { - background-color: rgba($color: #000000, $alpha: 0.2); - } -} +@use "./mixins.scss"; + +.list { + width: 100%; + + &:not(.collapsible) { + overflow-y: auto; + } + + &.collapsible { + &.hidden { + ul { + display: none; + } + + >.tile { + >.folder::before { + content: "\e92c" !important; + } + + >.indicator::before { + content: "\e9bd" !important; + } + } + } + + >.tile { + position: relative; + height: 36px; + font-size: 1em; + + background-color: rgba($color: #000000, $alpha: 0.1); + + &.loading { + @include mixins.linear-loader(30%, 2px); + } + + >.folder::before { + content: "\e92d"; + } + + >.indicator::before { + content: "\e9a6"; + } + + .icon { + height: 36px; + min-width: 36px; + font-size: 1.15em; + } + } + + ul { + list-style: none; + padding-left: 10px; + box-sizing: border-box; + + >.tile { + height: 34px; + + .icon { + height: 34px; + min-width: 34px; + font-size: 1.1em; + } + } + + .collapsible { + >.tile { + background-color: transparent; + } + } + } + + .icon.lang { + padding-right: 5px; + font-family: "Roboto", sans-serif; + font-weight: bolder; + color: rgb(37, 37, 37); + color: var(--secondary-text-color); + font-weight: 900; + text-transform: uppercase; + } + } + + >.list-item { + display: flex; + min-height: 60px; + text-decoration: none; + margin: auto; + box-sizing: border-box; + + &.disabled { + pointer-events: none; + opacity: 0.8; + } + + &.no-transform { + .value { + text-transform: none !important; + } + } + + &:not(:last-of-type) { + border-bottom: solid 1px rgba(122, 122, 122, 0.227); + border-bottom: solid 1px var(--border-color); + } + + &:first-child { + .container .value { + text-transform: none; + } + } + + .container { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; + + .text { + flex: 1.2; + display: flex; + align-items: center; + + .info-button { + opacity: 0.5; + width: fit-content; + height: fit-content; + margin-left: 10px; + font-size: 0.8rem; + } + + button { + background-color: rgb(51, 153, 255); + background-color: var(--button-background-color); + color: rgb(255, 255, 255); + color: var(--button-text-color); + border: none; + border-radius: 4px; + margin: 0 10px; + font-size: 0.6rem; + padding: 5px; + box-sizing: border-box; + } + + .text { + span { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + } + } + } + + .value { + flex: 0.8; + display: flex; + align-items: center; + opacity: 0.6; + + &.nc { + text-transform: none; + } + } + } + + .icon { + height: 60px; + width: 60px; + + &.no-icon { + width: 20px; + } + } + + .icon { + font-size: 1.4em; + } + + * { + pointer-events: none; + } + + [data-action], + [action], + a { + pointer-events: all !important; + } + } +} + +ul { + list-style: none; + + &.list { + overflow-x: hidden; + overflow-y: auto; + + li { + // max-width: 600px; + margin: auto; + box-sizing: border-box; + + &.tile { + .icon { + &.file { + background-position: center; + background-size: 34px; + } + + &.folder { + color: rgb(206, 206, 53); + } + } + + .text { + span { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + } + } + } + + * { + pointer-events: none; + overflow: hidden; + } + + [data-action], + [action], + a { + pointer-events: all !important; + overflow: auto !important; + } + + &.tile:active { + transition: all 300ms ease; + background-color: rgba($color: #000000, $alpha: 0.2); + } + + &:last-child { + border-bottom: solid 4px rgba(122, 122, 122, 0.227); + border-bottom: solid 4px var(--border-color); + } + } + + li:last-child { + border-bottom: none; + } + } +} + +.list { + + &:empty, + &.empty { + display: flex; + align-items: center; + justify-content: center; + min-height: 40px; + + &::after { + content: attr(empty-msg); + color: rgb(37, 37, 37); + color: var(--secondary-text-color); + text-align: center; + font-weight: 900; + background: transparent; + } + } +} + +.list-item, +.tile { + &:focus { + background-color: rgba($color: #000000, $alpha: 0.2); + } +} \ No newline at end of file diff --git a/src/styles/main.scss b/src/styles/main.scss deleted file mode 100644 index 5fee70343..000000000 --- a/src/styles/main.scss +++ /dev/null @@ -1,850 +0,0 @@ -@import './searchBar.scss'; -@import './hints.scss'; -@import './fileInfo.scss'; - -* { - margin: 0; - padding: 0; - - &:focus { - outline: none; - } -} - -html { - overflow: auto; -} - -html, -body { - width: 100%; - height: 100%; -} - -body { - user-select: none; - font-family: 'Roboto', sans-serif; - -webkit-tap-highlight-color: transparent; - background-color: #9999ff; - background-color: var(--primary-color); - color: #252525; - color: var(--text-color); - - &.no-animation * { - animation: none !important; - transition: none !important; - box-shadow: none !important; - } - - &:not(.loading).title-loading { - &.title-loading-hide { - &::after { - background-image: none; - transform: translateX(-50%) translateY(-100%) scale3d(0.5, 0.5, 1); - opacity: 0; - animation: hide-loader 100ms ease-in 1; - @keyframes hide-loader { - from { - transform: translateX(-50%) translateY(0) scale3d(1, 1, 1); - opacity: 1; - } - to { - transform: translateX(-50%) translateY(-100%) scale3d(0.5, 0.5, 1); - opacity: 0; - } - } - } - } - - &::after { - content: ''; - background-color: #3333ff; - background-color: var(--primary-color); - border-radius: 50%; - position: fixed; - height: 40px; - width: 40px; - top: 6px; - left: 50%; - transform: translateX(-50%); - background-image: url(file:///android_asset/www/res/tail-spin.svg); - background-image: var(--tail-spin); - background-repeat: no-repeat; - background-position: center; - background-size: 30px; - box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2); - box-shadow: 0 0 4px 0 var(--box-shadow-color); - border: solid 1px transparent; - border: solid 1px var(--popup-border-color); - animation: appear 100ms ease-out 1; - box-sizing: border-box; - z-index: 999; - - @keyframes appear { - from { - transform: translateX(-50%) translateY(-100%) scale3d(0.5, 0.5, 1); - opacity: 0.5; - } - to { - transform: translateX(-50%) translateY(0) scale3d(1, 1, 1); - opacity: 1; - } - } - } - } - - .main { - position: relative; - } -} - -a { - color: #615efd; - color: var(--a-color); -} - -.open-file-list { - position: absolute; - top: 44px; - top: calc(var(--header-height)); - height: 31px; - width: 100%; - background-color: #9999ff; - background-color: var(--primary-color); - overflow-x: auto !important; - overflow-y: hidden !important; - display: flex; - flex-direction: row !important; - color: white; - color: var(--text-main-color); - z-index: 5; - - li.tile { - height: calc(100% - 1px); - overflow: hidden; - font-size: 0.8em; - align-items: center; - margin: 0; - margin-top: auto; - padding: 0; - color: inherit; - min-width: 110px; - max-width: 110px; - - .text { - display: inline-block; - white-space: nowrap; - max-width: 180px; - overflow: hidden; - text-overflow: ellipsis; - margin: 0; - padding: 0; - color: inherit; - } - - &.select { - position: absolute; - left: 0; - top: 0; - } - - &.notice { - &::before { - content: '•'; - color: #ffda0c; - font-size: 1.5em; - margin-left: 2.5px; - text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5); - } - } - - &.active { - border-top: solid 2px gold; - background-color: rgba(0, 0, 0, 0.2); - } - - .file, - .icon { - height: 24px; - width: 24px; - font-size: 1em; - background-size: 22px; - background-position: center; - color: inherit; - } - } -} - -a.icon { - pointer-events: all !important; - color: white; - - &:focus, - &:active { - border: none; - outline: none; - } -} - -#ad { - border-radius: 4px; - background-color: white; - color: #232323; - display: flex; - flex-direction: column; - width: calc(100% - 10px); - max-width: 600px; - margin: 0 auto; - box-sizing: border-box; - box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.2); - box-shadow: 0 0 4px 0 var(--box-shadow-color); - padding-bottom: 10px; - - .heading { - margin-top: -5px; - height: 40px; - display: flex; - align-items: center; - justify-content: space-between; - font-size: 1.4rem; - - .text { - font-weight: 400; - margin: 0 10px; - } - - .icon { - font-size: 1.2rem; - height: 30px; - width: 30px; - margin: 5px; - } - } - - a { - text-decoration: none; - color: inherit; - } - - .ad-body { - display: flex; - - .image { - min-height: fit-content; - min-width: fit-content; - margin: auto; - - img { - margin: 0 5px; - max-width: 100px; - border-radius: 4px; - } - } - - .content { - margin-right: 5px; - display: flex; - flex-direction: column; - - .title { - font-weight: 500; - text-transform: none; - } - - .description { - text-transform: none; - white-space: pre-wrap; - font-size: 0.92rem; - } - } - } -} - -.no-scroll { - &::-webkit-scrollbar { - width: 0px; - height: 0px; - } -} - -.list, -.prompt, -.scroll { - &::-webkit-scrollbar { - width: 4px; - height: 4px; - } - - &::-webkit-scrollbar-track { - background: transparent; - } - - &::-webkit-scrollbar-thumb { - background: rgba(0, 0, 0, 0.333); - background: var(--scrollbar-color); - border-radius: 2px; - } -} - -.octicon, -.icon { - user-select: none; - display: flex; - align-items: center; - justify-content: center; - border-radius: 50%; - text-decoration: none; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - background-position: center; - background-size: 24px; - background-repeat: no-repeat; - - &.hidden { - display: none !important; - } - - &.color { - display: flex; - - &::before { - content: ''; - height: 16px; - width: 16px; - border: solid 1px #a90000; - border: solid 1px var(--accent-color); - background-color: currentColor; - color: inherit !important; - } - - &.dark { - color: #252525; - } - - &.light { - color: #ffffff; - } - } - - &.notice { - position: relative; - - &::after { - content: '•'; - position: absolute; - top: 5px; - right: 5px; - color: #ffda0c; - font-size: 1.4em; - height: fit-content; - line-height: 4px; - text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5); - } - } - - &.angularjs::before { - content: '\e92f'; - color: #dd0031; - } - - &.html::before { - content: '\e939'; - color: #e34f26; - } - - &:focus { - border: solid 1px rgba(255, 238, 0, 0.5); - box-sizing: border-box; - height: calc(100% - 2px); - } - - &.disabled { - opacity: 0.6; - pointer-events: none; - } - - &.dull { - opacity: 0.6; - } - - &:not(.floating):active { - transition: all 100ms ease; - background-color: rgba(0, 0, 0, 0.2) !important; - } - - &.active { - background-color: rgba(0, 0, 0, 0.2) !important; - background-color: var(--active-icon-color) !important; - } - - &.foxdebug { - background-image: url(file:///android_asset/www/res/logo/favicon.ico); - } - - &.no-icon { - max-width: 10px; - } -} - -.mask { - position: fixed; - left: 0; - top: 0; - display: block; - height: 100vh; - width: 100vw; - background-color: black; - opacity: 0; -} - -footer { - &.button-container, - .button-container { - overflow-x: auto; - - .section{ - max-width: 100%; - min-width: 100%; - } - - background-color: #9999ff; - background-color: var(--primary-color); - color: white; - color: var(--text-main-color); - } -} - -.section, -.button-container { - display: flex; - min-height: 40px; - min-height: var(--footer-height); - background-color: inherit; - color: inherit; - user-select: none; - width: 100%; - - &.primary { - button { - color: white !important; - color: var(--button-text-color) !important; - background-color: #39f !important; - background-color: var(--button-background-color) !important; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.2); - box-shadow: 0 0 4px var(--box-shadow-color); - border-radius: 4px; - - &:active { - background-color: #2c8ef0 !important; - background-color: var(--button-active-color) !important; - box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); - box-shadow: inset 0 0 2px var(--box-shadow-color); - } - } - } - - &.disabled { - pointer-events: none; - - .icon, - input, - button { - opacity: 0.6; - } - } - - > button { - flex: 1; - display: inline-flex; - align-items: center; - justify-content: center; - border: none; - text-transform: uppercase; - background-color: inherit; - color: inherit; - - * { - pointer-events: none; - } - - &.disabled { - pointer-events: none; - opacity: 0.6; - } - - &:active { - transition: all 100ms ease; - box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2); - box-shadow: inset 0 0 4px var(--box-shadow-color); - } - - &:disabled { - opacity: 0.6; - } - } - - textarea, - input { - flex: 2; - height: unset; - color: inherit; - border-bottom: 1px solid currentColor; - margin: 5px; - background-color: inherit; - - &::placeholder { - color: rgba(255, 255, 255, 0.6); - } - } - - .icon { - color: inherit; - font-size: 1.3em; - } - - .search, - .save { - font-size: 1em; - } -} - -input { - height: 40px; - outline: none; - border: none; - background-color: inherit; - border-bottom: solid 1px #252525; - border-bottom: solid 1px var(--text-color); - padding: 0; - box-sizing: border-box; - color: #252525; - color: var(--text-color); - text-indent: 10px; - - ::placeholder { - color: #252525; - color: var(--text-color); - opacity: 0.5; - } - - &:focus { - border-bottom-color: #a90000 !important; - border-bottom-color: var(--accent-color) !important; - } -} - -input, -textarea { - &::placeholder { - color: #252525; - color: var(--text-color); - opacity: 0.8; - text-transform: lowercase; - } -} - -.search-status { - flex: 1; - display: flex; - color: white; - color: var(--text-main-color); - align-items: center; - justify-content: center; - - span:not(:nth-child(2)) { - margin: 0 5px; - color: white; - color: var(--text-main-color); - } -} - -.cursor-control { - position: fixed; - top: 0; - left: 0; - display: block; - height: 20px; - width: 20px; - border-radius: 50%; - background-color: white; - background-color: var(--text-main-color); - box-shadow: 0 0 2px rgba(0, 0, 0, 0.2); - box-shadow: 0 0 2px var(--box-shadow-color); - z-index: 4; - - &.large { - height: 30px; - width: 30px; - } - - &.none { - display: none; - } - - &.end { - border-radius: 0% 50% 50% 50%; - } - - &.start { - border-radius: 50% 0 50% 50%; - } -} - -.clipboard-contextmneu { - position: fixed; - top: 0; - left: 0; - background-color: #ffffff; - background-color: var(--secondary-color); - display: flex; - border-radius: 4px; - box-shadow: 0 0 8px rgba(0, 0, 0, 0.2); - box-shadow: 0 0 8px var(--box-shadow-color); - border: none; - border: var(--clipboard-menu-border); - color: #252525; - color: var(--text-color); - z-index: 4; - - > span { - display: inline-block; - height: 30px; - line-height: 30px; - margin: 5px 0; - padding: 0 5px; - font-size: 0.9em; - min-width: 67px; - text-align: center; - color: inherit; - user-select: none; - white-space: nowrap; - - &:not(:last-child) { - border-right: solid 0.5px currentColor; - } - - &.disabled { - opacity: 0.6; - pointer-events: none; - } - } -} - -.file { - display: flex; - align-items: center; - justify-content: center; - background-repeat: no-repeat; - background-position: 6px center; - background-size: 18px; - width: 30px; - height: 30px; -} - -.hr { - display: flex; - align-items: center; - margin: auto auto 15px auto; - - &::after, - &::before { - content: ''; - height: 1px; - width: 60px; - background-color: #252525; - background-color: var(--text-color); - margin: auto 15px; - opacity: 0.5; - } -} - -.d-none { - display: none !important; -} - -.input-checkbox { - display: inline-flex; - align-items: center; - - input { - display: none; - } - - .box { - display: flex; - height: 1.2rem; - width: 1.2rem; - border-radius: 4px; - border: solid 1px #252525; - border: solid 1px var(--text-color); - margin: 0 5px; - - &::after { - content: ''; - display: block; - height: 80%; - width: 80%; - background-color: #3399ff; - background-color: var(--button-background-color); - margin: auto; - border-radius: 2px; - } - } - - input:checked { - & + .box::after { - opacity: 1; - } - } - - input:not(:checked) { - & + .box::after { - opacity: 0; - } - } -} - -.floating.icon { - position: fixed; - height: 40px; - width: 40px; - font-size: 1.8rem; - border: 1px solid; - background-color: #9999ff; - background-color: var(--primary-color); - top: 10px; - right: 10px; - opacity: 0.2; - box-sizing: border-box; - color: white; - color: var(--text-main-color); - transition: all 300ms ease; - - &.hide { - opacity: 0 !important; - } -} - -#social-links { - position: relative; - height: 60px; - font-size: 1.2em; - width: 100%; - text-align: center; - - &::after { - display: block; - width: 100%; - content: attr(title); - text-align: center; - font-size: 0.5em; - text-transform: none; - } - - a { - display: inline-flex; - min-height: 40px; - min-width: 40px; - text-shadow: 0 0 1px white; - - &.github { - color: black; - } - } -} - -#header-toggler { - display: none; - top: 10px; - right: 10px; -} - -#quicktool-toggler { - top: auto; - bottom: 10px; - right: 10px; -} - -#toast { - position: fixed; - bottom: 10px; - left: 0; - right: 0; - margin: 0 auto; - background-color: rgba(9, 14, 29, 0.9); - box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.5); - color: white; - font-size: 0.8rem; - font-weight: 300; - display: flex; - align-items: center; - justify-content: center; - padding: 10px; - max-height: 50vh; - max-width: 80vw; - width: fit-content; - overflow: auto; - animation: slow-appear 500ms linear 1; - z-index: 9999; - border-radius: 4px; - pointer-events: none; - - &.hide { - transition: all 1s linear; - opacity: 0; - } -} - -.sake{ - animation: sake 3s ease-out infinite; -} - -@keyframes sake { - 90%{ - transform: translate3d(0, 0, 0); - } - 93%{ - transform: translate3d(-10px, 0, 0); - } - 97%{ - transform: translate3d(10px, 0, 0); - } - 100%{ - transform: translate3d(0, 0, 0); - } -} - -@keyframes move-around { - 0% { - transform: scaleX(1) translate3d(-100px, 0, 0); - background-color: rgb(211, 106, 106); - } - - 25% { - background-color: rgb(157, 211, 106); - } - - 50% { - transform: scaleX(1) translate3d(100px, 0, 0); - background-color: rgb(211, 106, 197); - } - - 75% { - background-color: rgb(130, 106, 211); - } - - 100% { - transform: scaleX(1) translate3d(-100px, 0, 0); - background-color: rgb(211, 106, 106); - } -} - -@keyframes slow-appear { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} diff --git a/src/styles/markdown.scss b/src/styles/markdown.scss new file mode 100644 index 000000000..f643f9a8e --- /dev/null +++ b/src/styles/markdown.scss @@ -0,0 +1,484 @@ +:root { + --color-note: #2f81f7; + --color-tip: #3fb950; + --color-warning: #d29922; + --color-severe: #db6d28; + --color-caution: #f85149; + --color-important: #a371f7; +} + +.md { + a { + color: #0645ad; + text-decoration: none; + } + + a:visited { + color: #0b0080; + } + + a:hover { + color: #06e; + } + + a:active { + color: #faa700; + } + + a:focus { + outline: thin dotted; + } + + a:hover, + a:active { + outline: 0; + } + + ::-moz-selection { + background: rgba(255, 255, 0, 0.3); + color: #000; + } + + ::selection { + background: rgba(255, 255, 0, 0.3); + color: #000; + } + + a::-moz-selection { + background: rgba(255, 255, 0, 0.3); + color: #0645ad; + } + + a::selection { + background: rgba(255, 255, 0, 0.3); + color: #0645ad; + } + + p { + margin: 1em 0; + } + + img { + max-width: 100%; + } + + h1 { + margin: 0.67em 0; + font-weight: 600; + padding-bottom: 0.3em; + font-size: 2em; + border-bottom: 1px solid #bb800926; + } + + h2 { + font-weight: 600; + padding-bottom: 0.3em; + font-size: 1.5em; + border-bottom: 1px solid #3d444db3; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + margin-top: 1.5rem; + margin-bottom: 1rem; + font-weight: 600; + line-height: 1.25; + } + + h3 { + font-weight: 600; + font-size: 1.25em; + } + + h4 { + font-weight: 600; + font-size: 1em; + } + + h5 { + font-weight: 600; + font-size: 0.875em; + } + + h6 { + font-weight: 600; + font-size: 0.85em; + color: #9198a1; + } + + blockquote { + margin: 0; + padding: 0 1em; + color: #9198a1; + border-left: 0.25em solid #3d444d; + } + + hr { + display: block; + height: 0; + border: 0; + border-top: 1px solid var(--border-color, #3d444d); + margin: 1.5em 0; + padding: 0; + } + + pre, + code, + samp { + color: rgb(107, 107, 107); + font-family: monospace, monospace; + _font-family: "courier new", monospace; + font-size: 0.98em; + padding: 0.25rem; + } + + kbd { + display: inline-block; + padding: 0.25rem; + font: + 11px ui-monospace, + SFMono-Regular, + SF Mono, + Menlo, + Consolas, + Liberation Mono, + monospace; + line-height: 10px; + color: #f0f6fc; + vertical-align: middle; + background-color: #151b23; + border: solid 1px #3d444db3; + border-bottom-color: #3d444db3; + border-radius: 6px; + box-shadow: inset 0 -1px 0 #3d444db3; + } + + pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + position: relative !important; + } + + pre:hover .copy-button { + opacity: 1; + } + + .copy-button { + position: absolute; + top: 8px; + right: 5px; + padding: 4px 8px; + background: rgba(0, 0, 0, 0.8); + border: none; + border-radius: 4px; + cursor: pointer; + opacity: 0; + transition: opacity 0.2s; + font-size: 12px; + color: inherit; + + &:hover { + background: rgba(0, 0, 0, 0.9); + } + } + + b, + strong { + font-weight: bold; + } + + dfn { + font-style: italic; + } + + ins { + background: #ff9; + color: #000; + text-decoration: none; + } + + mark { + background: #ff0; + color: #000; + font-style: italic; + font-weight: bold; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sup { + top: -0.5em; + } + + sub { + bottom: -0.25em; + } + + ul, + ol { + margin: 1em 0; + padding: 0 0 0 2em; + } + + ul { + list-style-type: disc; + } + + li p:last-child { + margin: 0; + } + + dd { + margin: 0 0 0 2em; + } + + img { + border: 0; + -ms-interpolation-mode: bicubic; + vertical-align: middle; + } + + table { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + margin: 1em 0; + display: block; + overflow-x: auto; + + th, + td { + padding: 8px 12px; + border: 1px solid var(--border-color, #3d444d); + text-align: left; + } + + th { + background-color: rgba(255, 255, 255, 0.05); + font-weight: 600; + } + + tr:nth-child(even) { + background-color: rgba(255, 255, 255, 0.02); + } + + tr:hover { + background-color: rgba(255, 255, 255, 0.05); + } + } + + td { + vertical-align: top; + } + + @media only screen and (min-width: 480px) { + body { + font-size: 14px; + } + } + + @media only screen and (min-width: 768px) { + body { + font-size: 16px; + } + } + + @media print { + * { + background: transparent !important; + color: black !important; + filter: none !important; + -ms-filter: none !important; + } + + body { + font-size: 12pt; + max-width: 100%; + } + + a, + a:visited { + text-decoration: underline; + } + + hr { + height: 1px; + border: 0; + border-bottom: 1px solid black; + } + + a[href]:after { + content: " (" attr(href) ")"; + } + + abbr[title]:after { + content: " (" attr(title) ")"; + } + + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + + blockquote { + border: 1px solid #999; + padding-right: 1em; + page-break-inside: avoid; + } + + tr, + img { + page-break-inside: avoid; + } + + img { + max-width: 100% !important; + } + + @page :left { + margin: 15mm 20mm 15mm 10mm; + } + + @page :right { + margin: 15mm 10mm 15mm 20mm; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h2, + h3 { + page-break-after: avoid; + } + } + + .markdown-alert { + padding: 0.5rem 1rem; + margin-bottom: 16px; + color: inherit; + border-left: 0.25em solid #888; + } + + .markdown-alert> :first-child { + margin-top: 0; + } + + .markdown-alert> :last-child { + margin-bottom: 0; + } + + .markdown-alert .markdown-alert-title { + display: flex; + font-weight: 500; + align-items: center; + line-height: 1; + } + + .markdown-alert .markdown-alert-title .octicon { + margin-right: 0.5rem; + display: inline-block; + overflow: visible !important; + vertical-align: text-bottom; + fill: currentColor; + } + + .markdown-alert.markdown-alert-note { + border-left-color: var(--color-note); + } + + .markdown-alert.markdown-alert-note .markdown-alert-title { + color: var(--color-note); + } + + .markdown-alert.markdown-alert-important { + border-left-color: var(--color-important); + } + + .markdown-alert.markdown-alert-important .markdown-alert-title { + color: var(--color-important); + } + + .markdown-alert.markdown-alert-warning { + border-left-color: var(--color-warning); + } + + .markdown-alert.markdown-alert-warning .markdown-alert-title { + color: var(--color-warning); + } + + .markdown-alert.markdown-alert-tip { + border-left-color: var(--color-tip); + } + + .markdown-alert.markdown-alert-tip .markdown-alert-title { + color: var(--color-tip); + } + + .markdown-alert.markdown-alert-caution { + border-left-color: var(--color-caution); + } + + .markdown-alert.markdown-alert-caution .markdown-alert-title { + color: var(--color-caution); + } + + .task-list-item { + list-style-type: none; + + label { + font-weight: 400; + } + + &.enabled label { + cursor: pointer; + } + + &+.task-list-item { + margin-top: 0.25rem; + } + + .handle { + display: none; + } + + &-checkbox { + margin: 0 0.2em 0.25em -1.4em; + vertical-align: middle; + border-radius: 4px; + cursor: pointer; + } + } + + ul:dir(rtl) .task-list-item-checkbox, + ol:dir(rtl) .task-list-item-checkbox { + margin: 0 -1.6em 0.25em 0.2em; + } + + .contains-task-list { + + &:hover .task-list-item-convert-container, + &:focus-within .task-list-item-convert-container { + display: block; + width: auto; + height: 24px; + overflow: visible; + clip: auto; + } + } +} \ No newline at end of file diff --git a/src/styles/mixins.scss b/src/styles/mixins.scss new file mode 100644 index 000000000..c121f16db --- /dev/null +++ b/src/styles/mixins.scss @@ -0,0 +1,62 @@ +@mixin circular-loader($size) { + display: block; + width: $size; + height: $size; + border-radius: 50%; + border: 3px solid rgb(153, 153, 255); + border: 3px solid var(--popup-icon-color); + border-top-color: transparent; + animation: circular-loader-animation 1s linear infinite; + box-sizing: border-box; +} + +@mixin loader($size) { + display: flex; + align-items: center; + justify-content: center; + + &::after { + content: ''; + @include circular-loader($size); + } +} + +@mixin linear-loader($width, $height) { + &::after { + content: ''; + display: block; + position: absolute; + bottom: 0; + left: 0; + right: 0; + margin: 0 auto; + width: 30%; + height: 2px; + background-color: rgb(0, 0, 0); + animation: linear-loader-animation ease 1s infinite; + border-radius: 1px; + } +} + +@mixin active-icon() { + background-color: inherit !important; + color: rgba(0, 0, 0, 0.2); + color: var(--active-color); + text-shadow: 0 0 0.5rem var(--box-shadow-color); +} + +@mixin icon-badge() { + position: relative; + + &::after { + content: '•'; + position: absolute; + top: 5px; + right: 5px; + color: #ffda0c; + font-size: 1.4em; + height: fit-content; + line-height: 4px; + text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.5); + } +} \ No newline at end of file diff --git a/src/styles/overrideAceStyle.scss b/src/styles/overrideAceStyle.scss index 79dcffff7..7fb00cbeb 100644 --- a/src/styles/overrideAceStyle.scss +++ b/src/styles/overrideAceStyle.scss @@ -1,118 +1,59 @@ -.ace_editor, -.ace_editor * { - font-family: 'Roboto Mono', monospace !important; -} - -.ace_editor.fira-code, -.ace_editor.fira-code * { - -webkit-font-feature-settings: 'liga' on, 'calt' on; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - font-family: 'Fira Code' !important; -} - -main .ace_editor { - textarea { - user-select: none; - - &.ace_text-input { - transform: translate(-100000px, -10000px) !important; - } - } -} - -.ace_prompt_mask { - z-index: 107; - opacity: 0.4; -} - -.ace_editor.ace_autocomplete { - width: 80vw !important; - max-width: 400px !important; -} - -.ace_prompt_wrapper { - position: fixed !important; - top: 0 !important; - right: 0 !important; - left: 0 !important; - margin: 50px auto 0 auto !important; - width: 90vw !important; - max-width: 600px !important; - height: fit-content !important; - z-index: 108 !important; - - .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { - background-color: rgb(153, 153, 255); - background-color: var(--command-palette-background-color); - } - - .ace_prompt_container { - position: relative; - padding: 0; - margin: 0; - overflow: hidden; - box-shadow: 0 0 16px rgba(0, 0, 0, 0.2); - box-shadow: 0 0 16px var(--box-shadow-color); - border: none; - border: var(--command-palette-border); - - > div:first-child { - height: 25px !important; - - .ace_content { - margin-top: 5px; - } - } - - > div:last-child { - width: 90vw !important; - box-sizing: border-box; - } - - .ace_mobile-menu { - display: none; - } - } - - .ace_editor { - background-color: rgb(255, 255, 255); - background-color: var(--secondary-color); - color: rgb(37, 37, 37); - color: var(--text-color); - - box-shadow: 0 16px 16px rgba(0, 0, 0, 0.2); - box-shadow: 0 16px 16px var(--box-shadow-color); - border: none; - border: var(--command-palette-border); - - .ace_cursor { - color: rgb(37, 37, 37); - color: var(--text-color); - } - } - - .ace_active-line { - background-color: rgba($color: #000000, $alpha: 0.5); - } -} - -.ace_tooltip { - max-width: 80vw; - white-space: pre-line; -} - -.ace_scroller.ace_scroll-left { - box-shadow: none !important; -} - -.ace-container { - height: 100%; -} - -.ace-editor { - .ace_text-input { - pointer-events: none !important; - user-select: none !important; - } -} +.ace_mobile-menu, +.ace_tooltip.ace_doc-tooltip { + display: none !important; +} + +.ace_editor { + &[data-font="Fira Code"] { + font-feature-settings: + "liga" on, + "calt" on; + -webkit-font-feature-settings: + "liga" on, + "calt" on; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + unicode-bidi: isolate; + } +} + +.ace_tooltip { + background-color: rgb(255, 255, 255); + background-color: var(--secondary-color); + color: rgb(37, 37, 37); + color: var(--secondary-text-color); + max-width: 68%; + white-space: pre-wrap; +} + +main .ace_editor { + textarea { + user-select: none !important; + pointer-events: none !important; + transform: translate(-100000px, -10000px) !important; + } +} + +.ace-container { + height: 100%; +} + +.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { + background-color: rgba(from var(--active-color) r g b / 0.3); +} + +.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight { + color: var(--popup-active-color); +} + +.ace_dark.ace_editor.ace_autocomplete { + border: 1px solid var(--popup-border-color); + box-shadow: 2px 3px 5px var(--box-shadow-color); + line-height: 1.4; + background: var(--primary-color); + color: var(--primary-text-color); +} + +.ace_hidden-cursors .ace_cursor { + opacity: 0.8 !important; +} diff --git a/src/styles/page.scss b/src/styles/page.scss index bb1286ddd..f77c53eea 100644 --- a/src/styles/page.scss +++ b/src/styles/page.scss @@ -1,474 +1,517 @@ -body { - header { - .icon { - font-size: 1.5em !important; - } - } - - &.no-animation { - footer { - border-top: solid 1px rgba(0, 0, 0, 0.2); - } - - .header, - header { - &.tile { - border-bottom: solid 1px rgba(0, 0, 0, 0.2); - box-sizing: border-box; - } - } - } - - &.fullscreen-mode { - .open-file-list { - height: 30px; - } - - #root { - &:not(.top-bar) { - &.show-header { - #header-toggler { - opacity: 1; - transform: translate3d(-110px, 0, 0); - } - - > header { - top: 10px; - right: 10px; - height: 40px; - display: flex; - border-radius: 20px; - border: solid 1px rgb(255, 255, 255); - border: solid 1px var(--text-main-color); - } - } - - #header-toggler { - display: flex; - } - } - - > header { - display: none; - height: 30px; - - .text { - display: none; - } - - .icon { - height: 28px; - width: 28px; - margin: auto; - - &.menu { - display: none; - } - } - - position: fixed; - top: 0; - right: 0; - left: auto; - width: 100px; - margin: 0; - box-shadow: none; - } - - &.top-bar { - .open-file-list { - top: 0 !important; - width: calc(100% - 100px); - } - - > header { - display: flex; - } - } - - &.page { - &.primary { - &[footer-height='1'] { - &.top-bar { - > main { - height: calc(100vh - 70px); - height: calc(100vh - (var(--footer-height) + 30px)); - min-height: calc(100vh - 70px); - min-height: calc(100vh - (var(--footer-height) + 30px)); - } - } - - > main { - height: calc(100vh - 40px); - height: calc(100vh - var(--footer-height)); - min-height: calc(100vh - 40px); - min-height: calc(100vh - var(--footer-height)); - } - } - - &[footer-height='2'] { - &.top-bar { - main { - height: calc(100vh - 110px); - height: calc(100vh - (var(--footer-height) * 2 + 30px)); - min-height: calc(100vh - 110px); - min-height: calc(100vh - (var(--footer-height) * 2 + 30px)); - } - } - - main { - height: calc(100vh - 80px); - height: calc(100vh - (var(--footer-height) * 2)); - min-height: calc(100vh - 80px); - min-height: calc(100vh - (var(--footer-height) * 2)); - } - } - - &[footer-height='3'] { - &.top-bar { - main { - height: calc(100vh - 170px); - height: calc(100vh - (var(--footer-height) * 3 + 30px)); - min-height: calc(100vh - 170px); - min-height: calc(100vh - (var(--footer-height) * 3 + 30px)); - } - } - - main { - height: calc(100vh - 140px); - height: calc(100vh - (var(--footer-height) * 3)); - min-height: calc(100vh - 140px); - min-height: calc(100vh - (var(--footer-height) * 3)); - } - } - } - - main { - top: 0; - position: fixed; - height: 100vh; - width: 100%; - } - - &.top-bar { - main { - height: calc(100% - 30px); - top: 30px; - } - } - } - } - - #quick-tools { - position: fixed; - } - } - - #root { - &.hide-floating-button { - #quicktool-toggler { - display: none; - } - } - - &.top-bar { - > header { - margin-bottom: 30px; - } - - main { - height: calc(100vh - 75px); - height: calc(100vh - (var(--header-height) + 30px)); - min-height: calc(100vh - 75px); - min-height: calc(100vh - (var(--header-height) + 30px)); - } - } - - main { - position: relative; - - &:empty { - position: fixed; - top: 45px; - top: var(--header-height); - height: calc(100% - 45px); - height: calc(100% - var(--header-height)); - width: 100%; - display: flex; - - &::after { - content: attr(data-empty-msg); - font-weight: 900; - color: rgb(153, 153, 153); - height: fit-content; - max-width: 60vw; - margin: auto; - text-align: center; - font-size: 1.6em; - } - } - } - - header { - position: sticky; - top: 0; - left: 0; - width: 100%; - } - - footer { - position: sticky; - bottom: 0; - left: 0; - width: 100%; - z-index: 98; - background-color: rgb(153, 153, 255); - background-color: var(--primary-color); - padding: 0 1px; - box-sizing: border-box; - - .icon { - border-radius: 0; - } - } - - &.page { - &.primary { - &[footer-height] { - #quicktool-toggler { - &::before { - content: '\e98d'; - } - - opacity: 1; - } - } - - &[footer-height='2'] { - #quicktool-toggler { - transform: translate3d(0, -80px, 0); - } - - &.top-bar { - main { - height: calc(100vh - 155px); - height: calc( - 100vh - (var(--footer-height) * 2 + var(--header-height) + 30px) - ); - min-height: calc(100vh - 155px); - min-height: calc( - 100vh - (var(--footer-height) * 2 + var(--header-height) + 30px) - ); - } - } - - main { - height: calc(100vh - 125px); - height: calc( - 100vh - (var(--footer-height) * 2 + var(--header-height)) - ); - min-height: calc(100vh - 125px); - min-height: calc( - 100vh - (var(--footer-height) * 2 + var(--header-height)) - ); - } - } - - &[footer-height='3'] { - #quicktool-toggler { - transform: translate3d(0, -140px, 0); - } - - &.top-bar { - main { - height: calc(100vh - 215px); - height: calc( - 100vh - (var(--footer-height) * 3 + var(--header-height) + 30px) - ); - min-height: calc(100vh - 215px); - min-height: calc( - 100vh - (var(--footer-height) * 3 + var(--header-height) + 30px) - ); - } - } - - main { - height: calc(100vh - 185px); - height: calc( - 100vh - (var(--footer-height) * 3 + var(--header-height)) - ); - min-height: calc(100vh - 185px); - min-height: calc( - 100vh - (var(--footer-height) * 3 + var(--header-height)) - ); - } - } - } - } - } -} - -div.page { - position: fixed !important; - top: 0; - left: 0; - transform: rotate(0) translate3d(0, 0, 0); - overflow-x: hidden; - overflow-y: auto; - background-color: rgb(255, 255, 255); - background-color: var(--secondary-color); - z-index: 108; - - &:not(.primary) { - animation: page-transition 200ms ease 1; - } - - &:not(#root) { - z-index: 110; - } - - &.primary { - z-index: unset; - } - - .main { - margin: auto; - z-index: 1; - - .navigation { - display: flex; - height: 30px; - border-bottom: solid 1px rgba(122, 122, 122, 0.227); - border-bottom: solid 1px var(--border-color); - box-sizing: border-box; - overflow-x: auto; - - &::after { - content: ''; - display: block; - min-width: 10px; - } - - .nav { - display: flex; - height: 25px; - margin: auto 2.5px; - font-size: 0.8em; - box-sizing: border-box; - align-items: center; - - &::after { - content: attr(text); - border-radius: 4px; - padding: 2.5px; - box-sizing: border-box; - border: solid 1px rgb(51, 51, 51); - background-color: rgb(153, 153, 153); - color: rgb(255, 255, 255); - box-sizing: border-box; - white-space: nowrap; - word-break: keep-all; - box-sizing: border-box; - } - - &:last-of-type::after { - background-color: rgb(49, 72, 146); - } - - &::before { - font-family: 'code-editor-icon'; - content: '\e9bd'; - margin: auto 2.5px; - } - } - } - } -} - -body.fullscreen-mode #root, -.page, -#root { - &[footer-height='1'] { - #quicktool-toggler { - transform: translate3d(0, -40px, 0); - } - - &.top-bar { - > main, - > .main { - height: calc(100vh - 115px); - height: calc( - 100vh - (var(--footer-height) + var(--header-height) + 30px) - ); - min-height: calc(100vh - 115px); - min-height: calc( - 100vh - (var(--footer-height) + var(--header-height) + 30px) - ); - } - } - - > main, - > .main { - height: calc(100vh - 85px); - height: calc(100vh - (var(--footer-height) + var(--header-height))); - min-height: calc(100vh - 85px); - min-height: calc(100vh - (var(--footer-height) + var(--header-height))); - } - } - - footer { - box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2); - box-shadow: 0 -2px 4px var(--box-shadow-color); - } -} - -.page { - height: 100%; - width: 100%; - box-sizing: border-box; - overflow: hidden; - - &.hide { - transition: 300ms ease; - opacity: 0; - transform: translate3d(0, 50%, 0); - } - - main, - .main { - height: calc(100vh - 45px); - height: calc(100vh - var(--header-height)); - min-height: calc(100vh - 45px); - min-height: calc(100vh - var(--header-height)); - } - - .editor-container { - height: 100%; - } -} - -@keyframes page-transition { - 0% { - opacity: 0; - transform: translate3d(0, 50%, 0); - } - - 100% { - opacity: 1; - transform: translate3d(0, 0, 0); - } -} - -@keyframes float-appear { - 0% { - opacity: 0; - box-shadow: none; - transform: scale(0.6) rotate(360deg) translateZ(0); - } - - 100% { - opacity: 1; - box-shadow: none; - transform: scale(1) rotate(0deg) translateZ(0); - } -} +body { + &.no-animation { + footer { + border-top: solid 1px rgba(0, 0, 0, 0.2); + } + + .header, + header { + &.tile { + border-bottom: solid 1px rgba(0, 0, 0, 0.2); + box-sizing: border-box; + } + } + } + + &.fullscreen-mode { + .open-file-list { + height: 30px; + left: 40px; + } + + wc-page { + &#root { + &[open-file-list-pos="bottom"] { + &[footer-height="1"] { + header { + bottom: 40px; + } + + #sidebar-toggler { + bottom: 40px; + } + } + + &[footer-height="2"] { + header { + bottom: 80px; + } + + #sidebar-toggler { + bottom: 80px; + } + } + + &[footer-height="3"] { + header { + bottom: 120px; + } + + #sidebar-toggler { + bottom: 120px; + } + } + + header { + bottom: 0; + top: auto !important; + z-index: 99; + } + + #sidebar-toggler { + bottom: 0; + top: auto !important; + z-index: 99; + transition: none !important; + } + } + + &:not(.top-bar) { + &.show-header { + #header-toggler { + opacity: 1; + transform: translate3d(-110px, 0, 0); + } + + >header { + top: 10px; + right: 10px; + height: 40px; + display: flex; + border-radius: 20px; + border: solid 1px rgb(255, 255, 255); + border: solid 1px var(--primary-text-color); + } + } + + #header-toggler { + display: flex; + } + } + + &.top-bar { + #sidebar-toggler { + top: 0; + left: 0; + height: 30px !important; + width: 40px !important; + opacity: 1; + border-radius: 0; + border: none; + box-shadow: none !important; + } + + .open-file-list { + top: 0; + width: calc(100% - 140px); + } + + >header { + display: flex; + justify-content: flex-end; + + .icon { + margin: 0 5px; + } + } + } + + &.primary { + &.top-bar { + >main { + height: calc(100vh - 30px); + min-height: calc(100vh - 30px); + } + } + + >main { + height: 100vh; + min-height: 100vh; + } + + &[footer-height="1"] { + &.top-bar { + >main { + height: calc(100vh - 70px); + min-height: calc(100vh - 70px); + } + } + + >main { + height: calc(100vh - 40px); + min-height: calc(100vh - 40px); + } + } + + &[footer-height="2"] { + &.top-bar { + main { + height: calc(100vh - 110px); + min-height: calc(100vh - 110px); + } + } + + main { + height: calc(100vh - 80px); + min-height: calc(100vh - 80px); + } + } + + &[footer-height="3"] { + &.top-bar { + main { + height: calc(100vh - 150px); + min-height: calc(100vh - 150px); + } + } + + main { + height: calc(100vh - 120px); + min-height: calc(100vh - 120px); + } + } + } + + header { + display: none; + height: 30px; + position: fixed; + top: 0; + right: 0; + left: auto; + width: 100px; + margin: 0; + box-shadow: none; + + .text { + display: none; + } + + .icon { + height: 28px; + width: 28px; + margin: auto; + + &.menu { + display: none; + } + } + } + + #sidebar-toggler { + display: flex; + } + } + } + } + + header { + .icon { + font-size: 1.5em !important; + } + } +} + +wc-page { + position: fixed !important; + top: 0; + left: 0; + transform: rotate(0) translate3d(0, 0, 0); + overflow-x: hidden; + overflow-y: auto; + background-color: rgb(255, 255, 255); + background-color: var(--secondary-color); + z-index: 108; + height: 100%; + width: 100%; + box-sizing: border-box; + + &[open-file-list-pos="bottom"] { + &#root { + footer { + box-shadow: 0 -32px 4px rgba(0, 0, 0, 0.2); + box-shadow: 0 -32px 4px var(--box-shadow-color); + } + + .open-file-list { + top: auto !important; + bottom: 0; + z-index: 99; + position: absolute; + } + } + + #quicktools-toggler { + margin-bottom: 30px; + } + } + + .main { + >.options { + display: flex; + height: 40px; + min-height: 40px; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 4px var(--box-shadow-color); + + >* { + position: relative; + display: flex; + flex: 1; + align-items: center; + justify-content: center; + box-sizing: border-box; + + &.active::after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + height: 2px; + width: 100%; + animation: strech 300ms ease 1; + background-color: rgb(51, 153, 255); + background-color: var(--active-color); + } + } + } + } + + &.hide-floating-button { + #quicktools-toggler { + display: none; + } + } + + &[footer-height] { + #quicktools-toggler { + opacity: 1; + } + } + + &[footer-height="1"] { + &[open-file-list-pos="bottom"] { + &#root { + .open-file-list { + bottom: 40px; + } + } + } + + #quicktools-toggler { + transform: translate3d(0, -40px, 0); + } + + &.top-bar { + + main, + .main { + height: calc(100vh - 115px); + min-height: calc(100vh - 115px); + } + } + + main, + .main { + height: calc(100vh - 85px); + min-height: calc(100vh - 85px); + } + } + + &[footer-height="2"] { + &[open-file-list-pos="bottom"] { + &#root { + .open-file-list { + bottom: 80px; + } + } + } + + #quicktools-toggler { + transform: translate3d(0, -80px, 0); + } + + &.top-bar { + + .main, + main { + height: calc(100vh - 155px); + min-height: calc(100vh - 155px); + } + } + + .main, + main { + height: calc(100vh - 125px); + min-height: calc(100vh - 125px); + } + } + + &[footer-height="3"] { + &[open-file-list-pos="bottom"] { + &#root { + .open-file-list { + bottom: 120px; + } + } + } + + #quicktools-toggler { + transform: translate3d(0, -140px, 0); + } + + &.top-bar { + + .main, + main { + height: calc(100vh - 195px); + min-height: calc(100vh - 195px); + } + } + + .main, + main { + height: calc(100vh - 165px); + min-height: calc(100vh - 165px); + } + } + + header { + position: sticky; + top: 0; + left: 0; + width: 100%; + } + + &.top-bar { + main { + height: calc(100vh - 75px); + min-height: calc(100vh - 75px); + } + } + + main { + position: relative; + + &:empty { + position: fixed; + top: 45px; + height: calc(100% - 45px); + width: 100%; + display: flex; + + &::after { + content: attr(data-empty-msg); + font-weight: 900; + color: rgb(153, 153, 153); + height: fit-content; + max-width: 60vw; + margin: auto; + text-align: center; + font-size: 1.6em; + } + } + } + + footer { + position: fixed; + bottom: 0; + left: 0; + width: 100%; + z-index: 98; + background-color: rgb(153, 153, 255); + background-color: var(--primary-color); + padding: 0 1px; + box-sizing: border-box; + box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2); + box-shadow: 0 -2px 4px var(--box-shadow-color); + + .icon { + border-radius: 0; + } + } + + &.primary { + z-index: auto; + } + + &:not(.primary):not(.no-transition) { + animation: page-transition 200ms ease 1; + } + + &.no-transition { + animation: page-transition-opacity 200ms ease 1; + } + + &:not(#root) { + z-index: 110; + } + + &.hide { + transition: 300ms ease; + opacity: 0; + transform: translate3d(0, 50%, 0); + } + + main, + .main { + height: calc(100vh - 45px); + min-height: calc(100vh - 45px); + margin: auto; + z-index: 1; + + .navigation { + display: flex; + height: 30px; + border-bottom: solid 1px rgba(122, 122, 122, 0.227); + border-bottom: solid 1px var(--border-color); + box-sizing: border-box; + overflow-x: auto; + + &::after { + content: ""; + display: block; + min-width: 10px; + } + + .nav { + display: flex; + height: 25px; + margin: auto 1.5px; + font-size: 0.9em; + box-sizing: border-box; + align-items: center; + color: color-mix(in srgb, var(--primary-text-color) 60%, transparent); + transition: color 0.2s; + + &::after { + content: attr(text); + padding: 2.5px; + box-sizing: border-box; + white-space: nowrap; + word-break: keep-all; + cursor: pointer; + } + + &:first-of-type { + margin-left: 10px; + } + + &:last-of-type::after { + color: var(--active-color); + font-weight: 500; + } + + &:not(:first-of-type)::before { + font-family: "code-editor-icon"; + content: "\E99E"; + margin: auto 1.5px; + } + } + } + } + + .editor-container { + height: 100%; + } +} \ No newline at end of file diff --git a/src/styles/searchBar.scss b/src/styles/searchBar.scss deleted file mode 100644 index 882d2a277..000000000 --- a/src/styles/searchBar.scss +++ /dev/null @@ -1,62 +0,0 @@ -#search-bar { - position: fixed; - top: 0; - left: 0; - height: 45px; - height: var(--header-height); - width: 100%; - animation: show 300ms ease 1; - z-index: 200; - background-color: inherit; - display: flex; - - input { - flex: 1; - max-width: 600px; - border-radius: 4px; - box-shadow: rgba(0, 0, 0, 0.2); - box-shadow: var(--box-shadow-color); - border: none; - margin: 5px; - box-sizing: border-box; - - &:focus { - outline: none; - box-shadow: rgba(0, 0, 0, 0.5); - } - - &::-webkit-search-decoration, - &::-webkit-search-cancel-button, - &::-webkit-search-results-button, - &::-webkit-search-results-decoration { - display: none; - } - } - - .icon { - height: 45px; - height: var(--header-height); - width: 45px; - width: var(--header-height); - font-size: 1.2em; - color: rgb(255, 255, 255); - } - - &.hide { - transition: all 300ms ease; - opacity: 0; - transform: translate(0, -100%, 0); - } - - @keyframes show { - from { - opacity: 0; - transform: translate3d(0, -100%, 0); - } - - to { - opacity: 1; - transform: translate3d(0, 0, 0); - } - } -} diff --git a/src/styles/sidenav.scss b/src/styles/sidenav.scss deleted file mode 100644 index c51d47a65..000000000 --- a/src/styles/sidenav.scss +++ /dev/null @@ -1,133 +0,0 @@ -body.no-animation { - #sidenav { - border-right: solid 1px rgba(0, 0, 0, 0.2); - } -} - -#sidenav { - z-index: 109; - position: fixed; - left: 0; - top: 0; - width: 70vw; - max-width: 350px; - height: 100vh; - background-color: rgb(153, 153, 255); - background-color: var(--primary-color); - color: rgb(255, 255, 255); - color: var(--text-main-color); - overflow: hidden; - box-sizing: border-box; - - &.phone { - transition: all 300ms ease; - transform: translate(-100%, 0); - box-shadow: 2px 0 4px rgba(0, 0, 0, 0.07); - } - - &.tab { - max-width: 250px; - } - - &:empty { - display: flex; - align-items: center; - justify-content: center; - - &::after { - content: attr(empty-msg); - color: rgb(255, 255, 255); - color: var(--text-main-color); - font-weight: 900; - opacity: 0.5; - } - } - - display: flex; - flex-direction: column; - - & + .mask { - z-index: 108; - } - - > .list { - max-width: 100%; - max-height: 100%; - - &.hidden { - max-height: 30px !important; - } - - .tile { - &:not(:first-child) { - background-color: inherit; - } - - &.notice { - &::before { - content: '•'; - color: rgb(212, 250, 150); - display: flex; - align-items: center; - justify-content: center; - font-size: 1em; - } - } - } - - .icon { - height: 30px; - width: 30px; - color: currentColor; - font-size: 1em; - } - - > ul { - overflow: auto; - max-width: 100%; - max-height: calc(100% - 30px); - height: calc(100% - 30px); - - .tile:active { - > *:nth-child(2) { - color: rgb(255, 215, 0); - } - } - - li { - > *:nth-child(2) { - color: currentColor; - } - - &.active { - > *:nth-child(2) { - color: rgb(255, 215, 0); - } - } - } - - .list { - min-width: fit-content; - } - } - } - - .tile { - user-select: none; - } - - &.show { - transform: translate(0, 0); - animation: show 300ms ease 1; - } -} - -@keyframes show { - 0% { - transform: translate(-100%, 0); - } - - 100% { - transform: translate(0, 0); - } -} diff --git a/src/styles/themes.scss b/src/styles/themes.scss deleted file mode 100644 index 6dd1022ea..000000000 --- a/src/styles/themes.scss +++ /dev/null @@ -1,214 +0,0 @@ -body { - --tail-spin: url(file:///android_asset/www/res/tail-spin.svg); - --primary-color: rgb(153, 153, 255); - --secondary-color: rgb(255, 255, 255); - --accent-color: rgb(51, 153, 255); - --text-color: rgb(37, 37, 37); - --text-main-color: rgb(255, 255, 255); - --a-color: rgb(97, 94, 253); - --border-color: rgba(122, 122, 122, 0.227); - --border: none; - --error-text-color: rgb(255, 185, 92); - --active-icon-color: rgba(0, 0, 0, 0.2); - --popup-border-color: rgba(0, 0, 0, 0); - --box-shadow-color: rgba(0, 0, 0, 0.2); - --button-background-color: rgb(51, 153, 255); - --button-active-color: rgb(44, 142, 240); - --button-text-color: rgb(255, 255, 255); - --scrollbar-color: rgba(0, 0, 0, 0.333); - --menu-background-color: rgb(255, 255, 255); - --menu-text-color: rgb(37, 37, 37); - --menu-icon-color: rgb(153, 153, 255); - --dialogbox-background-color: rgb(255, 255, 255); - --dialogbox-text-color: rgb(37, 37, 37); - --dialogbox-selected-option-color: rgb(169, 0, 0); - --dialogbox-border-radius: 4px; - --header-height: 45px; - --statusbar-height: 25px; - --footer-height: 40px; - --distance: 10px; - --command-palette-background-color: var(--primary-color); - --command-palette-text-color: var(--text-main-color); - --command-palette-border: none; - --clipboard-menu-border: none; - - &[theme='dark'] { - --primary-color: rgb(49, 49, 49); - --secondary-color: rgb(37, 37, 37); - --text-color: rgb(255, 255, 255); - --text-main-color: rgb(255, 255, 255); - --accent-color: rgb(51, 153, 255); - --a-color: rgb(181, 180, 233); - --border-color: rgba(230, 230, 230, 0.227); - --menu-background-color: rgb(49, 49, 49); - --menu-text-color: rgb(255, 255, 255); - --menu-icon-color: rgb(255, 255, 255); - --dialogbox-background-color: rgb(49, 49, 49); - --dialogbox-text-color: rgb(255, 255, 255); - --dialogbox-selected-option-color: rgb(255, 215, 0); - } - - &[theme='black'] { - --primary-color: rgb(0, 0, 0); - --secondary-color: rgb(0, 0, 0); - --text-color: rgb(255, 255, 255); - --text-main-color: rgb(255, 255, 255); - --accent-color: rgb(56, 56, 56); - --a-color: rgb(181, 180, 233); - --border-color: rgb(124, 124, 124); - --border: solid 1px var(--border-color); - --menu-background-color: rgb(0, 0, 0); - --menu-text-color: rgb(255, 255, 255); - --menu-icon-color: rgb(255, 255, 255); - --dialogbox-background-color: rgb(0, 0, 0); - --dialogbox-text-color: rgb(255, 255, 255); - --dialogbox-selected-option-color: rgb(121, 103, 0); - --box-shadow-color: rgb(0, 0, 0); - --popup-border-color: rgba(255, 255, 255, 0.4); - --active-icon-color: rgba(255, 255, 255, 0.2); - --command-palette-border: var(--border); - --clipboard-menu-border: var(--border); - } - - &[theme='ocean'] { - --primary-color: rgb(32, 32, 44); - --secondary-color: rgb(38, 38, 53); - --text-color: rgb(255, 255, 255); - --text-main-color: rgb(255, 255, 255); - --accent-color: rgb(51, 153, 255); - --a-color: rgb(181, 180, 233); - --border-color: rgb(122, 122, 163); - --menu-background-color: rgb(32, 32, 44); - --menu-text-color: rgb(255, 255, 255); - --menu-icon-color: rgb(255, 255, 255); - --dialogbox-background-color: rgb(32, 32, 44); - --dialogbox-text-color: rgb(255, 255, 255); - --dialogbox-selected-option-color: rgb(255, 215, 0); - --box-shadow-color: rgba(0, 0, 0, 0.502); - } - - &[theme='bump'] { - --primary-color: rgb(48, 56, 65); - --secondary-color: rgb(48, 71, 94); - --text-color: rgb(236, 236, 236); - --text-main-color: rgb(236, 236, 236); - --accent-color: rgb(242, 163, 101); - --a-color: rgb(181, 180, 233); - --border-color: rgb(107, 120, 136); - --menu-background-color: rgb(48, 56, 65); - --menu-text-color: rgb(236, 236, 236); - --menu-icon-color: rgb(236, 236, 236); - --dialogbox-background-color: rgb(48, 56, 65); - --dialogbox-text-color: rgb(236, 236, 236); - --dialogbox-selected-option-color: rgb(255, 215, 0); - --button-background-color: rgb(242, 163, 101); - --button-active-color: rgb(212, 137, 79); - --button-text-color: rgb(236, 236, 236); - } - - &[theme='bling'] { - --primary-color: rgb(32, 32, 64); - --secondary-color: rgb(84, 56, 100); - --text-color: rgb(255, 189, 105); - --text-main-color: rgb(255, 189, 105); - --accent-color: rgb(255, 99, 99); - --a-color: rgb(181, 180, 233); - --border-color: rgb(93, 93, 151); - --menu-background-color: rgb(32, 32, 64); - --menu-text-color: rgb(255, 189, 105); - --menu-icon-color: rgb(255, 189, 105); - --dialogbox-background-color: rgb(32, 32, 64); - --dialogbox-text-color: rgb(255, 189, 105); - --dialogbox-selected-option-color: rgb(51, 153, 255); - --button-background-color: rgb(255, 99, 99); - --button-active-color: rgb(160, 99, 52); - --button-text-color: rgb(255, 189, 105); - } - - &[theme='moon'] { - --primary-color: rgb(34, 40, 49); - --secondary-color: rgb(57, 62, 70); - --text-color: rgb(0, 255, 245); - --text-main-color: rgb(0, 255, 245); - --accent-color: rgb(0, 173, 181); - --a-color: rgb(181, 180, 233); - --border-color: rgb(90, 101, 117); - --menu-background-color: rgb(34, 40, 49); - --menu-text-color: rgb(0, 255, 245); - --menu-icon-color: rgb(0, 255, 245); - --dialogbox-background-color: rgb(34, 40, 49); - --dialogbox-text-color: rgb(0, 255, 245); - --dialogbox-selected-option-color: rgb(51, 153, 255); - --button-background-color: rgb(0, 173, 181); - --button-active-color: rgb(0, 142, 149); - --button-text-color: rgb(0, 255, 245); - } - - &[theme='atticus'] { - --primary-color: rgb(54, 51, 51); - --secondary-color: rgb(39, 33, 33); - --text-color: rgb(246, 233, 233); - --text-main-color: rgb(246, 233, 233); - --accent-color: rgb(225, 100, 40); - --a-color: rgb(181, 180, 233); - --border-color: rgb(117, 111, 111); - --menu-background-color: rgb(54, 51, 51); - --menu-text-color: rgb(246, 233, 233); - --menu-icon-color: rgb(246, 233, 233); - --dialogbox-background-color: rgb(54, 51, 51); - --dialogbox-text-color: rgb(246, 233, 233); - --dialogbox-selected-option-color: rgb(51, 153, 255); - --button-background-color: rgb(225, 100, 40); - --button-active-color: rgb(0, 145, 153); - --button-text-color: rgb(246, 233, 233); - } - - &[theme='tomyris'] { - --primary-color: rgb(59, 9, 68); - --secondary-color: rgb(95, 24, 84); - --text-color: rgb(144, 184, 248); - --text-main-color: rgb(241, 187, 213); - --accent-color: rgb(161, 37, 89); - --a-color: rgb(181, 180, 233); - --border-color: rgb(140, 58, 155); - --menu-background-color: rgb(59, 9, 68); - --menu-text-color: rgb(241, 187, 213); - --menu-icon-color: rgb(241, 187, 213); - --dialogbox-background-color: rgb(59, 9, 68); - --dialogbox-text-color: rgb(241, 187, 213); - --dialogbox-selected-option-color: rgb(51, 153, 255); - --button-background-color: rgb(161, 37, 89); - --button-active-color: rgb(0, 145, 153); - --button-text-color: rgb(241, 187, 213); - } - - &[theme='menes'] { - --primary-color: rgb(53, 57, 65); - --secondary-color: rgb(38, 40, 43); - --text-color: rgb(144, 184, 248); - --text-main-color: rgb(144, 184, 248); - --accent-color: rgb(95, 133, 219); - --a-color: rgb(181, 180, 233); - --border-color: rgb(117, 123, 134); - --menu-background-color: rgb(54, 59, 78); - --menu-text-color: rgb(144, 184, 248); - --menu-icon-color: rgb(144, 184, 248); - --dialogbox-background-color: rgb(54, 59, 78); - --dialogbox-text-color: rgb(144, 184, 248); - --dialogbox-selected-option-color: rgb(51, 153, 255); - --button-background-color: rgb(95, 133, 219); - --button-active-color: rgb(0, 145, 153); - --button-text-color: rgb(144, 184, 248); - } - - &[theme='light'] { - --primary-color: rgb(255, 255, 255); - --secondary-color: rgb(255, 255, 255); - --text-color: rgb(51, 62, 89); - --text-main-color: rgb(51, 62, 89); - --accent-color: rgb(51, 153, 255); - --a-color: rgb(104, 103, 149); - --border-color: rgba(250, 110, 110, 0.133); - --menu-icon-color: rgb(51, 62, 89); - } -} diff --git a/src/styles/tile.scss b/src/styles/tile.scss deleted file mode 100644 index d98ee6435..000000000 --- a/src/styles/tile.scss +++ /dev/null @@ -1,85 +0,0 @@ -.header, -header { - &.tile { - z-index: 98; - height: 45px; - height: var(--header-height); - background-color: rgb(153, 153, 255); - background-color: var(--primary-color); - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); - box-shadow: 0 2px 4px var(--box-shadow-color); - color: rgb(255, 255, 255); - color: var(--text-main-color); - - > .text { - pointer-events: unset !important; - margin: auto; - font-weight: bold; - font-size: 1.2em; - white-space: nowrap; - overflow: auto; - } - } -} - -.tile { - display: flex; - flex-wrap: nowrap; - align-items: center; - padding: 0 5px; - box-sizing: border-box; - - &.select { - pointer-events: none; - border: solid 2px rgb(255, 215, 0); - background-color: inherit !important; - } - - &:disabled, - &.disabled { - opacity: 0.6; - pointer-events: none; - } - - *:not([action]) { - pointer-events: none; - } - - &.cut { - opacity: 0.6; - } - - > .text { - flex: 1; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - - &.sub-text { - display: block; - - &::after { - content: attr(data-subText); - font-size: 0.58em; - opacity: 0.6; - display: block; - position: sticky; - left: 0; - } - } - } - - .octicon, - .icon { - height: 45px; - height: var(--header-height); - width: 45px; - width: var(--header-height); - font-size: 2em; - - &:active { - transition: all 100ms ease; - transform: scale(0.95) translateZ(0); - } - } -} diff --git a/src/styles/wideScreen.scss b/src/styles/wideScreen.scss new file mode 100644 index 000000000..d74235efc --- /dev/null +++ b/src/styles/wideScreen.scss @@ -0,0 +1,424 @@ +@media screen and (min-width: 1024px) { + + html, + body { + font-size: 15px; + } + + .header, + header { + height: 60px; + + >.text { + font-size: 1.4em; + } + } + + .section, + .button-container { + min-height: 45px; + + .icon { + font-size: 1.4em; + } + } + + input { + height: 45px; + font-size: 1.1em; + text-indent: 12px; + } + + .floating.icon { + height: 65px; + width: 65px; + font-size: 2rem; + top: 15px; + right: 15px; + box-shadow: 0 0 2px 4px rgba(0, 0, 0, 0.2); + } + + .context-menu { + min-width: 260px; + max-width: 400px; + min-height: 48px; + + li { + height: 55px; + font-size: 1.05em; + + &.notice::after { + font-size: 1.3em; + } + + .text { + .value { + font-size: 0.85em; + } + } + + .icon { + font-size: 1.1em; + } + } + } + + #search-bar { + height: 50px; + + input { + margin: 8px; + border-radius: 6px; + font-size: 1.1em; + padding: 0 12px; + } + + .icon { + height: 50px; + width: 50px; + font-size: 1.3em; + } + } + + .tile { + .icon { + height: 60px; + width: 60px; + font-size: 2.5em; + background-size: 2em; + } + } + + .prompt { + max-width: 400px; + + &.select { + min-width: 280px; + max-width: 420px; + + ul { + padding: 15px; + + li { + height: 48px; + font-size: 1.1em; + margin: 2px 0; + padding: 0 8px; + + .icon { + font-size: 1.1em; + margin-right: 8px; + } + } + } + } + + ul li { + height: 48px; + font-size: 1.1em; + } + + .title { + font-size: 1.35em; + + &:not(:empty) { + min-height: 48px; + margin: 8px 15px 0 15px; + } + } + + .message { + + .message, + &:not(.loader) { + padding: 15px; + min-height: 48px; + font-size: 1.3em; + } + } + + .input-group { + min-height: 48px; + margin: 4px auto; + max-width: 360px; + + .hero { + height: 48px; + font-size: 1.3em; + } + + .input-checkbox { + height: 48px; + } + } + + .input { + max-width: 360px; + font-size: 1.1em; + margin: 4px auto; + padding: 4px 0; + } + } + + #plugin { + .list-item { + margin: 0 1rem 0.75rem 1rem; + padding: 1.25rem; + border-radius: 16px; + + .plugin-header { + gap: 1.25rem; + min-height: 56px; + + .plugin-icon { + width: 56px; + height: 56px; + border-radius: 14px; + } + + .plugin-info { + gap: 1.25rem; + + .plugin-main { + .plugin-title { + gap: 1rem; + margin-bottom: 0.5rem; + + .plugin-name { + font-size: 1.1rem; + font-weight: 700; + } + + .plugin-version { + font-size: 0.8rem; + padding: 0.3rem 0.6rem; + } + } + + .plugin-meta { + font-size: 0.95rem; + gap: 0.75rem; + + .plugin-stats { + font-size: 0.95rem; + gap: 0.5rem; + + .icon { + width: 16px; + height: 16px; + font-size: 16px; + } + } + } + } + + .plugin-price { + padding: 0.5rem 1rem; + font-size: 0.95rem; + border-radius: 10px; + } + } + } + + .plugin-toggle-switch { + min-width: 140px; + padding: 0.75rem; + + .plugin-toggle-track { + width: 52px; + height: 28px; + border-radius: 14px; + } + + .plugin-toggle-thumb { + width: 24px; + height: 24px; + left: 2px; + top: 2px; + } + + &[data-enabled="true"] .plugin-toggle-thumb { + left: 26px; + } + } + } + } + + #sidebar { + .container { + .header { + height: 100px; + } + + >.list[class] { + &.hidden[class] { + max-height: 40px; + min-height: 40px; + } + + >ul { + max-height: calc(100% - 40px); + height: calc(100% - 40px); + } + } + + &.extensions { + .header { + padding: 12px; + + .title { + min-height: 40px; + font-size: 1.25rem; + + .icon-button { + padding: 0.5rem; + margin-left: 0.5rem; + border-radius: 8px; + min-width: 36px; + min-height: 36px; + font-size: 1.1em; + } + } + + input[type="search"] { + padding: 0.6rem; + font-size: 0.95rem; + } + } + + .tile { + min-height: 40px; + padding: 5px 12px; + + .text { + &.sub-text { + font-size: 0.85rem; + + &::after { + font-size: 0.75rem; + } + } + } + } + + .icon { + background-size: 26px !important; + } + } + + &.notifications { + .header { + height: unset; + } + } + + &.search-in-files { + .header { + min-height: 100px; + height: fit-content; + } + } + } + } + + .list { + &.collapsible { + >.tile { + height: 35px; + font-size: 1.1em; + + .icon { + height: 35px; + min-width: 35px; + } + } + } + + ul { + >.tile { + height: 35px; + + .icon { + height: 32px; + min-width: 32px; + font-size: 1.1em; + } + } + } + + >.list-item { + min-height: 65px; + font-size: 1.1em; + + .icon { + height: 65px; + width: 65px; + font-size: 1.6em; + + &.no-icon { + width: 25px; + } + } + } + } + + w-page { + .main { + >.options { + height: 45px; + min-height: 45px; + font-size: 1.1em; + + >* { + &.active::after { + height: 3px; + } + } + } + } + + &[footer-height="1"] { + #quicktools-toggler { + transform: translate3d(0, -45px, 0); + } + } + + &[footer-height="2"] { + #quicktools-toggler { + transform: translate3d(0, -100px, 0); + } + } + + &[footer-height="3"] { + #quicktools-toggler { + transform: translate3d(0, -150px, 0); + } + } + + main, + .main { + + .navigation { + height: 35px; + + .nav { + height: 30px; + font-size: 1em; + margin: auto 2px; + + &::after { + padding: 3px; + } + + &:first-of-type { + margin-left: 15px; + } + + &:not(:first-of-type)::before { + margin: auto 2px; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/theme/builder.js b/src/theme/builder.js new file mode 100644 index 000000000..293248518 --- /dev/null +++ b/src/theme/builder.js @@ -0,0 +1,352 @@ +import Color from "utils/color"; + +export default class ThemeBuilder { + #theme = { + "--popup-border-radius": "4px", + "--active-color": "rgb(51, 153, 255)", + "--active-text-color": "rgb(255, 215, 0)", + "--active-icon-color": "rgba(0, 0, 0, 0.2)", + "--border-color": "rgba(122, 122, 122, 0.2)", + "--box-shadow-color": "rgba(0, 0, 0, 0.2)", + "--button-active-color": "rgb(44, 142, 240)", + "--button-background-color": "rgb(51, 153, 255)", + "--button-text-color": "rgb(255, 255, 255)", + "--error-text-color": "rgb(255, 185, 92)", + "--primary-color": "rgb(153, 153, 255)", + "--primary-text-color": "rgb(255, 255, 255)", + "--secondary-color": "rgb(255, 255, 255)", + "--secondary-text-color": "rgb(37, 37, 37)", + "--link-text-color": "rgb(97, 94, 253)", + "--scrollbar-color": "rgba(0, 0, 0, 0.3)", + "--popup-border-color": "rgba(0, 0, 0, 0)", + "--popup-icon-color": "rgb(153, 153, 255)", + "--popup-background-color": "rgb(255, 255, 255)", + "--popup-text-color": "rgb(37, 37, 37)", + "--popup-active-color": "rgb(169, 0, 0)", + "--danger-color": "rgb(160, 51, 0)", + "--danger-text-color": "rgb(255, 255, 255)", + "--file-tab-width": "120px", + }; + + version = "free"; + name = "Default"; + type = "light"; + /** Whether Auto update darkened primary color when primary color is updated. */ + autoDarkened = true; + preferredEditorTheme = null; + preferredFont = null; + + /** + * Creates a theme + * @param {string} [name] name of the theme + * @param {'dark'|'light'} [type] type of the theme + * @param {'free'|'paid'} [version] version of the theme + */ + constructor(name = "", type = "dark", version = "free") { + this.name = name; + this.type = type; + this.version = version; + } + + get id() { + return this.name.toLowerCase(); + } + + get popupBorderRadius() { + return this.#theme["--popup-border-radius"]; + } + + set popupBorderRadius(value) { + this.#theme["--popup-border-radius"] = value; + } + + get activeColor() { + return this.#theme["--active-color"]; + } + + set activeColor(value) { + this.#theme["--active-color"] = value; + } + + get activeIconColor() { + return this.#theme["--active-icon-color"]; + } + + set activeIconColor(value) { + this.#theme["--active-icon-color"] = value; + } + + get borderColor() { + return this.#theme["--border-color"]; + } + + set borderColor(value) { + this.#theme["--border-color"] = value; + } + + get boxShadowColor() { + return this.#theme["--box-shadow-color"]; + } + + set boxShadowColor(value) { + this.#theme["--box-shadow-color"] = value; + } + + get buttonActiveColor() { + return this.#theme["--button-active-color"]; + } + + set buttonActiveColor(value) { + this.#theme["--button-active-color"] = value; + } + + get buttonBackgroundColor() { + return this.#theme["--button-background-color"]; + } + + set buttonBackgroundColor(value) { + this.#theme["--button-background-color"] = value; + } + + get buttonTextColor() { + return this.#theme["--button-text-color"]; + } + + set buttonTextColor(value) { + this.#theme["--button-text-color"] = value; + } + + get errorTextColor() { + return this.#theme["--error-text-color"]; + } + + set errorTextColor(value) { + this.#theme["--error-text-color"] = value; + } + + get primaryColor() { + return this.#theme["--primary-color"]; + } + + set primaryColor(value) { + if (this.autoDarkened) { + this.darkenedPrimaryColor = Color(value).darken(0.4).hex.toString(); + } + this.#theme["--primary-color"] = value; + } + + get primaryTextColor() { + return this.#theme["--primary-text-color"]; + } + + set primaryTextColor(value) { + this.#theme["--primary-text-color"] = value; + } + + get secondaryColor() { + return this.#theme["--secondary-color"]; + } + + set secondaryColor(value) { + this.#theme["--secondary-color"] = value; + } + + get secondaryTextColor() { + return this.#theme["--secondary-text-color"]; + } + + set secondaryTextColor(value) { + this.#theme["--secondary-text-color"] = value; + } + + get linkTextColor() { + return this.#theme["--link-text-color"]; + } + + set linkTextColor(value) { + this.#theme["--link-text-color"] = value; + } + + get scrollbarColor() { + return this.#theme["--scrollbar-color"]; + } + + set scrollbarColor(value) { + this.#theme["--scrollbar-color"] = value; + } + + get popupBorderColor() { + return this.#theme["--popup-border-color"]; + } + + set popupBorderColor(value) { + this.#theme["--popup-border-color"] = value; + } + + get popupIconColor() { + return this.#theme["--popup-icon-color"]; + } + + set popupIconColor(value) { + this.#theme["--popup-icon-color"] = value; + } + + get popupBackgroundColor() { + return this.#theme["--popup-background-color"]; + } + + set popupBackgroundColor(value) { + this.#theme["--popup-background-color"] = value; + } + + get popupTextColor() { + return this.#theme["--popup-text-color"]; + } + + set popupTextColor(value) { + this.#theme["--popup-text-color"] = value; + } + + get popupActiveColor() { + return this.#theme["--popup-active-color"]; + } + + set popupActiveColor(value) { + this.#theme["--popup-active-color"] = value; + } + + get dangerColor() { + return this.#theme["--danger-color"]; + } + + set dangerColor(value) { + this.#theme["--danger-color"] = value; + } + + get fileTabWidth() { + return this.#theme["--file-tab-width"]; + } + + set fileTabWidth(value) { + this.#theme["--file-tab-width"] = value; + } + + get activeTextColor() { + return this.#theme["--active-text-color"]; + } + + set activeTextColor(value) { + this.#theme["--active-text-color"] = value; + } + + get css() { + let css = ""; + Object.keys(this.#theme).forEach((key) => { + css += `${key}: ${this.#theme[key]};`; + }); + return `:root {${css}}`; + } + + /** + * Gets the theme as an object + * @param {'rgba'|'hex' | 'none'} colorType + * @returns {Object} + */ + toJSON(colorType = "none") { + const res = { + name: this.name, + type: this.type, + version: this.version, + }; + Object.keys(this.#theme).forEach((key) => { + const color = + colorType === "hex" + ? Color(this.#theme[key]).hex.toString() + : colorType === "rgba" + ? Color(this.#theme[key]).rgba.toString() + : this.#theme[key]; + res[ThemeBuilder.#toPascal(key)] = color; + }); + return res; + } + + toString() { + return JSON.stringify(this.toJSON()); + } + + /** + * This method is used to set a darkened primary color. + */ + darkenPrimaryColor() { + this.darkenedPrimaryColor = Color(this.primaryColor) + .darken(0.4) + .hex.toString(); + } + + matches(id) { + return this.id.toLowerCase() === id.toLowerCase(); + } + + /** + * Creates a theme from a CSS string + * @param {string} name + * @param {string} css + * @returns {ThemeBuilder} + */ + static fromCSS(name, css) { + const themeBuilder = new ThemeBuilder(name); + + // get rules using regex + const rules = css.match(/:root\s*{([^}]*)}/); + if (!rules) throw new Error("Invalid CSS string"); + + // get variables using regex + const variables = rules[1].match(/--[\w-]+:\s*[^;]+/g); + if (!variables) throw new Error("Invalid CSS string"); + + // set variables + variables.forEach((variable) => { + const [key, value] = variable.split(":"); + themeBuilder(ThemeBuilder.#toPascal(key.trim()), value.trim()); + }); + + return themeBuilder; + } + + static fromJSON(theme) { + if (!theme) throw new Error("Theme is required"); + if (typeof theme !== "object") throw new Error("Theme must be an object"); + if (!theme.name) throw new Error("Theme name is required"); + if (!theme.type) throw new Error("Theme type is required"); + if (!theme.version) throw new Error("Theme version is required"); + const themeBuilder = new ThemeBuilder( + theme.name, + theme.type, + theme.version, + ); + + Object.keys(theme).forEach((key) => { + if (!Object.getOwnPropertyDescriptor(ThemeBuilder.prototype, key)) return; + themeBuilder[key] = theme[key]; + }); + + return themeBuilder; + } + + /** + * + * @param {string} str + */ + static #toPascal(str) { + // e.g. '--primary-color' => 'PrimaryColor' + return str + .replace(/^--/, "") + .replace(/-([a-z])/g, (g) => g[1].toUpperCase()); + } +} + +export function createBuiltInTheme(name, type, version = "paid") { + const theme = new ThemeBuilder(name, type, version); + theme.autoDarkened = false; + return theme; +} diff --git a/src/theme/list.js b/src/theme/list.js new file mode 100644 index 000000000..50023c6eb --- /dev/null +++ b/src/theme/list.js @@ -0,0 +1,175 @@ +import fsOperation from "fileSystem"; +import { isDeviceDarkTheme } from "lib/systemConfiguration"; +import color from "utils/color"; +import Url from "utils/Url"; +import fonts from "../lib/fonts"; +import settings from "../lib/settings"; +import ThemeBuilder from "./builder"; +import themes, { updateSystemTheme } from "./preInstalled"; + +/** @type {Map} */ +const appThemes = new Map(); +let themeApplied = false; +let firstTime = true; + +function init() { + themes.forEach((theme) => add(theme)); +} + +/** + * @typedef {object} Theme + * @property {string} id + * @property {string} name + * @property {string} type + * @property {string} version + * @property {string} primaryColor + */ + +/** + * Returns a list of all themes + * @returns {Theme[]} + */ +function list() { + return Array.from(appThemes.keys()).map((name) => { + const { id, type, primaryColor, version } = appThemes.get(name); + return { + id, + type, + version, + primaryColor, + name: name.capitalize(), + }; + }); +} + +/** + * + * @param {string} name + * @returns {ThemeBuilder} + */ +function get(name) { + return appThemes.get(name.toLowerCase()); +} + +/** + * + * @param {ThemeBuilder} theme + * @returns + */ +function add(theme) { + if (!(theme instanceof ThemeBuilder)) return; + if (appThemes.has(theme.id)) return; + + appThemes.set(theme.id, theme); + + const { appTheme } = settings.value; + + if (theme.matches(appTheme)) { + if (appTheme !== "system") { + apply(appTheme); + } else { + updateSystemTheme(isDeviceDarkTheme()); + themeApplied = true; + } + } +} + +/** + * Apply a theme + * @param {string} id The name of the theme to apply + * @param {boolean} init Whether or not this is the first time the theme is being applied + */ +export async function apply(id, init) { + if (!DOES_SUPPORT_THEME) { + id = "default"; + } + + themeApplied = true; + const loaderFile = Url.join(ASSETS_DIRECTORY, "res/tail-spin.svg"); + const svgName = "__tail-spin__.svg"; + const img = Url.join(DATA_STORAGE, svgName); + const theme = get(id); + const $style = document.head.get("style#app-theme") ?? ( + + ); + const update = { + appTheme: id, + }; + + if (id === "custom") { + update.customTheme = theme.toJSON(); + } + + if (init && theme.preferredEditorTheme) { + update.editorTheme = theme.preferredEditorTheme; + if (editorManager != null && editorManager.editor != null) { + editorManager.editor.setTheme(theme.preferredEditorTheme); + } + } + + if (init && theme.preferredFont) { + update.editorFont = theme.preferredFont; + fonts.setFont(theme.preferredFont); + } + + settings.update(update, false); + localStorage.__primary_color = theme.primaryColor; + document.body.setAttribute("theme-type", theme.type); + $style.textContent = theme.css; + document.head.append($style); + + const primaryColor = color(theme.primaryColor).hex.toString(); + const scheme = theme.toJSON("hex"); + // Set status bar and navigation bar color + system.setUiTheme(primaryColor, scheme); + + if (firstTime) { + // To make sure system bars are updated + setTimeout(() => { + system.setUiTheme(primaryColor, scheme); + }, 1000); + firstTime = false; + } + + try { + let fs = fsOperation(loaderFile); + const svg = await fs.readFile("utf8"); + + fs = fsOperation(img); + if (!(await fs.exists())) { + await fsOperation(DATA_STORAGE).createFile(svgName); + } + await fs.writeFile(svg.replace(/#fff/g, theme.primaryColor)); + } catch (error) { + window.log("error", error); + } +} + +/** + * Update a theme + * @param {ThemeBuilder} theme + */ +export function update(theme) { + if (!(theme instanceof ThemeBuilder)) return; + const oldTheme = get(theme.id); + if (!oldTheme) { + add(theme); + return; + } + const json = theme.toJSON(); + Object.keys(json).forEach((key) => { + oldTheme[key] = json[key]; + }); +} + +export default { + get applied() { + return themeApplied; + }, + init, + list, + get, + add, + apply, + update, +}; diff --git a/src/theme/preInstalled.js b/src/theme/preInstalled.js new file mode 100644 index 000000000..0389f203f --- /dev/null +++ b/src/theme/preInstalled.js @@ -0,0 +1,356 @@ +import appSettings from "lib/settings"; +import { createBuiltInTheme } from "./builder"; +import { apply } from "./list"; + +const WHITE = "rgb(255, 255, 255)"; + +const dark = createBuiltInTheme("Dark", "dark", "free"); +dark.primaryColor = "rgb(35, 39, 42)"; +dark.primaryTextColor = "rgb(245, 245, 245)"; +dark.secondaryColor = "rgb(45, 49, 52)"; +dark.secondaryTextColor = "rgb(228, 228, 228)"; +dark.activeColor = "rgb(66, 133, 244)"; +dark.linkTextColor = "rgb(138, 180, 248)"; +dark.borderColor = "rgba(188, 188, 188, 0.15)"; +dark.popupIconColor = "rgb(245, 245, 245)"; +dark.popupBackgroundColor = "rgb(35, 39, 42)"; +dark.popupTextColor = "rgb(245, 245, 245)"; +dark.popupActiveColor = "rgb(66, 133, 244)"; +dark.activeTextColor = "rgb(255, 255, 255)"; +dark.errorTextColor = "rgb(255, 185, 92)"; +dark.dangerColor = "rgb(220, 38, 38)"; +dark.scrollbarColor = "rgba(255, 255, 255, 0.2)"; +dark.preferredEditorTheme = getSystemEditorTheme(true); + +const oled = createBuiltInTheme("OLED"); +oled.primaryColor = "rgb(0, 0, 0)"; +oled.primaryTextColor = "rgb(255, 255, 255)"; +oled.darkenedPrimaryColor = "rgb(0, 0, 0)"; +oled.secondaryColor = "rgb(8, 8, 8)"; +oled.secondaryTextColor = "rgb(240, 240, 240)"; +oled.activeColor = "rgb(0, 122, 255)"; +oled.activeIconColor = "rgba(0, 122, 255, 0.8)"; +oled.linkTextColor = "rgb(10, 132, 255)"; +oled.borderColor = "rgba(255, 255, 255, 0.08)"; +oled.popupIconColor = "rgb(255, 255, 255)"; +oled.popupBackgroundColor = "rgb(0, 0, 0)"; +oled.popupTextColor = "rgb(255, 255, 255)"; +oled.popupActiveColor = "rgb(0, 122, 255)"; +oled.popupBorderColor = "rgba(255, 255, 255, 0.1)"; +oled.boxShadowColor = "rgba(0, 0, 0, 0.8)"; +oled.buttonBackgroundColor = "rgb(0, 122, 255)"; +oled.buttonTextColor = "rgb(255, 255, 255)"; +oled.buttonActiveColor = "rgb(10, 132, 255)"; +oled.activeTextColor = "rgb(255, 255, 255)"; +oled.errorTextColor = "rgb(255, 69, 58)"; +oled.dangerColor = "rgb(255, 69, 58)"; +oled.scrollbarColor = "rgba(255, 255, 255, 0.1)"; +oled.preferredEditorTheme = "ace/theme/terminal"; + +const ocean = createBuiltInTheme("Ocean"); +ocean.darkenedPrimaryColor = "rgb(19, 19, 26)"; +ocean.primaryColor = "rgb(32, 32, 44)"; +ocean.primaryTextColor = WHITE; +ocean.secondaryColor = "rgb(38, 38, 53)"; +ocean.secondaryTextColor = WHITE; +ocean.activeColor = "rgb(51, 153, 255)"; +ocean.linkTextColor = "rgb(181, 180, 233)"; +ocean.borderColor = "rgb(122, 122, 163)"; +ocean.popupIconColor = WHITE; +ocean.popupBackgroundColor = "rgb(32, 32, 44)"; +ocean.popupTextColor = WHITE; +ocean.popupActiveColor = "rgb(255, 215, 0)"; +ocean.boxShadowColor = "rgba(0, 0, 0, 0.5)"; +ocean.preferredEditorTheme = "ace/theme/solarized_dark"; +ocean.preferredFont = "Fira Code"; + +const bump = createBuiltInTheme("Bump"); +bump.darkenedPrimaryColor = "rgb(28, 33, 38)"; +bump.primaryColor = "rgb(48, 56, 65)"; +bump.primaryTextColor = "rgb(236, 236, 236)"; +bump.secondaryColor = "rgb(48, 71, 94)"; +bump.secondaryTextColor = "rgb(236, 236, 236)"; +bump.activeColor = "rgb(242, 163, 101)"; +bump.linkTextColor = "rgb(181, 180, 233)"; +bump.borderColor = "rgb(107, 120, 136)"; +bump.popupIconColor = "rgb(236, 236, 236)"; +bump.popupBackgroundColor = "rgb(48, 56, 65)"; +bump.popupTextColor = "rgb(236, 236, 236)"; +bump.popupActiveColor = "rgb(255, 215, 0)"; +bump.buttonBackgroundColor = "rgb(242, 163, 101)"; +bump.buttonTextColor = "rgb(236, 236, 236)"; +bump.buttonActiveColor = "rgb(212, 137, 79)"; +bump.preferredEditorTheme = "ace/theme/one_dark"; + +const bling = createBuiltInTheme("Bling"); +bling.darkenedPrimaryColor = "rgb(19, 19, 38)"; +bling.primaryColor = "rgb(32, 32, 64)"; +bling.primaryTextColor = "rgb(255, 189, 105)"; +bling.secondaryColor = "rgb(84, 56, 100)"; +bling.secondaryTextColor = "rgb(255, 189, 105)"; +bling.activeColor = "rgb(255, 99, 99)"; +bling.linkTextColor = "rgb(181, 180, 233)"; +bling.borderColor = "rgb(93, 93, 151)"; +bling.popupIconColor = "rgb(255, 189, 105)"; +bling.popupBackgroundColor = "rgb(32, 32, 64)"; +bling.popupTextColor = "rgb(255, 189, 105)"; +bling.popupActiveColor = "rgb(51, 153, 255)"; +bling.buttonBackgroundColor = "rgb(255, 99, 99)"; +bling.buttonTextColor = "rgb(255, 189, 105)"; +bling.buttonActiveColor = "rgb(160, 99, 52)"; +bling.preferredEditorTheme = "ace/theme/tomorrow_night_blue"; + +const moon = createBuiltInTheme("Moon"); +moon.darkenedPrimaryColor = "rgb(20, 24, 29)"; +moon.primaryColor = "rgb(34, 40, 49)"; +moon.primaryTextColor = "rgb(0, 255, 245)"; +moon.secondaryColor = "rgb(57, 62, 70)"; +moon.secondaryTextColor = "rgb(0, 255, 245)"; +moon.activeColor = "rgb(0, 173, 181)"; +moon.linkTextColor = "rgb(181, 180, 233)"; +moon.borderColor = "rgb(90, 101, 117)"; +moon.popupIconColor = "rgb(0, 255, 245)"; +moon.popupBackgroundColor = "rgb(34, 40, 49)"; +moon.popupTextColor = "rgb(0, 255, 245)"; +moon.popupActiveColor = "rgb(51, 153, 255)"; +moon.buttonBackgroundColor = "rgb(0, 173, 181)"; +moon.buttonTextColor = "rgb(0, 142, 149)"; +moon.buttonActiveColor = "rgb(0, 173, 181)"; +moon.preferredEditorTheme = "ace/theme/one_dark"; + +const atticus = createBuiltInTheme("Atticus"); +atticus.darkenedPrimaryColor = "rgb(32, 30, 30)"; +atticus.primaryColor = "rgb(54, 51, 51)"; +atticus.primaryTextColor = "rgb(246, 233, 233)"; +atticus.secondaryColor = "rgb(39, 33, 33)"; +atticus.secondaryTextColor = "rgb(246, 233, 233)"; +atticus.activeColor = "rgb(225, 100, 40)"; +atticus.linkTextColor = "rgb(181, 180, 233)"; +atticus.borderColor = "rgb(117, 111, 111)"; +atticus.popupIconColor = "rgb(246, 233, 233)"; +atticus.popupBackgroundColor = "rgb(54, 51, 51)"; +atticus.popupTextColor = "rgb(246, 233, 233)"; +atticus.popupActiveColor = "rgb(51, 153, 255)"; +atticus.buttonBackgroundColor = "rgb(225, 100, 40)"; +atticus.buttonTextColor = "rgb(246, 233, 233)"; +atticus.buttonActiveColor = "rgb(0, 145, 153)"; +atticus.preferredEditorTheme = "ace/theme/pastel_on_dark"; + +const tomyris = createBuiltInTheme("Tomyris"); +tomyris.darkenedPrimaryColor = "rgb(32, 30, 30)"; +tomyris.primaryColor = "rgb(59, 9, 68)"; +tomyris.primaryTextColor = "rgb(241, 187, 213)"; +tomyris.secondaryColor = "rgb(95, 24, 84)"; +tomyris.secondaryTextColor = "rgb(144, 184, 248)"; +tomyris.activeColor = "rgb(161, 37, 89)"; +tomyris.linkTextColor = "rgb(181, 180, 233)"; +tomyris.borderColor = "rgb(140, 58, 155)"; +tomyris.popupIconColor = "rgb(241, 187, 213)"; +tomyris.popupBackgroundColor = "rgb(59, 9, 68)"; +tomyris.popupTextColor = "rgb(241, 187, 213)"; +tomyris.popupActiveColor = "rgb(51, 153, 255)"; +tomyris.buttonBackgroundColor = "rgb(161, 37, 89)"; +tomyris.buttonTextColor = "rgb(241, 187, 213)"; +tomyris.buttonActiveColor = "rgb(0, 145, 153)"; +tomyris.preferredEditorTheme = "ace/theme/cobalt"; + +const menes = createBuiltInTheme("Menes"); +menes.darkenedPrimaryColor = "rgb(31, 34, 38)"; +menes.primaryColor = "rgb(53, 57, 65)"; +menes.primaryTextColor = "rgb(144, 184, 248)"; +menes.secondaryColor = "rgb(38, 40, 43)"; +menes.secondaryTextColor = "rgb(144, 184, 248)"; +menes.activeColor = "rgb(95, 133, 219)"; +menes.linkTextColor = "rgb(181, 180, 233)"; +menes.borderColor = "rgb(117, 123, 134)"; +menes.popupIconColor = "rgb(144, 184, 248)"; +menes.popupBackgroundColor = "rgb(54, 59, 78)"; +menes.popupTextColor = "rgb(144, 184, 248)"; +menes.popupActiveColor = "rgb(51, 153, 255)"; +menes.buttonBackgroundColor = "rgb(95, 133, 219)"; +menes.buttonTextColor = "rgb(144, 184, 248)"; +menes.buttonActiveColor = "rgb(0, 145, 153)"; +menes.preferredEditorTheme = "ace/theme/nord_dark"; + +const light = createBuiltInTheme("Light", "light"); +light.primaryColor = "rgb(255, 255, 255)"; +light.primaryTextColor = "rgb(15, 23, 42)"; +light.secondaryColor = "rgb(248, 250, 252)"; +light.secondaryTextColor = "rgb(51, 65, 85)"; +light.activeColor = "rgb(59, 130, 246)"; +light.linkTextColor = "rgb(37, 99, 235)"; +light.borderColor = "rgb(226, 232, 240)"; +light.popupIconColor = "rgb(15, 23, 42)"; +light.popupBackgroundColor = "rgb(255, 255, 255)"; +light.popupTextColor = "rgb(15, 23, 42)"; +light.popupActiveColor = "rgb(59, 130, 246)"; +light.activeTextColor = "rgb(255, 255, 255)"; +light.errorTextColor = "rgb(185, 28, 28)"; +light.dangerColor = "rgb(220, 38, 38)"; +light.scrollbarColor = "rgba(0, 0, 0, 0.2)"; +light.preferredEditorTheme = getSystemEditorTheme(false); + +const system = createBuiltInTheme("System", "dark", "free"); + +export function getSystemEditorTheme(darkTheme) { + if (darkTheme) { + return "ace/theme/clouds_midnight"; + } else { + return "ace/theme/crimson_editor"; + } +} + +/** + * Update the system theme based on the user's preference. + * @param {boolean} darkTheme Whether the user prefers a dark theme. + */ +export function updateSystemTheme(darkTheme) { + if (darkTheme) { + system.type = "dark"; + system.primaryColor = "rgb(35, 39, 42)"; + system.primaryTextColor = "rgb(245, 245, 245)"; + system.darkenedPrimaryColor = "rgb(24, 27, 30)"; + system.secondaryColor = "rgb(45, 49, 52)"; + system.secondaryTextColor = "rgb(228, 228, 228)"; + system.activeColor = "rgb(66, 133, 244)"; + system.linkTextColor = "rgb(138, 180, 248)"; + system.borderColor = "rgba(188, 188, 188, 0.15)"; + system.popupIconColor = "rgb(245, 245, 245)"; + + system.popupBackgroundColor = "rgb(35, 39, 42)"; + system.popupTextColor = "rgb(245, 245, 245)"; + system.popupActiveColor = "rgb(66, 133, 244)"; + } else { + system.type = "light"; + system.primaryColor = "rgb(255, 255, 255)"; + system.primaryTextColor = "rgb(15, 23, 42)"; + system.secondaryColor = "rgb(248, 250, 252)"; + system.secondaryTextColor = "rgb(51, 65, 85)"; + system.activeColor = "rgb(59, 130, 246)"; + system.linkTextColor = "rgb(37, 99, 235)"; + system.borderColor = "rgb(226, 232, 240)"; + system.popupIconColor = "rgb(15, 23, 42)"; + + system.popupBackgroundColor = "rgb(255, 255, 255)"; + system.popupTextColor = "rgb(15, 23, 42)"; + system.popupActiveColor = "rgb(59, 130, 246)"; + } + + system.preferredEditorTheme = getSystemEditorTheme(darkTheme); + + if (appSettings?.value?.appTheme === "system") { + apply(system.id); + } +} + +const glass = createBuiltInTheme("Glass"); +glass.darkenedPrimaryColor = "rgb(250, 250, 255)"; +glass.primaryColor = "rgb(255, 255, 255)"; +glass.primaryTextColor = "rgb(17, 24, 39)"; +glass.secondaryColor = "rgba(255, 255, 255, 0.8)"; +glass.secondaryTextColor = "rgb(55, 65, 81)"; +glass.activeColor = "rgb(99, 102, 241)"; +glass.linkTextColor = "rgb(79, 70, 229)"; +glass.borderColor = "rgba(99, 102, 241, 0.2)"; +glass.popupIconColor = "rgb(17, 24, 39)"; +glass.popupBackgroundColor = "rgba(255, 255, 255, 0.95)"; +glass.popupTextColor = "rgb(17, 24, 39)"; +glass.popupActiveColor = "rgb(99, 102, 241)"; +glass.buttonBackgroundColor = "rgb(99, 102, 241)"; +glass.buttonTextColor = "rgb(255, 255, 255)"; +glass.buttonActiveColor = "rgb(79, 70, 229)"; +glass.boxShadowColor = "rgba(0, 0, 0, 0.1)"; +glass.activeTextColor = "rgb(255, 255, 255)"; +glass.errorTextColor = "rgb(185, 28, 28)"; +glass.dangerColor = "rgb(220, 38, 38)"; +glass.scrollbarColor = "rgba(0, 0, 0, 0.15)"; + +const neon = createBuiltInTheme("Neon"); +neon.darkenedPrimaryColor = "rgb(9, 9, 11)"; +neon.primaryColor = "rgb(15, 15, 17)"; +neon.primaryTextColor = "rgb(10, 255, 200)"; +neon.secondaryColor = "rgb(24, 24, 27)"; +neon.secondaryTextColor = "rgb(255, 255, 255)"; +neon.activeColor = "rgb(255, 20, 147)"; +neon.linkTextColor = "rgb(0, 255, 255)"; +neon.borderColor = "rgba(10, 255, 200, 0.3)"; +neon.popupIconColor = "rgb(10, 255, 200)"; +neon.popupBackgroundColor = "rgb(15, 15, 17)"; +neon.popupTextColor = "rgb(10, 255, 200)"; +neon.popupActiveColor = "rgb(255, 20, 147)"; +neon.buttonBackgroundColor = "rgb(255, 20, 147)"; +neon.buttonTextColor = "rgb(0, 0, 0)"; +neon.buttonActiveColor = "rgb(0, 255, 255)"; +neon.boxShadowColor = "rgba(10, 255, 200, 0.2)"; +neon.preferredEditorTheme = "ace/theme/monokai"; +neon.activeTextColor = "rgb(0, 0, 0)"; +neon.errorTextColor = "rgb(255, 20, 147)"; +neon.dangerColor = "rgb(255, 20, 147)"; +neon.scrollbarColor = "rgba(10, 255, 200, 0.3)"; + +const glassDark = createBuiltInTheme("Glass Dark", "dark"); +glassDark.darkenedPrimaryColor = "rgb(15, 15, 20)"; +glassDark.primaryColor = "rgb(24, 24, 32)"; +glassDark.primaryTextColor = "rgb(229, 231, 235)"; +glassDark.secondaryColor = "rgba(31, 31, 42, 0.8)"; +glassDark.secondaryTextColor = "rgb(156, 163, 175)"; +glassDark.activeColor = "rgb(99, 102, 241)"; +glassDark.linkTextColor = "rgb(129, 140, 248)"; +glassDark.borderColor = "rgba(99, 102, 241, 0.3)"; +glassDark.popupIconColor = "rgb(229, 231, 235)"; +glassDark.popupBackgroundColor = "rgba(31, 31, 42, 0.95)"; +glassDark.popupTextColor = "rgb(229, 231, 235)"; +glassDark.popupActiveColor = "rgb(99, 102, 241)"; +glassDark.buttonBackgroundColor = "rgb(99, 102, 241)"; +glassDark.buttonTextColor = "rgb(255, 255, 255)"; +glassDark.buttonActiveColor = "rgb(79, 70, 229)"; +glassDark.boxShadowColor = "rgba(0, 0, 0, 0.4)"; +glassDark.activeTextColor = "rgb(255, 255, 255)"; +glassDark.errorTextColor = "rgb(248, 113, 113)"; +glassDark.dangerColor = "rgb(239, 68, 68)"; +glassDark.scrollbarColor = "rgba(255, 255, 255, 0.2)"; +glassDark.preferredEditorTheme = "ace/theme/one_dark"; + +const sunset = createBuiltInTheme("Sunset"); +sunset.darkenedPrimaryColor = "rgb(251, 243, 235)"; +sunset.primaryColor = "rgb(255, 251, 247)"; +sunset.primaryTextColor = "rgb(124, 45, 18)"; +sunset.secondaryColor = "rgb(254, 235, 217)"; +sunset.secondaryTextColor = "rgb(154, 52, 18)"; +sunset.activeColor = "rgb(251, 146, 60)"; +sunset.linkTextColor = "rgb(234, 88, 12)"; +sunset.borderColor = "rgb(253, 186, 116)"; +sunset.popupIconColor = "rgb(124, 45, 18)"; +sunset.popupBackgroundColor = "rgb(255, 251, 247)"; +sunset.popupTextColor = "rgb(124, 45, 18)"; +sunset.popupActiveColor = "rgb(251, 146, 60)"; +sunset.buttonBackgroundColor = "rgb(251, 146, 60)"; +sunset.buttonTextColor = "rgb(255, 255, 255)"; +sunset.buttonActiveColor = "rgb(234, 88, 12)"; +sunset.activeTextColor = "rgb(255, 255, 255)"; +sunset.errorTextColor = "rgb(185, 28, 28)"; +sunset.dangerColor = "rgb(220, 38, 38)"; +sunset.scrollbarColor = "rgba(124, 45, 18, 0.2)"; + +const custom = createBuiltInTheme("Custom"); +custom.autoDarkened = true; + +export default [ + system, + createBuiltInTheme("Legacy", "dark", "free"), + dark, + light, + glass, + glassDark, + neon, + sunset, + oled, + ocean, + bump, + bling, + moon, + atticus, + tomyris, + menes, + custom, +]; diff --git a/src/utils/Path.js b/src/utils/Path.js new file mode 100644 index 000000000..dd5d9f126 --- /dev/null +++ b/src/utils/Path.js @@ -0,0 +1,191 @@ +export default { + /** + * The path.dirname() method returns the directory name of a path, + * similar to the Unix dirname command. + * Trailing directory separators are ignored. + * @param {string} path + * @returns {string} + */ + dirname(path) { + if (path.endsWith("/")) path = path.slice(0, -1); + const parts = path.split("/").slice(0, -1); + if (!/^(\.|\.\.|)$/.test(parts[0])) parts.unshift("."); + const res = parts.join("/"); + + if (!res) return "/"; + else return res; + }, + + /** + * The path.basename() methods returns the last portion of a path, + * similar to the Unix basename command. + * Trailing directory separators are ignored, see path.sep. + * @param {string} path + * @returns {string} + */ + basename(path, ext = "") { + ext = ext || ""; + if (path === "" || path === "/") return path; + const ar = path.split("/"); + const last = ar.slice(-1)[0]; + if (!last) return ar.slice(-2)[0]; + let res = decodeURI(last.split("?")[0] || ""); + if (this.extname(res) === ext) res = res.replace(new RegExp(ext + "$"), ""); + return res; + }, + + /** + * returns the extension of the path, from the last occurrence of the . (period) + * character to end of string in the last portion of the path. + * If there is no . in the last portion of the path, or if there are no . characters + * other than the first character of the basename of path (see path.basename()) , an + * empty string is returned. + * @param {string} path + */ + extname(path) { + const filename = path.split("/").slice(-1)[0]; + if (/.+\..*$/.test(filename)) { + return /(?:\.([^.]*))?$/.exec(filename)[0] || ""; + } + + return ""; + }, + + /** + * returns a path string from an object. + * @param {PathObject} pathObject + */ + format(pathObject) { + let { root, dir, ext, name, base } = pathObject; + + if (base || !ext.startsWith(".")) { + ext = ""; + if (base) name = ""; + } + + dir = dir || root; + + if (!dir.endsWith("/")) dir += "/"; + + return dir + (base || name) + ext; + }, + + /** + * The path.isAbsolute() method determines if path is an absolute path. + * @param {string} path + */ + isAbsolute(path) { + return path.startsWith("/"); + }, + + /** + * Joins the given number of paths + * @param {...string} paths + */ + join(...paths) { + let res = paths.join("/"); + return this.normalize(res); + }, + + /** + * Normalizes the given path, resolving '..' and '.' segments. + * @param {string} path + */ + normalize(path) { + path = path.replace(/\.\/+/g, "./"); + path = path.replace(/\/+/g, "/"); + + const resolved = []; + const pathAr = path.split("/"); + + pathAr.forEach((dir) => { + if (dir === "..") { + if (resolved.length) resolved.pop(); + } else if (dir === ".") { + return; + } else { + resolved.push(dir); + } + }); + + return resolved.join("/"); + }, + + /** + * + * @param {string} path + * @returns {PathObject} + */ + parse(path) { + const root = path.startsWith("/") ? "/" : ""; + const dir = this.dirname(path); + const ext = this.extname(path); + const name = this.basename(path, ext); + const base = this.basename(path); + + return { + root, + dir, + base, + ext, + name, + }; + }, + + /** + * Resolve the path eg. +```js +resolvePath('path/to/some/dir/', '../../dir') //returns 'path/to/dir' +``` + * @param {...string} paths + */ + resolve(...paths) { + if (!paths.length) throw new Error("resolve(...path) : Arguments missing!"); + + let result = ""; + + paths.forEach((path) => { + if (path.startsWith("/")) { + result = path; + return; + } + + result = this.normalize(this.join(result, path)); + }); + + if (result.startsWith("/")) return result; + else return "/" + result; + }, + + /** + * Gets path for path2 relative to path1 + * @param {String} path1 + * @param {String} path2 + */ + convertToRelative(path1, path2) { + path1 = this.normalize(path1).split("/"); + path2 = this.normalize(path2).split("/"); + + const p1len = path1.length; + const p2len = path2.length; + + let flag = false; + let path = []; + + path1.forEach((dir, i) => { + if (dir === path2[i] && !flag) return; + + path.push(path2[i]); + if (!flag) { + flag = true; + return; + } + + if (flag) path.unshift(".."); + }); + + if (p2len > p1len) path.push(...path2.slice(p1len)); + + return path.join("/"); + }, +}; diff --git a/src/utils/Uri.js b/src/utils/Uri.js new file mode 100644 index 000000000..195ab1762 --- /dev/null +++ b/src/utils/Uri.js @@ -0,0 +1,124 @@ +import escapeStringRegexp from "escape-string-regexp"; +import path from "./Path"; + +export default { + /** + * Parse content uri to rootUri and docID + * + * eg. + *```js + * parse("content://.../AA98-181D%3A::.../index.html") + *``` + * `returns` {rootUri: "content://.../AA98-181D%3A", docId: "...index.html"} + * + * @param {string} contentUri + * @returns {{rootUri: string, docId: string, isFileUri: boolean}} + */ + parse(contentUri) { + let rootUri, + docId = ""; + + const DOC_PROVIDER = + /^content:\/\/com\.((?![:<>"\/\\\|\?\*]).)*\.documents\//; + const TREE_URI = + /^content:\/\/com\.((?![:<>"\/\\\|\?\*]).)*\.documents\/tree\//; + const SINGLE_URI = + /^content:\/\/com\.(((?![:<>"\/\\\|\?\*]).)*)\.documents\/document/; + + if (DOC_PROVIDER.test(contentUri)) { + if (TREE_URI.test(contentUri)) { + if (/::/.test(contentUri)) { + [rootUri, docId] = contentUri.split("::"); + } else { + rootUri = contentUri; + docId = decodeURIComponent(contentUri.split("/").slice(-1)[0]); + } + } else if (SINGLE_URI.test(contentUri)) { + const [provider, providerId] = SINGLE_URI.exec(contentUri); + docId = decodeURIComponent(contentUri); //DecodeUri + docId = docId.replace(provider, ""); //replace single to tree + docId = path.normalize(docId); //normalize docid + + if (docId.startsWith("/")) docId = docId.slice(1); // remove leading '/' + + rootUri = + `content://com.${providerId}.documents/tree/` + + docId.split(":")[0] + + "%3A"; + } + + return { + rootUri, + docId, + isFileUri: /^file:\/\/\//.test(rootUri), + }; + } else { + throw new Error("Invalid uri format."); + } + }, + /** + * Formats the five contentUri object to string + * @param {{rootUri: string, docId: string} | String} contentUriObject or rootId + * @param {string} [docId] + * @returns {string} + */ + format(contentUriObject, docId) { + let rootUri; + + if (typeof contentUriObject === "string") { + rootUri = contentUriObject; + } else { + rootUri = contentUriObject.rootUri; + docId = contentUriObject.docId; + } + + if (docId) return [rootUri, docId].join("::"); + else return rootUri; + }, + /** + * Gets virtual address by replacing root with name i.e. added in file explorer + * @param {string} url + */ + getVirtualAddress(url) { + try { + const storageList = JSON.parse(localStorage.storageList || "[]"); + + const matches = []; + for (let storage of storageList) { + const regex = new RegExp( + "^" + escapeStringRegexp(storage.uri ?? storage.url), + ); + matches.push({ + regex, + charMatched: url.length - url.replace(regex, "").length, + storage, + }); + } + + const matched = matches.sort((a, b) => { + return b.charMatched - a.charMatched; + })[0]; + + if (matched) { + const { storage, regex } = matched; + const { name } = storage; + const [base, paths] = url.split("::"); + url = base + "/" + paths.split("/").slice(1).join("/"); + return url.replace(regex, name).replace(/\/+/g, "/"); + } + + return url; + } catch (e) { + return url; + } + }, + /** + * Gets primary address of a content url. + * @param {string} url + * @returns {string} + */ + getPrimaryAddress(url) { + const [, primary] = url.split("::primary:"); + return primary; + }, +}; diff --git a/src/utils/Url.js b/src/utils/Url.js new file mode 100644 index 000000000..34bca3043 --- /dev/null +++ b/src/utils/Url.js @@ -0,0 +1,322 @@ +import URLParse from "url-parse"; +import path from "./Path"; +import Uri from "./Uri"; + +export default { + /** + * Returns basename from a url eg. 'index.html' from 'ftp://localhost/foo/bar/index.html' + * @param {string} url + * @returns {string} + */ + basename(url) { + url = this.parse(url).url; + const protocol = this.getProtocol(url); + if (protocol === "content:") { + try { + let { rootUri, docId, isFileUri } = Uri.parse(url); + + if (isFileUri) return this.basename(rootUri); + + if (docId.endsWith("/")) docId = docId.slice(0, -1); + docId = docId.split(":").pop(); + return this.pathname(docId).split("/").pop(); + } catch (error) { + return null; + } + } else { + if (url.endsWith("/")) url = url.slice(0, -1); + return this.pathname(url).split("/").pop(); + } + }, + + /** + * Checks if given urls are same or not + * @param {...String} urls + * @returns {Boolean} + */ + areSame(...urls) { + let firstUrl = urls[0]; + if (firstUrl.endsWith("/")) firstUrl = firstUrl.slice(0, -1); + return urls.every((url) => { + if (url.endsWith("/")) url = url.slice(0, -1); + return firstUrl === url; + }); + }, + + /** + * + * @param {String} url + * returns the extension of the path, from the last occurrence of the . (period) + * character to end of string in the last portion of the path. + * If there is no . in the last portion of the path, or if there are no . + * characters other than the first character of the basename of path (see path.basename()), + * an empty string is returned. + * @returns {String} + */ + extname(url) { + const name = this.basename(url); + if (name) return path.extname(name); + else return null; + }, + /** + * Join all arguments together and normalize the resulting path. + * @param {...string} pathnames + * @returns {String} + */ + join(...pathnames) { + if (pathnames.length < 2) + throw new Error("Join(), requires at least two parameters"); + + let { url, query } = this.parse(pathnames[0]); + + const protocol = (this.PROTOCOL_PATTERN.exec(url) || [])[0] || ""; + + if (protocol === "content://") { + try { + if (pathnames[1].startsWith("/")) pathnames[1] = pathnames[1].slice(1); + const contentUri = Uri.parse(url); + let [root, pathname] = contentUri.docId.split(":"); + const newDocId = path.join(pathname, ...pathnames.slice(1)); + if (/^content:\/\/com.termux/.test(url)) { + const rootCondition = root.endsWith("/"); + const newDocIdCondition = newDocId.startsWith("/"); + if (rootCondition === newDocIdCondition) { + root = root.slice(0, -1); + } else if (!rootCondition === !newDocIdCondition) { + root += "/"; + } + return `${contentUri.rootUri}::${root}${newDocId}${query}`; + } + return `${contentUri.rootUri}::${root}:${newDocId}${query}`; + } catch (error) { + return null; + } + } else if (protocol) { + url = url.replace(new RegExp("^" + protocol), ""); + pathnames[0] = url; + return protocol + path.join(...pathnames) + query; + } else { + return path.join(url, ...pathnames.slice(1)) + query; + } + }, + /** + * Make url safe by encoding url components + * @param {string} url + * @returns {string} + */ + safe(url) { + let { url: uri, query } = this.parse(url); + url = uri; + const protocol = (this.PROTOCOL_PATTERN.exec(url) || [])[0] || ""; + if (protocol) url = url.replace(new RegExp("^" + protocol), ""); + const parts = url.split("/").map((part, i) => { + if (i === 0) return part; + return fixedEncodeURIComponent(part); + }); + return protocol + parts.join("/") + query; + + function fixedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16); + }); + } + }, + /** + * Gets pathname from url eg. gets '/foo/bar' from 'ftp://myhost.com/foo/bar' + * @param {string} url + * @returns {string} + */ + pathname(url) { + if (typeof url !== "string" || !this.PROTOCOL_PATTERN.test(url)) return url; + + url = url.split("?")[0]; + const protocol = (this.PROTOCOL_PATTERN.exec(url) || [])[0] || ""; + + if (protocol === "content://") { + try { + const { rootUri, docId, isFileUri } = Uri.parse(url); + if (isFileUri) return this.pathname(rootUri); + else return "/" + (docId.split(":")[1] || docId); + } catch (error) { + return null; + } + } else { + if (protocol) url = url.replace(new RegExp("^" + protocol), ""); + + if (protocol !== "file:///") + return "/" + url.split("/").slice(1).join("/"); + + return "/" + url; + } + }, + + /** + * Returns dirname from url eg. 'ftp://localhost/foo/' from 'ftp://localhost/foo/bar' + * @param {string} url + * @returns {string} + */ + dirname(url) { + if (typeof url !== "string") throw new Error("URL must be string"); + + const urlObj = this.parse(url); + url = urlObj.url; + const protocol = this.getProtocol(url); + + if (protocol === "content:") { + try { + let { rootUri, docId, isFileUri } = Uri.parse(url); + + if (isFileUri) return this.dirname(rootUri); + else { + if (docId.endsWith("/")) docId = docId.slice(0, -1); + docId = [...docId.split("/").slice(0, -1), ""].join("/"); + return Uri.format(rootUri, docId); + } + } catch (error) { + return null; + } + } else { + if (url.endsWith("/")) url = url.slice(0, -1); + return [...url.split("/").slice(0, -1), ""].join("/") + urlObj.query; + } + }, + + /** + * Parse given url into url and query + * @param {string} url + * @returns {{url:string, query:string}}} + */ + parse(url) { + const [uri, query = ""] = url.split(/(?=\?)/); + return { + url: uri, + query, + }; + }, + + /** + * Formate Url object to string + * @param {object} urlObj + * @param {"ftp:"|"sftp:"|"http:"|"https:"} urlObj.protocol + * @param {string|number} urlObj.hostname + * @param {string} [urlObj.path] + * @param {string} [urlObj.username] + * @param {string} [urlObj.password] + * @param {string|number} [urlObj.port] + * @param {object} [urlObj.query] + * @returns {string} + */ + formate(urlObj) { + let { protocol, hostname, username, password, path, port, query } = urlObj; + + const enc = (str) => encodeURIComponent(str); + + if (!protocol || !hostname) + throw new Error("Cannot formate url. Missing 'protocol' and 'hostname'."); + + let string = `${protocol}//`; + + if (username && password) string += `${enc(username)}:${enc(password)}@`; + else if (username) string += `${username}@`; + + string += hostname; + + if (port) string += `:${port}`; + + if (path) { + if (!path.startsWith("/")) path = "/" + path; + + string += path; + } + + if (query && typeof query === "object") { + string += "?"; + + for (let key in query) string += `${enc(key)}=${enc(query[key])}&`; + + string = string.slice(0, -1); + } + + return string; + }, + /** + * Returns protocol of a url e.g. 'ftp:' from 'ftp://localhost/foo/bar' + * @param {string} url + * @returns {"ftp:"|"sftp:"|"http:"|"https:"} + */ + getProtocol(url) { + return (/^([a-z]+:)\/\/\/?/i.exec(url) || [])[1] || ""; + }, + /** + * + * @param {string} url + * @returns {string} + */ + hidePassword(url) { + const { protocol, username, hostname, pathname } = URLParse(url); + if (protocol === "file:") { + return url; + } else { + return `${protocol}//${username}@${hostname}${pathname}`; + } + }, + /** + * Decodes url and returns username, password, hostname, pathname, port and query + * @param {string} url + * @returns {URLObject} + */ + decodeUrl(url) { + const uuid = "uuid" + Math.floor(Math.random() + Date.now() * 1000000); + + if (/#/.test(url)) { + url = url.replace(/#/g, uuid); + } + + let { username, password, hostname, pathname, port, query } = URLParse( + url, + true, + ); + + if (pathname) { + pathname = decodeURIComponent(pathname); + pathname = pathname.replace(new RegExp(uuid, "g"), "#"); + } + + if (username) { + username = decodeURIComponent(username); + } + + if (password) { + password = decodeURIComponent(password); + } + + if (port) { + port = Number.parseInt(port); + } + + let { keyFile, passPhrase } = query; + + if (keyFile) { + query.keyFile = decodeURIComponent(keyFile); + } + + if (passPhrase) { + query.passPhrase = decodeURIComponent(passPhrase); + } + + return { username, password, hostname, pathname, port, query }; + }, + /** + * Removes trailing slash from url + * @param {string} url + * @returns + */ + trimSlash(url) { + const parsed = this.parse(url); + if (parsed.url.endsWith("/")) { + parsed.url = parsed.url.slice(0, -1); + } + return this.join(parsed.url, parsed.query); + }, + PROTOCOL_PATTERN: /^[a-z]+:\/\/\/?/i, +}; diff --git a/src/utils/color/hex.js b/src/utils/color/hex.js new file mode 100644 index 000000000..d297c6aa1 --- /dev/null +++ b/src/utils/color/hex.js @@ -0,0 +1,64 @@ +import Rgb from "./rgb"; + +export default class Hex { + r = 0; + g = 0; + b = 0; + a = 1; + + /** + * Hex color constructor + * @param {number} r Red value in hexadecimals + * @param {number} g Green value in hexadecimals + * @param {number} b Blue value in hexadecimals + * @param {number} a Alpha value between 0 and 1 + */ + constructor(r, g, b, a = 1) { + this.r = r; + this.g = g; + this.b = b; + this.a = a; + } + + /** + * Creates a Hex color from an RGB color + * @param {Rgb} rgb + */ + static fromRgb(rgb) { + const { r, g, b, a } = rgb; + return new Hex(r, g, b, a * 255); + } + + /** + * Gets the color as a string + * @param {boolean} alpha Whether to include alpha + */ + toString(alpha) { + let r = this.r.toString(16); + let g = this.g.toString(16); + let b = this.b.toString(16); + let a = this.a.toString(16); + + if (r.length === 1) r = `0${r}`; + if (g.length === 1) g = `0${g}`; + if (b.length === 1) b = `0${b}`; + if (a.length === 1) a = `0${a}`; + + const hex = () => `#${r}${g}${b}`.toUpperCase(); + const hexA = () => `#${r}${g}${b}${a}`.toUpperCase(); + + if (alpha === undefined) { + return this.a === 255 ? hex() : hexA(); + } + + return alpha ? hexA() : hex(); + } + + /** + * Gets the color as an RGB object + * @returns {Rgb} + */ + get rgb() { + return new Rgb(this.r, this.g, this.b, this.a); + } +} diff --git a/src/utils/color/hsl.js b/src/utils/color/hsl.js new file mode 100644 index 000000000..ddb7769bd --- /dev/null +++ b/src/utils/color/hsl.js @@ -0,0 +1,147 @@ +import Rgb from "./rgb"; + +export default class Hsl { + h = 0; + s = 0; + l = 0; + a = 1; + + /** + * HSL color constructor + * @param {number} h Hue value between 0 and 1 + * @param {number} s Saturation value between 0 and 1 + * @param {number} l Lightness value between 0 and 1 + * @param {number} a Alpha value between 0 and 1 + */ + constructor(h, s, l, a = 1) { + this.h = h; + this.s = s; + this.l = l; + this.a = a; + } + + /** + * Creates an HSL color from an RGB color + * @param {Rgb} rgb + * @returns + */ + static fromRgb(rgb) { + let { r, g, b, a } = rgb; + r /= 255; + g /= 255; + b /= 255; + + const max = Math.max(r, g, b); + const min = Math.min(r, g, b); + const l = (max + min) / 2; + let h = 0; + let s = 0; + + if (max !== min) { + const d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch (max) { + case r: + h = (g - b) / d + (g < b ? 6 : 0); + break; + case g: + h = (b - r) / d + 2; + break; + case b: + h = (r - g) / d + 4; + break; + } + h /= 6; + } + + return new Hsl(h, s, l, a); + } + + /** + * Gets the color as a string + * @param {boolean} [alpha] Whether to include alpha + * @returns + */ + toString(alpha) { + const hsl = () => `hsl(${this.hValue}, ${this.sValue}%, ${this.lValue}%)`; + const hsla = () => + `hsla(${this.hValue}, ${this.sValue}%, ${this.lValue}%, ${this.a})`; + if (alpha === undefined) { + return this.a === 1 ? hsl() : hsla(); + } + + return alpha ? hsla() : hsl(); + } + + get hValue() { + return this.h * 360; + } + + get sValue() { + return this.s * 100; + } + + get lValue() { + return this.l * 100; + } + + get lightness() { + return this.lValue; + } + + get hue() { + return this.hValue; + } + + get saturation() { + return this.sValue; + } + + /** + * Gets the color as an rgb object + * @returns {Rgb} + */ + get rgb() { + if (this.l === 0) { + return new Rgb(0, 0, 0, this.a); + } + + if (this.l === 1) { + return new Rgb(255, 255, 255, this.a); + } + + // now convert hsl value to rgb + let c = (1 - Math.abs(2 * this.l - 1)) * this.s; + let x = c * (1 - Math.abs(((this.h * 6) % 2) - 1)); + let m = this.l - c / 2; + let r = 0; + let g = 0; + let b = 0; + + if (this.h < 1 / 6) { + r = c; + g = x; + } else if (this.h < 2 / 6) { + r = x; + g = c; + } else if (this.h < 3 / 6) { + g = c; + b = x; + } else if (this.h < 4 / 6) { + g = x; + b = c; + } else if (this.h < 5 / 6) { + r = x; + b = c; + } else { + r = c; + b = x; + } + + r = Math.round((r + m) * 255); + g = Math.round((g + m) * 255); + b = Math.round((b + m) * 255); + + return new Rgb(r, g, b, this.a); + } +} diff --git a/src/utils/color/index.js b/src/utils/color/index.js new file mode 100644 index 000000000..027c6e526 --- /dev/null +++ b/src/utils/color/index.js @@ -0,0 +1,75 @@ +import Hex from "./hex"; +import Hsl from "./hsl"; +import Rgb from "./rgb"; + +/**@type {CanvasRenderingContext2D} */ +const ctx = ().getContext("2d", { + willReadFrequently: true, +}); + +export default (/**@type {string}*/ color) => { + return new Color(color); +}; + +class Color { + rgb = new Rgb(0, 0, 0, 1); + + /** + * Create a color from a string + * @param {string} color + */ + constructor(color) { + const { canvas } = ctx; + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.fillStyle = color; + ctx.fillRect(0, 0, 1, 1); + const [r, g, b, a] = ctx.getImageData(0, 0, 1, 1).data; + this.rgb = new Rgb(r, g, b, a / 255); + } + + darken(ratio) { + const hsl = Hsl.fromRgb(this.rgb); + hsl.l = Math.max(0, hsl.l - ratio * hsl.l); + this.rgb = hsl.rgb; + return this; + } + + lighten(ratio) { + const hsl = Hsl.fromRgb(this.rgb); + hsl.l = Math.min(1, hsl.l + ratio * hsl.l); + this.rgb = hsl.rgb; + return this; + } + + get isDark() { + return this.luminance < 0.5; + } + + get isLight() { + return this.luminance >= 0.5; + } + + get lightness() { + return this.hsl.l; + } + + /** + * Get the luminance of the color + * Returns a value between 0 and 1 + */ + get luminance() { + let { r, g, b } = this.rgb; + r /= 255; + g /= 255; + b /= 255; + return 0.2126 * r + 0.7152 * g + 0.0722 * b; + } + + get hex() { + return Hex.fromRgb(this.rgb); + } + + get hsl() { + return Hsl.fromRgb(this.rgb); + } +} diff --git a/src/utils/color/regex.js b/src/utils/color/regex.js new file mode 100644 index 000000000..5f3fa5061 --- /dev/null +++ b/src/utils/color/regex.js @@ -0,0 +1,288 @@ +export const MAX_16_BASE = "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"; +export const HUE_VALUE = + "(360(\\.0+)?|(3[0-5][0-9]|([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-9][0-9])(\\.\\d+)?)|(\\.\\d+))"; +export const MAX_PERCENTAGE = "((100(\\.0+)?|[1-9]?[0-9](\\.\\d+)?|\\.\\d+)%)"; +export const MAX_ALPHA = `((0(\\.\\d+)?|1(\\.0+)?|\\.\\d+)|${MAX_PERCENTAGE})`; +export const RGB_VALUE = `(\\s*${MAX_16_BASE}|${MAX_PERCENTAGE}\\s*)`; +export const RGB_VALUES = `${RGB_VALUE},${RGB_VALUE},${RGB_VALUE}`; +export const RGB_VALUES_NO_COMMA = `${RGB_VALUE}{3}`; +export const RGB = `(rgb\\s*\\(${RGB_VALUES}\\)|rgb\\s*\\(${RGB_VALUES_NO_COMMA}\\))`; +export const RGBA = `(rgba\\s*\\(${RGB_VALUES}\\s*,\\s*${MAX_ALPHA}\\s*\\)|rgba\\s*\\(${RGB_VALUES_NO_COMMA}\\s+${MAX_ALPHA}\\s*\\))`; +export const HSL_VALUE = `\\s*${HUE_VALUE}\\s*,\\s*${MAX_PERCENTAGE}\\s*,\\s*${MAX_PERCENTAGE}\\s*`; +export const HSL_VALUE_NO_COMMA = `\\s*${HUE_VALUE}\\s+${MAX_PERCENTAGE}\\s+${MAX_PERCENTAGE}\\s*`; +export const HSL = `(hsl\\s*\\(${HSL_VALUE}\\)|hsl\\s*\\(${HSL_VALUE_NO_COMMA}\\))`; +export const HSLA = `(hsla\\s*\\(${HSL_VALUE}\\s*,\\s*${MAX_ALPHA}\\s*\\)|hsla\\s*\\(${HSL_VALUE_NO_COMMA}\\s+\/\/\\s+${MAX_ALPHA}\\s*\\)|hsla\\s*\\(${HSL_VALUE_NO_COMMA}\\s+${MAX_ALPHA}\\s*\\))`; +export const HEX = "(#[0-9a-f]{3,8})"; +export const NAMED_COLORS = { + black: "rgb(0, 0, 0)", + silver: "rgb(192, 192, 192)", + gray: "rgb(128, 128, 128)", + white: "rgb(255, 255, 255)", + maroon: "rgb(128, 0, 0)", + red: "rgb(255, 0, 0)", + purple: "rgb(128, 0, 128)", + fuchsia: "rgb(255, 0, 255)", + green: "rgb(0, 128, 0)", + lime: "rgb(0, 255, 0)", + olive: "rgb(128, 128, 0)", + yellow: "rgb(255, 255, 0)", + navy: "rgb(0, 0, 128)", + blue: "rgb(0, 0, 255)", + teal: "rgb(0, 128, 128)", + aqua: "rgb(0, 255, 255)", + aliceblue: "rgb(240, 248, 255)", + antiquewhite: "rgb(250, 235, 215)", + aquamarine: "rgb(127, 255, 212)", + azure: "rgb(240, 255, 255)", + beige: "rgb(245, 245, 220)", + bisque: "rgb(255, 228, 196)", + blanchedalmond: "rgb(255, 235, 205)", + blueviolet: "rgb(138, 43, 226)", + brown: "rgb(165, 42, 42)", + burlywood: "rgb(222, 184, 135)", + cadetblue: "rgb(95, 158, 160)", + chartreuse: "rgb(127, 255, 0)", + chocolate: "rgb(210, 105, 30)", + coral: "rgb(255, 127, 80)", + cornflowerblue: "rgb(100, 149, 237)", + cornsilk: "rgb(255, 248, 220)", + crimson: "rgb(220, 20, 60)", + cyan: "rgb(0, 255, 255)", + darkblue: "rgb(0, 0, 139)", + darkcyan: "rgb(0, 139, 139)", + darkgoldenrod: "rgb(184, 134, 11)", + darkgray: "rgb(169, 169, 169)", + darkgreen: "rgb(0, 100, 0)", + darkgrey: "rgb(169, 169, 169)", + darkkhaki: "rgb(189, 183, 107)", + darkmagenta: "rgb(139, 0, 139)", + darkolivegreen: "rgb(85, 107, 47)", + darkorange: "rgb(255, 140, 0)", + darkorchid: "rgb(153, 50, 204)", + darkred: "rgb(139, 0, 0)", + darksalmon: "rgb(233, 150, 122)", + darkseagreen: "rgb(143, 188, 143)", + darkslateblue: "rgb(72, 61, 139)", + darkslategray: "rgb(47, 79, 79)", + darkslategrey: "rgb(47, 79, 79)", + darkturquoise: "rgb(0, 206, 209)", + darkviolet: "rgb(148, 0, 211)", + deeppink: "rgb(255, 20, 147)", + deepskyblue: "rgb(0, 191, 255)", + dimgray: "rgb(105, 105, 105)", + dimgrey: "rgb(105, 105, 105)", + dodgerblue: "rgb(30, 144, 255)", + firebrick: "rgb(178, 34, 34)", + floralwhite: "rgb(255, 250, 240)", + forestgreen: "rgb(34, 139, 34)", + gainsboro: "rgb(220, 220, 220)", + ghostwhite: "rgb(248, 248, 255)", + gold: "rgb(255, 215, 0)", + goldenrod: "rgb(218, 165, 32)", + greenyellow: "rgb(173, 255, 47)", + grey: "rgb(128, 128, 128)", + honeydew: "rgb(240, 255, 240)", + hotpink: "rgb(255, 105, 180)", + indianred: "rgb(205, 92, 92)", + indigo: "rgb(75, 0, 130)", + ivory: "rgb(255, 255, 240)", + khaki: "rgb(240, 230, 140)", + lavender: "rgb(230, 230, 250)", + lavenderblush: "rgb(255, 240, 245)", + lawngreen: "rgb(124, 252, 0)", + lemonchiffon: "rgb(255, 250, 205)", + lightblue: "rgb(173, 216, 230)", + lightcoral: "rgb(240, 128, 128)", + lightcyan: "rgb(224, 255, 255)", + lightgoldenrodyellow: "rgb(250, 250, 210)", + lightgray: "rgb(211, 211, 211)", + lightgreen: "rgb(144, 238, 144)", + lightgrey: "rgb(211, 211, 211)", + lightpink: "rgb(255, 182, 193)", + lightsalmon: "rgb(255, 160, 122)", + lightseagreen: "rgb(32, 178, 170)", + lightskyblue: "rgb(135, 206, 250)", + lightslategray: "rgb(119, 136, 153)", + lightslategrey: "rgb(119, 136, 153)", + lightsteelblue: "rgb(176, 196, 222)", + lightyellow: "rgb(255, 255, 224)", + limegreen: "rgb(50, 205, 50)", + linen: "rgb(250, 240, 230)", + magenta: "rgb(255, 0, 255)", + mediumaquamarine: "rgb(102, 205, 170)", + mediumblue: "rgb(0, 0, 205)", + mediumorchid: "rgb(186, 85, 211)", + mediumpurple: "rgb(147, 112, 219)", + mediumseagreen: "rgb(60, 179, 113)", + mediumslateblue: "rgb(123, 104, 238)", + mediumspringgreen: "rgb(0, 250, 154)", + mediumturquoise: "rgb(72, 209, 204)", + mediumvioletred: "rgb(199, 21, 133)", + midnightblue: "rgb(25, 25, 112)", + mintcream: "rgb(245, 255, 250)", + mistyrose: "rgb(255, 228, 225)", + moccasin: "rgb(255, 228, 181)", + navajowhite: "rgb(255, 222, 173)", + oldlace: "rgb(253, 245, 230)", + olivedrab: "rgb(107, 142, 35)", + orangered: "rgb(255, 69, 0)", + orchid: "rgb(218, 112, 214)", + palegoldenrod: "rgb(238, 232, 170)", + palegreen: "rgb(152, 251, 152)", + paleturquoise: "rgb(175, 238, 238)", + palevioletred: "rgb(219, 112, 147)", + papayawhip: "rgb(255, 239, 213)", + peachpuff: "rgb(255, 218, 185)", + peru: "rgb(205, 133, 63)", + pink: "rgb(255, 192, 203)", + plum: "rgb(221, 160, 221)", + powderblue: "rgb(176, 224, 230)", + rebeccapurple: "rgb(102, 51, 153)", + rosybrown: "rgb(188, 143, 143)", + royalblue: "rgb(65, 105, 225)", + saddlebrown: "rgb(139, 69, 19)", + salmon: "rgb(250, 128, 114)", + sandybrown: "rgb(244, 164, 96)", + seagreen: "rgb(46, 139, 87)", + seashell: "rgb(255, 245, 238)", + sienna: "rgb(160, 82, 45)", + skyblue: "rgb(135, 206, 235)", + slateblue: "rgb(106, 90, 205)", + slategray: "rgb(112, 128, 144)", + slategrey: "rgb(112, 128, 144)", + snow: "rgb(255, 250, 250)", + springgreen: "rgb(0, 255, 127)", + steelblue: "rgb(70, 130, 180)", + tan: "rgb(210, 180, 140)", + thistle: "rgb(216, 191, 216)", + tomato: "rgb(255, 99, 71)", + turquoise: "rgb(64, 224, 208)", + violet: "rgb(238, 130, 238)", + wheat: "rgb(245, 222, 179)", + whitesmoke: "rgb(245, 245, 245)", + yellowgreen: "rgb(154, 205, 50)", +}; + +const namedColors = Object.keys(NAMED_COLORS).join("|"); + +export const colorRegex = { + /** + * Regular expression to match rgb colors + * @type {RegExp} + */ + get rgb() { + delete this.rgb; + this.rgb = new RegExp(`^${RGB}$`); + return this.rgb; + }, + /** + * Regular expression to match rgba colors + * @type {RegExp} + */ + get rgba() { + delete this.rgba; + this.rgba = new RegExp(`^${RGBA}$`); + return this.rgba; + }, + /** + * Regular expression to match hsl colors + * @type {RegExp} + */ + get hsl() { + delete this.hsl; + this.hsl = new RegExp(`^${HSL}$`); + return this.hsl; + }, + /** + * Regular expression to match hsla colors + * @type {RegExp} + */ + get hsla() { + delete this.hsla; + this.hsla = new RegExp(`^${HSLA}$`); + return this.hsla; + }, + /** + * Regular expression to match hex colors + * @type {RegExp} + */ + get hex() { + delete this.hex; + this.hex = new RegExp(`^${HEX}$`); + return this.hex; + }, + /** + * Regular expression to match any color + * @type {RegExp} + */ + get named() { + delete this.named; + this.named = new RegExp(`^(${namedColors})$`); + return this.named; + }, + /** + * Regular expression to match any color + * @type {RegExp} + */ + get anyStrict() { + delete this.any; + this.any = new RegExp( + `^(${namedColors}|${RGB}|${RGBA}|${HSL}|${HSLA}|${HEX})$`, + "i", + ); + return this.any; + }, + /** + * Regular expression to match any color + * Always return a new RegExp instance + * @type {RegExp} + */ + get anyGlobal() { + // Negative lookbehind is not supported in older browsers + return new RegExp( + `(^|\\W)(${namedColors}|${RGB}|${RGBA}|${HSL}|${HSLA}|${HEX})($|\\W)`, + "gi", + ); + }, +}; + +/** + * Select the color at current line and cursor position + * @returns {AceAjax.Range} + */ +export function getColorRange() { + const { editor } = editorManager; + const copyText = editor.getCopyText(); + + if (copyText) { + if (!isValidColor(copyText)) return null; + return editor.selection.getRange(); + } + + const { Range } = ace.require("ace/range"); + let range; + + const cursorPos = editor.selection.getCursor(); + /**@type {string} */ + const line = editor.session.getLine(cursorPos.row); + + // match color in current line and get range + const regex = colorRegex.anyGlobal; + let match; + + while ((match = regex.exec(line))) { + const start = match.index + match[1].length; + const end = start + match[2].length; + + if (cursorPos.column >= start && cursorPos.column <= end) { + range = new Range(cursorPos.row, start, cursorPos.row, end); + break; + } + } + + return range; +} + +export function isValidColor(value) { + return colorRegex.anyStrict.test(value); +} diff --git a/src/utils/color/rgb.js b/src/utils/color/rgb.js new file mode 100644 index 000000000..535ff2860 --- /dev/null +++ b/src/utils/color/rgb.js @@ -0,0 +1,27 @@ +export default class Rgb { + r = 0; + g = 0; + b = 0; + a = 1; + + constructor(r, g, b, a = 1) { + this.r = r; + this.g = g; + this.b = b; + this.a = a; + } + + /** + * Get the color as a string + * @param {boolean} alpha Whether to include alpha channel + * @returns + */ + toString(alpha) { + const rgb = () => `rgb(${this.r}, ${this.g}, ${this.b})`; + const rgba = () => `rgba(${this.r}, ${this.g}, ${this.b}, ${this.a})`; + if (alpha === undefined) { + return this.a === 1 ? rgb() : rgba(); + } + return alpha ? rgba() : rgb(); + } +} diff --git a/src/utils/encodings.js b/src/utils/encodings.js new file mode 100644 index 000000000..103bb2512 --- /dev/null +++ b/src/utils/encodings.js @@ -0,0 +1,266 @@ +import alert from "dialogs/alert"; +import settings from "lib/settings"; + +let encodings = {}; + +/** + * @typedef {Object} Encoding + * @property {string} label + * @property {string[]} aliases + * @property {string} name + */ + +/** + * Get the encoding label from the charset + * @param {string} charset + * @returns {Encoding|undefined} + */ +export function getEncoding(charset) { + charset = charset.toLowerCase(); + + const found = Object.keys(encodings).find((key) => { + if (key.toLowerCase() === charset) { + return true; + } + + const alias = encodings[key].aliases.find( + (alias) => alias.toLowerCase() === charset, + ); + if (alias) { + return true; + } + + return false; + }); + + if (found) { + return encodings[found]; + } + + return encodings["UTF-8"]; +} + +function detectBOM(bytes) { + if ( + bytes.length >= 3 && + bytes[0] === 0xef && + bytes[1] === 0xbb && + bytes[2] === 0xbf + ) + return "UTF-8"; + if (bytes.length >= 2 && bytes[0] === 0xff && bytes[1] === 0xfe) + return "UTF-16LE"; + if (bytes.length >= 2 && bytes[0] === 0xfe && bytes[1] === 0xff) + return "UTF-16BE"; + return null; +} + +function isValidUTF8(bytes) { + let i = 0; + while (i < bytes.length) { + const byte = bytes[i]; + + if (byte < 0x80) { + i++; + } else if (byte >> 5 === 0x06) { + if (i + 1 >= bytes.length || bytes[i + 1] >> 6 !== 0x02) return false; + i += 2; + } else if (byte >> 4 === 0x0e) { + if ( + i + 2 >= bytes.length || + bytes[i + 1] >> 6 !== 0x02 || + bytes[i + 2] >> 6 !== 0x02 + ) + return false; + i += 3; + } else if (byte >> 3 === 0x1e) { + if ( + i + 3 >= bytes.length || + bytes[i + 1] >> 6 !== 0x02 || + bytes[i + 2] >> 6 !== 0x02 || + bytes[i + 3] >> 6 !== 0x02 + ) + return false; + i += 4; + } else { + return false; + } + } + return true; +} + +export async function detectEncoding(buffer) { + if (!buffer || buffer.byteLength === 0) { + const def = settings.value.defaultFileEncoding; + return def === "auto" ? "UTF-8" : def || "UTF-8"; + } + + const bytes = new Uint8Array(buffer); + + const bomEncoding = detectBOM(bytes); + if (bomEncoding) return bomEncoding; + + const sample = bytes.subarray(0, Math.min(2048, bytes.length)); + let nulls = 0, + ascii = 0; + + for (const byte of sample) { + if (byte === 0) nulls++; + else if (byte < 0x80) ascii++; + } + + if (nulls > sample.length * 0.3) return "UTF-16LE"; + + if (isValidUTF8(sample)) return "UTF-8"; + + const encodings = [ + ...new Set([ + "UTF-8", + settings.value.defaultFileEncoding === "auto" + ? "UTF-8" + : settings.value.defaultFileEncoding || "UTF-8", + "windows-1252", + "ISO-8859-1", + ]), + ]; + + const testSample = sample.subarray(0, 512); + const testBuffer = testSample.buffer.slice( + testSample.byteOffset, + testSample.byteOffset + testSample.byteLength, + ); + + for (const encoding of encodings) { + try { + const encodingObj = getEncoding(encoding); + if (!encodingObj) continue; + + const text = await execDecode(testBuffer, encodingObj.name); + if ( + !text.includes("\uFFFD") && + !/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/.test(text) + ) { + return encoding; + } + } catch (error) { + continue; + } + } + + const def = settings.value.defaultFileEncoding; + return def === "auto" ? "UTF-8" : def || "UTF-8"; +} + +/** + * Decodes arrayBuffer to String according given encoding type + * @param {ArrayBuffer} buffer + * @param {string} [charset] + * @returns {Promise} + */ +export async function decode(buffer, charset) { + let isJson = false; + + if (charset === "json") { + charset = null; + isJson = true; + } + + if (!charset) { + charset = settings.value.defaultFileEncoding; + } + + if (charset === "auto") charset = "UTF-8"; + + charset = getEncoding(charset).name; + const text = await execDecode(buffer, charset); + + if (isJson) { + return JSON.parse(text); + } + + return text; +} + +/** + * Encodes text to ArrayBuffer according given encoding type + * @param {string} text + * @param {string} charset + * @returns {Promise} + */ +export function encode(text, charset) { + if (!charset) { + charset = settings.value.defaultFileEncoding; + } + + if (charset === "auto") charset = "UTF-8"; + + charset = getEncoding(charset).name; + return execEncode(text, charset); +} + +export async function initEncodings() { + return new Promise((resolve, reject) => { + cordova.exec( + (map) => { + Object.keys(map).forEach((key) => { + const encoding = map[key]; + encodings[key] = encoding; + }); + resolve(); + }, + (error) => { + alert(strings.error, error.message || error); + reject(error); + }, + "System", + "get-available-encodings", + [], + ); + }); +} + +/** + * Decodes arrayBuffer to String according given encoding type + * @param {ArrayBuffer} buffer + * @param {string} charset + * @returns {Promise} + */ +function execDecode(buffer, charset) { + return new Promise((resolve, reject) => { + cordova.exec( + (text) => { + resolve(text); + }, + (error) => { + reject(error); + }, + "System", + "decode", + [buffer, charset], + ); + }); +} + +/** + * Encodes text to ArrayBuffer according given encoding type + * @param {string} text + * @param {string} charset + * @returns {Promise} + */ +function execEncode(text, charset) { + return new Promise((resolve, reject) => { + cordova.exec( + (buffer) => { + resolve(buffer); + }, + (error) => { + reject(error); + }, + "System", + "encode", + [text, charset], + ); + }); +} + +export default encodings; diff --git a/src/utils/helpers.js b/src/utils/helpers.js new file mode 100644 index 000000000..f39c14c40 --- /dev/null +++ b/src/utils/helpers.js @@ -0,0 +1,581 @@ +import fsOperation from "fileSystem"; +import ajax from "@deadlyjack/ajax"; +import alert from "dialogs/alert"; +import escapeStringRegexp from "escape-string-regexp"; +import constants from "lib/constants"; +import path from "./Path"; +import Uri from "./Uri"; +import Url from "./Url"; + +/** + * Gets programming language name according to filename + * @param {String} filename + * @returns + */ +function getFileType(filename) { + const regex = { + babel: /\.babelrc$/i, + jsmap: /\.js\.map$/i, + yarn: /^yarn\.lock$/i, + testjs: /\.test\.js$/i, + testts: /\.test\.ts$/i, + cssmap: /\.css\.map$/i, + typescriptdef: /\.d\.ts$/i, + clojurescript: /\.cljs$/i, + cppheader: /\.(hh|hpp)$/i, + jsconfig: /^jsconfig.json$/i, + tsconfig: /^tsconfig.json$/i, + android: /\.(apk|aab|slim)$/i, + jsbeautify: /^\.jsbeautifyrc$/i, + webpack: /^webpack\.config\.js$/i, + audio: /\.(mp3|wav|ogg|flac|aac)$/i, + git: /(^\.gitignore$)|(^\.gitmodules$)/i, + video: /\.(mp4|m4a|mov|3gp|wmv|flv|avi)$/i, + image: /\.(png|jpg|jpeg|gif|bmp|ico|webp)$/i, + npm: /(^package\.json$)|(^package\-lock\.json$)/i, + compressed: /\.(zip|rar|7z|tar|gz|gzip|dmg|iso)$/i, + eslint: + /(^\.eslintrc(\.(json5?|ya?ml|toml))?$|eslint\.config\.(c?js|json)$)/i, + postcssconfig: + /(^\.postcssrc(\.(json5?|ya?ml|toml))?$|postcss\.config\.(c?js|json)$)/i, + prettier: + /(^\.prettierrc(\.(json5?|ya?ml|toml))?$|prettier\.config\.(c?js|json)$)/i, + }; + + const fileType = Object.keys(regex).find((type) => + regex[type].test(filename), + ); + if (fileType) return fileType; + + return Url.extname(filename).substring(1); +} + +export default { + /** + * @deprecated This method is deprecated, use 'encodings.decode' instead. + * Decodes arrayBuffer to String according given encoding type + * @param {ArrayBuffer} arrayBuffer + * @param {String} [encoding='utf-8'] + */ + decodeText(arrayBuffer, encoding = "utf-8") { + const isJson = encoding === "json"; + if (isJson) encoding = "utf-8"; + + const uint8Array = new Uint8Array(arrayBuffer); + const result = new TextDecoder(encoding).decode(uint8Array); + if (isJson) { + return this.parseJSON(result); + } + return result; + }, + /** + * Gets icon according to filename + * @param {string} filename + */ + getIconForFile(filename) { + const { getModeForPath } = ace.require("ace/ext/modelist"); + const type = getFileType(filename); + const { name } = getModeForPath(filename); + + const iconForMode = `file_type_${name}`; + const iconForType = `file_type_${type}`; + + return `file file_type_default ${iconForMode} ${iconForType}`; + }, + /** + * + * @param {FileEntry[]} list + * @param {object} fileBrowser settings + * @param {'both'|'file'|'folder'} + */ + sortDir(list, fileBrowser, mode = "both") { + const dir = []; + const file = []; + const sortByName = fileBrowser.sortByName; + const showHiddenFile = fileBrowser.showHiddenFiles; + + list.forEach((item) => { + let hidden; + + item.name = item.name || path.basename(item.url || ""); + hidden = item.name[0] === "."; + + if (typeof item.isDirectory !== "boolean") { + if (this.isDir(item.type)) item.isDirectory = true; + } + if (!item.type) item.type = item.isDirectory ? "dir" : "file"; + if (!item.url) item.url = item.url || item.uri; + if ((hidden && showHiddenFile) || !hidden) { + if (item.isDirectory) { + dir.push(item); + } else if (item.isFile) { + file.push(item); + } + } + if (item.isDirectory) { + item.icon = "folder"; + } else { + if (mode === "folder") { + item.disabled = true; + } + item.icon = this.getIconForFile(item.name); + } + }); + + if (sortByName) { + dir.sort(compare); + file.sort(compare); + } + + return dir.concat(file); + + function compare(a, b) { + return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1; + } + }, + /** + * Gets error message from error object + * @param {Error} err + * @param {...string} args + */ + errorMessage(err, ...args) { + args.forEach((arg, i) => { + if (/^(content|file|ftp|sftp|https?):/.test(arg)) { + args[i] = this.getVirtualPath(arg); + } + }); + + const extra = args.join("
      "); + let msg; + + if (typeof err === "string" && err) { + msg = err; + } else if (err instanceof Error) { + msg = err.message; + } else { + msg = strings["an error occurred"]; + } + + return msg + (extra ? "
      " + extra : ""); + }, + /** + * + * @param {Error} err + * @param {...string} args + * @returns {PromiseLike} + */ + error(err, ...args) { + if (err.code === 0) { + toast(err); + return; + } + + let hide = null; + const onhide = () => { + if (hide) hide(); + }; + + const msg = this.errorMessage(err, ...args); + alert(strings.error, msg, onhide); + + return new Promise((resolve) => { + hide = resolve; + }); + }, + /** + * Returns unique ID + * @returns {string} + */ + uuid() { + return ( + new Date().getTime() + Number.parseInt(Math.random() * 100000000000) + ).toString(36); + }, + /** + * Parses JSON string, if fails returns null + * @param {Object|Array} string + */ + parseJSON(string) { + if (!string) return null; + try { + return JSON.parse(string); + } catch (e) { + return null; + } + }, + /** + * Checks whether given type is directory or not + * @param {'dir'|'directory'|'folder'} type + * @returns {Boolean} + */ + isDir(type) { + return /^(dir|directory|folder)$/.test(type); + }, + /** + * Checks whether given type is file or not + * @param {'file'|'link'} type + * @returns {Boolean} + */ + isFile(type) { + return /^(file|link)$/.test(type); + }, + /** + * Replace matching part of url to alias name by which storage is added + * @param {String} url + * @returns {String} + */ + getVirtualPath(url) { + url = Url.parse(url).url; + + if (/^content:/.test(url)) { + const primary = Uri.getPrimaryAddress(url); + if (primary) { + return primary; + } + } + + /**@type {string[]} */ + const storageList = JSON.parse(localStorage.storageList || "[]"); + const storageListLen = storageList.length; + + for (let i = 0; i < storageListLen; ++i) { + const uuid = storageList[i]; + let storageUrl = Url.parse(uuid.uri || uuid.url || "").url; + if (!storageUrl) continue; + if (storageUrl.endsWith("/")) { + storageUrl = storageUrl.slice(0, -1); + } + const regex = new RegExp("^" + escapeStringRegexp(storageUrl)); + if (regex.test(url)) { + url = url.replace(regex, uuid.name); + break; + } + } + + return url; + }, + /** + * Updates uri of all active which matches the oldUrl as location + * of the file + * @param {String} oldUrl + * @param {String} newUrl + */ + updateUriOfAllActiveFiles(oldUrl, newUrl) { + const files = editorManager.files; + const { url } = Url.parse(oldUrl); + + for (let file of files) { + if (!file.uri) continue; + const fileUrl = Url.parse(file.uri).url; + if (new RegExp("^" + escapeStringRegexp(url)).test(fileUrl)) { + if (newUrl) { + file.uri = Url.join(newUrl, file.filename); + } else { + file.uri = null; + } + } + } + + editorManager.onupdate("file-delete"); + editorManager.emit("update", "file-delete"); + }, + /** + * Displays ad on the current page + */ + showAd() { + const { ad } = window; + if (IS_FREE_VERSION && innerHeight * devicePixelRatio > 600 && ad) { + const $page = tag.getAll("wc-page:not(#root)").pop(); + if ($page) { + ad.active = true; + ad.show(); + } + } + }, + /** + * Hides the ad + * @param {Boolean} [force=false] + */ + hideAd(force = false) { + const { ad } = window; + if (IS_FREE_VERSION && ad?.active) { + const $pages = tag.getAll(".page-replacement"); + const hide = $pages.length === 1; + + if (force || hide) { + ad.active = false; + ad.hide(); + } + } + }, + async toInternalUri(uri) { + return new Promise((resolve, reject) => { + window.resolveLocalFileSystemURL( + uri, + (entry) => { + resolve(entry.toInternalURL()); + }, + reject, + ); + }); + }, + promisify(func, ...args) { + return new Promise((resolve, reject) => { + func(...args, resolve, reject); + }); + }, + async checkAPIStatus() { + try { + const { status } = await ajax.get(Url.join(constants.API_BASE, "status")); + return status === "ok"; + } catch (error) { + window.log("error", error); + return false; + } + }, + fixFilename(name) { + if (!name) return name; + return name.replace(/(\r\n)+|\r+|\n+|\t+/g, "").trim(); + }, + /** + * Creates a debounced function that delays invoking the input function until after 'wait' milliseconds have elapsed + * since the last time the debounced function was invoked. Useful for implementing behavior that should only happen + * after the input is complete. + * + * @param {Function} func - The function to debounce. + * @param {number} wait - The number of milliseconds to delay. + * @returns {Function} The new debounced function. + * @example + * window.addEventListener('resize', debounce(myFunction, 200)); + */ + debounce(func, wait) { + let timeout; + return function debounced(...args) { + const later = () => { + clearTimeout(timeout); + func.apply(this, args); + }; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + }; + }, + defineDeprecatedProperty(obj, name, getter, setter) { + Object.defineProperty(obj, name, { + get: function () { + console.warn(`Property '${name}' is deprecated.`); + return getter.call(this); + }, + set: function (value) { + console.warn(`Property '${name}' is deprecated.`); + setter.call(this, value); + }, + }); + }, + parseHTML(html) { + const parser = new DOMParser(); + const doc = parser.parseFromString(html, "text/html"); + const children = doc.body.children; + if (children.length === 1) { + return children[0]; + } + return Array.from(children); + }, + async createFileStructure(uri, pathString, isFile = true) { + const parts = pathString.split("/").filter(Boolean); + let currentUri = uri; + + // Determine if it's a special case URI + const isSpecialCase = currentUri.includes("::"); + let baseFolder; + const isExternalStorageUri = currentUri.includes( + "com.android.externalstorage.documents", + ); + const isTermuxUri = currentUri.includes("com.termux.documents"); + const isAcodeTerminalPublicSafUri = currentUri.includes( + "com.foxdebug.acode.documents", + ); + const [, treeSegment = ""] = currentUri.split("/tree/"); + const terminalBasePath = isAcodeTerminalPublicSafUri + ? decodeURIComponent(treeSegment.split("::")[0] || "") + : ""; + + if (isExternalStorageUri) { + baseFolder = decodeURIComponent(currentUri.split("%3A")[1].split("/")[0]); + } else if ( + !(isExternalStorageUri || isTermuxUri || isAcodeTerminalPublicSafUri) + ) { + // Handle nested paths for regular file:// URIs + const pathParts = pathString.split("/").filter(Boolean); + let currentPath = uri; + let firstCreatedPath = null; + let firstCreatedType = null; + + for (let i = 0; i < pathParts.length; i++) { + const isLastPart = i === pathParts.length - 1; + const partName = pathParts[i]; + const newPath = Url.join(currentPath, partName); + + if (isLastPart && isFile) { + // Create file if it's the last part and we're creating a file + if (!(await fsOperation(newPath).exists())) { + await fsOperation(currentPath).createFile(partName); + if (firstCreatedPath === null) { + firstCreatedPath = newPath; + firstCreatedType = "file"; + } + } + } else { + // Create directory for intermediate parts or when creating a folder + if (!(await fsOperation(newPath).exists())) { + await fsOperation(currentPath).createDirectory(partName); + if (firstCreatedPath === null) { + firstCreatedPath = newPath; + firstCreatedType = "folder"; + } + } + } + currentPath = newPath; + } + + return { + uri: firstCreatedPath || Url.join(uri, pathParts[0]), + type: + firstCreatedType || + (isFile && pathParts.length === 1 ? "file" : "folder"), + }; + } + + for (let i = 0; i < parts.length; i++) { + const isLastElement = i === parts.length - 1; + const name = parts[i]; + let fullUri = currentUri; + + // Adjust URI for special cases + if (isExternalStorageUri) { + if (!isSpecialCase && i === 0) { + fullUri += `::primary:${baseFolder}/${name}`; + } else { + fullUri += `/${name}`; + } + } else if (isTermuxUri) { + if (!isSpecialCase && i === 0) { + fullUri += `::/data/data/com.termux/files/home/${name}`; + } else { + fullUri += `/${name}`; + } + } else if (isAcodeTerminalPublicSafUri) { + if (!isSpecialCase && i === 0) { + const sanitizedBase = terminalBasePath.endsWith("/") + ? `${terminalBasePath}${name}` + : `${terminalBasePath}/${name}`; + fullUri += `::${sanitizedBase}`; + } else { + fullUri += `/${name}`; + } + } + + if (isLastElement && isFile) { + // Create file if it's the last element and isFile is true + if (!(await fsOperation(fullUri).exists())) { + await fsOperation(currentUri).createFile(name); + } else { + return; + } + } else { + // Create directory + if (!(await fsOperation(fullUri).exists())) { + await fsOperation(currentUri).createDirectory(name); + } else { + return; + } + } + currentUri = fullUri; + } + let tileType; + if (isFile && parts.length === 1) { + tileType = "file"; + } else { + const urlParts = currentUri.split("/"); + const pathParts = pathString.split("/"); + const pathStartIndex = urlParts.findIndex( + (part) => part === pathParts[0], + ); + if (pathStartIndex !== -1) { + const pathEndIndex = pathStartIndex + pathParts.length; + urlParts.splice(pathStartIndex + 1, pathEndIndex - pathStartIndex - 1); + } + currentUri = urlParts.join("/"); + tileType = "folder"; + } + return { uri: currentUri, type: tileType }; + }, + formatDownloadCount(downloadCount) { + const units = ["", "K", "M", "B", "T"]; + let index = 0; + + while (downloadCount >= 1000 && index < units.length - 1) { + downloadCount /= 1000; + index++; + } + + const countStr = + downloadCount < 10 ? downloadCount.toFixed(2) : downloadCount.toFixed(1); + const trimmedCountStr = countStr.replace(/\.?0+$/, ""); + + return `${trimmedCountStr}${units[index]}`; + }, + isBinary(file) { + // binary file extensions + const binaryExtensions = [ + "exe", + "dll", + "so", + "dylib", + "bin", + "o", + "apk", + "aab", + "zip", + "rar", + "7z", + "gz", + "tar", + "tgz", + "jpg", + "jpeg", + "png", + "gif", + "bmp", + "ico", + "mp3", + "mp4", + "wav", + "avi", + "mov", + "dds", + "tga", + "swf", + "ttf", + "eot", + "otf", + "woff", + "woff2", + "pdf", + "doc", + "docx", + "xls", + "xlsx", + "class", + "pyc", + "jar", + "war", + ]; + + const extension = Url.basename(file)?.split(".")?.pop()?.toLowerCase(); + + if (extension && binaryExtensions.includes(extension)) { + return true; + } + return false; + }, +}; diff --git a/src/utils/keyboardEvent.js b/src/utils/keyboardEvent.js new file mode 100644 index 000000000..3eabdd098 --- /dev/null +++ b/src/utils/keyboardEvent.js @@ -0,0 +1,291 @@ +/** + * @typedef {object} KeyEvent + * @property {'keydown' | 'keypress' | 'keyup'} type the type of the event + * @property {boolean} bubbles whether the event bubbles up through the DOM or not + * @property {boolean} cancelable whether the event is cancelable or not + * @property {number} which the key code of the key pressed + * @property {number} keyCode the key code of the key pressed + * @property {string} key the key pressed + * @property {boolean} ctrlKey whether the ctrl key was pressed or not + * @property {boolean} shiftKey whether the shift key was pressed or not + * @property {boolean} altKey whether the alt key was pressed or not + * @property {boolean} metaKey whether the meta key was pressed or not + */ + +const keys = { + // arrow keys + 37: "ArrowLeft", + 38: "ArrowUp", + 39: "ArrowRight", + 40: "ArrowDown", + // special keys + 8: "Backspace", + 9: "Tab", + 13: "Enter", + 16: "ShiftLeft", + 17: "ControlLeft", + 18: "AltLeft", + 19: "Pause", + 20: "CapsLock", + 27: "Escape", + 32: " ", + 33: "PageUp", + 34: "PageDown", + 35: "End", + 36: "Home", + 45: "Insert", + 46: "Delete", +}; + +const initKeyboardEventType = (function (event) { + try { + event.initKeyboardEvent( + "keyup", // in DOMString typeArg + false, // in boolean canBubbleArg + false, // in boolean cancelableArg + window, // in views::AbstractView viewArg + "+", // [test]in DOMString keyIdentifierArg | webkit event.keyIdentifier | IE9 event.key + 3, // [test]in unsigned long keyLocationArg | webkit event.keyIdentifier | IE9 event.location + true, // [test]in boolean ctrlKeyArg | webkit event.shiftKey | old webkit event.ctrlKey | IE9 event.modifiersList + false, // [test]shift | alt + true, // [test]shift | alt + false, // meta + false, // altGraphKey + ); + + return ( + ((((event["keyIdentifier"] || event["key"]) === "+" && + event["location"]) || + event["keyLocation"] === 3) && + (event.ctrlKey + ? event.altKey + ? // webkit + 1 + : 3 + : event.shiftKey + ? 2 + : // webkit + 4)) || // IE9 + 9 + ); // FireFox|w3c + } catch (error) { + initKeyboardEventType = 0; + } +})(document.createEvent("KeyboardEvent")); + +const keyboardEventPropertiesDictionary = { + char: "", + key: "", + location: 0, + ctrlKey: false, + shiftKey: false, + altKey: false, + metaKey: false, + repeat: false, + locale: "", + + detail: 0, + bubbles: false, + cancelable: false, + + //legacy properties + keyCode: 0, + charCode: 0, + which: 0, +}; + +const own = Function.prototype.call.bind(Object.prototype.hasOwnProperty); + +const ObjectDefineProperty = + Object.defineProperty || + function (obj, prop, val) { + if ("value" in val) { + obj[prop] = val["value"]; + } + }; + +/** + * Creates a keyboard event + * @param {'keydown' | 'keyup'} type type of the event + * @param {KeyEvent} dict + * @returns + */ +export default function KeyboardEvent(type, dict) { + let event; + + if (initKeyboardEventType) { + event = document.createEvent("KeyboardEvent"); + } else { + event = document.createEvent("Event"); + } + + let propName; + let localDict = {}; + + if (!dict.key && (dict.keyCode || dict.which)) { + let key = keys[dict.keyCode || dict.which]; + if (!key) key = String.fromCharCode(dict.keyCode || dict.which); + dict.key = key; + } else if (dict.key && !dict.which && !dict.keyCode) { + let keyCode = Object.keys(keys).find((key) => keys[key] === dict.key); + if (!keyCode) keyCode = dict.key.charCodeAt(0); + dict.keyCode = keyCode; + dict.which = keyCode; + } + + for (propName in keyboardEventPropertiesDictionary) + if (own(keyboardEventPropertiesDictionary, propName)) { + localDict[propName] = ((own(dict, propName) && dict) || + keyboardEventPropertiesDictionary)[propName]; + } + + const ctrlKey = localDict["ctrlKey"]; + const shiftKey = localDict["shiftKey"]; + const altKey = localDict["altKey"]; + const metaKey = localDict["metaKey"]; + const altGraphKey = localDict["altGraphKey"]; + + const modifiersListArg = + initKeyboardEventType > 3 + ? ( + (ctrlKey ? "Control" : "") + + (shiftKey ? " Shift" : "") + + (altKey ? " Alt" : "") + + (metaKey ? " Meta" : "") + + (altGraphKey ? " AltGraph" : "") + ).trim() + : null; + + const key = localDict["key"] + ""; + const char = localDict["char"] + ""; + const location = localDict["location"]; + const keyCode = + localDict["keyCode"] || + (localDict["keyCode"] = (key && key.charCodeAt(0)) || 0); + const charCode = + localDict["charCode"] || + (localDict["charCode"] = (char && char.charCodeAt(0)) || 0); + const bubbles = localDict["bubbles"]; + const cancelable = localDict["cancelable"]; + const repeat = localDict["repeat"]; + const locale = localDict["locale"]; + const view = window; + + localDict["which"] || (localDict["which"] = localDict["keyCode"]); + + if ("initKeyEvent" in event) { + //FF + //https://developer.mozilla.org/en/DOM/event.initKeyEvent + event.initKeyEvent( + type, + bubbles, + cancelable, + view, + ctrlKey, + altKey, + shiftKey, + metaKey, + keyCode, + charCode, + ); + } else if (initKeyboardEventType && "initKeyboardEvent" in event) { + //https://developer.mozilla.org/en/DOM/KeyboardEvent#initKeyboardEvent() + if (initKeyboardEventType === 1) { + // webkit + //http://stackoverflow.com/a/8490774/1437207 + //https://bugs.webkit.org/show_bug.cgi?id=13368 + event.initKeyboardEvent( + type, + bubbles, + cancelable, + view, + key, + location, + ctrlKey, + shiftKey, + altKey, + metaKey, + altGraphKey, + ); + } else if (initKeyboardEventType === 2) { + // old webkit + //http://code.google.com/p/chromium/issues/detail?id=52408 + event.initKeyboardEvent( + type, + bubbles, + cancelable, + view, + ctrlKey, + altKey, + shiftKey, + metaKey, + keyCode, + charCode, + ); + } else if (initKeyboardEventType === 3) { + // webkit + event.initKeyboardEvent( + type, + bubbles, + cancelable, + view, + key, + location, + ctrlKey, + altKey, + shiftKey, + metaKey, + altGraphKey, + ); + } else if (initKeyboardEventType === 4) { + // IE9 + //http://msdn.microsoft.com/en-us/library/ie/ff975297(v=vs.85).aspx + event.initKeyboardEvent( + type, + bubbles, + cancelable, + view, + key, + location, + modifiersListArg, + repeat, + locale, + ); + } else { + // FireFox|w3c + //http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent-initKeyboardEvent + //https://developer.mozilla.org/en/DOM/KeyboardEvent#initKeyboardEvent() + event.initKeyboardEvent( + type, + bubbles, + cancelable, + view, + char, + key, + location, + modifiersListArg, + repeat, + locale, + ); + } + } else { + event.initEvent(type, bubbles, cancelable); + } + + for (propName in keyboardEventPropertiesDictionary) + if (own(keyboardEventPropertiesDictionary, propName)) { + if (event[propName] !== localDict[propName]) { + try { + delete event[propName]; + ObjectDefineProperty(event, propName, { + writable: true, + value: localDict[propName], + }); + } catch (error) { + //Some properties is read-only + } + } + } + + return event; +} diff --git a/src/utils/polyfill.js b/src/utils/polyfill.js new file mode 100644 index 000000000..695c56ce2 --- /dev/null +++ b/src/utils/polyfill.js @@ -0,0 +1,90 @@ +export default function loadPolyFill() { + if (!("isConnected" in Node.prototype)) { + Object.defineProperty(Node.prototype, "isConnected", { + get() { + return ( + !this.ownerDocument || + !( + this.ownerDocument.compareDocumentPosition(this) & + this.DOCUMENT_POSITION_DISCONNECTED + ) + ); + }, + }); + } + + if (!DOMTokenList.prototype.replace) { + DOMTokenList.prototype.replace = function (a, b) { + if (this.contains(a)) { + this.add(b); + this.remove(a); + return true; + } + return false; + }; + } + + if (!HTMLElement.prototype.append) { + HTMLElement.prototype.append = function (...nodes) { + nodes.map((node) => this.appendChild(node)); + }; + } + + if (!HTMLElement.prototype.remove) { + HTMLElement.prototype.remove = function () { + this.parentElement.removeChild(this); + }; + } + + if (!HTMLElement.prototype.getParent) { + HTMLElement.prototype.getParent = function (queryString) { + const $$ = [...document.querySelectorAll(queryString)]; + for (let $ of $$) if ($.contains(this)) return $; + return null; + }; + } + + if (!String.prototype.hashCode) { + Object.defineProperty(String.prototype, "hashCode", { + value: function () { + let hash = 0; + for (let i = 0; i < this.length; i++) { + const chr = this.charCodeAt(i); + hash = (hash << 5) - hash + chr; + hash |= 0; // Convert to 32bit integer + } + return Math.abs(hash) + (hash < 0 ? "N" : ""); + }, + }); + } + + if (!String.prototype.subtract) { + Object.defineProperty(String.prototype, "subtract", { + value: function (str) { + return this.replace(new RegExp("^" + str), ""); + }, + }); + } + + if (!String.prototype.capitalize) { + Object.defineProperty(String.prototype, "capitalize", { + value: function (index) { + if (typeof index === "number" && index >= 0) { + const strs = [ + this.slice(0, index), + this.slice(index, index + 1), + this.slice(index + 1), + ]; + return strs[0] + (strs[1] ? strs[1].toUpperCase() : "") + strs[2]; + } else { + let strs = this.split(" "); + strs = strs.map((str) => { + if (str.length > 0) return str[0].toUpperCase() + str.slice(1); + return ""; + }); + return strs.join(" "); + } + }, + }); + } +} diff --git a/src/utils/taskManager.js b/src/utils/taskManager.js new file mode 100644 index 000000000..076403219 --- /dev/null +++ b/src/utils/taskManager.js @@ -0,0 +1,79 @@ +export default class TaskManager { + /** + * @typedef {'linear'|'parallel'} TaskManagerMode + */ + + /** + * @type {Array<()=>Promise>} + */ + #queue = []; + /** + * @type {TaskManagerMode} + */ + #mode = "linear"; + /** + * @type {boolean} + */ + #busy = false; + /** + * @type {TaskCallback[]} + */ + #listeners = []; + #count = 0; + + /** + * Create new TaskManager + * @param {TaskManagerMode} mode + */ + constructor(mode) { + this.#mode = mode; + + this.queueTask = this.queueTask.bind(this); + } + + /** + * Add task to queue + * @param {()=>Promise} task + */ + async queueTask(task) { + this.#queue.push(task); + this.#execNext(); + return new Promise((resolve, reject) => { + const listener = (t, result, error) => { + if (t !== task) return; + + this.#listeners = this.#listeners.filter((l) => l !== listener); + + if (error) reject(error); + else resolve(result); + }; + + this.#listeners.push(listener); + }); + } + + async #execNext() { + if (this.#mode === "linear" && this.#busy) { + return; + } + + const task = this.#queue.shift(); + if (!task) return; + + let result; + let error; + + try { + this.#busy = true; + const id = this.#count++; + result = await task(id); + } catch (err) { + error = err; + } finally { + this.#busy = false; + } + + this.#listeners.forEach((l) => l(task, result, error)); + if (this.#mode === "linear") this.#execNext(); + } +} diff --git a/src/views/ad.hbs b/src/views/ad.hbs deleted file mode 100644 index 7588f7559..000000000 --- a/src/views/ad.hbs +++ /dev/null @@ -1,21 +0,0 @@ - -
      - a message from author. - -
      - -
      - {{#image}} -
      - {{/image}} -
      - {{#title}} - {{.}} - {{/title}} - {{#description}} - {{.}} - {{/description}} -
      -
      -
      -
      \ No newline at end of file diff --git a/src/views/checkbox.hbs b/src/views/checkbox.hbs deleted file mode 100644 index 8dfa4030e..000000000 --- a/src/views/checkbox.hbs +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/src/views/context-menu.hbs b/src/views/context-menu.hbs deleted file mode 100644 index 764882597..000000000 --- a/src/views/context-menu.hbs +++ /dev/null @@ -1,4 +0,0 @@ -{{copy}} -{{^readOnly}}{{cut}}{{/readOnly}} -{{^readOnly}}{{paste}}{{/readOnly}} -{{select all}} \ No newline at end of file diff --git a/src/views/file-info.hbs b/src/views/file-info.hbs index 404b04ec2..3fc346f68 100644 --- a/src/views/file-info.hbs +++ b/src/views/file-info.hbs @@ -1,33 +1,40 @@ -
      -
      - {{name}} -
      -
      - {{lang.size}} - {{length}} -
      -
      - {{lang.last modified}} - {{lastModified}} -
      -
      - {{lang.line count}} - {{lineCount}} -
      -
      - {{lang.word count}} - {{wordCount}} -
      -
      - {{lang.type}} - {{type}} -
      -
      - {{lang.path}} - {{showUri}} -
      - -
      \ No newline at end of file +
      +
      +
      + {{name}} + {{extension}} +
      +
      + +
      +
      + {{lang.size}} + {{length}} +
      +
      + {{lang.type}} + {{type}} +
      +
      + {{lang.last modified}} + {{lastModified}} +
      + {{#isEditor}} +
      + {{lang.line count}} + {{lineCount}} +
      +
      + {{lang.word count}} + {{wordCount}} +
      + {{/isEditor}} +
      + +
      +
      + {{lang.path}} + {{showUri}} +
      +
      +
      diff --git a/src/views/file-menu.hbs b/src/views/file-menu.hbs index 5c2407b2d..734e2a5cb 100644 --- a/src/views/file-menu.hbs +++ b/src/views/file-menu.hbs @@ -1,4 +1,4 @@ -
    • +
    • {{file properties}}
    • @@ -6,13 +6,14 @@
    • {{rename}}
    • +{{#is_editor}}
    • {{syntax highlighting}} {{file_mode}}
    • -
    • +
    • {{encoding}} {{file_encoding}} @@ -24,6 +25,9 @@ {{file_eol}}
    • +{{/is_editor}} + +{{#is_editor}}
    • {{read only}} @@ -38,6 +42,24 @@ {{format}}
    • +{{/is_editor}} +
      +{{#file_on_disk}} +
    • + {{share}} + +
    • +
    • + {{open with}} + +
    • +
    • + {{edit with}} + +
    • +{{/file_on_disk}} + +{{#is_editor}}
    • {{search}} @@ -48,33 +70,35 @@

    • +{{^file_read_only}}
    • {{insert color}}

    • +{{#copy_text}}
    • {{cut}}
    • -
    • +{{/copy_text}} +
    • - {{copy}} + {{paste}}
    • -
    • +{{/file_read_only}} +{{#copy_text}} +
    • - {{paste}} + {{copy}}
    • +{{/copy_text}}
    • {{select all}}
    • -
    • -
      - {{select word}} -
      -
    • \ No newline at end of file +{{/is_editor}} diff --git a/src/views/footer/row1.hbs b/src/views/footer/row1.hbs deleted file mode 100644 index 1b0919ce7..000000000 --- a/src/views/footer/row1.hbs +++ /dev/null @@ -1,27 +0,0 @@ -
      -
      - - - - - - - - -
      -
      - - - - - - - - -
      -
      \ No newline at end of file diff --git a/src/views/footer/row2.hbs b/src/views/footer/row2.hbs deleted file mode 100644 index 320a8f8d8..000000000 --- a/src/views/footer/row2.hbs +++ /dev/null @@ -1,22 +0,0 @@ -
      -
      - - - - - - - - -
      -
      - - - - - - - - -
      -
      \ No newline at end of file diff --git a/src/views/footer/search.hbs b/src/views/footer/search.hbs deleted file mode 100644 index 62dda3252..000000000 --- a/src/views/footer/search.hbs +++ /dev/null @@ -1,16 +0,0 @@ -
      - - - - -
      -
      - - - -
      - 0 - of - 0 -
      -
      \ No newline at end of file diff --git a/src/views/menu.hbs b/src/views/menu.hbs index 20e42bd6a..b7b967f9a 100644 --- a/src/views/menu.hbs +++ b/src/views/menu.hbs @@ -22,14 +22,17 @@ {{open recent}} +
    • + {{find file}} + +
    • {{console}}
    • -
      -
    • - {{github}} - +
    • + {{terminal}} +

    • @@ -44,4 +47,4 @@
    • {{exit}} -
    • \ No newline at end of file + diff --git a/src/views/social-links.hbs b/src/views/social-links.hbs deleted file mode 100644 index dc5092acb..000000000 --- a/src/views/social-links.hbs +++ /dev/null @@ -1,5 +0,0 @@ -
      - - - -
      \ No newline at end of file diff --git a/test/path.test.js b/test/path.test.js deleted file mode 100644 index 2028a150f..000000000 --- a/test/path.test.js +++ /dev/null @@ -1,11 +0,0 @@ -import path from "../src/lib/utils/Path"; - -test("path -> dirname", () => { - const dirname = path.dirname("/dir/dir2/dir3/demo.txt"); - expect(dirname).toBe("/dir/dir2/dir3"); -}); - -test("path -> join", () => { - const joinedPath = path.join("app/src/css/master.css", "../../js/main.js"); - expect(joinedPath).toBe("app/src/js/main.js"); -}); \ No newline at end of file diff --git a/test/url.test.js b/test/url.test.js deleted file mode 100644 index 2fc5b6951..000000000 --- a/test/url.test.js +++ /dev/null @@ -1,122 +0,0 @@ -import Url from '../src/lib/utils/Url'; - -test("Url -> basename", () => { - let basename, url; - - url = "content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3Dencoded%3DbSqLqOpTy%2BnoaoMrsVBZyB3AlfGth828I9DFDUxHsBzP3IHCj0u8UVVY"; - basename = Url.basename(url); - expect(basename).toBeNull(); - - url = "ftp://user:pass@ftp.foxdebug.com/?mode=passive"; - basename = Url.basename(url); - expect(basename).toBe(""); - - url = "ftp://user:pass@ftp.foxdebug.com?mode=passive"; - basename = Url.basename(url); - expect(basename).toBe(""); - - url = "ftp://user:pass@ftp.foxdebug.com/src/index.html?mode=passive"; - basename = Url.basename(url); - expect(basename).toBe("index.html"); - - url = "content://com.android.externalstorage.documents/document/primary%3AAcode%2Freact-app%2Findex.html"; - basename = Url.basename(url); - expect(basename).toBe("index.html"); - - url = "content://com.android.externalstorage.documents/tree/AA98-181D%3A::AA98-181D:Acode editor/react-app/src/index.js"; - basename = Url.basename(url); - expect(basename).toBe("index.js"); -}); - -test("Url -> extname", () => { - let extname, url; - - url = "content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3Dencoded%3DbSqLqOpTy%2BnoaoMrsVBZyB3AlfGth828I9DFDUxHsBzP3IHCj0u8UVVY"; - extname = Url.extname(url); - expect(extname).toBeNull(); - - url = "ftp://user:pass@ftp.foxdebug.com/src/index.html?mode=passive"; - extname = Url.extname(url); - expect(extname).toBe(".html"); - - url = "content://com.android.externalstorage.documents/document/primary%3AAcode%2Freact-app%2Findex.html"; - extname = Url.extname(url); - expect(extname).toBe(".html"); - - url = "content://com.android.externalstorage.documents/tree/AA98-181D%3A::AA98-181D:Acode editor/react-app/src/index.js"; - extname = Url.extname(url); - expect(extname).toBe(".js"); -}); - -test("Url -> join", () => { - let join, url; - - url = "content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3Dencoded%3DbSqLqOpTy%2BnoaoMrsVBZyB3AlfGth828I9DFDUxHsBzP3IHCj0u8UVVY"; - join = Url.join(url, "../src/main.js"); - expect(join).toBeNull(); - - url = "ftp://user:pass@ftp.foxdebug.com/src/index.html?mode=passive"; - join = Url.join(url, "../main.js"); - expect(join).toBe("ftp://user:pass@ftp.foxdebug.com/src/main.js?mode=passive"); - - url = "content://com.android.externalstorage.documents/document/primary%3AAcode%2Freact-app%2Findex.html"; - join = Url.join(url, "../main.js"); - expect(join).toBe("file:///storage/emulated/0/Acode/react-app/main.js"); - - url = "content://com.android.externalstorage.documents/tree/AA98-181D%3A::AA98-181D:Acode editor/react-app/src/index.js"; - join = Url.join(url, "../main.js"); - expect(join).toBe("content://com.android.externalstorage.documents/tree/AA98-181D%3A::AA98-181D:Acode editor/react-app/src/main.js"); - - url = "content://com.android.externalstorage.documents/document/AA98-181D%3AAcode%20editor%2Freact-app%2Fsrc%2Findex.js"; - join = Url.join(url, "../main.js"); - expect(join).toBe("content://com.android.externalstorage.documents/tree/AA98-181D%3A::AA98-181D:Acode editor/react-app/src/main.js"); -}); - -test("Url -> pathname", () => { - let pathname, url; - - url = "content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3Dencoded%3DbSqLqOpTy%2BnoaoMrsVBZyB3AlfGth828I9DFDUxHsBzP3IHCj0u8UVVY"; - pathname = Url.pathname(url); - expect(pathname).toBeNull(); - - url = "ftp://user:pass@ftp.foxdebug.com/src/index.html?mode=passive"; - pathname = Url.pathname(url); - expect(pathname).toBe("/src/index.html"); - - url = "content://com.android.externalstorage.documents/document/primary%3AAcode%2Freact-app%2Findex.html"; - pathname = Url.pathname(url); - expect(pathname).toBe("/storage/emulated/0/Acode/react-app/index.html"); - - url = "content://com.android.externalstorage.documents/tree/AA98-181D%3A::AA98-181D:Acode editor/react-app/src/index.js"; - pathname = Url.pathname(url); - expect(pathname).toBe("/Acode editor/react-app/src/index.js"); - - url = "content://com.android.externalstorage.documents/document/AA98-181D%3AAcode%20editor%2Freact-app%2Fsrc%2Findex.js"; - pathname = Url.pathname(url); - expect(pathname).toBe("/Acode editor/react-app/src/index.js"); -}); - -test("Url -> dirname", () => { - let dirname, url; - - url = "content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3Dencoded%3DbSqLqOpTy%2BnoaoMrsVBZyB3AlfGth828I9DFDUxHsBzP3IHCj0u8UVVY"; - dirname = Url.dirname(url); - expect(dirname).toBeNull(); - - url = "ftp://user:pass@ftp.foxdebug.com/src/index.html?mode=passive"; - dirname = Url.dirname(url); - expect(dirname).toBe("ftp://user:pass@ftp.foxdebug.com/src/?mode=passive"); - - url = "content://com.android.externalstorage.documents/document/primary%3AAcode%2Freact-app%2Findex.html"; - dirname = Url.dirname(url); - expect(dirname).toBe("file:///storage/emulated/0/Acode/react-app/"); - - debugger; - url = "content://com.android.externalstorage.documents/tree/AA98-181D%3A::AA98-181D:Acode editor/react-app/src/index.js"; - dirname = Url.dirname(url); - expect(dirname).toBe("content://com.android.externalstorage.documents/tree/AA98-181D%3A::AA98-181D:Acode editor/react-app/src/"); - - url = "content://com.android.externalstorage.documents/document/AA98-181D%3AAcode%20editor%2Freact-app%2Fsrc%2Findex.js"; - dirname = Url.dirname(url); - expect(dirname).toBe("content://com.android.externalstorage.documents/tree/AA98-181D%3A::AA98-181D:Acode editor/react-app/src/"); -}); \ No newline at end of file diff --git a/typings/cordova-typings.d.ts b/typings/cordova-typings.d.ts deleted file mode 100644 index 18cf1cf62..000000000 --- a/typings/cordova-typings.d.ts +++ /dev/null @@ -1,2 +0,0 @@ - -/// \ No newline at end of file diff --git a/typings/main.d.ts b/typings/main.d.ts deleted file mode 100644 index aa1f1dbd7..000000000 --- a/typings/main.d.ts +++ /dev/null @@ -1,620 +0,0 @@ -interface Acode { - exec(command: string, value?: any): boolean; - readonly exitAppMessage: string; - $menuToggler: HTMLElement; - $editMenuToggler: HTMLElement; - setLoadingMessage(message: string): void; -} - -interface fileBrowserSettings { - showHiddenFiles: 'on' | 'off'; - sortByName: 'on' | 'off'; -} - -interface searchSettings { - wrap: boolean; - caseSensitive: boolean; - regExp: boolean; - wholeWord: boolean; -} - -interface Settings { - animation: boolean; - autosave: number; - fileBrowser: fileBrowserSettings; - maxFileSize: number; - filesNotAllowed: string[]; - search: searchSettings; - lang: string; - fontSize: string; - editorTheme: string; - appTheme: string; - textWrap: boolean; - softTab: boolean; - tabSize: number; - linenumbers: boolean; - beautify: Array; - linting: boolean; - previewMode: 'browser' | 'in app' | 'none'; - showSpaces: boolean; - openFileListPos: 'sidebar' | 'header'; - quickTools: boolean; - editorFont: 'fira code' | 'default'; - vibrateOnTap: boolean; - fullscreen: boolean; - smartCompletion: boolean; - floatingButtonActivation: 'click' | 'long tap'; - floatingButton: boolean; - liveAutoCompletion: boolean; - showPrintMargin: boolean; - cursorControllerSize: 'none' | 'small' | 'large'; - scrollbarSize: number; - confirmOnExit: boolean; - customTheme: Map; - customThemeMode: 'light' | 'dark'; - lineHeight: number; - checkFiles: boolean; - desktopMode: boolean; - console: 'legacy' | 'eruda'; - keyboardMode: 'CODE' | 'NORMAL'; -} - -interface AppSettings { - value: Settings; - update(settings?: Settings, showToast?: boolean): Promise; - update(showToast?: boolean): Promise; - defaultSettings: Settings; - reset(): void; - onload: () => void; - onsave: () => void; - loaded: boolean; - isFileAllowed(ext: string): boolean; - on( - eventName: 'reset' | 'update', - callback: (this: Settings, settings: Settings | string) => void, - ): void; - off( - eventName: 'reset' | 'update', - callback: (this: Settings, settings: Settings | string) => void, - ): void; -} - -interface ActionStackOptions { - id: string; - action(): void; -} - -interface ActionStack { - push(options: ActionStackOptions): void; - pop(): ActionStack; - remove(id: string): void; - has(id: string): boolean; - length: number; - /** - * Sets a mark to recently pushed action - */ - setMark(): void; - /** - * Remove all actions that are pushed after marked positions (using `setMark()`) - */ - clearFromMark(): void; - /** - * Callback function when app is to close - */ - onCloseApp: () => void; -} - -interface storedFiles { - name: string; - data?: string; - url?: string; - fileUri?: string; -} - -interface fileOptions { - name: string; - uri: string; -} - -interface NewFileOptions { - uri?: string; - text?: string; - render?: boolean; - readonly?: boolean; - cursorPos?: AceAjax.Position; - type: 'regular' | 'git' | 'gist'; - record: Repo | Gist; - onsave(): void; - isUnsaved: boolean; - mode: 'single' | 'tree'; -} - -interface Controls { - start: HTMLSpanElement; - end: HTMLSpanElement; - menu: HTMLSpanElement; - fullContent: string; - update: () => void; - color: HTMLSpanElement; - checkForColor(): void; - hScrollbar: Scrollbar; - vScrollbar: Scrollbar; -} - -interface Scrollbar extends HTMLElement { - size: number; - value: number; - /**Destroys the scrollbar by removing it from DOM and memory. */ - destroy(): void; - /**Displays the scrollbar and hides after 3 seconds of inactivity. */ - render(): void; - /**Resize the scrollbar dimension value. */ - resize(render: boolean): void; - /**Callback function called when scrollbar is rendered. */ - onhide(): void; - /**Callback function called when scrollbar is removed. */ - onshow(): void; - /**Renders the scrollbar. */ - show(): void; - /**Hides the scroller. */ - hide(): void; -} - -interface File { - assocTile: HTMLElement; - /** - * Location of the file on the current device or on remote server/device. - */ - uri: string; - /** - * Name of the file - */ - filename: string; - /** - * Unique ID of the file. - */ - id: string; - /** - * If changed is changed this will be marked as true else false. - */ - isUnsaved: boolean; - /** - * Path of the file. - */ - location: string; - /** - * Checked if file can be edited. - */ - readOnly: boolean; - /** - * Type of file. - */ - type: 'regular' | 'git' | 'gist'; - record: Repo & Gist; - updateControls(): void; - session: AceAjax.IEditSession; - editable: boolean; - canWrite: boolean; - uuid: string; - onsave(this: File): void; - mode: 'single' | 'tree'; - /** - * Write file data to cache - */ - writeToCache(): Promise; - /** - * Checks if file is changed or not - */ - isChanged(): Promise; - /** - * gets and sets new line mode of deocument - */ - eol: 'unix' | 'windows' | 'auto'; -} - -interface FileStatus { - canRead: boolean; - canWrite: boolean; - exists: boolean; //indicates if file can be found on device storage - isDirectory: boolean; - isFile: boolean; - isVirtual: boolean; - lastModified: number; - length: number; - name: string; - type: string; - uri: string; -} - -interface OriginObject { - origin: string; - query: string; -} - -interface URLObject { - url: string; - query: string; -} - -interface fileData { - file: FileEntry; - data: ArrayBuffer; -} - -interface ExternalFs { - readFile(): Promise; - createFile( - parent: string, - filename: string, - data: string, - ): Promise<'SUCCESS'>; - createDir(parent: string, path: string): Promise<'SUCCESS'>; - deleteFile(filename: string): Promise<'SUCCESS'>; - writeFile(filename: string, content: string): Promise<'SUCCESS'>; - renameFile(src: string, newname: string): Promise<'SUCCESS'>; - copy(src: string, dest: string): Promise<'SUCCESS'>; - move(src: string, dest: string): Promise<'SUCCESS'>; - stats(src: string): Promise; - uuid: string; -} - -interface RemoteFs { - listDir(path: string): Promise>; - readFile(path: string): Promise; - createFile(filename: string, data: string): Promise; - createDir(path: string): Promise; - deleteFile(filename: string): Promise; - deleteDir(path: string): Promise; - writeFile(filename: string, content: string): Promise; - rename(src: string, newname: string): Promise; - copyTo(src: string, dest: string): Promise; - currentDirectory(): Promise; - homeDirectory(): Promise; - stats(src: string): Promise; - /** - * Resolve with true if file exists else resolve if false. Rejects if any error is generated. - */ - exists(): Promise; - origin: string; - originObjec: OriginObject; -} - -interface InternalFs { - copyTo(dest: string): Promise; - moveTo(dest: string): Promise; - listDir(path: string): Promise; - createDir(parent: string, dirname: string): Promise; - deleteFile(filename: string): Promise; - readFile(filename: string): Promise; - writeFile( - filename: string, - content: string, - create: boolean, - exclusive: boolean, - ): Promise; - renameFile(src: string, newname: string): Promise; - stats(src: string): Promise; - exists(): Promise; -} - -interface FsEntry { - url: string; - isDirectory: boolean; - isFile: boolean; -} - -interface FileSystem { - lsDir(): Promise>; - readFile(): Promise; - readFile(encoding: string): Promise; - writeFile(content: string): Promise; - createFile(name: string, data: string): Promise; - createDirectory(name: string): Promise; - deleteFile(): Promise; - deleteDir(): Promise; - copyTo(dest: string): Promise; - moveTo(dset: string): Promise; - renameTo(newName: string): Promise; - exists(): Promise; - stats(): Promise; -} - -interface externalStorageData { - path: string; - name: string; - origin: string; -} - -interface elementContainer { - [key: string]: HTMLElement; -} - -interface GistFile { - filename: string; - content: string; -} - -interface GistFiles { - [filename: string]: GistFile; -} - -interface Repository {} - -interface Repo { - readonly sha: string; - name: string; - data: string; - repo: string; - path: string; - branch: 'master' | 'main' | string; - commitMessage: string; - setName(name: string): Promise; - setData(data: string): Promise; - repository: Repository; -} - -interface Gist { - readonly id: string; - readonly isNew: boolean; - files: GistFiles; - setName(name: string, newName: string): Promise; - setData(name: string, text: string): Promise; - addFile(name: string): void; - removeFile(name: string): Promise; -} - -interface GitRecord { - get(sha: string): Promise; - add(gitFileRecord: Repo): void; - remove(sha: string): Repo; - update(sha: string, gitFileRecord: Repo): void; -} - -interface GistRecord { - get(id: string): Gist; - add(gist: any, isNew?: boolean): void; - remove(gist: Gist): Gist; - update(gist: Gist): void; - reset(): void; -} - -interface EditorScroll { - readonly $vScrollbar: Scrollbar; - readonly $hScrollbar: Scrollbar; -} - -interface Manager { - addNewFile(filename: string, options: NewFileOptions): File; - getFile( - checkFor: string | number | Repo | Gist, - type: 'id' | 'name' | 'uri' | 'git' | 'gist', - ): File; - switchFile(id: string): void; - removeFile(id: string | File, force: boolean): void; - editor: AceAjax.Editor; - activeFile: File; - onupdate(operation: string, ...args: any): void; - files: Array; - controls: Controls; - state: 'blur' | 'focus'; - setSubText(file: File): void; - moveOpenFileList(): void; - sidebar: HTMLDivElement; - container: HTMLDivElement; - readonly scroll: EditorScroll; - readonly TIMEOUT_VALUE: number; - readonly openFileList: HTMLElement; -} - -interface Strings { - [key: string]: string; -} - -interface Collaspable { - $title: HTMLElement; - $ul: HTMLElement; - ontoggle(): void; - collapse(): void; - uncollapse(): void; - collapsed: boolean; -} - -interface Folder { - reload(): void; - url: string; - $node: Collaspable & HTMLElement; - remove(): void; - reloadOnResume: boolean; - saveState: boolean; - title: string; - id: string; -} - -interface Window { - restoreTheme(): void; -} - -interface FileClipBoard { - method: 'copy' | 'cut'; - type: 'file' | 'dir'; - nodeId: string; -} - -interface ThemeData { - name: string; - type: 'light' | 'dark'; - isFree: boolean; - darken: string; - primary: string; -} - -interface AppThemeList { - [theme: string]: ThemeData; -} - -interface Prompt { - /** - * Body of the prompt - */ - $body: HTMLElement; - /** - * Hides the prompt - */ - hide(): void; -} - -interface Input { - id: string; - type: - | 'text' - | 'numberic' - | 'tel' - | 'search' - | 'email' - | 'url' - | 'checkbox' - | 'radio' - | 'group' - | 'button'; - match: RegExp; - value: string; - name: string; - required: boolean; - hints(options: Array): void; - placeholder: string; - disabled: boolean; - onclick(this: HTMLElement): void; -} - -interface FTPFile { - name: string; - link: string; - type: number; - size: number; - modifiedDate: string; - absolutePath: string; -} - -interface PathObject { - dir: string; - root: string; - base: string; - name: string; - ext: string; -} - -interface PathData { - url: string; - name: string; - isDirectory: boolean; - type: string; - parent: boolean; -} - -interface String extends String { - /** - * Capitalize the string for e.g. converts "this is a string" to "This Is A string" - */ - capitalize(): string; - /** - * Capitalize a character at given index for e.g. - * ```js - * "this is a string".capitalize(0) //"This is a string" - * ``` - */ - capitalize(index: number): string; - /** - * Returns hashcode of the string - */ - hashCode(): string; - /** - * Subtract the string passed in argument from the given string, - * For e.g. ```"myname".subtract("my") //"name"``` - */ - subtract(str: string): string; -} - -interface RecentPathData { - type: 'file' | 'dir'; - val: RecentPathDataValue; -} - -interface RecentPathDataValue { - opts: Object; - url: string; -} - -interface KeyBinding { - description: string; - key: string; - readOnly: boolean; - action: string; -} - -interface Promotion { - image: string; - title: string; - description: string; -} - -/** - * Returns fully decoded url - * @param url - */ -declare function decodeURL(url: string): string; - -/** - * App settings - */ -declare var appSettings: AppSettings; -/** - * language of the app - */ -declare var lang: string; -/** - * Predefined strings for language support - */ -declare var strings: Strings; -/** - * Handles back button click - */ -declare var Acode: Acode; -declare var AceMouseEvent: any; - -declare var ASSETS_DIRECTORY: string; -declare var CACHE_STORAGE: string; -declare var DATA_STORAGE: string; -declare var DOES_SUPPORT_THEME: boolean; -declare var IS_FREE_VERSION: boolean; -declare var KEYBINDING_FILE: string; -declare var ANDROID_SDK_INT: number; - -declare var modelist: any; -declare var beautify: any; -declare var intent: any; - -declare var $placeholder: HTMLElement; -declare var pageCount: number; -declare var saveTimeout: number; -declare var promotion: Promotion; -declare var appStarted: boolean; -declare var defaultKeyBindings: Map; -declare var customKeyBindings: Map; -declare var ace: AceAjax.Ace; -declare var actionStack: ActionStack; -declare var addedFolder: Array; -declare var app: HTMLBodyElement; -declare var editorManager: Manager; -declare var fileClipBoard: FileClipBoard; -declare var freeze: boolean; -declare var gitRecord: GitRecord; -declare var gistRecord: GistRecord; -declare var gitRecordFile: string; -declare var gistRecordFile: string; -declare var root: HTMLDivElement; -declare var saveInterval: number; -declare var toastQueue: Array; -declare var __sftpBusy: boolean; -declare var __sftpTaskQueue: Array<() => void>; -declare var keyBindings: (name: string) => string; -declare var toast: (string) => void; diff --git a/updates.txt b/updates.txt deleted file mode 100644 index 07818a8bb..000000000 --- a/updates.txt +++ /dev/null @@ -1,289 +0,0 @@ -version 1.5.3 -☞ Disable keyboard suggestions in settings. -☞ Users can now select a file(s) to upload in the in-app browser. -☞ Fixed bug, user unable to change color data of custom theme. -☞ Fixed bug, incorrect name of folder when select folder using 'Add path' option. -☞ Click the website icon to refresh. -☞ The console will appear when the user previews the code browser from the in-app browser. -☞ Fixed minor bugs. - -version 1.5.2 -☞ Fixed in-app browser force closing on android 6.0. -☞ Console toggler visible when preview mode set to browser. -☞ Removed swipe to refresh due to issue in scrolling of nested elements in HTML. -☞ Updated in-app browser UI, fixed UI bug in older Android. -☞ Users can edit URLs in the in-app browser. -☞ New symbols keys in the quick toolbar. -☞ Minor bug fixes. - -version 1.5.1 -☞ Added ability to refresh in in-app-browser. -☞ Url is now visible in the in-app browser. -☞ Fixed other minor bugs. - -version 1.5.0 -☞ Added new in-app browser. -☞ Added all console methods like time, timeEnd, info, etc. -☞ New Punjabi Translation by NiceSapien. -☞ Added new Eruda console. Select from other settings. - -version 1.4.164 -☞ Added option to close the file in the menu. -☞ Added option to reset remote connections. -☞ Performance improvement. -☞ Fixed bug in SFTP. -☞ Fixed bug, keybindings not loading. -☞ UI improvements. - -version 1.4.163 -☞ Fixed bug in opening file from GitHub. -☞ Fixed, app not opening another language. -☞ Fixed unable to rename the file from the edit menu. -☞ Other minor bug fixes. - -version 1.4.162 -☞ Bugs fixes. -☞ Updated language pack - -version 1.4.161 -☞ Fixed app not opening Android 5. - -version 1.4.160 -☞ Fixed app not opening without internet. - -version 1.4.159 -☞ Grant Acode permission to access files system. - -version 1.3.157 -☞ Option to cancel connection if taking a long time. -☞ Fixed unable to open some SFTP directory with special characters. - -version 1.3.156 -☞ **BREAKING CHANGES, BEFORE UPDATING SAVE YOUR ALL FILES** -☞ Added SFTP. -☞ Better file recovery. -☞ Updated language pack. -☞ Performance improvement. -☞ Fixed a bug that forces the app to crash. -☞ Bugs fixes. - -version 1.2.149 -☞ Fixed unable to open document. -☞ Fixed bug, app crashing on Android 11. -☞ Updated language pack. -☞ Custom theme. -☞ Bugs fixes. - -version 1.2.143 -☞ Updated language pack. -☞ Now you can preview SVG files. -☞ Now you can insert images/files to a project folder. -☞ Refactored version semantics. -☞ Files now remember the last visited directory. -☞ Bugs fixes - -version 1.1.15.141 -☞ Updated language pack. -☞ Minor bug fixes. - -version 1.1.15.140 -☞ New theme OLED display. -☞ Updated language pack. -☞ Minor bug fixes. - -version 1.1.14.137 -☞ Added option to disable the console. -☞ Added option disable confirmation on exit the app. -☞ Fixed unable to preview HTML or Js file. -☞ Fixed unable to open gist files. -☞ Fixed, Esc key not working in the editor. -☞ Other minor bug fixes. - -version 1.1.14.134 -☞ Fixed not able to preview HTML from sd card. - -version 1.1.14.133 -☞ Fixed dir list not working. - -version 1.1.14.132 -☞ Close current tab (Ctrl-Q) -☞ Close all open tabs (Ctrl-Shift-Q) -☞ Scrollbar now works with mouse -☞ Added option to disable teardrop (cursor controller) -☞ Added the Belarusian language -☞ Fixed scrollbar behavior -☞ GUI improvement -☞ Performance improvement -☞ Small bugs fix - -version 1.1.14.131 -☞ Fixed scrollbar behavior -☞ GUI improvement -☞ Performance improvement -☞ Small bugs fix - -version 1.1.14.129 -☞ Added the Vietnamese language -☞ Added scrollbar -☞ Small bugs fix - -version 1.1.14.127 -☞ Fixed laggy scrolling -☞ Small bugs fix - -version 1.1.14.126 -☞ Fixed laggy sidebar -☞ Added option for disabling the print margin -☞ Fixed editor not working after renaming a file. - -version 1.1.14.125 -☞ Bugs fixes -☞ Latest Ace editor v1.4.12 -☞ Share file -☞ UI improvement -☞ Performance improvement - -version 1.1.14.115 -☞ Bugs fixes -☞ Option to disable floating button -☞ Remembers the state of quick tools - -version 1.1.14.111 -☞ Bugs fixes -☞ UI improvement -☞ Add any directory to explorer using SAF -☞ Performance improvement -☞ Smaller APK size - -version 0.1.14.110 -☞ Backup and restore settings, key bindings, and FTP accounts -☞ Fixed file showing unsaved even file has no changes -☞ Exit full-screen mode using notification -☞ Bugs fixes - -version 0.1.13.108 -☞ Added Bangla language -☞ Fixed file not saving to an external file -☞ Bugs fixes - -version 0.1.13.107 -SFTP, JavaScript completion, and GIT implementation will take more time than expected -☞ Added the French language -☞ Toggling full-screen form settings will save full-screen state -☞ Long tap will enable context menu if no text is selected -☞ Fixed GitHub preview -☞ Bugs fixes - -version 0.1.12.105 -☞ Fixed intent handler -☞ Fixed FTP preview -☞ Other minor bugs fixes - -version 0.1.12.104 -☞ Now you can browse FTP and open a specific directory using the file browser -☞ Toggle full-screen mode (F11) -☞ Toggle main menu (F3) -☞ Toggle edit menu (F4) -☞ Toggle sidebar (Ctrl-B) -☞ Improved accessibility using a physical keyboard -☞ Option disable vibration -☞ Bugs fixes - -version 0.1.11.103 -☞ UI improvement -☞ Bugs fixes - -version 0.1.10.100 -☞ Added the Turkish language by Ibrahim -☞ Added the Spanish language by DouZerr -☞ New Smali language support -☞ Show suggestions when the app first opens -☞ Bugs fixes - -version 0.0.9.98 -☞ Added new app themes (Atticus, bump, bling, moon, ocean, tomyris) -☞ Added O'zbekcha language support (Thanks to TILON) -☞ Removed PHP support -☞ Create and run Vue, Angular, AngularJS, and React projects -☞ Now edit remote files using FTP -☞ Open folder by tapping on sidenav if empty -☞ Shows error message if the editor is unable to open -☞ Minor UI improvement -☞ Performance improvement -☞ Fixed bug (a deleting character from backward) -☞ Bugs fixes - -version 0.0.9.92 -☞ Bugs fix - -version 0.0.9.91 -☞ Fixed text selection bug - -version 0.0.9.90 -☞ Disabled text context-menu (unrecoverable bug) -☞ Added Fira code font -☞ Updated Ace editor to 1.4.8 -☞ You can now see the Promise result in the console -☞ Soft keyboard backspace issue solved -☞ Disabled native cursor controller -☞ Bugs fix - -version 0.0.8.89 -☞ Fixed issue #9 -☞ Added new language 'Arabian' (thanks to Basel Al_hajeri) -☞ Fixed shift button not working -☞ Bugs fix - -version 0.0.8.88 -☞ Fixed, cannot edit file opened from termux -☞ Bugs fix - -version 0.0.8.87 -☞ Bugs fix - -version 0.0.8.86 -☞ Added Japanese language (thanks to wappo56) -☞ Reorder tabs by dragging themes -☞ Improved UI for side nav -☞ Keyboard shortcut works even if the editor is not focused -☞ Improved JS console -☞ Hide quick tools - -version 0.0.8.85 -☞ Fixed key bindings -☞ Added key binding for action "run" - F5 -☞ Added key binding for action "rename" - F2 -☞ Added key binding for selecting word - Ctrl-D -☞ Bugs fixes - -version 0.0.8.84 -☞ Bugs fixes - -version 0.0.8.82 -☞ Categorized themes into light and dark mode (thanks to biraj795) -☞ Fixed unable to move console toggler -☞ Fixed font not loading -☞ Fixed files not loading when previewing git Project - -version 0.0.8.81 -☞ The project is now open-source - https://github.com/deadlyjack/acode -☞ Fixed tab and arrow keys (quick tool) not working -☞ Fixed issue with linking CSS and js file -☞ Bugs fixes - -version 0.0.8.80 -☞ Select GitHub-branch to edit -☞ Add a new branch to the repository -☞ Edit keybindings -☞ Bugs fixes - -version 0.0.7.78 -☞ Select syntax highlighter for specific file -☞ Select file encoding -☞ New file menu (cut, copy, paste, and rename) -☞ Bugs fixes - -version 0.0.7.77 -☞ Added option to search file-folder -☞ Added new language 'Português' (Thanks to ryan869h) -☞ Bugs fixes \ No newline at end of file diff --git a/utils/build-ace.js b/utils/build-ace.js deleted file mode 100644 index 56197bc65..000000000 --- a/utils/build-ace.js +++ /dev/null @@ -1,26 +0,0 @@ -const path = require('path'); -const babeljs = require('@babel/core'); -const glob = require('glob'); -const fs = require('fs'); - -const aceFiles = glob.sync('./src/ace/**/*.js'); - -aceFiles.forEach(file => { - const fileContent = fs.readFileSync(file, 'utf8'); - const result = babeljs.transformSync(fileContent, { - presets: ['@babel/preset-env'], - }); - const dest = path.resolve(__dirname, '../www/js/', file.replace('./src/', '')); - - if (!fs.existsSync(path.dirname(dest))) { - fs.mkdirSync(path.dirname(dest)); - } - - fs.writeFile(dest, result.code, 'utf8', (err) => { - if (err) { - console.log(err); - process.exit(1); - } - console.log(`${file} -> ${dest}`); - }); -}); \ No newline at end of file diff --git a/utils/config.js b/utils/config.js index 7eed8039c..ae015122c 100755 --- a/utils/config.js +++ b/utils/config.js @@ -1,96 +1,113 @@ -const path = require('path'); -const fs = require('fs'); -const { promisify } = require('util'); -const exec = promisify(require('child_process').exec); +const path = require("node:path"); +const fs = require("node:fs"); +const { promisify } = require("node:util"); +const exec = promisify(require("node:child_process").exec); (async () => { - const CONFIG_ID = /id="([a-z.]+")/; - const HTML_ID = /[a-z.]+<\/title>/; - const ID_PAID = 'com.foxdebug.acode'; - const ID_FREE = 'com.foxdebug.acodefree'; - const arg = process.argv[2]; - const arg2 = process.argv[3]; - const platformsDir = path.resolve(__dirname, '../platforms/'); - const babelrcpath = path.resolve(__dirname, '../.babelrc'); - const configpath = path.resolve(__dirname, '../config.xml'); - const htmlpath = path.resolve(__dirname, '../www/index.html'); - const logopath = path.resolve( - __dirname, - '../res/icon/android/values/ic_launcher_background.xml', - ); + const AD_APP_ID = "ca-app-pub-5911839694379275~4255791238"; + const CONFIG_ID = /id="([a-z.]+")/; + const HTML_ID = /<title>[a-z.]+<\/title>/; + const ID_PAID = "com.foxdebug.acode"; + const ID_FREE = "com.foxdebug.acodefree"; + const arg = process.argv[2]; + const arg2 = process.argv[3]; + const platformsDir = path.resolve(__dirname, "../platforms/"); + const babelrcpath = path.resolve(__dirname, "../.babelrc"); + const configpath = path.resolve(__dirname, "../config.xml"); + const htmlpath = path.resolve(__dirname, "../www/index.html"); + const logopath = path.resolve( + __dirname, + "../res/android/values/ic_launcher_background.xml", + ); - const logoTextPaid = `<?xml version="1.0" encoding="utf-8"?> + const logoTextPaid = `<?xml version="1.0" encoding="utf-8"?> <resources> <color name="ic_launcher_background">#3a3e54</color> + <color name="ic_splash_background">#3a3e54</color> </resources>`; - const logoTextFree = `<?xml version="1.0" encoding="utf-8"?> + const logoTextFree = `<?xml version="1.0" encoding="utf-8"?> <resources> <color name="ic_launcher_background">#ffffff</color> + <color name="ic_splash_background">#313131</color> </resources>`; - try { - let babelrcText = fs.readFileSync(babelrcpath, 'utf-8'); - let config = fs.readFileSync(configpath, 'utf-8'); - let html = fs.readFileSync(htmlpath, 'utf-8'); - let platforms = fs.readdirSync(platformsDir); - let logo, id, currentId; + try { + let babelrcText = fs.readFileSync(babelrcpath, "utf-8"); + let config = fs.readFileSync(configpath, "utf-8"); + let html = fs.readFileSync(htmlpath, "utf-8"); + let platforms = fs + .readdirSync(platformsDir) + .filter((file) => !file.startsWith(".")); + let logo, id, currentId; - currentId = /id="([a-z.]+)"/.exec(config)[1]; - babelrc = JSON.parse(babelrcText); + currentId = /id="([a-z.]+)"/.exec(config)[1]; + babelrc = JSON.parse(babelrcText); - if (arg === 'd') { - babelrc.compact = false; - } else if (arg === 'p') { - babelrc.compact = true; - } + if (arg === "d") { + babelrc.compact = false; + } else if (arg === "p") { + babelrc.compact = true; + } - if (arg2 === 'free') { - logo = logoTextFree; - id = ID_FREE; - } else { - logo = logoTextPaid; - id = ID_PAID; - } + if (arg2 === "free") { + logo = logoTextFree; + id = ID_FREE; + } else { + logo = logoTextPaid; + id = ID_PAID; + } - fs.writeFileSync(babelrcpath, babelrcText, 'utf8'); + fs.writeFileSync(babelrcpath, babelrcText, "utf8"); - if (currentId !== id) { - const promises = []; + if (currentId !== id) { + const promises = []; - html = html.replace(HTML_ID, `<title>${id}`); - config = config.replace(CONFIG_ID, `id="${id}"`); - babelrcText = JSON.stringify(babelrc, undefined, 2); + html = html.replace(HTML_ID, `${id}`); + config = config.replace(CONFIG_ID, `id="${id}"`); + babelrcText = JSON.stringify(babelrc, undefined, 2); - fs.writeFileSync(htmlpath, html, 'utf8'); - fs.writeFileSync(logopath, logo, 'utf8'); - fs.writeFileSync(configpath, config, 'utf8'); + fs.writeFileSync(htmlpath, html, "utf8"); + fs.writeFileSync(logopath, logo, "utf8"); + fs.writeFileSync(configpath, config, "utf8"); + for (let platform of platforms) { + if (!platform) continue; - for (let platform of platforms) { - if (!platform) continue; + promises.push( + (async () => { + console.log( + `|--- Preparing platform ${platform.toUpperCase()} ---|`, + ); - let version; - if (platform === 'android') { - version = '@9'; - } + if (id === ID_FREE) { + console.log(`|--- Installing Admob ---|`); + await exec( + `cordova plugin add cordova-plugin-consent@2.4.0 --save`, + ); + await exec( + `cordova plugin add admob-plus-cordova@2.0.0-alpha.19 --save --variable APP_ID_ANDROID="${AD_APP_ID}" --variable PLAY_SERVICES_VERSION="23.2.0"`, + ); + console.log("DONE! Installing admob-plus-cordova"); + } else { + console.log(`|--- Removing Admob ---|`); + await exec(`cordova plugin remove cordova-plugin-consent --save`); + await exec(`cordova plugin remove admob-plus-cordova --save`); + console.log("DONE! Removing admob-plus-cordova"); + } - promises.push( - (async () => { - console.log( - `|--- Reinstalling platform ${platform.toUpperCase()} ---|`, - ); - const { stderr } = await exec(`yarn clean ${platform} ${platform + version}`); - if (stderr) console.error(stderr); - else console.log('DONE!'); - })(), - ); - } + console.log(`|--- Reinstalling platform ---|`); + const { stderr } = await exec(`npm run clean`); + if (stderr) console.error(stderr); + else console.log("DONE! Reinstalling platform"); + })(), + ); + } - await Promise.all(promises); - } - process.exit(0); - } catch (error) { - console.error(error); - process.exit(1); - } + await Promise.all(promises); + } + process.exit(0); + } catch (error) { + console.error(error); + process.exit(1); + } })(); diff --git a/utils/extra-icons/cart.svg b/utils/extra-icons/cart.svg new file mode 100644 index 000000000..fedbbae04 --- /dev/null +++ b/utils/extra-icons/cart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/utils/extra-icons/scale.svg b/utils/extra-icons/scale.svg new file mode 100644 index 000000000..a7e36e3a7 --- /dev/null +++ b/utils/extra-icons/scale.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/utils/extra-icons/tag.svg b/utils/extra-icons/tag.svg new file mode 100644 index 000000000..9cb591135 --- /dev/null +++ b/utils/extra-icons/tag.svg @@ -0,0 +1 @@ + diff --git a/utils/extra-icons/terminal.svg b/utils/extra-icons/terminal.svg new file mode 100644 index 000000000..013dda9be --- /dev/null +++ b/utils/extra-icons/terminal.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/utils/extra-icons/verified.svg b/utils/extra-icons/verified.svg new file mode 100644 index 000000000..3387f4aae --- /dev/null +++ b/utils/extra-icons/verified.svg @@ -0,0 +1,3 @@ + + + diff --git a/utils/extra-icons/zap.svg b/utils/extra-icons/zap.svg new file mode 100644 index 000000000..dd5ea1fc5 --- /dev/null +++ b/utils/extra-icons/zap.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/utils/lang.js b/utils/lang.js index 367ae6ecb..d3390e426 100755 --- a/utils/lang.js +++ b/utils/lang.js @@ -1,252 +1,408 @@ -const path = require('path'); -const fs = require('fs'); -const yargs = require('yargs'); -const readline = require('readline'); -const args = yargs.alias('a', 'all').argv; +const path = require("node:path"); +const fs = require("node:fs"); +const yargs = require("yargs"); +const { hideBin } = require("yargs/helpers"); +const readline = require("node:readline"); -const dir = path.resolve(__dirname, '../www/lang'); +const args = yargs(hideBin(process.argv)) + .alias("a", "all") + .alias("b", "bulk").argv; +const dir = path.resolve(__dirname, "../src/lang"); const read = readline.createInterface({ - input: process.stdin, - output: process.stdout + input: process.stdin, + output: process.stdout, }); -const enLang = path.join(dir, 'en-us.json'); +const enLang = path.join(dir, "en-us.json"); const list = fs.readdirSync(dir); const len = list.length; let command = ""; let arg = ""; +let val = ""; -if (args._.length > 2) { - console.error("Invalid argments", args._); - process.exit(0); +if (args._.length > 3) { + console.error("Invalid arguments", args._); + process.exit(0); } else { - command = args._[0]; - arg = args._[1]; + command = args._[0]; + arg = args._[1]; + val = args._[2]; } switch (command) { - case 'add': - case 'remove': - case 'update': - case 'search': - case 'check': - update(); - break; - default: - console.error(`Missing/Invalid arguments. -use 'add' to add a new string -use 'remove' to remove a string -use 'search' to search a string + case "add": + case "remove": + case "update": + case "update-key": + case "search": + case "check": + update(); + break; + case "add-all": + addToAllFiles(); + break; + case "bulk-add": + bulkAddStrings(); + break; + default: + console.error(`Missing/Invalid arguments. +use 'add' to add a new string +use 'add-all ' to add the same string to ALL language files at once +use 'bulk-add ' to add multiple strings from a JSON file to all language files +use 'remove' to remove a string +use 'search' to search a string use 'update' to update a string +use 'update-key' to update a key use 'check' to check a string`); - process.exit(); + process.exit(); } -function update() { - let key; - - if(command === "check"){ - let total = 0; - let done = 0; - - fs.readFile(enLang, 'utf-8', (err, data)=>{ - if(err){ - console.error(err); - process.exit(0); - return; - } - - let error = false; - - const fix = arg === 'fix'; - const enLangData = JSON.parse(data); - - list.forEach((file, i)=>{ - if(file === 'en-us.json') return; - - let flagError = false; - let langFile = path.join(dir, file); - const exit = (i, len)=>{ - if(i+1 === len){ - if(!error){ - console.log("\nGOOD NEWS! No Error Found\n"); - } - process.exit(0); - } - }; - - fs.readFile(langFile, 'utf-8', (err, data)=>{ - if(err){ - console.error(err); - process.exit(1); - return; - } - - let langError = ()=>{ - if(!flagError){ - error = true; - flagError = true; - console.log(`-------------- ${file}`); - } - }; - const langData = JSON.parse(data); - flagError = false; - - for(let enKey in enLangData){ - - const key = Object.keys(langData).find((k)=>{ - if((new RegExp(`^${k}$`, 'i')).test(enKey)){ - return true; - } - return false; - }); - - if(!key){ - langError(); - if(fix){ - langData[enKey] = enLangData[enKey]; - } - - console.log(`Missing: ${enKey} ${fix ? '✔' : ''}`); - }else if(key !== enKey){ - langError(); - console.log(`Fix: "${key} --> ${enKey}" ${fix ? '✔' : ''}`); - - if(fix){ - const val = langData[key]; - delete langData[key]; - langData[enKey] = val; - } - } - } - - if(flagError){ - if(fix){ - total += 1; - const langJSONData = JSON.stringify(langData, undefined, 2); - fs.writeFile(langFile, langJSONData, (err)=>{ - if(err) { - console.error(err); - process.exit(1); - } - done +=1; - exit(done, total); - }); - } - console.log('\n'); - } - - if(!fix){ - exit(i, len); - } - }); - }); - }); - return; - } - - if(!arg){ - getStr("string: ") - .then(res => { - key = res.toLowerCase(); - arg = res; - askTranslation(); - }); - return; - } - - key = arg.toLowerCase(); - askTranslation(); - - - function askTranslation(i = 0) { - const lang = list[i]; - const langName = lang.split('.')[0]; - if (command === "add") { - if(!args.a){ - getStr(`${langName}: `) - .then(addString); - return; - } - - addString(); - } else if (command === "remove") { - update(strings => { - if (key in strings) { - delete strings[key]; - console.log(`Removed: ${key}`); - return strings; - } else { - console.error("String not exists"); - } - }); - } else if (command === "update") { - getStr(`${langName}: `) - .then(res => { - - res = res || arg; - update(strings => { - strings[key] = res; - return strings; - }); - - }); - } else if (command === "search") { - update(string => { - if (key in string) console.log(`${key}(${langName}): ${string[key]}`); - else { - console.log(`${key} not exists`); - process.exit(); - } - }); - } - - function update(modify) { - const file = path.resolve(dir, lang); - const text = fs.readFileSync(file, "utf8"); - const strings = modify(JSON.parse(text)); - if (strings) { - const newText = JSON.stringify(strings, undefined, 2); - fs.writeFile(file, newText, "utf8", err => { - if (err) { - console.error(err); - process.exit(1); - } - - next(); - }); - } else { - next(); - } - - function next() { - if (i === list.length - 1) { - process.exit(); - } else { - askTranslation(++i); - } - } - } - - function addString(string){ - string = string || arg; - update(strings => { - if (key in strings) { - console.error("String already exists"); - process.exit(1); - } else { - strings[key] = string; - return strings; - } - }); - } - } +/** + * Adds a key-value pair to ALL language files at once + * Usage: pnpm lang add-all "key" "value" + */ +function addToAllFiles() { + if (!arg || !val) { + console.error('Usage: pnpm lang add-all "" ""'); + console.error('Example: pnpm lang add-all "hello world" "Hello World"'); + process.exit(1); + } + const key = arg.toLowerCase(); + let addedCount = 0; + let skippedCount = 0; + + for (const lang of list) { + const file = path.resolve(dir, lang); + const text = fs.readFileSync(file, "utf8"); + const strings = JSON.parse(text); + + if (key in strings) { + console.log(`${lang}: Skipped (already exists)`); + skippedCount++; + continue; + } + + strings[key] = val; + const newText = JSON.stringify(strings, undefined, 2); + fs.writeFileSync(file, newText, "utf8"); + console.log(`${lang}: Added ✓`); + addedCount++; + } + + console.log( + `\nDone! Added to ${addedCount} files, skipped ${skippedCount} files.`, + ); + process.exit(0); +} + +/** + * Bulk add multiple strings from a JSON file to ALL language files + * Usage: pnpm lang bulk-add strings.json + * + * JSON file format: + * { + * "key1": "value1", + * "key2": "value2" + * } + */ +function bulkAddStrings() { + if (!arg) { + console.error("Usage: pnpm lang bulk-add "); + console.error("Example: pnpm lang bulk-add new-strings.json"); + console.error("\nJSON file format:"); + console.error("{"); + console.error(' "key1": "value1",'); + console.error(' "key2": "value2"'); + console.error("}"); + process.exit(1); + } + + const jsonFilePath = path.resolve(process.cwd(), arg); + + if (!fs.existsSync(jsonFilePath)) { + console.error(`File not found: ${jsonFilePath}`); + process.exit(1); + } + + let newStrings; + try { + const jsonContent = fs.readFileSync(jsonFilePath, "utf8"); + newStrings = JSON.parse(jsonContent); + } catch (err) { + console.error(`Error parsing JSON file: ${err.message}`); + process.exit(1); + } + + const keys = Object.keys(newStrings); + if (keys.length === 0) { + console.error("No strings found in the JSON file."); + process.exit(1); + } + + console.log( + `Adding ${keys.length} strings to ${list.length} language files...\n`, + ); + + for (const lang of list) { + const file = path.resolve(dir, lang); + const text = fs.readFileSync(file, "utf8"); + const strings = JSON.parse(text); + let addedCount = 0; + let skippedCount = 0; + + for (const key of keys) { + const lowerKey = key.toLowerCase(); + if (lowerKey in strings) { + skippedCount++; + continue; + } + strings[lowerKey] = newStrings[key]; + addedCount++; + } + + if (addedCount > 0) { + const newText = JSON.stringify(strings, undefined, 2); + fs.writeFileSync(file, newText, "utf8"); + } + + console.log(`${lang}: Added ${addedCount}, Skipped ${skippedCount}`); + } + + console.log(`\nDone! Added ${keys.length} strings to all language files.`); + process.exit(0); +} + +async function update() { + let key; + + if (command === "check") { + let total = 0; + let done = 0; + + fs.readFile(enLang, "utf-8", (err, data) => { + if (err) { + console.error(err); + process.exit(0); + return; + } + + let error = false; + + const fix = arg === "fix"; + const enLangData = JSON.parse(data); + + list.forEach((file, i) => { + if (file === "en-us.json") return; + + let flagError = false; + let langFile = path.join(dir, file); + const exit = (i, len) => { + if (i + 1 === len) { + if (!error) { + console.log("\nGOOD NEWS! No Error Found\n"); + } + process.exit(0); + } + }; + + fs.readFile(langFile, "utf-8", (err, data) => { + if (err) { + console.error(err); + process.exit(1); + return; + } + + let langError = () => { + if (!flagError) { + error = true; + flagError = true; + console.log(`-------------- ${file}`); + } + }; + const langData = JSON.parse(data); + flagError = false; + + for (let enKey in enLangData) { + const key = Object.keys(langData).find((k) => { + try { + if (new RegExp(`^${escapeRegExp(k)}$`, "i").test(enKey)) { + return true; + } + return false; + } catch (e) { + console.log({ e, k }); + return false; + } + }); + + if (!key) { + langError(); + if (fix) { + langData[enKey] = enLangData[enKey]; + } + + console.log(`Missing: ${enKey} ${fix ? "✔" : ""}`); + } else if (key !== enKey) { + langError(); + console.log(`Fix: "${key} --> ${enKey}" ${fix ? "✔" : ""}`); + + if (fix) { + const val = langData[key]; + delete langData[key]; + langData[enKey] = val; + } + } + } + + if (flagError) { + if (fix) { + total += 1; + const langJSONData = JSON.stringify(langData, undefined, 2); + fs.writeFile(langFile, langJSONData, (err) => { + if (err) { + console.error(err); + process.exit(1); + } + done += 1; + exit(done, total); + }); + } + console.log("\n"); + } + + if (!fix) { + exit(i, len); + } + }); + }); + }); + return; + } + + if (!arg) { + getStr("string: ").then((res) => { + key = res.toLowerCase(); + arg = res; + askTranslation(); + }); + return; + } + + key = arg.toLowerCase(); + let newKey = val; + askTranslation(); + + if (command === "update-key" && !newKey) { + newKey = await getStr("new key: "); + } + + function askTranslation(i = 0) { + const lang = list[i]; + const langName = lang.split(".")[0]; + if (command === "add") { + if (!args.a) { + getStr(`${langName}: `).then(addString); + return; + } + + addString(); + } else if (command === "remove") { + update((strings) => { + if (key in strings) { + delete strings[key]; + console.log(`Removed: ${key}`); + return strings; + } else { + console.error("String not exists"); + } + }); + } else if (command === "update-key") { + update((strings) => { + const val = strings[key]; + delete strings[key]; + strings[newKey] = val; + return strings; + }); + } else if (command === "update") { + if (val) { + update((strings) => { + strings[key] = val; + return strings; + }); + } else { + getStr(`${langName}: `).then((res) => { + res = res || arg; + update((strings) => { + strings[key] = res; + return strings; + }); + }); + } + } else if (command === "search") { + update((string) => { + if (key in string) console.log(`${key}(${langName}): ${string[key]}`); + else { + console.log(`${key} not exists`); + process.exit(); + } + }); + } + + function update(modify) { + const file = path.resolve(dir, lang); + const text = fs.readFileSync(file, "utf8"); + const strings = modify(JSON.parse(text)); + if (strings) { + const newText = JSON.stringify(strings, undefined, 2); + fs.writeFile(file, newText, "utf8", (err) => { + if (err) { + console.error(err); + process.exit(1); + } + + next(); + }); + } else { + next(); + } + + function next() { + if (i === list.length - 1) { + process.exit(); + } else { + askTranslation(++i); + } + } + } + + function addString(string) { + string = string || arg; + update((strings) => { + if (key in strings) { + console.error("String already exists"); + process.exit(1); + } else { + strings[key] = string; + return strings; + } + }); + } + } } function getStr(str) { - return new Promise((resolve, reject) => { - read.question(str, res => { - resolve(res); - }); - }); -} \ No newline at end of file + return new Promise((resolve, reject) => { + if (val) { + resolve(val); + return; + } + + read.question(str, (res) => { + resolve(res); + }); + }); +} + +function escapeRegExp(text) { + return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); +} diff --git a/utils/loadStyles.js b/utils/loadStyles.js index 78ca6a22c..cfe038dab 100644 --- a/utils/loadStyles.js +++ b/utils/loadStyles.js @@ -1,23 +1,23 @@ -const fs = require('fs'); -const path = require('path'); +const fs = require("node:fs"); +const path = require("node:path"); -const WWW = path.resolve(__dirname, '../www'); -const CSS = path.resolve(WWW, 'css/build'); -const CSS_PATH = './css/build/'; +const WWW = path.resolve(__dirname, "../www"); +const CSS = path.resolve(WWW, "css/build"); +const CSS_PATH = "./css/build/"; -const cssFiles = fs.readdirSync(CSS).filter((file) => file.endsWith('.css')); -const htmlFiles = fs.readdirSync(WWW).filter((file) => file.endsWith('.html')); +const cssFiles = fs.readdirSync(CSS).filter((file) => file.endsWith(".css")); +const htmlFiles = fs.readdirSync(WWW).filter((file) => file.endsWith(".html")); try { - for (let htmlFile of htmlFiles) { - loadStyles(path.resolve(WWW, htmlFile)); - } + for (let htmlFile of htmlFiles) { + loadStyles(path.resolve(WWW, htmlFile)); + } } catch (error) { - console.error(error); - process.exit(1); + console.error(error); + process.exit(1); } -console.log('Styles loaded'); +console.log("Styles loaded"); process.exit(0); /** @@ -25,18 +25,18 @@ process.exit(0); * @param {String} htmlFile */ function loadStyles(htmlFile) { - let styles = ''; + let styles = ""; - for (let cssFile of cssFiles) { - styles += `\n`; - } + for (let cssFile of cssFiles) { + styles += `\n`; + } - styles += '\n\n'; + styles += "\n\n"; - const rgx = - /([^<]*(?:<(?!!--styles_end-->)[^<]*)*)\n*/gim; - let html = fs.readFileSync(htmlFile, 'utf8'); - html = html.replace(rgx, ''); - html = html.replace('', styles + ''); - fs.writeFileSync(htmlFile, html); + const rgx = + /([^<]*(?:<(?!!--styles_end-->)[^<]*)*)\n*/gim; + let html = fs.readFileSync(htmlFile, "utf8"); + html = html.replace(rgx, ""); + html = html.replace("", styles + ""); + fs.writeFileSync(htmlFile, html); } diff --git a/utils/scripts/build.sh b/utils/scripts/build.sh index 21fe7a146..7b7e73b8f 100644 --- a/utils/scripts/build.sh +++ b/utils/scripts/build.sh @@ -1,46 +1,99 @@ -#! /bin/bash - -platform="$1" -app="$2" -mode="$3" +#!/bin/bash +# Default values +app="paid" +mode="d" +fdroidFlag="" +packageType="apk" # New default: apk or aar webpackmode="development" cordovamode="" -if [ -z "$platform" ] -then -platform="android" -fi +# Check all arguments for specific values +for arg in "$@"; do + case "$arg" in + "free"|"paid") + app="$arg" + ;; + "p"|"prod"|"d"|"dev") + mode="$arg" + ;; + "fdroid") + fdroidFlag="fdroid" + ;; + "apk"|"bundle") + packageType="$arg" + ;; + *) + echo "Warning: Unknown argument '$arg' ignored" + ;; + esac +done -if [ -z "$mode" ] -then -mode="d" +root=$(npm prefix) + +if [ -n "$TMPDIR" ] && [ -r "$TMPDIR" ] && [ -w "$TMPDIR" ]; then + tmpdir="$TMPDIR" +elif [ -r "/tmp" ] && [ -w "/tmp" ]; then + tmpdir="/tmp" +else + echo "Warning: No usable temporary directory found (TMPDIR or /tmp not accessible). Skipping fdroid.bool file." >&2 + tmpdir="" fi -if [ -z "$app" ] -then -app="paid" +if [ "$fdroidFlag" = "fdroid" ]; then + if [ -n "$tmpdir" ]; then + echo "true" > "$tmpdir/fdroid.bool" + fi + + # Remove only if installed + if [ -d "plugins/com.foxdebug.acode.rk.exec.proot" ]; then + cordova plugin remove com.foxdebug.acode.rk.exec.proot + fi +else + if [ -n "$tmpdir" ]; then + echo "false" > "$tmpdir/fdroid.bool" + fi + + # Add only if the src exists and not already installed + if [ -d "src/plugins/proot" ] && [ ! -d "plugins/com.foxdebug.acode.rk.exec.proot" ]; then + cordova plugin add src/plugins/proot/ + fi fi + + +# Normalize mode values if [ "$mode" = "p" ] || [ "$mode" = "prod" ] then -mode = "p" +mode="p" webpackmode="production" cordovamode="--release" fi +# Set build target based on packageType +if [ "$packageType" = "bundle" ]; then + echo "Building AAR library file..." +else + echo "Building APK file..." +fi + RED='' NC='' + script1="node ./utils/config.js $mode $app" script2="webpack --progress --mode $webpackmode " -script3="node ./utils/loadStyles.js" -script4="cordova build $platform $cordovamode" +# script3="node ./utils/loadStyles.js" + +echo "type : $packageType" + +script4="cordova build android $cordovamode -- --packageType=$packageType" + eval " echo \"${RED}$script1${NC}\"; $script1; echo \"${RED}$script2${NC}\"; $script2&& -echo \"${RED}$script3${NC}\"; -$script3; +# echo \"${RED}$script3${NC}\"; +# $script3; echo \"${RED}$script4${NC}\"; -$script4 -" \ No newline at end of file +$script4; +" diff --git a/utils/scripts/generate-release-notes.js b/utils/scripts/generate-release-notes.js new file mode 100644 index 000000000..8dcb6e61c --- /dev/null +++ b/utils/scripts/generate-release-notes.js @@ -0,0 +1,249 @@ +#!/usr/bin/env node +/** + * ✨ @ UnschooledGamer (baked With AI, Modified by @ UnschooledGamer) ~ 2025. + * + * GitHub Release Notes Generator + * + * Features: + * - Auto categorizes commits by type + * - Optional compact "plain" output to save space + * - Option to include only important tags (feat, fix, refactor, perf) + * - Option to use only merge commits + * + * Usage: + * GITHUB_TOKEN= node generate-release-notes.js [options] + * + * Options: + * --plain Output minimal Markdown (no emojis, compact) + * --important-only Include only features, fixes, refactors, and perf + * --merge-only Include only merge commits + * --help Show usage + * --format [md/json] Output Format + * --fromTag v1.11.0 The From/Previous Tag + * --quiet Suppress output to stdout + */ + +const args = process.argv.slice(2); + +function getArgValue(flag) { + const idx = args.indexOf(flag); + return idx !== -1 && args[idx + 1] && !args[idx + 1].startsWith("-") + ? args[idx + 1] + : null; +} +if (args.includes("--help") || args.length < 3) { + console.log(` +Usage: GITHUB_TOKEN= node generate-release-notes.js [options] +✨ @ UnschooledGamer (baked With AI, Modified by @ UnschooledGamer) ~ 2025 + +Options: + --plain Compact, no emojis (saves space) + --important-only Only include Features, Fixes, Refactors, Perf + --merge-only Include only merge commits + --help Show this help message + --format [md/json] Output Format + --from-tag v1.11.0 The From/Previous Tag + --quiet Suppress output to stdout + --stdout-only Output to stdout only + --changelog-only Output changelog only +`); + process.exit(0); +} + +const [owner, repo, currentTag, previousTagArg] = args; +const token = process.env.GITHUB_TOKEN; +if (!token) { + console.error("❌ Missing GITHUB_TOKEN environment variable."); + process.exit(1); +} + +const flags = { + plain: args.includes("--plain"), + importantOnly: args.includes("--important-only"), + mergeOnly: args.includes("--merge-only"), + quiet: args.includes("--quiet") || args.includes("--stdout-only"), + format: getArgValue("--format") || "md", + fromTag: getArgValue("--from-tag"), + changelogOnly: args.includes("--changelog-only"), +}; + +function log(...msg) { + if (!flags.quiet) console.error(...msg); +} + +const headers = { + Authorization: `token ${token}`, + Accept: "application/vnd.github+json", + "User-Agent": "release-notes-script", +}; + +async function getPreviousTag() { + const res = await fetch( + `https://api.github.com/repos/${owner}/${repo}/tags`, + { headers }, + ); + const tags = await res.json(); + if (!Array.isArray(tags) || tags.length < 2) return null; + return tags[1].name; +} + +async function getCommits(previousTag, currentTag) { + const url = `https://api.github.com/repos/${owner}/${repo}/compare/${previousTag}...${currentTag}`; + const res = await fetch(url, { headers }); + if (!res.ok) throw new Error(`Failed to fetch commits: ${res.status}`); + const data = await res.json(); + return data.commits || []; +} + +function categorizeCommits(commits, { mergeOnly, importantOnly }) { + const sections = { + feat: [], + fix: [], + perf: [], + refactor: [], + docs: [], + chore: [], + test: [], + add: [], + revert: [], + update: [], + other: [], + }; + + for (const c of commits) { + const msg = c.commit.message.split("\n")[0]; + const isMerge = + msg.startsWith("Merge pull request") || msg.startsWith("Merge branch"); + + if (mergeOnly && !isMerge) continue; + + const type = + Object.keys(sections).find((k) => { + const lowerMsg = msg.toLowerCase(); + return ( + lowerMsg.startsWith(`${k}:`) || + lowerMsg.startsWith(`${k} `) || + lowerMsg.startsWith(`${k}: `) || + lowerMsg.startsWith(`${k}(`) // handles e.g. 'feat(plugin-api): ...' + ); + }) || "other"; + + if ( + importantOnly && + !["feat", "fix", "refactor", "perf", "add", "revert", "update"].includes( + type, + ) + ) + continue; + + const author = c.author?.login + ? `[${c.author.login}](https://github.com/${c.author.login})` + : "unknown"; + + const entry = `- ${msg} (${c.sha.slice(0, 7)}) by ${author}`; + sections[type].push(entry); + } + + return sections; +} + +const emojis = { + feat: flags.plain ? "" : "✨ ", + fix: flags.plain ? "" : "🐞 ", + perf: flags.plain ? "" : "⚡ ", + refactor: flags.plain ? "" : "🔧 ", + docs: flags.plain ? "" : "📝 ", + chore: flags.plain ? "" : "🧹 ", + test: flags.plain ? "" : "🧪 ", + other: flags.plain ? "" : "📦 ", + revert: flags.plain ? "" : "⏪ ", + add: flags.plain ? "" : "➕ ", + update: flags.plain ? "" : "🔄 ", +}; + +function formatMarkdown(tag, prevTag, sections, { plain }) { + const lines = [ + flags.changelogOnly + ? "" + : `Changes since [${prevTag}](https://github.com/${owner}/${repo}/releases/tag/${prevTag})`, + "", + ]; + + for (const [type, list] of Object.entries(sections)) { + if (list.length === 0) continue; + const header = plain + ? `## ${type}` + : `## ${emojis[type]}${type[0].toUpperCase() + type.slice(1)}`; + lines.push(header, "", list.join("\n"), ""); + } + + // Compact single-line mode for super small output + // if (plain) { + // const compact = Object.entries(sections) + // .filter(([_, list]) => list.length) + // .map(([type, list]) => `${type.toUpperCase()}: ${list.length} commits`) + // .join(" | "); + // lines.push(`\n_Summary: ${compact}_`); + // } + + return lines.join("\n"); +} + +function formatJSON(tag, prevTag, sections, plain = true) { + const lines = [ + "", + flags.changelogOnly + ? "" + : `Changes since [${prevTag}](https://github.com/${owner}/${repo}/releases/tag/${prevTag})`, + "", + ]; + + // todo: split into function + for (const [type, list] of Object.entries(sections)) { + if (list.length === 0) continue; + const header = plain + ? `## ${type}` + : `## ${emojis[type]}${type[0].toUpperCase() + type.slice(1)}`; + lines.push(header, "", list.join("\n"), ""); + } + return JSON.stringify( + { + release: tag, + previous: prevTag, + sections: Object.fromEntries( + Object.entries(sections).filter(([_, v]) => v.length), + ), + notes: lines.join("\n"), + }, + null, + 2, + ); +} + +async function main() { + log(`🔍 Generating release notes for ${owner}/${repo} @ ${currentTag}...`); + + const prevTag = flags.fromTag || (await getPreviousTag()); + if (!prevTag) { + console.error("No previous tag found. Use --from-tag to specify one."); + process.exit(1); + } + + const commits = await getCommits(prevTag, currentTag); + if (!commits.length) { + console.error("No commits found."); + process.exit(1); + } + const categorized = categorizeCommits(commits, flags); + let output; + + if (flags.format === "json") { + output = formatJSON(currentTag, prevTag, categorized); + } else { + output = formatMarkdown(currentTag, prevTag, categorized, flags); + } + + process.stdout.write(output + "\n"); +} + +main().catch((err) => console.error(err)); diff --git a/utils/scripts/setup.sh b/utils/scripts/setup.sh new file mode 100644 index 000000000..53b0e6636 --- /dev/null +++ b/utils/scripts/setup.sh @@ -0,0 +1,6 @@ +echo "Setting up the project..." + +npm install +cordova platform add android@10 +cordova prepare +mkdir -p www/css/build www/js/build \ No newline at end of file diff --git a/utils/scripts/start.sh b/utils/scripts/start.sh index de646cfce..9418aa48a 100644 --- a/utils/scripts/start.sh +++ b/utils/scripts/start.sh @@ -31,15 +31,15 @@ RED='' NC='' script1="node ./utils/config.js $mode $app" script2="webpack --progress --mode $webpackmode " -script3="node ./utils/loadStyles.js" +# script3="node ./utils/loadStyles.js" script4="cordova run $platform $cordovamode" eval " echo \"${RED}$script1${NC}\"; $script1; echo \"${RED}$script2${NC}\"; $script2&& -echo \"${RED}$script3${NC}\"; -$script3; +# echo \"${RED}$script3${NC}\"; +# $script3; echo \"${RED}$script4${NC}\"; $script4 " \ No newline at end of file diff --git a/utils/setup.js b/utils/setup.js new file mode 100644 index 000000000..9eaafa923 --- /dev/null +++ b/utils/setup.js @@ -0,0 +1,39 @@ +// setup acode for the first time +// 1. install dependencies +// 2. add cordova platform android@10.2 +// 3. install cordova plugins +// cordova-plugin-buildinfo +// cordova-plugin-device +// cordova-plugin-file +// all the plugins in ./src/plugins + +const { execSync } = require("node:child_process"); +const fs = require("node:fs"); +const path = require("node:path"); +const PLATFORM_FILES = [".DS_Store"]; + +execSync("npm install", { stdio: "inherit" }); +try { + execSync("cordova platform add android", { stdio: "inherit" }); +} catch (error) { + // ignore +} + +try { + execSync("mkdir -p www/css/build www/js/build", { stdio: "inherit" }); +} catch (error) { + console.log( + "Failed to create www/css/build & www/js/build directories (You may Try after reading The Error)", + error, + ); +} + +execSync("cordova plugin add cordova-plugin-buildinfo", { stdio: "inherit" }); +execSync("cordova plugin add cordova-plugin-device", { stdio: "inherit" }); +execSync("cordova plugin add cordova-plugin-file", { stdio: "inherit" }); + +const plugins = fs.readdirSync(path.join(__dirname, "../src/plugins")); +plugins.forEach((plugin) => { + if (PLATFORM_FILES.includes(plugin) || plugin.startsWith(".")) return; + execSync(`cordova plugin add ./src/plugins/${plugin}`, { stdio: "inherit" }); +}); diff --git a/utils/storage_manager.mjs b/utils/storage_manager.mjs new file mode 100644 index 000000000..e3725d631 --- /dev/null +++ b/utils/storage_manager.mjs @@ -0,0 +1,123 @@ +#!/usr/bin/env node + +import readline from 'node:readline'; +import { stdin as input, stdout as output } from 'node:process'; +import { readFile, writeFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import { execSync } from 'node:child_process'; + + +const npmPrefix = execSync('npm prefix').toString().trim(); +const pluginXmlPath = join(npmPrefix, 'src/plugins/terminal/plugin.xml'); +const permissionLine = ` `; +const permissionRegex = /^\s*\s*$/gm; + +async function addPermission() { + try { + let xml = await readFile(pluginXmlPath, 'utf-8'); + + if (xml.includes('android.permission.MANAGE_EXTERNAL_STORAGE')) { + console.log('Permission already exists in plugin.xml'); + return false; + } + + const pattern = /\s*<\/config-file>/; + + if (pattern.test(xml)) { + xml = xml.replace(pattern, match => { + return match.replace( + '', + `\n${permissionLine}\n ` + ); + }); + + await writeFile(pluginXmlPath, xml, 'utf-8'); + console.log('Permission added inside existing block.'); + return true + } else { + console.error('Could not find block.'); + return false + } + } catch (err) { + console.error('Failed to add permission:', err); + return false + } +} + +async function removePermission() { + try { + let xml = await readFile(pluginXmlPath, 'utf-8'); + + if (!xml.includes('android.permission.MANAGE_EXTERNAL_STORAGE')) { + console.log('Permission not found — nothing to remove.'); + return false; + } + + const cleanedXml = xml.replace(permissionRegex, ''); + await writeFile(pluginXmlPath, cleanedXml, 'utf-8'); + console.log('Permission removed from plugin.xml'); + return true + } catch (err) { + console.error('Failed to remove permission:', err); + return false + } +} + + +function updatePlugin() { + try { + const prefix = execSync('npm prefix').toString().trim(); + const pluginPath = join(prefix, 'src/plugins/terminal'); + + execSync('cordova plugin remove com.foxdebug.acode.rk.exec.terminal', { stdio: 'inherit' }); + execSync(`cordova plugin add "${pluginPath}"`, { stdio: 'inherit' }); + + console.log('✅ Plugin updated successfully.'); + } catch (err) { + console.error(err.message); + process.exit(1); + } +} + +async function handleAnswer(answer) { + answer = answer.trim().toLowerCase(); + if (answer === 'yes' || answer === 'y') { + if(await addPermission()){ + updatePlugin() + } + + } else if (answer === 'no' || answer === 'n') { + if(await removePermission()){ + updatePlugin() + } + + } else { + console.error("Invalid input. Please type 'yes' or 'no'."); + process.exit(1); + } +} + +function prompt() { + const rl = readline.createInterface({ input, output }); + rl.question("Enable 'MANAGE_EXTERNAL_STORAGE' permission? Y/n: ", async (answer) => { + rl.close(); + await handleAnswer(answer); + }); +} + +const args = process.argv.slice(2); +let answer = null; + +if (args.includes('--yes') || args.includes('-y')) { + answer = 'yes'; +} else if (args.includes('--no') || args.includes('-n')) { + answer = 'no'; +} else if (args[0]) { + answer = args[0]; +} + +if (answer) { + await handleAnswer(answer); +} else { + prompt(); +} diff --git a/utils/updateAce.js b/utils/updateAce.js new file mode 100644 index 000000000..8a4a13943 --- /dev/null +++ b/utils/updateAce.js @@ -0,0 +1,45 @@ +const fs = require("node:fs"); +const path = require("node:path"); + +const sourceDir = "./ace-builds/src-min"; +const destDir = "./www/js/ace"; + +function updateAce() { + try { + // Remove existing destination directory if it exists + if (fs.existsSync(destDir)) { + fs.rmSync(destDir, { recursive: true }); + console.log("Removed existing destination directory"); + } + + // Create destination directory + fs.mkdirSync(destDir, { recursive: true }); + console.log("Created new destination directory"); + + // Read all files from source directory + const files = fs.readdirSync(sourceDir); + + files.forEach((file) => { + const sourcePath = path.join(sourceDir, file); + const destPath = path.join(destDir, file); + + // Skip snippets directory and worker files + if (file === "snippets" || file.startsWith("worker-")) { + console.log(`Skipping: ${file}`); + return; + } + + // Copy if it's a file + if (fs.statSync(sourcePath).isFile()) { + fs.copyFileSync(sourcePath, destPath); + console.log(`Copied: ${file}`); + } + }); + + console.log("Ace editor files updated successfully!"); + } catch (error) { + console.error("Error updating Ace editor files:", error); + } +} + +updateAce(); diff --git a/utils/updateMainActivity.js b/utils/updateMainActivity.js deleted file mode 100644 index b33e3deeb..000000000 --- a/utils/updateMainActivity.js +++ /dev/null @@ -1,28 +0,0 @@ -`package com.foxdebug.system; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class BrowserActivity extends CordovaActivity { - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - String launchUrl = "file:///android_asset/www/browser.html"; - Bundle extras = getIntent().getExtras(); - if (extras != null) { - String action = extras.getString("action"); - String value = extras.getString("value"); - if (extras.getBoolean("cdvStartInBackground", false)) { - moveTaskToBack(true); - } - if (action != null && value != null) loadUrl( - launchUrl + "?" + action + "=" + value - ); - return; - } - - loadUrl(launchUrl); - } -}`; diff --git a/webpack.config.js b/webpack.config.js index d28f881b0..29c42385d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,52 +8,62 @@ module.exports = (env, options) => { const { mode = 'development' } = options; const rules = [ { - test: /\.hbs$/, + test: /\.(hbs|md)$/, use: ['raw-loader'], }, { - test: /\.m?js$/, - use: { - loader: 'babel-loader', - options: { - presets: ['@babel/preset-env'], - }, - }, + test: /\.m.(sa|sc|c)ss$/, + use: [ + 'raw-loader', + 'postcss-loader', + 'sass-loader', + ], + }, + { + test: /\.(png|svg|jpg|jpeg|ico|ttf|webp|eot|woff|webm|mp4|webp|wav)(\?.*)?$/, + type: "asset/resource", }, { - test: /\.(sa|sc|c)ss$/, + test: /(? { path: require.resolve('path-browserify'), crypto: false, }, + modules: ["node_modules", "src"], }, plugins: [ new MiniCssExtractPlugin({ - filename: '../../css/build/[name].css', + filename: '[name].css', }), ], }; return [main]; -} - -function clearOutputDir() { - const css = path.join(WWW, 'css/build'); - const js = path.join(WWW, 'js/build'); - - fs.rmdirSync(css, { recursive: true }); - fs.rmdirSync(js, { recursive: true }); -} \ No newline at end of file +}; \ No newline at end of file diff --git a/www/css/fira-code.css b/www/css/fira-code.css deleted file mode 100644 index 043126474..000000000 --- a/www/css/fira-code.css +++ /dev/null @@ -1,9 +0,0 @@ -@font-face { - font-family: 'Fira Code'; - src: url('../res/fonts/firacode/FiraCode-Regular.eot') format('embedded-opentype'), - url('../res/fonts/firacode/FiraCode-Regular.woff2') format('woff2'), - url('../res/fonts/firacode/FiraCode-Regular.woff') format('woff'), - url('../res/fonts/firacode/FiraCode-Regular.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} \ No newline at end of file diff --git a/www/favicon.ico b/www/favicon.ico new file mode 100644 index 000000000..fe834211c Binary files /dev/null and b/www/favicon.ico differ diff --git a/www/index.html b/www/index.html index a27577839..e305fb525 100644 --- a/www/index.html +++ b/www/index.html @@ -1,99 +1,162 @@ - + - - - - - - - - - - - - - - Acode - - + document.querySelector(":root").style.cssText = + "--bg-color: " + __bg_color; + + var __testEl = document.createElement("div"); + var __testChildEl = document.createElement("div"); + if (__testEl.append) { + __testEl.append(__testChildEl); + if (__testEl.children.length === 1) { + return; + } + + HTMLElement.prototype.append = function () { + var argArr = Array.prototype.slice.call(arguments), + docFrag = document.createDocumentFragment(); - - - - - - - - - - - - - - - - - + __oldAddEventListener.call(this, type, listener, useCapture); + }; + + + + + + + + + + + + + + + + + + + + + + + + + Acode - -
      - + + + + diff --git a/www/js/ace/ace.js b/www/js/ace/ace.js new file mode 100644 index 000000000..f30bc57ef --- /dev/null +++ b/www/js/ace/ace.js @@ -0,0 +1,23 @@ +(function(){function o(n){var i=e;n&&(e[n]||(e[n]={}),i=e[n]);if(!i.define||!i.define.packaged)t.original=i.define,i.define=t,i.define.packaged=!0;if(!i.require||!i.require.packaged)r.original=i.require,i.require=r,i.require.packaged=!0}var ACE_NAMESPACE="",e=function(){return this}();!e&&typeof window!="undefined"&&(e=window);if(!ACE_NAMESPACE&&typeof requirejs!="undefined")return;var t=function(e,n,r){if(typeof e!="string"){t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=n),t.modules[e]||(t.payloads[e]=r,t.modules[e]=null)};t.modules={},t.payloads={};var n=function(e,t,n){if(typeof t=="string"){var i=s(e,t);if(i!=undefined)return n&&n(),i}else if(Object.prototype.toString.call(t)==="[object Array]"){var o=[];for(var u=0,a=t.length;un.length)t=n.length;t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),String.prototype.repeat||r(String.prototype,"repeat",function(e){var t="",n=this;while(e>0){e&1&&(t+=n);if(e>>=1)n+=n}return t}),String.prototype.includes||r(String.prototype,"includes",function(e,t){return this.indexOf(e,t)!=-1}),Object.assign||(Object.assign=function(e){if(e===undefined||e===null)throw new TypeError("Cannot convert undefined or null to object");var t=Object(e);for(var n=1;n>>0,r=arguments[1],i=r>>0,s=i<0?Math.max(n+i,0):Math.min(i,n),o=arguments[2],u=o===undefined?n:o>>0,a=u<0?Math.max(n+u,0):Math.min(u,n);while(s0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n65535?2:1}}),define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r=typeof navigator=="object"?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||["other"])[0].toLowerCase(),s=r.userAgent||"",o=r.appName||"";t.isWin=i=="win",t.isMac=i=="mac",t.isLinux=i=="linux",t.isIE=o=="Microsoft Internet Explorer"||o.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window["opera"])=="[object Opera]",t.isWebKit=parseFloat(s.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(s.split(" Chrome/")[1])||undefined,t.isSafari=parseFloat(s.split(" Safari/")[1])&&!t.isChrome||undefined,t.isEdge=parseFloat(s.split(" Edge/")[1])||undefined,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isAndroid=s.indexOf("Android")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";function u(){var e=o;o=null,e&&e.forEach(function(e){a(e[0],e[1])})}function a(e,n,r){if(typeof document=="undefined")return;if(o)if(r)u();else if(r===!1)return o.push([e,n]);if(s)return;var i=r;if(!r||!r.getRootNode)i=document;else{i=r.getRootNode();if(!i||i==r)i=document}var a=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var f=t.createElement("style");f.appendChild(a.createTextNode(e)),n&&(f.id=n),i==a&&(i=t.getDocumentHead(a)),i.insertBefore(f,i.firstChild)}var r=e("./useragent"),i="http://www.w3.org/1999/xhtml";t.buildDom=function l(e,t,n){if(typeof e=="string"&&e){var r=document.createTextNode(e);return t&&t.appendChild(r),r}if(!Array.isArray(e))return e&&e.appendChild&&t&&t.appendChild(e),e;if(typeof e[0]!="string"||!e[0]){var i=[];for(var s=0;s=1.5:!0,r.isChromeOS&&(t.HI_DPI=!1);if(typeof document!="undefined"){var f=document.createElement("div");t.HI_DPI&&f.style.transform!==undefined&&(t.HAS_CSS_TRANSFORMS=!0),!r.isEdge&&typeof f.style.animationName!="undefined"&&(t.HAS_CSS_ANIMATION=!0),f=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){if(n||!i.readyState||i.readyState=="loaded"||i.readyState=="complete")i=i.onload=i.onreadystatechange=null,n||t()}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o1&&(i=n[n.length-2]);var o=u[t+"Path"];return o==null?o=u.basePath:r=="/"&&(t=r=""),o&&o.slice(-1)!="/"&&(o+="/"),o+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return u.$moduleUrls[e]=t};var a=function(t,n){if(t==="ace/theme/textmate"||t==="./theme/textmate")return n(null,e("./theme/textmate"));if(f)return f(t,n);console.error("loader is not configured")},f;t.setLoader=function(e){f=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(e,n){var r;if(Array.isArray(e))var s=e[0],o=e[1];else if(typeof e=="string")var o=e;var u=function(e){if(e&&!t.$loading[o])return n&&n(e);t.$loading[o]||(t.$loading[o]=[]),t.$loading[o].push(n);if(t.$loading[o].length>1)return;var r=function(){a(o,function(e,n){n&&(t.$loaded[o]=n),t._emit("load.module",{name:o,module:n});var r=t.$loading[o];t.$loading[o]=null,r.forEach(function(e){e&&e(n)})})};if(!t.get("packaged"))return r();i.loadScript(t.moduleUrl(o,s),r),l()};if(t.dynamicModules[o])t.dynamicModules[o]().then(function(e){e.default?u(e.default):u(e)});else{try{r=this.$require(o)}catch(f){}u(r||t.$loaded[o])}},t.$require=function(e){if(typeof n["require"]=="function"){var t="require";return n[t](e)}},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var l=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$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"),l=function(){})};t.version="1.43.2"}),define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,t,n){"use strict";function s(t){if(!i||!i.document)return;r.set("packaged",t||e.packaged||n.packaged||i.define&&define.packaged);var s={},u="",a=document.currentScript||document._currentScript,f=a&&a.ownerDocument||document;a&&a.src&&(u=a.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");var l=f.getElementsByTagName("script");for(var c=0;c ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return this.compare(e,t)==0},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},e.prototype.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},e.prototype.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},e.prototype.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},e.prototype.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?tthis.end.column?1:0:ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.rown)var i={row:n+1,column:0};else if(this.start.row1?(u++,u>4&&(u=1)):u=1;if(i.isIE){var o=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-f)>5;if(!l||o)u=1;l&&clearTimeout(l),l=setTimeout(function(){l=null},n[u-1]||600),u==1&&(a=e.clientX,f=e.clientY)}e._clicks=u,r[s]("mousedown",e);if(u>4)u=0;else if(u>1)return r[s](h[u],e)}var u=0,a,f,l,h={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){c(e,"mousedown",p,o)})},t.getModifierString=function(e){return r.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,r){var i=null;c(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=d(n,e,e.keyCode);return i=e.defaultPrevented,t},r),c(e,"keypress",function(e){i&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),i=null)},r),c(e,"keyup",function(e){s[e.keyCode]=null},r),s||(v(),c(window,"focus",v))};if(typeof window=="object"&&window.postMessage&&!i.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+m++,i=function(s){s.data==r&&(t.stopPropagation(s),h(n,"message",i),e())};c(n,"message",i),n.postMessage(r,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout(function r(){t.$idleBlocked?setTimeout(r,100):e()},n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout(function(){t.$idleBlocked=!1},e||100)},t.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),define("ace/clipboard",["require","exports","module"],function(e,t,n){"use strict";var r;n.exports={lineMode:!1,pasteCancelled:function(){return r&&r>Date.now()-50?!0:r=!1},cancel:function(){r=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(e,t,n){"use strict";var r=e("../lib/event"),i=e("../config").nls,s=e("../lib/useragent"),o=e("../lib/dom"),u=e("../lib/lang"),a=e("../clipboard"),f=s.isChrome<18,l=s.isIE,c=s.isChrome>63,h=400,p=e("../lib/keys"),d=p.KEY_MODS,v=s.isIOS,m=v?/\s/:/\n/,g=s.isMobile,y=function(){function e(e,t){var n=this;this.host=t,this.text=o.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",e.insertBefore(this.text,e.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",g||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch(i){}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),r.addListener(this.text,"blur",function(e){if(n.ignoreFocusEvents)return;t.onBlur(e),n.$isFocused=!1},t),r.addListener(this.text,"focus",function(e){if(n.ignoreFocusEvents)return;n.$isFocused=!0;if(s.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),s.isEdge?setTimeout(n.resetSelection.bind(n)):n.resetSelection()},t),this.$focusScroll=!1,t.on("beforeEndOperation",function(){var e=t.curOp,r=e&&e.command&&e.command.name;if(r=="insertstring")return;var i=r&&(e.docChanged||e.selectionChanged);n.inComposition&&i&&(n.lastValue=n.text.value="",n.onCompositionEnd()),n.resetSelection()}),t.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=v?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&t.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,r.addCommandKeyListener(this.text,function(e,r,i){if(n.inComposition)return;return t.onCommandKey(e,r,i)},t),r.addListener(this.text,"select",this.onSelect.bind(this),t),r.addListener(this.text,"input",this.onInput.bind(this),t),r.addListener(this.text,"cut",this.onCut.bind(this),t),r.addListener(this.text,"copy",this.onCopy.bind(this),t),r.addListener(this.text,"paste",this.onPaste.bind(this),t),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&r.addListener(e,"keydown",function(e){if(s.isMac&&!e.metaKey||!e.ctrlKey)return;switch(e.keyCode){case 67:n.onCopy(e);break;case 86:n.onPaste(e);break;case 88:n.onCut(e)}},t),this.syncComposition=u.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),r.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),t),r.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),t),r.addListener(this.text,"keyup",this.onKeyup.bind(this),t),r.addListener(this.text,"keydown",this.syncComposition.bind(this),t),r.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),t),this.closeTimeout,r.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),t),r.addListener(this.text,"mousedown",function(e){e.preventDefault(),n.onContextMenuClose()},t),r.addListener(t.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),t),r.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),t),v&&this.addIosSelectionHandler(e,t,this.text)}return e.prototype.addIosSelectionHandler=function(e,t,n){var r=this,i=null,s=!1;n.addEventListener("keydown",function(e){i&&clearTimeout(i),s=!0},!0),n.addEventListener("keyup",function(e){i=setTimeout(function(){s=!1},100)},!0);var o=function(e){if(document.activeElement!==n)return;if(s||r.inComposition||t.$mouseHandler.isMousePressed)return;if(r.copied)return;var i=n.selectionStart,o=n.selectionEnd,u=null,a=0;if(i==0)u=p.up;else if(i==1)u=p.home;else if(o>r.lastSelectionEnd&&r.lastValue[o]=="\n")u=p.end;else if(ir.lastSelectionEnd&&r.lastValue.slice(0,o).split("\n").length>2)u=p.down;else if(o>r.lastSelectionEnd&&r.lastValue[o-1]==" ")u=p.right,a=d.option;else if(o>r.lastSelectionEnd||o==r.lastSelectionEnd&&r.lastSelectionEnd!=r.lastSelectionStart&&i==o)u=p.right;i!==o&&(a|=d.shift);if(u){var f=t.onCommandKey({},a,u);if(!f&&t.commands){u=p.keyCodeToString(u);var l=t.commands.findKeyCommand(a,u);l&&t.execCommand(l)}r.lastSelectionStart=i,r.lastSelectionEnd=o,r.resetSelection("")}};document.addEventListener("selectionchange",o),t.on("destroy",function(){document.removeEventListener("selectionchange",o)})},e.prototype.onContextMenuClose=function(){var e=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){e.tempStyle&&(e.text.style.cssText=e.tempStyle,e.tempStyle=""),e.host.renderer.$isMousePressed=!1,e.host.renderer.$keepTextAreaAtCursor&&e.host.renderer.$moveTextAreaToCursor()},0)},e.prototype.$onContextMenu=function(e){this.host.textInput.onContextMenu(e),this.onContextMenuClose()},e.prototype.onKeyup=function(e){e.keyCode==27&&this.text.value.lengthh+100||m.test(n)||g&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},e.prototype.sendText=function(e,t){this.afterContextMenu&&(this.afterContextMenu=!1);if(this.pasted)return this.resetSelection(),e&&this.host.onPaste(e),this.pasted=!1,"";var n=this.text.selectionStart,r=this.text.selectionEnd,i=this.lastSelectionStart,o=this.lastValue.length-this.lastSelectionEnd,u=e,a=e.length-n,f=e.length-r,l=0;while(i>0&&this.lastValue[l]==e[l])l++,i--;u=u.slice(l),l=1;while(o>0&&this.lastValue.length-l>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-l]==e[e.length-l])l++,o--;a-=l-1,f-=l-1;var c=u.length-l+1;c<0&&(i=-c,c=0),u=u.slice(0,c);if(!t&&!u&&!a&&!i&&!o&&!f)return"";this.sendingText=!0;var h=!1;return s.isAndroid&&u==". "&&(u=" ",h=!0),u&&!i&&!o&&!a&&!f||this.commandMode?this.host.onTextInput(u):this.host.onTextInput(u,{extendLeft:i,extendRight:o,restoreStart:a,restoreEnd:f}),this.sendingText=!1,this.lastValue=e,this.lastSelectionStart=n,this.lastSelectionEnd=r,this.lastRestoreEnd=f,h?"\n":u},e.prototype.onSelect=function(e){var t=this;if(this.inComposition)return;var n=function(e){return e.selectionStart===0&&e.selectionEnd>=t.lastValue.length&&e.value===t.lastValue&&t.lastValue&&e.selectionEnd!==t.lastSelectionEnd};this.copied?this.copied=!1:n(this.text)?(this.host.selectAll(),this.resetSelection()):g&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()},e.prototype.$resetSelectionIOS=function(e){if(!this.$isFocused||this.copied&&!e||this.sendingText)return;e||(e="");var t="\n ab"+e+"cde fg\n";t!=this.text.value&&(this.text.value=this.lastValue=t);var n=4,r=4+(e.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=n||this.lastSelectionEnd!=r)&&this.text.setSelectionRange(n,r),this.lastSelectionStart=n,this.lastSelectionEnd=r},e.prototype.$resetSelection=function(){var e=this;if(this.inComposition||this.sendingText)return;if(!this.$isFocused&&!this.afterContextMenu)return;this.inComposition=!0;var t=0,n=0,r="",i=function(t,n){var r=n;for(var i=1;i<=t-e.rowStart&&i<2*e.numberOfExtraLines+1;i++)r+=e.host.session.getLine(t-i).length+1;return r};if(this.host.session){var s=this.host.selection,o=s.getRange(),u=s.cursor.row;if(u===this.rowEnd+1)this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines;else if(u===this.rowStart-1)this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines;else if(uthis.rowEnd+1)this.rowStart=u>this.numberOfExtraLines?u-this.numberOfExtraLines:0,this.rowEnd=u>this.numberOfExtraLines?u+this.numberOfExtraLines:2*this.numberOfExtraLines;var a=[];for(var f=this.rowStart;f<=this.rowEnd;f++)a.push(this.host.session.getLine(f));r=a.join("\n"),t=i(o.start.row,o.start.column),n=i(o.end.row,o.end.column);if(o.start.rowthis.rowEnd){var c=this.host.session.getLine(this.rowEnd+1);n=o.end.row>this.rowEnd+1?c.length:o.end.column,n+=r.length+1,r=r+"\n"+c}else g&&u>0&&(r="\n"+r,n+=1,t+=1);r.length>h&&(t1),e.preventDefault()},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;if(!this.mousedownEvent)return;this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select")},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=a(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(s==-1&&o<=0){t=this.$clickSelection.end;if(i.end.row!=r.row||i.end.column!=r.column)r=i.start}else if(o==1&&s>=0){t=this.$clickSelection.start;if(i.start.row!=r.row||i.start.column!=r.column)r=i.end}else if(s==-1&&o==1)r=i.end,t=i.start;else{var u=a(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>i||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(e.getAccelKey())return;e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,u=i?e.wheelY/i:n.vy;i=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(f=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(f=!0);if(f)n.allowed=r;else if(r-n.allowedn.clientHeight;r||t.preventDefault()}}),define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("./lib/dom"),o=e("./lib/event"),u=e("./range").Range,a=e("./lib/scroll").preventParentScroll,f="ace_tooltip",l=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=s.createElement("div"),this.$element.className=f,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){s.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=f+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,n){e!=null&&this.setText(e),t!=null&&n!=null&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=f,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),c=function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);t!==-1&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,r;this.popups.sort(function(e,t){return t.priority-e.priority});var s=[];try{for(var o=i(this.popups),u=o.next();!u.done;u=o.next()){var a=u.value,f=!0;try{for(var l=(n=void 0,i(s)),c=l.next();!c.done;c=l.next()){var h=c.value;if(this.doPopupsOverlap(h,a)){f=!1;break}}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}f?s.push(a):a.hide()}}catch(d){e={error:d}}finally{try{u&&!u.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),r=t.getElement().getBoundingClientRect();return n.leftr.left&&n.topr.top},e}(),h=new c;t.popupManager=h,t.Tooltip=l;var p=function(e){function t(t){t===void 0&&(t=document.body);var n=e.call(this,t)||this;n.timeout=undefined,n.lastT=0,n.idleTime=350,n.lastEvent=undefined,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var r=n.getElement();return r.style.whiteSpace="pre-wrap",r.style.pointerEvents="auto",r.addEventListener("mouseout",n.onMouseOut),r.tabIndex=-1,r.addEventListener("blur",function(){r.contains(document.activeElement)||this.hide()}.bind(n)),r.addEventListener("wheel",a),n}return r(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var r=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(r.row,r.column)||n||this.isOutsideOfText(this.lastEvent))&&this.hide()}if(this.timeout||n)return;this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime)},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;if(this.idleTime-e>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-e);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),r=t.session.getLine(n.row);if(n.column==r.length){var i=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),s=t.session.documentToScreenPosition(n.row,n.column);if(s.column!=i.column||s.row!=i.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,r){var i=10;if(r&&r!=this.lastEvent)return;if(this.isOpen&&document.activeElement==this.getElement())return;var s=e.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(s.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=u.fromPoints(t.start,t.end);var o=s.textToScreenCoordinates(t.start.row,t.start.column),a=s.scroller.getBoundingClientRect();o.pageXt.session.documentToScreenRow(a.row,a.column))return c()}r.showTooltip(i);if(!r.isOpen)return;t.on("mousewheel",c),t.on("changeSession",c),window.addEventListener("keydown",c,!0);if(e.$tooltipFollowsMouse)p(u);else{var h=u.getGutterRow(),d=n.$lines.get(h);if(d){var v=d.element.querySelector(".ace_gutter_annotation"),m=v.getBoundingClientRect(),g=r.getElement().style;g.left=m.right-f+"px",g.top=m.bottom-l+"px"}else p(u)}}function c(e){if(e&&e.type==="keydown"&&(e.ctrlKey||e.metaKey))return;if(e&&e.type==="mouseout"&&(!e.relatedTarget||r.getElement().contains(e.relatedTarget)))return;i&&(i=clearTimeout(i)),r.isOpen&&(r.hideTooltip(),t.off("mousewheel",c),t.off("changeSession",c),window.removeEventListener("keydown",c,!0))}function p(e){r.setPosition(e.x,e.y)}var t=e.editor,n=t.renderer.$gutterLayer,r=new h(t,!0);e.editor.setDefaultHandler("guttermousedown",function(r){if(!t.isFocused()||r.getButton()!=0)return;var i=n.getRegion(r);if(i=="foldWidgets")return;var s=r.getDocumentPosition().row,o=t.session.selection;if(r.getShiftKey())o.selectTo(s,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.setState("selectByLines"),e.captureMouse(r),r.preventDefault()});var i,u;e.editor.setDefaultHandler("guttermousemove",function(t){var n=t.domEvent.target||t.domEvent.srcElement;if(s.hasCssClass(n,"ace_fold-widget")||s.hasCssClass(n,"ace_custom-widget"))return c();r.isOpen&&e.$tooltipFollowsMouse&&p(t),u=t;if(i)return;i=setTimeout(function(){i=null,u&&!e.isMousePressed&&a()},50)}),o.addListener(t.renderer.$gutter,"mouseout",function(e){u=null;if(!r.isOpen)return;i=setTimeout(function(){i=null,c(e)},50)},t)}var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("../lib/dom"),o=e("../lib/event"),u=e("../tooltip").Tooltip,a=e("../config").nls,f=5,l=3;t.GUTTER_TOOLTIP_LEFT_OFFSET=f,t.GUTTER_TOOLTIP_TOP_OFFSET=l,t.GutterHandler=c;var h=function(e){function t(n,r){r===void 0&&(r=!1);var i=e.call(this,n.container)||this;i.id="gt"+ ++t.$uid,i.editor=n,i.visibleTooltipRow;var s=i.getElement();return s.setAttribute("role","tooltip"),s.setAttribute("id",i.id),s.style.pointerEvents="auto",r&&(i.onMouseOut=i.onMouseOut.bind(i),s.addEventListener("mouseout",i.onMouseOut)),i}return r(t,e),t.prototype.onMouseOut=function(e){if(!this.isOpen)return;if(!e.relatedTarget||this.getElement().contains(e.relatedTarget))return;if(e&&e.currentTarget.contains(e.relatedTarget))return;this.hideTooltip()},t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),s=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+s>r&&(t-=20+s),u.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:a("gutter-tooltip.aria-label.error.singular","error"),plural:a("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:a("gutter-tooltip.aria-label.security.singular","security finding"),plural:a("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:a("gutter-tooltip.aria-label.warning.singular","warning"),plural:a("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:a("gutter-tooltip.aria-label.info.singular","information message"),plural:a("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:a("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:a("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,r=this.editor.renderer.$gutterLayer,i=r.$annotations[e],o;i?o={displayText:Array.from(i.displayText),type:Array.from(i.type)}:o={displayText:[],type:[]};var u=r.session.getFoldLine(e);if(u&&r.$showFoldedAnnotations){var a={error:[],security:[],warning:[],info:[],hint:[]},f={error:1,security:2,warning:3,info:4,hint:5},l;for(var c=e+1;c<=u.end.row;c++){if(!r.$annotations[c])continue;for(var h=0;h2)return n.childNodes[2]}},t.prototype.$findCellByRow=function(e){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(t){return t.row===e})},t.prototype.hideTooltip=function(){if(!this.isOpen)return;this.$element.removeAttribute("aria-live"),this.hide();if(this.visibleTooltipRow!=undefined){var e=this.$findLinkedAnnotationNode(this.visibleTooltipRow);e&&e.removeAttribute("aria-describedby")}this.visibleTooltipRow=undefined,this.editor._signal("hideGutterTooltip",this)},t.annotationsToSummaryString=function(e){var n,r,s=[],o=["error","security","warning","info","hint"];try{for(var u=i(o),a=u.next();!a.done;a=u.next()){var f=a.value;if(!e[f].length)continue;var l=e[f].length===1?t.annotationLabels[f].singular:t.annotationLabels[f].plural;s.push("".concat(e[f].length," ").concat(l))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return s.join(", ")},t}(u);h.$uid=0,t.GutterTooltip=h}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var r=e("../lib/event"),i=e("../lib/useragent"),s=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row,t=this.editor.session.documentToScreenRow(e,0),n=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return t-n},e.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},e.prototype.getButton=function(){return r.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return i.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=s}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function f(e){function T(e,n){var r=Date.now(),i=!n||e.row!=n.row,s=!n||e.column!=n.column;if(!S||i||s)t.moveCursorToPosition(e),S=r,x={x:p,y:d};else{var o=l(x.x,x.y,p,d);o>a?S=null:r-S>=u&&(t.renderer.scrollCursorIntoView(),S=null)}}function N(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,u=t.renderer.scroller.getBoundingClientRect(),a={x:{left:p-u.left,right:u.right-p},y:{top:d-u.top,bottom:u.bottom-d}},f=Math.min(a.x.left,a.x.right),l=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};f/s<=2&&(c.column+=a.x.left=o&&t.renderer.scrollCursorIntoView(c):E=r:E=null}function C(){var e=g;g=t.renderer.screenToTextCoordinates(p,d),T(g,e),N(g,e)}function k(){m=t.selection.toOrientedRange(),h=t.session.addMarker(m,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(v),C(),v=setInterval(C,20),y=0,i.addListener(document,"mousemove",O)}function L(){clearInterval(v),t.session.removeMarker(h),h=null,t.selection.fromOrientedRange(m),t.isFocused()&&!w&&t.$resetCursorStyle(),m=null,g=null,y=0,E=null,S=null,i.removeListener(document,"mousemove",O)}function O(){A==null&&(A=setTimeout(function(){A!=null&&h&&L()},20))}function M(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return e=="text/plain"||e=="Text"})}function _(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var t=e.editor,n=r.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\u00a0";var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(t){e[t]=this[t]},this),t.on("mousedown",this.onMouseDown.bind(e));var c=t.container,h,p,d,v,m,g,y=0,b,w,E,S,x;this.onDragStart=function(e){if(this.cancelDrag||!c.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}m=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),i.setDragImage&&i.setDragImage(n,0,0),setTimeout(function(){t.container.removeChild(n)}),i.clearData(),i.setData("Text",t.session.getTextRange()),w=!0,this.setState("drag")},this.onDragEnd=function(e){c.draggable=!1,w=!1,this.setState(null);if(!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!b&&n=="move"&&t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||k(),y++,e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragOver=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return p=e.clientX,d=e.clientY,h||(k(),y++),A!==null&&(A=null),e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragLeave=function(e){y--;if(y<=0&&h)return L(),b=null,i.preventDefault(e)},this.onDrop=function(e){if(!g)return;var n=e.dataTransfer;if(w)switch(b){case"move":m.contains(g.row,g.column)?m={start:g,end:g}:m=t.moveText(m,g);break;case"copy":m=t.moveText(m,g,!0)}else{var r=n.getData("Text");m={start:g,end:t.session.insert(g,r)},t.focus(),b=null}return L(),i.preventDefault(e)},i.addListener(c,"dragstart",this.onDragStart.bind(e),t),i.addListener(c,"dragend",this.onDragEnd.bind(e),t),i.addListener(c,"dragenter",this.onDragEnter.bind(e),t),i.addListener(c,"dragover",this.onDragOver.bind(e),t),i.addListener(c,"dragleave",this.onDragLeave.bind(e),t),i.addListener(c,"drop",this.onDrop.bind(e),t);var A=null}function l(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=200,u=200,a=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,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=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var n=s.isWin?"default":"move";e.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&this.state=="dragReady"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if(this.state==="dragWait"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(!this.$dragEnabled)return;this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton(),i=e.domEvent.detail||1;if(i===1&&r===0&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on");if(t.getDragDelay()){if(s.isWebKit){this.cancelDrag=!0;var u=t.container;u.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}).call(f.prototype),t.DragdropHandler=f}),define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,t,n){"use strict";var r=e("./mouse_event").MouseEvent,i=e("../lib/event"),s=e("../lib/dom");t.addTouchListeners=function(e,t){function b(){var e=window.navigator&&window.navigator.clipboard,r=!1,i=function(){var n=t.getCopyText(),i=t.session.getUndoManager().hasUndo();y.replaceChild(s.buildDom(r?["span",!n&&o("selectall")&&["span",{"class":"ace_mobile-button",action:"selectall"},"Select All"],n&&o("copy")&&["span",{"class":"ace_mobile-button",action:"copy"},"Copy"],n&&o("cut")&&["span",{"class":"ace_mobile-button",action:"cut"},"Cut"],e&&o("paste")&&["span",{"class":"ace_mobile-button",action:"paste"},"Paste"],i&&o("undo")&&["span",{"class":"ace_mobile-button",action:"undo"},"Undo"],o("find")&&["span",{"class":"ace_mobile-button",action:"find"},"Find"],o("openCommandPalette")&&["span",{"class":"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),y.firstChild)},o=function(e){return t.commands.canExecute(e,t)},u=function(n){var s=n.target.getAttribute("action");if(s=="more"||!r)return r=!r,i();if(s=="paste")e.readText().then(function(e){t.execCommand(s,e)});else if(s){if(s=="cut"||s=="copy")e?e.writeText(t.getCopyText()):document.execCommand("copy");t.execCommand(s)}y.firstChild.style.display="none",r=!1,s!="openCommandPalette"&&t.focus()};y=s.buildDom(["div",{"class":"ace_mobile-menu",ontouchstart:function(e){n="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),u(e)},onclick:u},["span"],["span",{"class":"ace_mobile-button",action:"more"},"..."]],t.container)}function w(){if(!t.getOption("enableMobileMenu")){y&&E();return}y||b();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,i=t.renderer.scrollLeft,s=t.container.getBoundingClientRect();y.style.top=n.pageY-s.top-3+"px",n.pageX-s.left=2?t.selection.getLineRange(p.row):t.session.getBracketRange(p);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),n="wait"}function T(){h+=60,c=setInterval(function(){h--<=0&&(clearInterval(c),c=null),Math.abs(v)<.01&&(v=0),Math.abs(m)<.01&&(m=0),h<20&&(v=.9*v),h<20&&(m=.9*m);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*m),e==t.session.getScrollTop()&&(h=0)},10)}var n="scroll",o,u,a,f,l,c,h=0,p,d=0,v=0,m=0,g,y;i.addListener(e,"contextmenu",function(e){if(!g)return;var n=t.textInput.getElement();n.focus()},t),i.addListener(e,"touchstart",function(e){var i=e.touches;if(l||i.length>1){clearTimeout(l),l=null,a=-1,n="zoom";return}g=t.$mouseHandler.isMousePressed=!0;var s=t.renderer.layerConfig.lineHeight,c=t.renderer.layerConfig.lineHeight,y=e.timeStamp;f=y;var b=i[0],w=b.clientX,E=b.clientY;Math.abs(o-w)+Math.abs(u-E)>s&&(a=-1),o=e.clientX=w,u=e.clientY=E,v=m=0;var T=new r(e,t);p=T.getDocumentPosition();if(y-a<500&&i.length==1&&!h)d++,e.preventDefault(),e.button=0,x();else{d=0;var N=t.selection.cursor,C=t.selection.isEmpty()?N:t.selection.anchor,k=t.renderer.$cursorLayer.getPixelPosition(N,!0),L=t.renderer.$cursorLayer.getPixelPosition(C,!0),A=t.renderer.scroller.getBoundingClientRect(),O=t.renderer.layerConfig.offset,M=t.renderer.scrollLeft,_=function(e,t){return e/=c,t=t/s-.75,e*e+t*t};if(e.clientXP?"cursor":"anchor"),P<3.5?n="anchor":D<3.5?n="cursor":n="scroll",l=setTimeout(S,450)}a=y},t),i.addListener(e,"touchend",function(e){g=t.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),n=="zoom"?(n="",h=0):l?(t.selection.moveToPosition(p),h=0,w()):n=="scroll"?(T(),E()):w(),clearTimeout(l),l=null},t),i.addListener(e,"touchmove",function(e){l&&(clearTimeout(l),l=null);var i=e.touches;if(i.length>1||n=="zoom")return;var s=i[0],a=o-s.clientX,c=u-s.clientY;if(n=="wait"){if(!(a*a+c*c>4))return e.preventDefault();n="cursor"}o=s.clientX,u=s.clientY,e.clientX=s.clientX,e.clientY=s.clientY;var h=e.timeStamp,p=h-f;f=h;if(n=="scroll"){var d=new r(e,t);d.speed=1,d.wheelX=a,d.wheelY=c,10*Math.abs(a)0)if(g==16){for(w=b;w-1){for(w=b;w=0;C--){if(r[C]!=N)break;t[C]=s}}}function I(e,t,n){if(o=e){u=i+1;while(u=e)u++;for(a=i,l=u-1;a=t.length||(o=n[r-1])!=b&&o!=w||(c=t[r+1])!=b&&c!=w)return E;return u&&(c=w),c==o?c:E;case k:o=r>0?n[r-1]:S;if(o==b&&r+10&&n[r-1]==b)return b;if(u)return E;p=r+1,h=t.length;while(p=1425&&d<=2303||d==64286;o=t[p];if(v&&(o==y||o==T))return y}if(r<1||(o=t[r-1])==S)return E;return n[r-1];case S:return u=!1,f=!0,s;case x:return l=!0,E;case O:case M:case D:case P:case _:u=!1;case H:return E}}function R(e){var t=e.charCodeAt(0),n=t>>8;return n==0?t>191?g:B[t]:n==5?/[\u0591-\u05f4]/.test(e)?y:g:n==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?A:/[\u0660-\u0669\u066b-\u066c]/.test(e)?w:t==1642?L:/[\u06f0-\u06f9]/.test(e)?b:T:n==32&&t<=8287?j[t&255]:n==254?t>=65136?T:E:E}function U(e){return e>="\u064b"&&e<="\u0655"}var r=["\u0621","\u0641"],i=["\u063a","\u064a"],s=0,o=0,u=!1,a=!1,f=!1,l=!1,c=!1,h=!1,p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],v=0,m=1,g=0,y=1,b=2,w=3,E=4,S=5,x=6,T=7,N=8,C=9,k=10,L=11,A=12,O=13,M=14,_=15,D=16,P=17,H=18,B=[H,H,H,H,H,H,H,H,H,x,S,x,N,S,H,H,H,H,H,H,H,H,H,H,H,H,H,H,S,S,S,x,N,E,E,L,L,L,E,E,E,E,E,k,C,k,C,C,b,b,b,b,b,b,b,b,b,b,C,E,E,E,E,E,E,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,E,E,E,E,E,E,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,E,E,E,E,H,H,H,H,H,H,S,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,C,E,L,L,L,L,E,E,E,E,g,E,E,H,E,E,L,L,b,b,E,g,E,E,E,b,g,E,E,E,E,E],j=[N,N,N,N,N,N,N,N,N,N,N,H,H,H,g,y,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,N,S,O,M,_,D,P,C,L,L,L,L,L,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,C,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,E,N];t.L=g,t.R=y,t.EN=b,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\u00b7",t.doBidiReorder=function(e,n,r){if(e.length<2)return{};var i=e.split(""),o=new Array(i.length),u=new Array(i.length),a=[];s=r?m:v,F(i,a,i.length,n);for(var f=0;fT&&n[f]0&&i[f-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(i[f])&&(a[f-1]=a[f]=t.R_H,f++);i[i.length-1]===t.DOT&&(a[i.length-1]=t.B),i[0]==="\u202b"&&(a[0]=t.RLE);for(var f=0;f=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n,r=this.session.$getRowCacheIndex(t,this.currentRow);while(this.currentRow-e>0){n=this.session.$getRowCacheIndex(t,this.currentRow-e-1);if(n!==r)break;r=n,e++}}else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){e===undefined&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1,s=n?this.EOF:this.EOL;this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE;if(this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(t===undefined&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[r.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,i=r.getVisualFromLogicalIdx(n,this.bidiMap),s=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&e<=t&&s[i]%2!==0&&i++;for(var u=0;ut&&s[i]%2===0&&(o+=this.charWidths[s[i]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},e.prototype.getSelections=function(e,t){var n=this.bidiMap,r=n.bidiLevels,i,s=[],o=0,u=Math.min(e,t)-this.wrapIndent,a=Math.max(e,t)-this.wrapIndent,f=!1,l=!1,c=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var h,p=0;p=u&&hn+s/2){n+=s;if(r===i.length-1){s=0;break}s=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!==0&&i[r]%2===0?(e0&&i[r-1]%2===0&&i[r]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&s===0&&i[r-1]%2===0||!this.isRtlDir&&r===0&&i[r]%2!==0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!==0&&s!==0&&r--,t=this.bidiMap.logicalFromVisual[r]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=o}),define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),!t.$isEmpty&&!t.$silent&&t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,!t.$isEmpty&&!t.$silent&&t._emit("changeSelection")})}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},e.prototype.$setSelection=function(e,t,n,r){if(this.$silent)return;var i=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||s)&&this._emit("changeSelection")},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},e.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(typeof t=="undefined"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n=typeof e=="number"?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t===!0?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column===0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t));if(t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)},e.prototype.$shortWordEndIndex=function(e){var t=0,n,r=/\s/,i=this.session.tokenRe;i.lastIndex=0;if(this.session.tokenRe.exec(e))t=this.session.tokenRe.lastIndex;else{while((n=e[t])&&r.test(n))t++;if(t<1){i.lastIndex=0;while((n=e[t])&&!i.test(n)){i.lastIndex=0,t++;if(r.test(n)){if(t>2){t--;break}while((n=e[t])&&r.test(n))t++;if(t>2)break}}}}return i.lastIndex=0,t},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e0&&/^\s*$/.test(r));t=r.length,/\s+$/.test(r)||(r="")}var s=i.stringReverse(r),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-o)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r;t===0&&(e!==0&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);if(e!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var s=this.session.screenToDocumentPosition(n.row+e,n.column,r);e!==0&&t===0&&s.row===this.lead.row&&s.column===this.lead.column,this.moveCursorTo(s.row,s.column+t,t===0)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return o.fromPoints(t,n)}catch(r){return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},e.prototype.fromJSON=function(e){if(e.start==undefined){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,r.implement(u.prototype,s),t.Selection=u}),define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,t,n){"use strict";var r=e("./lib/report_error").reportError,i=2e3,s=function(){function e(e){this.splitRegex,this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){var n=this.states[t],r=[],i=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",u=[];for(var a=0;a1?f.onMatch=this.$applyToken:f.onMatch=f.token),c>1&&(/\\\d/.test(f.regex)?l=f.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(c=1,l=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&u.push(f)),s[i]=a,i+=c,r.push(l),f.onMatch||(f.onMatch=null)}r.length||(s[0]=0,r.push("$")),u.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",o)}}return e.prototype.$setMaxTokenCount=function(e){i=e|0},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if(typeof n=="string")return[{type:n,value:e}];var r=[];for(var i=0,s=n.length;il){var g=e.substring(l,m-v.length);h.type==p?h.value+=g:(h.type&&f.push(h),h={type:p,value:g})}for(var y=0;yi){c>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});while(l1&&n[0]!==r&&n.unshift("#tmp",r),{tokens:f,state:n.length?n:r}},e}();s.prototype.reportError=r,t.Tokenizer=s}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";var r=e("../lib/deep_copy").deepCopy,i;i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(e,t){if(!t){for(var n in e)this.$rules[n]=e[n];return}for(var n in e){var r=e[n];for(var i=0;i=this.$rowTokens.length){this.$row+=1,e||(e=this.$session.getLength());if(this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=i}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],f,l={},c={'"':'"',"'":"'"},h=function(e){var t=-1;e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount}));if(l[t])return f=l[t];f=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+(i?0:1)]}},d;d=function(e){e=e||{},this.add("braces","insertion",function(t,n,r,i,s){var u=r.getCursorPosition(),a=i.doc.getLine(u.row);if(s=="{"){h(r);var l=r.getSelectionRange(),c=i.doc.getTextRange(l),v=i.getTokenAt(u.row,u.column);if(c!==""&&c!=="{"&&r.getWrapBehavioursEnabled())return p(l,c,"{","}");if(v&&/(?:string)\.quasi|\.xml/.test(v.type)){var m=[/tag\-(?:open|name)/,/attribute\-name/];if(m.some(function(e){return e.test(v.type)})||/(string)\.quasi/.test(v.type)&&v.value[u.column-v.start-1]!=="$")return;return d.recordAutoInsert(r,i,"}"),{text:"{}",selection:[1,1]}}if(d.isSaneInsertion(r,i))return/[\]\}\)]/.test(a[u.column])||r.inMultiSelectMode||e.braces?(d.recordAutoInsert(r,i,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(r,i,"{"),{text:"{",selection:[1,1]})}else if(s=="}"){h(r);var g=a.substring(u.column,u.column+1);if(g=="}"){var y=i.$findOpeningBracket("}",{column:u.column+1,row:u.row});if(y!==null&&d.isAutoInsertedClosing(u,a,s))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if(s=="\n"||s=="\r\n"){h(r);var b="";d.isMaybeInsertedClosing(u,a)&&(b=o.stringRepeat("}",f.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var g=a.substring(u.column,u.column+1);if(g==="}"){var w=i.findMatchingBracket({row:u.row,column:u.column+1},"}");if(!w)return null;var E=this.$getIndent(i.getLine(w.row))}else{if(!b){d.clearMaybeInsertedClosing();return}var E=this.$getIndent(a)}var S=E+i.getTabString();return{text:"\n"+S+"\n"+E+b,selection:[1,S.length,1,S.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;f.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){h(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return p(s,o,"(",")");if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){h(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&d.isAutoInsertedClosing(u,a,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){h(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return p(s,o,"[","]");if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){h(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&d.isAutoInsertedClosing(u,a,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){h(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){var s=r.$mode.$quotes||c;if(i.length==1&&s[i]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(i)!=-1)return;h(n);var o=i,u=n.getSelectionRange(),a=r.doc.getTextRange(u);if(a!==""&&(a.length!=1||!s[a])&&n.getWrapBehavioursEnabled())return p(u,a,o,o);if(!a){var f=n.getCursorPosition(),l=r.doc.getLine(f.row),d=l.substring(f.column-1,f.column),v=l.substring(f.column,f.column+1),m=r.getTokenAt(f.row,f.column),g=r.getTokenAt(f.row,f.column+1);if(d=="\\"&&m&&/escape/.test(m.type))return null;var y=m&&/string|escape/.test(m.type),b=!g||/string|escape/.test(g.type),w;if(v==o)w=y!==b,w&&/string\.end/.test(g.type)&&(w=!1);else{if(y&&!b)return null;if(y&&b)return null;var E=r.$mode.tokenRe;E.lastIndex=0;var S=E.test(d);E.lastIndex=0;var x=E.test(v),T=r.$mode.$pairQuotesAfter,N=T&&T[o]&&T[o].test(d);if(!N&&S||x)return null;if(v&&!/[\s;,.})\]\\]/.test(v))return null;var C=l[f.column-2];if(!(d!=o||C!=o&&!E.test(C)))return null;w=!0}return{text:w?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.$mode.$quotes||c,o=r.doc.getTextRange(i);if(!i.isMultiLine()&&s.hasOwnProperty(o)){h(n);var u=r.doc.getLine(i.start.row),a=u.substring(i.start.column+1,i.start.column+2);if(a==o)return i.end.column++,i}}),e.closeDocComment!==!1&&this.add("doc comment end","insertion",function(e,t,n,r,i){if(e==="doc-start"&&(i==="\n"||i==="\r\n")&&n.selection.isEmpty()){var s=n.getCursorPosition();if(s.column===0)return;var o=r.doc.getLine(s.row),u=r.doc.getLine(s.row+1),a=r.getTokens(s.row),f=0;for(var l=0;l=s.column){if(f===s.column){if(!/\.doc/.test(c.type))return;if(/\*\//.test(c.value)){var h=a[l+1];if(!h||!/\.doc/.test(h.type))return}}var p=s.column-(f-c.value.length),d=c.value.indexOf("*/"),v=c.value.indexOf("/**",d>-1?d+2:0);if(v!==-1&&p>v&&p=d&&p<=v||!/\.doc/.test(c.type))return;break}}var m=this.$getIndent(o);if(/\s*\*/.test(u))return/^\s*\*/.test(o)?{text:i+m+"* ",selection:[1,2+m.length,1,2+m.length]}:{text:i+m+" * ",selection:[1,3+m.length,1,3+m.length]};if(/\/\*\*/.test(o.substring(0,s.column)))return{text:i+m+" * "+i+" "+m+"*/",selection:[1,4+m.length,1,4+m.length]}}})},d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,f.autoInsertedLineEnd[0])||(f.autoInsertedBrackets=0),f.autoInsertedRow=r.row,f.autoInsertedLineEnd=n+i.substr(r.column),f.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(f.maybeInsertedBrackets=0),f.maybeInsertedRow=r.row,f.maybeInsertedLineStart=i.substr(0,r.column)+n,f.maybeInsertedLineEnd=i.substr(r.column),f.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return f.autoInsertedBrackets>0&&e.row===f.autoInsertedRow&&n===f.autoInsertedLineEnd[0]&&t.substr(e.column)===f.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return f.maybeInsertedBrackets>0&&e.row===f.maybeInsertedRow&&t.substr(e.column)===f.maybeInsertedLineEnd&&t.substr(0,e.column)==f.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){f.autoInsertedLineEnd=f.autoInsertedLineEnd.substr(1),f.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){f&&(f.maybeInsertedBrackets=0,f.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/unicode",["require","exports","module"],function(e,t,n){"use strict";var r=[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],i=0,s=[];for(var o=0;o2?r%f!=f-1:r%f==0}}var E=Infinity;w(function(e,t){var n=e.search(/\S/);n!==-1?(ne.length&&(E=e.length)}),u==Infinity&&(u=E,s=!1,o=!1),l&&u%f!=0&&(u=Math.floor(u/f)*f),w(o?m:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(!i)return;!i.start&&i[0]&&(i=i[0]);var s=new f(t,r.row,r.column),o=s.getCurrentToken(),u=t.selection,a=t.selection.toOrientedRange(),c,h;if(o&&/comment/.test(o.type)){var p,d;while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.start);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;p=new l(m,g,m,g+i.start.length);break}o=s.stepBackward()}var s=new f(t,r.row,r.column),o=s.getCurrentToken();while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.end);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;d=new l(m,g,m,g+i.end.length);break}o=s.stepForward()}d&&t.remove(d),p&&(t.remove(p),c=p.start.row,h=-i.start.length)}else h=i.start.length,c=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);a.start.row==c&&(a.start.column+=h),a.end.row==c&&(a.end.column+=h),t.selection.fromOrientedRange(a)},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)if(e[t]){var n=e[t],i=n.prototype.$id,s=r.$modes[i];s||(r.$modes[i]=s=new n),r.$modes[t]||(r.$modes[t]=s),this.$embeds.push(t),this.$modes[t]=s}var o=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],u=function(e){(function(t){var n=o[e],r=t[n];t[o[e]]=function(){return this.$delegator(n,arguments,r)}})(a)},a=this;for(var t=0;tt[n].column&&n++,s.unshift(n,0),t.splice.apply(t,s),this.$updateRows()}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(!e)return;var t=!0;e.forEach(function(e,n){if(e){t=!1,e.row=n;while(e.$oldWidget)e.$oldWidget.row=n,e=e.$oldWidget}}),t&&(this.session.lineWidgets=null)},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){this.$registerLineWidget(e),e.session=this.session;if(!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=r.createElement("div"),e.el.textContent=e.text),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&r.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),e.pixelHeight==null&&(e.pixelHeight=e.el.offsetHeight)),e.rowCount==null&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);e.$fold=n;if(n){var i=this.session.lineWidgets;e.row==n.end.row&&!i[n.start.row]?i[n.start.row]=e:e.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el);if(e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}if(this.session.lineWidgets){var n=this.session.lineWidgets[e.row];if(n==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else while(n){if(n.$oldWidget==e){n.$oldWidget=e.$oldWidget;break}n=n.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){var t=this.session.lineWidgets,n=t&&t[e],r=[];while(n)r.push(n),n=n.$oldWidget;return r},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(!n||!n.length)return;var i=Infinity;for(var s=0;s0&&!r[i])i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=i;o<=s;o++){var u=r[o];if(!u||!u.el)continue;if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,t.container.appendChild(u.el));var a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=a-n.offset+"px";var f=u.coverGutter?0:t.gutterWidth;u.fixedWidth||(f-=t.scrollLeft),u.el.style.left=f+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=n.width+2*n.padding+"px"),u.fixedWidth?u.el.style.right=t.scrollBar.getWidth()+"px":u.el.style.right=""}},e}();t.LineWidgets=i}),define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";function r(e,t){throw console.log("Invalid Delta:",e),"Invalid Delta: "+t}function i(e,t){return t.row>=0&&t.row=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";function o(e,t,n){var r=n?e.column<=t.column:e.columnthis.row)return;var t=u(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)},e.prototype.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();s.prototype.$insertRight=!1,r.implement(s.prototype,i),t.Anchor=s}),define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(){function e(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new u(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},e.prototype.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e0,r=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;(e.action=="remove"&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,r==-1&&(r=t),s<=r&&n.fireUpdateEvent(s,r)}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||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)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.lines[t]=null;else if(e.action=="remove")this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();r.implement(s.prototype,i),t.BackgroundTokenizer=s}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,t,n){"use strict";var r=e("./lib/lang"),i=e("./range").Range,s=function(){function e(e,t,n){n===void 0&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n,this.docLen=0}return e.prototype.setRegexp=function(e){if(this.regExp+""==e+"")return;this.regExp=e,this.cache=[]},e.prototype.update=function(e,t,n,s){if(!this.regExp)return;var o=s.firstRow,u=s.lastRow,a={},f=n.$editor&&n.$editor.$search,l=f&&f.$isMultilineSearch(n.$editor.getLastSearchOptions());for(var c=o;c<=u;c++){var h=this.cache[c];if(h==null||n.getValue().length!=this.docLen){if(l){h=[];var p=f.$multiLineForward(n,this.regExp,c,u);if(p){var d=p.endRow<=u?p.endRow-1:u;d>c&&(c=d),h.push(new i(p.startRow,p.startCol,p.endRow,p.endCol))}h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES))}else h=r.getMatchOffsets(n.getLine(c),this.regExp),h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(e){return new i(c,e.offset,c,e.offset+e.length)});this.cache[c]=h.length?h:""}if(h.length===0)continue;for(var v=h.length;v--;){var m=h[v].toScreenRange(n),g=m.toString();if(a[g])continue;a[g]=!0,t.drawSingleLineMarker(e,m,this.clazz,s)}}this.docLen=n.getValue().length},e}();s.prototype.MAX_RANGES=500,t.SearchHighlight=s}),define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";function i(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){while(n0){a.row+=i,a.column+=a.row==r.row?s:0;continue}!t&&l<=0&&(a.row=n.row,a.column=n.column,l===0&&(a.bias=1))}}function f(e){return{row:e.row,column:e.column}}function l(e){return{start:f(e.start),end:f(e.end),action:e.action,lines:e.lines.slice()}}function c(e){e=e||this;if(Array.isArray(e))return e.map(c).join("\n");var t="";e.action?(t=e.action=="insert"?"+":"-",t+="["+e.lines+"]"):e.value&&(Array.isArray(e.value)?t=e.value.map(h).join("\n"):t=h(e.value)),e.start&&(t+=h(e));if(e.id||e.rev)t+=" ("+(e.id||e.rev)+")";return t}function h(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function p(e,t){var n=e.action=="insert",r=t.action=="insert";if(n&&r)if(o(t.start,e.end)>=0)m(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;m(e,t,1)}else if(n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;m(e,t,-1)}else if(!n&&r)if(o(t.start,e.start)>=0)m(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;m(e,t,1)}else if(!n&&!r)if(o(t.start,e.start)>=0)m(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;m(e,t,-1)}return[t,e]}function d(e,t){for(var n=e.length;n--;)for(var r=0;r=0?m(e,t,-1):o(e.start,t.start)<=0?m(t,e,1):(m(e,s.fromPoints(t.start,e.start),-1),m(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?m(t,e,-1):o(t.start,e.start)<=0?m(e,t,1):(m(t,s.fromPoints(e.start,t.start),-1),m(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else{if(!(o(t.end,e.start)<=0)){var i,u;return o(e.start,t.start)<0&&(i=e,e=y(e,t.start)),o(e.end,t.end)>0&&(u=y(e,t.end)),g(t.end,e.start,e.end,-1),u&&!i&&(e.lines=u.lines,e.start=u.start,e.end=u.end,u=e),[t,i,u].filter(Boolean)}m(e,t,-1)}return[t,e]}function m(e,t,n){g(e.start,t.start,t.end,n),g(e.end,t.start,t.end,n)}function g(e,t,n,r){e.row==(r==1?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function y(e,t){var n=e.lines,r=e.end;e.end=f(t);var i=e.end.row-e.start.row,s=n.splice(i,n.length),o=i?t.column:t.column-e.start.column;n.push(s[0].substring(0,o)),s[0]=s[0].substr(o);var u={start:f(t),end:r,lines:s,action:e.action};return u}function b(e,t){t=l(t);for(var n=e.length;n--;){var r=e[n];for(var i=0;ithis.$undoDepth-1&&this.$undoStack.splice(0,r-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}if(e.action=="remove"||e.action=="insert")this.$lastDelta=e;this.lastDeltas.push(e)},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){t==null&&(t=this.$rev+1);var n=this.$undoStack;for(var r=n.length;r--;){var i=n[r][0];if(i.id<=e)break;i.id0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){e==undefined&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?c(e):c(this.$undoStack)+"\n---\n"+c(this.$redoStack)},e}();r.prototype.hasUndo=r.prototype.canUndo,r.prototype.hasRedo=r.prototype.canRedo,r.prototype.isClean=r.prototype.isAtBookmark,r.prototype.markClean=r.prototype.bookmark;var s=e("./range").Range,o=s.comparePoints,u=s.comparePoints;t.UndoManager=r}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var r=0,i=this.folds,s,o,u,a=!0;t==null&&(t=this.end.row,n=this.end.column);for(var f=0;f0)continue;var a=i(e,o.start);return u===0?t&&a!==0?-s-2:s:a>0||a===0&&!t?s:-s-1}return-s-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},e.prototype.addList=function(e){var t=[];for(var n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return i(e.start,t.start)});var n=t[0],r;for(var s=1;s=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=r)break}if(e.action=="insert"){var f=i-r,l=-t.column+n.column;for(;or)break;a.start.row==r&&a.start.column>=t.column&&(a.start.column==t.column&&this.$bias<=0||(a.start.column+=l,a.start.row+=f));if(a.end.row==r&&a.end.column>=t.column){if(a.end.column==t.column&&this.$bias<0)continue;a.end.column==t.column&&l>0&&oa.start.column&&a.end.column==s[o+1].start.column&&(a.end.column-=l),a.end.column+=l,a.end.row+=f}}}else{var f=r-i,l=t.column-n.column;for(;oi)break;if(a.end.rowt.column)a.end.column=t.column,a.end.row=t.row}else a.end.column+=l,a.end.row+=f;else a.end.row>i&&(a.end.row+=f);if(a.start.rowt.column)a.start.column=t.column,a.start.row=t.row}else a.start.column+=l,a.start.row+=f;else a.start.row>i&&(a.start.row+=f)}}if(f!=0&&o=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r=e)return i}return null},this.getFoldedRowCount=function(e,t){var n=this.$foldData,r=t-e+1;for(var i=0;i=t){u=e?r-=t-u:r=0);break}o>=e&&(u>=e?r-=o-u:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof s?o=e:(o=new s(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var u=o.start.row,a=o.start.column,f=o.end.row,l=o.end.column,c=this.getFoldAt(u,a,1),h=this.getFoldAt(f,l,-1);if(c&&h==c)return c.addSubFold(o);c&&!c.range.isStart(u,a)&&this.removeFold(c),h&&!h.range.isEnd(f,l)&&this.removeFold(h);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),o.collapseChildren||p.forEach(function(e){o.addSubFold(e)}));for(var d=0;d0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;if(e==null)n=new r(0,0,this.getLength(),0),t==null&&(t=!0);else if(typeof e=="number")n=new r(e,0,e,this.getLine(e).length);else if("row"in e)n=r.fromPoints(e,e);else{if(Array.isArray(e))return i=[],e.forEach(function(e){i=i.concat(this.unfold(e))},this),i;n=e}i=this.getFoldsInRangeList(n);var s=i;while(i.length==1&&r.comparePoints(i[0].start,n.start)<0&&r.comparePoints(i[0].end,n.end)>0)this.expandFolds(i),i=this.getFoldsInRangeList(n);t!=0?this.removeFolds(i):this.expandFolds(i);if(s.length)return s},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r==null&&(r=e.start.row),i==null&&(i=0),t==null&&(t=e.end.row),n==null&&(n=this.getLine(t).length);var s=this.doc,o="";return e.walk(function(e,t,n,u){if(tc)break}while(s&&a.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();f.end.row=i.getCurrentTokenRow(),f.end.column=i.getCurrentTokenColumn();if(f.start.row==f.end.row&&f.start.column>f.end.column)return;return f}},this.foldAll=function(e,t,n,r){n==undefined&&(n=1e5);var i=this.foldWidgets;if(!i)return;t=t||this.getLength(),e=e||0;for(var s=e;s=e&&(s=o.end.row,o.collapseChildren=n,this.addFold("...",o))}},this.foldToLevel=function(e){this.foldAll();while(e-->0)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){var n=e.getTokens(t);for(var r=0;r=0){var s=n[r];s==null&&(s=n[r]=this.getFoldWidget(r));if(s=="start"){var o=this.getFoldWidgetRange(r);i||(i=o);if(o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t instanceof u&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},r=this.$toggleFoldWidget(e,n);if(!r){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(!this.getFoldWidget)return;var n=this.getFoldWidget(e),r=this.getLine(e),i=n==="end"?-1:1,s=this.getFoldAt(e,i===-1?0:r.length,i);if(s)return t.children||t.all?this.removeFold(s):this.expandFold(s),s;var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()){s=this.getFoldAt(o.start.row,o.start.column,1);if(s&&o.isEqual(s.range))return this.removeFold(s),s}if(t.siblings){var u=this.getParentFoldRangeData(e);if(u.range)var a=u.range.start.row+1,f=u.range.end.row;this.foldAll(a,f,t.all?1e4:0)}else t.children?(f=o?o.end.row:this.getLength(),this.foldAll(e+1,f,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(n)return;var r=this.getParentFoldRangeData(t,!0);n=r.range||r.firstRange;if(n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.foldWidgets[t]=null;else if(e.action=="remove")this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var r=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,o=e("../token_iterator").TokenIterator,u=e("../mouse/mouse_event").MouseEvent;t.Folding=a}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";function s(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n=="")return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,s=t.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);o||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1);if(!o)return null;if(o[1]){var u=this.$findClosingBracket(o[1],e);if(!u)return null;r=i.fromPoints(e,u),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var u=this.$findOpeningBracket(o[2],e);if(!u)return null;r=i.fromPoints(u,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),r=/([\(\[\{])|([\)\]\}])/,s=!t&&n.charAt(e.column-1),o=s&&s.match(r);o||(s=(t===undefined||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(r));if(!o)return null;var u=new i(e.row,e.column-1,e.row,e.column),a=o[1]?this.$findClosingBracket(o[1],e):this.$findOpeningBracket(o[2],e);if(!a)return[u];var f=new i(a.row,a.column,a.row,a.column+1);return[u,f]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));var a=t.column-o.getCurrentTokenColumn()-2,f=u.value;for(;;){while(a>=0){var l=f.charAt(a);if(l==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else l==e&&(s+=1);a-=1}do u=o.stepBackward();while(u&&!n.test(u.type));if(u==null)break;f=u.value,a=f.length-1}return null},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));var a=t.column-o.getCurrentTokenColumn();for(;;){var f=u.value,l=f.length;while(a"?r=!0:t.type.indexOf("tag-name")!==-1&&(n=!0));while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,r=t.value,s=t.value,o=0,u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var a=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),f=!1;do{n=t;if(n.type.indexOf("tag-close")!==-1&&!f){var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);f=!0}t=e.stepForward();if(t){if(t.value===">"&&!f){var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);f=!0}if(t.type.indexOf("tag-name")!==-1){r=t.value;if(s===r)if(n.value==="<")o++;else if(n.value==="")return;var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}}else if(s===r&&t.value==="/>"){o--;if(o<0)var c=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),h=c,p=h,l=new i(a.end.row,a.end.column,a.end.row,a.end.column+1)}}}while(t&&o>=0);if(u&&l&&c&&p&&a&&h)return{openTag:new i(u.start.row,u.start.column,l.end.row,l.end.column),closeTag:new i(c.start.row,c.start.column,p.end.row,p.end.column),openTagName:a,closeTagName:h}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),r=t.value,s=0,o=e.getCurrentTokenRow(),u=e.getCurrentTokenColumn(),a=u+2,f=new i(o,u,o,a);e.stepForward();var l=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);t.type.indexOf("tag-close")===-1&&(t=e.stepForward());if(!t||t.value!==">")return;var c=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{t=n,o=e.getCurrentTokenRow(),u=e.getCurrentTokenColumn(),a=u+t.value.length,n=e.stepBackward();if(t)if(t.type.indexOf("tag-name")!==-1){if(r===t.value)if(n.value==="<"){s++;if(s>0){var h=new i(o,u,o,a),p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do t=e.stepForward();while(t&&t.value!==">");var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else n.value===""){var v=0,m=n;while(m){if(m.type.indexOf("tag-name")!==-1&&m.value===r){s--;break}if(m.value==="<")break;m=e.stepBackward(),v++}for(var g=0;g=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./bidihandler").BidiHandler,o=e("./config"),u=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,f=e("./mode/text").Mode,l=e("./range").Range,c=e("./line_widgets").LineWidgets,h=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,v=e("./undomanager").UndoManager,m=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.$gutterCustomWidgets={},this.bgTokenizer=new p((new f).getTokenizer(),this);var r=this;this.bgTokenizer.on("update",function(e){r._signal("tokenizerUpdate",e)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this);if(typeof t!="object"||!t.getLine)t=new h(t);this.setDocument(t),this.selection=new a(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new s(this),o.resetOptions(this),this.setMode(n),o._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on("change",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0},!0),this.on("changeSelection",function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0},!0),this.$operationResetTimer=i.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(e={}),this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&e.returnValue===!1){this.curOp=null,this._signal("endOperation",e);return}if(e==1&&this.curOp.command&&this.curOp.command.name=="mouse")return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new c(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){var n=0,r=e.length-1;while(n<=r){var i=n+r>>1,s=e[i];if(t>s)n=i+1;else{if(!(t=t)break}return r=n[s],r?(r.index=s,r.start=i-r.value.length,r):null},e.prototype.setUndoManager=function(e){this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel();if(e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):" "},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterCustomWidget=function(e){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(e)},e.prototype.addGutterCustomWidget=function(e,t){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe));if(r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var s=t;if(s>0){do s--;while(s>=0&&n.charAt(s).match(i));s++}var o=t;while(oe&&(e=t.screenWidth)}),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){this.$modified=!1;if(this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:Infinity,u=t.length;for(var a=0;ao){a=s.end.row+1;if(a>=u)break;s=this.$foldData[i++],o=s?s.start.row:Infinity}n[a]==null&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;for(var n=e.length-1;n!=-1;n--){var r=e[n];r.action=="insert"||r.action=="remove"?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1},e.prototype.redoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;for(var n=0;ne.end.column&&(s.start.column+=u),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=u)),o&&s.start.row>=e.end.row&&(s.start.row+=o,s.end.row+=o)}s.end=this.insert(s.start,r);if(i.length){var a=e.start,f=s.start,o=f.row-a.row,u=f.column-a.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=o,e.end.row+=o,e}))}return s},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},e.prototype.outdentRows=function(e){var t=e.collapseRows(),n=new l(0,0,0,0),r=this.getTabSize();for(var i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var s=new l(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(s).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),u=n==0?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,u),o.length&&this.addFolds(o),i},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){t=Math.max(0,t);if(e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0);if(e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){if(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode")},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1?(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,s=r.row,o=i.row,u=o-s,a=null;this.$updating=!0;if(u!=0)if(n==="remove"){this[t?"$wrapData":"$rowLengthCache"].splice(s,u);var f=this.$foldData;a=this.getFoldsInRange(e),this.removeFolds(a);var l=this.getFoldLine(i.row),c=0;if(l){l.addRemoveChars(i.row,i.column,r.column-i.column),l.shiftRow(-u);var h=this.getFoldLine(s);h&&h!==l&&(h.merge(l),l=h),c=f.indexOf(l)+1}for(c;c=i.row&&l.shiftRow(-u)}o=s}else{var p=Array(u);p.unshift(s,0);var d=t?this.$wrapData:this.$rowLengthCache;d.splice.apply(d,p);var f=this.$foldData,l=this.getFoldLine(s),c=0;if(l){var v=l.range.compareInside(r.row,r.column);v==0?(l=l.split(r.row,r.column),l&&(l.shiftRow(u),l.addRemoveChars(o,0,i.column-r.column))):v==-1&&(l.addRemoveChars(s,0,i.column-r.column),l.shiftRow(u)),c=f.indexOf(l)+1}for(c;c=s&&l.shiftRow(u)}}else{u=Math.abs(e.start.column-e.end.column),n==="remove"&&(a=this.getFoldsInRange(e),this.removeFolds(a),u=-u);var l=this.getFoldLine(s);l&&l.addRemoveChars(s,r.column,u)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),a},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n=this.doc.getAllLines(),r=this.getTabSize(),i=this.$wrapData,s=this.$wrapLimit,o,u,a=e;t=Math.min(t,n.length-1);while(a<=t)u=this.getFoldLine(a,u),u?(o=[],u.walk(function(e,t,r,i){var s;if(e!=null){s=this.$getDisplayTokens(e,o.length),s[0]=b;for(var u=1;ut-h){var p=s+t-h;if(e[p-1]>=S&&e[p]>=S){c(p);continue}if(e[p]==b||e[p]==w){for(p;p!=s-1;p--)if(e[p]==b)break;if(p>s){c(p);continue}p=s+t;for(p;p>2)),s-1);while(p>d&&e[p]d&&e[p]d&&e[p]==E)p--}else while(p>d&&e[p]d){c(++p);continue}p=s+t,e[p]==y&&p--,c(p-h)}return r},e.prototype.$getDisplayTokens=function(e,t){var n=[],r;t=t||0;for(var i=0;i39&&s<48||s>57&&s<64?n.push(E):s>=4352&&N(s)?n.push(g,y):n.push(g)}return n},e.prototype.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t==null&&(t=Infinity),n=n||0;var r,i;for(i=0;i=4352&&N(r)?n+=2:n+=1;if(n>t)break}return[n,i]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),!this.$useWrapMode||!this.$wrapData[e]?t:this.$wrapData[e].length+t},e.prototype.getRowLineCount=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0)var u=f[l],i=this.$docRowCache[l],h=e>f[c-1];else var h=!c;var p=this.getLength()-1,d=this.getNextFoldLine(i),v=d?d.start.row:Infinity;while(u<=e){a=this.getRowLength(i);if(u+a>e||i>=p)break;u+=a,i++,i>v&&(i=d.end.row+1,d=this.getNextFoldLine(i,d),v=d?d.start.row:Infinity),h&&(this.$docRowCache.push(i),this.$screenRowCache.push(u))}if(d&&d.start.row<=i)r=this.getFoldDisplayLine(d),i=d.start.row;else{if(u+a<=e||i>p)return{row:p,column:this.getLine(p).length};r=this.getLine(i),d=null}var m=0,g=Math.floor(e-u);if(this.$useWrapMode){var y=this.$wrapData[i];y&&(o=y[g],g>0&&y.length&&(m=y.indent,s=y[g-1]||y[y.length-1],r=r.substring(s)))}return n!==undefined&&this.$bidiHandler.isBidiRow(u+g,i,g)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(r,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),d?d.idxToPosition(s):{row:i,column:s}},e.prototype.documentToScreenPosition=function(e,t){if(typeof t=="undefined")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,s=null;s=this.getFoldAt(e,t,1),s&&(e=s.start.row,t=s.start.column);var o,u=0,a=this.$docRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var u=a[f],r=this.$screenRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getNextFoldLine(u),p=h?h.start.row:Infinity;while(u=p){o=h.end.row+1;if(o>e)break;h=this.getNextFoldLine(o,h),p=h?h.start.row:Infinity}else o=u+1;r+=this.getRowLength(u),u=o,c&&(this.$docRowCache.push(u),this.$screenRowCache.push(r))}var d="";h&&u>=p?(d=this.getFoldDisplayLine(h,e,t),i=h.start.row):(d=this.getLine(e).substring(0,t),i=e);var v=0;if(this.$useWrapMode){var m=this.$wrapData[i];if(m){var g=0;while(d.length>=m[g])r++,g++;d=d.substring(m[g-1]||0,d.length),v=g>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[u]&&this.lineWidgets[u].rowsAbove&&(r+=this.lineWidgets[u].rowsAbove),{row:r,column:v+this.$getStringScreenWidth(d)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(!this.$useWrapMode){e=this.getLength();var n=this.$foldData;for(var r=0;ro&&(s=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){if(!this.$enableVarChar)return;this.$getStringScreenWidth=function(t,n,r){if(n===0)return[0,0];n||(n=Infinity),r=r||0;var i,s;for(s=0;sn)break}return[r,s]}},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();if(e.column===0)return e.row===0?"":this.doc.getNewLineCharacter();var t=this.getLine(e.row);return t[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();m.$uid=0,m.prototype.$modes=o.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=N,r.implement(m.prototype,u);var g=1,y=2,b=3,w=4,E=9,S=10,x=11,T=12;e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),o.defineOptions(m.prototype,"session",{wrap:{set:function(e){!e||e=="off"?e=!1:e=="free"?e=!0:e=="printMargin"?e=-1:typeof e=="string"&&(e=parseInt(e,10)||!1);if(this.$wrap==e)return;this.$wrap=e;if(!e)this.setUseWrapMode(!1);else{var t=typeof e=="number"?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e=e=="auto"?this.$mode.type!="text":e!="text",e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){e=parseInt(e),e>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=m}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";function u(e,t){function i(e,r){r===void 0&&(r=!0);var i=n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");if(i.test(e)||t.regExp)return n&&t.$supportsUnicodeFlag?r?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b";return""}var n=r.supportsLookbehind(),s=Array.from(e),o=s[0],u=s[s.length-1];return i(o)+e+i(u,!1)}function a(e,t,n){var r=null,i=0;while(i<=e.length){t.lastIndex=i;var s=t.exec(e);if(!s)break;var o=s.index+s[0].length;if(o>e.length-n)break;if(!r||o>r.index+r[0].length)r=s;i=s.index+1}return r}function f(e,t){var n=5e3,r={row:t,column:0},i=e.doc.positionToIndex(r),s=i+n,o=e.doc.indexToPosition(s),u=o.row;return u+1}var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(){function e(){this.$options={}}return e.prototype.set=function(e){return i.mixin(this.$options,e),this},e.prototype.getOptions=function(){return r.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i,o){return r=new s(e,n,i,o),n==o&&t.start&&t.start.start&&t.skipCurrent!=0&&r.isEqual(t.start)?(r=null,!1):!0}),r},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],u=t.re;if(t.$isMultiLine){var a=u.length,f=i.length-a,l;e:for(var c=u.offset||0;c<=f;c++){for(var h=0;hv)continue;o.push(l=new s(c,v,c+a-1,m)),a>2&&(c=c+a-2)}}else for(var g,y=0;yy&&(y=w),o.push(new s(g.startRow,g.startCol,g.endRow,g.endCol))}}else{g=r.getMatchOffsets(i[y],u);for(var h=0;hx&&o[h].end.row==T)h--;o=o.slice(y,h+1);for(y=0,h=o.length;y=i){n+="\\";break}var o=e.charCodeAt(r);switch(o){case t.Backslash:n+="\\";break;case t.n:n+="\n";break;case t.t:n+=" "}continue}if(s===t.DollarSign){r++;if(r>=i){n+="$";break}var u=e.charCodeAt(r);if(u===t.DollarSign){n+="$$";continue}if(u===t.Digit0||u===t.Ampersand){n+="$&";continue}if(t.Digit1<=u&&u<=t.Digit9){n+="$"+e[r];continue}}n+=e[r]}return n||e},e.prototype.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(!r)return;var i=this.$isMultilineSearch(n);i&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var s=r.exec(e);if(!s||!i&&s[0].length!=e.length)return null;t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(r,t);if(n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var u=e[o];u&&u.toLowerCase()!=u?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n));var i=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,i+="u"}catch(s){e.$supportsUnicodeFlag=!1}e.wholeWord&&(n=u(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n);if(e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var o=new RegExp(n,i)}catch(s){o=!1}return e.re=o},e.prototype.$assembleMultilineRegExp=function(e,t){var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[];for(var i=0;ir)break;var a=e.getLine(o++);i=i==null?a:i+"\n"+a}var l=t.exec(i);t.lastIndex=0;if(l){var c=i.slice(0,l.index).split("\n"),h=l[0].split("\n"),p=n+c.length-1,d=c[c.length-1].length,v=p+h.length-1,m=h.length==1?d+h[0].length:h[h.length-1].length;return{startRow:p,startCol:d,endRow:v,endCol:m}}}return null},e.prototype.$multiLineBackward=function(e,t,n,r,i){var s,o=f(e,r),u=e.getLine(r).length-n;for(var l=r;l>=i;){for(var c=0;c=i;c++){var h=e.getLine(l--);s=s==null?h:h+"\n"+s}var p=a(s,t,u);if(p){var d=s.slice(0,p.index).split("\n"),v=p[0].split("\n"),m=l+d.length,g=d[d.length-1].length,y=m+v.length-1,b=v.length==1?g+v[0].length:v[v.length-1].length;return{startRow:m,startCol:g,endRow:y,endCol:b}}}return null},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this.$isMultilineSearch(t),s=this.$multiLineForward,o=this.$multiLineBackward,u=t.backwards==1,a=t.skipCurrent!=0,f=n.unicode,l=t.range,c=t.start;c||(c=l?l[u?"end":"start"]:e.selection.getRange()),c.start&&(c=c[a!=u?"end":"start"]);var h=l?l.start.row:0,p=l?l.end.row:e.getLength()-1;if(u)var d=function(e){var n=c.row;if(m(n,c.column,e))return;for(n--;n>=h;n--)if(m(n,Number.MAX_VALUE,e))return;if(t.wrap==0)return;for(n=p,h=c.row;n>=h;n--)if(m(n,Number.MAX_VALUE,e))return};else var d=function(e){var n=c.row;if(m(n,c.column,e))return;for(n+=1;n<=p;n++)if(m(n,0,e))return;if(t.wrap==0)return;for(n=h,p=c.row;n<=p;n++)if(m(n,0,e))return};if(t.$isMultiLine)var v=n.length,m=function(t,r,i){var s=u?t-v+1:t;if(s<0||s+v>e.getLength())return;var o=e.getLine(s),a=o.search(n[0]);if(!u&&ar)return;if(i(s,a,s+v-1,l))return!0};else if(u)var m=function(t,s,u){if(i){var a=o(e,n,s,t,h);if(!a)return!1;if(u(a.startRow,a.startCol,a.endRow,a.endCol))return!0}else{var l=e.getLine(t),c=[],p,d=0;n.lastIndex=0;while(p=n.exec(l)){var v=p[0].length;d=p.index;if(!v){if(d>=l.length)break;n.lastIndex=d+=r.skipEmptyMatch(l,d,f)}if(p.index+v>s)break;c.push(p.index,v)}for(var m=c.length-1;m>=0;m-=2){var g=c[m-1],v=c[m];if(u(t,g,t,g+v))return!0}}};else var m=function(t,o,u){n.lastIndex=o;if(i){var a=s(e,n,t,p);if(a){var l=a.endRow<=p?a.endRow-1:p;l>t&&(t=l)}if(!a)return!1;if(u(a.startRow,a.startCol,a.endRow,a.endCol))return!0}else{var c=e.getLine(t),h,d;while(d=n.exec(c)){var v=d[0].length;h=d.index;if(u(t,h,t,h+v))return!0;if(!v){n.lastIndex=h+=r.skipEmptyMatch(c,h,f);if(h>=c.length)return!1}}}};return{forEach:d}},e}();t.Search=o}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function a(e){return typeof e=="object"&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("../lib/keys"),s=e("../lib/useragent"),o=i.KEY_MODS,u=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&(typeof e=="string"?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var s=r[i];if(s==e)delete r[i];else if(Array.isArray(s)){var o=s.indexOf(e);o!=-1&&(s.splice(o,1),s.length==1&&(r[i]=s[0]))}}},e.prototype.bindKey=function(e,t,n){typeof e=="object"&&e&&(n==undefined&&(n=e.position),e=e[this.platform]);if(!e)return;if(typeof t=="function")return this.addCommand({exec:t,bindKey:e,name:t.name||e});e.split("|").forEach(function(e){var r="";if(e.indexOf(" ")!=-1){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;r+=(r?" ":"")+n,this._addCommandToBinding(r,"chainKeys")},this),r+=" "}var s=this.parseKeys(e),u=o[s.hashId]+s.key;this._addCommandToBinding(r+u,t,n)},this)},e.prototype._addCommandToBinding=function(e,t,n){var r=this.commandKeyBinding,i;if(!t)delete r[e];else if(!r[e]||this.$singleCommand)r[e]=t;else{Array.isArray(r[e])?(i=r[e].indexOf(t))!=-1&&r[e].splice(i,1):r[e]=[r[e]],typeof n!="number"&&(n=a(t));var s=r[e];for(i=0;in)break}s.splice(i,0,t)}},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(!n)return;if(typeof n=="string")return this.bindKey(n,t);typeof n=="function"&&(n={exec:n});if(typeof n!="object")return;n.name||(n.name=t),this.addCommand(n)},this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(t.length==1&&t[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}var s=0;for(var o=t.length;o--;){var u=i.KEY_MODS[t[o]];if(u==null)return typeof console!="undefined"&&console.error("invalid modifier "+t[o]+" in "+e),!1;s|=u}return{key:n,hashId:s}},e.prototype.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,r){if(r<0)return;var i=o[t]+n,s=this.commandKeyBinding[i];e.$keyChain&&(e.$keyChain+=" "+i,s=this.commandKeyBinding[e.$keyChain]||s);if(s)if(s=="chainKeys"||s[s.length-1]=="chainKeys")return e.$keyChain=e.$keyChain||i,{command:"null"};if(e.$keyChain)if(!!t&&t!=4||n.length!=1){if(t==-1||r>0)e.$keyChain=""}else e.$keyChain=e.$keyChain.slice(0,-i.length-1);return{command:s}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}(),f=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.$singleCommand=!0,r}return r(t,e),t}(u);f.call=function(e,t,n){u.prototype.$init.call(e,t,n,!0)},u.call=function(e,t,n){u.prototype.$init.call(e,t,n,!1)},t.HashHandler=f,t.MultiHashHandler=u}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,u=function(e){function t(t,n){var r=e.call(this,n,t)||this;return r.byName=r.commands,r.setDefaultHandler("exec",function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}),r}return r(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}typeof e=="string"&&(e=this.commands[e]);var i={editor:t,command:e,args:n};return this.canExecute(e,t)?(i.returnValue=this._emit("exec",i),this._signal("afterExec",i),i.returnValue===!1?!1:!0):(this._signal("commandUnavailable",i),!1)},t.prototype.canExecute=function(e,t){return typeof e=="string"&&(e=this.commands[e]),e?t&&t.$readOnly&&!e.readOnly?!1:this.$checkCommandState!=0&&e.isAvailable&&!e.isAvailable(t)?!1:!0:!1},t.prototype.toggleRecording=function(e){if(this.$inReplay)return;return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(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),this.recording=!0)},t.prototype.replay=function(e){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}},t.prototype.trimMacro=function(e){return e.map(function(e){return typeof e[0]!="string"&&(e[0]=e[0].name),e[1]||(e=e[0]),e})},t}(s);i.implement(u.prototype,o),t.CommandManager=u}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function o(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(e,t){typeof t=="number"&&!isNaN(t)&&e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty(),n=t?e.selection.getLineRange():e.selection.getRange();e._emit("cut",n),n.isEmpty()||e.session.remove(n),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(e){var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,u=e.session.doc.getTextRange(e.selection.getRange()),a=u.replace(/\n\s*/," ").length,f=e.session.doc.getLine(n.row);for(var l=n.row+1;l<=i.row+1;l++){var c=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));c.length!==0&&(c=" "+c),f+=c}i.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o0||e+t=0&&this.$isCustomWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(e+t))return e+t;if(e-t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;var t=0;while(e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(e==null)return;var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()},e.prototype.$focusCustomWidget=function(e){if(e==null)return;var t=this.$getCustomWidget(e);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())},e.prototype.$focusAnnotation=function(e){if(e==null)return;var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurCustomWidget=function(e){var t=this.$getCustomWidget(e);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){var e=this.activeRowIndex;while(e>0){e--;if(this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}}return},e.prototype.$moveFoldWidgetDown=function(){var e=this.activeRowIndex;while(e0){e--;if(this.$isAnnotationVisible(e)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,this.$focusAnnotation(this.activeRowIndex);return}}return},e.prototype.$moveAnnotationDown=function(){var e=this.activeRowIndex;while(e=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/lang"),u=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,f=e("./mouse/mouse_handler").MouseHandler,l=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,p=e("./search").Search,d=e("./range").Range,v=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,g=e("./commands/default_commands").commands,y=e("./config"),b=e("./token_iterator").TokenIterator,w=e("./keyboard/gutter_handler").GutterKeyboardHandler,E=e("./config").nls,S=e("./clipboard"),x=e("./lib/keys"),T=e("./lib/event"),N=e("./tooltip").HoverTooltip,C=function(){function e(t,n,r){this.id="editor"+ ++e.$uid,this.session,this.$toDestroy=[];var i=t.getContainerElement();this.container=i,this.renderer=t,this.commands=new m(u.isMac?"mac":"win",g),typeof document=="object"&&(this.textInput=new a(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new f(this),new l(this)),this.keyBinding=new c(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(n||r&&r.session||new h("")),y.resetOptions(this),r&&this.setOptions(r),y._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&e.returnValue===!1){this.curOp=null;return}this._signal("beforeEndOperation");if(!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:}n=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(!this.$mergeUndoDeltas)return;var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if(e.command.name=="insertstring"){var i=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&n.indexOf(e.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:n.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())},e.prototype.setKeyboardHandler=function(e,t){if(e&&typeof e=="string"&&e!="ace"){this.$keybindingId=e;var n=this;y.loadModule(["keybinding",e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session==e)return;this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){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 n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.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=e.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()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(e,t)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(this.$highlightPending)return;var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(!t||t.destroyed)return;t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach(function(e){t.removeMarker(e)}),t.$bracketHighlight=null);var n=e.getCursorPosition(),r=e.getKeyboardHandler(),i=r&&r.$getDirectionForHighlight&&r.$getDirectionForHighlight(e),s=t.getMatchingBracketRanges(n,i);if(!s){var o=new b(t,n.row,n.column),u=o.getCurrentToken();if(u&&/\b(?:tag-open|tag-name)/.test(u.type)){var a=t.getMatchingTags(n);a&&(s=[a.openTagName.isEmpty()?a.openTag:a.openTagName,a.closeTagName.isEmpty()?a.closeTag:a.closeTagName])}}!s&&t.$mode.getMatching&&(s=t.$mode.getMatching(e.session));if(!s){e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide();return}var f="ace_bracket";Array.isArray(s)?s.length==1&&(f="ace_error_bracket"):s=[s],s.length==2&&(d.comparePoints(s[0].end,s[1].start)==0?s=[d.fromPoints(s[0].start,s[1].end)]:d.comparePoints(s[0].start,s[1].end)==0&&(s=[d.fromPoints(s[1].start,s[0].end)])),t.$bracketHighlight={ranges:s,markerIds:s.map(function(e){return t.addMarker(e,f,"text")})},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()},50)},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){if(this.$isFocused)return;this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e)},e.prototype.onBlur=function(e){if(!this.$isFocused)return;this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e)},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:Infinity;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e=this.getSession(),t;if(this.$highlightActiveLine){if(this.$selectionStyle!="line"||!this.selection.isMultiLine())t=this.getCursorPosition();this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(t=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(t=!1)}if(e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new d(t.row,t.column,t.row,Infinity);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null;if(!this.selection.isEmpty()){var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}else this.$updateHighlightActiveLine();var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(t.isEmpty()||t.isMultiLine())return;var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),s=i.substring(n,r);if(s.length>5e3||!/[\w\d]/.test(s))return;var o=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s}),u=i.substring(n-1,r+1);if(!o.test(u))return;return o},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;var r=this.selection.getAllRanges();for(var i=0;iu.search(/\S|$/)){var a=u.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+a)}}this.clearSelection();var f=i.column,l=n.getState(i.row),u=n.getLine(i.row),c=r.checkOutdent(l,u,e);n.insert(i,e),s&&s.selection&&(s.selection.length==2?this.selection.setSelectionRange(new d(i.row,f+s.selection[0],i.row,f+s.selection[1])):this.selection.setSelectionRange(new d(i.row+s.selection[0],s.selection[1],i.row+s.selection[2],s.selection[3])));if(this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var h=r.getNextLineIndent(l,u.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},h)}c&&r.autoOutdent(l,n,i.row)}},e.prototype.autoIndent=function(){var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new d(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),r="",i="",s="",o=e.getTabString();for(var u=0;u0&&(r=e.getState(l-1),i=e.getLine(l-1),s=t.getNextLineIndent(r,i,o));var c=e.getLine(l),h=t.$getIndent(c);if(s!==h){if(h.length>0){var p=new d(l,0,l,h.length);e.remove(p)}s.length>0&&e.insert({row:l,column:0},s)}t.autoOutdent(r,e,l)}}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){if(t.extendLeft||t.extendRight){var n=this.selection.getRange();n.start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),!e&&!n.isEmpty()&&this.remove()}(e||!this.selection.isEmpty())&&this.insert(e,!0);if(t.restoreStart||t.restoreEnd){var n=this.selection.getRange();n.start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n)}},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&(e=="left"?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(t.end.column===0){var s=n.getTextRange(t);if(s[s.length-1]=="\n"){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(!this.selection.isEmpty())return;var e=this.getCursorPosition(),t=e.column;if(t===0)return;var n=this.session.getLine(e.row),r,i;tt.toLowerCase()?1:0});var i=new d(0,0,0,0);for(var r=e.first;r<=e.last;r++){var s=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=s.length,t.replace(i,n[r-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var r=this.session.getLine(e);while(n.lastIndex=t){var s={value:i[0],start:i.index,end:i.index+i[0].length};return s}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new d(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,u=s.start+s.value.length-o,a=parseFloat(s.value);a*=Math.pow(10,u),o!==s.end&&n=u&&s<=a&&(n=t,f.selection.clearSelection(),f.moveCursorTo(e,u+r),f.selection.selectTo(e,a+r)),u=a});var l=this.$toggleWordPairs,c;for(var h=0;h=a&&u<=f&&p.match(/((?:https?|ftp):\/\/[\S]+)/)){l=p.replace(/[\s:.,'";}\]]+$/,"");break}a=f}}catch(d){n={error:d}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return l},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),t!=null},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var s=r?n.start:n.end,o=t.insert(s,t.getTextRange(n));n.start=s,n.end=o,e.setSelectionRange(n,r)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var s=i.toOrientedRange();n=this.$getSelectedRows(s),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&e==-1&&(r=0),s.moveBy(r,0),i.fromOrientedRange(s)}else{var o=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;var u=0,a=0,f=o.length;for(var l=0;lp+1)break;p=d.last}l--,u=this.session.$moveLines(h,p,t?0:e),t&&e==-1&&(c=l+1);while(c<=l)o[c].moveBy(u,0),c++;t||(u=0),a+=u}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var s=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new b(this.session,n.row,n.column),i=r.getCurrentToken(),s=0;i&&i.type.indexOf("tag-name")!==-1&&(i=r.stepBackward());var o=i||r.stepForward();if(!o)return;var u,a=!1,f={},l=n.column-o.start,c,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g))for(;l1?f[o.value]++:i.value==="=0;--s)this.$tryReplace(n[s],e)&&r++;return this.selection.setSelectionRange(i),r},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t!==null?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),typeof e=="string"||e instanceof RegExp?t.needle=e:typeof e=="object"&&i.mixin(t,e);var r=this.selection.getRange();t.needle==null&&(e=this.session.getTextRange(r)||this.$search.$options.needle,e||(r=this.session.getWordRange(r.start.row,r.start.column),e=this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var s=this.$search.find(this.session);if(t.preventScroll)return s;if(s)return this.revealRange(s,n),s;t.backwards?r.start=r.end:r.end=r.start,this.selection.setRange(r)},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(e){e.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(!e)return;var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var s=this.on("changeSelection",function(){r=!0}),o=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),u=this.renderer.on("afterRender",function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,s=e.$cursorLayer.$pixelPos,o=e.layerConfig,u=s.top-o.offset;s.top>=0&&u+t.top<0?r=!0:s.topwindow.innerHeight?r=!1:r=null,r!=null&&(i.style.top=u+"px",i.style.left=s.left+"px",i.style.height=o.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){if(e)return;delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",u),this.renderer.off("beforeRender",o)}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;if(!t)return;t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&e!="wide",s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e))},e.prototype.prompt=function(e,t,n){var r=this;y.loadModule("ace/ext/prompt",function(i){i.prompt(r,e,t,n)})},e}();C.$uid=0,C.prototype.curOp=null,C.prototype.prevOp={},C.prototype.$mergeableCommands=["backspace","del","insertstring"],C.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"],["&&","||"],["==","!="]],i.implement(C.prototype,v),y.defineOptions(C.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;this.textInput.setReadOnly(e);if(this.destroyed)return;this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var n=!1;if(e&&e.type=="keydown"){e&&e.key&&!e.ctrlKey&&!e.metaKey&&(e.key==" "&&e.preventDefault(),n=e.key.length==1);if(!n)return}else e&&e.type!=="exec"&&(n=!0);if(n){t.hoverTooltip||(t.hoverTooltip=new N);var r=s.createElement("div");r.textContent=E("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),r)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var n=this.textInput.getElement();e?(T.addListener(n,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(T.removeListener(n,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?k.attach(this):k.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),s.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!e&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),s.addCssClass(this.container,"ace_hasPlaceholder");var t=s.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},n=function(e){if(e.target==this.renderer.scroller&&e.keyCode===x.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}},r;e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",E("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",E("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",n.bind(this)),this.commands.addCommand(t),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",E("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",E("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",!0),r||(r=new w(this)),r.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,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",n.bind(this)),this.commands.removeCommand(t),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),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),r&&r.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},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 k={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\u00b7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=C}),define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){r.translate(this.element,0,-(e.firstRowScreen*e.lineHeight%this.canvasHeight)-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight),s=n.documentToScreenRow(e,0)*t.lineHeight;return s-i*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);var t=r.createFragment(this.element);for(var n=0;ns&&(a=i.end.row+1,i=t.getNextFoldLine(a,i),s=i?i.start.row:Infinity);if(a>r){while(this.$lines.getLength()>u+1)this.$lines.pop();break}o=this.$lines.get(++u),o?o.row=a:(o=this.$lines.createCell(a,e,this.session,l),this.$lines.push(o)),this.$renderCell(o,e,i,a),a++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:"";if(this.$fixedWidth||t.$useWrapMode)i=t.getLength()+r-1;var s=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,o=this.$padding||this.$computePadding();s+=o.left+o.right,s!==this.gutterWidth&&!isNaN(s)&&(this.gutterWidth=s,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",s))},e.prototype.$updateCursorRow=function(){if(!this.$highlightGutterLine)return;var e=this.session.selection.getCursor();if(this.$cursorRow===e.row)return;this.$cursorRow=e.row},e.prototype.updateLineHighlight=function(){if(!this.$highlightGutterLine)return;var e=this.session.selection.cursor.row;this.$cursorRow=e;if(this.$cursorCell&&this.$cursorCell.row==e)return;this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&i&&i.start.row==t[n-1].row))break;r=t[n-1]}r.element.className="ace_gutter-active-line "+r.element.className,this.$cursorCell=r;break}}},e.prototype.scrollLines=function(e){var t=this.config;this.config=e,this.$updateCursorRow();if(this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;this.oldLastRow=n;if(!t||r0;i--)this.$lines.shift();if(r>n)for(var i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRowr&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){var r=[],i=t,s=this.session.getNextFoldLine(i),o=s?s.start.row:Infinity;for(;;){i>o&&(i=s.end.row+1,s=this.session.getNextFoldLine(i,s),o=s?s.start.row:Infinity);if(i>n)break;var u=this.$lines.createCell(i,e,this.session,l);this.$renderCell(u,e,s,i),r.push(u),i++}return r},e.prototype.$renderCell=function(e,t,n,i){var s=e.element,o=this.session,u=s.childNodes[0],f=s.childNodes[1],l=s.childNodes[2],c=s.childNodes[3],h=l.firstChild,p=o.$firstLineNumber,d=o.$breakpoints,v=o.$decorations,m=o.gutterRenderer||this.$renderer,g=this.$showFoldWidgets&&o.foldWidgets,y=n?n.start.row:Number.MAX_VALUE,b=t.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",E=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",S=(m?m.getText(o,i):i+p).toString();this.$highlightGutterLine&&(i==this.$cursorRow||n&&i=y&&this.$cursorRow<=n.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),d[i]&&(w+=d[i]),v[i]&&(w+=v[i]),this.$annotations[i]&&i!==y&&(w+=this.$annotations[i].className);if(g){var x=g[i];x==null&&(x=g[i]=o.getFoldWidget(i))}if(x){var T="ace_fold-widget ace_"+x,N=x=="start"&&i==y&&in.right-t.right)return"foldWidgets"},e}();f.prototype.$fixedWidth=!1,f.prototype.$highlightGutterLine=!0,f.prototype.$renderer="",f.prototype.$showLineNumbers=!0,f.prototype.$showFoldWidgets=!0,i.implement(f.prototype,o),t.Gutter=f}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";function o(e,t,n,r){return(e?1:0)|(t?2:0)|(n?4:0)|(r?8:0)}var r=e("../range").Range,i=e("../lib/dom"),s=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(!e)return;this.config=e,this.i=0;var t;for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var i=r.range.clipRows(e.firstRow,e.lastRow);if(i.isEmpty())continue;i=i.toScreenRange(this.session);if(r.renderer){var s=this.$getTop(i.start.row,e),o=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,o,s,e)}else r.type=="fullLine"?this.drawFullLineMarker(t,i,r.clazz,e):r.type=="screenLine"?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?r.type=="text"?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+" ace_start"+" ace_br15",e)}if(this.i!=-1)while(this.ip,l==f),i,l==f?0:1,s)},e.prototype.drawMultiLineMarker=function(e,t,n,r,i){var s=this.$padding,o=r.lineHeight,u=this.$getTop(t.start.row,r),a=s+t.start.column*r.characterWidth;i=i||"";if(this.session.$bidiHandler.isBidiRow(t.start.row)){var f=t.clone();f.end.row=f.start.row,f.end.column=this.session.getLine(f.start.row).length,this.drawBidiSingleLineMarker(e,f,n+" ace_br1 ace_start",r,null,i)}else this.elt(n+" ace_br1 ace_start","height:"+o+"px;"+"right:"+s+"px;"+"top:"+u+"px;left:"+a+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var f=t.clone();f.start.row=f.end.row,f.start.column=0,this.drawBidiSingleLineMarker(e,f,n+" ace_br12",r,null,i)}else{u=this.$getTop(t.end.row,r);var l=t.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+o+"px;"+"width:"+l+"px;"+"top:"+u+"px;"+"left:"+s+"px;"+(i||""))}o=(t.end.row-t.start.row-1)*r.lineHeight;if(o<=0)return;u=this.$getTop(t.start.row+1,r);var c=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(c?" ace_br"+c:""),"height:"+o+"px;"+"right:"+s+"px;"+"top:"+u+"px;"+"left:"+s+"px;"+(i||""))},e.prototype.drawSingleLineMarker=function(e,t,n,r,i,s){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,s);var o=r.lineHeight,u=(t.end.column+(i||0)-t.start.column)*r.characterWidth,a=this.$getTop(t.start.row,r),f=this.$padding+t.start.column*r.characterWidth;this.elt(n,"height:"+o+"px;"+"width:"+u+"px;"+"top:"+a+"px;"+"left:"+f+"px;"+(s||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,r,i,s){var o=r.lineHeight,u=this.$getTop(t.start.row,r),a=this.$padding,f=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);f.forEach(function(e){this.elt(n,"height:"+o+"px;"+"width:"+(e.width+(i||0))+"px;"+"top:"+u+"px;"+"left:"+(a+e.left)+"px;"+(s||""))},this)},e.prototype.drawFullLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-s),this.elt(n,"height:"+o+"px;"+"top:"+s+"px;"+"left:0;right:0;"+(i||""))},e.prototype.drawScreenLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;this.elt(n,"height:"+o+"px;"+"top:"+s+"px;"+"left:0;right:0;"+(i||""))},e}();s.prototype.$padding=0,t.Marker=s}),define("ace/layer/text_util",["require","exports","module"],function(e,t,n){var r=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return r.has(e)}}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("./lines").Lines,u=e("../lib/event_emitter").EventEmitter,a=e("../config").nls,f=e("./text_util").isTextToken,l=function(){function e(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()=="\n"&&e.getNewLineMode()!="windows",n=t?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;var t=this.$tabStrings=[0];for(var n=1;nl&&(u=a.end.row+1,a=this.session.getNextFoldLine(u,a),l=a?a.start.row:Infinity);if(u>i)break;var c=s[o++];if(c){this.dom.removeChildren(c),this.$renderLine(c,u,u==l?a:!1),f&&(c.style.top=this.$lines.computeLineTop(u,e,this.session)+"px");var h=e.lineHeight*this.session.getRowLength(u)+"px";c.style.height!=h&&(f=!0,c.style.height=h)}u++}if(f)while(o0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(var i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){var r=[],s=t,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>n)break;var a=this.$lines.createCell(s,e,this.session),f=a.element;this.dom.removeChildren(f),i.setStyle(f.style,"height",this.$lines.computeLineHeight(s,e,this.session)+"px"),i.setStyle(f.style,"top",this.$lines.computeLineTop(s,e,this.session)+"px"),this.$renderLine(f,s,s==u?o:!1),this.$useLineGroups()?f.className="ace_line_group":f.className="ace_line",r.push(a),s++}return r},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;var t=e.firstRow,n=e.lastRow,r=this.$lines;while(r.getLength())r.pop();r.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,r){var i=this,o=/(\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\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\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,u=this.dom.createFragment(this.element),l,c=0;while(l=o.exec(r)){var h=l[1],p=l[2],d=l[3],v=l[4],m=l[5];if(!i.showSpaces&&p)continue;var g=c!=l.index?r.slice(c,l.index):"";c=l.index+l[0].length,g&&u.appendChild(this.dom.createTextNode(g,this.element));if(h){var y=i.session.getScreenTabSize(t+l.index),b=i.$tabStrings[y].cloneNode(!0);b.charCount=1,u.appendChild(b),t+=y-1}else if(p)if(i.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=s.stringRepeat(i.SPACE_CHAR,p.length),u.appendChild(w)}else u.appendChild(this.dom.createTextNode(p,this.element));else if(d){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=s.stringRepeat(i.SPACE_CHAR,d.length),u.appendChild(w)}else if(v){t+=1;var w=this.dom.createElement("span");w.style.width=i.config.characterWidth*2+"px",w.className=i.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=i.showSpaces?i.SPACE_CHAR:v,u.appendChild(w)}else if(m){t+=1;var w=this.dom.createElement("span");w.style.width=i.config.characterWidth*2+"px",w.className="ace_cjk",w.textContent=m,u.appendChild(w)}}u.appendChild(this.dom.createTextNode(c?r.slice(c):r,this.element));if(!f(n.type)){var E="ace_"+n.type.replace(/\./g," ace_"),w=this.dom.createElement("span");n.type=="fold"&&(w.style.width=n.value.length*this.config.characterWidth+"px",w.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),w.className=E,w.appendChild(u),e.appendChild(w)}else e.appendChild(u);return t+r.length},e.prototype.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(t[0]==" "){r-=r%this.tabSize;var i=r/this.tabSize;for(var s=0;ss[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[t.row]!==""&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(var o=t.row+1;o0))return;r=e.element.childNodes[0]}var i=r.childNodes;if(i){var s=i[t-1];s&&s.classList&&s.classList.contains("ace_indent-guide")&&s.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(!this.$lines)return;var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(t!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var n=0;n=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}else for(var n=e.length-1;n>=0;n--){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row=o){u=this.$renderToken(a,u,l,c.substring(0,o-r)),c=c.substring(o-r),r=o,a=this.$createLineElement(),e.appendChild(a);var h=this.dom.createTextNode(s.stringRepeat("\u00a0",n.indent),this.element);h.charCount=0,a.appendChild(h),i++,u=0,o=n[i]||Number.MAX_VALUE}c.length!=0&&(r+=c.length,u=this.$renderToken(a,u,l,c))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,u,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){var n=0;for(var r=0;rthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,s);n=this.$renderToken(e,n,i,s)}},e.prototype.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var s=this.dom.createElement("span");s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=i?"":"",e.appendChild(s)},e.prototype.$renderLine=function(e,t,n){!n&&n!=0&&(n=this.session.getFoldLine(t));if(n)var r=this.$getFoldLineTokens(t,n);else var r=this.session.getTokens(t);var i=e;if(r.length){var s=this.session.getRowSplitData(t);if(s&&s.length){this.$renderWrappedLine(e,r,s);var i=e.lastChild}else{var i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var o=this.dom.createElement("span");o.className="ace_invisible ace_invisible_eol",o.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(o)}},e.prototype.$getFoldLineTokens=function(e,t){function i(e,t,n){var i=0,s=0;while(s+e[i].value.lengthn-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),s=t+o.length,i+=1}while(sn?r.push({type:e[i].type,value:o.substring(0,n-s)}):r.push(e[i]),s+=o.length,i+=1}}var n=this.session,r=[],s=n.getTokens(e);return t.walk(function(e,t,o,u,a){e!=null?r.push({type:"fold",value:e}):(a&&(s=n.getTokens(t)),s.length&&i(s,u,o))},t.end.row,this.session.getLine(t.end.row).length),r},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();l.prototype.EOF_CHAR="\u00b6",l.prototype.EOL_CHAR_LF="\u00ac",l.prototype.EOL_CHAR_CRLF="\u00a4",l.prototype.EOL_CHAR=l.prototype.EOL_CHAR_LF,l.prototype.TAB_CHAR="\u2014",l.prototype.SPACE_CHAR="\u00b7",l.prototype.$padding=0,l.prototype.MAX_LINE_LENGTH=1e4,l.prototype.showInvisibles=!1,l.prototype.showSpaces=!1,l.prototype.showTabs=!1,l.prototype.showEOL=!1,l.prototype.displayIndentGuides=!0,l.prototype.$highlightIndentGuides=!0,l.prototype.$tabStrings=[],l.prototype.destroy={},l.prototype.onChangeTabSize=l.prototype.$computeTabString,r.implement(l.prototype,u),t.Text=l}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=function(){function e(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){var t=this.cursors;for(var n=t.length;n--;)r.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){var e=this.cursors;for(var t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,"ace_smooth-blinking")),e(!0);if(!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)));if(r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||o.top<0)&&n>1)continue;var u=this.cursors[i++]||this.addCursor(),a=u.style;this.drawCursor?this.drawCursor(u,o,e,t[n],this.session):this.isCursorInView(o,e)?(r.setStyle(a,"display","block"),r.translate(u,o.left,o.top),r.setStyle(a,"width",Math.round(e.characterWidth)+"px"),r.setStyle(a,"height",e.lineHeight+"px")):r.setStyle(a,"display","none")}while(this.cursors.length>i)this.removeCursor();var f=this.session.getOverwrite();this.$setOverwrite(f),this.$pixelPos=o,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();i.prototype.$padding=0,i.prototype.drawCursor=null,t.Cursor=i}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),u=e("./lib/event_emitter").EventEmitter,a=32768,f=function(){function e(e,t){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\u00a0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(f.prototype,u);var l=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,n.$scrollbarWidth=r.width=s.scrollbarWidth(t.ownerDocument),r.inner.style.width=r.element.style.width=(r.width||15)+5+"px",r.$minWidth=0,r}return r(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){this.scrollTop=this.element.scrollTop;if(this.coeff!=1){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>a?(this.coeff=a/e,e=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(f);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var c=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.height=n.$scrollbarWidth,r.inner.style.height=r.element.style.height=(r.height||15)+5+"px",r}return r(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(f);t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c}),define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),u=e("./lib/event_emitter").EventEmitter;s.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",!1);var a=function(){function e(e,t){this.element=s.createElement("div"),this.element.className="ace_sb"+t,this.inner=s.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();i.implement(a.prototype,u);var f=function(e){function t(t,n){var r=e.call(this,t,"-v")||this;return r.scrollTop=0,r.scrollHeight=0,r.parent=t,r.width=r.VScrollWidth,r.renderer=n,r.inner.style.width=r.element.style.width=(r.width||15)+"px",r.$minWidth=0,r}return r(t,e),t.prototype.onMouseDown=function(e,t){if(e!=="mousedown")return;if(o.getButton(t)!==0||t.detail===2)return;if(t.target===this.inner){var n=this,r=t.clientY,i=function(e){r=e.clientY},s=function(){clearInterval(l)},u=t.clientY,a=this.thumbTop,f=function(){if(r===undefined)return;var e=n.scrollTopFromThumbTop(a+r-u);if(e===n.scrollTop)return;n._emit("scroll",{data:e})};o.capture(this.inner,i,s);var l=setInterval(f,20);return o.preventDefault(t)}var c=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(c)}),o.preventDefault(t)},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return t>>=0,t<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){if(this.pageHeight===e&&!t)return;this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop}))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(a);f.prototype.setInnerHeight=f.prototype.setScrollHeight;var l=function(e){function t(t,n){var r=e.call(this,t,"-h")||this;return r.scrollLeft=0,r.scrollWidth=0,r.height=r.HScrollHeight,r.inner.style.height=r.element.style.height=(r.height||12)+"px",r.renderer=n,r}return r(t,e),t.prototype.onMouseDown=function(e,t){if(e!=="mousedown")return;if(o.getButton(t)!==0||t.detail===2)return;if(t.target===this.inner){var n=this,r=t.clientX,i=function(e){r=e.clientX},s=function(){clearInterval(l)},u=t.clientX,a=this.thumbLeft,f=function(){if(r===undefined)return;var e=n.scrollLeftFromThumbLeft(a+r-u);if(e===n.scrollLeft)return;n._emit("scroll",{data:e})};o.capture(this.inner,i,s);var l=setInterval(f,20);return o.preventDefault(t)}var c=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(c)}),o.preventDefault(t)},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return t>>=0,t<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){if(this.pageWidth===e&&!t)return;this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft}))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(a);l.prototype.setInnerWidth=l.prototype.setScrollWidth,t.ScrollBar=f,t.ScrollBarV=f,t.ScrollBarH=l,t.VScrollBar=f,t.HScrollBar=l}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var r=e("./lib/event"),i=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;t&&(r.blockIdle(100),n.changes=0,n.onRender(t));if(n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=i}),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(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/event"),u=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,f=512,l=typeof ResizeObserver=="function",c=200,h=function(){function e(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",f),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",u.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){e===undefined&&(e=this.$measureSizes());if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver(function(t){e.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=o.onIdle(function t(){e.checkForSizeChanges(),o.onIdle(t,500)},500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/f};return t.width===0||t.height===0?null:t},e.prototype.$measureCharWidth=function(e){this.$main.textContent=s.stringRepeat(e,f);var t=this.$main.getBoundingClientRect();return t.width/f},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return t===undefined&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return!e||!e.parentElement?1:(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement)},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(c,0),e(0,c),e(c,c)],this.el)},e.prototype.transformCoordinates=function(e,t){function r(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function s(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function u(e){var t=e.getBoundingClientRect();return[t.left,t.top]}if(e){var n=this.$getZoom(this.el);e=o(1/n,e)}this.els||this.$initTransformMeasureNodes();var a=u(this.els[0]),f=u(this.els[1]),l=u(this.els[2]),h=u(this.els[3]),p=r(i(h,f),i(h,l),i(s(f,l),s(h,a))),d=o(1+p[0],i(f,a)),v=o(1+p[1],i(l,a));if(t){var m=t,g=p[0]*m[0]/c+p[1]*m[1]/c+1,y=s(o(m[0],d),o(m[1],v));return s(o(1/g/c,y),a)}var b=i(e,a),w=r(i(d,o(p[0],b)),i(v,o(p[1],b)),b);return o(c,w)},e}();h.prototype.$characterSize={width:0,height:0},r.implement(h.prototype,a),t.FontMetrics=h}),define("ace/css/editor-css",["require","exports","module"],function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .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 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(33em, 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, .ace_custom-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 pointer-events: auto;\n}\n\n.ace_custom-widget {\n background: none;\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(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/event_emitter").EventEmitter,o=function(){function e(e,t){this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,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)"},this.setScrollBarV(e)}return e.prototype.$createCanvas=function(){this.canvas=r.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},e.prototype.setScrollBarV=function(e){this.$createCanvas(),this.scrollbarV=e,e.element.appendChild(this.canvas),this.setDimensions()},e.prototype.$updateDecorators=function(e){function r(e,t){return e.priorityt.priority?1:0}if(typeof this.canvas.getContext!="function")return;var t=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(e);var n=this.canvas.getContext("2d"),i=this.renderer.session.$annotations;n.clearRect(0,0,this.canvas.width,this.canvas.height);if(i){var s={info:1,warning:2,error:3};i.forEach(function(e){e.priority=s[e.type]||null}),i=i.sort(r);for(var o=0;othis.canvasHeight&&(h=this.canvasHeight-p);var d=h-p,v=h+p,m=v-d;n.fillStyle=t[i[o].type]||null,n.fillRect(0,d,Math.round(this.oneZoneWidth-1),m)}}var g=this.renderer.session.selection.getCursor();if(g){var y=Math.round(this.getVerticalOffsetForRow(g.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,y,this.canvasWidth,2)}},e.prototype.getVerticalOffsetForRow=function(e){e|=0;var t=this.renderer.session.documentToScreenRow(e,0)*this.lineHeight;return t},e.prototype.setDimensions=function(e){e=e||this.renderer.layerConfig,this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeighte&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow)return;this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,r){if(this.resizing>2)return;this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),!r&&this.$maxLines&&this.lineHeight>1&&(!i.style.height||i.style.height=="0px")&&(i.style.height="1px",r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var s=this.$updateCachedSize(e,t,n,r);this.$resizeTimer&&this.$resizeTimer.cancel();if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)},e.prototype.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var s=0,o=this.$size,u={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};r&&(e||o.height!=r)&&(o.height=r,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(o.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL);if(n&&(e||o.width!=n)){s|=this.CHANGE_SIZE,o.width=n,t==null&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var a=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",a),i.setStyle(this.scroller.style,"right",a),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(o.scrollerWidth);if(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)s|=this.CHANGE_FULL}return o.$dirty=!n||!r,s&&this._signal("resize",u),s},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(!this.$showPrintMargin&&!this.$printMarginEl)return;if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(this.$isMousePressed)return;var e=this.textarea.style,t=this.$composition;if(!this.$keepTextAreaAtCursor&&!t){i.translate(this.textarea,-100,0);return}var n=this.$cursorLayer.$pixelPos;if(!n)return;t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,s=n.top,o=n.left;s-=r.offset;var u=t&&t.useTextareaForIME||w.isMobile?this.lineHeight:1;if(s<0||s>r.height-u){i.translate(this.textarea,0,0);return}var a=1,f=this.$size.height-u;if(!t)s+=this.lineHeight;else if(t.useTextareaForIME){var l=this.textarea.value;a=this.characterWidth*this.session.$getStringScreenWidth(l)[0]}else s+=this.lineHeight+2;o-=this.scrollLeft,o>this.$size.scrollerWidth-a&&(o=this.$size.scrollerWidth-a),o+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",u+"px"),i.setStyle(e,"width",a+"px"),i.translate(this.textarea,Math.min(o,this.$size.scrollerWidth-a),Math.min(s,f))},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow,n=this.session.documentToScreenRow(t,0)*e.lineHeight;return n-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,r){var i=this.margin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){this.$changes&&(e|=this.$changes,this.$changes=0);if(!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t){this.$changes|=e;return}if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){e|=this.$computeLayerConfig()|this.$loop.clear();if(n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var s=n.width+2*this.$padding+"px",o=n.minHeight+"px";i.setStyle(this.content.style,"width",s),i.setStyle(this.content.style,"height",o)}e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName));if(e&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this._signal("afterRender",e);return}if(e&this.CHANGE_SCROLL){this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this._signal("afterRender",e);return}e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=n<=2*this.lineHeight,i=!r&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var s=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,s=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-s-2*this.$padding<0),u=this.$horizScroll!==o;u&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),n=t.height<=2*this.lineHeight);var f=t.scrollerHeight+this.lineHeight,l=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=l;var c=this.scrollMargin;this.session.setScrollTop(Math.max(-c.top,Math.min(this.scrollTop,i-t.scrollerHeight+c.bottom))),this.session.setScrollLeft(Math.max(-c.left,Math.min(this.scrollLeft,s+2*this.$padding-t.scrollerWidth+c.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+l<0||this.scrollTop>c.top),p=a!==h;p&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var d=this.scrollTop%this.lineHeight,v=Math.ceil(f/this.lineHeight)-1,m=Math.max(0,Math.round((this.scrollTop-d)/this.lineHeight)),g=m+v,y,b,w=this.lineHeight;m=e.screenToDocumentRow(m,0);var E=e.getFoldLine(m);E&&(m=E.start.row),y=e.documentToScreenRow(m,0),b=e.getRowLength(m)*w,g=Math.min(e.screenToDocumentRow(g,0),e.getLength()-1),f=t.scrollerHeight+e.getRowLength(g)*w+b,d=this.scrollTop-y*w,d<0&&y>0&&(y=Math.max(0,y+Math.floor(d/w)),d=this.scrollTop-y*w);var S=0;if(this.layerConfig.width!=s||u)S=this.CHANGE_H_SCROLL;if(u||p)S|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(s=this.$getLongestLine());return this.layerConfig={width:s,padding:this.$padding,firstRow:m,firstRowScreen:y,lastRow:g,lineHeight:w,characterWidth:this.characterWidth,minHeight:f,maxHeight:i,offset:d,gutterOffset:w?Math.max(0,Math.ceil((d+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),S},e.prototype.$updateLines=function(){if(!this.$changedLines)return;var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(e>n.lastRow+1)return;if(tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(this.$size.scrollerHeight===0)return;var r=this.$cursorLayer.getPixelPosition(e),i=r.left,s=r.top,o=n&&n.top||0,u=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var a=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;a+o>s?(t&&a+o>s+this.lineHeight&&(s-=t*this.$size.scrollerHeight),s===0&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):a+this.$size.scrollerHeight-u=1-this.scrollMargin.top)return!0;if(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom)return!0;if(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left)return!0;if(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),u=this.$blockCursor?Math.floor(s):Math.round(s);return{row:o,column:u,side:s-u>0?1:-1,offsetX:i}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,s=i/this.characterWidth,o=this.$blockCursor?Math.floor(s):Math.round(s),u=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(u,Math.max(o,0),i)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),s=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},e.prototype.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),e.useTextareaForIME==undefined&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(!this.$composition)return;this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,r=t||{row:n.row,column:n.column};this.removeGhostText();var s=this.$calculateWrappedTextChunks(e,r);this.addToken(s[0].text,"ghost_text",r.row,r.column),this.$ghostText={text:e,position:{row:r.row,column:r.column}};var o=i.createElement("div");if(s.length>1){var u=this.hideTokensAfterPosition(r.row,r.column),a;s.slice(1).forEach(function(e){var t=i.createElement("div"),n=i.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),e.text.length===0&&(e.text=" "),n.appendChild(i.createTextNode(e.text)),t.appendChild(n),o.appendChild(t),a=t}),u.forEach(function(e){var t=i.createElement("span");E(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(i.createTextNode(e.value)),a.appendChild(t)}),this.$ghostTextWidget={el:o,row:r.row,column:r.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var f=this.$cursorLayer.getPixelPosition(r,!0),l=this.container,c=l.getBoundingClientRect().height,h=s.length*this.lineHeight,p=h0){var f=0;a.push(i[o].length);for(var l=0;l1||Math.abs(e.$size.height-r)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)},e}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,r.implement(S.prototype,g),o.defineOptions(S.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){typeof e=="number"&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){this.$textLayer.setHighlightIndentGuides(e)==1?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){typeof e=="number"&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0;if(this.$scrollPastEnd==e)return;this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),t.VirtualRenderer=S}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";function u(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(n){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new r;return s.append(t),s.getBlob("application/javascript")}}function a(e){if(typeof Worker=="undefined")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var t=u(e),n=window.URL||window.webkitURL,r=n.createObjectURL(t);return new Worker(r)}return new Worker(e)}var r=e("../lib/oop"),i=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,o=e("../config"),f=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,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(){r.implement(this,s),this.$createWorkerFromOldConfig=function(t,n,r,i,s){e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl);if(o.get("packaged")||!e.toUrl)i=i||o.moduleUrl(n,"worker");else{var u=this.$normalizePath;i=i||u(e.toUrl("ace/worker/worker.js",null,"_"));var f={};t.forEach(function(t){f[t]=u(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(i),s&&this.send("importScripts",s),this.$worker.postMessage({init:!0,tlns:f,module:n,classname:r}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),e.action=="insert"?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;if(!e)return;this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e})}}).call(f.prototype);var l=function(e,t,n){var r=null,i=!1,u=Object.create(s),a=[],l=new f({messageBuffer:a,terminate:function(){},postMessage:function(e){a.push(e);if(!r)return;i?setTimeout(c):c()}});l.setEmitSync=function(e){i=e};var c=function(){var e=a.shift();e.command?r[e.command].apply(r,e.args):e.event&&u._signal(e.event,e.data)};return u.postMessage=function(e){l.onMessage({data:e})},u.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},u.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],function(e){r=new e[n](u);while(a.length)c()}),l};t.UIWorkerClient=l,t.WorkerClient=f,t.createWorker=a}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),o=function(){function e(e,t,n,r,i,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var u=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(this.othersActive)return;var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})},e.prototype.hideOtherMarkers=function(){if(!this.othersActive)return;this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,s=t.start.column-this.pos.column;this.updateAnchors(e),i&&(this.length+=n);if(i&&!this.session.$fromUndo)if(e.action==="insert")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};this.doc.insertMergedLines(a,e.lines)}else if(e.action==="remove")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};this.doc.remove(new r(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(this.$updating)return;var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)},e.prototype.onCursorChange=function(e){if(this.$updating||!this.session)return;var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))},e.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(!0),this.session=null},e.prototype.cancel=function(){if(this.$undoStackDepth===-1)return;var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth;for(var n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.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(e,t,n){function h(e,t,n){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=n==-1,c.find(e)}function v(e,t){return e.row==t.row&&e.column==t.column}function m(e){if(e.$multiselectOnSessionChange)return;e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",o),e.commands.addCommands(f.defaultCommands),g(e)}function g(e){function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;u.addListener(t,"keydown",function(t){var i=t.keyCode==18&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()},e),u.addListener(t,"keyup",r,e),u.addListener(t,"blur",r,e)}var r=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),a=e("./lib/lang"),f=e("./commands/multi_select_commands");t.commands=f.defaultCommands.concat(f.multiSelectCommands);var l=e("./search").Search,c=new l,p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(!e)return;if(!this.inMultiSelectMode&&this.rangeCount===0){var n=this.toOrientedRange();this.rangeList.add(n),this.rangeList.add(e);if(this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){this.rangeCount=this.rangeList.ranges.length;if(this.rangeCount==1&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){if(this.rangeList)return;this.rangeList=new r,this.ranges=[],this.rangeCount=0},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){var e=this.ranges.length?this.ranges:[this.getRange()],t=[];for(var n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),s=this.session.documentToScreenPosition(this.anchor),o=this.rectangularRangeBlock(r,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],s=e.column0)g--;if(g>0){var y=0;while(r[y].isEmpty())y++}for(var b=g;b>=y;b--)r[b].isEmpty()&&r.splice(b,1)}return r}}.call(s.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(!e.marker)return;this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length},this.removeSelectionMarkers=function(e){var t=this.session.$selectionMarkers;for(var n=e.length;n--;){var r=e[n];if(!r.marker)continue;this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}this.session.selectionMarkerCount=t.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=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(f.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=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection")},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(!n.multiSelect)return;if(!t.multiSelectAction){var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}else t.multiSelectAction=="forEach"?r=n.forEachSelection(t,e.args):t.multiSelectAction=="forEachLine"?r=n.forEachSelection(t,e.args,!0):t.multiSelectAction=="single"?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});return r},this.forEachSelection=function(e,t,n){if(this.inVirtualSelectionMode)return;var r=n&&n.keepOrder,i=n==1||n&&n.$byLines,o=this.session,u=this.selection,a=u.rangeList,f=(r?u:a).ranges,l;if(!f.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var c=u._eventRegistry;u._eventRegistry={};var h=new s(o);this.inVirtualSelectionMode=!0;for(var p=f.length;p--;){if(i)while(p>0&&f[p].start.row==f[p-1].end.row)p--;h.fromOrientedRange(f[p]),h.index=p,this.selection=o.selection=h;var d=e.exec?e.exec(this,t||{}):e(this,t||{});!l&&d!==undefined&&(l=d),h.toOrientedRange(f[p])}h.detach(),this.selection=o.selection=u,this.inVirtualSelectionMode=!1,u._eventRegistry=c,u.mergeOverlappingRanges(),u.ranges[0]&&u.fromOrientedRange(u.ranges[0]);var v=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),v&&v.from==v.to&&this.renderer.animateScrolling(v.from),l},this.exitMultiSelectMode=function(){if(!this.inMultiSelectMode||this.inVirtualSelectionMode)return;this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var t=this.multiSelect.rangeList.ranges,n=[];for(var r=0;r0);u<0&&(u=0),f>=c&&(f=c-1)}var p=this.session.removeFullLines(u,f);p=this.$reAlignText(p,l),this.session.insert({row:u,column:0},p.join("\n")+"\n"),l||(o.start.column=0,o.end.column=p[p.length-1].length),this.selection.setRange(o)}else{s.forEach(function(e){t.substractPoint(e.cursor)});var d=0,v=Infinity,m=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\S/g);return i==-1&&(i=0),n.column>d&&(d=n.column),io?e.insert(r,a.stringRepeat(" ",s-o)):e.remove(new i(r.row,r.column,r.row,r.column-s+o)),t.start.column=t.end.column=d,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e,t){function u(e){return a.stringRepeat(" ",e)}function f(e){return e[2]?u(i)+e[2]+u(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function l(e){return e[2]?u(i+s-e[2].length)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function c(e){return e[2]?u(i)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var n=!0,r=!0,i,s,o;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?i==null?(i=t[1].length,s=t[2].length,o=t[3].length,t):(i+s+o!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(n=!1),i>t[1].length&&(i=t[1].length),st[3].length&&(o=t[3].length),t):[e]}).map(t?f:n?r?l:f:c)}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?this.on("mousedown",o):this.off("mousedown",o)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":t=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),o=s.search(i);if(o==-1)return;var u=n||s.length,a=e.getLength(),f=t,l=t;while(++tf){var p=e.getLine(l).length;return new r(f,u,l,p)}},this.openingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i+1},u=e.$findClosingBracket(t,o,s);if(!u)return;var a=e.foldWidgets[u.row];return a==null&&(a=e.getFoldWidget(u.row)),a=="start"&&u.row>o.row&&(u.row--,u.column=e.getLine(u.row).length),r.fromPoints(o,u)},this.closingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i},u=e.$findOpeningBracket(t,o);if(!u)return;return u.column++,o.column--,r.fromPoints(u,o)}}).call(i.prototype)}),define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,t,n){"use strict";function o(e,t,n){var r=0,i=e.length-1;while(r<=i){var s=r+i>>1,o=n(t,e[s]);if(o>0)r=s+1;else{if(!(o<0))return s;i=s-1}}return-(r+1)}function u(e,t,n){var r=e.getAnnotations().sort(i.comparePoints);if(!r.length)return;var s=o(r,{row:t,column:-1},i.comparePoints);s<0&&(s=-s-1),s>=r.length?s=n>0?0:r.length-1:s===0&&n<0&&(s=r.length-1);var u=r[s];if(!u||!n)return;if(u.row===t){do u=r[s+=n];while(u&&u.row===t);if(!u)return r.slice()}var a=[];t=u.row;do a[n<0?"unshift":"push"](u),u=r[s+=n];while(u&&u.row==t);return a.length&&a}var r=e("../lib/dom"),i=e("../range").Range,s=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session,i=e.getCursorPosition(),o=i.row,a=n.widgetManager.getWidgetsAtRow(o).filter(function(e){return e.type=="errorMarker"})[0];a?a.destroy():o-=t;var f=u(n,o,t),l;if(f){var c=f[0];i.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,i.row=c.row,l=e.renderer.$gutterLayer.$annotations[i.row]}else{if(a)return;l={displayText:[s("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(i.row),e.selection.moveToPosition(i);var h={row:i.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},p=h.el.appendChild(r.createElement("div")),d=h.el.appendChild(r.createElement("div"));d.className="error_widget_arrow "+l.className;var v=e.renderer.$cursorLayer.getPixelPosition(i).left;d.style.left=v+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+l.className,l.displayText.forEach(function(e,t){p.appendChild(r.createTextNode(e)),t-1}var r=e("../token_iterator").TokenIterator;t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},t.beautify=function(e){var n=new r(e,0,0),s=n.getCurrentToken(),o=e.getTabString(),u=t.singletonTags,a=t.blockTags,f=t.formatOptions||{},l,c=!1,h=!1,p=!1,d="",v="",m="",g=0,y=0,b=0,w=0,E=0,S=0,x=0,T,N=0,C=0,k=[],L=!1,A,O=!1,M=!1,_=!1,D=!1,P={0:0},H=[],B=!1,j=function(){l&&l.value&&l.type!=="string.regexp"&&(l.value=l.value.replace(/^\s*/,""))},F=function(){var e=d.length-1;for(;;){if(e==0)break;if(d[e]!==" ")break;e-=1}d=d.slice(0,e+1)},I=function(){d=d.trimRight(),c=!1};while(s!==null){N=n.getCurrentTokenRow(),k=n.$rowTokens,l=n.stepForward();if(typeof s!="undefined"){v=s.value,E=0,_=m==="style"||e.$modeId==="ace/mode/css",i(s,"tag-open")?(M=!0,l&&(D=a.indexOf(l.value)!==-1),v==="0;C--)d+="\n";c=!0,!i(s,"comment")&&!s.type.match(/^(comment|string)$/)&&(v=v.trimLeft())}if(v){s.type==="keyword"&&v.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(H[g]=v,j(),p=!0,v.match(/^(else|elseif)$/)&&d.match(/\}[\s]*$/)&&(I(),h=!0)):s.type==="paren.lparen"?(j(),v.substr(-1)==="{"&&(p=!0,O=!1,M||(C=1)),v.substr(0,1)==="{"&&(h=!0,d.substr(-1)!=="["&&d.trimRight().substr(-1)==="["?(I(),h=!1):d.trimRight().substr(-1)===")"?I():F())):s.type==="paren.rparen"?(E=1,v.substr(0,1)==="}"&&(H[g-1]==="case"&&E++,d.trimRight().substr(-1)==="{"?I():(h=!0,_&&(C+=2))),v.substr(0,1)==="]"&&d.substr(-1)!=="}"&&d.trimRight().substr(-1)==="}"&&(h=!1,w++,I()),v.substr(0,1)===")"&&d.substr(-1)!=="("&&d.trimRight().substr(-1)==="("&&(h=!1,w++,I()),F()):s.type!=="keyword.operator"&&s.type!=="keyword"||!v.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?s.type==="punctuation.operator"&&v===";"?(I(),j(),p=!0,_&&C++):s.type==="punctuation.operator"&&v.match(/^(:|,)$/)?(I(),j(),v.match(/^(,)$/)&&x>0&&S===0&&f.lineBreaksAfterCommasInCurlyBlock?C++:(p=!0,c=!1)):s.type==="support.php_tag"&&v==="?>"&&!c?(I(),h=!0):i(s,"attribute-name")&&d.substr(-1).match(/^\s$/)?h=!0:i(s,"attribute-equals")?(F(),j()):i(s,"tag-close")?(F(),v==="/>"&&(h=!0)):s.type==="keyword"&&v.match(/^(case|default)$/)&&B&&(E=1):(I(),j(),h=!0,p=!0);if(c&&(!s.type.match(/^(comment)$/)||!!v.substr(0,1).match(/^[/#]$/))&&(!s.type.match(/^(string)$/)||!!v.substr(0,1).match(/^['"@]$/))){w=b;if(g>y){w++;for(A=g;A>y;A--)P[A]=w}else g")D&&l&&l.value===""&&g--),i(s,"tag-name")&&(m=v),T=N}}s=l}d=d.trim(),e.doc.setValue(d)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.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/www/js/ace/ext-code_lens.js b/www/js/ace/ext-code_lens.js new file mode 100644 index 000000000..51a31370e --- /dev/null +++ b/www/js/ace/ext-code_lens.js @@ -0,0 +1,8 @@ +define("ace/ext/code_lens",["require","exports","module","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"],function(e,t,n){"use strict";function o(e){var t=e.$textLayer,n=t.$lenses;n&&n.forEach(function(e){e.remove()}),t.$lenses=null}function u(e,t){var n=e&t.CHANGE_LINES||e&t.CHANGE_FULL||e&t.CHANGE_SCROLL||e&t.CHANGE_TEXT;if(!n)return;var r=t.session,i=t.session.lineWidgets,u=t.$textLayer,a=u.$lenses;if(!i){a&&o(t);return}var f=t.$textLayer.$lines.cells,l=t.layerConfig,c=t.$padding;a||(a=u.$lenses=[]);var h=0;for(var p=0;p2*y-1)g.lastChild.remove();var w=t.$cursorLayer.getPixelPosition({row:d,column:0},!0).top-l.lineHeight*v.rowsAbove-l.offset;g.style.top=w+"px";var E=t.gutterWidth,S=r.getLine(d).search(/\S|$/);S==-1&&(S=0),E+=S*l.characterWidth,g.style.paddingLeft=c+E+"px"}while(h1)return;var f=n.documentToScreenRow(r),l=e.renderer.layerConfig.lineHeight,c=n.getScrollTop()+(f-s)*l;u==0&&o-l/4&&(c=-l),n.setScrollTop(c)}var n=e.session;if(!n)return;var r=e.codeLensProviders.length,i=[];e.codeLensProviders.forEach(function(e){e.provideCodeLenses(n,function(e,t){if(e)return;t.forEach(function(e){i.push(e)}),r--,r==0&&s()})})};var n=i.delayedCall(e.$updateLenses);e.$updateLensesOnInput=function(){n.delay(250)},e.on("input",e.$updateLensesOnInput)}function l(e){e.off("input",e.$updateLensesOnInput),e.renderer.off("afterRender",u),e.$codeLensClickHandler&&e.container.removeEventListener("click",e.$codeLensClickHandler)}var r=e("../lib/event"),i=e("../lib/lang"),s=e("../lib/dom");t.setLenses=function(e,t){var n=Number.MAX_VALUE;return a(e),t&&t.forEach(function(t){var r=t.start.row,i=t.start.column,s=e.lineWidgets&&e.lineWidgets[r];if(!s||!s.lenses)s=e.widgetManager.$registerLineWidget({rowCount:1,rowsAbove:1,row:r,column:i,lenses:[]});s.lenses.push(t.command),r 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",!1)}); (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/www/js/ace/ext-command_bar.js b/www/js/ace/ext-command_bar.js new file mode 100644 index 000000000..30a573c69 --- /dev/null +++ b/www/js/ace/ext-command_bar.js @@ -0,0 +1,8 @@ +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(e,t,n){var r=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("../tooltip").Tooltip,s=e("../lib/event_emitter").EventEmitter,o=e("../lib/lang"),u=e("../lib/dom"),a=e("../lib/oop"),f=e("../lib/useragent"),l="command_bar_tooltip_button",c="command_bar_button_value",h="command_bar_button_caption",p="command_bar_keybinding",d="command_bar_tooltip",v="MoreOptionsButton",m=100,g=4,y=function(e,t){return t.row>e.row?e:t.row===e.row&&t.column>e.column?e:t},b={Ctrl:{mac:"^"},Option:{mac:"\u2325"},Command:{mac:"\u2318"},Cmd:{mac:"\u2318"},Shift:"\u21e7",Left:"\u2190",Right:"\u2192",Up:"\u2191",Down:"\u2193"},w=function(){function e(e,t){var n,s;t=t||{},this.parentNode=e,this.tooltip=new i(this.parentNode),this.moreOptions=new i(this.parentNode),this.maxElementsOnTooltip=t.maxElementsOnTooltip||g,this.$alwaysShow=t.alwaysShow||!1,this.eventListeners={},this.elements={},this.commands={},this.tooltipEl=u.buildDom(["div",{"class":d}],this.tooltip.getElement()),this.moreOptionsEl=u.buildDom(["div",{"class":d+" tooltip_more_options"}],this.moreOptions.getElement()),this.$showTooltipTimer=o.delayedCall(this.$showTooltip.bind(this),t.showDelay||m),this.$hideTooltipTimer=o.delayedCall(this.$hideTooltip.bind(this),t.hideDelay||m),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 a=r(["mousedown","mouseup","click"]),f=a.next();!f.done;f=a.next()){var l=f.value;this.tooltip.getElement().addEventListener(l,this.$preventMouseEvent),this.moreOptions.getElement().addEventListener(l,this.$preventMouseEvent)}}catch(c){n={error:c}}finally{try{f&&!f.done&&(s=a.return)&&s.call(a)}finally{if(n)throw n.error}}}return e.prototype.registerCommand=function(e,t){var n=Object.keys(this.commands).length=f.top&&s.top<=f.bottom&&s.left>=f.left+e.gutterWidth&&s.left<=f.right;if(!l&&this.isShown()){this.$hideTooltip();return}if(l&&!this.isShown()&&this.getAlwaysShow()){this.$showTooltip();return}var c=s.top-o.offsetHeight,h=Math.min(u-o.offsetWidth,s.left),p=c>=0&&c+o.offsetHeight<=a&&h>=0&&h+o.offsetWidth<=u;if(!p){this.$hideTooltip();return}this.tooltip.setPosition(h,c);if(this.isMoreOptionsShown()){c+=o.offsetHeight,h=this.elements[v].getBoundingClientRect().left;var d=this.moreOptions.getElement(),a=window.innerHeight;c+d.offsetHeight>a&&(c-=o.offsetHeight+d.offsetHeight),h+d.offsetWidth>u&&(h=u-d.offsetWidth),this.moreOptions.setPosition(h,c)}},e.prototype.update=function(){Object.keys(this.elements).forEach(this.$updateElement.bind(this))},e.prototype.detach=function(){this.tooltip.hide(),this.moreOptions.hide(),this.$updateOnHoverHandlers(!1),this.editor&&(this.editor.off("changeSession",this.$onEditorChangeSession),this.editor.session&&(this.editor.session.off("changeScrollLeft",this.$onChangeScroll),this.editor.session.off("changeScrollTop",this.$onChangeScroll))),this.$mouseInTooltip=!1,this.editor=null},e.prototype.destroy=function(){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},e.prototype.$createCommand=function(e,t,n){var r=n?this.tooltipEl:this.moreOptionsEl,i=[],s=t.bindKey;s&&(typeof s=="object"&&(s=f.isMac?s.mac:s.win),s=s.split("|")[0],i=s.split("-"),i=i.map(function(e){if(b[e]){if(typeof b[e]=="string")return b[e];if(f.isMac&&b[e].mac)return b[e].mac}return e}));var o;n&&t.iconCssClass?o=["div",{"class":["ace_icon_svg",t.iconCssClass].join(" "),"aria-label":t.name+" ("+t.bindKey+")"}]:(o=[["div",{"class":c}],["div",{"class":h},t.name]],i.length&&o.push(["div",{"class":p},i.map(function(e){return["div",e]})])),u.buildDom(["div",{"class":[l,t.cssClass||""].join(" "),ref:e},o],r,this.elements),this.commands[e]=t;var a=function(n){this.editor&&this.editor.focus(),this.$shouldHideMoreOptions=this.isMoreOptionsShown(),!this.elements[e].disabled&&t.exec&&t.exec(this.editor),this.$shouldHideMoreOptions&&this.$setMoreOptionsVisibility(!1),this.update(),n.preventDefault()}.bind(this);this.eventListeners[e]=a,this.elements[e].addEventListener("click",a.bind(this)),this.$updateElement(e)},e.prototype.$setMoreOptionsVisibility=function(e){e?(this.moreOptions.setTheme(this.editor.renderer.theme),this.moreOptions.setClassName(d+"_wrapper"),this.moreOptions.show(),this.update(),this.updatePosition()):this.moreOptions.hide()},e.prototype.$onEditorChangeSession=function(e){e.oldSession&&(e.oldSession.off("changeScrollTop",this.$onChangeScroll),e.oldSession.off("changeScrollLeft",this.$onChangeScroll)),this.detach()},e.prototype.$onChangeScroll=function(){this.editor.renderer&&(this.isShown()||this.getAlwaysShow())&&this.editor.renderer.once("afterRender",this.updatePosition.bind(this))},e.prototype.$onMouseMove=function(e){if(this.$mouseInTooltip)return;var t=this.editor.getCursorPosition(),n=this.editor.renderer.textToScreenCoordinates(t.row,t.column),r=this.editor.renderer.lineHeight,i=e.clientY>=n.pageY&&e.clientY=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("../../layer/decorators").Decorator,o=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.colors.dark["delete"]="rgba(255, 18, 18, 1)",i.colors.dark.insert="rgba(18, 136, 18, 1)",i.colors.light["delete"]="rgb(255,51,51)",i.colors.light.insert="rgb(32,133,72)",i.$zones=[],i.$forInlineDiff=r,i}return r(t,e),t.prototype.addZone=function(e,t,n){this.$zones.push({startRow:e,endRow:t,type:n})},t.prototype.setSessions=function(e,t){this.sessionA=e,this.sessionB=t},t.prototype.$updateDecorators=function(t){if(typeof this.canvas.getContext!="function")return;e.prototype.$updateDecorators.call(this,t);if(this.$zones.length>0){var n=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light,r=this.canvas.getContext("2d");this.$setDiffDecorators(r,n)}},t.prototype.$transformPosition=function(e,t){return t=="delete"?this.sessionA.documentToScreenRow(e,0):this.sessionB.documentToScreenRow(e,0)},t.prototype.$setDiffDecorators=function(e,t){function o(e,t){return e.from===t.from?e.to-t.to:e.from-t.from}var n,r,s=this,u=this.$zones;if(u){var a=[],f=u.filter(function(e){return e.type==="delete"}),l=u.filter(function(e){return e.type==="insert"});[f,l].forEach(function(e){e.forEach(function(e,n){var r=s.$transformPosition(e.startRow,e.type)*s.lineHeight,i=s.$transformPosition(e.endRow,e.type)*s.lineHeight+s.lineHeight,o=Math.round(s.heightRatio*r),u=Math.round(s.heightRatio*i),f=1,l=Math.round((o+u)/2),c=u-l;c0&&h&&h.type===e.type&&l-cs.canvasHeight&&(l=s.canvasHeight-c),a.push({type:e.type,from:l-c,to:l+c,color:t[e.type]||null})})}),a=a.sort(o);try{for(var c=i(a),h=c.next();!h.done;h=c.next()){var p=h.value;e.fillStyle=p.color||null;var d=p.from,v=p.to,m=v-d;this.$forInlineDiff?e.fillRect(this.oneZoneWidth,d,2*this.oneZoneWidth,m):p.type=="delete"?e.fillRect(this.oneZoneWidth,d,this.oneZoneWidth,m):e.fillRect(2*this.oneZoneWidth,d,this.oneZoneWidth,m)}}catch(g){n={error:g}}finally{try{h&&!h.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}},t.prototype.setZoneWidth=function(){this.oneZoneWidth=Math.round(this.canvasWidth/3)},t}(s);t.ScrollDiffDecorator=o}),define("ace/ext/diff/styles-css.js",["require","exports","module"],function(e,t,n){t.cssText='\n/*\n * Line Markers\n */\n.ace_diff {\n position: absolute;\n z-index: 0;\n}\n.ace_diff.inline {\n z-index: 20;\n}\n/*\n * Light Colors \n */\n.ace_diff.insert {\n background-color: #EFFFF1;\n}\n.ace_diff.delete {\n background-color: #FFF1F1;\n}\n.ace_diff.aligned_diff {\n background: rgba(206, 194, 191, 0.26);\n background: repeating-linear-gradient(\n 45deg,\n rgba(122, 111, 108, 0.26),\n rgba(122, 111, 108, 0.26) 5px,\n rgba(0, 0, 0, 0) 5px,\n rgba(0, 0, 0, 0) 10px \n );\n}\n\n.ace_diff.insert.inline {\n background-color: rgb(74 251 74 / 18%); \n}\n.ace_diff.delete.inline {\n background-color: rgb(251 74 74 / 15%);\n}\n\n.ace_diff.delete.inline.empty {\n background-color: rgba(255, 128, 79, 0.7);\n width: 2px !important;\n}\n\n.ace_diff.insert.inline.empty {\n background-color: rgba(49, 230, 96, 0.7);\n width: 2px !important;\n}\n\n.ace_diff-active-line {\n border-bottom: 1px solid;\n border-top: 1px solid;\n background: transparent;\n position: absolute;\n box-sizing: border-box;\n border-color: #9191ac;\n}\n\n.ace_dark .ace_diff-active-line {\n background: transparent;\n border-color: #75777a;\n}\n \n\n/* gutter changes */\n.ace_mini-diff_gutter-enabled > .ace_gutter-cell,\n.ace_mini-diff_gutter-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_mini-diff_gutter_other > .ace_gutter-cell,\n.ace_mini-diff_gutter_other > .ace_gutter-cell_svg-icons {\n display: none;\n}\n\n.ace_mini-diff_gutter_other {\n pointer-events: none;\n}\n\n\n.ace_mini-diff_gutter-enabled > .mini-diff-added {\n background-color: #EFFFF1;\n border-left: 3px solid #2BB534;\n padding-left: 16px;\n display: block;\n}\n\n.ace_mini-diff_gutter-enabled > .mini-diff-deleted {\n background-color: #FFF1F1;\n border-left: 3px solid #EA7158;\n padding-left: 16px;\n display: block;\n}\n\n\n.ace_mini-diff_gutter-enabled > .mini-diff-added:after {\n position: absolute;\n right: 2px;\n content: "+";\n color: darkgray;\n background-color: inherit;\n}\n\n.ace_mini-diff_gutter-enabled > .mini-diff-deleted:after {\n position: absolute;\n right: 2px;\n content: "-";\n color: darkgray;\n background-color: inherit;\n}\n.ace_fade-fold-widgets:hover > .ace_folding-enabled > .mini-diff-added:after,\n.ace_fade-fold-widgets:hover > .ace_folding-enabled > .mini-diff-deleted:after {\n display: none;\n}\n\n.ace_diff_other .ace_selection {\n filter: drop-shadow(1px 2px 3px darkgray);\n}\n\n.ace_hidden_marker-layer .ace_bracket {\n display: none;\n}\n\n\n\n/*\n * Dark Colors \n */\n\n.ace_dark .ace_diff.insert {\n background-color: #212E25;\n}\n.ace_dark .ace_diff.delete {\n background-color: #3F2222;\n}\n\n.ace_dark .ace_mini-diff_gutter-enabled > .mini-diff-added {\n background-color: #212E25;\n border-left-color:#00802F;\n}\n\n.ace_dark .ace_mini-diff_gutter-enabled > .mini-diff-deleted {\n background-color: #3F2222;\n border-left-color: #9C3838;\n}\n\n'}),define("ace/ext/diff/gutter_decorator",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("../../lib/dom"),i=function(){function e(e,t){this.gutterClass="ace_mini-diff_gutter-enabled",this.gutterCellsClasses={add:"mini-diff-added","delete":"mini-diff-deleted"},this.editor=e,this.type=t,this.chunks=[],this.attachToEditor()}return e.prototype.attachToEditor=function(){this.renderGutters=this.renderGutters.bind(this),r.addCssClass(this.editor.renderer.$gutterLayer.element,this.gutterClass),this.editor.renderer.$gutterLayer.on("afterRender",this.renderGutters)},e.prototype.renderGutters=function(e,t){var n=this,r=this.editor.renderer.$gutterLayer.$lines.cells;r.forEach(function(e){e.element.classList.remove(Object.values(n.gutterCellsClasses))});var i=this.type===-1?"old":"new",s=this.type===-1?this.gutterCellsClasses.delete:this.gutterCellsClasses.add;this.chunks.forEach(function(e){var t=e[i].start.row,n=e[i].end.row-1;r.forEach(function(e){e.row>=t&&e.row<=n&&e.element.classList.add(s)})})},e.prototype.setDecorations=function(e){this.chunks=e,this.renderGutters()},e.prototype.dispose=function(){r.removeCssClass(this.editor.renderer.$gutterLayer.element,this.gutterClass),this.editor.renderer.$gutterLayer.off("afterRender",this.renderGutters)},e}();t.MinimalGutterDiffDecorator=i}),define("ace/ext/diff/base_diff_view",["require","exports","module","ace/lib/oop","ace/range","ace/lib/dom","ace/config","ace/line_widgets","ace/ext/diff/scroll_diff_decorator","ace/ext/diff/styles-css.js","ace/editor","ace/virtual_renderer","ace/undomanager","ace/layer/decorators","ace/theme/textmate","ace/multi_select","ace/edit_session","ace/ext/diff/gutter_decorator"],function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{while((t===void 0||t-->0)&&!(i=r.next()).done)s.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(o)throw o.error}}return s},i=e("../../lib/oop"),s=e("../../range").Range,o=e("../../lib/dom"),u=e("../../config"),a=e("../../line_widgets").LineWidgets,f=e("./scroll_diff_decorator").ScrollDiffDecorator,l=e("./styles-css.js").cssText,c=e("../../editor").Editor,h=e("../../virtual_renderer").VirtualRenderer,p=e("../../undomanager").UndoManager,d=e("../../layer/decorators").Decorator;e("../../theme/textmate"),e("../../multi_select");var v=e("../../edit_session").EditSession,m=e("./gutter_decorator").MinimalGutterDiffDecorator,g={compute:function(e,t,n){return[]}};o.importCssString(l,"diffview.css");var y=function(){function e(e,t){this.onChangeTheme=this.onChangeTheme.bind(this),this.onInput=this.onInput.bind(this),this.onChangeFold=this.onChangeFold.bind(this),this.realign=this.realign.bind(this),this.onSelect=this.onSelect.bind(this),this.onChangeWrapLimit=this.onChangeWrapLimit.bind(this),this.realignPending=!1,this.diffSession,this.chunks,this.inlineDiffEditor=e||!1,this.currentDiffIndex=0,this.diffProvider=g,t&&(this.container=t),this.$ignoreTrimWhitespace=!1,this.$maxDiffs=5e3,this.$maxComputationTimeMs=150,this.$syncSelections=!1,this.$foldUnchangedOnInput=!1,this.markerB=new E(this,1),this.markerA=new E(this,-1)}return e.prototype.$setupModels=function(e){e.diffProvider&&this.setProvider(e.diffProvider),this.showSideA=e.inline==undefined?!0:e.inline==="a";var t={scrollPastEnd:.5,highlightActiveLine:!1,highlightGutterLine:!1,animatedScroll:!0,customScrollbar:!0,vScrollBarAlwaysVisible:!0,fadeFoldWidgets:!0,showFoldWidgets:!0,selectionStyle:"text"};this.savedOptionsA=e.editorA&&e.editorA.getOptions(t),this.savedOptionsB=e.editorB&&e.editorB.getOptions(t);if(!this.inlineDiffEditor||e.inline==="a")this.editorA=e.editorA||this.$setupModel(e.sessionA,e.valueA),this.container&&this.container.appendChild(this.editorA.container),this.editorA.setOptions(t);if(!this.inlineDiffEditor||e.inline==="b")this.editorB=e.editorB||this.$setupModel(e.sessionB,e.valueB),this.container&&this.container.appendChild(this.editorB.container),this.editorB.setOptions(t);if(this.inlineDiffEditor){this.activeEditor=this.showSideA?this.editorA:this.editorB,this.otherSession=this.showSideA?this.sessionB:this.sessionA;var n=this.activeEditor.getOptions();n.readOnly=!0,delete n.mode,this.otherEditor=new c(new h(null),undefined,n),this.showSideA?this.editorB=this.otherEditor:this.editorA=this.otherEditor}this.setDiffSession({sessionA:e.sessionA||(e.editorA?e.editorA.session:new v(e.valueA||"")),sessionB:e.sessionB||(e.editorB?e.editorB.session:new v(e.valueB||"")),chunks:[]}),this.setupScrollbars()},e.prototype.addGutterDecorators=function(){this.gutterDecoratorA||(this.gutterDecoratorA=new m(this.editorA,-1)),this.gutterDecoratorB||(this.gutterDecoratorB=new m(this.editorB,1))},e.prototype.$setupModel=function(e,t){var n=new c(new h,e);return n.session.setUndoManager(new p),t!=undefined&&n.setValue(t,-1),n},e.prototype.foldUnchanged=function(){var e=this.chunks,t="-".repeat(120),n={old:new s(0,0,0,0),"new":new s(0,0,0,0)},r=!1;for(var i=0;i2){var a=n.old.end.row+2,f=this.sessionA.addFold(t,new s(a,0,a+u,Number.MAX_VALUE));a=n.new.end.row+2;var l=this.sessionB.addFold(t,new s(a,0,a+u,Number.MAX_VALUE));if(f||l)r=!0;l&&f&&(f.other=l,l.other=f)}n=o}return r},e.prototype.unfoldUnchanged=function(){var e=this.sessionA.getAllFolds();for(var t=e.length-1;t>=0;t--){var n=e[t];n.placeholder.length==120&&this.sessionA.removeFold(n)}},e.prototype.toggleFoldUnchanged=function(){this.foldUnchanged()||this.unfoldUnchanged()},e.prototype.setDiffSession=function(e){this.diffSession&&(this.$detachSessionsEventHandlers(),this.clearSelectionMarkers()),this.diffSession=e,this.sessionA=this.sessionB=null,this.diffSession&&(this.chunks=this.diffSession.chunks||[],this.editorA&&this.editorA.setSession(e.sessionA),this.editorB&&this.editorB.setSession(e.sessionB),this.sessionA=this.diffSession.sessionA,this.sessionB=this.diffSession.sessionB,this.$attachSessionsEventHandlers(),this.initSelectionMarkers()),this.otherSession=this.showSideA?this.sessionB:this.sessionA},e.prototype.$attachSessionsEventHandlers=function(){},e.prototype.$detachSessionsEventHandlers=function(){},e.prototype.getDiffSession=function(){return this.diffSession},e.prototype.setTheme=function(e){this.editorA&&this.editorA.setTheme(e),this.editorB&&this.editorB.setTheme(e)},e.prototype.getTheme=function(){return(this.editorA||this.editorB).getTheme()},e.prototype.onChangeTheme=function(e){var t=e&&e.theme||this.getTheme();this.editorA&&this.editorA.getTheme()!==t&&this.editorA.setTheme(t),this.editorB&&this.editorB.getTheme()!==t&&this.editorB.setTheme(t)},e.prototype.resize=function(e){this.editorA&&this.editorA.resize(e),this.editorB&&this.editorB.resize(e)},e.prototype.scheduleOnInput=function(){var e=this;if(this.$onInputTimer)return;this.$onInputTimer=setTimeout(function(){e.$onInputTimer=null,e.onInput()})},e.prototype.onInput=function(){var e=this;this.$onInputTimer&&clearTimeout(this.$onInputTimer);var t=this.sessionA.doc.getAllLines(),n=this.sessionB.doc.getAllLines();this.selectionRangeA=null,this.selectionRangeB=null;var r=this.$diffLines(t,n);this.diffSession.chunks=this.chunks=r,this.gutterDecoratorA&&this.gutterDecoratorA.setDecorations(r),this.gutterDecoratorB&&this.gutterDecoratorB.setDecorations(r);if(this.chunks&&this.chunks.length>this.$maxDiffs)return;this.align(),this.editorA&&this.editorA.renderer.updateBackMarkers(),this.editorB&&this.editorB.renderer.updateBackMarkers(),setTimeout(function(){e.updateScrollBarDecorators()},0),this.$foldUnchangedOnInput&&this.foldUnchanged()},e.prototype.setupScrollbars=function(){var e=this,t=function(t){setTimeout(function(){e.$setScrollBarDecorators(t),e.updateScrollBarDecorators()},0)};this.inlineDiffEditor?t(this.activeEditor.renderer):(t(this.editorA.renderer),t(this.editorB.renderer))},e.prototype.$setScrollBarDecorators=function(e){e.$scrollDecorator&&e.$scrollDecorator.destroy(),e.$scrollDecorator=new f(e.scrollBarV,e,this.inlineDiffEditor),e.$scrollDecorator.setSessions(this.sessionA,this.sessionB),e.scrollBarV.setVisible(!0),e.scrollBarV.element.style.bottom=e.scrollBarH.getHeight()+"px"},e.prototype.$resetDecorators=function(e){e.$scrollDecorator&&e.$scrollDecorator.destroy(),e.$scrollDecorator=new d(e.scrollBarV,e)},e.prototype.updateScrollBarDecorators=function(){var e=this;if(this.inlineDiffEditor){if(!this.activeEditor)return;this.activeEditor.renderer.$scrollDecorator.$zones=[]}else{if(!this.editorA||!this.editorB)return;this.editorA.renderer.$scrollDecorator.$zones=[],this.editorB.renderer.$scrollDecorator.$zones=[]}var t=function(e,t){if(!e)return;if(typeof e.renderer.$scrollDecorator.addZone!="function")return;t.old.start.row!=t.old.end.row&&e.renderer.$scrollDecorator.addZone(t.old.start.row,t.old.end.row-1,"delete"),t.new.start.row!=t.new.end.row&&e.renderer.$scrollDecorator.addZone(t.new.start.row,t.new.end.row-1,"insert")};this.inlineDiffEditor?(this.chunks&&this.chunks.forEach(function(n){t(e.activeEditor,n)}),this.activeEditor.renderer.$scrollDecorator.$updateDecorators(this.activeEditor.renderer.layerConfig)):(this.chunks&&this.chunks.forEach(function(n){t(e.editorA,n),t(e.editorB,n)}),this.editorA.renderer.$scrollDecorator.$updateDecorators(this.editorA.renderer.layerConfig),this.editorB.renderer.$scrollDecorator.$updateDecorators(this.editorB.renderer.layerConfig))},e.prototype.$diffLines=function(e,t){return this.diffProvider.compute(e,t,{ignoreTrimWhitespace:this.$ignoreTrimWhitespace,maxComputationTimeMs:this.$maxComputationTimeMs})},e.prototype.setProvider=function(e){this.diffProvider=e},e.prototype.$addWidget=function(e,t){var n=e.lineWidgets[t.row];n&&(t.rowsAbove+=n.rowsAbove>t.rowsAbove?n.rowsAbove:t.rowsAbove,t.rowCount+=n.rowCount),e.lineWidgets[t.row]=t,e.widgetManager.lineWidgets[t.row]=t,e.$resetRowCache(t.row);var r=e.getFoldAt(t.row,0);r&&e.widgetManager.updateOnFold({data:r,action:"add"},e)},e.prototype.$initWidgets=function(e){var t=e.session;t.widgetManager||(t.widgetManager=new a(t),t.widgetManager.attach(e)),e.session.lineWidgets=[],e.session.widgetManager.lineWidgets=[],e.session.$resetRowCache(0)},e.prototype.$screenRow=function(e,t){var n=t.documentToScreenPosition(e).row,r=e.row-t.getLength()+1;return r>0&&(n+=r),n},e.prototype.align=function(){},e.prototype.onChangeWrapLimit=function(e,t){},e.prototype.onSelect=function(e,t){this.searchHighlight(t),this.syncSelect(t)},e.prototype.syncSelect=function(e){if(this.$updatingSelection)return;var t=e.session===this.sessionA,n=e.getRange(),r=t?this.selectionRangeA:this.selectionRangeB;if(r&&n.isEqual(r))return;t?this.selectionRangeA=n:this.selectionRangeB=n,this.$updatingSelection=!0;var i=this.transformRange(n,t);this.$syncSelections&&(t?this.editorB:this.editorA).session.selection.setSelectionRange(i),this.$updatingSelection=!1,t?(this.selectionRangeA=n,this.selectionRangeB=i):(this.selectionRangeA=i,this.selectionRangeB=n),this.updateSelectionMarker(this.syncSelectionMarkerA,this.sessionA,this.selectionRangeA),this.updateSelectionMarker(this.syncSelectionMarkerB,this.sessionB,this.selectionRangeB)},e.prototype.updateSelectionMarker=function(e,t,n){e.setRange(n),t._signal("changeFrontMarker")},e.prototype.onChangeFold=function(e,t){var n=e.data;if(this.$syncingFold||!n||!e.action)return;this.scheduleRealign();var r=t===this.sessionA,i=r?this.sessionB:this.sessionA;e.action==="remove"&&(n.other?(n.other.other=null,i.removeFold(n.other)):n.lineWidget&&(i.widgetManager.addLineWidget(n.lineWidget),n.lineWidget=null,i.$editor&&i.$editor.renderer.updateBackMarkers()));if(e.action==="add"){var s=this.transformRange(n.range,r);if(s.isEmpty()){var o=s.start.row+1;i.lineWidgets[o]&&(n.lineWidget=i.lineWidgets[o],i.widgetManager.removeLineWidget(n.lineWidget),i.$editor&&i.$editor.renderer.updateBackMarkers())}else this.$syncingFold=!0,n.other=i.addFold(n.placeholder,s),n.other&&(n.other.other=n),this.$syncingFold=!1}},e.prototype.scheduleRealign=function(){this.realignPending||(this.realignPending=!0,this.editorA.renderer.on("beforeRender",this.realign),this.editorB.renderer.on("beforeRender",this.realign))},e.prototype.realign=function(){this.realignPending=!0,this.editorA.renderer.off("beforeRender",this.realign),this.editorB.renderer.off("beforeRender",this.realign),this.align(),this.realignPending=!1},e.prototype.detach=function(){if(!this.editorA||!this.editorB)return;this.savedOptionsA&&this.editorA.setOptions(this.savedOptionsA),this.savedOptionsB&&this.editorB.setOptions(this.savedOptionsB),this.editorA.renderer.off("beforeRender",this.realign),this.editorB.renderer.off("beforeRender",this.realign),this.$detachEventHandlers(),this.$removeLineWidgets(this.sessionA),this.$removeLineWidgets(this.sessionB),this.gutterDecoratorA&&this.gutterDecoratorA.dispose(),this.gutterDecoratorB&&this.gutterDecoratorB.dispose(),this.sessionA.selection.clearSelection(),this.sessionB.selection.clearSelection(),this.savedOptionsA&&this.savedOptionsA.customScrollbar&&this.$resetDecorators(this.editorA.renderer),this.savedOptionsB&&this.savedOptionsB.customScrollbar&&this.$resetDecorators(this.editorB.renderer)},e.prototype.$removeLineWidgets=function(e){e.lineWidgets=[],e.widgetManager.lineWidgets=[],e._signal("changeFold",{data:{start:{row:0}}})},e.prototype.$detachEventHandlers=function(){},e.prototype.destroy=function(){this.detach(),this.editorA&&this.editorA.destroy(),this.editorB&&this.editorB.destroy(),this.editorA=this.editorB=null},e.prototype.gotoNext=function(e){var t=this.activeEditor||this.editorA;this.inlineDiffEditor&&(t=this.editorA);var n=t==this.editorA,r=t.selection.lead.row,i=this.findChunkIndex(this.chunks,r,n),o=this.chunks[i+e]||this.chunks[i],u=t.session.getScrollTop();if(o){var a=o[n?"old":"new"],f=Math.max(a.start.row,a.end.row-1);t.selection.setRange(new s(f,0,f,0))}t.renderer.scrollSelectionIntoView(t.selection.lead,t.selection.anchor,.5),t.renderer.animateScrolling(u)},e.prototype.firstDiffSelected=function(){return this.currentDiffIndex<=1},e.prototype.lastDiffSelected=function(){return this.currentDiffIndex>this.chunks.length-1},e.prototype.transformRange=function(e,t){return s.fromPoints(this.transformPosition(e.start,t),this.transformPosition(e.end,t))},e.prototype.transformPosition=function(e,t){var n=this.findChunkIndex(this.chunks,e.row,t),i=this.chunks[n],s=this.sessionB.doc.clonePos,o=s(e),u=r(t?["old","new"]:["new","old"],2),a=u[0],f=u[1],l=0,c=!1;if(i)if(i[a].end.row<=e.row)o.row-=i[a].end.row-i[f].end.row;else if(i.charChanges)for(var h=0;he.row)break;if(d.isMultiLine()&&d.contains(e.row,e.column)){o.row=v.start.row+e.row-d.start.row;var m=v.end.row;v.end.column===0&&m--,o.row>m&&(o.row=m,o.column=(t?this.sessionB:this.sessionA).getLine(m).length,c=!0),o.row=Math.min(o.row,m)}else{o.row=v.start.row;if(d.start.column>e.column)break;c=!0,!d.isEmpty()&&d.contains(e.row,e.column)?(o.column=v.start.column,l=e.column-d.start.column,l=Math.min(l,v.end.column-v.start.column)):(o=s(v.end),l=e.column-d.end.column)}}else i[a].start.row<=e.row&&(o.row+=i[f].start.row-i[a].start.row,o.row>=i[f].end.row&&(o.row=i[f].end.row-1,o.column=(t?this.sessionB:this.sessionA).getLine(o.row).length));if(!c){var g=r(t?[this.sessionA,this.sessionB]:[this.sessionB,this.sessionA],2),y=g[0],b=g[1];l-=this.$getDeltaIndent(y,b,e.row,o.row)}return o.column+=l,o},e.prototype.$getDeltaIndent=function(e,t,n,r){var i=this.$getIndent(e,n),s=this.$getIndent(t,r);return i-s},e.prototype.$getIndent=function(e,t){return e.getLine(t).match(/^\s*/)[0].length},e.prototype.printDiffs=function(){this.chunks.forEach(function(e){console.log(e.toString())})},e.prototype.findChunkIndex=function(e,t,n){for(var r=0;rt)break}return this.currentDiffIndex=r,r-1},e.prototype.searchHighlight=function(e){if(this.$syncSelections||this.inlineDiffEditor)return;var t=e.session,n=t===this.sessionA?this.sessionB:this.sessionA;n.highlight(t.$searchHighlight.regExp),n._signal("changeBackMarker")},e.prototype.initSelectionMarkers=function(){this.syncSelectionMarkerA=new S,this.syncSelectionMarkerB=new S,this.sessionA.addDynamicMarker(this.syncSelectionMarkerA,!0),this.sessionB.addDynamicMarker(this.syncSelectionMarkerB,!0)},e.prototype.clearSelectionMarkers=function(){this.sessionA.removeMarker(this.syncSelectionMarkerA.id),this.sessionB.removeMarker(this.syncSelectionMarkerB.id)},e}();u.defineOptions(y.prototype,"DiffView",{showOtherLineNumbers:{set:function(e){this.gutterLayer&&(this.gutterLayer.$renderer=e?null:b,this.editorA.renderer.updateFull())},initialValue:!0},folding:{set:function(e){this.editorA.setOption("showFoldWidgets",e),this.editorB.setOption("showFoldWidgets",e);if(!e){var t=[],n=[];this.chunks&&this.chunks.forEach(function(e){t.push(e.old.start,e.old.end),n.push(e.new.start,e.new.end)}),this.sessionA.unfold(t),this.sessionB.unfold(n)}}},syncSelections:{set:function(e){}},ignoreTrimWhitespace:{set:function(e){this.scheduleOnInput()}},wrap:{set:function(e){this.sessionA.setOption("wrap",e),this.sessionB.setOption("wrap",e)}},maxDiffs:{value:5e3},theme:{set:function(e){this.setTheme(e)},get:function(){return this.editorA.getTheme()}}});var b={getText:function(t){return""},getWidth:function(){return 0}};t.BaseDiffView=y;var w=function(){function e(t,n,r){this.old=t,this.new=n,this.charChanges=r&&r.map(function(t){return new e(new s(t.originalStartLineNumber,t.originalStartColumn,t.originalEndLineNumber,t.originalEndColumn),new s(t.modifiedStartLineNumber,t.modifiedStartColumn,t.modifiedEndLineNumber,t.modifiedEndColumn))})}return e}(),E=function(){function e(e,t){this.id,this.diffView=e,this.type=t}return e.prototype.update=function(e,t,n,r){var i,o,u,a=this.diffView;this.type===-1?(i="old",o="delete",u="insert"):(i="new",o="insert",u="delete");var f=a.$ignoreTrimWhitespace,l=a.chunks;if(n.lineWidgets&&!a.inlineDiffEditor)for(var c=r.firstRow;c<=r.lastRow;c++){var h=n.lineWidgets[c];if(!h||h.hidden)continue;var p=n.documentToScreenRow(c,0);if(h.rowsAbove>0){var d=new s(p-h.rowsAbove,0,p-1,Number.MAX_VALUE);t.drawFullLineMarker(e,d,"ace_diff aligned_diff",r)}var v=p+h.rowCount-(h.rowsAbove||0),d=new s(p+1,0,v,Number.MAX_VALUE);t.drawFullLineMarker(e,d,"ace_diff aligned_diff",r)}l.forEach(function(a){var l=a[i].start.row,c=a[i].end.row;if(cr.lastRow)return;var h=new s(l,0,c-1,1<<30);l!==c&&(h=h.toScreenRange(n),t.drawFullLineMarker(e,h,"ace_diff "+o,r));if(a.charChanges)for(var p=0;pd.start.row&&d.end.row==a[i].end.row&&(d.end.row--,d.end.column=Number.MAX_VALUE);if(f)for(var v=d.start.row;v<=d.end.row;v++){var m=void 0,g=void 0,y=n.getLine(v).match(/^\s*/)[0].length,b=n.getLine(v).length;v===d.start.row?m=d.start.column:m=y,v===d.end.row?g=d.end.column:g=b;var w=new s(v,m,v,g),E=w.toScreenRange(n);if(y===m&&b===g)continue;var S="inline "+o;w.isEmpty()&&m!==0&&(S="inline "+u+" empty"),t.drawSingleLineMarker(e,E,"ace_diff "+S,r)}else{var x=new s(d.start.row,d.start.column,d.end.row,d.end.column),E=x.toScreenRange(n),S="inline "+o;x.isEmpty()&&d.start.column!==0&&(S="inline empty "+u),E.isMultiLine()?t.drawTextMarker(e,E,"ace_diff "+S,r):t.drawSingleLineMarker(e,E,"ace_diff "+S,r)}}})},e}(),S=function(){function e(){this.id,this.type="fullLine",this.clazz="ace_diff-active-line"}return e.prototype.update=function(e,t,n,r){},e.prototype.setRange=function(e){var t=e.clone();t.end.column++,this.range=t},e}();t.DiffChunk=w,t.DiffHighlight=E}),define("ace/ext/diff/inline_diff_view",["require","exports","module","ace/ext/diff/base_diff_view","ace/virtual_renderer","ace/config"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./base_diff_view").BaseDiffView,s=e("../../virtual_renderer").VirtualRenderer,o=e("../../config"),u=function(e){function t(t,n){var r=this;return t=t||{},t.inline=t.inline||"a",r=e.call(this,!0,n)||this,r.init(t),r}return r(t,e),t.prototype.init=function(e){this.onSelect=this.onSelect.bind(this),this.onAfterRender=this.onAfterRender.bind(this),this.$setupModels(e),this.onChangeTheme(),o.resetOptions(this),o._signal("diffView",this);var t=this.activeEditor.renderer.$padding;this.addGutterDecorators(),this.otherEditor.renderer.setPadding(t),this.textLayer=this.otherEditor.renderer.$textLayer,this.markerLayer=this.otherEditor.renderer.$markerBack,this.gutterLayer=this.otherEditor.renderer.$gutterLayer,this.cursorLayer=this.otherEditor.renderer.$cursorLayer,this.otherEditor.renderer.$updateCachedSize=function(){};var n=this.activeEditor.renderer.$textLayer.element;n.parentNode.insertBefore(this.textLayer.element,n);var r=this.activeEditor.renderer.$markerBack.element;r.parentNode.insertBefore(this.markerLayer.element,r.nextSibling);var i=this.activeEditor.renderer.$gutterLayer.element;i.parentNode.insertBefore(this.gutterLayer.element,i.nextSibling),i.style.position="absolute",this.gutterLayer.element.style.position="absolute",this.gutterLayer.element.style.width="100%",this.gutterLayer.element.classList.add("ace_mini-diff_gutter_other"),this.gutterLayer.$updateGutterWidth=function(){},this.initMouse(),this.initTextInput(),this.initTextLayer(),this.initRenderer(),this.$attachEventHandlers(),this.selectEditor(this.activeEditor)},t.prototype.initRenderer=function(e){var t=this;e?delete this.activeEditor.renderer.$getLongestLine:this.editorA.renderer.$getLongestLine=this.editorB.renderer.$getLongestLine=function(){var e=s.prototype.$getLongestLine;return Math.max(e.call(t.editorA.renderer),e.call(t.editorB.renderer))}},t.prototype.initTextLayer=function(){function r(e,t){var r=0,i=e.length-1,s=-1;while(rt)){s=o;break}i=o-1}}e[s+1]&&e[s+1][n].start.row<=t&&s++;var a=e[s]&&e[s][n];return a&&a.end.row>t?!0:!1}var e=this.textLayer.$renderLine,t=this;this.otherEditor.renderer.$textLayer.$renderLine=function(n,i,s){r(t.chunks,i)&&e.call(this,n,i,s)};var n=this.showSideA?"new":"old"},t.prototype.initTextInput=function(e){e?(this.otherEditor.textInput=this.othertextInput,this.otherEditor.container=this.otherEditorContainer):(this.othertextInput=this.otherEditor.textInput,this.otherEditor.textInput=this.activeEditor.textInput,this.otherEditorContainer=this.otherEditor.container,this.otherEditor.container=this.activeEditor.container)},t.prototype.selectEditor=function(e){e==this.activeEditor?(this.otherEditor.selection.clearSelection(),this.activeEditor.textInput.setHost(this.activeEditor),this.activeEditor.setStyle("ace_diff_other",!1),this.cursorLayer.element.remove(),this.activeEditor.renderer.$cursorLayer.element.style.display="block",this.showSideA&&(this.sessionA.removeMarker(this.syncSelectionMarkerA.id),this.sessionA.addDynamicMarker(this.syncSelectionMarkerA,!0)),this.markerLayer.element.classList.add("ace_hidden_marker-layer"),this.activeEditor.renderer.$markerBack.element.classList.remove("ace_hidden_marker-layer"),this.removeBracketHighlight(this.otherEditor)):(this.activeEditor.selection.clearSelection(),this.activeEditor.textInput.setHost(this.otherEditor),this.activeEditor.setStyle("ace_diff_other"),this.activeEditor.renderer.$cursorLayer.element.parentNode.appendChild(this.cursorLayer.element),this.activeEditor.renderer.$cursorLayer.element.style.display="none",this.activeEditor.$isFocused&&this.otherEditor.onFocus(),this.showSideA&&this.sessionA.removeMarker(this.syncSelectionMarkerA.id),this.markerLayer.element.classList.remove("ace_hidden_marker-layer"),this.activeEditor.renderer.$markerBack.element.classList.add("ace_hidden_marker-layer"),this.removeBracketHighlight(this.activeEditor))},t.prototype.removeBracketHighlight=function(e){var t=e.session;t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach(function(e){t.removeMarker(e)}),t.$bracketHighlight=null)},t.prototype.initMouse=function(){var e=this;this.otherEditor.renderer.$loop=this.activeEditor.renderer.$loop,this.otherEditor.renderer.scroller={getBoundingClientRect:function(){return e.activeEditor.renderer.scroller.getBoundingClientRect()},style:this.activeEditor.renderer.scroller.style};var t=function(t){if(!t.domEvent)return;var n=t.editor.renderer.pixelToScreenCoordinates(t.clientX,t.clientY),r=e.activeEditor.session,i=e.otherEditor.session,s=r.screenToDocumentPosition(n.row,n.column,n.offsetX),o=i.screenToDocumentPosition(n.row,n.column,n.offsetX),u=r.documentToScreenPosition(s),a=i.documentToScreenPosition(o);t.editor==e.activeEditor&&(a.row==n.row&&u.row!=n.row?(t.type=="mousedown"&&e.selectEditor(e.otherEditor),t.propagationStopped=!0,t.defaultPrevented=!0,e.otherEditor.$mouseHandler.onMouseEvent(t.type,t.domEvent)):t.type=="mousedown"&&e.selectEditor(e.activeEditor))},n=["mousedown","click","mouseup","dblclick","tripleclick","quadclick"];n.forEach(function(n){e.activeEditor.on(n,t,!0),e.activeEditor.on("gutter"+n,t,!0)});var r=function(t){e.activeEditor.onFocus(t)},i=function(t){e.activeEditor.onBlur(t)};this.otherEditor.on("focus",r),this.otherEditor.on("blur",i),this.onMouseDetach=function(){n.forEach(function(n){e.activeEditor.off(n,t,!0),e.activeEditor.off("gutter"+n,t,!0)}),e.otherEditor.off("focus",r),e.otherEditor.off("blur",i)}},t.prototype.align=function(){var e=this;this.$initWidgets(e.editorA),this.$initWidgets(e.editorB),e.chunks.forEach(function(t){var n=e.$screenRow(t.old.end,e.sessionA)-e.$screenRow(t.old.start,e.sessionA),r=e.$screenRow(t.new.end,e.sessionB)-e.$screenRow(t.new.start,e.sessionB);e.$addWidget(e.sessionA,{rowCount:r,rowsAbove:t.old.end.row===0?r:0,row:t.old.end.row===0?0:t.old.end.row-1}),e.$addWidget(e.sessionB,{rowCount:n,rowsAbove:n,row:t.new.start.row})}),e.sessionA._emit("changeFold",{data:{start:{row:0}}}),e.sessionB._emit("changeFold",{data:{start:{row:0}}})},t.prototype.onChangeWrapLimit=function(){this.sessionB.adjustWrapLimit(this.sessionA.$wrapLimit),this.scheduleRealign()},t.prototype.$attachSessionsEventHandlers=function(){this.$attachSessionEventHandlers(this.editorA,this.markerA),this.$attachSessionEventHandlers(this.editorB,this.markerB),this.sessionA.on("changeWrapLimit",this.onChangeWrapLimit),this.sessionA.on("changeWrapMode",this.onChangeWrapLimit)},t.prototype.$attachSessionEventHandlers=function(e,t){e.session.on("changeFold",this.onChangeFold),e.session.addDynamicMarker(t),e.selection.on("changeCursor",this.onSelect),e.selection.on("changeSelection",this.onSelect)},t.prototype.$detachSessionsEventHandlers=function(){this.$detachSessionHandlers(this.editorA,this.markerA),this.$detachSessionHandlers(this.editorB,this.markerB),this.otherSession.bgTokenizer.lines.fill(undefined),this.sessionA.off("changeWrapLimit",this.onChangeWrapLimit),this.sessionA.off("changeWrapMode",this.onChangeWrapLimit)},t.prototype.$detachSessionHandlers=function(e,t){e.session.removeMarker(t.id),e.selection.off("changeCursor",this.onSelect),e.selection.off("changeSelection",this.onSelect),e.session.off("changeFold",this.onChangeFold)},t.prototype.$attachEventHandlers=function(){this.activeEditor.on("input",this.onInput),this.activeEditor.renderer.on("afterRender",this.onAfterRender),this.otherSession.on("change",this.onInput)},t.prototype.$detachEventHandlers=function(){this.$detachSessionsEventHandlers(),this.activeEditor.off("input",this.onInput),this.activeEditor.renderer.off("afterRender",this.onAfterRender),this.otherSession.off("change",this.onInput),this.textLayer.element.textContent="",this.textLayer.element.remove(),this.gutterLayer.element.textContent="",this.gutterLayer.element.remove(),this.markerLayer.element.textContent="",this.markerLayer.element.remove(),this.onMouseDetach(),this.selectEditor(this.activeEditor),this.clearSelectionMarkers(),this.otherEditor.setSession(null),this.otherEditor.renderer.$loop=null,this.initTextInput(!0),this.initRenderer(!0),this.otherEditor.destroy()},t.prototype.onAfterRender=function(e,t){var n=t.layerConfig,r=this.otherSession,i=this.otherEditor.renderer;r.$scrollTop=t.scrollTop,r.$scrollLeft=t.scrollLeft,["characterWidth","lineHeight","scrollTop","scrollLeft","scrollMargin","$padding","$size","layerConfig","$horizScroll","$vScroll"].forEach(function(e){i[e]=t[e]}),i.$computeLayerConfig();var s=i.layerConfig;this.gutterLayer.update(s),s.firstRowScreen=n.firstRowScreen,i.$cursorLayer.config=s,i.$cursorLayer.update(s),(e&i.CHANGE_LINES||e&i.CHANGE_FULL||e&i.CHANGE_SCROLL||e&i.CHANGE_TEXT)&&this.textLayer.update(s),this.markerLayer.setMarkers(this.otherSession.getMarkers()),this.markerLayer.update(s)},t.prototype.detach=function(){e.prototype.detach.call(this),this.otherEditor&&this.otherEditor.destroy()},t}(i);t.InlineDiffView=u}),define("ace/ext/diff/split_diff_view",["require","exports","module","ace/ext/diff/base_diff_view","ace/config"],function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e("./base_diff_view").BaseDiffView,s=e("../../config"),o=function(e){function t(t){var n=this;return t=t||{},n=e.call(this)||this,n.init(t),n}return r(t,e),t.prototype.init=function(e){this.onChangeTheme=this.onChangeTheme.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.onScroll=this.onScroll.bind(this),this.$setupModels(e),this.addGutterDecorators(),this.onChangeTheme(),s.resetOptions(this),s._signal("diffView",this),this.$attachEventHandlers()},t.prototype.onChangeWrapLimit=function(){this.scheduleRealign()},t.prototype.align=function(){var e=this;this.$initWidgets(e.editorA),this.$initWidgets(e.editorB),e.chunks.forEach(function(t){var n=e.$screenRow(t.old.start,e.sessionA),r=e.$screenRow(t.new.start,e.sessionB);nr&&e.$addWidget(e.sessionB,{rowCount:n-r,rowsAbove:t.new.start.row===0?n-r:0,row:t.new.start.row===0?0:t.new.start.row-1});var n=e.$screenRow(t.old.end,e.sessionA),r=e.$screenRow(t.new.end,e.sessionB);nr&&e.$addWidget(e.sessionB,{rowCount:n-r,rowsAbove:t.new.end.row===0?n-r:0,row:t.new.end.row===0?0:t.new.end.row-1})}),e.sessionA._emit("changeFold",{data:{start:{row:0}}}),e.sessionB._emit("changeFold",{data:{start:{row:0}}})},t.prototype.onScroll=function(e,t){this.syncScroll(this.sessionA===t?this.editorA.renderer:this.editorB.renderer)},t.prototype.syncScroll=function(e){if(this.$syncScroll==0)return;var t=this.editorA.renderer,n=this.editorB.renderer,r=e==t;if(t.$scrollAnimation&&n.$scrollAnimation)return;var i=Date.now();if(this.scrollSetBy!=e&&i-this.scrollSetAt<500)return;var s=r?t:n;if(this.scrollSetBy!=e){if(r&&this.scrollA==s.session.getScrollTop())return;if(!r&&this.scrollB==s.session.getScrollTop())return}var o=r?n:t,u=s.session.getScrollTop();this.$syncScroll=!1,r?(this.scrollA=s.session.getScrollTop(),this.scrollB=u):(this.scrollA=u,this.scrollB=s.session.getScrollTop()),this.scrollSetBy=e,o.session.setScrollTop(u),this.$syncScroll=!0,this.scrollSetAt=i},t.prototype.onMouseWheel=function(e){if(e.getAccelKey())return;e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.editor,n=t.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);if(!n){var r=t==this.editorA?this.editorB:this.editorA;return r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed)&&r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}},t.prototype.$attachSessionsEventHandlers=function(){this.$attachSessionEventHandlers(this.editorA,this.markerA),this.$attachSessionEventHandlers(this.editorB,this.markerB)},t.prototype.$attachSessionEventHandlers=function(e,t){e.session.on("changeScrollTop",this.onScroll),e.session.on("changeFold",this.onChangeFold),e.session.addDynamicMarker(t),e.selection.on("changeCursor",this.onSelect),e.selection.on("changeSelection",this.onSelect),e.session.on("changeWrapLimit",this.onChangeWrapLimit),e.session.on("changeWrapMode",this.onChangeWrapLimit)},t.prototype.$detachSessionsEventHandlers=function(){this.$detachSessionHandlers(this.editorA,this.markerA),this.$detachSessionHandlers(this.editorB,this.markerB)},t.prototype.$detachSessionHandlers=function(e,t){e.session.off("changeScrollTop",this.onScroll),e.session.off("changeFold",this.onChangeFold),e.session.removeMarker(t.id),e.selection.off("changeCursor",this.onSelect),e.selection.off("changeSelection",this.onSelect),e.session.off("changeWrapLimit",this.onChangeWrapLimit),e.session.off("changeWrapMode",this.onChangeWrapLimit)},t.prototype.$attachEventHandlers=function(){this.editorA.renderer.on("themeChange",this.onChangeTheme),this.editorB.renderer.on("themeChange",this.onChangeTheme),this.editorA.on("mousewheel",this.onMouseWheel),this.editorB.on("mousewheel",this.onMouseWheel),this.editorA.on("input",this.onInput),this.editorB.on("input",this.onInput)},t.prototype.$detachEventHandlers=function(){this.$detachSessionsEventHandlers(),this.clearSelectionMarkers(),this.editorA.renderer.off("themeChange",this.onChangeTheme),this.editorB.renderer.off("themeChange",this.onChangeTheme),this.$detachEditorEventHandlers(this.editorA),this.$detachEditorEventHandlers(this.editorB)},t.prototype.$detachEditorEventHandlers=function(e){e.off("mousewheel",this.onMouseWheel),e.off("input",this.onInput)},t}(i);t.SplitDiffView=o}),define("ace/ext/diff/providers/default",["require","exports","module","ace/range","ace/ext/diff/base_diff_view"],function(e,t,n){"use strict";function h(e,t,n){n===void 0&&(n=function(e,t){return e===t});if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var r=0,i=e.length;rt.length)return new N(t.length,t[t.length-1].length+1);var n=t[e.lineNumber-1];return e.column>n.length+1?new N(e.lineNumber,n.length+1):e}function R(e,t){return e>=1&&e<=t.length}function W(e,t,n,r){var i,o;r===void 0&&(r=!1);var u=[];try{for(var a=s(p(e.map(function(e){return X(e,t,n)}),function(e,t){return e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)})),f=a.next();!f.done;f=a.next()){var l=f.value,c=l[0],h=l[l.length-1];u.push(new U(c.original.join(h.original),c.modified.join(h.modified),l.map(function(e){return e.innerChanges[0]})))}}catch(d){i={error:d}}finally{try{f&&!f.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return S(function(){if(!r&&u.length>0){if(u[0].modified.startLineNumber!==u[0].original.startLineNumber)return!1;if(n.length.lineCount-u[u.length-1].modified.endLineNumberExclusive!==t.length.lineCount-u[u.length-1].original.endLineNumberExclusive)return!1}return x(u,function(e,t){return t.original.startLineNumber-e.original.endLineNumberExclusive===t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive=n.getLineLength(e.modifiedRange.startLineNumber)&&e.originalRange.startColumn-1>=t.getLineLength(e.originalRange.startLineNumber)&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);var s=new _(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),o=new _(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new U(s,o,[e])}function Y(e){return e===32||e===9}function ut(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}function at(e){return e>=65&&e<=90}function lt(e){return ft[e]}function ct(e){return e===10?8:e===13?7:Y(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function ht(e,t,n,r,i,s){var o=dt(e,t,n,s),u=o.moves,a=o.excludedChanges;if(!s.isValid())return[];var f=e.filter(function(e){return!a.has(e)}),l=vt(f,r,i,t,n,s);return m(u,l),u=gt(u),u=u.filter(function(e){var n=e.original.toOffsetRange().slice(t).map(function(e){return e.trim()}),r=n.join("\n");return r.length>=15&&pt(n,function(e){return e.length>=2})>=2}),u=yt(e,u),u}function pt(e,t){var n,r,i=0;try{for(var o=s(e),u=o.next();!u.done;u=o.next()){var a=u.value;t(a)&&i++}}catch(f){n={error:f}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}function dt(e,t,n,r){var i,o,u,a,f=[],l=e.filter(function(e){return e.modified.isEmpty&&e.original.length>=3}).map(function(e){return new Z(e.original,t,e)}),c=new Set(e.filter(function(e){return e.original.isEmpty&&e.modified.length>=3}).map(function(e){return new Z(e.modified,n,e)})),h=new Set;try{for(var p=s(l),d=p.next();!d.done;d=p.next()){var v=d.value,m=-1,g=void 0;try{for(var y=(u=void 0,s(c)),b=y.next();!b.done;b=y.next()){var w=b.value,E=v.computeSimilarity(w);E>m&&(m=E,g=w)}}catch(S){u={error:S}}finally{try{b&&!b.done&&(a=y.return)&&a.call(y)}finally{if(u)throw u.error}}m>.9&&g&&(c.delete(g),f.push(new I(v.range,g.range)),h.add(v.source),h.add(g.source));if(!r.isValid())return{moves:f,excludedChanges:h}}}catch(x){i={error:x}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return{moves:f,excludedChanges:h}}function vt(e,t,n,r,i,o){var u,a,f,l,c,h,p,d,v=[],m=new st;try{for(var w=s(e),E=w.next();!E.done;E=w.next()){var S=E.value;for(var x=S.original.startLineNumber;xr.length||d>i.length)break;if(B.contains(d)||j.contains(p))break;if(!mt(r[p-1],i[d-1],o))break}h>0&&(j.addRange(new _(n.original.startLineNumber-h,n.original.startLineNumber)),B.addRange(new _(n.modified.startLineNumber-h,n.modified.startLineNumber)));var m=void 0;for(m=0;mr.length||d>i.length)break;if(B.contains(d)||j.contains(p))break;if(!mt(r[p-1],i[d-1],o))break}m>0&&(j.addRange(new _(n.original.endLineNumberExclusive,n.original.endLineNumberExclusive+m)),B.addRange(new _(n.modified.endLineNumberExclusive,n.modified.endLineNumberExclusive+m)));if(h>0||m>0)v[t]=new I(new _(n.original.startLineNumber-h,n.original.endLineNumberExclusive+m),new _(n.modified.startLineNumber-h,n.modified.endLineNumberExclusive+m))};for(var x=0;x300&&t.length>300)return!1;var o=new tt,u=o.compute(new ot([e],new C(1,1,1,e.length),!1),new ot([t],new C(1,1,1,t.length),!1),n),a=0,f=$.invert(u.diffs,e.length);try{for(var l=s(f),c=l.next();!c.done;c=l.next()){var h=c.value;h.seq1Range.forEach(function(t){Y(e.charCodeAt(t))||a++})}}catch(p){r={error:p}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}var v=d(e.length>t.length?e:t),m=a/v>.6&&v>10;return m}function gt(e){if(e.length===0)return e;e.sort(g(function(e){return e.original.startLineNumber},y));var t=[e[0]];for(var n=1;n=0&&o>=0;if(u&&s+o<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function yt(e,t){var n=new M(e);return t=t.filter(function(t){var r=n.findLastMonotonous(function(e){return e.original.startLineNumber0&&(o=o.delta(a))}f.push(o)}return r.length>0&&f.push(r[r.length-1]),f}function Et(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(var r=0;r0?n[r-1]:undefined,s=n[r],o=r+1=r.start&&e.seq2Range.start-o>=i.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&of&&(f=d,a=l)}return e.delta(a)}function xt(e,t,n){var r,i,o=[];try{for(var u=s(n),a=u.next();!a.done;a=u.next()){var f=a.value,l=o[o.length-1];if(!l){o.push(f);continue}f.seq1Range.start-l.seq1Range.endExclusive<=2||f.seq2Range.start-l.seq2Range.endExclusive<=2?o[o.length-1]=new $(l.seq1Range.join(f.seq1Range),l.seq2Range.join(f.seq2Range)):o.push(f)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return o}function Tt(e,t,n,r,i){function a(n,a){if(n.offset10){var v=s[0],m=v.seq1Range.intersects(c.seq1Range)||v.seq2Range.intersects(c.seq2Range);if(!m)break;var g=r(e,v.seq1Range.start),y=r(t,v.seq2Range.start),b=new $(g,y),w=b.intersect(v);p+=w.seq1Range.length,d+=w.seq2Range.length,c=c.join(b);if(!(c.seq1Range.endExclusive>=v.seq1Range.endExclusive))break;s.shift()}(i&&p+d0){var f=s.shift();if(f.seq1Range.isEmpty)continue;a(f.getStarts(),f),a(f.getEndExclusives().delta(-1),f)}var l=Nt(n,o);return l}function Nt(e,t){var n=[];while(e.length>0||t.length>0){var r=e[0],i=t[0],s=void 0;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Ct(e,t,n){var r=n;if(r.length===0)return r;var i=0,s;do{s=!1;var o=[r[0]],u=function(t){var n=function(t,n){var r=new T(u.seq1Range.endExclusive,i.seq1Range.start),s=e.getText(r),o=s.replace(/\s/g,"");return o.length<=4&&(t.seq1Range.length+t.seq2Range.length>5||n.seq1Range.length+n.seq2Range.length>5)?!0:!1},i=r[t],u=o[o.length-1],a=n(u,i);a?(s=!0,o[o.length-1]=o[o.length-1].join(i)):o.push(i)};for(var a=1;a5||i.length>500)return!1;var o=e.getText(i).trim();if(o.length>20||o.split(/\r\n|\r|\n/).length>1)return!1;var f=e.countLinesIn(n.seq1Range),l=n.seq1Range.length,c=t.countLinesIn(n.seq2Range),h=n.seq2Range.length,p=e.countLinesIn(r.seq1Range),d=r.seq1Range.length,v=t.countLinesIn(r.seq2Range),m=r.seq2Range.length,g=130;return Math.pow(Math.pow(y(f*40+l),1.5)+Math.pow(y(c*40+h),1.5),1.5)+Math.pow(Math.pow(y(p*40+d),1.5)+Math.pow(y(v*40+m),1.5),1.5)>Math.pow(Math.pow(g,1.5),1.5)*1.3?!0:!1},u=r[n],a=o[o.length-1],f=i(a,u);f?(s=!0,o[o.length-1]=o[o.length-1].join(u)):o.push(u)};for(var a=1;a0&&e.trim().length<=3&&n.seq1Range.length+n.seq2Range.length>100}var i=n,o=e.extendToFullLines(n.seq1Range),u=e.getText(new T(o.start,n.seq1Range.start));s(u)&&(i=i.deltaStart(-u.length));var a=e.getText(new T(n.seq1Range.endExclusive,o.endExclusive));s(a)&&(i=i.deltaEnd(a.length));var l=$.fromOffsetPairs(t?t.getEndExclusives():J.zero,r?r.getStarts():J.max),c=i.intersect(l);f.length>0&&c.getStarts().equals(f[f.length-1].getEndExclusives())?f[f.length-1]=f[f.length-1].join(c):f.push(c)}),f}function At(e){var t=0;while(t0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o,u,a,f,l,c,y=function(e,t){return e-t},w=function(e){function t(n){var r=e.call(this,n||"An unexpected bug occurred.")||this;return Object.setPrototypeOf(r,t.prototype),r}return r(t,e),t}(Error),T=function(){function e(e,t){this.start=e,this.endExclusive=t;if(e>t)throw new w("Invalid range: ".concat(this.toString()))}return e.fromTo=function(t,n){return new e(t,n)},e.addRange=function(t,n){var r=0;while(rn?undefined:new e(t,n)},e.ofLength=function(t){return new e(0,t)},e.ofStartAndLength=function(t,n){return new e(t,t+n)},e.emptyAt=function(t){return new e(t,t)},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.start===this.endExclusive},enumerable:!1,configurable:!0}),e.prototype.delta=function(t){return new e(this.start+t,this.endExclusive+t)},e.prototype.deltaStart=function(t){return new e(this.start+t,this.endExclusive)},e.prototype.deltaEnd=function(t){return new e(this.start,this.endExclusive+t)},Object.defineProperty(e.prototype,"length",{get:function(){return this.endExclusive-this.start},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"[".concat(this.start,", ").concat(this.endExclusive,")")},e.prototype.equals=function(e){return this.start===e.start&&this.endExclusive===e.endExclusive},e.prototype.containsRange=function(e){return this.start<=e.start&&e.endExclusive<=this.endExclusive},e.prototype.contains=function(e){return this.start<=e&&e=e.endExclusive},e.prototype.slice=function(e){return e.slice(this.start,this.endExclusive)},e.prototype.substring=function(e){return e.substring(this.start,this.endExclusive)},e.prototype.clip=function(e){if(this.isEmpty)throw new w("Invalid clipping range: ".concat(this.toString()));return Math.max(this.start,Math.min(this.endExclusive-1,e))},e.prototype.clipCyclic=function(e){if(this.isEmpty)throw new w("Invalid clipping range: ".concat(this.toString()));return e=this.endExclusive?this.start+(e-this.start)%this.length:e},e.prototype.map=function(e){var t=[];for(var n=this.start;nn||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return t.lineNumbere.endLineNumber?!1:t.lineNumber===e.startLineNumber&&t.columne.endColumn?!1:!0},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber?!1:t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn?!1:!0},e.prototype.strictContainsRange=function(t){return e.strictContainsRange(this,t)},e.strictContainsRange=function(e,t){return t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber?!1:t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn?!1:t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn?!1:!0},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var r,i,s,o;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,o=t.endColumn),new e(r,i,s,o)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,o=t.endColumn,u=n.startLineNumber,a=n.startColumn,f=n.endLineNumber,l=n.endColumn;return rf?(s=f,o=l):s===f&&(o=Math.min(o,l)),r>s?null:r===s&&i>o?null:new e(r,i,s,o)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!e&&!t?!0:!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return e.getEndPosition(this)},e.getEndPosition=function(e){return new N(e.endLineNumber,e.endColumn)},e.prototype.getStartPosition=function(){return e.getStartPosition(this)},e.getStartPosition=function(e){return new N(e.startLineNumber,e.startColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.prototype.collapseToEnd=function(){return e.collapseToEnd(this)},e.collapseToEnd=function(t){return new e(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)},e.fromPositions=function(t,n){return n===void 0&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e}(),M=function(){function e(e){this._array=e,this._findLastMonotonousLastIdx=0}return e.prototype.findLastMonotonous=function(e){var t,n;if(u.assertInvariants){if(this._prevFindLastPredicate)try{for(var r=s(this._array),i=r.next();!i.done;i=r.next()){var o=i.value;if(this._prevFindLastPredicate(o)&&!e(o))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this._prevFindLastPredicate=e}var f=L(this._array,e,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=f+1,f===-1?undefined:this._array[f]},e}();u=M,function(){u.assertInvariants=!1}();var _=function(){function e(e,t){if(e>t)throw new w("startLineNumber ".concat(e," cannot be after endLineNumberExclusive ").concat(t));this.startLineNumber=e,this.endLineNumberExclusive=t}return e.fromRangeInclusive=function(t){return new e(t.startLineNumber,t.endLineNumber+1)},e.join=function(t){if(t.length===0)throw new w("lineRanges cannot be empty");var n=t[0].startLineNumber,r=t[0].endLineNumberExclusive;for(var i=1;i=e.startLineNumber}),n=L(this._normalizedRanges,function(t){return t.startLineNumber<=e.endLineNumberExclusive})+1;if(t===n)this._normalizedRanges.splice(t,0,e);else if(t===n-1){var r=this._normalizedRanges[t];this._normalizedRanges[t]=r.join(e)}else{var r=this._normalizedRanges[t].join(this._normalizedRanges[n-1]).join(e);this._normalizedRanges.splice(t,n-t,r)}},e.prototype.contains=function(e){var t=k(this._normalizedRanges,function(t){return t.startLineNumber<=e});return!!t&&t.endLineNumberExclusive>e},e.prototype.subtractFrom=function(t){var n=O(this._normalizedRanges,function(e){return e.endLineNumberExclusive>=t.startLineNumber}),r=L(this._normalizedRanges,function(e){return e.startLineNumber<=t.endLineNumberExclusive})+1;if(n===r)return new e([t]);var i=[],s=t.startLineNumber;for(var o=n;os&&i.push(new _(s,u.startLineNumber)),s=u.endLineNumberExclusive}return s=1),this._getLineContent=e,this._lineCount=t}return e.prototype.getValueOfRange=function(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);var t=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(var n=e.startLineNumber+1;n1&&this.modified.startLineNumber>1)return new z(C.fromPositions(q(new N(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),q(new N(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),C.fromPositions(q(new N(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),q(new N(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)));throw new w},e}(),U=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.innerChanges=r,i}return r(t,e),t.fromRangeMappings=function(e){var n=_.join(e.map(function(e){return _.fromRangeInclusive(e.originalRange)})),r=_.join(e.map(function(e){return _.fromRangeInclusive(e.modifiedRange)}));return new t(n,r,e)},t.prototype.flip=function(){var e;return new t(this.modified,this.original,(e=this.innerChanges)===null||e===void 0?void 0:e.map(function(e){return e.flip()}))},t.prototype.withInnerChangesFromLineRanges=function(){return new t(this.original,this.modified,[this.toRangeMapping()])},t}(I),z=function(){function e(e,t){this.originalRange=e,this.modifiedRange=t}return e.join=function(e){if(e.length===0)throw new w("Cannot join an empty list of range mappings");var t=e[0];for(var n=1;n0&&a>0&&s.get(u-1,a-1)===3&&(c+=o.get(u-1,a-1)),c+=r?r(u,a):1):c=-1;var h=Math.max(f,l,c);if(h===c){var p=u>0&&a>0?o.get(u-1,a-1):0;o.set(u,a,p+1),s.set(u,a,3)}else h===f?(o.set(u,a,0),s.set(u,a,1)):h===l&&(o.set(u,a,0),s.set(u,a,2));i.set(u,a,h)}var d=[],v=e.length,m=t.length,y=e.length-1,b=t.length-1;while(y>=0&&b>=0)s.get(y,b)===3?(g(y,b),y--,b--):s.get(y,b)===1?y--:b--;return g(-1,-1),d.reverse(),new V(d,!1)},e}(),tt=function(){function e(){}return e.prototype.compute=function(e,t,n){function s(e,t){while(er.length||v>i.length)continue;var m=s(d,v);u.set(f,m);var g=d===h?a.get(f+1):a.get(f-1);a.set(f,m!==d?new nt(g,d,v,m-d):g);if(u.get(f)===r.length&&u.get(f)-f===i.length)break e}}var y=a.get(f),b=[],w=r.length,E=i.length;for(;;){var S=y?y.x+y.length:0,x=y?y.y+y.length:0;(S!==w||x!==E)&&b.push(new $(new T(S,w),new T(x,E)));if(!y)break;w=y.x,E=y.y,y=y.prev}return b.reverse(),new V(b,!1)},e}(),nt=function(){function e(e,t,n,r){this.prev=e,this.x=t,this.y=n,this.length=r}return e}(),rt=function(){function e(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}return e.prototype.get=function(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]},e.prototype.set=function(e,t){if(e<0){e=-e-1;if(e>=this.negativeArr.length){var n=this.negativeArr;this.negativeArr=new Int32Array(n.length*2),this.negativeArr.set(n)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){var n=this.positiveArr;this.positiveArr=new Int32Array(n.length*2),this.positiveArr.set(n)}this.positiveArr[e]=t}},e}(),it=function(){function e(){this.positiveArr=[],this.negativeArr=[]}return e.prototype.get=function(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]},e.prototype.set=function(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t},e}(),st=function(){function e(){this.map=new Map}return e.prototype.add=function(e,t){var n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)},e.prototype.forEach=function(e,t){var n=this.map.get(e);if(!n)return;n.forEach(t)},e.prototype.get=function(e){var t=this.map.get(e);return t?t:new Set},e}(),ot=function(){function e(e,t,n){this.lines=e,this.range=t,this.considerWhitespaceChanges=n,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(var r=this.range.startLineNumber;r<=this.range.endLineNumber;r++){var i=e[r-1],s=0;r===this.range.startLineNumber&&this.range.startColumn>1&&(s=this.range.startColumn-1,i=i.substring(s)),this.lineStartOffsets.push(s);var o=0;if(!n){var u=i.trimStart();o=i.length-u.length,i=u.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);var a=r===this.range.endLineNumber?Math.min(this.range.endColumn-1-s-o,i.length):i.length;for(var f=0;f0?this.elements[e-1]:-1),n=ct(e=this.elements.length)return undefined;if(!ut(this.elements[e]))return undefined;var t=e;while(t>0&&ut(this.elements[t-1]))t--;var n=e;while(n=this.elements.length)return undefined;if(!ut(this.elements[e]))return undefined;var t=e;while(t>0&&ut(this.elements[t-1])&&!at(this.elements[t]))t--;var n=e;while(nt.length)return!1;var n=t[e.lineNumber-1];return e.column<1||e.column>n.length+1?!1:!0}function a(e,t){return e.startLineNumber<1||e.startLineNumber>t.length+1?!1:e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1?!1:!0}var n,r,i,o;try{for(var f=s(D),l=f.next();!l.done;l=f.next()){var c=l.value;if(!c.innerChanges)return!1;try{for(var h=(i=void 0,s(c.innerChanges)),p=h.next();!p.done;p=h.next()){var d=p.value,v=u(d.modifiedRange.getStartPosition(),t)&&u(d.modifiedRange.getEndPosition(),t)&&u(d.originalRange.getStartPosition(),e)&&u(d.originalRange.getEndPosition(),e);if(!v)return!1}}catch(m){i={error:m}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}if(!a(c.modified,t)||!a(c.original,e))return!1}}catch(g){n={error:g}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}return!0}),new j(D,P,y)},e.prototype.computeMoves=function(e,t,n,r,i,s,o,u){var a=this,f=ht(e,t,n,r,i,s),l=f.map(function(e){var r=a.refineDiff(t,n,new $(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,o,u),i=W(r.mappings,new B(t),new B(n),!0);return new F(e,i)});return l},e.prototype.refineDiff=function(e,t,n,r,i,s){var o=Mt(n),u=o.toRangeMapping2(e,t),a=new ot(e,u.originalRange,i),f=new ot(t,u.modifiedRange,i),l=a.length+f.length<500?this.dynamicProgrammingDiffing.compute(a,f,r):this.myersDiffingAlgorithm.compute(a,f,r),c=l.diffs;c=bt(a,f,c),c=Tt(a,f,c,function(e,t){return e.findWordContaining(t)}),s.extendToSubwords&&(c=Tt(a,f,c,function(e,t){return e.findSubWordContaining(t)},!0)),c=xt(a,f,c),c=kt(a,f,c);var h=c.map(function(e){return new z(a.translateRange(e.seq1Range),f.translateRange(e.seq2Range))});return{mappings:h,hitTimeout:l.hitTimeout}},e}();t.computeDiff=_t;var Dt=e("../../../range").Range,Pt=e("../base_diff_view").DiffChunk,Ht=function(){function e(){}return e.prototype.compute=function(e,t,n){n||(n={}),n.maxComputationTimeMs||(n.maxComputationTimeMs=500);var r=_t(e,t,n)||[];return r.map(function(e){return new Pt(new Dt(e.origStart,0,e.origEnd,0),new Dt(e.editStart,0,e.editEnd,0),e.charChanges)})},e}();t.DiffProvider=Ht}),define("ace/ext/diff",["require","exports","module","ace/ext/diff/inline_diff_view","ace/ext/diff/split_diff_view","ace/ext/diff/providers/default"],function(e,t,n){function o(e,t){e=e||{},e.diffProvider=e.diffProvider||new s;var n;return e.inline?n=new r(e):n=new i(e),t&&n.setOptions(t),n}var r=e("./diff/inline_diff_view").InlineDiffView,i=e("./diff/split_diff_view").SplitDiffView,s=e("./diff/providers/default").DiffProvider;t.InlineDiffView=r,t.SplitDiffView=i,t.DiffProvider=s,t.createDiffView=o}); (function() { + window.require(["ace/ext/diff"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/www/js/ace/ext-elastic_tabstops_lite.js b/www/js/ace/ext-elastic_tabstops_lite.js new file mode 100644 index 000000000..378fb5d4c --- /dev/null +++ b/www/js/ace/ext-elastic_tabstops_lite.js @@ -0,0 +1,8 @@ +define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";var r=function(){function e(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){r&&(n.indexOf(e.start.row)==-1&&n.push(e.start.row),e.end.row!=e.start.row&&n.push(e.end.row))}}return e.prototype.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+" "),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},e.prototype.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;rt&&(t=i)}var s=[];for(var o=0;o=t.length?t.length:e.length,r=[];for(var i=0;i"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]=="+"&&(n[0].ifEnd=n[0]),e[1]=="?"&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";t=t.replace(/^TM_/,"");if(!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return typeof r=="function"&&(r=this.variables[t](e,t,n)),r==null?"":r},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,""));var s=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,o=this,u=e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);var t=o.resolveVariables(s,n),r="E";for(var i=0;i=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):o&&(n[o]=u)}}return t},e.prototype.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r},e}();i.implement(d.prototype,s);var v=function(e,t,n){function l(e){var t=[];for(var n=0;n1?(y=t[t.length-1].length,g+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:g,column:y}:e.start={row:g,column:y})}),{text:b,tabstops:a,tokens:u}},m=function(){function e(e){this.index=0,this.ranges=[],this.tabstops=[];if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.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)},e.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},e.prototype.onChange=function(e){var t=e.action[0]=="r",n=this.selectedTabstop||{},r=n.parents||{},i=this.tabstops.slice();for(var s=0;s2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(!this.selectedTabstop)return;var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new f,m.prototype.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView()},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var g=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};r.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",!1),t.snippetManager=new d;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.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(e,t,n){"use strict";var r=e("../keyboard/hash_handler").HashHandler,i=e("../editor").Editor,s=e("../snippets").snippetManager,o=e("../range").Range,u=e("../config"),a,f,l=function(){function e(){}return e.prototype.setupContext=function(e){this.ace=e,this.indentation=e.session.getTabString(),a||(a=window.emmet);var t=a.resources||a.require("resources");t.setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},e.prototype.getSelectionRange=function(){var e=this.ace.getSelectionRange(),t=this.ace.session.doc;return{start:t.positionToIndex(e.start),end:t.positionToIndex(e.end)}},e.prototype.createSelection=function(e,t){var n=this.ace.session.doc;this.ace.selection.setRange({start:n.indexToPosition(e),end:n.indexToPosition(t)})},e.prototype.getCurrentLineRange=function(){var e=this.ace,t=e.getCursorPosition().row,n=e.session.getLine(t).length,r=e.session.doc.positionToIndex({row:t,column:0});return{start:r,end:r+n}},e.prototype.getCaretPos=function(){var e=this.ace.getCursorPosition();return this.ace.session.doc.positionToIndex(e)},e.prototype.setCaretPos=function(e){var t=this.ace.session.doc.indexToPosition(e);this.ace.selection.moveToPosition(t)},e.prototype.getCurrentLine=function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},e.prototype.replaceContent=function(e,t,n,r){n==null&&(n=t==null?this.getContent().length:t),t==null&&(t=0);var i=this.ace,u=i.session.doc,a=o.fromPoints(u.indexToPosition(t),u.indexToPosition(n));i.session.remove(a),a.end=a.start,e=this.$updateTabstops(e),s.insertSnippet(i,e)},e.prototype.getContent=function(){return this.ace.getValue()},e.prototype.getSyntax=function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if(e=="html"||e=="php"){var t=this.ace.getCursorPosition(),n=this.ace.session.getState(t.row);typeof n!="string"&&(n=n[0]),n&&(n=n.split("-"),n.length>1?e=n[0]:e=="php"&&(e="html"))}return e},e.prototype.getProfileName=function(){var e=a.resources||a.require("resources");switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var t=e.getVariable("profile");return t||(t=this.ace.session.getLines(0,2).join("").search(/]+XHTML/i)!=-1?"xhtml":"html"),t;default:var n=this.ace.session.$mode;return n.emmetConfig&&n.emmetConfig.profile||"xhtml"}},e.prototype.prompt=function(e){return prompt(e)},e.prototype.getSelection=function(){return this.ace.session.getTextRange()},e.prototype.getFilePath=function(){return""},e.prototype.$updateTabstops=function(e){var t=1e3,n=0,r=null,i=a.tabStops||a.require("tabStops"),s=a.resources||a.require("resources"),o=s.getVocabulary("user"),u={tabstop:function(e){var s=parseInt(e.group,10),o=s===0;o?s=++n:s+=t;var a=e.placeholder;a&&(a=i.processText(a,u));var f="${"+s+(a?":"+a:"")+"}";return o&&(r=[e.start,f]),f},escape:function(e){return e=="$"?"\\$":e=="\\"?"\\\\":e}};e=i.processText(e,u);if(o.variables.insert_final_tabstop&&!/\$\{0\}$/.test(e))e+="${0}";else if(r){var f=a.utils?a.utils.common:a.require("utils");e=f.replaceSubstring(e,"${0}",r[0],r[1])}return e},e}(),c={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"}},h=new l;t.commands=new r,t.runEmmetCommand=function v(e){if(this.action=="expand_abbreviation_with_tab"){if(!e.selection.isEmpty())return!1;var n=e.selection.lead,r=e.session.getTokenAt(n.row,n.column);if(r&&/\btag\b/.test(r.type))return!1}try{h.setupContext(e);var i=a.actions||a.require("actions");if(this.action=="wrap_with_abbreviation")return setTimeout(function(){i.run("wrap_with_abbreviation",h)},0);var s=i.run(this.action,h)}catch(o){if(!a){var f=t.load(v.bind(this,e));return this.action=="expand_abbreviation_with_tab"?!1:f}e._signal("changeStatus",typeof o=="string"?o:o.message),u.warn(o),s=!1}return s};for(var p in c)t.commands.addCommand({name:"emmet:"+p,action:p,bindKey:c[p],exec:t.runEmmetCommand,multiSelectAction:"forEach"});t.updateCommands=function(e,n){n?e.keyBinding.addKeyboardHandler(t.commands):e.keyBinding.removeKeyboardHandler(t.commands)},t.isSupportedMode=function(e){if(!e)return!1;if(e.emmetConfig)return!0;var t=e.$id||e;return/css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(t)},t.isAvailable=function(e,n){if(/(evaluate_math_expression|expand_abbreviation)$/.test(n))return!0;var r=e.session.$mode,i=t.isSupportedMode(r);if(i&&r.$modes)try{h.setupContext(e),/js|php/.test(h.getSyntax())&&(i=!1)}catch(s){}return i};var d=function(e,n){var r=n;if(!r)return;var i=t.isSupportedMode(r.session.$mode);e.enableEmmet===!1&&(i=!1),i&&t.load(),t.updateCommands(r,i)};t.load=function(e){return typeof f!="string"?(u.warn("script for emmet-core is not loaded"),!1):(u.loadModule(f,function(){f=null,e&&e()}),!0)},t.AceEmmetEditor=l,u.defineOptions(i.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on":"removeListener"]("changeMode",d),d({enableEmmet:!!e},this)},value:!0}}),t.setCore=function(e){typeof e=="string"?f=e:a=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/src/ace/ext-error_marker.js b/www/js/ace/ext-error_marker.js similarity index 99% rename from src/ace/ext-error_marker.js rename to www/js/ace/ext-error_marker.js index 683423d7e..066ec8746 100644 --- a/src/ace/ext-error_marker.js +++ b/www/js/ace/ext-error_marker.js @@ -1,4 +1,3 @@ - ; (function() { window.require(["ace/ext/error_marker"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { diff --git a/www/js/ace/ext-hardwrap.js b/www/js/ace/ext-hardwrap.js new file mode 100644 index 000000000..8694aaac9 --- /dev/null +++ b/www/js/ace/ext-hardwrap.js @@ -0,0 +1,8 @@ +define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,t,n){"use strict";function i(e,t){function m(e,t,n){if(e.lengthn)return{start:o.index,end:o.index+o[2].length};if(s&&s[2])return u=t+s[2].length,{start:u,end:u+s[3].length}}var n=t.column||e.getOption("printMarginColumn"),i=t.allowMerge!=0,s=Math.min(t.startRow,t.endRow),o=Math.max(t.startRow,t.endRow),u=e.session;while(s<=o){var a=u.getLine(s);if(a.length>n){var f=m(a,n,5);if(f){var l=/^\s*/.exec(a)[0];u.replace(new r(s,f.start,s,f.end),"\n"+l)}o++}else if(i&&/\S/.test(a)&&s!=o){var c=u.getLine(s+1);if(c&&/\S/.test(c)){var h=a.replace(/\s+$/,""),p=c.replace(/^\s+/,""),d=h+" "+p,f=m(d,n,5);if(f&&f.start>h.length||d.length"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]=="+"&&(n[0].ifEnd=n[0]),e[1]=="?"&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";t=t.replace(/^TM_/,"");if(!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return typeof r=="function"&&(r=this.variables[t](e,t,n)),r==null?"":r},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,""));var s=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,o=this,u=e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);var t=o.resolveVariables(s,n),r="E";for(var i=0;i=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):o&&(n[o]=u)}}return t},e.prototype.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r},e}();i.implement(d.prototype,s);var v=function(e,t,n){function l(e){var t=[];for(var n=0;n1?(y=t[t.length-1].length,g+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:g,column:y}:e.start={row:g,column:y})}),{text:b,tabstops:a,tokens:u}},m=function(){function e(e){this.index=0,this.ranges=[],this.tabstops=[];if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.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)},e.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},e.prototype.onChange=function(e){var t=e.action[0]=="r",n=this.selectedTabstop||{},r=n.parents||{},i=this.tabstops.slice();for(var s=0;s2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(!this.selectedTabstop)return;var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new f,m.prototype.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView()},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var g=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};r.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",!1),t.snippetManager=new d;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){var r="doc-tooltip ";for(var i=0;i=c?r="bottom":r="top"),r==="top"?(h.bottom=e.top-this.$borderSize,h.top=h.bottom-c):r==="bottom"&&(h.top=e.top+t+this.$borderSize,h.bottom=h.top+c);var v=h.top>=0&&h.bottom<=a;if(!s&&!v)return!1;v?l.$maxPixelHeight=null:r==="top"?l.$maxPixelHeight=d:l.$maxPixelHeight=p,r==="top"?(o.style.top="",o.style.bottom=a+u-h.bottom+"px",n.isTopdown=!1):(o.style.top=h.top+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var m=e.left;return m+o.offsetWidth>f&&(m=f-o.offsetWidth),o.style.left=m+"px",o.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=r,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":undefined,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}return e}();a.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",!1),t.AcePopup=m,t.$singleLineEditor=v,t.getAriaId=c}),define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){"use strict";t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var s=0;s=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(this.$elements||!this.editor)return;window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);var e=this.editor.container.parentNode,t=[];while(e)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var s={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(s.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,u=othis.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var u=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;if(this.exactMatch){if(t!==u.substr(0,t.length))continue e}else{var p=u.toLowerCase().indexOf(i);if(p>-1)l=p;else for(var d=0;d=0?m<0||v0&&(a===-1&&(l+=10),l+=h,f|=1<=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=e("../tooltip").Tooltip,s=e("../lib/event_emitter").EventEmitter,o=e("../lib/lang"),u=e("../lib/dom"),a=e("../lib/oop"),f=e("../lib/useragent"),l="command_bar_tooltip_button",c="command_bar_button_value",h="command_bar_button_caption",p="command_bar_keybinding",d="command_bar_tooltip",v="MoreOptionsButton",m=100,g=4,y=function(e,t){return t.row>e.row?e:t.row===e.row&&t.column>e.column?e:t},b={Ctrl:{mac:"^"},Option:{mac:"\u2325"},Command:{mac:"\u2318"},Cmd:{mac:"\u2318"},Shift:"\u21e7",Left:"\u2190",Right:"\u2192",Up:"\u2191",Down:"\u2193"},w=function(){function e(e,t){var n,s;t=t||{},this.parentNode=e,this.tooltip=new i(this.parentNode),this.moreOptions=new i(this.parentNode),this.maxElementsOnTooltip=t.maxElementsOnTooltip||g,this.$alwaysShow=t.alwaysShow||!1,this.eventListeners={},this.elements={},this.commands={},this.tooltipEl=u.buildDom(["div",{"class":d}],this.tooltip.getElement()),this.moreOptionsEl=u.buildDom(["div",{"class":d+" tooltip_more_options"}],this.moreOptions.getElement()),this.$showTooltipTimer=o.delayedCall(this.$showTooltip.bind(this),t.showDelay||m),this.$hideTooltipTimer=o.delayedCall(this.$hideTooltip.bind(this),t.hideDelay||m),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 a=r(["mousedown","mouseup","click"]),f=a.next();!f.done;f=a.next()){var l=f.value;this.tooltip.getElement().addEventListener(l,this.$preventMouseEvent),this.moreOptions.getElement().addEventListener(l,this.$preventMouseEvent)}}catch(c){n={error:c}}finally{try{f&&!f.done&&(s=a.return)&&s.call(a)}finally{if(n)throw n.error}}}return e.prototype.registerCommand=function(e,t){var n=Object.keys(this.commands).length=f.top&&s.top<=f.bottom&&s.left>=f.left+e.gutterWidth&&s.left<=f.right;if(!l&&this.isShown()){this.$hideTooltip();return}if(l&&!this.isShown()&&this.getAlwaysShow()){this.$showTooltip();return}var c=s.top-o.offsetHeight,h=Math.min(u-o.offsetWidth,s.left),p=c>=0&&c+o.offsetHeight<=a&&h>=0&&h+o.offsetWidth<=u;if(!p){this.$hideTooltip();return}this.tooltip.setPosition(h,c);if(this.isMoreOptionsShown()){c+=o.offsetHeight,h=this.elements[v].getBoundingClientRect().left;var d=this.moreOptions.getElement(),a=window.innerHeight;c+d.offsetHeight>a&&(c-=o.offsetHeight+d.offsetHeight),h+d.offsetWidth>u&&(h=u-d.offsetWidth),this.moreOptions.setPosition(h,c)}},e.prototype.update=function(){Object.keys(this.elements).forEach(this.$updateElement.bind(this))},e.prototype.detach=function(){this.tooltip.hide(),this.moreOptions.hide(),this.$updateOnHoverHandlers(!1),this.editor&&(this.editor.off("changeSession",this.$onEditorChangeSession),this.editor.session&&(this.editor.session.off("changeScrollLeft",this.$onChangeScroll),this.editor.session.off("changeScrollTop",this.$onChangeScroll))),this.$mouseInTooltip=!1,this.editor=null},e.prototype.destroy=function(){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},e.prototype.$createCommand=function(e,t,n){var r=n?this.tooltipEl:this.moreOptionsEl,i=[],s=t.bindKey;s&&(typeof s=="object"&&(s=f.isMac?s.mac:s.win),s=s.split("|")[0],i=s.split("-"),i=i.map(function(e){if(b[e]){if(typeof b[e]=="string")return b[e];if(f.isMac&&b[e].mac)return b[e].mac}return e}));var o;n&&t.iconCssClass?o=["div",{"class":["ace_icon_svg",t.iconCssClass].join(" "),"aria-label":t.name+" ("+t.bindKey+")"}]:(o=[["div",{"class":c}],["div",{"class":h},t.name]],i.length&&o.push(["div",{"class":p},i.map(function(e){return["div",e]})])),u.buildDom(["div",{"class":[l,t.cssClass||""].join(" "),ref:e},o],r,this.elements),this.commands[e]=t;var a=function(n){this.editor&&this.editor.focus(),this.$shouldHideMoreOptions=this.isMoreOptionsShown(),!this.elements[e].disabled&&t.exec&&t.exec(this.editor),this.$shouldHideMoreOptions&&this.$setMoreOptionsVisibility(!1),this.update(),n.preventDefault()}.bind(this);this.eventListeners[e]=a,this.elements[e].addEventListener("click",a.bind(this)),this.$updateElement(e)},e.prototype.$setMoreOptionsVisibility=function(e){e?(this.moreOptions.setTheme(this.editor.renderer.theme),this.moreOptions.setClassName(d+"_wrapper"),this.moreOptions.show(),this.update(),this.updatePosition()):this.moreOptions.hide()},e.prototype.$onEditorChangeSession=function(e){e.oldSession&&(e.oldSession.off("changeScrollTop",this.$onChangeScroll),e.oldSession.off("changeScrollLeft",this.$onChangeScroll)),this.detach()},e.prototype.$onChangeScroll=function(){this.editor.renderer&&(this.isShown()||this.getAlwaysShow())&&this.editor.renderer.once("afterRender",this.updatePosition.bind(this))},e.prototype.$onMouseMove=function(e){if(this.$mouseInTooltip)return;var t=this.editor.getCursorPosition(),n=this.editor.renderer.textToScreenCoordinates(t.row,t.column),r=this.editor.renderer.lineHeight,i=e.clientY>=n.pageY&&e.clientYs)continue;l.range.start.row===a?u++:(a=l.range.start.row,u=0);if(u>200)continue;var c=l.range.clipRows(i,s);if(c.start.row===c.end.row&&c.start.column===c.end.column)continue;var h=c.toScreenRange(n);if(h.isEmpty()){o=n.getNextFoldLine(c.end.row,o),o&&o.end.row>c.end.row&&(i=o.end.row);continue}this.markerType==="fullLine"?t.drawFullLineMarker(e,h,l.className,r):h.isMultiLine()?this.markerType==="line"?t.drawMultiLineMarker(e,h,l.className,r):t.drawTextMarker(e,h,l.className,r):t.drawSingleLineMarker(e,h,l.className+" ace_br15",r)}},e}();r.prototype.MAX_MARKERS=1e4,t.MarkerGroup=r}),define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){function s(e,t){var n=e.getTextRange(r.fromPoints({row:0,column:0},t));return n.split(i).length-1}function o(e,t){var n=s(e,t),r=e.getValue().split(i),o=Object.create(null),u=r[n];return r.forEach(function(e,t){if(!e||e===u)return;var i=Math.abs(n-t),s=r.length-i;o[e]?o[e]=Math.max(s,o[e]):o[e]=s}),o}var r=e("../range").Range,i=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,r,i){var s=o(t,n),u=Object.keys(s);i(null,u.map(function(e){return{caption:e,value:e,score:s[e],meta:"local"}}))}}),define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../snippets").snippetManager,i=e("../autocomplete").Autocomplete,s=e("../config"),o=e("../lib/lang"),u=e("../autocomplete/util"),a=e("../marker_group").MarkerGroup,f=e("../autocomplete/text_completer"),l={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var s=e.session.getState(n.row),o=t.$mode.getCompletions(s,t,n,r);o=o.map(function(e){return e.completerId=l.id,e}),i(null,o)},id:"keywordCompleter"},c=function(e){var t={};return e.replace(/\${(\d+)(:(.*?))?}/g,function(e,n,r,i){return t[n]=i||""}).replace(/\$(\d+?)/g,function(e,n){return t[n]})},h={getCompletions:function(e,t,n,i,s){var o=[],u=t.getTokenAt(n.row,n.column);u&&u.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?o.push("html-tag"):o=r.getActiveScopes(e);var a=r.snippetMap,f=[];o.forEach(function(e){var t=a[e]||[];for(var n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;if(!i)continue;f.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+"\u21e5 ":"snippet",completerId:h.id})}},this),s(null,f)},getDocTooltip:function(e){e.snippet&&!e.docHTML&&(e.docHTML=["",o.escapeHTML(e.caption),"","
      ",o.escapeHTML(c(e.snippet))].join(""))},id:"snippetCompleter"},p=[h,f,l];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=f,t.keyWordCompleter=l,t.snippetCompleter=h;var d={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},v=function(e,t){m(t.session.$mode)},m=function(e){typeof e=="string"&&(e=s.$modes[e]);if(!e)return;r.files||(r.files={}),g(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(m)},g=function(e,t){if(!t||!e||r.files[e])return;r.files[e]={},s.loadModule(t,function(t){if(!t)return;r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){m("ace/mode/"+e)}))})},y=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name==="backspace")n&&!u.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name==="insertstring"&&!n){b=e;var r=e.editor.$liveAutocompletionDelay;r?w.delay(r):E(e)}},b,w=o.delayedCall(function(){E(b)},0),E=function(e){var t=e.editor,n=u.getCompletionPrefix(t),r=e.args,s=u.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||s){var o=i.for(t);o.autoShown=!0,o.showPopup(t)}},S=e("../editor").Editor;e("../config").defineOptions(S.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(i.for(this),this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.on("afterExec",y)):this.commands.off("afterExec",y)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(d),this.on("changeMode",v),v(null,this)):(this.commands.removeCommand(d),this.off("changeMode",v))},value:!1}}),t.MarkerGroup=a}),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(e,t,n){"use strict";var r=e("../keyboard/hash_handler").HashHandler,i=e("../autocomplete/inline").AceInline,s=e("../autocomplete").FilteredList,o=e("../autocomplete").CompletionProvider,u=e("../editor").Editor,a=e("../autocomplete/util"),f=e("../lib/dom"),l=e("../lib/lang"),c=e("./command_bar").CommandBarTooltip,h=e("./command_bar").BUTTON_CLASS_NAME,p=e("./language_tools").snippetCompleter,d=e("./language_tools").textCompleter,v=e("./language_tools").keyWordCompleter,m=function(e,t){t.completer&&t.completer.destroy()},g=function(){function e(e){this.editor=e,this.keyboardHandler=new r(this.commands),this.$index=-1,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.changeTimer=l.delayedCall(function(){this.updateCompletions()}.bind(this))}return e.prototype.getInlineRenderer=function(){return this.inlineRenderer||(this.inlineRenderer=new i),this.inlineRenderer},e.prototype.getInlineTooltip=function(){return this.inlineTooltip||(this.inlineTooltip=e.createInlineTooltip(document.body||document.documentElement)),this.inlineTooltip},e.prototype.show=function(e){this.activated=!0,this.editor.completer!==this&&(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(e)},e.prototype.$open=function(){this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({}),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.getInlineTooltip().attach(this.editor),this.$index===-1?this.setIndex(0):this.$showCompletion(),this.changeTimer.cancel()},e.prototype.insertMatch=function(){var e=this.getCompletionProvider().insertByIndex(this.editor,this.$index);return this.detach(),e},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column=0},e.prototype.setIndex=function(e){if(!this.completions||!this.completions.filtered)return;var t=Math.max(-1,Math.min(this.completions.filtered.length-1,e));t!==this.$index&&(this.$index=t,this.$showCompletion())},e.prototype.getCompletionProvider=function(e){return this.completionProvider||(this.completionProvider=new o(e)),this.completionProvider},e.prototype.$showCompletion=function(){this.getInlineRenderer().show(this.editor,this.completions.filtered[this.$index],this.completions.filterText)||this.getInlineRenderer().hide(),this.inlineTooltip&&this.inlineTooltip.isShown()&&this.inlineTooltip.update()},e.prototype.$updatePrefix=function(){var e=this.editor.getCursorPosition(),t=this.editor.session.getTextRange({start:this.base,end:e});return this.completions.setFilter(t),this.completions.filtered.length?this.completions.filtered.length==1&&this.completions.filtered[0].value==t&&!this.completions.filtered[0].snippet?this.detach():(this.$open(this.editor,t),t):this.detach()},e.prototype.updateCompletions=function(e){var t="";if(e&&e.matches){var n=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(n.row,n.column),this.base.$insertRight=!0,this.completions=new s(e.matches),this.$open(this.editor,"")}this.base&&this.completions&&(t=this.$updatePrefix());var r=this.editor.getSession(),n=this.editor.getCursorPosition(),t=a.getCompletionPrefix(this.editor);this.base=r.doc.createAnchor(n.row,n.column-t.length),this.base.$insertRight=!0;var e={exactMatch:!0,ignoreCaption:!0};this.getCompletionProvider({prefix:t,base:this.base,pos:n}).provideCompletions(this.editor,e,function(e,t,n){var r=t.filtered,i=a.getCompletionPrefix(this.editor);if(n){if(!r.length)return this.detach();if(r.length==1&&r[0].value==i&&!r[0].snippet)return this.detach()}this.completions=t,this.$open(this.editor,i)}.bind(this))},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener)),this.changeTimer.cancel(),this.inlineTooltip&&this.inlineTooltip.detach(),this.setIndex(-1),this.completionProvider&&this.completionProvider.detach(),this.inlineRenderer&&this.inlineRenderer.isOpen()&&this.inlineRenderer.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null},e.prototype.destroy=function(){this.detach(),this.inlineRenderer&&this.inlineRenderer.destroy(),this.inlineTooltip&&this.inlineTooltip.destroy(),this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineTooltip=this.editor=this.inlineRenderer=null},e.prototype.updateDocTooltip=function(){},e}();g.prototype.commands={Previous:{bindKey:"Alt-[",name:"Previous",exec:function(e){e.completer.goTo("prev")}},Next:{bindKey:"Alt-]",name:"Next",exec:function(e){e.completer.goTo("next")}},Accept:{bindKey:{win:"Tab|Ctrl-Right",mac:"Tab|Cmd-Right"},name:"Accept",exec:function(e){return e.completer.insertMatch()}},Close:{bindKey:"Esc",name:"Close",exec:function(e){e.completer.detach()}}},g.for=function(e){return e.completer instanceof g?e.completer:(e.completer&&(e.completer.destroy(),e.completer=null),e.completer=new g(e),e.once("destroy",m),e.completer)},g.startCommand={name:"startInlineAutocomplete",exec:function(e,t){var n=g.for(e);n.show(t)},bindKey:{win:"Alt-C",mac:"Option-C"}};var y=[p,d,v];e("../config").defineOptions(u.prototype,"editor",{enableInlineAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:y),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1}}),g.createInlineTooltip=function(e){var t=new c(e);return t.registerCommand("Previous",Object.assign({},g.prototype.commands.Previous,{enabled:!0,type:"button",iconCssClass:"ace_arrow_rotated"})),t.registerCommand("Position",{enabled:!1,getValue:function(e){return e?[e.completer.getIndex()+1,e.completer.getLength()].join("/"):""},type:"text",cssClass:"completion_position"}),t.registerCommand("Next",Object.assign({},g.prototype.commands.Next,{enabled:!0,type:"button",iconCssClass:"ace_arrow"})),t.registerCommand("Accept",Object.assign({},g.prototype.commands.Accept,{enabled:function(e){return!!e&&e.completer.getIndex()>=0},type:"button"})),t.registerCommand("ShowTooltip",{name:"Always Show Tooltip",exec:function(){t.setAlwaysShow(!t.getAlwaysShow())},enabled:!0,getValue:function(){return t.getAlwaysShow()},type:"checkbox"}),t},f.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(h,".completion_position {\n padding: 0;\n}\n"),"inlineautocomplete.css",!1),t.InlineAutocomplete=g}); (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/www/js/ace/ext-keybinding_menu.js b/www/js/ace/ext-keybinding_menu.js new file mode 100644 index 000000000..397fda3ee --- /dev/null +++ b/www/js/ace/ext-keybinding_menu.js @@ -0,0 +1,8 @@ +define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"],function(e,t,n){n.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/ext/menu_tools/overlay_page","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i=e("./settings_menu.css");r.importCssString(i,"settings_menu.css",!1),n.exports.overlayPage=function(t,n,r){function o(e){e.keyCode===27&&u()}function u(){if(!i)return;document.removeEventListener("keydown",o),i.parentNode.removeChild(i),t&&t.focus(),i=null,r&&r()}function a(e){s=e,e&&(i.style.pointerEvents="none",n.style.pointerEvents="auto")}var i=document.createElement("div"),s=!1;return i.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(t?"background-color: rgba(0, 0, 0, 0.3);":""),i.addEventListener("click",function(e){s||u()}),document.addEventListener("keydown",o),n.addEventListener("click",function(e){e.stopPropagation()}),i.appendChild(n),document.body.appendChild(i),t&&t.blur(),{close:u,setIgnoreFocusOut:a}}}),define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/ext/menu_tools/get_editor_keyboard_shortcuts","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var t=e.commandKeyBinding;for(var r in t){var s=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),o=t[r];Array.isArray(o)||(o=[o]),o.forEach(function(e){typeof e!="string"&&(e=e.name),i[e]?i[e].key+="|"+s:(i[e]={key:s,command:e},n.push(i[e]))})}}),n}}),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(e,t,n){"use strict";function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'
      '+t.command+" : "+''+t.key+"
      "},"");s.id="kbshortcutmenu",s.innerHTML="

      Keyboard Shortcuts

      "+o+"
      ",n(t,s)}}var r=e("../editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.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/www/js/ace/ext-language_tools.js b/www/js/ace/ext-language_tools.js new file mode 100644 index 000000000..17c486781 --- /dev/null +++ b/www/js/ace/ext-language_tools.js @@ -0,0 +1,8 @@ +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(e,t,n){"use strict";function p(e){var t=(new Date).toLocaleString("en-us",e);return t.length==1?"0"+t:t}var r=e("./lib/dom"),i=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),u=e("./range").Range,a=e("./range_list").RangeList,f=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,c=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var r=e.session.getTextRange();return n?r.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):r},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return c.getText&&c.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){var t=e.session.$mode||{};return t.lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};h.SELECTED_TEXT=h.SELECTION;var d=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=h}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var r={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var r=n[0];return r.fmtString=!0,r.guard=e.slice(1,-1),r.flag="",""},next:"formatString"};return e.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1&&(e=r),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,r){var i=t(e.substr(1));return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var r=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return e.length==2?e[1]:"\0"}).split("\0").map(function(e){return{value:e}});return n[0].choices=r,[r[0]]},next:"start"},r,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:r=="n"?e="\n":r=="t"?e=" ":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]=="+"&&(n[0].ifEnd=n[0]),e[1]=="?"&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";t=t.replace(/^TM_/,"");if(!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return typeof r=="function"&&(r=this.variables[t](e,t,n)),r==null?"":r},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,""));var s=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,o=this,u=e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);var t=o.resolveVariables(s,n),r="E";for(var i=0;i=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):o&&(n[o]=u)}}return t},e.prototype.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r},e}();i.implement(d.prototype,s);var v=function(e,t,n){function l(e){var t=[];for(var n=0;n1?(y=t[t.length-1].length,g+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:g,column:y}:e.start={row:g,column:y})}),{text:b,tabstops:a,tokens:u}},m=function(){function e(e){this.index=0,this.ranges=[],this.tabstops=[];if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.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)},e.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},e.prototype.onChange=function(e){var t=e.action[0]=="r",n=this.selectedTabstop||{},r=n.parents||{},i=this.tabstops.slice();for(var s=0;s2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(!this.selectedTabstop)return;var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new f,m.prototype.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView()},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var g=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};r.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",!1),t.snippetManager=new d;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.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(e,t,n){"use strict";var r=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,s=e("../range").Range,o=e("../lib/event"),u=e("../lib/lang"),a=e("../lib/dom"),f=e("../config").nls,l=e("./../lib/useragent"),c=function(e){return"suggest-aria-id:".concat(e)},h=l.isSafari?"menu":"listbox",p=l.isSafari?"menuitem":"option",d=l.isSafari?"aria-current":"aria-selected",v=function(e){var t=new r(e);t.$maxLines=4;var n=new i(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n},m=function(){function e(e){var t=a.createElement("div"),n=v(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",h),n.renderer.$textLayer.element.setAttribute("aria-roledescription",f("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",f("autocomplete.popup.aria-label","Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),m.start.row=m.end.row=t.row,e.stop()});var i,l=new s(-1,0,-1,Infinity),m=new s(-1,0,-1,Infinity);m.id=n.session.addMarker(m,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?l.id&&(n.session.removeMarker(l.id),l.id=null):l.id=n.session.addMarker(l,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(!i){i=e;return}if(i.x==e.x&&i.y==e.y)return;i=e,i.scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=i.getDocumentPosition().row;l.start.row!=t&&(l.id||n.setRow(t),y(t))}),n.renderer.on("beforeRender",function(){if(i&&l.start.row!=-1){i.$pos=null;var e=i.getDocumentPosition().row;l.id||n.setRow(e),y(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.renderer.$textLayer;for(var t=e.config.firstRow,r=e.config.lastRow;t<=r;t++){var i=e.element.childNodes[t-e.config.firstRow];i.setAttribute("role",p),i.setAttribute("aria-roledescription",f("autocomplete.popup.item.aria-roledescription","item")),i.setAttribute("aria-setsize",n.data.length),i.setAttribute("aria-describedby","doc-tooltip"),i.setAttribute("aria-posinset",t+1);var s=n.getData(t);if(s){var o="".concat(s.caption||s.value).concat(s.meta?", ".concat(s.meta):"");i.setAttribute("aria-label",o)}var u=i.querySelectorAll(".ace_completion-highlight");u.forEach(function(e){e.setAttribute("role","mark")})}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,r=t.element.childNodes[e-t.config.firstRow],i=document.activeElement;r!==n.selectedNode&&n.selectedNode&&(a.removeCssClass(n.selectedNode,"ace_selected"),n.selectedNode.removeAttribute(d),n.selectedNode.removeAttribute("id")),i.removeAttribute("aria-activedescendant"),n.selectedNode=r;if(r){var s=c(e);a.addCssClass(r,"ace_selected"),r.id=s,t.element.setAttribute("aria-activedescendant",s),i.setAttribute("aria-activedescendant",s),r.setAttribute(d,"true")}});var g=function(){y(-1)},y=function(e,t){e!==l.start.row&&(l.start.row=l.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return l.start.row},o.addListener(n.container,"mouseout",function(){n.isMouseOver=!1,g()}),n.on("hide",g),n.on("changeSelection",g),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return typeof t=="string"?t:t&&t.value||""};var b=n.session.bgTokenizer;return b.$tokenizeRow=function(e){function s(e,n){e&&r.push({type:(t.className||"")+(n||""),value:e})}var t=n.data[e],r=[];if(!t)return r;typeof t=="string"&&(t={value:t});var i=t.caption||t.value||t.name,o=i.toLowerCase(),u=(n.filterText||"").toLowerCase(),a=0,f=0;for(var l=0;l<=u.length;l++)if(l!=f&&(t.matchMask&1<=c?r="bottom":r="top"),r==="top"?(h.bottom=e.top-this.$borderSize,h.top=h.bottom-c):r==="bottom"&&(h.top=e.top+t+this.$borderSize,h.bottom=h.top+c);var v=h.top>=0&&h.bottom<=a;if(!s&&!v)return!1;v?l.$maxPixelHeight=null:r==="top"?l.$maxPixelHeight=d:l.$maxPixelHeight=p,r==="top"?(o.style.top="",o.style.bottom=a+u-h.bottom+"px",n.isTopdown=!1):(o.style.top=h.top+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var m=e.left;return m+o.offsetWidth>f&&(m=f-o.offsetWidth),o.style.left=m+"px",o.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=r,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":undefined,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}return e}();a.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",!1),t.AcePopup=m,t.$singleLineEditor=v,t.getAriaId=c}),define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){var r="doc-tooltip ";for(var i=0;i=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(this.$elements||!this.editor)return;window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);var e=this.editor.container.parentNode,t=[];while(e)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var s={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(s.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,u=othis.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var u=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;if(this.exactMatch){if(t!==u.substr(0,t.length))continue e}else{var p=u.toLowerCase().indexOf(i);if(p>-1)l=p;else for(var d=0;d=0?m<0||v0&&(a===-1&&(l+=10),l+=h,f|=1<s)continue;l.range.start.row===a?u++:(a=l.range.start.row,u=0);if(u>200)continue;var c=l.range.clipRows(i,s);if(c.start.row===c.end.row&&c.start.column===c.end.column)continue;var h=c.toScreenRange(n);if(h.isEmpty()){o=n.getNextFoldLine(c.end.row,o),o&&o.end.row>c.end.row&&(i=o.end.row);continue}this.markerType==="fullLine"?t.drawFullLineMarker(e,h,l.className,r):h.isMultiLine()?this.markerType==="line"?t.drawMultiLineMarker(e,h,l.className,r):t.drawTextMarker(e,h,l.className,r):t.drawSingleLineMarker(e,h,l.className+" ace_br15",r)}},e}();r.prototype.MAX_MARKERS=1e4,t.MarkerGroup=r}),define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){function s(e,t){var n=e.getTextRange(r.fromPoints({row:0,column:0},t));return n.split(i).length-1}function o(e,t){var n=s(e,t),r=e.getValue().split(i),o=Object.create(null),u=r[n];return r.forEach(function(e,t){if(!e||e===u)return;var i=Math.abs(n-t),s=r.length-i;o[e]?o[e]=Math.max(s,o[e]):o[e]=s}),o}var r=e("../range").Range,i=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,r,i){var s=o(t,n),u=Object.keys(s);i(null,u.map(function(e){return{caption:e,value:e,score:s[e],meta:"local"}}))}}),define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../snippets").snippetManager,i=e("../autocomplete").Autocomplete,s=e("../config"),o=e("../lib/lang"),u=e("../autocomplete/util"),a=e("../marker_group").MarkerGroup,f=e("../autocomplete/text_completer"),l={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var s=e.session.getState(n.row),o=t.$mode.getCompletions(s,t,n,r);o=o.map(function(e){return e.completerId=l.id,e}),i(null,o)},id:"keywordCompleter"},c=function(e){var t={};return e.replace(/\${(\d+)(:(.*?))?}/g,function(e,n,r,i){return t[n]=i||""}).replace(/\$(\d+?)/g,function(e,n){return t[n]})},h={getCompletions:function(e,t,n,i,s){var o=[],u=t.getTokenAt(n.row,n.column);u&&u.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?o.push("html-tag"):o=r.getActiveScopes(e);var a=r.snippetMap,f=[];o.forEach(function(e){var t=a[e]||[];for(var n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;if(!i)continue;f.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+"\u21e5 ":"snippet",completerId:h.id})}},this),s(null,f)},getDocTooltip:function(e){e.snippet&&!e.docHTML&&(e.docHTML=["",o.escapeHTML(e.caption),"","
      ",o.escapeHTML(c(e.snippet))].join(""))},id:"snippetCompleter"},p=[h,f,l];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=f,t.keyWordCompleter=l,t.snippetCompleter=h;var d={name:"expandSnippet",exec:function(e){return r.expandWithTab(e)},bindKey:"Tab"},v=function(e,t){m(t.session.$mode)},m=function(e){typeof e=="string"&&(e=s.$modes[e]);if(!e)return;r.files||(r.files={}),g(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(m)},g=function(e,t){if(!t||!e||r.files[e])return;r.files[e]={},s.loadModule(t,function(t){if(!t)return;r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){m("ace/mode/"+e)}))})},y=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name==="backspace")n&&!u.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name==="insertstring"&&!n){b=e;var r=e.editor.$liveAutocompletionDelay;r?w.delay(r):E(e)}},b,w=o.delayedCall(function(){E(b)},0),E=function(e){var t=e.editor,n=u.getCompletionPrefix(t),r=e.args,s=u.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||s){var o=i.for(t);o.autoShown=!0,o.showPopup(t)}},S=e("../editor").Editor;e("../config").defineOptions(S.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(i.for(this),this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.on("afterExec",y)):this.commands.off("afterExec",y)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(d),this.on("changeMode",v),v(null,this)):(this.commands.removeCommand(d),this.off("changeMode",v))},value:!1}}),t.MarkerGroup=a}); (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/www/js/ace/ext-linking.js b/www/js/ace/ext-linking.js new file mode 100644 index 000000000..593593dee --- /dev/null +++ b/www/js/ace/ext-linking.js @@ -0,0 +1,8 @@ +define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("../editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1}); (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/www/js/ace/ext-modelist.js b/www/js/ace/ext-modelist.js new file mode 100644 index 000000000..d883ad317 --- /dev/null +++ b/www/js/ace/ext-modelist.js @@ -0,0 +1,8 @@ +define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i=c?r="bottom":r="top"),r==="top"?(h.bottom=e.top-this.$borderSize,h.top=h.bottom-c):r==="bottom"&&(h.top=e.top+t+this.$borderSize,h.bottom=h.top+c);var v=h.top>=0&&h.bottom<=a;if(!s&&!v)return!1;v?l.$maxPixelHeight=null:r==="top"?l.$maxPixelHeight=d:l.$maxPixelHeight=p,r==="top"?(o.style.top="",o.style.bottom=a+u-h.bottom+"px",n.isTopdown=!1):(o.style.top=h.top+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var m=e.left;return m+o.offsetWidth>f&&(m=f-o.offsetWidth),o.style.left=m+"px",o.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=r,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":undefined,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}return e}();a.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",!1),t.AcePopup=m,t.$singleLineEditor=v,t.getAriaId=c}),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(e,t,n){"use strict";function p(e){var t=(new Date).toLocaleString("en-us",e);return t.length==1?"0"+t:t}var r=e("./lib/dom"),i=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./lib/lang"),u=e("./range").Range,a=e("./range_list").RangeList,f=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,c=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var r=e.session.getTextRange();return n?r.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):r},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return c.getText&&c.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){var t=e.session.$mode||{};return t.lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};h.SELECTED_TEXT=h.SELECTION;var d=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=h}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var r={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var r=n[0];return r.fmtString=!0,r.guard=e.slice(1,-1),r.flag="",""},next:"formatString"};return e.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1&&(e=r),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,r){var i=t(e.substr(1));return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var r=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return e.length==2?e[1]:"\0"}).split("\0").map(function(e){return{value:e}});return n[0].choices=r,[r[0]]},next:"start"},r,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:r=="n"?e="\n":r=="t"?e=" ":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?"start":"",[r||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]=="+"&&(n[0].ifEnd=n[0]),e[1]=="?"&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";t=t.replace(/^TM_/,"");if(!this.variables.hasOwnProperty(t))return"";var r=this.variables[t];return typeof r=="function"&&(r=this.variables[t](e,t,n)),r==null?"":r},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,""));var s=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,o=this,u=e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);var t=o.resolveVariables(s,n),r="E";for(var i=0;i=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):o&&(n[o]=u)}}return t},e.prototype.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r},e}();i.implement(d.prototype,s);var v=function(e,t,n){function l(e){var t=[];for(var n=0;n1?(y=t[t.length-1].length,g+=t.length-1):y+=e.length,b+=e}else e&&(e.start?e.end={row:g,column:y}:e.start={row:g,column:y})}),{text:b,tabstops:a,tokens:u}},m=function(){function e(e){this.index=0,this.ranges=[],this.tabstops=[];if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.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)},e.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},e.prototype.onChange=function(e){var t=e.action[0]=="r",n=this.selectedTabstop||{},r=n.parents||{},i=this.tabstops.slice();for(var s=0;s2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(!this.selectedTabstop)return;var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();m.prototype.keyboardHandler=new f,m.prototype.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView()},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var g=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},y=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};r.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",!1),t.snippetManager=new d;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)}),define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,t,n){"use strict";var r=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){var r="doc-tooltip ";for(var i=0;i=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(this.$elements||!this.editor)return;window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);var e=this.editor.container.parentNode,t=[];while(e)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var s={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(s.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,u=othis.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t===n?!1:(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var u=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;if(this.exactMatch){if(t!==u.substr(0,t.length))continue e}else{var p=u.toLowerCase().indexOf(i);if(p>-1)l=p;else for(var d=0;d=0?m<0||v0&&(a===-1&&(l+=10),l+=h,f|=1<0?e=x():e=o.getValue();var t=m?m.getData(m.getRow()):e;t&&!t.error&&(E(),n.onAccept&&n.onAccept({value:e,item:t},o))}function E(){v.close(),r&&r(),p=null}function S(){if(n.getCompletions){var e;n.getPrefix&&(e=n.getPrefix(o));var t=n.getCompletions(o);m.setData(t,e),m.resize(!0)}}function x(){var e=m.getData(m.getRow());if(e&&!e.error)return e.value||e.caption||e}if(typeof t=="object")return d(e,"",t,n);if(p){var i=p;e=i.editor,i.close();if(i.name&&i.name==n.name)return}if(n.$type)return d[n.$type](e,r);var o=a();o.session.setUndoManager(new f);var h=s.buildDom(["div",{"class":"ace_prompt_container"+(n.hasDescription?" input-box-with-description":"")}]),v=c(e,h,E);h.appendChild(o.container),e&&(e.cmdLine=o,o.setOption("fontSize",e.getOption("fontSize"))),t&&o.setValue(t,1),n.selection&&o.selection.setRange({start:o.session.doc.indexToPosition(n.selection[0]),end:o.session.doc.indexToPosition(n.selection[1])});if(n.getCompletions){var m=new u;m.renderer.setStyle("ace_autocomplete_inline"),m.container.style.display="block",m.container.style.maxWidth="600px",m.container.style.width="100%",m.container.style.marginTop="3px",m.renderer.setScrollMargin(2,2,0,0),m.autoSelect=!1,m.renderer.$maxLines=15,m.setRow(-1),m.on("click",function(e){var t=m.getData(m.getRow());t.error||(o.setValue(t.value||t.name||t),b(),e.stop())}),h.appendChild(m.container),S()}if(n.$rules){var g=new l(n.$rules);o.session.bgTokenizer.setTokenizer(g)}n.placeholder&&o.setOption("placeholder",n.placeholder);if(n.hasDescription){var y=s.buildDom(["div",{"class":"ace_prompt_text_container"}]);s.buildDom(n.prompt||"Press 'Enter' to confirm or 'Escape' to cancel",y),h.appendChild(y)}v.setIgnoreFocusOut(n.ignoreFocusOut);var w={Enter:b,"Esc|Shift-Esc":function(){n.onCancel&&n.onCancel(o.getValue(),o),E()}};m&&Object.assign(w,{Up:function(e){m.goTo("up"),x()},Down:function(e){m.goTo("down"),x()},"Ctrl-Up|Ctrl-Home":function(e){m.goTo("start"),x()},"Ctrl-Down|Ctrl-End":function(e){m.goTo("end"),x()},Tab:function(e){m.goTo("down"),x()},PageUp:function(e){m.gotoPageUp(),x()},PageDown:function(e){m.gotoPageDown(),x()}}),o.commands.bindKeys(w),o.on("input",function(){n.onInput&&n.onInput(),S()}),o.resize(!0),m&&m.resize(!0),o.focus(),p={close:E,name:n.name,editor:e}}var r=e("../config").nls,i=e("../range").Range,s=e("../lib/dom"),o=e("../autocomplete").FilteredList,u=e("../autocomplete/popup").AcePopup,a=e("../autocomplete/popup").$singleLineEditor,f=e("../undomanager").UndoManager,l=e("../tokenizer").Tokenizer,c=e("./menu_tools/overlay_page").overlayPage,h=e("./modelist"),p;d.gotoLine=function(e,t){function n(e){return Array.isArray(e)||(e=[e]),e.map(function(e){var t=e.isBackwards?e.start:e.end,n=e.isBackwards?e.end:e.start,r=n.row,i=r+1+":"+n.column;return n.row==t.row?n.column!=t.column&&(i+=">:"+t.column):i+=">"+(t.row+1)+":"+t.column,i}).reverse().join(", ")}d(e,":"+n(e.selection.toJSON()),{name:"gotoLine",selection:[1,Number.MAX_VALUE],onAccept:function(t){var n=t.value,r=d.gotoLine._history;r||(d.gotoLine._history=r=[]),r.indexOf(n)!=-1&&r.splice(r.indexOf(n),1),r.unshift(n),r.length>20&&(r.length=20);var s=e.getCursorPosition(),o=[];n.replace(/^:/,"").split(/,/).map(function(t){function u(){var t=n[r++];if(!t)return;if(t[0]=="c"){var i=parseInt(t.slice(1))||0;return e.session.doc.indexToPosition(i)}var o=s.row,u=0;return/\d/.test(t)&&(o=parseInt(t)-1,t=n[r++]),t==":"&&(t=n[r++],/\d/.test(t)&&(u=parseInt(t)||0)),{row:o,column:u}}var n=t.split(/([<>:+-]|c?\d+)|[^c\d<>:+-]+/).filter(Boolean),r=0;s=u();var a=i.fromPoints(s,s);n[r]==">"?(r++,a.end=u()):n[r]=="<"&&(r++,a.start=u()),o.unshift(a)}),e.selection.fromJSON(o);var u=e.renderer.scrollTop;e.renderer.scrollSelectionIntoView(e.selection.anchor,e.selection.cursor,.5),e.renderer.animateScrolling(u)},history:function(){return d.gotoLine._history?d.gotoLine._history:[]},getCompletions:function(t){var n=t.getValue(),r=n.replace(/^:/,"").split(":"),i=Math.min(parseInt(r[0])||1,e.session.getLength())-1,s=e.session.getLine(i),o=n+" "+s;return[o].concat(this.history())},$rules:{start:[{regex:/\d+/,token:"string"},{regex:/[:,><+\-c]/,token:"keyword"}]}})},d.commands=function(e,t){function n(e){return(e||"").replace(/^./,function(e){return e.toUpperCase(e)}).replace(/[a-z][A-Z]/g,function(e){return e[0]+" "+e[1].toLowerCase(e)})}function i(t){var r=[],i={};return e.keyBinding.$handlers.forEach(function(e){var s=e.platform,o=e.byName;for(var u in o){var a=o[u].bindKey;typeof a!="string"&&(a=a&&a[s]||"");var f=o[u],l=f.description||n(f.name);Array.isArray(f)||(f=[f]),f.forEach(function(e){typeof e!="string"&&(e=e.name);var n=t.find(function(t){return t===e});n||(i[e]?i[e].key+="|"+a:(i[e]={key:a,command:e,description:l},r.push(i[e])))})}}),r}var s=["insertstring","inserttext","setIndentation","paste"],u=i(s);u=u.map(function(e){return{value:e.description,meta:e.key,command:e.command}}),d(e,"",{name:"commands",selection:[0,Number.MAX_VALUE],maxHistoryCount:5,onAccept:function(t){if(t.item){var n=t.item.command;this.addToHistory(t.item),e.execCommand(n)}},addToHistory:function(e){var t=this.history();t.unshift(e),delete e.message;for(var n=1;n0&&t.length>this.maxHistoryCount&&t.splice(t.length-1,1),d.commands.history=t},history:function(){return d.commands.history||[]},getPrefix:function(e){var t=e.getCursorPosition(),n=e.getValue();return n.substring(0,t.column)},getCompletions:function(e){function t(e,t){var n=JSON.parse(JSON.stringify(e)),r=new o(n);return r.filterCompletions(n,t)}function n(e,t){if(!t||!t.length)return e;var n=[];t.forEach(function(e){n.push(e.command)});var r=[];return e.forEach(function(e){n.indexOf(e.command)===-1&&r.push(e)}),r}var i=this.getPrefix(e),s=t(this.history(),i),a=n(u,s);a=t(a,i),s.length&&a.length&&(s[0].message=r("prompt.recently-used","Recently used"),a[0].message=r("prompt.other-commands","Other commands"));var f=s.concat(a);return f.length>0?f:[{value:r("prompt.no-matching-commands","No matching commands"),error:1}]}})},d.modes=function(e,t){var n=h.modes;n=n.map(function(e){return{value:e.caption,mode:e.name}}),d(e,"",{name:"modes",selection:[0,Number.MAX_VALUE],onAccept:function(t){if(t.item){var n="ace/mode/"+t.item.mode;e.session.setMode(n)}},getPrefix:function(e){var t=e.getCursorPosition(),n=e.getValue();return n.substring(0,t.column)},getCompletions:function(e){function t(e,t){var n=JSON.parse(JSON.stringify(e)),r=new o(n);return r.filterCompletions(n,t)}var r=this.getPrefix(e),i=t(n,r);return i.length>0?i:[{caption:"No mode matching",value:"No mode matching",error:1}]}})},s.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",!1),t.prompt=d}); (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/www/js/ace/ext-rtl.js b/www/js/ace/ext-rtl.js new file mode 100644 index 000000000..ae034299b --- /dev/null +++ b/www/js/ace/ext-rtl.js @@ -0,0 +1,8 @@ +define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";function s(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&n.column===0&&(t.session.$bidiHandler.isMoveLeftOperation&&n.row>0?t.getSelection().moveCursorTo(n.row-1,t.session.getLine(n.row-1).length):t.getSelection().isEmpty()?n.column+=1:n.setPosition(n.row,n.column+1))}function o(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function u(e,t){var n=t.session;n.$bidiHandler.currentRow=null;if(n.$bidiHandler.isRtlLine(e.start.row)&&e.action==="insert"&&e.lines.length>1)for(var r=e.start.row;rl)break;if(!c[0]){t.lastIndex=a+=i.skipEmptyMatch(o,a,n);if(a>=o.length)break}}}this.searchCounter.textContent=f("search-box.search-counter","$0 of $1",[s,r>l?l+"+":r])},e.prototype.findNext=function(){this.find(!0,!1)},e.prototype.findPrev=function(){this.find(!0,!0)},e.prototype.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},e.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},e.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},e.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},e.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},e.prototype.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=t,this.editor.$search.$options.regExp&&(e=i.escapeRegExp(e)),e!=undefined&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},e.prototype.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput},e}(),h=new u;h.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){if(e.editor.getReadOnly())return;e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),h.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]);var p=new u([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]);c.prototype.$searchBarKb=h,c.prototype.$closeSearchBarKb=p,t.SearchBox=c,t.Search=function(e,t){var n=e.searchBox||new c(e),r=e.session.selection.getRange(),i=r.isMultiLine()?"":e.session.getTextRange(r);n.show(i,t)}}); (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/www/js/ace/ext-settings_menu.js b/www/js/ace/ext-settings_menu.js new file mode 100644 index 000000000..1740de13a --- /dev/null +++ b/www/js/ace/ext-settings_menu.js @@ -0,0 +1,8 @@ +define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"],function(e,t,n){n.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/ext/menu_tools/overlay_page","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i=e("./settings_menu.css");r.importCssString(i,"settings_menu.css",!1),n.exports.overlayPage=function(t,n,r){function o(e){e.keyCode===27&&u()}function u(){if(!i)return;document.removeEventListener("keydown",o),i.parentNode.removeChild(i),t&&t.focus(),i=null,r&&r()}function a(e){s=e,e&&(i.style.pointerEvents="none",n.style.pointerEvents="auto")}var i=document.createElement("div"),s=!1;return i.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(t?"background-color: rgba(0, 0, 0, 0.3);":""),i.addEventListener("click",function(e){s||u()}),document.addEventListener("keydown",o),n.addEventListener("click",function(e){e.stopPropagation()}),i.appendChild(n),document.body.appendChild(i),t&&t.blur(),{close:u,setIgnoreFocusOut:a}}}),define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splitse)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i")}return this.textContent&&e.push(this.textContent),this.type!="fragment"&&e.push(""),e.join("")},e}(),l={createTextNode:function(e,t){return a(e)},createElement:function(e){return new f(e)},createFragment:function(){return new f("fragment")}},c=function(){this.config={},this.dom=l};c.prototype=i.prototype;var h=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",a=[];if(e.firstElementChild){var f=0;for(var l=0;l");return}e.push("")}var s=null,o={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"},u={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:s,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:s,useSoftTabs:s,showInvisibles:s},a=[];a.push("");for(var l in t.defaultOptions)a.push(""),a.push("");a.push("
      SettingValue
      ",o[l],""),f(a,l,u[l],i.getOption(l)),a.push("
      "),e.innerHTML=a.join("");var c=function(e){var t=e.currentTarget;i.setOption(t.title,t.value)},h=function(e){var t=e.currentTarget;i.setOption(t.title,t.checked)},p=e.getElementsByTagName("select");for(var d=0;d0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f}while(up.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1){if(m==1||di+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t&&t.trimEmpty?-1:0,s=[],o=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach(function(e,t,n){var r=n[t+1];if(r&&r.cursor.row==e.cursor.row)return;s.push(e.cursor)}):s.push(e.selection.getCursor()),o=0);var u=s[o]&&s[o].row;for(var a=0,f=r.length;ai&&(c=s[o].column),o++,u=s[o]?s[o].row:-1),c>i&&n.removeInLine(a,c,l.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t==" "?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c30&&this.$data.shift()},append:function(e){var t=this.$data.length-1,n=this.$data[t]||"";e&&(n+=e),n&&(this.$data[t]=n)},get:function(e){return e=e||1,this.$data.slice(this.$data.length-e,this.$data.length).reverse().join("\n")},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),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/www/js/ace/keybinding-sublime.js b/www/js/ace/keybinding-sublime.js new file mode 100644 index 000000000..3d1e5ff49 --- /dev/null +++ b/www/js/ace/keybinding-sublime.js @@ -0,0 +1,8 @@ +define("ace/keyboard/sublime",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){"use strict";function i(e,t,n){function f(e){return e?/\s/.test(e)?"s":e=="_"?"_":e.toUpperCase()==e&&e.toLowerCase()!=e?"W":e.toUpperCase()!=e&&e.toLowerCase()==e?"w":"o":"-"}var r=e.selection,i=r.lead.row,s=r.lead.column,o=e.session.getLine(i);if(!o[s+t]){var u=(n?"selectWord":"moveCursorShortWord")+(t==1?"Right":"Left");return e.selection[u]()}t==-1&&s--;while(o[s]){var a=f(o[s])+f(o[s+t]);s+=t;if(t==1){if(a=="WW"&&f(o[s+1])=="w")break}else{if(a=="wW"){if(f(o[s-1])=="W"){s-=1;break}continue}if(a=="Ww")break}if(/w[s_oW]|_[sWo]|o[s_wW]|s[W]|W[so]/.test(a))break}t==-1&&s++,n?e.selection.moveCursorTo(i,s):e.selection.moveTo(i,s)}var r=e("../keyboard/hash_handler").HashHandler;t.handler=new r,t.handler.addCommands([{name:"find_all_under",exec:function(e){e.selection.isEmpty()&&e.selection.selectWord(),e.findAll()},readOnly:!0},{name:"find_under",exec:function(e){e.selection.isEmpty()&&e.selection.selectWord(),e.findNext()},readOnly:!0},{name:"find_under_prev",exec:function(e){e.selection.isEmpty()&&e.selection.selectWord(),e.findPrevious()},readOnly:!0},{name:"find_under_expand",exec:function(e){e.selectMore(1,!1,!0)},scrollIntoView:"animate",readOnly:!0},{name:"find_under_expand_skip",exec:function(e){e.selectMore(1,!0,!0)},scrollIntoView:"animate",readOnly:!0},{name:"delete_to_hard_bol",exec:function(e){var t=e.selection.getCursor();e.session.remove({start:{row:t.row,column:0},end:t})},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"delete_to_hard_eol",exec:function(e){var t=e.selection.getCursor();e.session.remove({start:t,end:{row:t.row,column:Infinity}})},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"moveToWordStartLeft",exec:function(e){e.selection.moveCursorLongWordLeft(),e.clearSelection()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"moveToWordEndRight",exec:function(e){e.selection.moveCursorLongWordRight(),e.clearSelection()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"selectToWordStartLeft",exec:function(e){var t=e.selection;t.$moveSelection(t.moveCursorLongWordLeft)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"selectToWordEndRight",exec:function(e){var t=e.selection;t.$moveSelection(t.moveCursorLongWordRight)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"selectSubWordRight",exec:function(e){i(e,1,!0)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectSubWordLeft",exec:function(e){i(e,-1,!0)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"moveSubWordRight",exec:function(e){i(e,1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"moveSubWordLeft",exec:function(e){i(e,-1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0}]),[{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:!0}},{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(e){var n=t.handler.commands[e.name];n&&(n.bindKey=e.bindKey),t.handler.bindKey(e.bindKey,n||e.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/www/js/ace/keybinding-vim.js b/www/js/ace/keybinding-vim.js new file mode 100644 index 000000000..9560c7de5 --- /dev/null +++ b/www/js/ace/keybinding-vim.js @@ -0,0 +1,8 @@ +define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,t,n){"use strict";function i(e,t){function m(e,t,n){if(e.lengthn)return{start:o.index,end:o.index+o[2].length};if(s&&s[2])return u=t+s[2].length,{start:u,end:u+s[3].length}}var n=t.column||e.getOption("printMarginColumn"),i=t.allowMerge!=0,s=Math.min(t.startRow,t.endRow),o=Math.max(t.startRow,t.endRow),u=e.session;while(s<=o){var a=u.getLine(s);if(a.length>n){var f=m(a,n,5);if(f){var l=/^\s*/.exec(a)[0];u.replace(new r(s,f.start,s,f.end),"\n"+l)}o++}else if(i&&/\S/.test(a)&&s!=o){var c=u.getLine(s+1);if(c&&/\S/.test(c)){var h=a.replace(/\s+$/,""),p=c.replace(/^\s+/,""),d=h+" "+p,f=m(d,n,5);if(f&&f.start>h.length||d.length"+t(e.head):Array.isArray(e)?"["+e.map(function(e){return t(e)})+"]":JSON.stringify(e)}var e="";for(var n=0;n=n.ch-1){var r=e.getLine(t.line),i=r.charCodeAt(t.ch);55296<=i&&i<=55551&&(n.ch+=1)}return{start:t,end:n}}function C(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),m.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",cr),Y(e),m.on(e.getInputField(),"paste",L(e))}function k(e){e.setOption("disableInput",!1),e.off("cursorActivity",cr),m.off(e.getInputField(),"paste",L(e)),e.state.vim=null,Wn&&clearTimeout(Wn)}function L(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(Mt(e.getCursor(),0,1)),kt.enterInsertMode(e,{},t))}),t.onPasteFn}function j(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function F(e){return/^[a-z]$/.test(e)}function I(e){return"()[]{}".indexOf(e)!=-1}function q(e){return A.test(e)}function R(e){return H.test(e)}function U(e){return/^\s*$/.test(e)}function z(e){return".?!".indexOf(e)!=-1}function W(e,t){for(var n=0;n|./gi,o;while(o=s.exec(t)){var u=o[0],a=i.insertMode;if(st){ot(u);continue}var f=nt.handleKey(e,u,"mapping");if(!f&&a&&i.insertMode){if(u[0]=="<"){var l=u.toLowerCase().slice(1,-1),c=l.split("-");l=c.pop()||"";if(l=="lt")u="<";else if(l=="space")u=" ";else if(l=="cr")u="\n";else{if(lt.hasOwnProperty(l)){u=lt[l],mr(e,u);continue}u=u[0],s.lastIndex=o.index+1}}e.replaceSelection(u)}}}finally{rt.pop(),it=rt.length?r:!1;if(!rt.length&&st){var h=st;st=null,qn(e,h)}}}function ct(e,t){var n=e.key;if(ft[n])return;n.length>1&&n[0]=="n"&&(n=n.replace("Numpad","")),n=at[n]||n;var r="";e.ctrlKey&&(r+="C-"),e.altKey&&(r+="A-"),e.metaKey&&(r+="M-"),m.isMac&&e.altKey&&!e.metaKey&&!e.ctrlKey&&(r=r.slice(2)),(r||n.length>1)&&e.shiftKey&&(r+="S-");if(t&&!t.expectLiteralNext&&n.length==1)if(N.keymap&&n in N.keymap){if(N.remapCtrl!=0||!r)n=N.keymap[n]}else if(n.charCodeAt(0)>255){var i=e.code&&e.code.slice(-1)||"";e.shiftKey||(i=i.toLowerCase()),i&&(n=i)}return r+=n,r.length>1&&(r="<"+r+">"),r}function ht(e,t){N.string!==e&&(N=pt(e)),N.remapCtrl=t}function pt(e){function n(e){return e.split(/\\?(.)/).filter(Boolean)}var t={};return e?(e.split(/((?:[^\\,]|\\.)+),/).map(function(e){if(!e)return;var r=e.split(/((?:[^\\;]|\\.)+);/);if(r.length==3){var i=n(r[1]),s=n(r[2]);if(i.length!==s.length)return;for(var o=0;oa&&(l=-1),a+=l,a>u&&(a-=2)}return new w(s,a)}function Ot(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Mt(e,t,n){return typeof t=="object"&&(n=t.ch,t=t.line),new w(e.line+t,e.ch+n)}function _t(e,t,n,r){r.operator&&(n="operatorPending");var i,s=[],o=[],u=it?t.length-x:0;for(var a=u;a",r=t.slice(-10)=="";if(n||r){var i=t.length-(n?11:10),s=e.slice(0,i),o=t.slice(0,i);return s==o&&e.length>i?"full":o.indexOf(s)==0?"partial":!1}return e==t?"full":t.indexOf(e)==0?"partial":!1}function Pt(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" ";break;default:n=""}return n}function Ht(e,t,n){return function(){for(var r=0;r2&&(t=It.apply(undefined,Array.prototype.slice.call(arguments,1))),Ft(e,t)?e:t}function qt(e,t){return arguments.length>2&&(t=qt.apply(undefined,Array.prototype.slice.call(arguments,1))),Ft(e,t)?t:e}function Rt(e,t,n){var r=Ft(e,t),i=Ft(t,n);return r&&i}function Ut(e,t){return e.getLine(t).length}function zt(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Wt(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Xt(e,t,n){var r=Ut(e,t),i=(new Array(n-r+1)).join(" ");e.setCursor(new w(t,r)),e.replaceRange(i,e.getCursor())}function Vt(e,t){var n=[],r=e.listSelections(),i=Bt(e.clipPos(t)),s=!jt(t,i),o=e.getCursor("head"),u=Jt(r,o),a=jt(r[u].head,r[u].anchor),f=r.length-1,l=f-u>u?f:0,c=r[l].anchor,h=Math.min(c.line,i.line),p=Math.max(c.line,i.line),d=c.ch,v=i.ch,m=r[l].head.ch-d,g=v-d;m>0&&g<=0?(d++,s||v--):m<0&&g>=0?(d--,a||v++):m<0&&g==-1&&(d--,v++);for(var y=h;y<=p;y++){var b={anchor:new w(y,d),head:new w(y,v)};n.push(b)}return e.setSelections(n),t.ch=v,c.ch=d,c}function $t(e,t,n){var r=[];for(var i=0;ia&&(i.line=a),i.ch=Ut(e,i.line)}else i.ch=0,s.ch=Ut(e,s.line);return{ranges:[{anchor:s,head:i}],primary:0}}if(n=="block"){var f=Math.min(s.line,i.line),l=s.ch,c=Math.max(s.line,i.line),h=i.ch;l0&&s&&U(s);s=i.pop())n.line--,n.ch=0;s?(n.line--,n.ch=Ut(e,n.line)):n.ch=0}}function rn(e,t,n){t.ch=0,n.ch=0,n.line++}function sn(e){if(!e)return 0;var t=e.search(/\S/);return t==-1?e.length:t}function on(e,t,n){var r=t.inclusive,i=t.innerWord,s=t.bigWord,o=t.noSymbol,u=t.multiline,a=n||en(e),f=e.getLine(a.line),l=f,c=a.line,h=c,p=a.ch,d,v=o?O[0]:M[0];if(i&&/\s/.test(f.charAt(p)))v=function(e){return/\s/.test(e)};else{while(!v(f.charAt(p))){p++;if(p>=f.length){if(!u)return null;p--,d=pn(e,a,!0,s,!0);break}}s?v=M[0]:(v=O[0],v(f.charAt(p))||(v=O[1]))}var m=p,g=p;while(v(f.charAt(g))&&g>=0)g--;g++;if(d)m=d.to,h=d.line,l=e.getLine(h),!l&&m==0&&m++;else while(v(f.charAt(m))&&m0)g--;!g&&!b&&(g=E)}}return{start:new w(c,g),end:new w(h,m)}}function un(e,t,n){var r=t;if(!m.findMatchingTag||!m.findEnclosingTag)return{start:r,end:r};var i=m.findMatchingTag(e,t)||m.findEnclosingTag(e,t);return!i||!i.open||!i.close?{start:r,end:r}:n?{start:i.open.from,end:i.close.to}:{start:i.open.to,end:i.close.from}}function an(e,t,n){jt(t,n)||Z.jumpList.add(e,t,n)}function fn(e,t){Z.lastCharacterSearch.increment=e,Z.lastCharacterSearch.forward=t.forward,Z.lastCharacterSearch.selectedCharacter=t.selectedCharacter}function hn(e,t,n,r){var i=Bt(e.getCursor()),s=n?1:-1,o=n?e.lineCount():-1,u=i.ch,a=i.line,f=e.getLine(a),l={lineText:f,nextCh:f.charAt(u),lastCh:null,index:u,symb:r,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[r],forward:n,depth:0,curMoveThrough:!1},c=ln[r];if(!c)return i;var h=cn[c].init,p=cn[c].isComplete;h&&h(l);while(a!==o&&t){l.index+=s,l.nextCh=l.lineText.charAt(l.index);if(!l.nextCh){a+=s,l.lineText=e.getLine(a)||"";if(s>0)l.index=0;else{var d=l.lineText.length;l.index=d>0?d-1:0}l.nextCh=l.lineText.charAt(l.index)}p(l)&&(i.line=a,i.ch=l.index,t--)}return l.nextCh||l.curMoveThrough?new w(a,l.index):i}function pn(e,t,n,r,i){var s=t.line,o=t.ch,u=e.getLine(s),a=n?1:-1,f=r?M:O;if(i&&u==""){s+=a,u=e.getLine(s);if(!j(e,s))return null;o=n?0:u.length}for(;;){if(i&&u=="")return{from:0,to:0,line:s};var l=a>0?u.length:-1,c=l,h=l;while(o!=l){var p=!1;for(var d=0;d0?0:u.length}}function dn(e,t,n,r,i,s){var o=Bt(t),u=[];(r&&!i||!r&&i)&&n++;var a=!r||!i;for(var f=0;f0?1:-1;var n=e.ace.session.getFoldLine(t);n&&t+r>n.start.row&&t+r0?n.end.row:n.start.row)-t)}var s=t.line,o=e.firstLine(),u=e.lastLine(),a,f,l=s;if(r){while(o<=l&&l<=u&&n>0)p(l),h(l,r)&&n--,l+=r;return new w(l,0)}var d=e.state.vim;if(d.visualLine&&h(s,1,!0)){var v=d.sel.anchor;h(v.line,-1,!0)&&(!i||v.line!=s)&&(s+=1)}var m=c(s);for(l=s;l<=u&&n;l++)h(l,1,!0)&&(!i||c(l)!=m)&&n--;f=new w(l,0),l>u&&!m?m=!0:i=!1;for(l=s;l>o;l--)if(!i||c(l)==m||l==s)if(h(l,-1,!0))break;return a=new w(l,0),{start:a,end:f}}function En(e,t,n,r,i){function s(e){e.pos+e.dir<0||e.pos+e.dir>=e.line.length?e.line=null:e.pos+=e.dir}function o(e,t,n,r){var o=e.getLine(t),u={line:o,ln:t,pos:n,dir:r};if(u.line==="")return{ln:u.ln,pos:u.pos};var a=u.pos;s(u);while(u.line!==null){a=u.pos;if(z(u.line[u.pos])){if(!i)return{ln:u.ln,pos:u.pos+1};s(u);while(u.line!==null){if(!U(u.line[u.pos]))break;a=u.pos,s(u)}return{ln:u.ln,pos:a+1}}s(u)}return{ln:u.ln,pos:a+1}}function u(e,t,n,r){var o=e.getLine(t),u={line:o,ln:t,pos:n,dir:r};if(u.line==="")return{ln:u.ln,pos:u.pos};var a=u.pos;s(u);while(u.line!==null){if(!U(u.line[u.pos])&&!z(u.line[u.pos]))a=u.pos;else if(z(u.line[u.pos]))return i?U(u.line[u.pos+1])?{ln:u.ln,pos:u.pos+1}:{ln:u.ln,pos:a}:{ln:u.ln,pos:a};s(u)}return u.line=o,i&&U(u.line[u.pos])?{ln:u.ln,pos:u.pos}:{ln:u.ln,pos:a}}var a={ln:t.line,pos:t.ch};while(n>0)r<0?a=u(e,a.ln,a.pos,r):a=o(e,a.ln,a.pos,r),n--;return new w(a.ln,a.pos)}function Sn(e,t,n,r){function i(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){t.ln+=t.dir;if(!j(e,t.ln)){t.line=null,t.ln=null,t.pos=null;return}t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function s(e,t,n,r){var s=e.getLine(t),o=s==="",u={line:s,ln:t,pos:n,dir:r},a={ln:u.ln,pos:u.pos},f=u.line==="";i(e,u);while(u.line!==null){a.ln=u.ln,a.pos=u.pos;if(u.line===""&&!f)return{ln:u.ln,pos:u.pos};if(o&&u.line!==""&&!U(u.line[u.pos]))return{ln:u.ln,pos:u.pos};z(u.line[u.pos])&&!o&&(u.pos===u.line.length-1||U(u.line[u.pos+1]))&&(o=!0),i(e,u)}var s=e.getLine(a.ln);a.pos=0;for(var l=s.length-1;l>=0;--l)if(!U(s[l])){a.pos=l;break}return a}function o(e,t,n,r){var s=e.getLine(t),o={line:s,ln:t,pos:n,dir:r},u={ln:o.ln,pos:null},a=o.line==="";i(e,o);while(o.line!==null){if(o.line===""&&!a)return u.pos!==null?u:{ln:o.ln,pos:o.pos};if(!(!z(o.line[o.pos])||u.pos===null||o.ln===u.ln&&o.pos+1===u.pos))return u;o.line!==""&&!U(o.line[o.pos])&&(a=!1,u={ln:o.ln,pos:o.pos}),i(e,o)}var s=e.getLine(u.ln);u.pos=0;for(var f=0;f0)r<0?u=o(e,u.ln,u.pos,r):u=s(e,u.ln,u.pos,r),n--;return new w(u.ln,u.pos)}function xn(e,t,n,r){var i=t,s,o,u={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],a={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],f=e.getLine(i.line).charAt(i.ch),l=f===a?1:0;s=e.scanForBracket(new w(i.line,i.ch+l),-1,undefined,{bracketRegex:u}),o=e.scanForBracket(new w(i.line,i.ch+l),1,undefined,{bracketRegex:u});if(!s||!o)return null;s=s.pos,o=o.pos;if(s.line==o.line&&s.ch>o.ch||s.line>o.line){var c=s;s=o,o=c}return r?o.ch+=1:s.ch+=1,{start:s,end:o}}function Tn(e,t,n,r){var i=Bt(t),s=e.getLine(i.line),o=s.split(""),u,a,f,l,c=o.indexOf(n);if(i.ch-1&&!u;f--)o[f]==n&&(u=f+1);if(u&&!a)for(f=u,l=o.length;f=t&&e<=n:e==t}function Qn(e){var t=e.ace.renderer;return{top:t.getFirstFullyVisibleRow(),bottom:t.getLastFullyVisibleRow()}}function Gn(e,t,n){if(n=="'"||n=="`")return Z.jumpList.find(e,-1)||new w(0,0);if(n==".")return Yn(e);var r=t.marks[n];return r&&r.find()}function Yn(e){if(e.getLastEditEnd)return e.getLastEditEnd();var t=e.doc.history.done;for(var n=t.length;n--;)if(t[n].changes)return Bt(t[n].changes[0].to)}function nr(e,t,n,r,i,s,o,u,a){function p(){e.operation(function(){while(!f)d(),g();y()})}function d(){var t=e.getRange(s.from(),s.to()),n=t.replace(o,u),r=s.to().line;s.replace(n),c=s.to().line,i+=c-r,h=c":case"":case"":y(r)}return f&&y(r),!0}e.state.vim.exMode=!0;var f=!1,l,c,h;g();if(f){Fn(e,"No matches for "+o.source);return}if(!t){p(),a&&a();return}qn(e,{prefix:jn("span","replace with ",jn("strong",u)," (y/n/a/q/l)"),onKeyDown:b})}function rr(e,t){var n=e.state.vim,r=Z.macroModeState,i=Z.registerController.getRegister("."),s=r.isPlaying,o=r.lastInsertModeChanges;s||(e.off("change",lr),n.insertEnd&&n.insertEnd.clear(),n.insertEnd=null,m.off(e.getInputField(),"keydown",dr)),!s&&n.insertModeRepeat>1&&(vr(e,n,n.insertModeRepeat-1,!0),n.lastEditInputState.repeatOverride=n.insertModeRepeat),delete n.insertModeRepeat,n.insertMode=!1,t||e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),i.setText(o.changes.join("")),m.signal(e,"vim-mode-change",{mode:"normal"}),r.isRecording&&ar(r)}function ir(e){S.unshift(e)}function sr(e,t,n,r,i){var s={keys:e,type:t};s[t]=n,s[t+"Args"]=r;for(var o in i)s[o]=i[o];ir(s)}function or(e,t,n,r){var i=Z.registerController.getRegister(r);if(r==":"){i.keyBuffer[0]&&tr.processCommand(e,i.keyBuffer[0]),n.isPlaying=!1;return}var s=i.keyBuffer,o=0;n.isPlaying=!0,n.replaySearchQueries=i.searchQueries.slice(0);for(var u=0;u|<\w+>|./.exec(a),l=f[0],a=a.substring(f.index+l.length),nt.handleKey(e,l,"macro");if(t.insertMode){var c=i.insertModeChanges[o++].changes;Z.macroModeState.lastInsertModeChanges.changes=c,gr(e,c,1),rr(e)}}}n.isPlaying=!1}function ur(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=Z.registerController.getRegister(n);r&&r.pushText(t)}function ar(e){if(e.isPlaying)return;var t=e.latestRegister,n=Z.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}function fr(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=Z.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}function lr(e,t){var n=Z.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying){var i=e.state.vim;while(t){r.expectCursorActivityForChange=!0;if(r.ignoreCount>1)r.ignoreCount--;else if(t.origin=="+input"||t.origin=="paste"||t.origin===undefined){var s=e.listSelections().length;s>1&&(r.ignoreCount=s);var o=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1);if(o)if(e.state.overwrite&&!/\n/.test(o))r.changes.push([o]);else{if(o.length>1){var u=i&&i.insertEnd&&i.insertEnd.find(),a=e.getCursor();if(u&&u.line==a.line){var f=u.ch-a.ch;f>0&&f",qt(i,r))}else!t.insertMode&&!n&&(t.lastHPos=e.getCursor().ch)}function pr(e,t){this.keyName=e,this.key=t.key,this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.shiftKey=t.shiftKey}function dr(e){var t=Z.macroModeState,n=t.lastInsertModeChanges,r=m.keyName?m.keyName(e):e.key;if(!r)return;if(r.indexOf("Delete")!=-1||r.indexOf("Backspace")!=-1)n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new pr(r,e))}function vr(e,t,n,r){function u(){s?Et.processAction(e,t,t.lastEditActionCommand):Et.evalInput(e,t)}function a(n){if(i.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;gr(e,r.changes,n)}}var i=Z.macroModeState;i.isPlaying=!0;var s=!!t.lastEditActionCommand,o=t.inputState;t.inputState=t.lastEditInputState;if(s&&t.lastEditActionCommand.interlaceInsertRepeat)for(var f=0;f1&&t[0]=="n"&&(t=t.replace("numpad","")),t=yr[t]||t;var i="";n.ctrlKey&&(i+="C-"),n.altKey&&(i+="A-"),(i||t.length>1)&&n.shiftKey&&(i+="S-");if(r&&!r.expectLiteralNext&&t.length==1)if(N.keymap&&t in N.keymap){if(N.remapCtrl!==!1||!i)t=N.keymap[t]}else if(t.charCodeAt(0)>255){var s=n.code&&n.code.slice(-1)||"";n.shiftKey||(s=s.toLowerCase()),s&&(t=s)}return i+=t,i.length>1&&(i="<"+i+">"),i}function Er(e){var t=new e.constructor;return Object.keys(e).forEach(function(n){if(n=="insertEnd")return;var r=e[n];Array.isArray(r)?r=r.slice():r&&typeof r=="object"&&r.constructor!=Object&&(r=Er(r)),t[n]=r}),e.sel&&(t.sel={head:e.sel.head&&Bt(e.sel.head),anchor:e.sel.anchor&&Bt(e.sel.anchor)}),t}function Sr(e,t,n){var r=!1,i=nt.maybeInitVimState_(e),s=i.visualBlock||i.wasInVisualBlock,o=e.ace.inMultiSelectMode;i.wasInVisualBlock&&!o?i.wasInVisualBlock=!1:o&&i.visualBlock&&(i.wasInVisualBlock=!0);if(t==""&&!i.insertMode&&!i.visualMode&&o)e.ace.exitMultiSelectMode();else if(s||!o||e.ace.inVirtualSelectionMode)r=nt.handleKey(e,t,n);else{var u=Er(i),a=i.inputState.changeQueueList||[];e.operation(function(){e.curOp.isVimOp=!0;var s=0;e.ace.forEachSelection(function(){var i=e.ace.selection;e.state.vim.lastHPos=i.$desiredColumn==null?i.lead.column:i.$desiredColumn,e.state.vim.inputState.changeQueue=a[s];var o=e.getCursor("head"),f=e.getCursor("anchor"),l=Ft(o,f)?0:-1,c=Ft(o,f)?-1:0;o=Mt(o,0,l),f=Mt(f,0,c),e.state.vim.sel.head=o,e.state.vim.sel.anchor=f,r=wr(e,t,n),i.$desiredColumn=e.state.vim.lastHPos==-1?null:e.state.vim.lastHPos,e.ace.inVirtualSelectionMode&&(a[s]=e.state.vim.inputState.changeQueue),e.virtualSelectionMode()&&(e.state.vim=Er(u)),s++}),e.curOp.cursorActivity&&!r&&(e.curOp.cursorActivity=!1),i.status=e.state.vim.status,e.state.vim=i,i.inputState.changeQueueList=a,i.inputState.changeQueue=null},!0)}return r&&!i.visualMode&&!i.insert&&i.visualMode!=e.somethingSelected()&&hr(e,i,!0),r}function Tr(e,t){t.off("beforeEndOperation",Tr);var n=t.state.cm.vimCmd;n&&t.execCommand(n.exec?n:n.name,n.args),t.curOp=t.prevOp}var i=e("../range").Range,s=e("../lib/event_emitter").EventEmitter,o=e("../lib/dom"),u=e("../lib/oop"),a=e("../lib/keys"),f=e("../lib/event"),l=e("../search").Search,c=e("../lib/useragent"),h=e("../search_highlight").SearchHighlight,p=e("../commands/multi_select_commands"),d=e("../mode/text").Mode.prototype.tokenRe,v=e("../ext/hardwrap").hardWrap;e("../multi_select");var m=function(e){this.ace=e,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)};m.Pos=function(e,t){if(!(this instanceof w))return new w(e,t);this.line=e,this.ch=t},m.defineOption=function(e,t,n){},m.commands={redo:function(e){e.ace.redo()},undo:function(e){e.ace.undo()},newlineAndIndent:function(e){e.ace.insert("\n")},goLineLeft:function(e){e.ace.selection.moveCursorLineStart()},goLineRight:function(e){e.ace.selection.moveCursorLineEnd()}},m.keyMap={},m.addClass=m.rmClass=function(){},m.e_stop=m.e_preventDefault=f.stopEvent,m.keyName=function(e){var t=a[e.keyCode]||e.key||"";return t.length==1&&(t=t.toUpperCase()),t=f.getModifierString(e).replace(/(^|-)\w/g,function(e){return e.toUpperCase()})+t,t},m.keyMap["default"]=function(e){return function(t){var n=t.ace.commands.commandKeyBinding[e.toLowerCase()];return n&&t.ace.execCommand(n)!==!1}},m.lookupKey=function Nr(e,t,n){t||(t="default"),typeof t=="string"&&(t=m.keyMap[t]||m.keyMap["default"]);var r=typeof t=="function"?t(e):t[e];if(r===!1)return"nothing";if(r==="...")return"multi";if(r!=null&&n(r))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return Nr(e,t.fallthrough,n);for(var i=0;i0){a.row+=s,a.column+=a.row==r.row?o:0;continue}!t&&l<=0&&(a.row=n.row,a.column=n.column,l===0&&(a.bias=1))}};var e=function(e,t,n,r){this.cm=e,this.id=t,this.row=n,this.column=r,e.marks[this.id]=this};e.prototype.clear=function(){delete this.cm.marks[this.id]},e.prototype.find=function(){return y(this)},this.setBookmark=function(t,n){var r=new e(this,this.$uid++,t.line,t.ch);if(!n||!n.insertLeft)r.$insertRight=!0;return this.marks[r.id]=r,r},this.moveH=function(e,t){if(t=="char"){var n=this.ace.selection;n.clearSelection(),n.moveCursorBy(0,e)}},this.findPosV=function(e,t,n,r){if(n=="page"){var i=this.ace.renderer,s=i.layerConfig;t*=Math.floor(s.height/s.lineHeight),n="line"}if(n=="line"){var o=this.ace.session.documentToScreenPosition(e.line,e.ch);r!=null&&(o.column=r),o.row+=t,o.row=Math.min(Math.max(0,o.row),this.ace.session.getScreenLength()-1);var u=this.ace.session.screenToDocumentPosition(o.row,o.column);return y(u)}debugger},this.charCoords=function(e,t){if(t=="div"||!t){var n=this.ace.session.documentToScreenPosition(e.line,e.ch);return{left:n.column,top:n.row}}if(t=="local"){var r=this.ace.renderer,n=this.ace.session.documentToScreenPosition(e.line,e.ch),i=r.layerConfig.lineHeight,s=r.layerConfig.characterWidth,o=i*n.row;return{left:n.column*s,top:o,bottom:o+i}}},this.coordsChar=function(e,t){var n=this.ace.renderer;if(t=="local"){var r=Math.max(0,Math.floor(e.top/n.lineHeight)),i=Math.max(0,Math.floor(e.left/n.characterWidth)),s=n.session.screenToDocumentPosition(r,i);return y(s)}if(t=="div")throw"not implemented"},this.getSearchCursor=function(e,t,n){var r=!1,i=!1;e instanceof RegExp&&!e.global&&(r=!e.ignoreCase,e=e.source,i=!0),e=="\\n"&&(e="\n",i=!1);var s=new l;t.ch==undefined&&(t.ch=Number.MAX_VALUE);var o={row:t.line,column:t.ch},u=this,a=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){s.setOptions({needle:e,caseSensitive:r,wrap:!1,backwards:t,regExp:i,start:a||o});var n=s.find(u.ace.session);return a=n,a&&[!a.isEmpty()]},from:function(){return a&&y(a.start)},to:function(){return a&&y(a.end)},replace:function(e){a&&(a.end=u.ace.session.doc.replace(a,e))}}},this.scrollTo=function(e,t){var n=this.ace.renderer,r=n.layerConfig,i=r.maxHeight;i-=(n.$size.scrollerHeight-n.lineHeight)*n.$scrollPastEnd,t!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(t,i))),e!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(e,r.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(e,t){if(e){var n=this.ace.renderer,r={top:0,bottom:t};n.scrollCursorIntoView(g(e),n.lineHeight*2/n.$size.scrollerHeight,r)}},this.getLine=function(e){return this.ace.session.getLine(e)},this.getRange=function(e,t){return this.ace.session.getTextRange(new i(e.line,e.ch,t.line,t.ch))},this.replaceRange=function(e,t,n){n||(n=t);var r=new i(t.line,t.ch,n.line,n.ch);return this.ace.session.$clipRangeToDocument(r),this.ace.session.replace(r,e)},this.replaceSelection=this.replaceSelections=function(e){var t=Array.isArray(e)&&e,n=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(n.getRange(),t?e[0]||"":e);return}n.inVirtualSelectionMode=!0;var r=n.rangeList.ranges;r.length||(r=[this.ace.multiSelect.getRange()]);for(var i=r.length;i--;)this.ace.session.replace(r[i],t?e[i]||"":e);n.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(e){return this.getRange(e.anchor,e.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var t={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(e,n){this.state[e]=n;switch(e){case"indentWithTabs":e=t[e],n=!n;break;case"keyMap":this.state.$keyMap=n;return;default:e=t[e]}e&&this.ace.setOption(e,n)},this.getOption=function(e){var n,r=t[e];r&&(n=this.ace.getOption(r));switch(e){case"indentWithTabs":return e=t[e],!n;case"keyMap":return this.state.$keyMap||"vim"}return r?n:this.state[e]},this.toggleOverwrite=function(e){return this.state.overwrite=e,this.ace.setOverwrite(e)},this.addOverlay=function(e){if(!this.$searchHighlight||!this.$searchHighlight.session){var t=new h(null,"ace_highlight-marker","text"),n=this.ace.session.addDynamicMarker(t);t.id=n.id,t.session=this.ace.session,t.destroy=function(e){t.session.off("change",t.updateOnChange),t.session.off("changeEditor",t.destroy),t.session.removeMarker(t.id),t.session=null},t.updateOnChange=function(e){var n=e.start.row;n==e.end.row?t.cache[n]=undefined:t.cache.splice(n,t.cache.length)},t.session.on("changeEditor",t.destroy),t.session.on("change",t.updateOnChange)}var r=new RegExp(e.query.source,"gmi");this.$searchHighlight=e.highlight=t,this.$searchHighlight.setRegexp(r),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(e){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var e=this.ace.renderer,t=e.layerConfig;return{left:e.scrollLeft,top:e.scrollTop,height:t.maxHeight,width:t.width,clientHeight:t.height,clientWidth:t.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(e){return this.ace.setValue(e,-1)},this.getTokenTypeAt=function(e){var t=this.ace.session.getTokenAt(e.line,e.ch);return t&&/comment|string/.test(t.type)?"string":""},this.findMatchingBracket=function(e){var t=this.ace.session.findMatchingBracket(g(e));return{to:t&&y(t)}},this.findMatchingTag=function(e){var t=this.ace.session.getMatchingTags(g(e));if(!t)return;return{open:{from:y(t.openTag.start),to:y(t.openTag.end)},close:{from:y(t.closeTag.start),to:y(t.closeTag.end)}}},this.indentLine=function(e,t){t===!0?this.ace.session.indentRows(e,e," "):t===!1&&this.ace.session.outdentRows(new i(e,0,e,0))},this.indexFromPos=function(e){return this.ace.session.doc.positionToIndex(g(e))},this.posFromIndex=function(e){return y(this.ace.session.doc.indexToPosition(e))},this.focus=function(e){return this.ace.textInput.focus()},this.blur=function(e){return this.ace.blur()},this.defaultTextHeight=function(e){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(e,t,n,r){var i=r.bracketRegex.source,s=/paren|text|operator|tag/;if(t==1)var o=this.ace.session.$findClosingBracket(i.slice(1,2),g(e),s);else{var o=this.ace.session.$findOpeningBracket(i.slice(-2,-1),{row:e.line,column:e.ch+1},s);!o&&r.bracketRegex&&r.bracketRegex.test(this.getLine(e.line)[e.ch-1])&&(o={row:e.line,column:e.ch-1})}return o&&{pos:y(o)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(e){if(m.commands.hasOwnProperty(e))return m.commands[e](this);if(e=="indentAuto")return this.ace.execCommand("autoindent");console.log(e+" is not implemented")},this.getLineNumber=function(e){var t=this.$lineHandleChanges;if(!t)return null;var n=e.row;for(var r=0;r0)return null;n-=i.end.row-i.start.row}}return n},this.getLineHandle=function(e){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(e),row:e}},this.releaseLineHandles=function(){this.$lineHandleChanges=undefined},this.getLastEditEnd=function(){var e=this.ace.session.$undoManager;if(e&&e.$lastDelta)return y(e.$lastDelta.end)}}.call(m.prototype);var b=m.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};b.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.post},eatSpace:function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if(typeof e!="string"){var s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}var r=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},m.defineExtension=function(e,t){m.prototype[e]=t},o.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",!1),function(){function e(e,t,n){var r=e.ace.container,i;return i=r.appendChild(document.createElement("div")),n?i.className="ace_dialog ace_dialog-bottom":i.className="ace_dialog ace_dialog-top",typeof t=="string"?i.innerHTML=t:i.appendChild(t),i}function t(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}m.defineExtension("openDialog",function(n,r,i){function a(e){if(typeof e=="string")f.value=e;else{if(o)return;if(e&&e.type=="blur"&&document.activeElement===f)return;u.state.dialog==s&&(u.state.dialog=null,u.focus()),o=!0,s.remove(),i.onClose&&i.onClose(s);var t=u;t.state.vim&&(t.state.vim.status=null,t.ace._signal("changeStatus"),t.ace.renderer.$loop.schedule(t.ace.renderer.CHANGE_CURSOR))}}if(this.virtualSelectionMode())return;i||(i={}),t(this,null);var s=e(this,n,i.bottom),o=!1,u=this;this.state.dialog=s;var f=s.getElementsByTagName("input")[0],l;if(f)i.value&&(f.value=i.value,i.selectValueOnOpen!==!1&&f.select()),i.onInput&&m.on(f,"input",function(e){i.onInput(e,f.value,a)}),i.onKeyUp&&m.on(f,"keyup",function(e){i.onKeyUp(e,f.value,a)}),m.on(f,"keydown",function(e){if(i&&i.onKeyDown&&i.onKeyDown(e,f.value,a))return;e.keyCode==13&&r(f.value);if(e.keyCode==27||i.closeOnEnter!==!1&&e.keyCode==13)m.e_stop(e),a()}),i.closeOnBlur!==!1&&m.on(f,"blur",a),f.focus();else if(l=s.getElementsByTagName("button")[0])m.on(l,"click",function(){a(),u.focus()}),i.closeOnBlur!==!1&&m.on(l,"blur",a),l.focus();return a}),m.defineExtension("openNotification",function(n,r){function a(){if(s)return;s=!0,clearTimeout(o),i.remove()}if(this.virtualSelectionMode())return;t(this,a);var i=e(this,n,r&&r.bottom),s=!1,o,u=r&&typeof r.duration!="undefined"?r.duration:5e3;return m.on(i,"click",function(e){m.e_preventDefault(e),a()}),u&&(o=setTimeout(a,u)),a})}();var w=m.Pos,S=[{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:""},{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:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{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:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},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:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},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:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{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:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],x=S.length,T=[{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:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],N=pt(""),A=/[\d]/,O=[m.isWordChar,function(e){return e&&!m.isWordChar(e)&&!/\s/.test(e)}],M=[function(e){return/\S/.test(e)}],_=["<",">"],D=["-",'"',".",":","_","/","+"],P=/^\w$/,H;try{H=new RegExp("^[\\p{Lu}]$","u")}catch(B){H=/^[A-Z]$/}var X={};V("filetype",undefined,"string",["ft"],function(e,t){if(t===undefined)return;if(e===undefined){var n=t.getOption("mode");return n=="null"?"":n}var n=e==""?"null":e;t.setOption("mode",n)}),V("textwidth",80,"number",["tw"],function(e,t){if(t===undefined)return;if(e===undefined){var n=t.getOption("textwidth");return n}var r=Math.round(e);r>1&&t.setOption("textwidth",r)});var K=function(){function s(s,o,u){function l(n){var r=++t%e,o=i[r];o&&o.clear(),i[r]=s.setBookmark(n)}var a=t%e,f=i[a];if(f){var c=f.find();c&&!jt(c,o)&&l(o)}else l(o);l(u),n=t,r=t-e+1,r<0&&(r=0)}function o(s,o){t+=o,t>n?t=n:t0?1:-1,f,l=s.getCursor();do{t+=a,u=i[(e+t)%e];if(u&&(f=u.find())&&!jt(l,f))break}while(tr)}return u}function u(e,n){var r=t,i=o(e,n);return t=r,i&&i.find()}var e=100,t=-1,n=0,r=0,i=new Array(e);return{cachedCursor:undefined,add:s,find:u,move:o}},Q=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};G.prototype={exitMacroRecordMode:function(){var e=Z.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=undefined,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=Z.registerController.getRegister(t);if(n){n.clear(),this.latestRegister=t;if(e.openDialog){var r=jn("span",{"class":"cm-vim-message"},"recording @"+t);this.onRecordingDone=e.openDialog(r,null,{bottom:!0})}this.isRecording=!0}}};var Z,tt,nt={enterVimMode:C,leaveVimMode:k,buildKeyMap:function(){},getRegisterController:function(){return Z.registerController},resetVimGlobalState_:et,getVimGlobalState_:function(){return Z},maybeInitVimState_:Y,suppressErrorLogging:!1,InsertModeKey:pr,map:function(e,t,n){tr.map(e,t,n)},unmap:function(e,t){return tr.unmap(e,t)},noremap:function(e,t,n){tr.map(e,t,n,!0)},mapclear:function(e){var t=S.length,n=x,r=S.slice(0,t-n);S=S.slice(t-n);if(e)for(var i=r.length-1;i>=0;i--){var s=r[i];if(e!==s.context)if(s.context)this._mapCommand(s);else{var o=["normal","insert","visual"];for(var u in o)if(o[u]!==e){var a={};for(var f in s)a[f]=s[f];a.context=o[u],this._mapCommand(a)}}}},langmap:ht,vimKeyFromEvent:ct,setOption:$,getOption:J,defineOption:V,defineEx:function(e,t,n){if(!t)t=e;else if(e.indexOf(t)!==0)throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered');er[e]=n,tr.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if(typeof r=="function")return r()},multiSelectHandleKey:Sr,findKey:function(e,t,n){function i(){var r=Z.macroModeState;if(r.isRecording){if(t=="q")return r.exitMacroRecordMode(),vt(e),!0;n!="mapping"&&ur(r,t)}}function s(){if(t==""){if(r.visualMode)tn(e);else{if(!r.insertMode)return;rr(e)}return vt(e),!0}}function o(){if(s())return!0;r.inputState.keyBuffer.push(t);var n=r.inputState.keyBuffer.join(""),i=t.length==1,o=Et.matchCommand(n,S,r.inputState,"insert"),u=r.inputState.changeQueue;if(o.type=="none")return vt(e),!1;if(o.type=="partial"){o.expectLiteralNext&&(r.expectLiteralNext=!0),tt&&window.clearTimeout(tt),tt=i&&window.setTimeout(function(){r.insertMode&&r.inputState.keyBuffer.length&&vt(e)},J("insertModeEscKeysTimeout"));if(i){var a=e.listSelections();if(!u||u.removed.length!=a.length)u=r.inputState.changeQueue=new mt;u.inserted+=t;for(var f=0;f0||this.motionRepeat.length>0)e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10));return e},gt.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(Q(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},bt.prototype={pushText:function(e,t,n,r,i){if(e==="_")return;r&&n.charAt(n.length-1)!=="\n"&&(n+="\n");var s=this.isValidRegister(e)?this.getRegister(e):null;if(!s){switch(t){case"yank":this.registers[0]=new gt(n,r,i);break;case"delete":case"change":n.indexOf("\n")==-1?this.registers["-"]=new gt(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new gt(n,r))}this.unnamedRegister.setText(n,r,i);return}var o=R(e);o?s.pushText(n,r):s.setText(n,r,i),e==="+"&&typeof navigator!="undefined"&&typeof navigator.clipboard!="undefined"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(n),this.unnamedRegister.setText(s.toString(),r)},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new gt),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&(W(e,D)||P.test(e))},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},wt.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;this.initialPrefix===null&&(this.initialPrefix=e);for(var i=this.iterator+r;t?i>=0:i=n.length)return this.iterator=n.length,this.initialPrefix;if(i<0)return e},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Et={matchCommand:function(e,t,n,r){var i=_t(e,t,r,n);if(!i.full&&!i.partial)return{type:"none"};if(!i.full&&i.partial)return{type:"partial",expectLiteralNext:i.partial.length==1&&i.partial[0].keys.slice(-11)==""};var s;for(var o=0;o"||s.keys.slice(-10)==""){var a=Pt(e);if(!a||a.length>1)return{type:"clear"};n.selectedCharacter=a}return{type:"full",command:s}},processCommand:function(e,t,n){t.inputState.repeatOverride=n.repeatOverride;switch(n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n);break;default:}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=Ot(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator){r.motion="expandToLine",r.motionArgs={linewise:!0},this.evalInput(e,t);return}vt(e)}r.operator=n.operator,r.operatorArgs=Ot(n.operatorArgs),n.keys.length>1&&(r.operatorShortcut=n.keys),n.exitVisualBlock&&(t.visualBlock=!1,Yt(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,i=Ot(n.operatorMotionArgs);i&&r&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,i=r.getRepeat(),s=!!i,o=Ot(n.actionArgs)||{};r.selectedCharacter&&(o.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),o.repeat=i||1,o.repeatIsExplicit=s,o.registerName=r.registerName,vt(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),kt[n.action](e,o,t)},processSearch:function(e,t,n){function a(r,i,s){Z.searchHistoryController.pushInput(r),Z.searchHistoryController.reset();try{Un(e,r,i,s)}catch(o){Fn(e,"Invalid regex: "+r),vt(e);return}Et.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}function f(e){a(e,!0,!0);var t=Z.macroModeState;t.isRecording&&fr(t,e)}function l(t,n,i){var s=ct(t),o,a;s==""||s==""?(o=s==""?!0:!1,a=t.target?t.target.selectionEnd:0,n=Z.searchHistoryController.nextMatch(n,o)||"",i(n),a&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(a,t.target.value.length))):s&&s!=""&&s!=""&&Z.searchHistoryController.reset();var f;try{f=Un(e,n,!0,!0)}catch(t){}f?e.scrollIntoView(Vn(e,!r,f),30):(Jn(e),e.scrollTo(u.left,u.top))}function c(t,n,r){var i=ct(t);i==""||i==""||i==""||i==""&&n==""?(Z.searchHistoryController.pushInput(n),Z.searchHistoryController.reset(),Un(e,o),Jn(e),e.scrollTo(u.left,u.top),m.e_stop(t),vt(e),r(),e.focus()):i==""||i==""?m.e_stop(t):i==""&&(m.e_stop(t),r(""))}if(!e.getSearchCursor)return;var r=n.searchArgs.forward,i=n.searchArgs.wholeWordOnly;Cn(e).setReversed(!r);var s=r?"/":"?",o=Cn(e).getQuery(),u=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var h=Z.macroModeState;if(h.isPlaying){var p=h.replaySearchQueries.shift();a(p,!0,!1)}else qn(e,{onClose:f,prefix:s,desc:"(JavaScript regexp)",onKeyUp:l,onKeyDown:c});break;case"wordUnderCursor":var d=on(e,{noSymbol:!0}),v=!0;d||(d=on(e,{noSymbol:!1}),v=!1);if(!d){Fn(e,"No word under cursor"),vt(e);return}var p=e.getLine(d.start.line).substring(d.start.ch,d.end.ch);v&&i?p="\\b"+p+"\\b":p=Wt(p),Z.jumpList.cachedCursor=e.getCursor(),e.setCursor(d.start),a(p,!0,!1)}},processEx:function(e,t,n){function r(t){Z.exCommandHistoryController.pushInput(t),Z.exCommandHistoryController.reset(),tr.processCommand(e,t),e.state.vim&&vt(e)}function i(t,n,r){var i=ct(t),s,o;if(i==""||i==""||i==""||i==""&&n=="")Z.exCommandHistoryController.pushInput(n),Z.exCommandHistoryController.reset(),m.e_stop(t),vt(e),r(),e.focus();i==""||i==""?(m.e_stop(t),s=i==""?!0:!1,o=t.target?t.target.selectionEnd:0,n=Z.exCommandHistoryController.nextMatch(n,s)||"",r(n),o&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(o,t.target.value.length))):i==""?(m.e_stop(t),r("")):i&&i!=""&&i!=""&&Z.exCommandHistoryController.reset()}n.type=="keyToEx"?tr.processCommand(e,n.exArgs.input):t.visualMode?qn(e,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:i,selectValueOnOpen:!1}):qn(e,{onClose:r,prefix:":",onKeyDown:i})},evalInput:function(e,t){var n=t.inputState,r=n.motion,i=n.motionArgs||{},s=n.operator,o=n.operatorArgs||{},u=n.registerName,a=t.sel,f=Bt(t.visualMode?At(e,a.head):e.getCursor("head")),l=Bt(t.visualMode?At(e,a.anchor):e.getCursor("anchor")),c=Bt(f),h=Bt(l),p,d,v;s&&this.recordLastEdit(t,n),n.repeatOverride!==undefined?v=n.repeatOverride:v=n.getRepeat();if(v>0&&i.explicitRepeat)i.repeatIsExplicit=!0;else if(i.noRepeat||!i.explicitRepeat&&v===0)v=1,i.repeatIsExplicit=!1;n.selectedCharacter&&(i.selectedCharacter=o.selectedCharacter=n.selectedCharacter),i.repeat=v,vt(e);if(r){var m=St[r](e,f,i,t,n);t.lastMotion=St[r];if(!m)return;if(i.toJumplist){!s&&e.ace.curOp!=null&&(e.ace.curOp.command.scrollIntoView="center-animate");var g=Z.jumpList,y=g.cachedCursor;y?(an(e,y,m),delete g.cachedCursor):an(e,f,m)}m instanceof Array?(d=m[0],p=m[1]):p=m,p||(p=Bt(f));if(t.visualMode){if(!t.visualBlock||p.ch!==Infinity)p=At(e,p,c);d&&(d=At(e,d)),d=d||h,a.anchor=d,a.head=p,Yt(e),yn(e,t,"<",Ft(d,p)?d:p),yn(e,t,">",Ft(d,p)?p:d)}else s||(e.ace.curOp&&(e.ace.curOp.vimDialogScroll="center-animate"),p=At(e,p,c),e.setCursor(p.line,p.ch))}if(s){if(o.lastSel){d=h;var b=o.lastSel,S=Math.abs(b.head.line-b.anchor.line),x=Math.abs(b.head.ch-b.anchor.ch);b.visualLine?p=new w(h.line+S,h.ch):b.visualBlock?p=new w(h.line+S,h.ch+x):b.head.line==b.anchor.line?p=new w(h.line,h.ch+x):p=new w(h.line+S,h.ch),t.visualMode=!0,t.visualLine=b.visualLine,t.visualBlock=b.visualBlock,a=t.sel={anchor:d,head:p},Yt(e)}else t.visualMode&&(o.lastSel={anchor:Bt(a.anchor),head:Bt(a.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var T,N,C,k,L;if(t.visualMode){T=It(a.head,a.anchor),N=qt(a.head,a.anchor),C=t.visualLine||o.linewise,k=t.visualBlock?"block":C?"line":"char";var A=E(e,T,N);L=Zt(e,{anchor:A.start,head:A.end},k);if(C){var O=L.ranges;if(k=="block")for(var M=0;Mf&&i.line==f)return vn(e,t,n,r,!0);var l=e.ace.session.getFoldLine(u);return l&&(n.forward?u>l.start.row&&(u=l.end.row+1):u=l.start.row),n.toFirstChar&&(s=sn(e.getLine(u)),r.lastHPos=s),r.lastHSPos=e.charCoords(new w(u,s),"div").left,new w(u,s)},moveByDisplayLines:function(e,t,n,r){var i=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(i,"div").left}var s=n.repeat,o=e.findPosV(i,n.forward?s:-s,"line",r.lastHSPos);if(o.hitSide)if(n.forward)var u=e.charCoords(o,"div"),a={top:u.top+8,left:r.lastHSPos},o=e.coordsChar(a,"div");else{var f=e.charCoords(new w(e.firstLine(),0),"div");f.left=r.lastHSPos,o=e.coordsChar(f,"div")}return r.lastHPos=o.ch,o},moveByPage:function(e,t,n){var r=t,i=n.repeat;return e.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return wn(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return Sn(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var i=e.getScrollInfo(),s=null,o=n.repeat;o||(o=i.clientHeight/(2*e.defaultTextHeight()));var u=e.charCoords(t,"local");n.repeat=o,s=St.moveByDisplayLines(e,t,n,r);if(!s)return null;var a=e.charCoords(s,"local");return e.scrollTo(null,i.top+a.top-u.top),s},moveByWords:function(e,t,n){return dn(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=n.repeat,i=mn(e,r,n.forward,n.selectedCharacter,t),s=n.forward?-1:1;return fn(s,n),i?(i.ch+=s,i):null},moveToCharacter:function(e,t,n){var r=n.repeat;return fn(0,n),mn(e,r,n.forward,n.selectedCharacter,t)||t},moveToSymbol:function(e,t,n){var r=n.repeat;return hn(e,r,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var i=n.repeat;return r.lastHPos=i-1,r.lastHSPos=e.charCoords(t,"div").left,gn(e,i)},moveToEol:function(e,t,n,r){return vn(e,t,n,r,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return new w(n.line,sn(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){var n=t,r=n.line,i=n.ch,s=e.getLine(r),o;for(;i]/.test(s[i])?/[(){}[\]<>]/:/[(){}[\]]/,f=e.findMatchingBracket(new w(r,i+1),{bracketRegex:a});return f.to}return n},moveToStartOfLine:function(e,t){return new w(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var r=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(r=n.repeat-e.getOption("firstLineNumber")),new w(r,sn(e.getLine(r)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return t.sticky=="before"&&t.ch--,t},textObjectManipulation:function(e,t,n,r){var i={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},s={"'":!0,'"':!0,"`":!0},o=n.selectedCharacter;o=="b"?o="(":o=="B"&&(o="{");var u=!n.textObjectInner,a,f;if(i[o]){f=!0,a=xn(e,t,o,u);if(!a){var l=e.getSearchCursor(new RegExp("\\"+o,"g"),t);l.find()&&(a=xn(e,l.from(),o,u))}}else if(s[o])f=!0,a=Tn(e,t,o,u);else if(o==="W"||o==="w"){var c=n.repeat||1;while(c-->0){var h=on(e,{inclusive:u,innerWord:!u,bigWord:o==="W",noSymbol:o==="W",multiline:!0},a&&a.end);h&&(a||(a=h),a.end=h.end)}}else if(o==="p"){a=wn(e,t,n.repeat,0,u),n.linewise=!0;if(r.visualMode)r.visualLine||(r.visualLine=!0);else{var p=r.inputState.operatorArgs;p&&(p.linewise=!0),a.end.line--}}else if(o==="t")a=un(e,t,u);else if(o==="s"){var d=e.getLine(t.line);t.ch>0&&z(d[t.ch])&&(t.ch-=1);var v=En(e,t,n.repeat,1,u),m=En(e,t,n.repeat,-1,u);U(e.getLine(m.line)[m.ch])&&U(e.getLine(v.line)[v.ch-1])&&(m={line:m.line,ch:m.ch+1}),a={start:m,end:v}}return a?e.state.vim.visualMode?Gt(e,a.start,a.end,f):[a.start,a.end]:null},repeatLastCharacterSearch:function(e,t,n){var r=Z.lastCharacterSearch,i=n.repeat,s=n.forward===r.forward,o=(r.increment?1:0)*(s?-1:1);e.moveH(-o,"char"),n.inclusive=s?!0:!1;var u=mn(e,i,s,r.selectedCharacter);return u?(u.ch+=o,u):(e.moveH(o,"char"),t)}},Nt={change:function(e,t,n){var r,i,s=e.state.vim,o=n[0].anchor,u=n[0].head;if(!s.visualMode){i=e.getRange(o,u);var a=s.lastEditInputState||{};if(a.motion=="moveByWords"&&!U(i)){var f=/\s+$/.exec(i);f&&a.motionArgs&&a.motionArgs.forward&&(u=Mt(u,0,-f[0].length),i=i.slice(0,-f[0].length))}t.linewise&&(o=new w(o.line,sn(e.getLine(o.line))),u.line>o.line&&(u=new w(u.line-1,Number.MAX_VALUE))),e.replaceRange("",o,u),r=o}else if(t.fullLine)u.ch=Number.MAX_VALUE,u.line--,e.setSelection(o,u),i=e.getSelection(),e.replaceSelection(""),r=o;else{i=e.getSelection();var l=Tt("",n.length);e.replaceSelections(l),r=It(n[0].head,n[0].anchor)}Z.registerController.pushText(t.registerName,"change",i,t.linewise,n.length>1),kt.enterInsertMode(e,{head:r},e.state.vim)},"delete":function(e,t,n){var r,i,s=e.state.vim;if(!s.visualBlock){var o=n[0].anchor,u=n[0].head;t.linewise&&u.line!=e.firstLine()&&o.line==e.lastLine()&&o.line==u.line-1&&(o.line==e.firstLine()?o.ch=0:o=new w(o.line-1,Ut(e,o.line-1))),i=e.getRange(o,u),e.replaceRange("",o,u),r=o,t.linewise&&(r=St.moveToFirstNonWhiteSpaceCharacter(e,o))}else{i=e.getSelection();var a=Tt("",n.length);e.replaceSelections(a),r=It(n[0].head,n[0].anchor)}return Z.registerController.pushText(t.registerName,"delete",i,t.linewise,s.visualBlock),At(e,r)},indent:function(e,t,n){var r=e.state.vim,i=r.visualMode?t.repeat:1;if(r.visualBlock){var s=e.getOption("tabSize"),o=e.getOption("indentWithTabs")?" ":" ".repeat(s),u;for(var a=n.length-1;a>=0;a--){u=It(n[a].anchor,n[a].head);if(t.indentRight)e.replaceRange(o.repeat(i),u,u);else{var f=e.getLine(u.line),l=0;for(var c=0;cs&&t.linewise&&u--,t.keepCursor?r:new w(u,0)},changeCase:function(e,t,n,r,i){var s=e.getSelections(),o=[],u=t.toLower;for(var a=0;af.top?(a.line+=(u-f.top)/i,a.line=Math.ceil(a.line),e.setCursor(a),f=e.charCoords(a,"local"),e.scrollTo(null,f.top)):e.scrollTo(null,u);else{var l=u+e.getScrollInfo().clientHeight;l=i.anchor.line?s=Mt(i.head,0,1):s=new w(i.anchor.line,0)}else if(r=="inplace"){if(n.visualMode)return}else r=="lastEdit"&&(s=Yn(e)||s);e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),m.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),m.signal(e,"vim-mode-change",{mode:"insert"})),Z.macroModeState.isPlaying||(e.on("change",lr),n.insertEnd&&n.insertEnd.clear(),n.insertEnd=e.setBookmark(s,{insertLeft:!0}),m.on(e.getInputField(),"keydown",dr)),n.visualMode&&tn(e),$t(e,s,o)},toggleVisualMode:function(e,t,n){var r=t.repeat,i=e.getCursor(),s;if(!n.visualMode){n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,s=At(e,new w(i.line,i.ch+r-1));var o=E(e,i,s);n.sel={anchor:o.start,head:o.end},m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Yt(e),yn(e,n,"<",It(i,s)),yn(e,n,">",qt(i,s))}else n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Yt(e)):tn(e)},reselectLastSelection:function(e,t,n){var r=n.lastSelection;n.visualMode&&Qt(e,n);if(r){var i=r.anchorMark.find(),s=r.headMark.find();if(!i||!s)return;n.sel={anchor:i,head:s},n.visualMode=!0,n.visualLine=r.visualLine,n.visualBlock=r.visualBlock,Yt(e),yn(e,n,"<",It(i,s)),yn(e,n,">",qt(i,s)),m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,i;if(n.visualMode){r=e.getCursor("anchor"),i=e.getCursor("head");if(Ft(i,r)){var s=i;i=r,r=s}i.ch=Ut(e,i.line)-1}else{var o=Math.max(t.repeat,2);r=e.getCursor(),i=At(e,new w(r.line+o-1,Infinity))}var u=0;for(var a=r.line;a1)var r=Array(t.repeat+1).join(r);var p=i.linewise,d=i.blockwise;if(d){r=r.split("\n"),p&&r.pop();for(var v=0;ve.lastLine()&&e.replaceRange("\n",new w(N,0));var C=Ut(e,N);Ca.length&&(s=a.length),o=new w(i.line,s)}var f=E(e,i,o);i=f.start,o=f.end;if(r=="\n")n.visualMode||e.replaceRange("",i,o),(m.commands.newlineAndIndentContinueComment||m.commands.newlineAndIndent)(e);else{var l=e.getRange(i,o);l=l.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r),l=l.replace(/[^\n]/g,r);if(n.visualBlock){var c=(new Array(e.getOption("tabSize")+1)).join(" ");l=e.getSelection(),l=l.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r),l=l.replace(/\t/g,c).replace(/[^\n]/g,r).split("\n"),e.replaceSelections(l)}else e.replaceRange(l,i,o);n.visualMode?(i=Ft(u[0].anchor,u[0].head)?u[0].anchor:u[0].head,e.setCursor(i),tn(e,!1)):e.setCursor(Mt(o,0,-1))}},incrementNumberToken:function(e,t){var n=e.getCursor(),r=e.getLine(n.line),i=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,s,o,u,a;while((s=i.exec(r))!==null){o=s.index,u=o+s[0].length;if(n.ch=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return e.index===0&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t=e.lastCh==="*"&&e.nextCh==="/";return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb=e.symb==="m"?"{":"}",e.reverseSymb=e.symb==="{"?"}":"{"},isComplete:function(e){return e.nextCh===e.symb?!0:!1}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if(e.nextCh==="#"){var t=e.lineText.match(/^#(\w+)/)[1];if(t==="endif"){if(e.forward&&e.depth===0)return!0;e.depth++}else if(t==="if"){if(!e.forward&&e.depth===0)return!0;e.depth--}if(t==="else"&&e.depth===0)return!0}return!1}}};V("pcre",!0,"boolean"),Nn.prototype={getQuery:function(){return Z.query},setQuery:function(e){Z.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return Z.isReversed},setReversed:function(e){Z.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var _n={"\\n":"\n","\\r":"\r","\\t":" "},Pn={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":" ","\\&":"&"},Wn=0,Zn=function(){this.buildCommandMap_()};Zn.prototype={processCommand:function(e,t,n){var r=this;e.operation(function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)})},_processCommand:function(e,t,n){var r=e.state.vim,i=Z.registerController.getRegister(":"),s=i.toString(),o=new m.StringStream(t);i.setText(t);var u=n||{};u.input=t;try{this.parseInput_(e,o,u)}catch(a){throw Fn(e,a.toString()),a}r.visualMode&&tn(e);var f,l;if(!u.commandName)u.line!==undefined&&(l="move");else{f=this.matchCommand_(u.commandName);if(f){l=f.name,f.excludeFromCommandHistory&&i.setText(s),this.parseCommandArgs_(o,u,f);if(f.type=="exToKey"){ut(e,f.toKeys,f);return}if(f.type=="exToEx"){this.processCommand(e,f.toInput);return}}}if(!l){Fn(e,'Not an editor command ":'+t+'"');return}try{er[l](e,u),(!f||!f.possiblyAsync)&&u.callback&&u.callback()}catch(a){throw Fn(e,a.toString()),a}},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),n.line!==undefined&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));if(n.line==undefined)if(e.state.vim.visualMode){var r=Gn(e,e.state.vim,"<");n.selectionLine=r&&r.line,r=Gn(e,e.state.vim,">"),n.selectionLineEnd=r&&r.line}else n.selectionLine=e.getCursor().line;else n.selectionLine=n.line,n.selectionLineEnd=n.lineEnd;var i=t.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return i?n.commandName=i[1]:n.commandName=t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),i=Gn(e,e.state.vim,r);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return t.backUp(1),undefined}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);n[1]=="-"?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(e.eol())return;t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=zt(t.argString).split(r);i.length&&i[0]&&(t.args=i)},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(r.name.indexOf(e)===0)return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e1)return"Invalid arguments";s=a&&"decimal"||f&&"hex"||l&&"octal"}u[2]&&(o=new RegExp(u[2].substr(1,u[2].length-2),r?"i":""))}}function S(e,t){if(n){var i;i=e,e=t,t=i}r&&(e=e.toLowerCase(),t=t.toLowerCase());var o=s&&d.exec(e),u=s&&d.exec(t);return o?(o=parseInt((o[1]+o[2]).toLowerCase(),v),u=parseInt((u[1]+u[2]).toLowerCase(),v),o-u):e=f){Fn(e,"Invalid argument: "+t.argString.substring(i));return}for(var l=0;l<=f-a;l++){var c=String.fromCharCode(a+l);delete n.marks[c]}}else delete n.marks[s]}}},tr=new Zn;V("insertModeEscKeysTimeout",200,"number"),m.Vim=nt;var yr={"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"},wr=nt.handleKey.bind(nt);nt.handleKey=function(e,t,n){return e.operation(function(){return wr(e,t,n)},!0)},et(),t.CodeMirror=m;var xr=nt.maybeInitVimState_;t.handler={$id:"ace/keyboard/vim",drawCursor:function(e,t,n,r,s){var u=this.state.vim||{},a=n.characterWidth,f=n.lineHeight,l=t.top,c=t.left;if(!u.insertMode){var h=r.cursor?i.comparePoints(r.cursor,r.start)<=0:s.selection.isBackwards()||s.selection.isEmpty();!h&&c>a&&(c-=a)}!u.insertMode&&u.status&&(f/=2,l+=f),o.translate(e,c,l),o.setStyle(e.style,"width",a+"px"),o.setStyle(e.style,"height",f+"px")},$getDirectionForHighlight:function(e){var t=e.state.cm,n=xr(t);if(!n.insertMode)return e.session.selection.isBackwards()||e.session.selection.isEmpty()},handleKeyboard:function(e,t,n,r,i){var s=e.editor,o=s.state.cm,u=xr(o);if(r==-1)return;u.insertMode||(t==-1?(n.charCodeAt(0)>255&&e.inputKey&&(n=e.inputKey,n&&e.inputHash==4&&(n=n.toUpperCase())),e.inputChar=n):t==4||t==0?e.inputKey==n&&e.inputHash==t&&e.inputChar?(n=e.inputChar,t=-1):(e.inputChar=null,e.inputKey=n,e.inputHash=t):e.inputChar=e.inputKey=null);if(o.state.overwrite&&u.insertMode&&n=="backspace"&&t==0)return{command:"gotoleft"};if(n=="c"&&t==1&&!c.isMac&&s.getCopyText())return s.once("copy",function(){u.insertMode?s.selection.clearSelection():o.operation(function(){tn(o)})}),{command:"null",passEvent:!0};if(n=="esc"&&!u.insertMode&&!u.visualMode&&!o.ace.inMultiSelectMode){var a=Cn(o),f=a.getOverlay();f&&o.removeOverlay(f)}if(t==-1||t&1||t===0&&n.length>1){var l=u.insertMode,h=br(t,n,i||{},u);u.status==null&&(u.status="");var p=Sr(o,h,"user");u=xr(o),p&&u.status!=null?u.status+=h:u.status==null&&(u.status=""),o._signal("changeStatus");if(!p&&(t!=-1||l))return;return{command:"null",passEvent:!p}}},attach:function(e){function n(){var n=xr(t).insertMode;t.ace.renderer.setStyle("normal-mode",!n),e.textInput.setCommandMode(!n),e.renderer.$keepTextAreaAtCursor=n,e.renderer.$blockCursor=!n}e.state||(e.state={});var t=new m(e);e.state.cm=t,e.$vimModeHandler=this,C(t),xr(t).status=null,t.on("vim-command-done",function(){if(t.virtualSelectionMode())return;xr(t).status=null,t.ace._signal("changeStatus"),t.ace.session.markUndoGroup()}),t.on("changeStatus",function(){t.ace.renderer.updateCursor(),t.ace._signal("changeStatus")}),t.on("vim-mode-change",function(){if(t.virtualSelectionMode())return;n(),t._signal("changeStatus")}),n(),e.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(t)},detach:function(e){var t=e.state.cm;k(t),t.destroy(),e.state.cm=null,e.$vimModeHandler=null,e.renderer.$cursorLayer.drawCursor=null,e.renderer.setStyle("normal-mode",!1),e.textInput.setCommandMode(!1),e.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(e){var t=e.state.cm,n=xr(t);if(n.insertMode)return"INSERT";var r="";return n.visualMode&&(r+="VISUAL",n.visualLine&&(r+=" LINE"),n.visualBlock&&(r+=" BLOCK")),n.status&&(r+=(r?" ":"")+n.status),r}},nt.defineOption({name:"wrap",set:function(e,t){t&&t.ace.setOption("wrap",e)},type:"boolean"},!1),nt.defineEx("write","w",function(){console.log(":write is not implemented")}),S.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{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"}}),S.push({keys:"gq",type:"operator",operator:"hardWrap"}),nt.defineOperator("hardWrap",function(e,t,n,r,i){var s=n[0].anchor.line,o=n[0].head.line;return t.linewise&&o--,v(e.ace,{startRow:s,endRow:o}),w(o,0)}),V("textwidth",undefined,"number",["tw"],function(e,t){if(t===undefined)return;if(e===undefined){var n=t.ace.getOption("printMarginColumn");return n}var r=Math.round(e);r>1&&t.ace.setOption("printMarginColumn",r)}),kt.aceCommand=function(e,t,n){e.vimCmd=t,e.ace.inVirtualSelectionMode?e.ace.on("beforeEndOperation",Tr):Tr(null,e.ace)},kt.fold=function(e,t,n){e.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(t.all?2:0)+(t.open?1:0)])},x=S.length,t.handler.defaultKeymap=S,t.handler.actions=kt,t.Vim=nt}); (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/www/js/ace/keybinding-vscode.js b/www/js/ace/keybinding-vscode.js new file mode 100644 index 000000000..32da4c800 --- /dev/null +++ b/www/js/ace/keybinding-vscode.js @@ -0,0 +1,8 @@ +define("ace/keyboard/vscode",["require","exports","module","ace/keyboard/hash_handler","ace/config"],function(e,t,n){"use strict";var r=e("../keyboard/hash_handler").HashHandler,i=e("../config");t.handler=new r,t.handler.$id="ace/keyboard/vscode",t.handler.addCommands([{name:"toggleWordWrap",exec:function(e){var t=e.session.getUseWrapMode();e.session.setUseWrapMode(!t)},readOnly:!0},{name:"navigateToLastEditLocation",exec:function(e){var t=e.session.getUndoManager().$lastDelta,n=t.action=="remove"?t.start:t.end;e.moveCursorTo(n.row,n.column),e.clearSelection()}},{name:"replaceAll",exec:function(e){e.searchBox?e.searchBox.active===!0&&e.searchBox.replaceOption.checked===!0&&e.searchBox.replaceAll():i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"replaceOne",exec:function(e){e.searchBox?e.searchBox.active===!0&&e.searchBox.replaceOption.checked===!0&&e.searchBox.replace():i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"selectAllMatches",exec:function(e){e.searchBox?e.searchBox.active===!0&&e.searchBox.findAll():i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1)})}},{name:"toggleFindCaseSensitive",exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1);var n=e.searchBox;n.caseSensitiveOption.checked=!n.caseSensitiveOption.checked,n.$syncOptions()})}},{name:"toggleFindInSelection",exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1);var n=e.searchBox;n.searchOption.checked=!n.searchRange,n.setSearchRange(n.searchOption.checked&&n.editor.getSelectionRange()),n.$syncOptions()})}},{name:"toggleFindRegex",exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1);var n=e.searchBox;n.regExpOption.checked=!n.regExpOption.checked,n.$syncOptions()})}},{name:"toggleFindWholeWord",exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!1);var n=e.searchBox;n.wholeWordOption.checked=!n.wholeWordOption.checked,n.$syncOptions()})}},{name:"removeSecondaryCursors",exec:function(e){var t=e.selection.ranges;t&&t.length>1?e.selection.toSingleRange(t[t.length-1]):e.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(e){var n=t.handler.commands[e.name];n&&(n.bindKey=e.bindKey),t.handler.bindKey(e.bindKey,n||e.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/www/js/ace/mode-abap.js b/www/js/ace/mode-abap.js new file mode 100644 index 000000000..9adf964a2 --- /dev/null +++ b/www/js/ace/mode-abap.js @@ -0,0 +1,8 @@ +define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=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",!0," "),t="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:t},{token:"variable.parameter",regex:/\w+-\w[\-\w]*/},{token:e,regex:"\\b\\w+\\b"},{caseInsensitive:!0}],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"}]}};r.inherits(s,i),t.AbapHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<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()};s.metaData={fileTypes:["abc"],name:"ABC",scopeName:"text.abcnotation"},r.inherits(s,i),t.ABCHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./abc_highlight_rules").ABCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="%",this.$id="ace/mode/abc",this.snippetFileId="ace/snippets/abc"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-actionscript.js b/www/js/ace/mode-actionscript.js new file mode 100644 index 000000000..52c40f9b6 --- /dev/null +++ b/www/js/ace/mode-actionscript.js @@ -0,0 +1,8 @@ +define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["as"],keyEquivalent:"^~A",name:"ActionScript",scopeName:"source.actionscript.2"},r.inherits(s,i),t.ActionScriptHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./actionscript_highlight_rules").ActionScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/actionscript",this.snippetFileId="ace/snippets/actionscript"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-ada.js b/www/js/ace/mode-ada.js new file mode 100644 index 000000000..6b781da45 --- /dev/null +++ b/www/js/ace/mode-ada.js @@ -0,0 +1,8 @@ +define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,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+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*(begin|loop|then|is|do)\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){var r=t+n;return r.match(/^\s*(begin|end)$/)?!0:!1},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=t.getLine(n-1),s=this.$getIndent(i).length,u=this.$getIndent(r).length;if(u<=s)return;t.outdentRows(new o(n,0,n+2,0))},this.$id="ace/mode/ada"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-alda.js b/www/js/ace/mode-alda.js new file mode 100644 index 000000000..92c1a9d35 --- /dev/null +++ b/www/js/ace/mode-alda.js @@ -0,0 +1,8 @@ +define("ace/mode/alda_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={scopeName:"source.alda",fileTypes:["alda"],name:"Alda"},r.inherits(s,i),t.AldaHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/alda",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/alda_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./alda_highlight_rules").AldaHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/alda"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-apache_conf.js b/www/js/ace/mode-apache_conf.js new file mode 100644 index 000000000..314157593 --- /dev/null +++ b/www/js/ace/mode-apache_conf.js @@ -0,0 +1,8 @@ +define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:!0},{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()};s.metaData={fileTypes:["conf","CONF","htaccess","HTACCESS","htgroups","HTGROUPS","htpasswd","HTPASSWD",".htaccess",".HTACCESS",".htgroups",".HTGROUPS",".htpasswd",".HTPASSWD"],name:"Apache Conf",scopeName:"source.apacheconf"},r.inherits(s,i),t.ApacheConfHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./apache_conf_highlight_rules").ApacheConfHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/apache_conf"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-apex.js b/www/js/ace/mode-apex.js new file mode 100644 index 000000000..82519ef20 --- /dev/null +++ b/www/js/ace/mode-apex.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/apex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../mode/text_highlight_rules").TextHighlightRules,s=e("../mode/doc_comment_highlight_rules").DocCommentHighlightRules,o=function(){function t(t){return t.slice(-3)=="__c"?"support.function":e(t)}function n(e,t){return{regex:e+(t.multiline?"":"(?=.)"),token:"string.start",next:[{regex:t.escape,token:"character.escape"},{regex:t.error,token:"error.invalid"},{regex:e+(t.multiline?"":"|$"),token:"string.end",next:t.next||"start"},{defaultToken:"string"}]}}function r(){return[{token:"comment",regex:"\\/\\/(?=.)",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]},s.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]}]}var e=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",!0);this.$rules={start:[n("'",{escape:/\\[nb'"\\]/,error:/\\./,multiline:!1}),r("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:t},{regex:"`#%",token:"error.invalid"},{token:"constant.numeric",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:!1},{token:"paren.lparen",regex:/[\[({]/,next:"start",merge:!1},{token:"paren.rparen",regex:/[\])}]/,merge:!1}],maybe_soql:[{regex:/\s+/,token:"text"},{regex:/(SELECT|FIND)\b/,token:"keyword",caseInsensitive:!0,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:!0},{regex:"(:?target_length|toLabel|convertCurrency|count|Contact|Account|User|FIELDS)\\b",token:"support.function",caseInsensitive:!0},{token:"paren.rparen",regex:/[\]]/,next:"start",merge:!1},n("'",{escape:/\\[nb'"\\]/,error:/\\./,multiline:!1,next:"soql"}),n('"',{escape:/\\[nb'"\\]/,error:/\\./,multiline:!1,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(s,"doc-",[s.getEndRule("start")]),this.normalizeRules()};r.inherits(o,i),t.ApexHighlightRules=o}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/apex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apex_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";function u(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour}var r=e("../lib/oop"),i=e("../mode/text").Mode,s=e("./apex_highlight_rules").ApexHighlightRules,o=e("../mode/folding/cstyle").FoldMode;r.inherits(u,i),u.prototype.lineCommentStart="//",u.prototype.blockComment={start:"/*",end:"*/"},t.Mode=u}); (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/www/js/ace/mode-applescript.js b/www/js/ace/mode-applescript.js new file mode 100644 index 000000000..3abbc69c1 --- /dev/null +++ b/www/js/ace/mode-applescript.js @@ -0,0 +1,8 @@ +define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="AppleScript|false|linefeed|return|pi|quote|result|space|tab|true",n="activate|beep|count|delay|launch|log|offset|read|round|run|say|summarize|write",r="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",i=this.createKeywordMapper({"support.function":n,"constant.language":t,"support.type":r,keyword:e},"identifier");this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\(\\*",next:"comment"},{token:"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:i,regex:"[a-zA-Z][a-zA-Z0-9_]*\\b"}],comment:[{token:"comment",regex:"\\*\\)",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(s,i),t.AppleScriptHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./applescript_highlight_rules").AppleScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"(*",end:"*)"},this.$id="ace/mode/applescript"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-aql.js b/www/js/ace/mode-aql.js new file mode 100644 index 000000000..0ffc747e4 --- /dev/null +++ b/www/js/ace/mode-aql.js @@ -0,0 +1,8 @@ +define("ace/mode/aql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="true|false",n="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",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"//.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,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()};r.inherits(s,i),t.AqlHighlightRules=s}),define("ace/mode/aql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/aql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./aql_highlight_rules").AqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="//",this.$id="ace/mode/aql"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-asciidoc.js b/www/js/ace/mode-asciidoc.js new file mode 100644 index 000000000..553903d3e --- /dev/null +++ b/www/js/ace/mode-asciidoc.js @@ -0,0 +1,8 @@ +define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){function t(e){var t=/\w/.test(e)?"\\b":"(?:\\B|^)";return t+e+"[^"+e+"].*?"+e+"(?![\\w*])"}var e="[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:e},{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:e+"|\\d+"},{include:"macros"},{token:"literal",regex:"."}],smallPassthrough:[{token:"literal",regex:/[+]{3,}/,next:"dissallowDelimitedBlock"},{token:"literal",regex:/^\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:e+"|\\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:!0}],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:t("_")},{token:"keyword.bold",regex:/\*\*[^*\s].*?\*\*/},{token:"keyword.bold",regex:t("\\*")},{token:"literal",regex:t("\\+")},{token:"literal",regex:/\+\+[^+\s].*?\+\+/},{token:"literal",regex:/\$\$.+?\$\$/},{token:"literal",regex:t("`")},{token:"keyword",regex:t("^")},{token:"keyword",regex:t("~")},{token:"keyword",regex:/##?/},{token:"keyword",regex:/(?:\B|^)``|\b''/}]};var n={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 r in this.$rules){var i=this.$rules[r];for(var s=i.length;s--;){var o=i[s];if(o.include||typeof o=="string"){var u=[s,1].concat(this.$rules[o.include||o]);o.noEscape&&(u=u.filter(function(e){return!e.next})),i.splice.apply(i,u)}else o.token in n&&(o.token=n[o.token])}}};r.inherits(s,i),t.AsciidocHighlightRules=s}),define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/,this.singleLineHeadingRe=/^={1,5}(?=\s+\S)/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="="?this.singleLineHeadingRe.test(r)?"start":e.getLine(n-1).length!=e.getLine(n).length?"":"start":e.bgTokenizer.getState(n)=="dissallowDelimitedBlock"?"end":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type}function d(){var t=f.value.match(p);if(t)return t[0].length;var r=c.indexOf(f.value[0])+1;return r==1&&e.getLine(n-1).length!=e.getLine(n).length?Infinity:r}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;var f,c=["=","-","~","^","+"],h="markup.heading",p=this.singleLineHeadingRe;if(l(n)==h){var v=d();while(++nu)while(a>u&&(!l(a)||f.value[0]=="["))a--;if(a>u){var y=e.getLine(a).length;return new s(u,i,a,y)}}else{var b=e.bgTokenizer.getState(n);if(b=="dissallowDelimitedBlock"){while(n-->0)if(e.bgTokenizer.getState(n).lastIndexOf("Block")==-1)break;a=n+1;if(au){var y=e.getLine(n).length;return new s(u,5,a,y-5)}}}}}.call(o.prototype)}),define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./asciidoc_highlight_rules").AsciidocHighlightRules,o=e("./folding/asciidoc").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){if(e=="listblock"){var r=/^((?:.+)?)([-+*][ ]+)/.exec(t);return r?(new Array(r[1].length+1)).join(" ")+r[2]:""}return this.$getIndent(t)},this.$id="ace/mode/asciidoc"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-asl.js b/www/js/ace/mode-asl.js new file mode 100644 index 000000000..3660eb6af --- /dev/null +++ b/www/js/ace/mode-asl.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/asl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="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",t="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",n="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",r="UnknownObj|IntObj|StrObj|BuffObj|PkgObj|FieldUnitObj|DeviceObj|EventObj|MethodObj|MutexObj|OpRegionObj|PowerResObj|ProcessorObj|ThermalZoneObj|BuffFieldObj|DDBHandleObj",s="__FILE__|__PATH__|__LINE__|__DATE__|__IASL__",o="One|Ones|Zero",u="Memory24|Processor",a=this.createKeywordMapper({keyword:e,"constant.numeric":o,"keyword.operator":t,"constant.language":s,"storage.type":r,"constant.library":n,"invalid.deprecated":u},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\[",next:"ignoredfield"},{token:"variable",regex:"\\Local[0-7]|\\Arg[0-6]"},{token:"keyword",regex:"#\\s*(?:define|elif|else|endif|error|if|ifdef|ifndef|include|includebuffer|line|pragma|undef|warning)\\b",next:"directive"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"constant.character",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[0-9]+\b/},{token:a,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",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],ignoredfield:[{token:"comment",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",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]*s',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.ASLHighlightRules=o}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/asl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asl_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./asl_highlight_rules").ASLHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/asl"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-assembly_arm32.js b/www/js/ace/mode-assembly_arm32.js new file mode 100644 index 000000000..c11e3f764 --- /dev/null +++ b/www/js/ace/mode-assembly_arm32.js @@ -0,0 +1,8 @@ +define("ace/mode/assembly_arm32_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:!0},{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:!0},{token:"constant.character.hexadecimal.assembly",regex:"#0x[A-F0-9]+",caseInsensitive:!0},{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()};s.metaData={fileTypes:["s"],name:"Assembly ARM32",scopeName:"source.assembly"},r.inherits(s,i),t.AssemblyARM32HighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&ua){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/astro_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=function(){function r(e){for(var t in this.$rules[e+"jsxAttributes"])if(this.$rules[e+"jsxAttributes"][t].token==="meta.tag.punctuation.tag-close.xml"){this.$rules[e+"jsxAttributes"][t].onMatch=function(t,n,r){return n==r[0]&&r.shift(),t.length==2&&(r[0]==this.nextState&&r[1]--,(!r[1]||r[1]<0)&&r.splice(0,2)),this.next=r[0]||e+"start",[{type:this.token,value:t}]};break}}i.call(this);var e={token:"paren.quasi.start",regex:/{/,next:function(e,t){return e!=="start"&&(e.indexOf("attribute-equals")!==-1?(t.splice(0),t.unshift("tag_stuff")):t.unshift(e)),"inline-js-start"}};for(var t in this.$rules){if(t.startsWith("js")||t.startsWith("css")||t.startsWith("comment"))continue;this.$rules[t].unshift(e)}this.$rules.start.unshift({token:"comment",regex:/^---$/,onMatch:function(e,t,n){return n.splice(0),this.token},next:"javascript-start"}),this.embedRules(s,"javascript-",[{regex:/^---$/,token:"comment",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}]),this.embedRules(s,"inline-js-");var n=[{regex:/}/,token:"paren.quasi.end",onMatch:function(e,t,n){return n[0]==="inline-js-start"?(n.shift(),this.next=n.shift(),this.next.indexOf("string")!==-1?"paren.quasi.end":"paren.rparen"):(this.next=n.shift()||"start",this.token)}},{regex:/{/,token:"paren.lparen",push:"inline-js-start"}];this.$rules["inline-js-start"].unshift(n),this.$rules["inline-js-no_regex"].unshift(n),r.call(this,"javascript-"),r.call(this,"inline-js-"),this.normalizeRules()};r.inherits(o,i),t.AstroHighlightRules=o}),define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour/xml").XmlBehaviour,s=function(){i.call(this)};r.inherits(s,i),t.HtmlBehaviour=s}),define("ace/mode/astro",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/astro_highlight_rules","ace/mode/behaviour/html"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./astro_highlight_rules").AstroHighlightRules,o=e("./behaviour/html").HtmlBehaviour,u=function(){i.call(this),this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.$id="ace/mode/astro"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-autohotkey.js b/www/js/ace/mode-autohotkey.js new file mode 100644 index 000000000..bea80fb96 --- /dev/null +++ b/www/js/ace/mode-autohotkey.js @@ -0,0 +1,8 @@ +define("ace/mode/autohotkey_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="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:!0},{token:"keyword.control.ahk",regex:"(?:\\b|^)(?:if|else|return|loop|break|for|while|global|local|byref)\\b",caseInsensitive:!0},{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:!0},{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:!0},{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:!0},{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:!0},{keywordMap:{"constant.language":e},regex:"\\w+\\b"},{keywordMap:{"variable.function":t},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()};s.metaData={name:"AutoHotKey",scopeName:"source.ahk",fileTypes:["ahk"],foldingStartMarker:"^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))",foldingStopMarker:"^\\s*\\*/|^\\s*\\}"},r.inherits(s,i),t.AutoHotKeyHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./autohotkey_highlight_rules").AutoHotKeyHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/autohotkey"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-basic.js b/www/js/ace/mode-basic.js new file mode 100644 index 000000000..3384d91ac --- /dev/null +++ b/www/js/ace/mode-basic.js @@ -0,0 +1,8 @@ +define("ace/mode/basic_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"keyword.control":"FOR|TO|NEXT|GOSUB|RETURN|IF|THEN|ELSE|GOTO|ON|WHILE|WEND|TRON|TROFF","entity.name":"Auto|Call|Chain|Clear|Close|Common|Cont|Data|MERGE|ALL|Delete|DIM|EDIT|END|ERASE|ERROR|FIELD|GET|INPUT|KILL|LET|LIST|LLIST|LOAD|LSET|RSET|MERGE|NEW|NULL|OPEN|OUT|POKE|PRINT|PUT|RANDOMIZE|READ|RENUM|RESTORE|RESUME|RUN|SAVE|STOP|SWAP|WAIT|WIDTH","keyword.operator":"Mod|And|Not|Or|Xor|Eqv|Imp","support.function":"ABS|ASC|ATN|CDBL|CINT|COS|CSNG|CVI|CVS|CVD|EOF|EXP|FIX|FRE|INP|INSTR|INT|LEN|LOC|LOG|LPOS|PEEK|POS|RND|SGN|SIN|SPC|SQR|TAB|TAN|USR|VAL|VARPTR"},"identifier",!0);this.$rules={start:[{token:"string",regex:/"(?:\\.|[^"\\])*"/},{token:"support.function",regex:/(HEX|CHR|INPUT|LEFT|MID|MKI|MKS|MKD|OCT|RIGHT|SPACE|STR|STRING)\$/},{token:"entity.name",regex:/(?:DEF\s(?:SEG|USR|FN[a-zA-Z]+)|LINE\sINPUT|L?PRINT#?(?:\sUSING)?|MID\$|ON\sERROR\sGOTO|OPTION\sBASE|WRITE#?|DATE\$|INKEY\$|TIME\$)/},{token:"variable",regex:/[a-zA-Z][a-zA-Z0-9_]{0,38}[$%!#]?(?=\s*=)/},{token:"keyword.operator",regex:/\\|=|\^|\*|\/|\+|\-|<|>|-/},{token:"paren.lparen",regex:/[([]/},{token:"paren.rparen",regex:/[\)\]]/},{token:"constant.numeric",regex:/[+-]?\d+(\.\d+)?([ED][+-]?\d+)?(?:[!#])?/},{token:"constant.numeric",regex:/&[HO]?[0-9A-F]+/},{token:"comment",regex:/REM\s+.*$/},{regex:"\\w+",token:e},{token:"punctiation",regex:/[,;]/}]},this.normalizeRules()};r.inherits(s,i),t.BasicHighlightRules=s}),define("ace/mode/folding/basic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.indentKeywords={tron:1,"while":1,"for":1,troff:-1,wend:-1,next:-1},this.foldingStartMarker=/(?:\s|^)(tron|while|for)\b/i,this.foldingStopMarker=/(?:\b)(troff|next|wend)\b/i,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i||s){var o=s?this.foldingStopMarker.exec(r):this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a==="keyword.control")return this.basicBlock(e,n,o.index+2)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword.control")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker),u=o&&o[1].toLowerCase();return this.indentKeywords[u]&&e.getTokenAt(n,o.index+2).type==="keyword.control"?"end":""},this.basicBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword.control")return;var a=u.value.toLowerCase(),f=[a],l=this.indentKeywords[a];if(!l)return;var c=l===-1?i.getCurrentTokenColumn():e.getLine(t).length,h=t;i.step=l===-1?i.stepBackward:i.stepForward;while(u=i.step()){a=u.value.toLowerCase();if(u.type!=="keyword.control"||!this.indentKeywords[a])continue;var p=l*this.indentKeywords[a];p>0?f.unshift(a):p<=0&&f.shift();if(f.length===0)break}if(!u)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,h,c):new s(h,c,t,i.getCurrentTokenColumn())}}.call(u.prototype)}),define("ace/mode/basic",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/basic_highlight_rules","ace/mode/folding/basic"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./basic_highlight_rules").BasicHighlightRules,o=e("./folding/basic").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(u,i),function(){this.lineCommentStart=["REM"],this.getMatching=function(e,t,n,r){if(t==undefined){var i=e.selection.lead;n=i.column,t=i.row}r==undefined&&(r=!0);var s=e.getTokenAt(t,n);if(s){var o=s.value.toLowerCase();if(o in this.indentKeywords)return this.foldingRules.basicBlock(e,t,n,r)}},this.$id="ace/mode/basic"}.call(u.prototype),t.Mode=u}); (function() { + window.require(["ace/mode/basic"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/www/js/ace/mode-batchfile.js b/www/js/ace/mode-batchfile.js new file mode 100644 index 000000000..0550234ae --- /dev/null +++ b/www/js/ace/mode-batchfile.js @@ -0,0 +1,8 @@ +define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{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()};s.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},r.inherits(s,i),t.BatchFileHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./batchfile_highlight_rules").BatchFileHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-bibtex.js b/www/js/ace/mode-bibtex.js new file mode 100644 index 000000000..97931bb05 --- /dev/null +++ b/www/js/ace/mode-bibtex.js @@ -0,0 +1,8 @@ +define("ace/mode/bibtex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};r.inherits(s,i),t.BibTeXHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/bibtex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bibtex_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./bibtex_highlight_rules").BibTeXHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/bibtex"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-c9search.js b/www/js/ace/mode-c9search.js new file mode 100644 index 000000000..35fe30f8a --- /dev/null +++ b/www/js/ace/mode-c9search.js @@ -0,0 +1,8 @@ +define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function o(e,t){try{return new RegExp(e,t)}catch(n){}}var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{tokenNames:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text","c9searchresults.keyword"],regex:/(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/,onMatch:function(e,t,n){var r=this.splitRegex.exec(e),i=this.tokenNames,s=[{type:i[0],value:r[1]},{type:i[1],value:r[2]}];r[3]&&(r[3]==" "?s[1]={type:i[1],value:r[2]+" "}:s.push({type:i[1],value:r[3]}));var o=n[1],u=r[4],a,f=0;if(o&&o.exec){o.lastIndex=0;while(a=o.exec(u)){var l=u.substring(f,a.index);f=o.lastIndex,l&&s.push({type:i[2],value:l});if(a[0])s.push({type:i[3],value:a[0]});else if(!l)break}}return f=0;c--){s=r[c];if(a.test(s))break}f=c}if(f!=l){var p=s.length;return a===o&&(p=s.search(/\(Found[^)]+\)$|$/)),new i(f,p,l,0)}}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c9search_highlight_rules").C9SearchHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/c9search").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c9search"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-c_cpp.js b/www/js/ace/mode-c_cpp.js new file mode 100644 index 000000000..8bbb17f6c --- /dev/null +++ b/www/js/ace/mode-c_cpp.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="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",r="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",s="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",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{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",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,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",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",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-cirru.js b/www/js/ace/mode-cirru.js new file mode 100644 index 000000000..1336df0ad --- /dev/null +++ b/www/js/ace/mode-cirru.js @@ -0,0 +1,8 @@ +define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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"}]}};r.inherits(s,i),t.CirruHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u=|<>|<|>|!|&&]"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"string",regex:'"',next:"string"},{token:"constant",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"}]}};r.inherits(s,i),t.ClojureHighlightRules=s}),define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\)/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\))/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingParensOutdent=i}),define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./clojure_highlight_rules").ClojureHighlightRules,o=e("./matching_parens_outdent").MatchingParensOutdent,u=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.minorIndentFunctions=["defn","defn-","defmacro","def","deftest","testing"],this.$toIndent=function(e){return e.split("").map(function(e){return/\s/.exec(e)?e:" "}).join("")},this.$calculateIndent=function(e,t){var n=this.$getIndent(e),r=0,i,s;for(var o=e.length-1;o>=0;o--){s=e[o],s==="("?(r--,i=!0):s==="("||s==="["||s==="{"?(r--,i=!1):(s===")"||s==="]"||s==="}")&&r++;if(r<0)break}if(!(r<0&&i))return r<0&&!i?this.$toIndent(e.substring(0,o+1)):r>0?(n=n.substring(0,n.length-t.length),n):n;o+=1;var u=o,a="";for(;;){s=e[o];if(s===" "||s===" ")return this.minorIndentFunctions.indexOf(a)!==-1?this.$toIndent(e.substring(0,u-1)+t):this.$toIndent(e.substring(0,o+1));if(s===undefined)return this.$toIndent(e.substring(0,u-1)+t);a+=e[o],o++}},this.getNextLineIndent=function(e,t,n){return this.$calculateIndent(t,n)},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/clojure",this.snippetFileId="ace/snippets/clojure"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-clue.js b/www/js/ace/mode-clue.js new file mode 100644 index 000000000..5a0dc7629 --- /dev/null +++ b/www/js/ace/mode-clue.js @@ -0,0 +1,8 @@ +define("ace/mode/clue_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["keyword.control.directive.clue","text","text"],regex:/(@version)( )(.+?(?=\n))/},{token:["keyword.control.macro.clue","text","text"],regex:/(@macro)( )([A-Za-z_][0-9A-Za-z_]*)/},{token:["keyword.control.import.clue","text","string"],regex:/(@import)( )(".*")/},{token:"meta.preprocessor.macro.invocation.clue",regex:/\$[A-Za-z_][0-9A-Za-z_]*!/},{token:"keyword.control.directive.clue",regex:/@(?:(?:else_)?(?:ifos|iflua|ifdef|ifndef|ifcmp|ifos|iflua|ifdef|ifcmp|if)|else|define|macro|error|print)/},{token:"constant.numeric.integer.hexadecimal.clue",regex:/\b0[xX][0-9A-Fa-f]+(?![pPeE.0-9])\b/},{token:"constant.numeric.float.hexadecimal.clue",regex:/\b0[xX][0-9A-Fa-f]+(?:\.[0-9A-Fa-f]+)?(?:[eE]-?\d*)?(?:[pP][-+]\d+)?\b/},{token:"constant.numeric.integer.clue",regex:/\b\d+(?![pPeE.0-9])/},{token:"constant.numeric.float.clue",regex:/\b\d+(?:\.\d+)?(?:[eE]-?\d*)?/},{token:"punctuation.definition.string.multilined.begin.clue",regex:/'/,push:[{token:"punctuation.definition.string.multilined.end.clue",regex:/'/,next:"pop"},{include:"#escaped_char"},{defaultToken:"string.quoted.single.clue"}]},{token:"punctuation.definition.string.multilined.begin.clue",regex:/"/,push:[{token:"punctuation.definition.string.multilined.end.clue",regex:/"/,next:"pop"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.clue"}]},{token:"punctuation.definition.string.multilined.begin.clue",regex:/`/,push:[{token:"punctuation.definition.string.multilined.end.clue",regex:/`/,next:"pop"},{include:"#escaped_char"},{defaultToken:"string.multiline.clue"}]},{token:"comment.line.double-dash.clue",regex:/\/\/.*/},{token:"punctuation.definition.comment.begin.clue",regex:/\/\*/,push:[{token:"punctuation.definition.comment.end.clue",regex:/\*\//,next:"pop"},{include:"#escaped_char"},{defaultToken:"comment.block.clue"}]},{token:"keyword.control.clue",regex:/\b(?:if|elseif|else|for|of|in|with|while|meta|until|fn|method|return|loop|enum|goto|continue|break|try|catch|match|default|macro)\b/},{token:"keyword.scope.clue",regex:/\b(?:local|global|static)\b/},{token:"constant.language.clue",regex:/\b(?:false|nil|true|_G|_VERSION|math\.(?:pi|huge))\b/},{token:"constant.language.ellipsis.clue",regex:/\.{3}(?!\.)/},{token:"keyword.operator.property.clue",regex:/\.|::/,next:"property_identifier"},{token:"keyword.operator.clue",regex:/\/_|\&|\||\!|\~|\?|\$|@|\+|-|%|#|\*|\/|\^|==?|<=?|>=?|\.{2}|\?\?=?|(?:&&|\|\|)=?/},{token:"variable.language.self.clue",regex:/\bself\b/},{token:"support.function.any-method.clue",regex:/\b[a-zA-Z_][a-zA-Z0-9_]*\b(?=\(\s*)/},{token:"variable.other.clue",regex:/[A-Za-z_][0-9A-Za-z_]*/}],"#escaped_char":[{token:"constant.character.escape.clue",regex:/\\[abfnrtvz\\"'$]/},{token:"constant.character.escape.byte.clue",regex:/\\\d{1,3}/},{token:"constant.character.escape.byte.clue",regex:/\\x[0-9A-Fa-f][0-9A-Fa-f]/},{token:"constant.character.escape.unicode.clue",regex:/\\u\{[0-9A-Fa-f]+\}/},{token:"invalid.illegal.character.escape.clue",regex:/\\./}],property_identifier:[{token:"variable.other.property.clue",regex:/[A-Za-z_][0-9A-Za-z_]*/,next:"start"},{token:"",regex:"",next:"start"}]},this.normalizeRules()};s.metaData={name:"Clue",scopeName:"source.clue"},r.inherits(s,i),t.ClueHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/clue",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clue_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./clue_highlight_rules").ClueHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.$id="ace/mode/clue"}.call(u.prototype),t.Mode=u}); (function() { + window.require(["ace/mode/clue"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/www/js/ace/mode-cobol.js b/www/js/ace/mode-cobol.js new file mode 100644 index 000000000..cd14305b9 --- /dev/null +++ b/www/js/ace/mode-cobol.js @@ -0,0 +1,8 @@ +define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\*.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,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+"}]}};r.inherits(s,i),t.CobolHighlightRules=s}),define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cobol_highlight_rules").CobolHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-coffee.js b/www/js/ace/mode-coffee.js new file mode 100644 index 000000000..9dfc692e1 --- /dev/null +++ b/www/js/ace/mode-coffee.js @@ -0,0 +1,8 @@ +define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="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",n="true|false|null|undefined|NaN|Infinity",r="case|const|function|var|void|with|enum|implements|interface|let|package|private|protected|public|static",i="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",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?: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:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{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:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.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*)("+r+")"},{token:"punctuation.operator",regex:"\\.{1,3}"},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{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()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|\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(t,n,r){var i=this.$getIndent(n),s=this.getTokenizer().getLineTokens(n,t).tokens;return(!s.length||s[s.length-1].type!=="comment")&&t==="start"&&e.test(n)&&(i+=r),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/coffee",this.snippetFileId="ace/snippets/coffee"}.call(l.prototype),t.Mode=l}); (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/www/js/ace/mode-coldfusion.js b/www/js/ace/mode-coldfusion.js new file mode 100644 index 000000000..fc2e0c3aa --- /dev/null +++ b/www/js/ace/mode-coldfusion.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./html_highlight_rules").HtmlHighlightRules,o=function(){s.call(this),this.$rules.tag[2].token=function(e,t){var n=t.slice(0,2)=="cf"?"keyword":"meta.tag";return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml",n+".tag-name.xml"]};var e=Object.keys(this.$rules).filter(function(e){return/^(js|css)-/.test(e)});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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules,s=e("./csound_score_highlight_rules").CsoundScoreHighlightRules,o=e("./html_highlight_rules").HtmlHighlightRules,u=e("./text_highlight_rules").TextHighlightRules,a=function(){var e=new i("csound-"),t=new s("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:e.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:t.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(e.getRules(),e.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(t.getRules(),t.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(o,"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()};r.inherits(a,u),t.CsoundDocumentHighlightRules=a}),define("ace/mode/csound_document",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_document_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./csound_document_highlight_rules").CsoundDocumentHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/csound_document",this.snippetFileId="ace/snippets/csound_document"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-csound_orchestra.js b/www/js/ace/mode-csound_orchestra.js new file mode 100644 index 000000000..262addadc --- /dev/null +++ b/www/js/ace/mode-csound_orchestra.js @@ -0,0 +1,8 @@ +define("ace/mode/csound_preprocessor_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){this.embeddedRulePrefix=e===undefined?"":e,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 t=[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:t,"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"},t],"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"}),t]}};r.inherits(s,i),function(){this.pushRule=function(e){if(Array.isArray(e.next))for(var t=0;t1?r[r.length-1]:r.pop(),e.token}}}}.call(s.prototype),t.CsoundPreprocessorHighlightRules=s}),define("ace/mode/csound_score_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules,s=function(e){i.call(this,e),this.quotedStringContents.push({token:"invalid.illegal.csound-score",regex:/[^"]*$/});var t=this.$rules.start;t.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":[t,this.popRule({token:"punctuation.braced-loop.end.csound-score",regex:/}/})]}),this.normalizeRules()};r.inherits(s,i),t.CsoundScoreHighlightRules=s}),define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="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",r="string|package|os|io|math|debug|table|coroutine",i="setn|foreach|foreachi|gcinfo|log10|maxn",s=this.createKeywordMapper({keyword:e,"support.function":n,"keyword.deprecated":i,"constant.library":r,"constant.language":t,"variable.language":"self"},"identifier"),o="(?:(?:[1-9]\\d*)|(?:0))",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:"+o+"|"+u+")",f="(?:\\.\\d+)",l="(?:\\d+)",c="(?:(?:"+l+"?"+f+")|(?:"+l+"\\.))",h="(?:"+c+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment.body"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"string.start"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","string.end"},regex:/\]=*\]/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:a+"\\b"},{token:s,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()};r.inherits(s,i),t.LuaHighlightRules=s}),define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="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",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"variable.language":"self|cls","constant.language":t,keyword:e},"identifier"),i="[uU]?",s="[rR]",o="[fF]",u="(?:[rR][fF]|[fF][rR])",a="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",l="(?:0[xX][\\dA-Fa-f]+)",c="(?:0[bB][01]+)",h="(?:"+a+"|"+f+"|"+l+"|"+c+")",p="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",v="(?:\\d+)",m="(?:(?:"+v+"?"+d+")|(?:"+v+"\\.))",g="(?:(?:"+m+"|"+v+")"+p+")",y="(?:"+g+"|"+m+")",b="\\\\(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",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"string",regex:s+'"{3}',next:"rawqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rawqqstring"},{token:"string",regex:s+"'{3}",next:"rawqstring3"},{token:"string",regex:s+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",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:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",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:b},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",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",regex:"(?:"+y+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:y},{token:"constant.numeric",regex:h+"[lL]\\b"},{token:"constant.numeric",regex:h+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};r.inherits(s,i),t.PythonHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/lang"),i=e("../lib/oop"),s=e("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules,o=e("./csound_score_highlight_rules").CsoundScoreHighlightRules,u=e("./lua_highlight_rules").LuaHighlightRules,a=e("./python_highlight_rules").PythonHighlightRules,f=function(e){s.call(this,e);var t=["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"],n=["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"];t=r.arrayToMap(t),n=r.arrayToMap(n),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 i=this.$rules.start;i.splice(1,0,{token:["text.csound","entity.name.label.csound","entity.punctuation.label.csound","text.csound"],regex:/^([ \t]*)(\w+)(:)([ \t]+|$)/}),i.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:"\\+=|-=|\\*=|/=|<<|>>|<=|>=|==|!=|&&|\\|\\||[~\u00ac]|[=!+\\-*/^%&|<>#?:]"},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(e,r,i,s){var o=e.split(this.splitRegex),u=o[1],a;return t.hasOwnProperty(u)?a="support.function.csound":n.hasOwnProperty(u)&&(a="invalid.deprecated.csound"),a?o[2]?[{type:a,value:u},{type:"punctuation.type-annotation.csound",value:o[2]},{type:"type-annotation.storage.type.csound",value:o[3]}]:a:"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 f=new o("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:/,/}),i],"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:f.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 l=[this.popRule({token:"punctuation.definition.string.end.csound",regex:/}}/})];this.embedRules(f.getRules(),f.embeddedRulePrefix,l),this.embedRules(a,"python-",l),this.embedRules(u,"lua-",l),this.normalizeRules()};i.inherits(f,s),t.CsoundOrchestraHighlightRules=f}),define("ace/mode/csound_orchestra",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_orchestra_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/csound_orchestra",this.snippetFileId="ace/snippets/csound_orchestra"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-csound_score.js b/www/js/ace/mode-csound_score.js new file mode 100644 index 000000000..ec747c145 --- /dev/null +++ b/www/js/ace/mode-csound_score.js @@ -0,0 +1,8 @@ +define("ace/mode/csound_preprocessor_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){this.embeddedRulePrefix=e===undefined?"":e,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 t=[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:t,"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"},t],"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"}),t]}};r.inherits(s,i),function(){this.pushRule=function(e){if(Array.isArray(e.next))for(var t=0;t1?r[r.length-1]:r.pop(),e.token}}}}.call(s.prototype),t.CsoundPreprocessorHighlightRules=s}),define("ace/mode/csound_score_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules,s=function(e){i.call(this,e),this.quotedStringContents.push({token:"invalid.illegal.csound-score",regex:/[^"]*$/});var t=this.$rules.start;t.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":[t,this.popRule({token:"punctuation.braced-loop.end.csound-score",regex:/}/})]}),this.normalizeRules()};r.inherits(s,i),t.CsoundScoreHighlightRules=s}),define("ace/mode/csound_score",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_score_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./csound_score_highlight_rules").CsoundScoreHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/csound_score"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-csp.js b/www/js/ace/mode-csp.js new file mode 100644 index 000000000..cea2199b5 --- /dev/null +++ b/www/js/ace/mode-csp.js @@ -0,0 +1,8 @@ +define("ace/mode/csp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=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",!0);this.$rules={start:[{token:"string.link",regex:/https?:[^;\s]*/},{token:"operator.punctuation",regex:/;/},{token:e,regex:/[^\s;]+/}]}};r.inherits(s,i),t.CspHighlightRules=s}),define("ace/mode/csp",["require","exports","module","ace/mode/text","ace/mode/csp_highlight_rules","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./text").Mode,i=e("./csp_highlight_rules").CspHighlightRules,s=e("../lib/oop"),o=function(){this.HighlightRules=i};s.inherits(o,r),function(){this.$id="ace/mode/csp"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-css.js b/www/js/ace/mode-css.js new file mode 100644 index 000000000..9ae36133e --- /dev/null +++ b/www/js/ace/mode-css.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}); (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/www/js/ace/mode-csv.js b/www/js/ace/mode-csv.js new file mode 100644 index 000000000..d602749d7 --- /dev/null +++ b/www/js/ace/mode-csv.js @@ -0,0 +1,8 @@ +define("ace/mode/csv_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){i.call(this)};r.inherits(s,i),t.CsvHighlightRules=s}),define("ace/mode/csv",["require","exports","module","ace/lib/oop","ace/mode/text","ace/lib/lang","ace/mode/csv_highlight_rules"],function(e,t,n){"use strict";function f(e,t,n){var r=[],i=e.split(n.separatorRegex),s=n.spliter,o=n.quote||'"',u=(t||"start").split("-"),f=parseInt(u[1])||0,l=u[0]=="string",c=!l;for(var h=0;h))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/curly_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=function(){i.call(this),this.$rules.start.unshift({token:"variable",regex:"{{",push:"curly-start"}),this.$rules["curly-start"]=[{token:"variable",regex:"}}",next:"pop"}],this.normalizeRules()};r.inherits(s,i),t.CurlyHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./folding/html").FoldMode,u=e("./curly_highlight_rules").CurlyHighlightRules,a=function(){i.call(this),this.HighlightRules=u,this.$outdent=new s,this.foldingRules=new o};r.inherits(a,i),function(){this.$id="ace/mode/curly"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-cuttlefish.js b/www/js/ace/mode-cuttlefish.js new file mode 100644 index 000000000..ee713c378 --- /dev/null +++ b/www/js/ace/mode-cuttlefish.js @@ -0,0 +1,8 @@ +define("ace/mode/cuttlefish_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["conf"],keyEquivalent:"^~C",name:"Cuttlefish",scopeName:"source.conf"},r.inherits(s,i),t.CuttlefishHighlightRules=s}),define("ace/mode/cuttlefish",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cuttlefish_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cuttlefish_highlight_rules").CuttlefishHighlightRules,o=function(){this.HighlightRules=s,this.foldingRules=null,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.blockComment=null,this.$id="ace/mode/cuttlefish"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-d.js b/www/js/ace/mode-d.js new file mode 100644 index 000000000..126458452 --- /dev/null +++ b/www/js/ace/mode-d.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/d_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="this|super|import|module|body|mixin|__traits|invariant|alias|asm|delete|typeof|typeid|sizeof|cast|new|in|is|typedef|__vector|__parameters",t="break|case|continue|default|do|else|for|foreach|foreach_reverse|goto|if|return|switch|while|catch|try|throw|finally|version|assert|unittest|with",n="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",r="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",s="class|struct|union|template|interface|enum|macro",o={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}))"},u="null|true|false|__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__|__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__",a="/|/\\=|&|&\\=|&&|\\|\\|\\=|\\|\\||\\-|\\-\\=|\\-\\-|\\+|\\+\\=|\\+\\+|\\<|\\<\\=|\\<\\<|\\<\\<\\=|\\<\\>|\\<\\>\\=|\\>|\\>\\=|\\>\\>\\=|\\>\\>\\>\\=|\\>\\>|\\>\\>\\>|\\!|\\!\\=|\\!\\<\\>|\\!\\<\\>\\=|\\!\\<|\\!\\<\\=|\\!\\>|\\!\\>\\=|\\?|\\$|\\=|\\=\\=|\\*|\\*\\=|%|%\\=|\\^|\\^\\=|\\^\\^|\\^\\^\\=|~|~\\=|\\=\\>|#",f=this.$keywords=this.createKeywordMapper({"keyword.modifier":r,"keyword.control":t,"keyword.type":n,keyword:e,"keyword.storage":s,punctation:"\\.|\\,|;|\\.\\.|\\.\\.\\.","keyword.operator":a,"constant.language":u},"identifier"),l="[a-zA-Z_\u00a1-\uffff][a-zA-Z\\d_\u00a1-\uffff]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"star-comment"},{token:"comment.shebang",regex:"^\\s*#!.*"},{token:"comment",regex:"\\/\\+",next:"plus-comment"},{onMatch:function(e,t,n){return n.unshift(this.next,e.substr(2)),"string"},regex:'q"(?:[\\[\\(\\{\\<]+)',next:"operator-heredoc-string"},{onMatch:function(e,t,n){return n.unshift(this.next,e.substr(2)),"string"},regex:'q"(?:[a-zA-Z_]+)$',next:"identifier-heredoc-string"},{token:"string",regex:'[xr]?"',next:"quote-string"},{token:"string",regex:"[xr]?`",next:"backtick-string"},{token:"string",regex:"[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?"},{token:["keyword","text","paren.lparen"],regex:/(asm)(\s*)({)/,next:"d-asm"},{token:["keyword","text","paren.lparen","constant.language"],regex:"(__traits)(\\s*)(\\()("+l+")"},{token:["keyword","text","variable.module"],regex:"(import|module)(\\s+)((?:"+l+"\\.?)*)"},{token:["keyword.storage","text","entity.name.type"],regex:"("+s+")(\\s*)("+l+")"},{token:["keyword","text","variable.storage","text"],regex:"(alias|typedef)(\\s*)("+l+")(\\s*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b"},{token:"entity.other.attribute-name",regex:"@"+l},{token:f,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:a},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.|\\:"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],"star-comment":[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],"plus-comment":[{token:"comment",regex:"\\+\\/",next:"start"},{defaultToken:"comment"}],"quote-string":[o,{token:"string",regex:'"[cdw]?',next:"start"},{defaultToken:"string"}],"backtick-string":[o,{token:"string",regex:"`[cdw]?",next:"start"},{defaultToken:"string"}],"operator-heredoc-string":[{onMatch:function(e,t,n){e=e.substring(e.length-2,e.length-1);var r={">":"<","]":"[",")":"(","}":"{"};return Object.keys(r).indexOf(e)!=-1&&(e=r[e]),e!=n[1]?"string":(n.shift(),n.shift(),"string")},regex:'(?:[\\]\\)}>]+)"',next:"start"},{token:"string",regex:"[^\\]\\)}>]+"}],"identifier-heredoc-string":[{onMatch:function(e,t,n){return e=e.substring(0,e.length-1),e!=n[1]?"string":(n.shift(),n.shift(),"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(i,"doc-",[i.getEndRule("start")])};o.metaData={comment:"D language",fileTypes:["d","di"],firstLineMatch:"^#!.*\\b[glr]?dmd\\b.",foldingStartMarker:"(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))",foldingStopMarker:"(?f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/d",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/d_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./d_highlight_rules").DHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/d"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-dart.js b/www/js/ace/mode-dart.js new file mode 100644 index 000000000..745f4544b --- /dev/null +++ b/www/js/ace/mode-dart.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="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",r="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",s="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",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{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",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,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",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",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}),define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="true|false|null",t="this|super",n="try|catch|finally|throw|rethrow|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new|deferred|async|await",r="abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with|enum",s="static|final|const",o="void|bool|num|int|double|dynamic|var|String",u=this.createKeywordMapper({"constant.language.dart":e,"variable.language.dart":t,"keyword.control.dart":n,"keyword.declaration.dart":r,"storage.modifier.dart":s,"storage.type.primitive.dart":o},"identifier"),a=[{token:"constant.language.escape",regex:/\\./},{token:"text",regex:/\$(?:\w+|{[^"'}]+})?/},{defaultToken:"string"}];this.$rules={start:[{token:"comment",regex:/\/\/.*$/},i.getStartRule("doc-start"),{token:"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",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:u,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qdoc:[{token:"string",regex:"'''",next:"start"}].concat(a),qqdoc:[{token:"string",regex:'"""',next:"start"}].concat(a),qstring:[{token:"string",regex:"'|$",next:"start"}].concat(a),qqstring:[{token:"string",regex:'"|$',next:"start"}].concat(a)},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.DartHighlightRules=o}),define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp").Mode,s=e("./dart_highlight_rules").DartHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/dart",this.snippetFileId="ace/snippets/dart"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-diff.js b/www/js/ace/mode-diff.js new file mode 100644 index 000000000..9b32ae455 --- /dev/null +++ b/www/js/ace/mode-diff.js @@ -0,0 +1,8 @@ +define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:!0}]}};r.inherits(s,i),t.DiffHighlightRules=s}),define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/django",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./html").Mode,s=e("./html_highlight_rules").HtmlHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=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"}]}};r.inherits(u,o);var a=function(){this.$rules=(new s).getRules();for(var e in this.$rules)this.$rules[e].unshift({token:"comment.line",regex:"\\{#.*?#\\}"},{token:"comment.block",regex:"\\{\\%\\s*comment\\s*\\%\\}",merge:!0,next:"django-comment"},{token:"constant.language",regex:"\\{\\{",next:"django-start"},{token:"constant.language",regex:"\\{\\%",next:"django-tag"}),this.embedRules(u,"django-",[{token:"comment.block",regex:"\\{\\%\\s*endcomment\\s*\\%\\}",merge:!0,next:"start"},{token:"constant.language",regex:"\\%\\}",next:"start"},{token:"constant.language",regex:"\\}\\}",next:"start"}])};r.inherits(a,s);var f=function(){i.call(this),this.HighlightRules=a};r.inherits(f,i),function(){this.$id="ace/mode/django",this.snippetFileId="ace/snippets/django"}.call(f.prototype),t.Mode=f}); (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/www/js/ace/mode-dockerfile.js b/www/js/ace/mode-dockerfile.js new file mode 100644 index 000000000..dc1bcd06c --- /dev/null +++ b/www/js/ace/mode-dockerfile.js @@ -0,0 +1,8 @@ +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.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",o=t.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",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\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:/`/},{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(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{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:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,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()};r.inherits(u,i),t.ShHighlightRules=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sh_highlight_rules").ShHighlightRules,o=e("../range").Range,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new o(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(a.prototype),t.Mode=a}),define("ace/mode/dockerfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/sh_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./sh_highlight_rules").ShHighlightRules,s=function(){i.call(this);var e=this.$rules.start;for(var t=0;t/},{token:"punctuation.operator",regex:/,|;/},{token:"paren.lparen",regex:/[\[{]/},{token:"paren.rparen",regex:/[\]}]/},{token:"comment",regex:/^#!.*$/},{token:function(n){return e.hasOwnProperty(n.toLowerCase())?"keyword":t.hasOwnProperty(n.toLowerCase())?"variable":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]}};r.inherits(u,s),t.DotHighlightRules=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./dot_highlight_rules").DotHighlightRules,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=o,this.$outdent=new s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/dot"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-drools.js b/www/js/ace/mode-drools.js new file mode 100644 index 000000000..01141e13e --- /dev/null +++ b/www/js/ace/mode-drools.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="[a-zA-Z_$][a-zA-Z0-9_$]*",t="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|yield|when|record|var|permits|(?:non\\-)?sealed",n="null|Infinity|NaN|undefined",r="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",s=this.createKeywordMapper({"variable.language":"this","constant.language":n,"support.function":r},"identifier");this.$rules={start:[{include:"comments"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{regex:"(open(?:\\s+))?module(?=\\s*\\w)",token:"keyword",next:[{regex:"{",token:"paren.lparen",push:[{regex:"}",token:"paren.rparen",next:"pop"},{include:"comments"},{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:"",next:"start"}]},{include:"statements"}],comments:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment.doc",regex:/\/\*\*(?!\/)/,push:"doc-start"},{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{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",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",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",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}],statements:[{token:["keyword","text","identifier"],regex:"(record)(\\s+)("+e+")\\b"},{token:"keyword",regex:"(?:"+t+")\\b"},{token:"storage.type.annotation",regex:"@"+e+"\\b"},{token:"entity.name.function",regex:e+"(?=\\()"},{token:s,regex:e+"\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]},this.embedRules(i,"doc-",[i.getEndRule("pop")]),this.normalizeRules()};r.inherits(o,s),t.JavaHighlightRules=o}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./java_highlight_rules").JavaHighlightRules,o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,u="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",a="[a-zA-Z\\$_\u00a1-\uffff][\\.a-zA-Z\\d\\$_\u00a1-\uffff]*",f=function(){var e="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",t="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",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":"null","support.class":t,"support.function":"retract|update|modify|insert"},"identifier"),r=function(){return[{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}]},i=function(e){return[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:e},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}]},f=function(e){return[{token:"comment.block",regex:"\\*\\/",next:e},{defaultToken:"comment.block"}]},l=function(){return[{token:n,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(i("block.comment"),[{token:"entity.name.type",regex:"@[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:["keyword","text","entity.name.type"],regex:"(package)(\\s+)("+a+")"},{token:["keyword","text","keyword","text","entity.name.type"],regex:"(import)(\\s+)(function)(\\s+)("+a+")"},{token:["keyword","text","entity.name.type"],regex:"(import)(\\s+)("+a+")"},{token:["keyword","text","entity.name.type","text","variable"],regex:"(global)(\\s+)("+a+")(\\s+)("+u+")"},{token:["keyword","text","keyword","text","entity.name.type"],regex:"(declare)(\\s+)(trait)(\\s+)("+u+")"},{token:["keyword","text","entity.name.type"],regex:"(declare)(\\s+)("+u+")"},{token:["keyword","text","entity.name.type"],regex:"(extends)(\\s+)("+a+")"},{token:["keyword","text"],regex:"(rule)(\\s+)",next:"asset.name"}],r(),[{token:["variable.other","text","text"],regex:"("+u+")(\\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:/[\])}]/}],l()),"block.comment":f("start"),"asset.name":[{token:"entity.name",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"entity.name",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"entity.name",regex:u},{regex:"",token:"empty",next:"start"}]},this.embedRules(o,"doc-",[o.getEndRule("start")]),this.embedRules(s,"java-",[{token:"support.function",regex:"\\b(insert|modify|retract|update)\\b"},{token:"keyword",regex:"\\bend\\b",next:"start"}])};r.inherits(f,i),t.DroolsHighlightRules=f}),define("ace/mode/folding/drools",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){"use strict";function a(e,t,n,r){var s=n[0].length,o=e.getLength(),u=r,a=r;while(++ru){var l=e.getLine(a).length;return new i(u,s,a,l)}}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,s),function(){this.foldingStartMarker=/\b(rule|declare|query|when|then)\b/,this.foldingStopMarker=/\bend\b/,this.importRegex=/^import /,this.globalRegex=/^global /,this.getBaseFoldWidget=this.getFoldWidget,this.getFoldWidget=function(e,t,n){if(t==="markbegin"){var r=e.getLine(n);if(this.importRegex.test(r))if(n===0||!this.importRegex.test(e.getLine(n-1)))return"start";if(this.globalRegex.test(r))if(n===0||!this.globalRegex.test(e.getLine(n-1)))return"start"}return this.getBaseFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),s=r.match(this.foldingStartMarker);if(s&&s[1]){var u={row:n,column:r.length},f=new o(e,u.row,u.column),l="end",c=f.getCurrentToken();c.value=="when"&&(l="then");while(c){if(c.value==l)return i.fromPoints(u,{row:f.getCurrentTokenRow(),column:f.getCurrentTokenColumn()});c=f.stepForward()}}s=r.match(this.importRegex);if(s)return a(e,this.importRegex,s,n);s=r.match(this.globalRegex);if(s)return a(e,this.globalRegex,s,n)}}.call(u.prototype)}),define("ace/mode/drools",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/drools_highlight_rules","ace/mode/folding/drools"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./drools_highlight_rules").DroolsHighlightRules,o=e("./folding/drools").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/drools",this.snippetFileId="ace/snippets/drools"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-edifact.js b/www/js/ace/mode-edifact.js new file mode 100644 index 000000000..d7aa41bf1 --- /dev/null +++ b/www/js/ace/mode-edifact.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/edifact_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="UNH",t="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",e="UNH",n="null|Infinity|NaN|undefined",r="",s="BY|SE|ON|INV|JP|UNOA",o=this.createKeywordMapper({"variable.language":"this",keyword:s,"entity.name.segment":t,"entity.name.header":e,"constant.language":n,"support.function":r},"identifier");this.$rules={start:[{token:"punctuation.operator",regex:"\\+.\\+"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+"},{token:"punctuation.operator",regex:"\\:|'"},{token:"identifier",regex:"\\:D\\:"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};o.metaData={fileTypes:["edi"],keyEquivalent:"^~E",name:"Edifact",scopeName:"source.edifact"},r.inherits(o,s),t.EdifactHighlightRules=o}),define("ace/mode/edifact",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/edifact_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./edifact_highlight_rules").EdifactHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/edifact",this.snippetFileId="ace/snippets/edifact"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-eiffel.js b/www/js/ace/mode-eiffel.js new file mode 100644 index 000000000..83256b7a4 --- /dev/null +++ b/www/js/ace/mode-eiffel.js @@ -0,0 +1,8 @@ +define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="and|implies|or|xor",n="Void",r="True|False",i="Current|Result",s=this.createKeywordMapper({"constant.language":n,"constant.language.boolean":r,"variable.language":i,"keyword.operator":t,keyword:e},"identifier",!0),o=/(?:[^"%\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",regex:/"\[/,next:"aligned_verbatim_string"},{token:"string.quoted.other",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",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",regex:/:=|->|\.(?=\w)|[;,:?]/},{token:"keyword.operator",regex:/\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/},{token:function(e){var t=s(e);return t==="identifier"&&e===e.toUpperCase()&&(t="entity.name.type"),t},regex:/[a-zA-Z][a-zA-Z\d_]*\b/},{token:"text",regex:/\s+/}],aligned_verbatim_string:[{token:"string",regex:/]"/,next:"start"},{token:"string",regex:o}],"non-aligned_verbatim_string":[{token:"string.quoted.other",regex:/}"/,next:"start"},{token:"string.quoted.other",regex:o}]}};r.inherits(s,i),t.EiffelHighlightRules=s}),define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./eiffel_highlight_rules").EiffelHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/eiffel"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-ejs.js b/www/js/ace/mode-ejs.js new file mode 100644 index 000000000..a1f226abd --- /dev/null +++ b/www/js/ace/mode-ejs.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="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",t="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",n="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",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?: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})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",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:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{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",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",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\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","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()};r.inherits(d,i),t.RubyHighlightRules=d}),define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),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(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]){if(o[1]=="if"||o[1]=="else"||o[1]=="while"||o[1]=="until"||o[1]=="unless"){if(o[1]=="else"&&/^\s*else\s*$/.test(r)===!1)return;if(/^\s*(?:if|else|while|until|unless)\s*/.test(r)===!1)return}if(o[1]=="when"&&/\sthen\s/.test(r)===!0)return;if(e.getTokenAt(n,o.index+2).type==="keyword")return"start"}else{if(!o[3])return"start";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[3]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(!o[1])return"end";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]||i[3]?this.rubyBlock(e,n,i.index+2):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[3]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.rubyBlock(e,n,i.index+1):i[1]==="=end"&&e.getTokenAt(n,i.index+1).type==="comment.multiline"?this.rubyBlock(e,n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.rubyBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword"&&u.type!="comment.multiline")return;var a=u.value,f=e.getLine(t);switch(u.value){case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);if(!l.test(f))return;var c=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var c=1;break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f))return;var c=1;break;default:var c=this.indentKeywords[a]}var h=[a];if(!c)return;var p=c===-1?e.getLine(t-1).length:e.getLine(t).length,d=t,v=[];v.push(i.getCurrentTokenRange()),i.step=c===-1?i.stepBackward:i.stepForward;if(u.type=="comment.multiline")while(u=i.step()){if(u.type!=="comment.multiline")continue;if(c==1){p=6;if(u.value=="=end")break}else if(u.value=="=begin")break}else while(u=i.step()){var m=!1;if(u.type!=="keyword")continue;var g=c*this.indentKeywords[u.value];f=e.getLine(i.getCurrentTokenRow());switch(u.value){case"do":for(var y=i.$tokenIndex-1;y>=0;y--){var b=i.$rowTokens[y];if(b&&(b.value=="while"||b.value=="until"||b.value=="for")){g=0;break}}break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f)||a=="case")g=0,m=!0;break;case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);l.test(f)||(g=0,m=!0);break;case"when":if(/\sthen\s/.test(f)||a=="case")g=0,m=!0}if(g>0)h.unshift(u.value);else if(g<=0&&m===!1){h.shift();if(!h.length){if((a=="while"||a=="until"||a=="for")&&u.value!="do")break;if(u.value=="do"&&c==-1&&g!=0)break;if(u.value!="do")break}g===0&&h.unshift(u.value)}}if(!u)return null;if(r)return v.push(i.getCurrentTokenRange()),v;var t=i.getCurrentTokenRow();if(c===-1){if(u.type==="comment.multiline")var w=6;else var w=e.getLine(t).length;return new s(t,w,d-1,p)}return new s(d,p,t-1,e.getLine(t-1).length)}}.call(u.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("./folding/ruby").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/),u=t.match(/^\s*(class|def|module)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),f=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);if(o||u||a||f)r+=n}return r},this.checkOutdent=function(e,t,n){return/^\s+(end|else|rescue|ensure)$/.test(t+n)||this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){var r=t.getLine(n);if(/}/.test(r))return this.$outdent.autoOutdent(t,n);var i=this.$getIndent(r),s=t.getLine(n-1),o=this.$getIndent(s),a=t.getTabString();o.length<=i.length&&i.slice(-a.length)==a&&t.remove(new u(n,i.length-a.length,n,i.length))},this.getMatching=function(e,t,n){if(t==undefined){var r=e.selection.lead;n=r.column,t=r.row}var i=e.getTokenAt(t,n);if(i&&i.value in this.indentKeywords)return this.foldingRules.rubyBlock(e,t,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}.call(f.prototype),t.Mode=f}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=function(e,t){i.call(this),e||(e="(?:<%|<\\?|{{)"),t||(t="(?:%>|\\?>|}})");for(var n in this.$rules)this.$rules[n].unshift({token:"markup.list.meta.tag",regex:e+"(?![>}])[-=]?",push:"ejs-start"});this.embedRules((new s({jsx:!1})).getRules(),"ejs-",[{token:"markup.list.meta.tag",regex:"-?"+t,next:"pop"},{token:"comment",regex:"//.*?"+t,next:"pop"}]),this.normalizeRules()};r.inherits(o,i),t.EjsHighlightRules=o;var r=e("../lib/oop"),u=e("./html").Mode,a=e("./javascript").Mode,f=e("./css").Mode,l=e("./ruby").Mode,c=function(){u.call(this),this.HighlightRules=o,this.createModeDelegates({"js-":a,"css-":f,"ejs-":a})};r.inherits(c,u),function(){this.$id="ace/mode/ejs"}.call(c.prototype),t.Mode=c}); (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/www/js/ace/mode-elixir.js b/www/js/ace/mode-elixir.js new file mode 100644 index 000000000..8b1a4726b --- /dev/null +++ b/www/js/ace/mode-elixir.js @@ -0,0 +1,8 @@ +define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.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"},r.inherits(s,i),t.ElixirHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|<-|\u2192/},{token:"keyword.operator",regex:/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/},{token:"operator.punctuation",regex:/[,;`]/},{regex:r+i+"+\\.?",token:function(e){return e[e.length-1]=="."?"entity.name.function":"constant.language"}},{regex:"^"+n+i+"+",token:function(e){return"constant.language"}},{token:e,regex:"[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"},{regex:"{-#?",token:"comment.start",onMatch:function(e,t,n){return this.next=e.length==2?"blockComment":"docComment",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:t},{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()};r.inherits(s,i),t.ElmHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./elm_highlight_rules").ElmHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"{-",end:"-}",nestable:!0},this.$id="ace/mode/elm"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-erlang.js b/www/js/ace/mode-erlang.js new file mode 100644 index 000000000..9e9f3dd6d --- /dev/null +++ b/www/js/ace/mode-erlang.js @@ -0,0 +1,8 @@ +define("ace/mode/erlang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.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"},r.inherits(s,i),t.ErlangHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/erlang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/erlang_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./erlang_highlight_rules").ErlangHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="%",this.blockComment=null,this.$id="ace/mode/erlang",this.snippetFileId="ace/snippets/erlang"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-flix.js b/www/js/ace/mode-flix.js new file mode 100644 index 000000000..d58072d44 --- /dev/null +++ b/www/js/ace/mode-flix.js @@ -0,0 +1,8 @@ +define("ace/mode/flix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="use|checked_cast|checked_ecast|unchecked_cast|masked_cast|as|discard|from|into|inject|project|solve|query|where|select|force|import|region|red|deref",t="choose|debug|do|for|forA|forM|foreach|yield|if|else|case|match|typematch|try|catch|resume|spawn|par|branch|jumpto",n="not|and|or|fix",r="eff|def|law|enum|case|type|alias|class|instance|mod|let",i="with|without|opaque|lazy|lawful|pub|override|sealed|static",s="Unit|Bool|Char|Float32|Float64|Int8|Int16|Int32|Int64|BigInt|String",o=this.createKeywordMapper({keyword:e,"keyword.control":t,"keyword.operator":n,"storage.type":r,"storage.modifier":i,"support.type":s},"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",regex:"0x[a-fA-F0-9](_*[a-fA-F0-9])*(i8|i16|i32|i64|ii)?\\b"},{token:"constant.numeric",regex:"[0-9](_*[0-9])*\\.[0-9](_*[0-9])*(f32|f64)?\\b"},{token:"constant.numeric",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",regex:"(\\?\\?\\?|\\?[a-zA-Z0-9]+)"},{token:o,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",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",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",regex:"\\\\(u[0-9a-fA-F]{4})"},{token:"constant.character.escape",regex:"\\\\."},{token:"constant.character",regex:"'",next:"start"},{token:"constant.character",regex:"[^'\\\\]+"}]}};r.inherits(s,i),t.FlixHighlightRules=s}),define("ace/mode/flix",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/flix_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./flix_highlight_rules").FlixHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/flix"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-forth.js b/www/js/ace/mode-forth.js new file mode 100644 index 000000000..d946dd9b7 --- /dev/null +++ b/www/js/ace/mode-forth.js @@ -0,0 +1,8 @@ +define("ace/mode/forth_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:!0,push:[{token:"comment.block.documentation.forth",regex:"\\bENDDOC\\b",caseInsensitive:!0,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:!0},{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:!0}],"#string":[{token:"string.quoted.double.forth",regex:'(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',caseInsensitive:!0},{token:"string.unquoted.forth",regex:"(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)",caseInsensitive:!0}],"#variable":[{token:"variable.language.forth",regex:"\\b(?:I|J)\\b",caseInsensitive:!0}],"#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:!0},{token:"keyword.other.immediate.forth",regex:"(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT'S|])(?=\\s|$)",caseInsensitive:!0},{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:!0},{token:"keyword.other.compile-only.forth",regex:"(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\['\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]||DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.non-immediate.forth",regex:"(?:^|\\s)(?:'|||CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.warning.forth",regex:'(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',caseInsensitive:!0}],"#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:!0,push:[{token:"keyword.other.compile-only.forth",regex:";(?:CODE)?",caseInsensitive:!0,next:"pop"},{include:"#constant"},{include:"#comment"},{include:"#string"},{include:"#word"},{include:"#variable"},{include:"#storage"},{defaultToken:"meta.block.forth"}]}]},this.normalizeRules()};s.metaData={fileTypes:["frt","fs","ldr","fth","4th"],foldingStartMarker:"/\\*\\*|\\{\\s*$",foldingStopMarker:"\\*\\*/|^\\s*\\}",keyEquivalent:"^~F",name:"Forth",scopeName:"source.forth"},r.inherits(s,i),t.ForthHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/forth",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/forth_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./forth_highlight_rules").ForthHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment=null,this.$id="ace/mode/forth"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-fortran.js b/www/js/ace/mode-fortran.js new file mode 100644 index 000000000..3db53886e --- /dev/null +++ b/www/js/ace/mode-fortran.js @@ -0,0 +1,8 @@ +define("ace/mode/fortran_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="and|or|not|eq|ne|gt|ge|lt|le|AND|OR|NOT|EQ|NE|GT|GE|LT|LE",n="true|false|TRUE|FALSE",r="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",i="logical|character|integer|real|type|LOGICAL|CHARACTER|INTEGER|REAL|TYPE",s="allocatable|dimension|intent|parameter|pointer|target|private|public|ALLOCATABLE|DIMENSION|INTENT|PARAMETER|POINTER|TARGET|PRIVATE|PUBLIC",o=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":r,"constant.language":n,keyword:e,"keyword.operator":t,"storage.type":i,"storage.modifier":s},"identifier"),u="(?:r|u|ur|R|U|UR|Ur|uR)?",a="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",l="(?:0[xX][\\dA-Fa-f]+)",c="(?:0[bB][01]+)",h="(?:"+a+"|"+f+"|"+l+"|"+c+")",p="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",v="(?:\\d+)",m="(?:(?:"+v+"?"+d+")|(?:"+v+"\\.))",g="(?:(?:"+m+"|"+v+")"+p+")",y="(?:"+g+"|"+m+")",b="\\\\(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",regex:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+y+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:y},{token:"constant.numeric",regex:h+"[lL]\\b"},{token:"constant.numeric",regex:h+"\\b"},{token:"keyword",regex:"#\\s*(?:include|import|define|undef|INCLUDE|IMPORT|DEFINE|UNDEF)\\b"},{token:"keyword",regex:"#\\s*(?:endif|ifdef|else|elseif|ifndef|ENDIF|IFDEF|ELSE|ELSEIF|IFNDEF)\\b"},{token:o,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:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.FortranHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./fortran_highlight_rules").FortranHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="!",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={"return":1,"break":1,"continue":1,RETURN:1,BREAK:1,CONTINUE:1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/fortran"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-fsharp.js b/www/js/ace/mode-fsharp.js new file mode 100644 index 000000000..9ad2decb8 --- /dev/null +++ b/www/js/ace/mode-fsharp.js @@ -0,0 +1,8 @@ +define("ace/mode/fsharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=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"),t="(?:(?:(?:(?:(?:(?:\\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:"(?:"+t+"|\\d+)[jJ]\\b"},{token:"constant.float",regex:t},{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:e,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()};r.inherits(s,i),t.FSharpHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/fsharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsharp_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./fsharp_highlight_rules").FSharpHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"(*",end:"*)",nestable:!0},this.$id="ace/mode/fsharp"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-fsl.js b/www/js/ace/mode-fsl.js new file mode 100644 index 000000000..3963ec91f --- /dev/null +++ b/www/js/ace/mode-fsl.js @@ -0,0 +1,8 @@ +define("ace/mode/fsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["fsl","fsl_state"],name:"FSL",scopeName:"source.fsl"},r.inherits(s,i),t.FSLHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/fsl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsl_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./fsl_highlight_rules").FSLHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/fsl",this.snippetFileId="ace/snippets/fsl"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-ftl.js b/www/js/ace/mode-ftl.js new file mode 100644 index 000000000..12fe4f037 --- /dev/null +++ b/www/js/ace/mode-ftl.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="\\?|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",t="c|round|floor|ceiling",n="iso_[a-z_]+",r="first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk",i="keys|values",s="children|parent|root|ancestors|node_name|node_type|node_namespace",o="byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|eval|has_content|interpret|is_[a-z_]+|namespacenew",u=e+t+n+r+i+s+o,a="default|exists|if_exists|web_safe",f="data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|now|output_encoding|template_name|url_escaping_charset|vars|version",l="gt|gte|lt|lte|as|in|using",c="true|false",h="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:"\\?("+u+")"},{token:"support.function.deprecated",regex:"\\?("+a+")"},{token:"language.variable",regex:"\\.(?:"+f+")"},{token:"constant.language",regex:"\\b("+c+")\\b"},{token:"keyword.operator",regex:"\\b(?:"+l+")\\b"},{token:"entity.other.attribute-name",regex:h},{token:"string",regex:/['"]/,next:"qstring"},{token:function(e){return e.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")?"constant.numeric":"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"}]}};r.inherits(o,s);var u=function(){i.call(this);var e="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",t=[{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 r in this.$rules)this.$rules[r].unshift.apply(this.$rules[r],t);this.embedRules(o,"ftl-",n,["start"]),this.addRules({"ftl-dcomment":[{token:"comment",regex:"-->",next:"pop"},{defaultToken:"comment"}]}),this.normalizeRules()};r.inherits(u,i),t.FtlHighlightRules=u}),define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ftl_highlight_rules").FtlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/ftl"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-gcode.js b/www/js/ace/mode-gcode.js new file mode 100644 index 000000000..6e88e98a3 --- /dev/null +++ b/www/js/ace/mode-gcode.js @@ -0,0 +1,8 @@ +define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL",t="PI",n="ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\(.*\\)"},{token:"comment",regex:"([N])([0-9]+)"},{token:"string",regex:"([G])([0-9]+\\.?[0-9]?)"},{token:"string",regex:"([M])([0-9]+\\.?[0-9]?)"},{token:"constant.numeric",regex:"([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"},{token:r,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+"}]}};r.inherits(s,i),t.GcodeHighlightRules=s}),define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gcode_highlight_rules").GcodeHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/gcode"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-gherkin.js b/www/js/ace/mode-gherkin.js new file mode 100644 index 000000000..654ea20fe --- /dev/null +++ b/www/js/ace/mode-gherkin.js @@ -0,0 +1,8 @@ +define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})",o=function(){var e=[{name:"en",labels:"Feature|Background|Scenario(?: Outline)?|Examples",keywords:"Given|When|Then|And|But"}],t=e.map(function(e){return e.labels}).join("|"),n=e.map(function(e){return e.keywords}).join("|");this.$rules={start:[{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))"},{token:"comment",regex:"#.*$"},{token:"keyword",regex:"(?:"+t+"):|(?:"+n+")\\b"},{token:"keyword",regex:"\\*"},{token:"string",regex:'"{3}',next:"qqstring3"},{token:"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:s},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:s},{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()};r.inherits(o,i),t.GherkinHighlightRules=o}),define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gherkin_highlight_rules").GherkinHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gherkin",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=" ",s=this.getTokenizer().getLineTokens(t,e),o=s.tokens;return t.match("[ ]*\\|")&&(r+="| "),o.length&&o[o.length-1].type=="comment"?r:(e=="start"&&(t.match("Scenario:|Feature:|Scenario Outline:|Background:")?r+=i:t.match("(Given|Then).+(:)$|Examples:")?r+=i:t.match("\\*.+")&&(r+="* ")),r)}}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-gitignore.js b/www/js/ace/mode-gitignore.js new file mode 100644 index 000000000..c629fee5a --- /dev/null +++ b/www/js/ace/mode-gitignore.js @@ -0,0 +1,8 @@ +define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:/^\s*#.*$/},{token:"keyword",regex:/^\s*!.*$/}]},this.normalizeRules()};s.metaData={fileTypes:["gitignore"],name:"Gitignore"},r.inherits(s,i),t.GitignoreHighlightRules=s}),define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gitignore_highlight_rules").GitignoreHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gitignore"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-glsl.js b/www/js/ace/mode-glsl.js new file mode 100644 index 000000000..4e89266a2 --- /dev/null +++ b/www/js/ace/mode-glsl.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="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",r="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",s="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",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{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",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,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",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",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}),define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp_highlight_rules").c_cppHighlightRules,s=function(){var e="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",t="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",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t},"identifier");this.$rules=(new i).$rules,this.$rules.start.forEach(function(e){typeof e.token=="function"&&(e.token=n)})};r.inherits(s,i),t.glslHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp").Mode,s=e("./glsl_highlight_rules").glslHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.$id="ace/mode/glsl"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-gobstones.js b/www/js/ace/mode-gobstones.js new file mode 100644 index 000000000..efbfcb154 --- /dev/null +++ b/www/js/ace/mode-gobstones.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/gobstones_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e={standard:"program|procedure|function|interactive|return|let",type:"type|is|variant|record|field|case"},t={commands:{repetitions:"repeat|while|foreach|in",alternatives:"if|elseif|else|switch"},expressions:{alternatives:"choose|when|otherwise|matching|select|on"}},n={colors:"Verde|Rojo|Azul|Negro",cardinals:"Norte|Sur|Este|Oeste",booleans:"True|False",numbers:/([-]?)([0-9]+)\b/,strings:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r={commands:"Poner|Sacar|Mover|IrAlBorde|VaciarTablero|BOOM",expressions:"nroBolitas|hayBolitas|puedeMover|siguiente|previo|opuesto|minBool|maxBool|minDir|maxDir|minColor|maxColor|primero|sinElPrimero|esVac\u00eda|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_\u00d1|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_ESCAPEK_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_\u00d1|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_ESCAPEK_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_\u00d1|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_ESCAPEK_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_\u00d1|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_ESCAPEK_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_\u00d1|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_ESCAPEK_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_\u00d1|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_ESCAPEK_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_\u00d1|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_ESCAPEK_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_\u00d1|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"},i={commands:":=",expressions:{numeric:"\\+|\\-|\\*|\\^|div|mod",comparison:">=|<=|==|\\/=|>|<","boolean":"\\|\\||&&|not",other:"\\+\\+|<\\-|\\[|\\]|\\_|\\->"}},s={line:{double_slash:"\\/\\/.*$",double_dash:"\\-\\-.*$",number_sign:"#.*$"},block:{start:"\\/\\*",end:"\\*\\/"},block_alt:{start:"\\{\\-",end:"\\-\\}"}};this.$rules={start:[{token:"comment.line.double-slash.gobstones",regex:s.line.double_slash},{token:"comment.line.double-dash.gobstones",regex:s.line.double_dash},{token:"comment.line.number-sign.gobstones",regex:s.line.number_sign},{token:"comment.block.dash-asterisc.gobstones",regex:s.block.start,next:"block_comment_end"},{token:"comment.block.brace-dash.gobstones",regex:s.block_alt.start,next:"block_comment_alt_end"},{token:"constant.numeric.gobstones",regex:n.numbers},{token:"string.quoted.double.gobstones",regex:n.strings},{token:"keyword.operator.other.gobstones",regex:i.expressions.other},{token:"keyword.operator.numeric.gobstones",regex:i.expressions.numeric},{token:"keyword.operator.compare.gobstones",regex:i.expressions.comparison},{token:"keyword.operator.boolean.gobstones",regex:i.expressions.boolean},{token:this.createKeywordMapper({"storage.type.definitions.gobstones":e.standard,"storage.type.types.gobstones":e.type,"keyword.control.commands.repetitions.gobstones":t.commands.repetitions,"keyword.control.commands.alternatives.gobstones":t.commands.alternatives,"keyword.control.expressions.alternatives.gobstones":t.expressions.alternatives,"constant.language.colors.gobstones":n.colors,"constant.language.cardinals.gobstones":n.cardinals,"constant.language.boolean.gobstones":n.booleans,"support.function.gobstones":r.commands,"support.variable.gobstones":r.expressions,"variable.language.gobstones":r.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:s.block.end,next:"start"},{defaultToken:"comment.block.dash-asterisc.gobstones"}],block_comment_alt_end:[{token:"comment.block.brace-dash.gobstones",regex:s.block_alt.end,next:"start"},{defaultToken:"comment.block.brace-dash.gobstones"}]}};r.inherits(s,i),t.GobstonesHighlightRules=s}),define("ace/mode/gobstones",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/gobstones_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./gobstones_highlight_rules").GobstonesHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.createWorker=function(){return null},this.$id="ace/mode/gobstones",this.snippetFileId="ace/snippets/gobstones"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-golang.js b/www/js/ace/mode-golang.js new file mode 100644 index 000000000..690c5c6b0 --- /dev/null +++ b/www/js/ace/mode-golang.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="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",t="string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error",n="new|close|cap|copy|panic|panicln|print|println|len|make|delete|real|recover|imag|append",r="nil|true|false|iota",s=this.createKeywordMapper({keyword:e,"constant.language":r,"support.function":n,"support.type":t},""),o="\\\\(?:[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:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"string",regex:/"(?:[^"\\]|\\.)*?"/},{token:"string",regex:"`",next:"bqstring"},{token:"constant.numeric",regex:"'(?:[^\\'\ud800-\udbff]|[\ud800-\udbff][\udc00-\udfff]|"+o.replace('"',"")+")'"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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(e){return e[e.length-1]=="("?[{type:s(e.slice(0,-1))||"support.function",value:e.slice(0,-1)},{type:"paren.lparen",value:e.slice(-1)}]:s(e)||"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(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.GolangHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./golang_highlight_rules").GolangHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/golang"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-graphqlschema.js b/www/js/ace/mode-graphqlschema.js new file mode 100644 index 000000000..de63acc67 --- /dev/null +++ b/www/js/ace/mode-graphqlschema.js @@ -0,0 +1,8 @@ +define("ace/mode/graphqlschema_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="type|interface|union|enum|schema|input|implements|extends|scalar",t="Int|Float|String|ID|Boolean",n=this.createKeywordMapper({keyword:e,"storage.type":t},"identifier");this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};r.inherits(s,i),t.GraphQLSchemaHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/graphqlschema",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/graphqlschema_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./graphqlschema_highlight_rules").GraphQLSchemaHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/graphqlschema",this.snippetFileId="ace/snippets/graphqlschema"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-groovy.js b/www/js/ace/mode-groovy.js new file mode 100644 index 000000000..edf63d1e8 --- /dev/null +++ b/www/js/ace/mode-groovy.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="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",t="null|Infinity|NaN|undefined",n="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",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"support.function":n,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'"""',next:"qqstring"},{token:"string",regex:"'''",next:"qstring"},{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:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,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",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(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.GroovyHighlightRules=o}),define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./groovy_highlight_rules").GroovyHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/groovy"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-haml.js b/www/js/ace/mode-haml.js new file mode 100644 index 000000000..8969873f6 --- /dev/null +++ b/www/js/ace/mode-haml.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="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",t="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",n="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",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?: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})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",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:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{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",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",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\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","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()};r.inherits(d,i),t.RubyHighlightRules=d}),define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./ruby_highlight_rules"),o=s.RubyHighlightRules,u=function(){i.call(this),this.$rules={start:[{token:"comment.block",regex:/^\/$/,next:"comment"},{token:"comment.block",regex:/^\-#$/,next:"comment"},{token:"comment.line",regex:/\/\s*.*/},{token:"comment.line",regex:/-#\s*.*/},{token:"keyword.other.doctype",regex:"^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},s.qString,s.qqString,s.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"},s.constantNumericHex,s.constantNumericFloat,s.constantOtherSymbol,{token:"text",regex:/=|-|~/,next:"embedded_ruby"}],element_class:[{token:"keyword.attribute-name.class.haml",regex:/\.[\w-]+/},{token:"punctuation.section",regex:/\{/,next:"element_attributes"},s.constantOtherSymbol,{token:"empty",regex:"$|(?!\\.|#|\\{|\\[|=|-|~|\\/])",next:"start"}],element_attributes:[s.constantOtherSymbol,s.qString,s.qqString,s.tString,s.constantNumericHex,s.constantNumericFloat,{token:"punctuation.section",regex:/$|\}/,next:"start"}],embedded_ruby:[s.constantNumericHex,s.constantNumericFloat,s.instanceVariable,s.qString,s.qqString,s.tString,{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},{token:(new o).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",regex:/\s+.*/}]},this.normalizeRules()};r.inherits(u,i),t.HamlHighlightRules=u}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";function s(e,t){return t.splice(0,3),t.shift()||"start"}var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,o=function(){i.call(this);var e={regex:"(?={{)",push:"handlebars"};for(var t in this.$rules)this.$rules[t].unshift(e);this.$rules.handlebars=[{token:"comment.start",regex:"{{!--",push:[{token:"comment.end",regex:"--}}",next:s},{defaultToken:"comment"}]},{token:"comment.start",regex:"{{!",push:[{token:"comment.end",regex:"}}",next:s},{defaultToken:"comment"}]},{token:"support.function",regex:"{{{",push:[{token:"support.function",regex:"}}}",next:s},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]},{token:"storage.type.start",regex:"{{[#\\^/&]?",push:[{token:"storage.type.end",regex:"}}",next:s},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]}],this.normalizeRules()};r.inherits(o,i),t.HandlebarsHighlightRules=o}),define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour/xml").XmlBehaviour,s=function(){i.call(this)};r.inherits(s,i),t.HtmlBehaviour=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./handlebars_highlight_rules").HandlebarsHighlightRules,o=e("./behaviour/html").HtmlBehaviour,u=e("./folding/html").FoldMode,a=function(){i.call(this),this.HighlightRules=s,this.$behaviour=new o};r.inherits(a,i),function(){this.blockComment={start:"{{!--",end:"--}}"},this.$id="ace/mode/handlebars"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-haskell.js b/www/js/ace/mode-haskell.js new file mode 100644 index 000000000..9f6b4c0b5 --- /dev/null +++ b/www/js/ace/mode-haskell.js @@ -0,0 +1,8 @@ +define("ace/mode/haskell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["hs"],keyEquivalent:"^~H",name:"Haskell",scopeName:"source.haskell"},r.inherits(s,i),t.HaskellHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/haskell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./haskell_highlight_rules").HaskellHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment=null,this.$id="ace/mode/haskell",this.snippetFileId="ace/snippets/haskell"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-haskell_cabal.js b/www/js/ace/mode-haskell_cabal.js new file mode 100644 index 000000000..7e9e552a7 --- /dev/null +++ b/www/js/ace/mode-haskell_cabal.js @@ -0,0 +1,8 @@ +define("ace/mode/haskell_cabal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"^\\s*--.*$"},{token:["keyword"],regex:/^(\s*\w.*?)(:(?:\s+|$))/},{token:"constant.numeric",regex:/[\d_]+(?:(?:[\.\d_]*)?)/},{token:"constant.language.boolean",regex:"(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"markup.heading",regex:/^(\w.*)$/}]}};r.inherits(s,i),t.CabalHighlightRules=s}),define("ace/mode/folding/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.isHeading=function(e,t){var n="markup.heading",r=e.getTokens(t)[0];return t==0||r&&r.type.lastIndexOf(n,0)===0},this.getFoldWidget=function(e,t,n){if(this.isHeading(e,n))return"start";if(t==="markbeginend"&&!/^\s*$/.test(e.getLine(n))){var r=e.getLength();while(++nu)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var f=e.getLine(a).length;return new s(u,i,a,f)}}else if(this.getFoldWidget(e,t,n)==="end"){var a=n,f=e.getLine(a).length;while(--n>=0)if(this.isHeading(e,n))break;var r=e.getLine(n),i=r.length;return new s(n,i,a,f)}}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./haskell_cabal_highlight_rules").CabalHighlightRules,o=e("./folding/haskell_cabal").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment=null,this.$id="ace/mode/haskell_cabal"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-haxe.js b/www/js/ace/mode-haxe.js new file mode 100644 index 000000000..5c3682e30 --- /dev/null +++ b/www/js/ace/mode-haxe.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="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",t="null|true|false",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{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:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:n,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",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.HaxeHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./haxe_highlight_rules").HaxeHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/haxe"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-hjson.js b/www/js/ace/mode-hjson.js new file mode 100644 index 000000000..9978e801a --- /dev/null +++ b/www/js/ace/mode-hjson.js @@ -0,0 +1,8 @@ +define("ace/mode/hjson_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.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"},r.inherits(s,i),t.HjsonHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/hjson",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/hjson_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./hjson_highlight_rules").HjsonHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/hjson"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-html.js b/www/js/ace/mode-html.js new file mode 100644 index 000000000..5498e281c --- /dev/null +++ b/www/js/ace/mode-html.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}); (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/www/js/ace/mode-html_elixir.js b/www/js/ace/mode-html_elixir.js new file mode 100644 index 000000000..ac2ffe6ee --- /dev/null +++ b/www/js/ace/mode-html_elixir.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.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"},r.inherits(s,i),t.ElixirHighlightRules=s}),define("ace/mode/html_elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/elixir_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./elixir_highlight_rules").ElixirHighlightRules,o=function(){i.call(this);var e=[{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"}],t=[{token:"support.elixir_tag",regex:"%>",next:"pop"},{token:"comment",regex:"#(?:[^%]|%[^>])*"}];for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.embedRules(s,"elixir-",t,["start"]),this.normalizeRules()};r.inherits(o,i),t.HtmlElixirHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="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",t="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",n="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",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?: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})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",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:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{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",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",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\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","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()};r.inherits(d,i),t.RubyHighlightRules=d}),define("ace/mode/html_ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./ruby_highlight_rules").RubyHighlightRules,o=function(){i.call(this);var e=[{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"}],t=[{token:"support.ruby_tag",regex:"%>",next:"pop"},{token:"comment",regex:"#(?:[^%]|%[^>])*"}];for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.embedRules(s,"ruby-",t,["start"]),this.normalizeRules()};r.inherits(o,i),t.HtmlRubyHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),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(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]){if(o[1]=="if"||o[1]=="else"||o[1]=="while"||o[1]=="until"||o[1]=="unless"){if(o[1]=="else"&&/^\s*else\s*$/.test(r)===!1)return;if(/^\s*(?:if|else|while|until|unless)\s*/.test(r)===!1)return}if(o[1]=="when"&&/\sthen\s/.test(r)===!0)return;if(e.getTokenAt(n,o.index+2).type==="keyword")return"start"}else{if(!o[3])return"start";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[3]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(!o[1])return"end";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]||i[3]?this.rubyBlock(e,n,i.index+2):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[3]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.rubyBlock(e,n,i.index+1):i[1]==="=end"&&e.getTokenAt(n,i.index+1).type==="comment.multiline"?this.rubyBlock(e,n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.rubyBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword"&&u.type!="comment.multiline")return;var a=u.value,f=e.getLine(t);switch(u.value){case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);if(!l.test(f))return;var c=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var c=1;break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f))return;var c=1;break;default:var c=this.indentKeywords[a]}var h=[a];if(!c)return;var p=c===-1?e.getLine(t-1).length:e.getLine(t).length,d=t,v=[];v.push(i.getCurrentTokenRange()),i.step=c===-1?i.stepBackward:i.stepForward;if(u.type=="comment.multiline")while(u=i.step()){if(u.type!=="comment.multiline")continue;if(c==1){p=6;if(u.value=="=end")break}else if(u.value=="=begin")break}else while(u=i.step()){var m=!1;if(u.type!=="keyword")continue;var g=c*this.indentKeywords[u.value];f=e.getLine(i.getCurrentTokenRow());switch(u.value){case"do":for(var y=i.$tokenIndex-1;y>=0;y--){var b=i.$rowTokens[y];if(b&&(b.value=="while"||b.value=="until"||b.value=="for")){g=0;break}}break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f)||a=="case")g=0,m=!0;break;case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);l.test(f)||(g=0,m=!0);break;case"when":if(/\sthen\s/.test(f)||a=="case")g=0,m=!0}if(g>0)h.unshift(u.value);else if(g<=0&&m===!1){h.shift();if(!h.length){if((a=="while"||a=="until"||a=="for")&&u.value!="do")break;if(u.value=="do"&&c==-1&&g!=0)break;if(u.value!="do")break}g===0&&h.unshift(u.value)}}if(!u)return null;if(r)return v.push(i.getCurrentTokenRange()),v;var t=i.getCurrentTokenRow();if(c===-1){if(u.type==="comment.multiline")var w=6;else var w=e.getLine(t).length;return new s(t,w,d-1,p)}return new s(d,p,t-1,e.getLine(t-1).length)}}.call(u.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("./folding/ruby").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/),u=t.match(/^\s*(class|def|module)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),f=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);if(o||u||a||f)r+=n}return r},this.checkOutdent=function(e,t,n){return/^\s+(end|else|rescue|ensure)$/.test(t+n)||this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){var r=t.getLine(n);if(/}/.test(r))return this.$outdent.autoOutdent(t,n);var i=this.$getIndent(r),s=t.getLine(n-1),o=this.$getIndent(s),a=t.getTabString();o.length<=i.length&&i.slice(-a.length)==a&&t.remove(new u(n,i.length-a.length,n,i.length))},this.getMatching=function(e,t,n){if(t==undefined){var r=e.selection.lead;n=r.column,t=r.row}var i=e.getTokenAt(t,n);if(i&&i.value in this.indentKeywords)return this.foldingRules.rubyBlock(e,t,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}.call(f.prototype),t.Mode=f}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_ruby_highlight_rules").HtmlRubyHighlightRules,s=e("./html").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./ruby").Mode,f=function(){s.call(this),this.HighlightRules=i,this.createModeDelegates({"js-":o,"css-":u,"ruby-":a})};r.inherits(f,s),function(){this.$id="ace/mode/html_ruby"}.call(f.prototype),t.Mode=f}); (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/www/js/ace/mode-ini.js b/www/js/ace/mode-ini.js new file mode 100644 index 000000000..0655e50e8 --- /dev/null +++ b/www/js/ace/mode-ini.js @@ -0,0 +1,8 @@ +define("ace/mode/ini_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})",o=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:s},{defaultToken:"string.quoted.single.ini"}]},{token:"punctuation.definition.string.begin.ini",regex:'"',push:[{token:"constant.language.escape",regex:s},{token:"punctuation.definition.string.end.ini",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.ini"}]}]},this.normalizeRules()};o.metaData={fileTypes:["ini","conf"],keyEquivalent:"^~I",name:"Ini",scopeName:"source.ini"},r.inherits(o,i),t.IniHighlightRules=o}),define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++nl){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ini_highlight_rules").IniHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.blockComment=null,this.$id="ace/mode/ini"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-io.js b/www/js/ace/mode-io.js new file mode 100644 index 000000000..00909f510 --- /dev/null +++ b/www/js/ace/mode-io.js @@ -0,0 +1,8 @@ +define("ace/mode/io_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["io"],keyEquivalent:"^~I",name:"Io",scopeName:"source.io"},r.inherits(s,i),t.IoHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/io",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/io_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./io_highlight_rules").IoHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/io",this.snippetFileId="ace/snippets/io"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-ion.js b/www/js/ace/mode-ion.js new file mode 100644 index 000000000..358b02855 --- /dev/null +++ b/www/js/ace/mode-ion.js @@ -0,0 +1,8 @@ +define("ace/mode/ion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="TRUE|FALSE",t=e,n="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",r=n,i=this.createKeywordMapper({"constant.language.bool.ion":t,"constant.language.null.ion":r},"constant.other.symbol.identifier.ion",!0),s={token:i,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=[s],this.normalizeRules()};r.inherits(s,i),t.IonHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ion_highlight_rules").IonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/ion"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-jack.js b/www/js/ace/mode-jack.js new file mode 100644 index 000000000..91aeb85a5 --- /dev/null +++ b/www/js/ace/mode-jack.js @@ -0,0 +1,8 @@ +define("ace/mode/jack_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"string",regex:'"',next:"string2"},{token:"string",regex:"'",next:"string1"},{token:"constant.numeric",regex:"-?0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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"}]}};r.inherits(s,i),t.JackHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./jack_highlight_rules").JackHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="--",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/jack"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-jade.js b/www/js/ace/mode-jade.js new file mode 100644 index 000000000..ee60adeb6 --- /dev/null +++ b/www/js/ace/mode-jade.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),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(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.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(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{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:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{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:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.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("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.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("|")),u=i.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("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?: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:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"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:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e="@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|or|and|when|not",t=e.split("|"),n=s.supportType.split("|"),r=this.createKeywordMapper({"support.constant":s.supportConstant,keyword:e,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"identifier",!0),i="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+i+")(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",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:i},{token:["support.function","paren.lparen","string","paren.rparen"],regex:"(url)(\\()(.*)(\\))"},{token:["support.function","paren.lparen"],regex:"(:extend|[a-z0-9_\\-]+)(\\()"},{token:function(e){return t.indexOf(e.toLowerCase())>-1?"keyword":"variable"},regex:"[@\\$][a-z0-9_\\-@\\$]*\\b"},{token:"variable",regex:"[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"},{token:function(e,t){return n.indexOf(e.toLowerCase())>-1?["support.type.property","text"]:["support.type.unknownProperty","text"]},regex:"([a-z0-9-_]+)(\\s*:)"},{token:"keyword",regex:"&"},{token:r,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:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(o,i),t.LessHighlightRules=o}),define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="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",n="true|false|null|undefined|NaN|Infinity",r="case|const|function|var|void|with|enum|implements|interface|let|package|private|protected|public|static",i="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",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?: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:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{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:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.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*)("+r+")"},{token:"punctuation.operator",regex:"\\.{1,3}"},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{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()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),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(e,t,n){"use strict";function l(e,t){return{token:"entity.name.function.jade",regex:"^\\s*\\:"+e,next:t+"start"}}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./markdown_highlight_rules").MarkdownHighlightRules,o=e("./scss_highlight_rules").ScssHighlightRules,u=e("./less_highlight_rules").LessHighlightRules,a=e("./coffee_highlight_rules").CoffeeHighlightRules,f=e("./javascript_highlight_rules").JavaScriptHighlightRules,c=function(){var e="\\\\(?: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:"keyword.control.import.include.jade",regex:"\\s*\\binclude\\b"},{token:"keyword.other.doctype.jade",regex:"^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},{onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/^\s*\/\//,next:"comment_block"},l("markdown","markdown-"),l("sass","sass-"),l("less","less-"),l("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(e,t,n){return e.length<=n[1]?e.slice(-1)=="/"?(n[1]=e.length-2,this.next="","comment"):(n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","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:e},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"tag_attributes"}],qstring:[{token:"constant.language.escape",regex:e},{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"tag_attributes"}]},this.embedRules(f,"js-",[{token:"text",regex:".$",next:"start"}])};r.inherits(c,i),t.JadeHighlightRules=c}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="[a-zA-Z_$][a-zA-Z0-9_$]*",t="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|yield|when|record|var|permits|(?:non\\-)?sealed",n="null|Infinity|NaN|undefined",r="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",s=this.createKeywordMapper({"variable.language":"this","constant.language":n,"support.function":r},"identifier");this.$rules={start:[{include:"comments"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{regex:"(open(?:\\s+))?module(?=\\s*\\w)",token:"keyword",next:[{regex:"{",token:"paren.lparen",push:[{regex:"}",token:"paren.rparen",next:"pop"},{include:"comments"},{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:"",next:"start"}]},{include:"statements"}],comments:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment.doc",regex:/\/\*\*(?!\/)/,push:"doc-start"},{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{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",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",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",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}],statements:[{token:["keyword","text","identifier"],regex:"(record)(\\s+)("+e+")\\b"},{token:"keyword",regex:"(?:"+t+")\\b"},{token:"storage.type.annotation",regex:"@"+e+"\\b"},{token:"entity.name.function",regex:e+"(?=\\()"},{token:s,regex:e+"\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]},this.embedRules(i,"doc-",[i.getEndRule("pop")]),this.normalizeRules()};r.inherits(o,s),t.JavaHighlightRules=o}),define("ace/mode/folding/java",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.importRegex=/^import /,this.getCStyleFoldWidget=this.getFoldWidget,this.getFoldWidget=function(e,t,n){if(t==="markbegin"){var r=e.getLine(n);if(this.importRegex.test(r))if(n==0||!this.importRegex.test(e.getLine(n-1)))return"start"}return this.getCStyleFoldWidget(e,t,n)},this.getCstyleFoldWidgetRange=this.getFoldWidgetRange,this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n),o=i.match(this.importRegex);if(!o||t!=="markbegin")return this.getCstyleFoldWidgetRange(e,t,n,r);var u=o[0].length,a=e.getLength(),f=n,l=n;while(++nf){var c=e.getLine(l).length;return new s(f,u,l,c)}}}.call(o.prototype)}),define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules","ace/mode/folding/java"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./java_highlight_rules").JavaHighlightRules,o=e("./folding/java").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/java",this.snippetFileId="ace/snippets/java"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-javascript.js b/www/js/ace/mode-javascript.js new file mode 100644 index 000000000..5c535e5c5 --- /dev/null +++ b/www/js/ace/mode-javascript.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}); (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/www/js/ace/mode-jexl.js b/www/js/ace/mode-jexl.js new file mode 100644 index 000000000..0418988a8 --- /dev/null +++ b/www/js/ace/mode-jexl.js @@ -0,0 +1,8 @@ +define("ace/mode/jexl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="return|var|function|and|or|not|if|for|while|do|continue|break",t="null",n="empty|size|new",r=this.createKeywordMapper({keyword:e,"constant.language":t,"support.function":n},"identifier"),i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}||.)";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"##.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:["comment","text"],regex:"(#pragma)(\\s.*$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"`",push:[{token:"constant.language.escape",regex:i},{token:"string",regex:"`",next:"pop"},{token:"lparen",regex:"\\${",push:[{token:"rparen",regex:"}",next:"pop"},{include:"start"}]},{defaultToken:"string"}]},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",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:r,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()};r.inherits(s,i),t.JexlHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/jexl",["require","exports","module","ace/lib/oop","ace/mode/jexl_highlight_rules","ace/mode/text","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./jexl_highlight_rules").JexlHighlightRules,s=e("./text").Mode,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(u,s),function(){this.lineCommentStart=["//","##"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/jexl"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-json.js b/www/js/ace/mode-json.js new file mode 100644 index 000000000..0fd08b235 --- /dev/null +++ b/www/js/ace/mode-json.js @@ -0,0 +1,8 @@ +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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:"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",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(f,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(f.prototype),t.Mode=f}); (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/www/js/ace/mode-json5.js b/www/js/ace/mode-json5.js new file mode 100644 index 000000000..7c72e8b0d --- /dev/null +++ b/www/js/ace/mode-json5.js @@ -0,0 +1,8 @@ +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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:"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",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),define("ace/mode/json5_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/json_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./json_highlight_rules").JsonHighlightRules,s=function(){i.call(this);var e=[{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:!0},{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:!0},{token:"string",regex:/"|$/,next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:/[+-]?(?:Infinity|NaN)\b/}];for(var t in this.$rules)this.$rules[t].unshift.apply(this.$rules[t],e);this.normalizeRules()};r.inherits(s,i),t.Json5HighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./json5_highlight_rules").Json5HighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/json5"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-jsoniq.js b/www/js/ace/mode-jsoniq.js new file mode 100644 index 000000000..bf7defd40 --- /dev/null +++ b/www/js/ace/mode-jsoniq.js @@ -0,0 +1,8 @@ +define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"],function(e,t,n){n.exports=function r(t,n,i){function o(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[u]={exports:{}};t[u][0].call(c.exports,function(e){var n=t[u][1][e];return o(n?n:e)},c,c.exports,r,t,n,i)}return n[u].exports}var s=typeof e=="function"&&e;for(var u=0;ux?x:w),m=b,g=w,y=0):d(b,w,0,y,e)}function l(){g!=b&&(m=g,g=b,E.whitespace(m,g))}function c(e){var t;for(;;){t=C(e);if(t!=30)break}return t}function h(e){y==0&&(y=c(e),b=T,w=N)}function p(e){y==0&&(y=C(e),b=T,w=N)}function d(e,t,r,i,s){throw new n.ParseException(e,t,r,i,s)}function C(e){var t=!1;T=N;var n=N,r=i.INITIAL[e],s=0;for(var o=r&4095;o!=0;){var u,a=n>4;u=i.MAP1[(a&15)+i.MAP1[(f&31)+i.MAP1[f>>5]]]}else{if(a<56320){var f=n=56320&&f<57344&&(++n,a=((a&1023)<<10)+(f&1023)+65536,t=!0)}var l=0,c=5;for(var h=3;;h=c+l>>1){if(i.MAP2[h]>a)c=h-1;else{if(!(i.MAP2[6+h]c){u=0;break}}}s=o;var p=(u<<12)+o-1;o=i.TRANSITION[(p&15)+i.TRANSITION[p>>4]],o>4095&&(r=o,o&=4095,N=n)}r>>=12;if(r==0){N=n-1;var f=N=56320&&f<57344&&--N,d(T,N,s,-1,-1)}if(t)for(var v=r>>9;v>0;--v){--N;var f=N=56320&&f<57344&&--N}else N-=r>>9;return(r&511)-1}r(e,t);var n=this;this.ParseException=function(e,t,n,r,i){var s=e,o=t,u=n,a=r,f=i;this.getBegin=function(){return s},this.getEnd=function(){return o},this.getState=function(){return u},this.getExpected=function(){return f},this.getOffending=function(){return a},this.getMessage=function(){return a<0?"lexical analysis failed":"syntax error"}},this.getInput=function(){return S},this.getOffendingToken=function(e){var t=e.getOffending();return t>=0?i.TOKEN[t]:null},this.getExpectedTokenSet=function(e){var t;return e.getExpected()<0?t=i.getTokenSet(-e.getState()):t=[i.TOKEN[e.getExpected()]],t},this.getErrorMessage=function(e){var t=this.getExpectedTokenSet(e),n=this.getOffendingToken(e),r=S.substring(0,e.getBegin()),i=r.split("\n"),s=i.length,o=i[s-1].length+1,u=e.getEnd()-e.getBegin();return e.getMessage()+(n==null?"":", found "+n)+"\nwhile expecting "+(t.length==1?t[0]:"["+t.join(", ")+"]")+"\n"+(u==0||n!=null?"":"after successfully scanning "+u+" characters beginning ")+"at line "+s+", column "+o+":\n..."+S.substring(e.getBegin(),Math.min(S.length,e.getBegin()+64))+"..."},this.parse_start=function(){E.startNonterminal("start",g),h(14);switch(y){case 58:f(58);break;case 57:f(57);break;case 59:f(59);break;case 43:f(43);break;case 45:f(45);break;case 44:f(44);break;case 37:f(37);break;case 41:f(41);break;case 277:f(277);break;case 274:f(274);break;case 42:f(42);break;case 46:f(46);break;case 52:f(52);break;case 65:f(65);break;case 66:f(66);break;case 49:f(49);break;case 51:f(51);break;case 56:f(56);break;case 54:f(54);break;case 36:f(36);break;case 276:f(276);break;case 40:f(40);break;case 5:f(5);break;case 4:f(4);break;case 6:f(6);break;case 15:f(15);break;case 16:f(16);break;case 18:f(18);break;case 19:f(19);break;case 20:f(20);break;case 8:f(8);break;case 9:f(9);break;case 7:f(7);break;case 35:f(35);break;default:o()}E.endNonterminal("start",g)},this.parse_StartTag=function(){E.startNonterminal("StartTag",g),h(8);switch(y){case 61:f(61);break;case 53:f(53);break;case 29:f(29);break;case 60:f(60);break;case 37:f(37);break;case 41:f(41);break;default:f(35)}E.endNonterminal("StartTag",g)},this.parse_TagContent=function(){E.startNonterminal("TagContent",g),p(11);switch(y){case 25:f(25);break;case 9:f(9);break;case 10:f(10);break;case 58:f(58);break;case 57:f(57);break;case 21:f(21);break;case 31:f(31);break;case 275:f(275);break;case 278:f(278);break;case 274:f(274);break;default:f(35)}E.endNonterminal("TagContent",g)},this.parse_AposAttr=function(){E.startNonterminal("AposAttr",g),p(10);switch(y){case 23:f(23);break;case 27:f(27);break;case 21:f(21);break;case 31:f(31);break;case 275:f(275);break;case 278:f(278);break;case 274:f(274);break;case 41:f(41);break;default:f(35)}E.endNonterminal("AposAttr",g)},this.parse_QuotAttr=function(){E.startNonterminal("QuotAttr",g),p(9);switch(y){case 22:f(22);break;case 26:f(26);break;case 21:f(21);break;case 31:f(31);break;case 275:f(275);break;case 278:f(278);break;case 274:f(274);break;case 37:f(37);break;default:f(35)}E.endNonterminal("QuotAttr",g)},this.parse_CData=function(){E.startNonterminal("CData",g),p(1);switch(y){case 14:f(14);break;case 67:f(67);break;default:f(35)}E.endNonterminal("CData",g)},this.parse_XMLComment=function(){E.startNonterminal("XMLComment",g),p(0);switch(y){case 12:f(12);break;case 50:f(50);break;default:f(35)}E.endNonterminal("XMLComment",g)},this.parse_PI=function(){E.startNonterminal("PI",g),p(3);switch(y){case 13:f(13);break;case 62:f(62);break;case 63:f(63);break;default:f(35)}E.endNonterminal("PI",g)},this.parse_Pragma=function(){E.startNonterminal("Pragma",g),p(2);switch(y){case 11:f(11);break;case 38:f(38);break;case 39:f(39);break;default:f(35)}E.endNonterminal("Pragma",g)},this.parse_Comment=function(){E.startNonterminal("Comment",g),p(4);switch(y){case 55:f(55);break;case 44:f(44);break;case 32:f(32);break;default:f(35)}E.endNonterminal("Comment",g)},this.parse_CommentDoc=function(){E.startNonterminal("CommentDoc",g),p(6);switch(y){case 33:f(33);break;case 34:f(34);break;case 55:f(55);break;case 44:f(44);break;default:f(35)}E.endNonterminal("CommentDoc",g)},this.parse_QuotString=function(){E.startNonterminal("QuotString",g),p(5);switch(y){case 3:f(3);break;case 2:f(2);break;case 1:f(1);break;case 37:f(37);break;default:f(35)}E.endNonterminal("QuotString",g)},this.parse_AposString=function(){E.startNonterminal("AposString",g),p(7);switch(y){case 21:f(21);break;case 31:f(31);break;case 23:f(23);break;case 24:f(24);break;case 41:f(41);break;default:f(35)}E.endNonterminal("AposString",g)},this.parse_Prefix=function(){E.startNonterminal("Prefix",g),h(13),l(),a(),E.endNonterminal("Prefix",g)},this.parse__EQName=function(){E.startNonterminal("_EQName",g),h(12),l(),o(),E.endNonterminal("_EQName",g)};var v,m,g,y,b,w,E,S,x,T,N};r.getTokenSet=function(e){var t=[],n=e<0?-e:INITIAL[e]&4095;for(var i=0;i<279;i+=32){var s=i,o=(i>>5)*2066+n-1,u=o>>2,a=u>>2,f=r.EXPECTED[(o&3)+r.EXPECTED[(u&3)+r.EXPECTED[(a&3)+r.EXPECTED[a>>2]]]];for(;f!=0;f>>>=1,++s)(f&1)!=0&&t.push(r.TOKEN[s])}return t},r.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],r.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],r.MAP2=[57344,63744,64976,65008,65536,983040,63743,64975,65007,65533,983039,1114111,37,31,37,31,31,37],r.INITIAL=[1,2,49155,57348,5,6,7,8,9,10,11,12,13,14,15],r.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,3e4,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,1e3,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,2e3,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],r.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,2e3,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,3e3,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,3e3,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,2147483648,2147483648,2097152,2097152,2097152,536870912,0,0,134217728,33554432,1536,268435456,268435456,268435456,268435456,128,256,32,0,65536,131072,524288,16777216,268435456,2147483648,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,2147483648,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,2147483648,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,2147483648,0,0,524288,2147483648,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,2147483648,0,57344,6291456,8388608,100663296,134217728,2147483648,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,2147483648,0,1610612736,2147483648,0,0,1,524288,1048576,12582912,0,0,0,151311,264503296,2097152,8388608,33554432,1610612736,2147483648,262144,8388608,33554432,536870912,67108864,4194304,0,4194304,0,4194304,4194304,0,0,524288,8388608,536870912,1073741824,2147483648,1,4097,8388609,96,2048,32768,1073741824,2147483648,0,96,2048,2147483648,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,2147483648,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,2147483648,0,0,256,524288,2147483648,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,2147483648,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],r.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:l,next:function(e){e.pop()}}],CData:[{name:"CDataSectionContents",token:a},{name:p("]]>"),token:a,next:function(e){e.pop()}}],PI:[{name:"DirPIContents",token:c},{name:p("?"),token:c},{name:p("?>"),token:c,next:function(e){e.pop()}}],AposString:[{name:p("''"),token:"string",next:function(e){e.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:p('"'),token:"string",next:function(e){e.pop()}},{name:"JSONPredefinedCharRef",token:"constant.language.escape"},{name:"JSONCharRef",token:"constant.language.escape"},{name:"JSONChar",token:"string"}]};n.JSONiqLexer=function(){return new i(r,d)}},{"./JSONiqTokenizer":"/node_modules/xqlint/lib/lexers/JSONiqTokenizer.js","./lexer":"/node_modules/xqlint/lib/lexers/lexer.js"}],"/node_modules/xqlint/lib/lexers/lexer.js":[function(e,t,n){"use strict";var r=function(e){var t=e;this.tokens=[],this.reset=function(){t=t,this.tokens=[]},this.startNonterminal=function(){},this.endNonterminal=function(){},this.terminal=function(e,n,r){this.tokens.push({name:e,value:t.substring(n,r)})},this.whitespace=function(e,n){this.tokens.push({name:"WS",value:t.substring(e,n)})}};n.Lexer=function(e,t){this.tokens=[],this.getLineTokens=function(n,i){i=i==="start"||!i?'["start"]':i;var s=JSON.parse(i),o=new r(n),u=new e(n,o),a=[];for(;;){var f=s[s.length-1];try{o.tokens=[],u["parse_"+f]();var l=null;o.tokens.length>1&&o.tokens[0].name==="WS"&&(a.push({type:"text",value:o.tokens[0].value}),o.tokens.splice(0,1));var c=o.tokens[0],h=t[f];for(var p=0;p-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var s=n.getCursorPosition(),o=new u(r,s.row,s.column),f=o.getCurrentToken(),l=!1,e=JSON.parse(e).pop();if(f&&f.value===">"||e!=="StartTag")return;if(!f||!a(f,"meta.tag")&&(!a(f,"text")||!f.value.match("/"))){do f=o.stepBackward();while(f&&(a(f,"string")||a(f,"keyword.operator")||a(f,"entity.attribute-name")||a(f,"text")))}else l=!0;var c=o.stepBackward();if(!f||!a(f,"meta.tag")||c!==null&&c.value.match("/"))return;var h=f.value.substring(1);if(l)var h=h.substring(0,s.column-f.start);return{text:">",selection:[1,1]}}})};r.inherits(f,i),t.XQueryBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../worker/worker_client").WorkerClient,i=e("../lib/oop"),s=e("./text").Mode,o=e("./text_highlight_rules").TextHighlightRules,u=e("./xquery/jsoniq_lexer").JSONiqLexer,a=e("../range").Range,f=e("./behaviour/xquery").XQueryBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../anchor").Anchor,h=function(){this.$tokenizer=new u,this.$behaviour=new f,this.foldingRules=new l,this.$highlightRules=new o};i.inherits(h,s),function(){this.completer={getCompletions:function(e,t,n,r,i){if(!t.$worker)return i();t.$worker.emit("complete",{data:{pos:n,prefix:r}}),t.$worker.on("complete",function(e){i(null,e.data)})}},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=t.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);return i&&(r+=n),r},this.checkOutdent=function(e,t,n){return/^\s+$/.test(t)?/^\s*[\}\)]/.test(n):!1},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^(\s*[\}\)])/);if(!i)return 0;var s=i[1].length,o=t.findMatchingBracket({row:n,column:s});if(!o||o.row==n)return 0;var u=this.$getIndent(t.getLine(o.row));t.replace(new a(n,0,n,s-1),u)},this.toggleCommentLines=function(e,t,n,r){var i,s,o=!0,u=/^\s*\(:(.*):\)/;for(i=n;i<=r;i++)if(!u.test(t.getLine(i))){o=!1;break}var f=new a(0,0,0,0);for(i=n;i<=r;i++)s=t.getLine(i),f.start.row=i,f.end.row=i,f.end.column=s.length,t.replace(f,o?s.match(u)[1]:"(:"+s+":)")},this.createWorker=function(e){var t=new r(["ace"],"ace/mode/xquery_worker","XQueryWorker"),n=this;return t.attachToDocument(e.getDocument()),t.on("ok",function(t){e.clearAnnotations()}),t.on("markers",function(t){e.clearAnnotations(),n.addMarkers(t.data,e)}),t},this.removeMarkers=function(e){var t=e.getMarkers(!1);for(var n in t)t[n].clazz.indexOf("language_highlight_")===0&&e.removeMarker(n);for(var r=0;r))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="[a-zA-Z_$][a-zA-Z0-9_$]*",t="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|yield|when|record|var|permits|(?:non\\-)?sealed",n="null|Infinity|NaN|undefined",r="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",s=this.createKeywordMapper({"variable.language":"this","constant.language":n,"support.function":r},"identifier");this.$rules={start:[{include:"comments"},{include:"multiline-strings"},{include:"strings"},{include:"constants"},{regex:"(open(?:\\s+))?module(?=\\s*\\w)",token:"keyword",next:[{regex:"{",token:"paren.lparen",push:[{regex:"}",token:"paren.rparen",next:"pop"},{include:"comments"},{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:"",next:"start"}]},{include:"statements"}],comments:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment.doc",regex:/\/\*\*(?!\/)/,push:"doc-start"},{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{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",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",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",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}],statements:[{token:["keyword","text","identifier"],regex:"(record)(\\s+)("+e+")\\b"},{token:"keyword",regex:"(?:"+t+")\\b"},{token:"storage.type.annotation",regex:"@"+e+"\\b"},{token:"entity.name.function",regex:e+"(?=\\()"},{token:s,regex:e+"\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]},this.embedRules(i,"doc-",[i.getEndRule("pop")]),this.normalizeRules()};r.inherits(o,s),t.JavaHighlightRules=o}),define("ace/mode/jsp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/java_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./java_highlight_rules").JavaHighlightRules,o=function(){i.call(this);var e="request|response|out|session|application|config|pageContext|page|Exception",t="page|include|taglib",n=[{token:"comment",regex:"<%--",push:"jsp-dcomment"},{token:"meta.tag",regex:"<%@?|<%=?|<%!?|]+>",push:"jsp-start"}],r=[{token:"meta.tag",regex:"%>|<\\/jsp:[^>]+>",next:"pop"},{token:"variable.language",regex:e},{token:"keyword",regex:t}];for(var o in this.$rules)this.$rules[o].unshift.apply(this.$rules[o],n);this.embedRules(s,"jsp-",r,["start"]),this.addRules({"jsp-dcomment":[{token:"comment",regex:".*?--%>",next:"pop"}]}),this.normalizeRules()};r.inherits(o,i),t.JspHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./jsp_highlight_rules").JspHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.$id="ace/mode/jsp",this.snippetFileId="ace/snippets/jsp"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-jssm.js b/www/js/ace/mode-jssm.js new file mode 100644 index 000000000..7ef8e82e6 --- /dev/null +++ b/www/js/ace/mode-jssm.js @@ -0,0 +1,8 @@ +define("ace/mode/jssm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["jssm","jssm_state"],name:"JSSM",scopeName:"source.jssm"},r.inherits(s,i),t.JSSMHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/jssm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jssm_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./jssm_highlight_rules").JSSMHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/jssm"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-jsx.js b/www/js/ace/mode-jsx.js new file mode 100644 index 000000000..3d352c839 --- /dev/null +++ b/www/js/ace/mode-jsx.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/javascript"],function(e,t,n){"use strict";function s(){i.call(this),this.$highlightRuleConfig={jsx:!0}}var r=e("../lib/oop"),i=e("./javascript").Mode;r.inherits(s,i),function(){this.createWorker=function(){return null},this.$id="ace/mode/jsx"}.call(s.prototype),t.Mode=s}); (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/www/js/ace/mode-julia.js b/www/js/ace/mode-julia.js new file mode 100644 index 000000000..e6e20dc7d --- /dev/null +++ b/www/js/ace/mode-julia.js @@ -0,0 +1,8 @@ +define("ace/mode/julia_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.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"},r.inherits(s,i),t.JuliaHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./julia_highlight_rules").JuliaHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.blockComment="",this.$id="ace/mode/julia"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-kotlin.js b/www/js/ace/mode-kotlin.js new file mode 100644 index 000000000..4068dd170 --- /dev/null +++ b/www/js/ace/mode-kotlin.js @@ -0,0 +1,8 @@ +define("ace/mode/kotlin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=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:e,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()};s.metaData={fileTypes:["kt","kts"],name:"Kotlin",scopeName:"source.Kotlin"},r.inherits(s,i),t.KotlinHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/kotlin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./kotlin_highlight_rules").KotlinHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/kotlin"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-latex.js b/www/js/ace/mode-latex.js new file mode 100644 index 000000000..f430c831e --- /dev/null +++ b/www/js/ace/mode-latex.js @@ -0,0 +1,8 @@ +define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};r.inherits(s,i),t.LatexHighlightRules=s}),define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u={"\\subparagraph":1,"\\paragraph":2,"\\subsubsubsection":3,"\\subsubsection":4,"\\subsection":5,"\\section":6,"\\chapter":7,"\\part":8,"\\begin":9,"\\end":10},a=t.FoldMode=function(){};r.inherits(a,i),function(){this.foldingStartMarker=/^\s*\\(begin)|\s*\\(part|chapter|(?:sub)*(?:section|paragraph))\b|{\s*$/,this.foldingStopMarker=/^\s*\\(end)\b|^\s*}/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):i[2]?this.latexSection(e,n,i[0].length-1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.latexBlock=function(e,t,n,r){var i={"\\begin":1,"\\end":-1},u=new o(e,t,n),a=u.getCurrentToken();if(!a||a.type!="storage.type"&&a.type!="constant.character.escape")return;var f=a.value,l=i[f],c=function(){var e=u.stepForward(),t=e&&e.type=="lparen"?u.stepForward().value:"";return l===-1&&(u.stepBackward(),t&&u.stepBackward()),t},h=[c()],p=l===-1?u.getCurrentTokenColumn():e.getLine(t).length,d=t;u.step=l===-1?u.stepBackward:u.stepForward;while(a=u.step()){if(!a||a.type!="storage.type"&&a.type!="constant.character.escape")continue;var v=i[a.value];if(!v)continue;var m=c();if(v===l)h.unshift(m);else if(h.shift()!==m||!h.length)break}if(h.length)return;l==1&&(u.stepBackward(),u.stepBackward());if(r)return u.getCurrentTokenRange();var t=u.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,d,p):new s(d,p,t,u.getCurrentTokenColumn())},this.latexSection=function(e,t,n){var r=new o(e,t,n),i=r.getCurrentToken();if(!i||i.type!="storage.type")return;var a=u[i.value]||0,f=0,l=t;while(i=r.stepForward()){if(i.type!=="storage.type")continue;var c=u[i.value]||0;if(c>=9){f||(l=r.getCurrentTokenRow()-1),f+=c==9?1:-1;if(f<0)break}else if(c>=a)break}f||(l=r.getCurrentTokenRow()-1);while(l>t&&!/\S/.test(e.getLine(l)))l--;return new s(t,e.getLine(t).length,l,e.getLine(l).length)}}.call(a.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./latex_highlight_rules").LatexHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/latex").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=new o({braces:!0})};r.inherits(a,i),function(){this.type="text",this.lineCommentStart="%",this.$id="ace/mode/latex",this.getMatching=function(e,t,n){t==undefined&&(t=e.selection.lead),typeof t=="object"&&(n=t.column,t=t.row);var r=e.getTokenAt(t,n);if(!r)return;if(r.value=="\\begin"||r.value=="\\end")return this.foldingRules.latexBlock(e,t,n,!0)}}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-latte.js b/www/js/ace/mode-latte.js new file mode 100644 index 000000000..136e953a0 --- /dev/null +++ b/www/js/ace/mode-latte.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/latte_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){i.call(this);for(var e in this.$rules)this.$rules[e].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",regex:"\\/\\*",push:[{token:"comment.end.latte",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]},{token:"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:/\$\{[^"\}]+\}?/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"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",regex:"\\b(?:[A-Z0-9_]+)\\b"},{token:"string.unquoted",regex:"\\w+(?:-+\\w+)*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"::|=>|->|\\?->|\\?\\?->|\\+\\+|--|<<|>>|<=>|<=|>=|===|!==|==|!=|<>|&&|\\|\\||\\?\\?|\\?>|\\*\\*|\\.\\.\\.|[^'\"]"}],this.normalizeRules()};r.inherits(o,s),t.LatteHighlightRules=o}),define("ace/mode/latte",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/latte_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./latte_highlight_rules").LatteHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(){i.call(this),this.HighlightRules=s,this.$outdent=new o};r.inherits(u,i),function(){this.blockComment={start:"{*",end:"*}"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.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[^{]*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return/^\s+\{\/$/.test(t+n)},this.autoOutdent=function(e,t,n){},this.$id="ace/mode/latte"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-less.js b/www/js/ace/mode-less.js new file mode 100644 index 000000000..b99e18bbb --- /dev/null +++ b/www/js/ace/mode-less.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e="@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|or|and|when|not",t=e.split("|"),n=s.supportType.split("|"),r=this.createKeywordMapper({"support.constant":s.supportConstant,keyword:e,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"identifier",!0),i="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+i+")(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",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:i},{token:["support.function","paren.lparen","string","paren.rparen"],regex:"(url)(\\()(.*)(\\))"},{token:["support.function","paren.lparen"],regex:"(:extend|[a-z0-9_\\-]+)(\\()"},{token:function(e){return t.indexOf(e.toLowerCase())>-1?"keyword":"variable"},regex:"[@\\$][a-z0-9_\\-@\\$]*\\b"},{token:"variable",regex:"[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"},{token:function(e,t){return n.indexOf(e.toLowerCase())>-1?["support.type.property","text"]:["support.type.unknownProperty","text"]},regex:"([a-z0-9-_]+)(\\s*:)"},{token:"keyword",regex:"&"},{token:r,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:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(o,i),t.LessHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./less_highlight_rules").LessHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./css_completions").CssCompletions,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.$completer=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions("ruleset",t,n,r)},this.$id="ace/mode/less"}.call(l.prototype),t.Mode=l}); (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/www/js/ace/mode-liquid.js b/www/js/ace/mode-liquid.js new file mode 100644 index 000000000..45542f545 --- /dev/null +++ b/www/js/ace/mode-liquid.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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:"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",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(f,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(f.prototype),t.Mode=f}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules").CssHighlightRules,o=e("./html_highlight_rules").HtmlHighlightRules,u=e("./json_highlight_rules").JsonHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,f=function(){function e(e){var t=e.length;return function(n){var r=n.indexOf(e),i=[{type:"meta.tag.punctuation.tag-open",value:"{%"},{type:"text",value:n.slice(2,r)},{type:"keyword.tag"+e+".tag-name",value:n.slice(r,r+t)},{type:"text",value:n.slice(r+t,n.indexOf("%}"))},{type:"meta.tag.punctuation.tag-close",value:"%}"}];return i}}o.call(this);for(var t in this.$rules)this.$rules[t].unshift({token:"comment.block",regex:/{%-?\s*comment\s*-?%}/,next:[{token:"comment.block",regex:/{%-?\s*endcomment\s*-?%}/,next:"pop"},{defaultToken:"comment",caseInsensitive:!1}]},{token:"comment.line",regex:/{%-?\s*#/,next:[{token:"comment.line",regex:/-?%}/,next:"pop"},{defaultToken:"comment",caseInsensitive:!1}]},{token:"style.embedded.start",regex:/({%-?\s*\bstyle\b\s*-?%})/,next:"style-start",onMatch:e("style")},{regex:/({%-?\s*\bstylesheet\b\s*-?%})/,next:"stylesheet-start",onMatch:e("stylesheet")},{regex:/({%-?\s*\bschema\b\s*-?%})/,next:"schema-start",onMatch:e("schema")},{regex:/({%-?\s*\bjavascript\b\s*-?%})/,next:"javascript-start",onMatch:e("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(u,"schema-",[{token:"schema-start",next:"pop",regex:/({%-?\s*\bendschema\b\s*-?%})/,onMatch:e("endschema")}]),this.embedRules(a,"javascript-",[{token:"javascript-start",next:"pop",regex:/({%-?\s*\bendjavascript\b\s*-?%})/,onMatch:e("endjavascript")}]),this.embedRules(s,"style-",[{token:"style-start",next:"pop",regex:/({%-?\s*\bendstyle\b\s*-?%})/,onMatch:e("endstyle")}]),this.embedRules(s,"stylesheet-",[{token:"stylesheet-start",next:"pop",regex:/({%-?\s*\bendstylesheet\b\s*-?%})/,onMatch:e("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()};r.inherits(f,i),t.LiquidHighlightRules=f}),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(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./html").Mode,o=e("./javascript").Mode,u=e("./json").Mode,a=e("./css").Mode,f=e("./liquid_highlight_rules").LiquidHighlightRules,l=e("./matching_brace_outdent").MatchingBraceOutdent,c=e("./folding/cstyle").FoldMode,h=function(){u.call(this),s.call(this),a.call(this),o.call(this),this.HighlightRules=f,this.foldingRules=new c};r.inherits(h,i),function(){this.blockComment={start:""},this.voidElements=(new s).voidElements,this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/liquid",this.snippetFileId="ace/snippets/liquid"}.call(h.prototype),t.Mode=h}); (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/www/js/ace/mode-lisp.js b/www/js/ace/mode-lisp.js new file mode 100644 index 000000000..656c18631 --- /dev/null +++ b/www/js/ace/mode-lisp.js @@ -0,0 +1,8 @@ +define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="case|do|let|loop|if|else|when",t="eq|neq|and|or",n="null|nil",r="cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);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",regex:"0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:i,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"}]}};r.inherits(s,i),t.LispHighlightRules=s}),define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lisp_highlight_rules").LispHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart=";",this.$id="ace/mode/lisp"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-livescript.js b/www/js/ace/mode-livescript.js new file mode 100644 index 000000000..49968a68b --- /dev/null +++ b/www/js/ace/mode-livescript.js @@ -0,0 +1,8 @@ +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/text"],function(e,t,n){function u(e,t){function n(){}return n.prototype=(e.superclass=t).prototype,(e.prototype=new n).constructor=e,typeof t.extended=="function"&&t.extended(e),e}function a(e,t){var n={}.hasOwnProperty;for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}var r,i,s,o;r="(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*",t.Mode=i=function(t){function o(){var t;this.$tokenizer=new(e("../tokenizer").Tokenizer)(o.Rules);if(t=e("../mode/matching_brace_outdent"))this.$outdent=new t.MatchingBraceOutdent;this.$id="ace/mode/livescript",this.$behaviour=new(e("./behaviour/cstyle").CstyleBehaviour)}var n,i=u((a(o,t).displayName="LiveScriptMode",o),t).prototype,s=o;return n=RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+r+")?))\\s*$"),i.getNextLineIndent=function(e,t,r){var i,s;return i=this.$getIndent(t),s=this.$tokenizer.getLineTokens(t,e).tokens,(!s.length||s[s.length-1].type!=="comment")&&e==="start"&&n.test(t)&&(i+=r),i},i.lineCommentStart="#",i.blockComment={start:"###",end:"###"},i.checkOutdent=function(e,t,n){var r;return(r=this.$outdent)!=null?r.checkOutdent(t,n):void 8},i.autoOutdent=function(e,t,n){var r;return(r=this.$outdent)!=null?r.autoOutdent(t,n):void 8},o}(e("../mode/text").Mode),s="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",o={defaultToken:"string"},i.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)"+s},{token:"constant.language",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+s},{token:"invalid.illegal",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+s},{token:"language.support.class",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+s},{token:"language.support.function",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+s},{token:"variable.language",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+s},{token:"identifier",regex:r+"\\s*:(?![:=])"},{token:"variable",regex:r},{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:r,next:"start"},{token:"text",regex:"",next:"start"}],comment:[{token:"comment.doc",regex:".*?\\*/",next:"start"},{defaultToken:"comment.doc"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},o],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},o],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},o],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},o],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},o],words:[{token:"string",regex:".*?\\]>",next:"key"},o]}}); (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/www/js/ace/mode-logiql.js b/www/js/ace/mode-logiql.js new file mode 100644 index 000000000..19cf90521 --- /dev/null +++ b/www/js/ace/mode-logiql.js @@ -0,0 +1,8 @@ +define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};r.inherits(s,i),t.LogiQLHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|<--|<-|->|{)\s*$/.test(t)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)?!0:n!=="\n"&&n!=="\r\n"?!1:/^\s+/.test(t)?!0:!1},this.autoOutdent=function(e,t,n){if(this.$outdent.autoOutdent(t,n))return;var r=t.getLine(n),i=r.match(/^\s+/),s=r.lastIndexOf(".")+1;if(!i||!n||!s)return 0;var o=t.getLine(n+1),u=this.getMatching(t,{row:n,column:s});if(!u||u.start.row==n)return 0;s=i[0].length;var f=this.$getIndent(t.getLine(u.start.row));t.replace(new a(n+1,0,n+1,s),f)},this.getMatching=function(e,t,n){t==undefined&&(t=e.selection.lead),typeof t=="object"&&(n=t.column,t=t.row);var r=e.getTokenAt(t,n),i="keyword.start",s="keyword.end",o;if(!r)return;if(r.type==i){var f=new u(e,t,n);f.step=f.stepForward}else{if(r.type!=s)return;var f=new u(e,t,n);f.step=f.stepBackward}while(o=f.step())if(o.type==i||o.type==s)break;if(!o||o.type==r.type)return;var l=f.getCurrentTokenColumn(),t=f.getCurrentTokenRow();return new a(t,l,t,l+o.value.length)},this.$id="ace/mode/logiql"}.call(l.prototype),t.Mode=l}); (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/www/js/ace/mode-logtalk.js b/www/js/ace/mode-logtalk.js new file mode 100644 index 000000000..51feadb78 --- /dev/null +++ b/www/js/ace/mode-logtalk.js @@ -0,0 +1,8 @@ +define("ace/mode/logtalk_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:!1,token:"storage.type.relations.logtalk",regex:"\\b(?:complements|extends|i(?:nstantiates|mp(?:orts|lements))|specializes)(?=[(])"},{caseInsensitive:!1,todo:"fix grouping",token:["storage.modifier.others.logtalk","punctuation.definition.storage.modifier.logtalk"],regex:":-\\s(?:e(?:lse|ndif)|built_in|dynamic|synchronized|threaded)(?=[.])"},{caseInsensitive:!1,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:!1,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:!1,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:!1,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:!1,token:"support.function.term-creation-and-decomposition.logtalk",regex:"\\b(arg|copy_term|functor|numbervars|term_variables)(?=[(])"},{caseInsensitive:!1,token:"support.function.term-unification.logtalk",regex:"\\b(subsumes_term|unify_with_occurs_check)(?=[(])"},{caseInsensitive:!1,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:!1,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:!1,token:"support.function.entity-creation-and-abolishing.logtalk",regex:"\\b((c(?:reate|urrent)|abolish)_(?:object|protocol|category))(?=[(])"},{caseInsensitive:!1,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:!1,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:!1,token:"support.function.multi-threading.logtalk",regex:"\\b(threaded(_(ca(?:ll|ncel)|once|ignore|exit|peek|wait|notify))?)(?=[(])"},{caseInsensitive:!1,token:"support.function.engines.logtalk",regex:"\\b(threaded_engine(_(create|destroy|self|next(?:_reified)?|yield|post|fetch))?)(?=[(])"},{caseInsensitive:!1,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()};r.inherits(s,i),t.LogtalkHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./logtalk_highlight_rules").LogtalkHighlightRules,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="%",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/logtalk"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-lsl.js b/www/js/ace/mode-lsl.js new file mode 100644 index 000000000..6d0c5a967 --- /dev/null +++ b/www/js/ace/mode-lsl.js @@ -0,0 +1,8 @@ +define("ace/mode/lsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e=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:e,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()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.LSLHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("./lsl_highlight_rules").LSLHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./text").Mode,o=e("./folding/cstyle").FoldMode,u=e("../lib/oop"),a=function(){this.HighlightRules=r,this.$outdent=new i,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};u.inherits(a,s),function(){this.lineCommentStart=["//"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type==="comment.block.lsl")return r;if(e==="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/lsl",this.snippetFileId="ace/snippets/lsl"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-lua.js b/www/js/ace/mode-lua.js new file mode 100644 index 000000000..82fa84bd5 --- /dev/null +++ b/www/js/ace/mode-lua.js @@ -0,0 +1,8 @@ +define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="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",r="string|package|os|io|math|debug|table|coroutine",i="setn|foreach|foreachi|gcinfo|log10|maxn",s=this.createKeywordMapper({keyword:e,"support.function":n,"keyword.deprecated":i,"constant.library":r,"constant.language":t,"variable.language":"self"},"identifier"),o="(?:(?:[1-9]\\d*)|(?:0))",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:"+o+"|"+u+")",f="(?:\\.\\d+)",l="(?:\\d+)",c="(?:(?:"+l+"?"+f+")|(?:"+l+"\\.))",h="(?:"+c+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment.body"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"string.start"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","string.end"},regex:/\]=*\]/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:a+"\\b"},{token:s,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()};r.inherits(s,i),t.LuaHighlightRules=s}),define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.foldingStartMarker=/\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/,this.foldingStopMarker=/\bend\b|^\s*}|\]=*\]/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]=="then"&&/\belseif\b/.test(r))return;if(o[1]){if(e.getTokenAt(n,o.index+1).type==="keyword")return"start"}else{if(!o[2])return"start";var u=e.bgTokenizer.getState(n)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[0]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(o[0][0]!=="]")return"end";var u=e.bgTokenizer.getState(n-1)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.luaBlock(e,n,i.index+1):i[2]?e.getCommentFoldRange(n,i.index+1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[0]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.luaBlock(e,n,i.index+1):i[0][0]==="]"?e.getCommentFoldRange(n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.luaBlock=function(e,t,n,r){var i=new o(e,t,n),u={"function":1,"do":1,then:1,elseif:-1,end:-1,repeat:1,until:-1},a=i.getCurrentToken();if(!a||a.type!="keyword")return;var f=a.value,l=[f],c=u[f];if(!c)return;var h=c===-1?i.getCurrentTokenColumn():e.getLine(t).length,p=t;i.step=c===-1?i.stepBackward:i.stepForward;while(a=i.step()){if(a.type!=="keyword")continue;var d=c*u[a.value];if(d>0)l.unshift(a.value);else if(d<=0){l.shift();if(!l.length&&a.value!="elseif")break;d===0&&l.unshift(a.value)}}if(!a)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return c===-1?new s(t,e.getLine(t).length,p,h):new s(p,h,t,i.getCurrentTokenColumn())}}.call(u.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lua_highlight_rules").LuaHighlightRules,o=e("./folding/lua").FoldMode,u=e("../range").Range,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(f,i),function(){function n(t){var n=0;for(var r=0;r0?1:0}this.lineCommentStart="--",this.blockComment={start:"--[[",end:"--]]"};var e={"function":1,then:1,"do":1,"else":1,elseif:1,repeat:1,end:-1,until:-1},t=["else","elseif","end","until"];this.getNextLineIndent=function(e,t,r){var i=this.$getIndent(t),s=0,o=this.getTokenizer().getLineTokens(t,e),u=o.tokens;return e=="start"&&(s=n(u)),s>0?i+r:s<0&&i.substr(i.length-r.length)==r&&!this.checkOutdent(e,t,"\n")?i.substr(0,i.length-r.length):i},this.checkOutdent=function(e,n,r){if(r!="\n"&&r!="\r"&&r!="\r\n")return!1;if(n.match(/^\s*[\)\}\]]$/))return!0;var i=this.getTokenizer().getLineTokens(n.trim(),e).tokens;return!i||!i.length?!1:i[0].type=="keyword"&&t.indexOf(i[0].value)!=-1},this.getMatching=function(t,n,r){if(n==undefined){var i=t.selection.lead;r=i.column,n=i.row}var s=t.getTokenAt(n,r);if(s&&s.value in e)return this.foldingRules.luaBlock(t,n,r,!0)},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^\s*/)[0].length;if(!i||!n)return;var s=this.getMatching(t,n,i+1);if(!s||s.start.row==n)return;var o=this.$getIndent(t.getLine(s.start.row));o.length!=i&&(t.replace(new u(n,0,n,i),o),t.outdentRows(new u(n+1,0,n+1,0)))},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/lua_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/lua",this.snippetFileId="ace/snippets/lua"}.call(f.prototype),t.Mode=f}); (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/www/js/ace/mode-luapage.js b/www/js/ace/mode-luapage.js new file mode 100644 index 000000000..6b7f6a785 --- /dev/null +++ b/www/js/ace/mode-luapage.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="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",r="string|package|os|io|math|debug|table|coroutine",i="setn|foreach|foreachi|gcinfo|log10|maxn",s=this.createKeywordMapper({keyword:e,"support.function":n,"keyword.deprecated":i,"constant.library":r,"constant.language":t,"variable.language":"self"},"identifier"),o="(?:(?:[1-9]\\d*)|(?:0))",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:"+o+"|"+u+")",f="(?:\\.\\d+)",l="(?:\\d+)",c="(?:(?:"+l+"?"+f+")|(?:"+l+"\\.))",h="(?:"+c+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment.body"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"string.start"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","string.end"},regex:/\]=*\]/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:a+"\\b"},{token:s,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()};r.inherits(s,i),t.LuaHighlightRules=s}),define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.foldingStartMarker=/\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/,this.foldingStopMarker=/\bend\b|^\s*}|\]=*\]/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]=="then"&&/\belseif\b/.test(r))return;if(o[1]){if(e.getTokenAt(n,o.index+1).type==="keyword")return"start"}else{if(!o[2])return"start";var u=e.bgTokenizer.getState(n)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[0]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(o[0][0]!=="]")return"end";var u=e.bgTokenizer.getState(n-1)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.luaBlock(e,n,i.index+1):i[2]?e.getCommentFoldRange(n,i.index+1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[0]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.luaBlock(e,n,i.index+1):i[0][0]==="]"?e.getCommentFoldRange(n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.luaBlock=function(e,t,n,r){var i=new o(e,t,n),u={"function":1,"do":1,then:1,elseif:-1,end:-1,repeat:1,until:-1},a=i.getCurrentToken();if(!a||a.type!="keyword")return;var f=a.value,l=[f],c=u[f];if(!c)return;var h=c===-1?i.getCurrentTokenColumn():e.getLine(t).length,p=t;i.step=c===-1?i.stepBackward:i.stepForward;while(a=i.step()){if(a.type!=="keyword")continue;var d=c*u[a.value];if(d>0)l.unshift(a.value);else if(d<=0){l.shift();if(!l.length&&a.value!="elseif")break;d===0&&l.unshift(a.value)}}if(!a)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return c===-1?new s(t,e.getLine(t).length,p,h):new s(p,h,t,i.getCurrentTokenColumn())}}.call(u.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lua_highlight_rules").LuaHighlightRules,o=e("./folding/lua").FoldMode,u=e("../range").Range,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(f,i),function(){function n(t){var n=0;for(var r=0;r0?1:0}this.lineCommentStart="--",this.blockComment={start:"--[[",end:"--]]"};var e={"function":1,then:1,"do":1,"else":1,elseif:1,repeat:1,end:-1,until:-1},t=["else","elseif","end","until"];this.getNextLineIndent=function(e,t,r){var i=this.$getIndent(t),s=0,o=this.getTokenizer().getLineTokens(t,e),u=o.tokens;return e=="start"&&(s=n(u)),s>0?i+r:s<0&&i.substr(i.length-r.length)==r&&!this.checkOutdent(e,t,"\n")?i.substr(0,i.length-r.length):i},this.checkOutdent=function(e,n,r){if(r!="\n"&&r!="\r"&&r!="\r\n")return!1;if(n.match(/^\s*[\)\}\]]$/))return!0;var i=this.getTokenizer().getLineTokens(n.trim(),e).tokens;return!i||!i.length?!1:i[0].type=="keyword"&&t.indexOf(i[0].value)!=-1},this.getMatching=function(t,n,r){if(n==undefined){var i=t.selection.lead;r=i.column,n=i.row}var s=t.getTokenAt(n,r);if(s&&s.value in e)return this.foldingRules.luaBlock(t,n,r,!0)},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^\s*/)[0].length;if(!i||!n)return;var s=this.getMatching(t,n,i+1);if(!s||s.start.row==n)return;var o=this.$getIndent(t.getLine(s.start.row));o.length!=i&&(t.replace(new u(n,0,n,i),o),t.outdentRows(new u(n+1,0,n+1,0)))},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/lua_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/lua",this.snippetFileId="ace/snippets/lua"}.call(f.prototype),t.Mode=f}),define("ace/mode/luapage_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/lua_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=e("./lua_highlight_rules").LuaHighlightRules,o=function(){i.call(this);var e=[{token:"keyword",regex:"<\\%\\=?",push:"lua-start"},{token:"keyword",regex:"<\\?lua\\=?",push:"lua-start"}],t=[{token:"keyword",regex:"\\%>",next:"pop"},{token:"keyword",regex:"\\?>",next:"pop"}];this.embedRules(s,"lua-",t,["start"]);for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.normalizeRules()};r.inherits(o,i),t.LuaPageHighlightRules=o}),define("ace/mode/luapage",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/lua","ace/mode/luapage_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./lua").Mode,o=e("./luapage_highlight_rules").LuaPageHighlightRules,u=function(){i.call(this),this.HighlightRules=o,this.createModeDelegates({"lua-":s})};r.inherits(u,i),function(){this.$id="ace/mode/luapage"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-lucene.js b/www/js/ace/mode-lucene.js new file mode 100644 index 000000000..16c2002d4 --- /dev/null +++ b/www/js/ace/mode-lucene.js @@ -0,0 +1,8 @@ +define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:"|[~&@]"},{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"}]}};r.inherits(s,i),t.LuceneHighlightRules=s}),define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lucene_highlight_rules").LuceneHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/lucene"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-makefile.js b/www/js/ace/mode-makefile.js new file mode 100644 index 000000000..f047694e0 --- /dev/null +++ b/www/js/ace/mode-makefile.js @@ -0,0 +1,8 @@ +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.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",o=t.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",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\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:/`/},{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(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{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:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,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()};r.inherits(u,i),t.ShHighlightRules=u}),define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./sh_highlight_rules"),o=function(){var e=this.createKeywordMapper({keyword:s.reservedKeywords,"support.function.builtin":s.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:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:"\\w+"},{token:"string.interpolated.backtick.makefile",regex:"`",next:"start"}]}};r.inherits(o,i),t.MakefileHighlightRules=o}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),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(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.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(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{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:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{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:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="`"?e.bgTokenizer.getState(n)=="start"?"end":"start":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type.lastIndexOf(c,0)===0}function h(){var e=f.value[0];return e=="="?6:e=="-"?5:7-f.value.search(/[^#]|$/)}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;if(r[0]=="`"){if(e.bgTokenizer.getState(n)!=="start"){while(++n0){r=e.getLine(n);if(r[0]=="`"&r.substring(0,3)=="```")break}return new s(n,r.length,u,0)}var f,c="markup.heading";if(l(n)){var p=h();while(++n=p)break}a=n-(!f||["=","-"].indexOf(f.value[0])==-1?1:2);if(a>u)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var v=e.getLine(a).length;return new s(u,i,a,v)}}}}.call(o.prototype)}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.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",o=t.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",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\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:/`/},{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(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{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:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,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()};r.inherits(u,i),t.ShHighlightRules=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sh_highlight_rules").ShHighlightRules,o=e("../range").Range,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new o(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(a.prototype),t.Mode=a}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./xml_highlight_rules").XmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,f=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=o,this.$behaviour=new u,this.foldingRules=new a};r.inherits(l,s),function(){this.voidElements=i.arrayToMap([]),this.blockComment={start:""},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(l.prototype),t.Mode=l}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./behaviour/cstyle").CstyleBehaviour,s=e("./text").Mode,o=e("./markdown_highlight_rules").MarkdownHighlightRules,u=e("./folding/markdown").FoldMode,a=function(){this.HighlightRules=o,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new u,this.$behaviour=new i({braces:!0})};r.inherits(a,s),function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(e,t,n){if(e=="listblock"){var r=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);if(!r)return"";var i=r[2];return i||(i=parseInt(r[3],10)+1+"."),r[1]+i+r[4]}return this.$getIndent(t)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-mask.js b/www/js/ace/mode-mask.js new file mode 100644 index 000000000..3a23fe09e --- /dev/null +++ b/www/js/ace/mode-mask.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),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(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.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(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{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:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{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:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),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(e,t,n){"use strict";function N(){function t(e,t,n){var r="js-"+e+"-",i=e==="block"?["start"]:["start","no_regex"];s(o,r,t,i,n)}function n(){s(u,"css-block-",/\}/)}function r(){s(a,"md-multiline-",/("""|''')/,[])}function i(){s(f,"html-multiline-",/("""|''')/)}function s(t,n,r,i,s){var o="pop",u=i||["start"];u.length===0&&(u=null),/block|multiline/.test(n)&&(o=n+"end",e.$rules[o]=[k("empty","","start")]),e.embedRules(t,n,[k(s||w,r,o)],u,u==null?!0:!1)}this.$rules={start:[k("comment","\\/\\/.*$"),k("comment","\\/\\*",[k("comment",".*?\\*\\/","start"),k("comment",".+")]),C.string("'''"),C.string('"""'),C.string('"'),C.string("'"),C.syntax(/(markdown|md)\b/,"md-multiline","multiline"),C.syntax(/html\b/,"html-multiline","multiline"),C.syntax(/(slot|event)\b/,"js-block","block"),C.syntax(/style\b/,"css-block","block"),C.syntax(/var\b/,"js-statement","attr"),C.tag(),k(b,"[[({>]"),k(w,"[\\])};]","start"),{caseInsensitive:!0}]};var e=this;t("interpolation",/\]/,w+"."+g),t("statement",/\)|}|;/),t("block",/\}/),n(),r(),i(),this.normalizeRules()}function k(e,t,n){var r,i,s;return arguments.length===4?(r=n,i=arguments[3]):typeof n=="string"?i=n:r=n,typeof e=="function"&&(s=e,e="empty"),{token:e,regex:t,push:r,next:i,onMatch:s}}t.MaskHighlightRules=N;var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./css_highlight_rules").CssHighlightRules,a=e("./markdown_highlight_rules").MarkdownHighlightRules,f=e("./html_highlight_rules").HtmlHighlightRules,l="keyword.support.constant.language",c="support.function.markup.bold",h="keyword",p="constant.language",d="keyword.control.markup.italic",v="support.variable.class",m="keyword.operator",g="markup.italic",y="markup.bold",b="paren.lparen",w="paren.rparen",E,S,x,T;(function(){E=i.arrayToMap("log".split("|")),x=i.arrayToMap(":dualbind|:bind|:import|slot|event|style|html|markdown|md".split("|")),S=i.arrayToMap("debugger|define|var|if|each|for|of|else|switch|case|with|visible|+if|+each|+for|+switch|+with|+visible|include|import".split("|")),T=i.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("|"))})(),r.inherits(N,s);var C={string:function(e,t){var n=k("string.start",e,[k(b+"."+g,/~\[/,C.interpolation()),k("string.end",e,"pop"),{defaultToken:"string"}],t);if(e.length===1){var r=k("string.escape","\\\\"+e);n.push.unshift(r)}return n},interpolation:function(){return[k(d,/\s*\w*\s*:/),"js-interpolation-start"]},tagHead:function(e){return k(v,e,[k(v,/[\w\-_]+/),k(b+"."+g,/~\[/,C.interpolation()),C.goUp()])},tag:function(){return{token:"tag",onMatch:function(e){return void 0!==S[e]?h:void 0!==x[e]?p:void 0!==E[e]?"support.function":void 0!==T[e.toLowerCase()]?l:c},regex:/([@\w\-_:+]+)|((^|\s)(?=\s*(\.|#)))/,push:[C.tagHead(/\./),C.tagHead(/#/),C.expression(),C.attribute(),k(b,/[;>{]/,"pop")]}},syntax:function(e,t,n){return{token:p,regex:e,push:{attr:[t+"-start",k(m,/;/,"start")],multiline:[C.tagHead(/\./),C.tagHead(/#/),C.attribute(),C.expression(),k(b,/[>\{]/),k(m,/;/,"start"),k(b,/'''|"""/,[t+"-start"])],block:[C.tagHead(/\./),C.tagHead(/#/),C.attribute(),C.expression(),k(b,/\{/,[t+"-start"])]}[n]}},attribute:function(){return k(function(e){return/^x\-/.test(e)?v+"."+y:v},/[\w_-]+/,[k(m,/\s*=\s*/,[C.string('"'),C.string("'"),C.word(),C.goUp()]),C.goUp()])},expression:function(){return k(b,/\(/,["js-statement-start"])},word:function(){return k("string",/[\w-_]+/)},goUp:function(){return k("text","","pop")},goStart:function(){return k("text","","start")}}}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mask_highlight_rules").MaskHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.foldingRules=new a};r.inherits(f,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/mask"}.call(f.prototype),t.Mode=f}); (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/www/js/ace/mode-matlab.js b/www/js/ace/mode-matlab.js new file mode 100644 index 000000000..eb3865d70 --- /dev/null +++ b/www/js/ace/mode-matlab.js @@ -0,0 +1,8 @@ +define("ace/mode/matlab_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while",t="true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout",n="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|ztestadapthisteq|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",r="cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse",i=this.createKeywordMapper({"storage.type":r,"support.function":n,keyword:e,"constant.language":t},"identifier",!0);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",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,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()};r.inherits(s,i),t.MatlabHighlightRules=s}),define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./matlab_highlight_rules").MatlabHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="%",this.blockComment={start:"%{",end:"%}"},this.$id="ace/mode/matlab"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-maze.js b/www/js/ace/mode-maze.js new file mode 100644 index 000000000..d6da6fbf3 --- /dev/null +++ b/www/js/ace/mode-maze.js @@ -0,0 +1,8 @@ +define("ace/mode/maze_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["mz"],name:"Maze",scopeName:"source.maze"},r.inherits(s,i),t.MazeHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/maze",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/maze_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./maze_highlight_rules").MazeHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/maze",this.snippetFileId="ace/snippets/maze"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-mediawiki.js b/www/js/ace/mode-mediawiki.js new file mode 100644 index 000000000..c514d7c08 --- /dev/null +++ b/www/js/ace/mode-mediawiki.js @@ -0,0 +1,8 @@ +define("ace/mode/mediawiki_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:!0,push:[{token:["punctuation.definition.tag.begin","entity.name.tag","meta.tag.block.ref","punctuation.definition.tag.end"],regex:/(<\/)(ref)(\s*)(>)/,caseInsensitive:!0,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:!0,push:[{token:["punctuation.definition.tag.begin","entity.name.tag","meta.tag.block.nowiki","punctuation.definition.tag.end"],regex:/(<\/)(nowiki)(\s*)(>)/,caseInsensitive:!0,next:"pop"},{defaultToken:"meta.tag.block.nowiki"}]},{token:["punctuation.definition.tag.begin","entity.name.tag"],regex:/(<\/?)(noinclude|includeonly|onlyinclude)(?=\W)/,caseInsensitive:!0,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:!0,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:!0,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:!0,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()};s.metaData={name:"MediaWiki",scopeName:"text.html.mediawiki",fileTypes:["mediawiki","wiki"]},r.inherits(s,i),t.MediaWikiHighlightRules=s}),define("ace/mode/mediawiki",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mediawiki_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mediawiki_highlight_rules").MediaWikiHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.type="text",this.blockComment={start:""},this.$id="ace/mode/mediawiki"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-mel.js b/www/js/ace/mode-mel.js new file mode 100644 index 000000000..d47555964 --- /dev/null +++ b/www/js/ace/mode-mel.js @@ -0,0 +1,8 @@ +define("ace/mode/mel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{caseInsensitive:!0,token:"storage.type.mel",regex:"\\b(matrix|string|vector|float|int|void)\\b"},{caseInsensitive:!0,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:!0,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:!0,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:!0,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:!0,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()};r.inherits(s,i),t.MELHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/mel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mel_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mel_highlight_rules").MELHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/mel"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-mips.js b/www/js/ace/mode-mips.js new file mode 100644 index 000000000..56900b458 --- /dev/null +++ b/www/js/ace/mode-mips.js @@ -0,0 +1,8 @@ +define("ace/mode/mips_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\(?:['"?\\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",regex:"(?:'\")(?:"+e+"|.)?(?:'\")"},{token:"string.start",regex:"'",stateName:"qstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:e},{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:e},{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()};s.metaData={fileTypes:["s","asm"],name:"MIPS",scopeName:"source.mips"},r.inherits(s,i),t.MIPSHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/mips",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mips_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mips_highlight_rules").MIPSHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart=["#"],this.$id="ace/mode/mips"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-mixal.js b/www/js/ace/mode-mixal.js new file mode 100644 index 000000000..cbd6e64b6 --- /dev/null +++ b/www/js/ace/mode-mixal.js @@ -0,0 +1,8 @@ +define("ace/mode/mixal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=function(e){return e&&e.search(/^[A-Z\u0394\u03a0\u03a30-9]{1,10}$/)>-1&&e.search(/[A-Z\u0394\u03a0\u03a3]/)>-1},t=function(e){return e&&["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(e)>-1},n=function(e){return e&&e.search(/[^ A-Z\u0394\u03a0\u03a30-9.,()+*/=$<>@;:'-]/)==-1};this.$rules={start:[{token:"comment.line.character",regex:/^ *\*.*$/},{token:function(t,r,i,s,o,u){return[e(t)?"variable.other":"invalid.illegal","text","keyword.control","text",n(o)?"text":"invalid.illegal","comment.line.character"]},regex:/^(\S+)?( +)(ALF)( )(.{5})(\s+.*)?$/},{token:function(t,r,i,s,o,u){return[e(t)?"variable.other":"invalid.illegal","text","keyword.control","text",n(o)?"text":"invalid.illegal","comment.line.character"]},regex:/^(\S+)?( +)(ALF)( )(\S.{4})(\s+.*)?$/},{token:function(n,r,i,s){return[e(n)?"variable.other":"invalid.illegal","text",t(i)?"keyword.control":"invalid.illegal","comment.line.character"]},regex:/^(\S+)?( +)(\S+)(?:\s*)$/},{token:function(r,i,s,o,u,a){return[e(r)?"variable.other":"invalid.illegal","text",t(s)?"keyword.control":"invalid.illegal","text",n(u)?"text":"invalid.illegal","comment.line.character"]},regex:/^(\S+)?( +)(\S+)( +)(\S+)(\s+.*)?$/},{defaultToken:"text"}]}};r.inherits(s,i),t.MixalHighlightRules=s}),define("ace/mode/mixal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mixal_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mixal_highlight_rules").MixalHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/mixal",this.lineCommentStart="*"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-mushcode.js b/www/js/ace/mode-mushcode.js new file mode 100644 index 000000000..943191e97 --- /dev/null +++ b/www/js/ace/mode-mushcode.js @@ -0,0 +1,8 @@ +define("ace/mode/mushcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="@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",t="=#0",n="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",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",s="(?:(?:[1-9]\\d*)|(?:0))",o="(?:0[oO]?[0-7]+)",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:0[bB][01]+)",f="(?:"+s+"|"+o+"|"+u+"|"+a+")",l="(?:[eE][+-]?\\d+)",c="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",d="(?:(?:"+p+"|"+h+")"+l+")",v="(?:"+d+"|"+p+")";this.$rules={start:[{token:"variable",regex:"%[0-9]{1}"},{token:"variable",regex:"%q[0-9A-Za-z]{1}"},{token:"variable",regex:"%[a-zA-Z]{1}"},{token:"variable.language",regex:"%[a-z0-9-_]+"},{token:"constant.numeric",regex:"(?:"+v+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:v},{token:"constant.numeric",regex:f+"[lL]\\b"},{token:"constant.numeric",regex:f+"\\b"},{token:r,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+"}]}};r.inherits(s,i),t.MushCodeRules=s}),define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mushcode_highlight_rules").MushCodeRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:"),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/mushcode"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-mysql.js b/www/js/ace/mode-mysql.js new file mode 100644 index 000000000..94dbaad2d --- /dev/null +++ b/www/js/ace/mode-mysql.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),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(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=function(){function l(e){var t=e.start,n=e.escape;return{token:"string.start",regex:t,next:[{token:"constant.language.escape",regex:n},{token:"string.end",next:"start",regex:t},{defaultToken:"string"}]}}var e="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",t="rank|coalesce|ifnull|isnull|nvl",n="charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee",r="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",i="aes_decrypt|aes_encrypt|compress|md|random_bytes|sha|sha|statement_digest|statement_digest_text|uncompress|uncompressed_length|validate_password_strength",o="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",u="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",a="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",f=this.createKeywordMapper({"support.function":[t,r,i,o,u].join("|"),keyword:e,"storage.type":a,constant:"false|true|null|unknown|ODBCdotTable|zerolessFloat","variable.language":n},"identifier",!0);this.$rules={start:[{token:"comment",regex:"(?:-- |#).*$"},l({start:'"',escape:/\\[0'"bnrtZ\\%_]?/}),l({start:"'",escape:/\\[0'"bnrtZ\\%_]?/}),s.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+|[xX]'[0-9a-fA-F]+'|0[bB][01]+|[bB]'[01]+'/},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:f,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(s,"doc-",[s.getEndRule("start")]),this.normalizeRules()};r.inherits(u,o),t.MysqlHighlightRules=u}),define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../mode/text").Mode,s=e("./mysql_highlight_rules").MysqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart=["--","#"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/mysql"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-nasal.js b/www/js/ace/mode-nasal.js new file mode 100644 index 000000000..d9419facf --- /dev/null +++ b/www/js/ace/mode-nasal.js @@ -0,0 +1,8 @@ +define("ace/mode/nasal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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() { \u2026 }"},{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() { \u2026 }"},{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() { \u2026 }"},{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() { \u2026 }"},{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() { \u2026 }"},{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()};s.metaData={fileTypes:["nas"],name:"Nasal",scopeName:"source.nasal"},r.inherits(s,i),t.NasalHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/nasal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nasal_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./nasal_highlight_rules").NasalHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/nasal"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-nginx.js b/www/js/ace/mode-nginx.js new file mode 100644 index 000000000..ed50c48b0 --- /dev/null +++ b/www/js/ace/mode-nginx.js @@ -0,0 +1,8 @@ +define("ace/mode/nginx_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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("+e+")\\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()};r.inherits(s,i),t.NginxHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/nginx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nginx_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./nginx_highlight_rules").NginxHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/nginx"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-nim.js b/www/js/ace/mode-nim.js new file mode 100644 index 000000000..bdbd60fec --- /dev/null +++ b/www/js/ace/mode-nim.js @@ -0,0 +1,8 @@ +define("ace/mode/nim_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=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"),t="(?:0[xX][\\dA-Fa-f][\\dA-Fa-f_]*)",n="(?:[0-9][\\d_]*)",r="(?:0o[0-7][0-7_]*)",i="(?:0[bB][01][01_]*)",s="(?:"+t+"|"+n+"|"+r+"|"+i+")(?:'?[iIuU](?:8|16|32|64)|u)?\\b",o="(?:[eE][+-]?[\\d][\\d_]*)",u="(?:[\\d][\\d_]*(?:[.][\\d](?:[\\d_]*)"+o+"?)|"+o+")",a="(?:"+t+"(?:'(?:(?:[fF](?:32|64)?)|[dD])))|(?:"+u+"|"+n+"|"+r+"|"+i+")(?:'(?:(?:[fF](?:32|64)?)|[dD]))",f="\\\\([abeprcnlftv\\\"']|x[0-9A-Fa-f]{2}|[0-2][0-9]{2}|u[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})",l="[a-zA-Z][a-zA-Z0-9_]*";this.$rules={start:[{token:["identifier","keyword.operator","support.function"],regex:"("+l+")([.]{1})("+l+")(?=\\()"},{token:"paren.lparen",regex:"(\\{\\.)",next:[{token:"paren.rparen",regex:"(\\.\\}|\\})",next:"start"},{include:"methods"},{token:"identifier",regex:l},{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:e,regex:"[a-zA-Z][a-zA-Z0-9_]*\\b"},{token:["keyword.operator","text","storage.type"],regex:"([:])(\\s+)("+l+")(?=$|\\)|\\[|,|\\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:a},{token:"constant.float",regex:u},{token:"constant.integer",regex:s}],methods:[{token:"support.function",regex:"(\\w+)(?=\\()"}],strings:[{token:"string",regex:"(\\b"+l+')?"""',push:[{token:"string",regex:'"""',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\b"+l+'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:'"',push:[{token:"string",regex:'"|$',next:"pop"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]}]},this.normalizeRules()};r.inherits(s,i),t.NimHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/nim",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nim_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./nim_highlight_rules").NimHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.blockComment={start:"#[",end:"]#",nestable:!0},this.$id="ace/mode/nim"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-nix.js b/www/js/ace/mode-nix.js new file mode 100644 index 000000000..85e9a1754 --- /dev/null +++ b/www/js/ace/mode-nix.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="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",r="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",s="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",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{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",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,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",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",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}),define("ace/mode/nix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="true|false",t="with|import|if|else|then|inherit",n="let|in|rec",r=this.createKeywordMapper({"constant.language.nix":e,"keyword.control.nix":t,"keyword.declaration.nix":n},"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",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{regex:"}",token:function(e,t,n){return n[1]&&n[1].charAt(0)=="q"?"constant.language.escape":"text"},next:"pop"}],comment:[{token:"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()};r.inherits(s,i),t.NixHighlightRules=s}),define("ace/mode/nix",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/nix_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp").Mode,s=e("./nix_highlight_rules").NixHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/nix"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-nsis.js b/www/js/ace/mode-nsis.js new file mode 100644 index 000000000..d0b17953c --- /dev/null +++ b/www/js/ace/mode-nsis.js @@ -0,0 +1,8 @@ +define("ace/mode/nsis_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:!0},{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:!0},{token:"keyword.control.nsis",regex:/^\s*!(?:ifdef|ifndef|if|ifmacrodef|ifmacrondef|else|endif)\b/,caseInsensitive:!0},{token:"keyword.plugin.nsis",regex:/^\s*\w+::\w+/,caseInsensitive:!0},{token:"keyword.operator.comparison.nsis",regex:/[!<>]?=|<>|<|>/},{token:"support.function.nsis",regex:/(?:\b|^\s*)(?:Function|FunctionEnd|Section|SectionEnd|SectionGroup|SectionGroupEnd|PageEx|PageExEnd)\b/,caseInsensitive:!0},{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:!0},{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:!0},{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:!0},{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()};s.metaData={comment:"\n todo: - highlight functions\n ",fileTypes:["nsi","nsh"],name:"NSIS",scopeName:"source.nsis"},r.inherits(s,i),t.NSISHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/nsis",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nsis_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./nsis_highlight_rules").NSISHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=[";","#"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/nsis"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-nunjucks.js b/www/js/ace/mode-nunjucks.js new file mode 100644 index 000000000..9d1b8a814 --- /dev/null +++ b/www/js/ace/mode-nunjucks.js @@ -0,0 +1,8 @@ +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/folding/nunjucks",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/html","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./html").FoldMode,o=e("../../range").Range,u=e("../../token_iterator").TokenIterator,a=t.FoldMode=function(e,t){s.call(this,e,t)};r.inherits(a,s),function(){function e(e,t){var n=e.exec(t);if(n){var r=n[0].includes("set")?"set":n[1].toLowerCase();if(r){var i=n[0].toLowerCase().indexOf(r);return n.index+i+1}}}function t(e,t){var n,r=e.$tokenIndex,i=t?"punctuation.begin":"punctuation.end";e.step=t?e.stepBackward:e.stepForward;while(n=e.step()){if(n.type!==i)continue;break}if(!n)return;var s=e.getCurrentTokenPosition();return t||(s.column=s.column+n.value.length),e.$tokenIndex=r,s}this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.indentKeywords={block:1,"if":1,"for":1,asyncEach:1,asyncAll:1,macro:1,filter:1,call:1,"else":0,elif:0,set:1,endblock:-1,endif:-1,endfor:-1,endeach:-1,endall:-1,endmacro:-1,endfilter:-1,endcall:-1,endset:-1},this.foldingStartMarkerNunjucks=/(?:\{%-?\s*)(?:(block|if|else|elif|for|asyncEach|asyncAll|macro|filter|call)\b.*)|(?:\bset(?:[^=]*))(?=%})/i,this.foldingStopMarkerNunjucks=/(?:\{%-?\s*)(endblock|endif|endfor|endeach|endall|endmacro|endfilter|endcall|endset)\b.*(?=%})/i,this.getFoldWidgetRange=function(t,n,r){var i=t.doc.getLine(r),s=e(this.foldingStartMarkerNunjucks,i);return s?this.nunjucksBlock(t,r,s):(s=e(this.foldingStopMarkerNunjucks,i),s?this.nunjucksBlock(t,r,s):this.getFoldWidgetRangeBase(t,n,r))},this.getFoldWidget=function(t,n,r){var i=t.getLine(r),s=this.foldingStartMarkerNunjucks.test(i),o=this.foldingStopMarkerNunjucks.test(i);if(s&&!o){var u=e(this.foldingStartMarkerNunjucks,i);if(u){var a=t.getTokenAt(r,u).type;if(a==="keyword.control")return"start"}}if(o&&!s&&n==="markbeginend"){var u=e(this.foldingStopMarkerNunjucks,i);if(u){var a=t.getTokenAt(r,u).type;if(a==="keyword.control")return"end"}}return this.getFoldWidgetBase(t,n,r)},this.nunjucksBlock=function(e,n,r){var i=new u(e,n,r),s=i.getCurrentToken();if(!s||s.type!="keyword.control")return;var a=s.value,f=[a],l=this.indentKeywords[a];if(a==="else"||a==="elif")l=1;if(!l)return;var c=t(i,l===-1);if(!s)return;i.step=l===-1?i.stepBackward:i.stepForward;while(s=i.step()){if(s.type!=="keyword.control")continue;var h=l*this.indentKeywords[s.value];if(s.value==="set"){var p=i.getCurrentTokenPosition(),d=e.getLine(p.row).substring(p.column);if(!/^[^=]*%}/.test(d))continue}if(h>0)f.unshift(s.value);else if(h<=0){f.shift();if(!f.length)break;h===0&&f.unshift(s.value)}}if(!s)return null;var v=t(i,l===1);return l===1?o.fromPoints(c,v):o.fromPoints(v,c)}}.call(a.prototype)}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/nunjucks_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./html_highlight_rules").HtmlHighlightRules,o=function(){s.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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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",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",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=function(){var e={"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"},t="\\\\(?:[abefnrtv'\"?\\\\]|[0-3]\\d{1,2}|[4-7]\\d?|222|x[a-zA-Z0-9]+)",n=[{regex:"\\b_cmd\\b",token:"variable.other.selector.objc"},{regex:"\\b(?:self|super)\\b",token:"variable.language.objc"}],r=new s(e),o=r.getRules();this.$keywordList=r.$keywordList,this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"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:r.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:t},{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:t,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",regex:".*?\\*\\/",next:"start"},{defaultToken:"comment"}],methods:[{token:"meta.function.objc",regex:"(?=\\{|#)|;",next:"start"}]};for(var u in o)this.$rules[u]?this.$rules[u].push&&this.$rules[u].push.apply(this.$rules[u],o[u]):this.$rules[u]=o[u];this.$rules.bracketed_content=this.$rules.bracketed_content.concat(this.$rules.start,n),this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.ObjectiveCHighlightRules=o}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/objectivec",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/objectivec_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./objectivec_highlight_rules").ObjectiveCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/objectivec"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-ocaml.js b/www/js/ace/mode-ocaml.js new file mode 100644 index 000000000..63271226f --- /dev/null +++ b/www/js/ace/mode-ocaml.js @@ -0,0 +1,8 @@ +define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="true|false",n="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",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t,"support.function":n},"identifier"),i="(?:(?:[1-9]\\d*)|(?:0))",s="(?:0[oO]?[0-7]+)",o="(?:0[xX][\\dA-Fa-f]+)",u="(?:0[bB][01]+)",a="(?:"+i+"|"+s+"|"+o+"|"+u+")",f="(?:[eE][+-]?\\d+)",l="(?:\\.\\d+)",c="(?:\\d+)",h="(?:(?:"+c+"?"+l+")|(?:"+c+"\\.))",p="(?:(?:"+h+"|"+c+")"+f+")",d="(?:"+p+"|"+h+")";this.$rules={start:[{token:"comment",regex:"\\(\\*.*?\\*\\)\\s*?$"},{token:"comment",regex:"\\(\\*.*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"'.'"},{token:"string",regex:'"',next:"qstring"},{token:"constant.numeric",regex:"(?:"+d+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:a+"\\b"},{token:r,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",regex:"\\*\\)",next:"start"},{defaultToken:"comment"}],qstring:[{token:"string",regex:'"',next:"start"},{token:"string",regex:".+"}]}};r.inherits(s,i),t.OcamlHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ocaml_highlight_rules").OcamlHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour,this.$outdent=new o};r.inherits(a,i);var f=/(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;(function(){this.toggleCommentLines=function(e,t,n,r){var i,s,o=!0,a=/^\s*\(\*(.*)\*\)/;for(i=n;i<=r;i++)if(!a.test(t.getLine(i))){o=!1;break}var f=new u(0,0,0,0);for(i=n;i<=r;i++)s=t.getLine(i),f.start.row=i,f.end.row=i,f.end.column=s.length,t.replace(f,o?s.match(a)[1]:"(*"+s+"*)")},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;return(!i.length||i[i.length-1].type!=="comment")&&e==="start"&&f.test(t)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/ocaml"}).call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-odin.js b/www/js/ace/mode-odin.js new file mode 100644 index 000000000..08c195e26 --- /dev/null +++ b/www/js/ace/mode-odin.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/odin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=this&&this.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{while((t===void 0||t-->0)&&!(i=r.next()).done)s.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(o)throw o.error}}return s},i=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r>","&","&~","\\+","\\-","~","\\|",">","<","<=",">=","==","!="].concat(":").map(function(e){return e+"="}).concat("=",":=","::","->","\\^","&",":").join("|"),u="new|cap|copy|panic|len|make|delete|append|free",a="nil|true|false",f=this.createKeywordMapper({keyword:e,"constant.language":a,"support.function":u,"support.type":n},""),l="\\\\(?:[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:/\/\/.*$/},o.getStartRule("doc-start"),{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"string",regex:/"(?:[^"\\]|\\.)*?"/},{token:"string",regex:"`",next:"bqstring"},{token:"support.constant",regex:/#[a-z_]+/},{token:"constant.numeric",regex:"'(?:[^\\'\ud800-\udbff]|[\ud800-\udbff][\udc00-\udfff]|"+l.replace('"',"")+")'"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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(e){return e[e.length-1]=="("?[{type:f(e.slice(0,-1))||"support.function",value:e.slice(0,-1)},{type:"paren.lparen",value:e.slice(-1)}]:f(e)||"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?"},{token:"keyword.operator",regex:s},{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(o,"doc-",[o.getEndRule("start")])};s.inherits(a,u),t.OdinHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./odin_highlight_rules").OdinHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/odin"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-partiql.js b/www/js/ace/mode-partiql.js new file mode 100644 index 000000000..4a2a9a12d --- /dev/null +++ b/www/js/ace/mode-partiql.js @@ -0,0 +1,8 @@ +define("ace/mode/ion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="TRUE|FALSE",t=e,n="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",r=n,i=this.createKeywordMapper({"constant.language.bool.ion":t,"constant.language.null.ion":r},"constant.other.symbol.identifier.ion",!0),s={token:i,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=[s],this.normalizeRules()};r.inherits(s,i),t.IonHighlightRules=s}),define("ace/mode/partiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/ion_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./ion_highlight_rules").IonHighlightRules,o=function(){var e="MISSING",t="FALSE|NULL|TRUE",n=e+"|"+t,r="PIVOT|UNPIVOT|LIMIT|TUPLE|REMOVE|INDEX|CONFLICT|DO|NOTHING|RETURNING|MODIFIED|NEW|OLD|LET",i="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",o=r+"|"+i,u="BOOL|BOOLEAN|STRING|SYMBOL|CLOB|BLOB|STRUCT|LIST|SEXP|BAG",a="CHARACTER|DATE|DECIMAL|DOUBLE|FLOAT|INT|INTEGER|NUMERIC|SMALLINT|TIMESTAMP|VARCHAR|VARYING",f=u+"|"+a,l="AVG|COUNT|MAX|MIN|SUM",c=l,h="CAST|COALESCE|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|EXISTS|DATE_ADD|DATE_DIFF|NULLIF|SESSION_USER|SUBSTRING|SYSTEM_USER|TRIM",p=h,d=this.createKeywordMapper({"constant.language.partiql":n,"keyword.other.partiql":o,"storage.type.partiql":f,"support.function.aggregation.partiql":c,"support.function.partiql":p},"variable.language.identifier.partiql",!0),v={token:d,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=[v],this.$rules["embed-ion"]=[{token:"punctuation.definition.ion.begin.partiql",regex:"`",next:"ion-start"}],this.embedRules(s,"ion-",[{token:"punctuation.definition.ion.end.partiql",regex:"`",next:"start"}]),this.normalizeRules()};r.inherits(o,i),t.PartiqlHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./partiql_highlight_rules").PartiqlHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/",nestable:!0},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if(e=="start"){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/partiql"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-pascal.js b/www/js/ace/mode-pascal.js new file mode 100644 index 000000000..fb57bd163 --- /dev/null +++ b/www/js/ace/mode-pascal.js @@ -0,0 +1,8 @@ +define("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=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",!0);this.$rules={start:[{caseInsensitive:!0,token:["variable","text","storage.type.prototype","entity.name.function.prototype"],regex:"\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))"},{caseInsensitive:!0,token:["variable","text","storage.type.function","entity.name.function"],regex:"\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?"},{caseInsensitive:!0,token:e,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()};r.inherits(s,i),t.PascalHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|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"}]}};r.inherits(s,i),t.PerlHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./perl_highlight_rules").PerlHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u({start:"^=(begin|item)\\b",end:"^=(cut)\\b"}),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.blockComment=[{start:"=begin",end:"=cut",lineStartOnly:!0},{start:"=item",end:"=cut",lineStartOnly:!0}],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/perl",this.snippetFileId="ace/snippets/perl"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-pgsql.js b/www/js/ace/mode-pgsql.js new file mode 100644 index 000000000..3b449b42e --- /dev/null +++ b/www/js/ace/mode-pgsql.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="ARGV|ENV|INC|SIG",n="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",r=this.createKeywordMapper({keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment.doc",regex:"^=(?:begin|item)\\b",next:"block_comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,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"}]}};r.inherits(s,i),t.PerlHighlightRules=s}),define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="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",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"variable.language":"self|cls","constant.language":t,keyword:e},"identifier"),i="[uU]?",s="[rR]",o="[fF]",u="(?:[rR][fF]|[fF][rR])",a="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",l="(?:0[xX][\\dA-Fa-f]+)",c="(?:0[bB][01]+)",h="(?:"+a+"|"+f+"|"+l+"|"+c+")",p="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",v="(?:\\d+)",m="(?:(?:"+v+"?"+d+")|(?:"+v+"\\.))",g="(?:(?:"+m+"|"+v+")"+p+")",y="(?:"+g+"|"+m+")",b="\\\\(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",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"string",regex:s+'"{3}',next:"rawqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rawqqstring"},{token:"string",regex:s+"'{3}",next:"rawqstring3"},{token:"string",regex:s+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",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:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",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:b},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",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",regex:"(?:"+y+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:y},{token:"constant.numeric",regex:h+"[lL]\\b"},{token:"constant.numeric",regex:h+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};r.inherits(s,i),t.PythonHighlightRules=s}),define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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:"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",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),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(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=e("./perl_highlight_rules").PerlHighlightRules,a=e("./python_highlight_rules").PythonHighlightRules,f=e("./json_highlight_rules").JsonHighlightRules,l=e("./javascript_highlight_rules").JavaScriptHighlightRules,c=function(){var e="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",t="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",n=this.createKeywordMapper({"support.function":t,keyword:e},"identifier",!0),r=[{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"variable.language",regex:'".*?"'},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:n,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.$rules={start:[{token:"comment",regex:"--.*$"},s.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"keyword.statementBegin",regex:"[a-zA-Z]+",next:"statement"},{token:"support.buildin",regex:"^\\\\[\\S]+.*$"}],statement:[{token:"comment",regex:"--.*$"},{token:"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(r),dollarSql:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentDollarSql"},{token:["keyword","statementEnd","text","string"],regex:"(^|END)(;)?(\\s*)(\\$\\$)",next:"statement"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarSqlString"}].concat(r),comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],commentStatement:[{token:"comment",regex:"\\*\\/",next:"statement"},{defaultToken:"comment"}],commentDollarSql:[{token:"comment",regex:"\\*\\/",next:"dollarSql"},{defaultToken:"comment"}],dollarStatementString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:".+"}],dollarSqlString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"dollarSql"},{token:"string",regex:".+"}]},this.embedRules(s,"doc-",[s.getEndRule("start")]),this.embedRules(u,"perl-",[{token:"string",regex:"\\$perl\\$",next:"statement"}]),this.embedRules(a,"python-",[{token:"string",regex:"\\$python\\$",next:"statement"}]),this.embedRules(f,"json-",[{token:"string",regex:"\\$json\\$",next:"statement"}]),this.embedRules(l,"javascript-",[{token:"string",regex:"\\$(js|javascript)\\$",next:"statement"}])};r.inherits(c,o),t.PgsqlHighlightRules=c}),define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../mode/text").Mode,s=e("./pgsql_highlight_rules").PgsqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){return e=="start"||e=="keyword.statementEnd"?"":this.$getIndent(t)},this.$id="ace/mode/pgsql"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-php.js b/www/js/ace/mode-php.js new file mode 100644 index 000000000..8c2d0fae7 --- /dev/null +++ b/www/js/ace/mode-php.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(){var e=s,t=i.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|array_is_list|fdatasync|fdiv|fsync|get_debug_type|get_resource_id|json_validate|mb_str_pad|mysqli_execute_query|preg_last_error_msg|stream_context_set_options|str_contains|str_ends_with|str_starts_with".split("|")),n=i.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("|")),r=i.arrayToMap("__halt_compiler|die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset".split("|")),o=i.arrayToMap("true|TRUE|false|FALSE|null|NULL|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__|__TRAIT__".split("|")),u=i.arrayToMap("$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")),a=i.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_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase".split("|")),f=i.arrayToMap("cfunction|old_function".split("|")),l=i.arrayToMap([]);this.$rules={start:[{token:"comment",regex:/(?:#|\/\/)(?:[^?]|\?[^>])*/},e.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"'",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",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",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(e){return n.hasOwnProperty(e)?"keyword":o.hasOwnProperty(e)?"constant.language":u.hasOwnProperty(e)?"variable.language":l.hasOwnProperty(e)?"invalid.illegal":t.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":e.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)?"variable":"identifier"},regex:/[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/},{onMatch:function(e,t,n){e=e.substr(3);if(e[0]=="'"||e[0]=='"')e=e.slice(1,-1);return n.unshift(this.next,e),"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(e,t,n){return n[1]!=e?(this.next="","string"):(n.shift(),n.shift(),this.next=this.nextState,"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:/\$\{[^"\}]+\}?/},{token:"string",regex:'"',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string",regex:"'",next:"start"},{defaultToken:"string"}]},this.embedRules(s,"doc-",[s.getEndRule("start")])};r.inherits(a,o);var f=function(){u.call(this);var e=[{token:"support.php_tag",regex:"<\\?(?:php|=)?",push:"php-start"}],t=[{token:"support.php_tag",regex:"\\?>",next:"pop"}];for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.embedRules(a,"php-",t,["start"]),this.normalizeRules()};r.inherits(f,u),t.PhpHighlightRules=f,t.PhpLangHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/php_completions",["require","exports","module"],function(e,t,n){"use strict";function s(e,t){return e.type.lastIndexOf(t)>-1}var r={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"]},i={$_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"}},o=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(i.type==="support.php_tag"&&i.value==="0){var o=t.getTokenAt(n.row,i.start);if(o.type==="support.php_tag")return this.getTagCompletions(e,t,n,r)}return this.getFunctionCompletions(e,t,n,r)}if(s(i,"variable"))return this.getVariableCompletions(e,t,n,r);var u=t.getLine(n.row).substr(0,n.column);return i.type==="string"&&/(\$[\w]*)\[["']([^'"]*)$/i.test(u)?this.getArrayKeyCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return[{caption:"php",value:"php",meta:"php tag",score:1e6},{caption:"=",value:"=",meta:"php tag",score:1e6}]},this.getFunctionCompletions=function(e,t,n,i){var s=Object.keys(r);return s.map(function(e){return{caption:e,snippet:e+"($0)",meta:"php function",score:1e6,docHTML:r[e][1]}})},this.getVariableCompletions=function(e,t,n,r){var s=Object.keys(i);return s.map(function(e){return{caption:e,value:e,meta:"php variable",score:1e6}})},this.getArrayKeyCompletions=function(e,t,n,r){var s=t.getLine(n.row).substr(0,n.column),o=s.match(/(\$[\w]*)\[["']([^'"]*)$/i)[1];if(!i[o])return[];var u=[];return i[o].type==="array"&&i[o].value&&(u=Object.keys(i[o].value)),u.map(function(e){return{caption:e,value:e,meta:"php array key",score:1e6}})}}).call(o.prototype),t.PhpCompletions=o}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/php",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),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(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarkerPhp.exec(r);if(i)return this.phpBlock(e,n,i.index+2);var i=this.foldingStopMarkerPhp.exec(r);return i?this.phpBlock(e,n,i.index+2):this.getFoldWidgetRangeBase(e,t,n)},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarkerPhp.test(r),s=this.foldingStopMarkerPhp.test(r);if(i&&!s){var o=this.foldingStartMarkerPhp.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword")return"start"}}if(s&&t==="markbeginend"){var o=this.foldingStopMarkerPhp.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword")return"end"}}return this.getFoldWidgetBase(e,t,n)},this.phpBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword")return;var a=u.value,f=[a],l=this.indentKeywords[a];if(a==="else"||a==="elseif")l=1;if(!l)return;var c=l===-1?i.getCurrentTokenColumn():e.getLine(t).length,h=t;i.step=l===-1?i.stepBackward:i.stepForward;while(u=i.step()){if(u.type!=="keyword")continue;var p=l*this.indentKeywords[u.value];if(p>0)f.unshift(u.value);else if(p<=0){f.shift();if(!f.length)break;p===0&&f.unshift(u.value)}}if(!u)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,h,c):new s(h,c,t,i.getCurrentTokenColumn())}}.call(u.prototype)}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./php_highlight_rules").PhpHighlightRules,o=e("./php_highlight_rules").PhpLangHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,f=e("./php_completions").PhpCompletions,l=e("./folding/php").FoldMode,c=e("../unicode"),h=e("./folding/mixed").FoldMode,p=e("./folding/html").FoldMode,d=e("./folding/cstyle").FoldMode,v=e("./html").Mode,m=e("./javascript").Mode,g=e("./css").Mode,y=function(e){this.HighlightRules=o,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.$completer=new f,this.foldingRules=new h(new p,{"js-":new d,"css-":new d,"php-":new l})};r.inherits(y,i),function(){this.tokenRe=new RegExp("^["+c.wordChars+"_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"_]|\\s])+","g"),this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[:]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o!="doc-start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/php-inline"}.call(y.prototype);var b=function(e){if(e&&e.inline){var t=new y;return t.createWorker=this.createWorker,t.inlinePhp=!0,t}v.call(this),this.HighlightRules=s,this.createModeDelegates({"js-":m,"css-":g,"php-":y}),this.foldingRules=new h(new p,{"js-":new d,"css-":new d,"php-":new l})};r.inherits(b,v),function(){this.createWorker=function(e){var t=new a(["ace"],"ace/mode/php_worker","PhpWorker");return t.attachToDocument(e.getDocument()),this.inlinePhp&&t.call("setOptions",[{inline:!0}]),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/php",this.snippetFileId="ace/snippets/php"}.call(b.prototype),t.Mode=b}); (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/www/js/ace/mode-php_laravel_blade.js b/www/js/ace/mode-php_laravel_blade.js new file mode 100644 index 000000000..26fb7e654 --- /dev/null +++ b/www/js/ace/mode-php_laravel_blade.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(){var e=s,t=i.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|array_is_list|fdatasync|fdiv|fsync|get_debug_type|get_resource_id|json_validate|mb_str_pad|mysqli_execute_query|preg_last_error_msg|stream_context_set_options|str_contains|str_ends_with|str_starts_with".split("|")),n=i.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("|")),r=i.arrayToMap("__halt_compiler|die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset".split("|")),o=i.arrayToMap("true|TRUE|false|FALSE|null|NULL|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__|__TRAIT__".split("|")),u=i.arrayToMap("$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")),a=i.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_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase".split("|")),f=i.arrayToMap("cfunction|old_function".split("|")),l=i.arrayToMap([]);this.$rules={start:[{token:"comment",regex:/(?:#|\/\/)(?:[^?]|\?[^>])*/},e.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"'",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",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",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(e){return n.hasOwnProperty(e)?"keyword":o.hasOwnProperty(e)?"constant.language":u.hasOwnProperty(e)?"variable.language":l.hasOwnProperty(e)?"invalid.illegal":t.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":e.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)?"variable":"identifier"},regex:/[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/},{onMatch:function(e,t,n){e=e.substr(3);if(e[0]=="'"||e[0]=='"')e=e.slice(1,-1);return n.unshift(this.next,e),"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(e,t,n){return n[1]!=e?(this.next="","string"):(n.shift(),n.shift(),this.next=this.nextState,"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:/\$\{[^"\}]+\}?/},{token:"string",regex:'"',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string",regex:"'",next:"start"},{defaultToken:"string"}]},this.embedRules(s,"doc-",[s.getEndRule("start")])};r.inherits(a,o);var f=function(){u.call(this);var e=[{token:"support.php_tag",regex:"<\\?(?:php|=)?",push:"php-start"}],t=[{token:"support.php_tag",regex:"\\?>",next:"pop"}];for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.embedRules(a,"php-",t,["start"]),this.normalizeRules()};r.inherits(f,u),t.PhpHighlightRules=f,t.PhpLangHighlightRules=a}),define("ace/mode/php_laravel_blade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/php_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./php_highlight_rules").PhpHighlightRules,s=function(){i.call(this);var e={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_]*)(\\()(.*?)(\\))"}]},t=e.start;for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],t);Object.keys(e).forEach(function(t){this.$rules[t]||(this.$rules[t]=e[t])},this),this.normalizeRules()};r.inherits(s,i),t.PHPLaravelBladeHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/php_completions",["require","exports","module"],function(e,t,n){"use strict";function s(e,t){return e.type.lastIndexOf(t)>-1}var r={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"]},i={$_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"}},o=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(i.type==="support.php_tag"&&i.value==="0){var o=t.getTokenAt(n.row,i.start);if(o.type==="support.php_tag")return this.getTagCompletions(e,t,n,r)}return this.getFunctionCompletions(e,t,n,r)}if(s(i,"variable"))return this.getVariableCompletions(e,t,n,r);var u=t.getLine(n.row).substr(0,n.column);return i.type==="string"&&/(\$[\w]*)\[["']([^'"]*)$/i.test(u)?this.getArrayKeyCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return[{caption:"php",value:"php",meta:"php tag",score:1e6},{caption:"=",value:"=",meta:"php tag",score:1e6}]},this.getFunctionCompletions=function(e,t,n,i){var s=Object.keys(r);return s.map(function(e){return{caption:e,snippet:e+"($0)",meta:"php function",score:1e6,docHTML:r[e][1]}})},this.getVariableCompletions=function(e,t,n,r){var s=Object.keys(i);return s.map(function(e){return{caption:e,value:e,meta:"php variable",score:1e6}})},this.getArrayKeyCompletions=function(e,t,n,r){var s=t.getLine(n.row).substr(0,n.column),o=s.match(/(\$[\w]*)\[["']([^'"]*)$/i)[1];if(!i[o])return[];var u=[];return i[o].type==="array"&&i[o].value&&(u=Object.keys(i[o].value)),u.map(function(e){return{caption:e,value:e,meta:"php array key",score:1e6}})}}).call(o.prototype),t.PhpCompletions=o}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/php",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),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(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarkerPhp.exec(r);if(i)return this.phpBlock(e,n,i.index+2);var i=this.foldingStopMarkerPhp.exec(r);return i?this.phpBlock(e,n,i.index+2):this.getFoldWidgetRangeBase(e,t,n)},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarkerPhp.test(r),s=this.foldingStopMarkerPhp.test(r);if(i&&!s){var o=this.foldingStartMarkerPhp.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword")return"start"}}if(s&&t==="markbeginend"){var o=this.foldingStopMarkerPhp.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword")return"end"}}return this.getFoldWidgetBase(e,t,n)},this.phpBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword")return;var a=u.value,f=[a],l=this.indentKeywords[a];if(a==="else"||a==="elseif")l=1;if(!l)return;var c=l===-1?i.getCurrentTokenColumn():e.getLine(t).length,h=t;i.step=l===-1?i.stepBackward:i.stepForward;while(u=i.step()){if(u.type!=="keyword")continue;var p=l*this.indentKeywords[u.value];if(p>0)f.unshift(u.value);else if(p<=0){f.shift();if(!f.length)break;p===0&&f.unshift(u.value)}}if(!u)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,h,c):new s(h,c,t,i.getCurrentTokenColumn())}}.call(u.prototype)}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./php_highlight_rules").PhpHighlightRules,o=e("./php_highlight_rules").PhpLangHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,f=e("./php_completions").PhpCompletions,l=e("./folding/php").FoldMode,c=e("../unicode"),h=e("./folding/mixed").FoldMode,p=e("./folding/html").FoldMode,d=e("./folding/cstyle").FoldMode,v=e("./html").Mode,m=e("./javascript").Mode,g=e("./css").Mode,y=function(e){this.HighlightRules=o,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.$completer=new f,this.foldingRules=new h(new p,{"js-":new d,"css-":new d,"php-":new l})};r.inherits(y,i),function(){this.tokenRe=new RegExp("^["+c.wordChars+"_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"_]|\\s])+","g"),this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[:]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o!="doc-start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/php-inline"}.call(y.prototype);var b=function(e){if(e&&e.inline){var t=new y;return t.createWorker=this.createWorker,t.inlinePhp=!0,t}v.call(this),this.HighlightRules=s,this.createModeDelegates({"js-":m,"css-":g,"php-":y}),this.foldingRules=new h(new p,{"js-":new d,"css-":new d,"php-":new l})};r.inherits(b,v),function(){this.createWorker=function(e){var t=new a(["ace"],"ace/mode/php_worker","PhpWorker");return t.attachToDocument(e.getDocument()),this.inlinePhp&&t.call("setOptions",[{inline:!0}]),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/php",this.snippetFileId="ace/snippets/php"}.call(b.prototype),t.Mode=b}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./php_laravel_blade_highlight_rules").PHPLaravelBladeHighlightRules,s=e("./php").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html").Mode,f=function(){s.call(this),this.HighlightRules=i,this.createModeDelegates({"js-":o,"css-":u,"html-":a})};r.inherits(f,s),function(){this.$id="ace/mode/php_laravel_blade"}.call(f.prototype),t.Mode=f}); (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/www/js/ace/mode-pig.js b/www/js/ace/mode-pig.js new file mode 100644 index 000000000..481a034d1 --- /dev/null +++ b/www/js/ace/mode-pig.js @@ -0,0 +1,8 @@ +define("ace/mode/pig_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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:!0},{token:"storage.datatypes.pig",regex:/\b(?:int|long|float|double|chararray|bytearray|boolean|datetime|biginteger|bigdecimal|tuple|bag|map)\b/,caseInsensitive:!0},{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:!0},{token:"constant.numeric.pig",regex:/\b\d+(?:\.\d+)?\b/},{token:"keyword.operator.comparison.pig",regex:/!=|==|<|>|<=|>=|\b(?:MATCHES|IS|OR|AND|NOT)\b/,caseInsensitive:!0},{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:!0,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:!0,push:[{token:"text",regex:/;?$/,next:"pop"}]}]},this.normalizeRules()};s.metaData={fileTypes:["pig"],name:"Pig",scopeName:"source.pig"},r.inherits(s,i),t.PigHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/pig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pig_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./pig_highlight_rules").PigHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/pig"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-plain_text.js b/www/js/ace/mode-plain_text.js new file mode 100644 index 000000000..d9de62005 --- /dev/null +++ b/www/js/ace/mode-plain_text.js @@ -0,0 +1,8 @@ +define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,u=function(){this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return""},this.$id="ace/mode/plain_text"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-plsql.js b/www/js/ace/mode-plsql.js new file mode 100644 index 000000000..c93b744b7 --- /dev/null +++ b/www/js/ace/mode-plsql.js @@ -0,0 +1,8 @@ +define("ace/mode/plsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="true|false",n="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",r="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",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,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()};r.inherits(s,i),t.plsqlHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=t.FoldMode=function(){};r.inherits(s,i),function(){}.call(s.prototype)}),define("ace/mode/plsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/plsql_highlight_rules","ace/mode/folding/sql"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./plsql_highlight_rules").plsqlHighlightRules,o=e("./folding/sql").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/plsql"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-powershell.js b/www/js/ace/mode-powershell.js new file mode 100644 index 000000000..a6e9227fe --- /dev/null +++ b/www/js/ace/mode-powershell.js @@ -0,0 +1,8 @@ +define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="[a-zA-Z\\?_\u00a1-\uffff][a-zA-Z\\d\\?_\u00a1-\uffff]*",t="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",n="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",r=this.createKeywordMapper({"support.function":n,keyword:t},"identifier"),i="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",regex:/@'$/,push:[{token:"string",regex:/^'@/,next:"pop"},{defaultToken:"string"}]},{token:"string",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:"[$]"+e+"\\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:"\\-(?:"+i+")"},{token:"keyword.operator",regex:"&|\\+|\\-|\\*|\\/|\\%|\\=|\\>|\\&|\\!|\\|"},{include:"constants"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"}],constants:[{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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",regex:"['][^']*[']"},{token:"string",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()};r.inherits(s,i),t.PowershellHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./powershell_highlight_rules").PowershellHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u({start:"^\\s*(<#)",end:"^[#\\s]>\\s*$"})};r.inherits(a,i),function(){this.lineCommentStart="#",this.blockComment={start:"<#",end:"#>"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){return null},this.$id="ace/mode/powershell"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-praat.js b/www/js/ace/mode-praat.js new file mode 100644 index 000000000..5f2fa1bbc --- /dev/null +++ b/www/js/ace/mode-praat.js @@ -0,0 +1,8 @@ +define("ace/mode/praat_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="if|then|else|elsif|elif|endif|fi|endfor|endproc|while|endwhile|repeat|until|select|plus|minus|assert|asserterror",t="macintosh|windows|unix|praatVersion|praatVersion\\$pi|undefined|newline\\$|tab\\$|shellDirectory\\$|homeDirectory\\$|preferencesDirectory\\$|temporaryDirectory\\$|defaultDirectory\\$",n="clearinfo|endSendPraat",r="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",i="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*)("+n+")$"},{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:"("+i+")"},{token:"variable.language",regex:"("+t+")"},{token:["support.function","text"],regex:"((?:"+r+")\\$?)(\\s*(?::|\\())"},{token:"keyword",regex:/(\bfor\b)/,next:"for"},{token:"keyword",regex:"(\\b(?:"+e+")\\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"}]}};r.inherits(s,i),t.PraatHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./praat_highlight_rules").PraatHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/praat"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-prisma.js b/www/js/ace/mode-prisma.js new file mode 100644 index 000000000..a45f179f3 --- /dev/null +++ b/www/js/ace/mode-prisma.js @@ -0,0 +1,8 @@ +define("ace/mode/prisma_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={name:"Prisma",scopeName:"source.prisma"},r.inherits(s,i),t.PrismaHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/prisma",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prisma_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./prisma_highlight_rules").PrismaHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/prisma"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-prolog.js b/www/js/ace/mode-prolog.js new file mode 100644 index 000000000..469c08895 --- /dev/null +++ b/www/js/ace/mode-prolog.js @@ -0,0 +1,8 @@ +define("ace/mode/prolog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["plg","prolog"],foldingStartMarker:"(%\\s*region \\w*)|([a-z]\\w*.*:- ?)",foldingStopMarker:"(%\\s*end(\\s*region)?)|(?=\\.)",keyEquivalent:"^~P",name:"Prolog",scopeName:"source.prolog"},r.inherits(s,i),t.PrologHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./prolog_highlight_rules").PrologHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="%",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/prolog"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-properties.js b/www/js/ace/mode-properties.js new file mode 100644 index 000000000..5cc115c03 --- /dev/null +++ b/www/js/ace/mode-properties.js @@ -0,0 +1,8 @@ +define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\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:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-protobuf.js b/www/js/ace/mode-protobuf.js new file mode 100644 index 000000000..885dd192d --- /dev/null +++ b/www/js/ace/mode-protobuf.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=function(e){var t="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",n="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",r="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",s="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",u="NULL|true|false|TRUE|FALSE|nullptr",a=this.$keywords=this.createKeywordMapper(Object.assign({"keyword.control":t,"storage.type":n,"storage.modifier":r,"keyword.operator":s,"variable.language":"this","constant.language":u,"support.function.C99.c":o},e),"identifier"),f="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",l=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,c="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+l+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:l},{token:"constant.language.escape",regex:c},{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",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:a,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",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",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(u,s),t.c_cppHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c_cpp_highlight_rules").c_cppHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp",this.snippetFileId="ace/snippets/c_cpp"}.call(a.prototype),t.Mode=a}),define("ace/mode/protobuf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes",t="message|required|optional|repeated|package|import|option|enum",n=this.createKeywordMapper({"keyword.declaration.protobuf":t,"support.type":e},"identifier");this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/\/\*/,next:"comment"},{token:"constant",regex:"<[^>]+>"},{regex:"=",token:"keyword.operator.assignment.protobuf"},{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:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(s,i),t.ProtobufHighlightRules=s}),define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./c_cpp").Mode,s=e("./protobuf_highlight_rules").ProtobufHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){i.call(this),this.foldingRules=new o,this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/protobuf"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-prql.js b/www/js/ace/mode-prql.js new file mode 100644 index 000000000..9bf5aae3c --- /dev/null +++ b/www/js/ace/mode-prql.js @@ -0,0 +1,8 @@ +define("ace/mode/prql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t=["bool","int","int8","int16","int32","int64","int128","float","text","timestamp","set"].join("|"),n=this.createKeywordMapper({"constant.language":"null","constant.language.boolean":"true|false",keyword:"let|into|case|prql|type|module|internal","storage.type":"let|func","support.function":e,"support.type":t,"variable.language":"date|math"},"identifier"),r=/\\(\d+|['"\\&bfnrt]|u\{[0-9a-fA-F]{1,6}\}|x[0-9a-fA-F]{2})/,i=/[A-Za-z_][a-z_A-Z0-9]/.source,s=/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/.source,o="[\\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:"'(?:"+r.source+"|.)'?"},{token:"constant.language",regex:"^"+i+"*"},{token:["constant.numeric","keyword"],regex:"("+s+")(years|months|weeks|days|hours|minutes|seconds|milliseconds|microseconds)"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:s},{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:o},{token:"punctuation.operator",regex:/[,`]/},{token:n,regex:"[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"},{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/}],pipe:[{token:"constant.language",regex:i+"*",next:"pop"},{token:"error",regex:"",next:"pop"}],string:[{token:"constant.character.escape",regex:r},{token:"text",regex:/\\(\s|$)/,next:"stringGap"},{token:"string.end",regex:'"',next:"start"},{token:"invalid.illegal",regex:o},{defaultToken:"string.double"}],stringGap:[{token:"text",regex:/\\/,next:"string"},{token:"error",regex:"",next:"start"}],fstring:[{token:"constant.character.escape",regex:r},{token:"string.end",regex:'"',next:"start"},{token:"invalid.illegal",regex:o},{token:"paren.lparen",regex:"{",push:"fstringParenRules"},{token:"invalid.illegal",regex:o},{defaultToken:"string"}],fstringParenRules:[{token:"constant.language",regex:"^"+i+"*"},{token:"paren.rparen",regex:"}",next:"pop"}],rstring:[{token:"string.end",regex:'"',next:"start"},{token:"invalid.illegal",regex:o},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(s,i),t.PrqlHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/prql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prql_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./prql_highlight_rules").PrqlHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/prql"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-puppet.js b/www/js/ace/mode-puppet.js new file mode 100644 index 000000000..727779198 --- /dev/null +++ b/www/js/ace/mode-puppet.js @@ -0,0 +1,8 @@ +define("ace/mode/puppet_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};r.inherits(s,i),t.PuppetHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./puppet_highlight_rules").PuppetHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){i.call(this),this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.lineCommentStart="#",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/puppet"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-python.js b/www/js/ace/mode-python.js new file mode 100644 index 000000000..810808302 --- /dev/null +++ b/www/js/ace/mode-python.js @@ -0,0 +1,8 @@ +define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="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",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"variable.language":"self|cls","constant.language":t,keyword:e},"identifier"),i="[uU]?",s="[rR]",o="[fF]",u="(?:[rR][fF]|[fF][rR])",a="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",l="(?:0[xX][\\dA-Fa-f]+)",c="(?:0[bB][01]+)",h="(?:"+a+"|"+f+"|"+l+"|"+c+")",p="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",v="(?:\\d+)",m="(?:(?:"+v+"?"+d+")|(?:"+v+"\\.))",g="(?:(?:"+m+"|"+v+")"+p+")",y="(?:"+g+"|"+m+")",b="\\\\(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",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"string",regex:s+'"{3}',next:"rawqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rawqqstring"},{token:"string",regex:s+"'{3}",next:"rawqstring3"},{token:"string",regex:s+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",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:b},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",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:b},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:b},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",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",regex:"(?:"+y+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:y},{token:"constant.numeric",regex:h+"[lL]\\b"},{token:"constant.numeric",regex:h+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};r.inherits(s,i),t.PythonHighlightRules=s}),define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:"),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-qml.js b/www/js/ace/mode-qml.js new file mode 100644 index 000000000..ec994b6a9 --- /dev/null +++ b/www/js/ace/mode-qml.js @@ -0,0 +1,8 @@ +define("ace/mode/qml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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|property|","constant.language":"null|Infinity|NaN|undefined","support.function":"print|console\\.log","constant.language.boolean":"true|false"},"identifier");this.$rules={start:[{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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:e,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"}]}};r.inherits(s,i),t.QmlHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/qml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/qml_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./qml_highlight_rules").QmlHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'"},this.$id="ace/mode/qml"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-r.js b/www/js/ace/mode-r.js new file mode 100644 index 000000000..09e0d075e --- /dev/null +++ b/www/js/ace/mode-r.js @@ -0,0 +1,8 @@ +define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",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",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",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",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."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),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(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./tex_highlight_rules").TexHighlightRules,u=function(){var e=i.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("|")),t=i.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",regex:'["]',next:"qqstring"},{token:"string",regex:"[']",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+[Li]?\\b"},{token:"constant.numeric",regex:"\\d+L\\b"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.numeric",regex:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.language.boolean",regex:"(?:TRUE|FALSE|T|F)\\b"},{token:"identifier",regex:"`.*?`"},{onMatch:function(n){return e[n]?"keyword":t[n]?"constant.language":n=="..."||n.match(/^\.\.\d+$/)?"variable.language":"identifier"},regex:"[a-zA-Z.][a-zA-Z0-9._]*\\b"},{token:"keyword.operator",regex:"%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"},{token:"keyword.operator",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 n=(new o("comment")).getRules();for(var r=0;r|\\+|\\*|-|/|~|%|\\?|!|\\^|\\.|\\:|\\,|\u00bb|\u00ab|\\||\\&|\u269b|\u2218"},v={token:"constant.language",regex:"\ud835\udc52|\u03c0|\u03c4|\u221e"},m={token:"string.quoted.single",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},g={token:"string.quoted.single",regex:"[<](?:[a-zA-Z0-9 ])*[>]"},y={token:"string.regexp",regex:"[m|rx]?[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"};this.$rules={start:[{token:"comment.block",regex:"#[`|=]\\(.*\\)"},{token:"comment.block",regex:"#[`|=]\\[.*\\]"},{token:"comment.doc",regex:"^=(?:begin)\\b",next:"block_comment"},{token:"string.unquoted",regex:"q[x|w]?\\:to/END/;",next:"qheredoc"},{token:"string.unquoted",regex:"qq[x|w]?\\:to/END/;",next:"qqheredoc"},y,m,{token:"string.quoted.double",regex:'"',next:"qqstring"},g,{token:["keyword","text","variable.module"],regex:"(use)(\\s+)((?:"+o+"\\.?)*)"},u,a,f,l,c,h,p,d,v,{token:"comment",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})'},h,p,{token:"lparen",regex:"{",next:"qqinterpolation"},{token:"string.quoted.double",regex:'"',next:"start"},{defaultToken:"string.quoted.double"}],qqinterpolation:[u,a,f,l,c,h,p,d,v,m,y,{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:[h,p,{token:"lparen",regex:"{",next:"qqheredocinterpolation"},{token:"string.unquoted",regex:"END$",next:"start"},{defaultToken:"string.unquoted"}],qqheredocinterpolation:[u,a,f,l,c,h,p,d,v,m,y,{token:"rparen",regex:"}",next:"qqheredoc"}]}};r.inherits(s,i),t.RakuHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./raku_highlight_rules").RakuHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u({start:"^=(begin)\\b",end:"^=(end)\\b"}),this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.blockComment=[{start:"=begin",end:"=end",lineStartOnly:!0},{start:"=item",end:"=end",lineStartOnly:!0}],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/raku"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-razor.js b/www/js/ace/mode-razor.js new file mode 100644 index 000000000..142feca6e --- /dev/null +++ b/www/js/ace/mode-razor.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=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:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",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",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:e,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",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(o,s),t.CSharpHighlightRules=o}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./html_highlight_rules").HtmlHighlightRules,u=e("./csharp_highlight_rules").CSharpHighlightRules,a="razor-block-",f=function(){u.call(this);var e=function(e,t){return typeof t=="function"?t(e):t},t="in-braces";this.$rules.start.unshift({regex:"[\\[({]",onMatch:function(e,n,r){var i=/razor-[^\-]+-/.exec(n)[0];return r.unshift(e),r.unshift(i+t),this.next=i+t,"paren.lparen"}},{start:"@\\*",end:"\\*@",token:"comment"});var n={"{":"}","[":"]","(":")"};this.$rules[t]=i.deepCopy(this.$rules.start),this.$rules[t].unshift({regex:"[\\])}]",onMatch:function(t,r,i){var s=i[1];return n[s]!==t?"invalid.illegal":(i.shift(),i.shift(),this.next=e(t,i[0])||"start","paren.rparen")}})};r.inherits(f,u);var l=function(){o.call(this);var e={regex:"@[({]|@functions{",onMatch:function(e,t,n){return n.unshift(e),n.unshift("razor-block-start"),this.next="razor-block-start","punctuation.block.razor"}},t={"@{":"}","@(":")","@functions{":"}"},n={regex:"[})]",onMatch:function(e,n,r){var i=r[1];return t[i]!==e?"invalid.illegal":(r.shift(),r.shift(),this.next=r.shift()||"start","punctuation.block.razor")}},r={regex:"@(?![{(])",onMatch:function(e,t,n){return n.unshift("razor-short-start"),this.next="razor-short-start","punctuation.short.razor"}},i={token:"",regex:"(?=[^A-Za-z_\\.()\\[\\]])",next:"pop"},s={regex:"@(?=if)",onMatch:function(e,t,n){return n.unshift(function(e){return e!=="}"?"start":n.shift()||"start"}),this.next="razor-block-start","punctuation.control.razor"}},u=[{start:"@\\*",end:"\\*@",token:"comment"},{token:["meta.directive.razor","text","identifier"],regex:"^(\\s*@model)(\\s+)(.+)$"},e,r];for(var a in this.$rules)this.$rules[a].unshift.apply(this.$rules[a],u);this.embedRules(f,"razor-block-",[n],["start"]),this.embedRules(f,"razor-short-",[i],["start"]),this.normalizeRules()};r.inherits(l,o),t.RazorHighlightRules=l,t.RazorLangHighlightRules=f}),define("ace/mode/razor_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../token_iterator").TokenIterator,i=["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"],s=["Html","Model","Url","Layout"],o=function(){};(function(){this.getCompletions=function(e,t,n,r){if(e.lastIndexOf("razor-short-start")==-1&&e.lastIndexOf("razor-block-start")==-1)return[];var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(e.lastIndexOf("razor-short-start")!=-1)return this.getShortStartCompletions(e,t,n,r);if(e.lastIndexOf("razor-block-start")!=-1)return this.getKeywordCompletions(e,t,n,r)},this.getShortStartCompletions=function(e,t,n,r){return s.map(function(e){return{value:e,meta:"keyword",score:1e6}})},this.getKeywordCompletions=function(e,t,n,r){return s.concat(i).map(function(e){return{value:e,meta:"keyword",score:1e6}})}}).call(o.prototype),t.RazorCompletions=o}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./razor_highlight_rules").RazorHighlightRules,o=e("./razor_completions").RazorCompletions,u=e("./html_completions").HtmlCompletions,a=function(){i.call(this),this.$highlightRules=new s,this.$completer=new o,this.$htmlCompleter=new u};r.inherits(a,i),function(){this.getCompletions=function(e,t,n,r){var i=this.$completer.getCompletions(e,t,n,r),s=this.$htmlCompleter.getCompletions(e,t,n,r);return i.concat(s)},this.createWorker=function(e){return null},this.$id="ace/mode/razor",this.snippetFileId="ace/snippets/razor"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-rdoc.js b/www/js/ace/mode-rdoc.js new file mode 100644 index 000000000..2b119ed6b --- /dev/null +++ b/www/js/ace/mode-rdoc.js @@ -0,0 +1,8 @@ +define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};r.inherits(s,i),t.LatexHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./latex_highlight_rules"),u=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:"text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",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",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",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",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",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+"}]}};r.inherits(u,s),t.RDocHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./rdoc_highlight_rules").RDocHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(e){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.$id="ace/mode/rdoc"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-red.js b/www/js/ace/mode-red.js new file mode 100644 index 000000000..c3c9fe83e --- /dev/null +++ b/www/js/ace/mode-red.js @@ -0,0 +1,8 @@ +define("ace/mode/red_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="";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"}]}};r.inherits(s,i),t.RedHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./red_highlight_rules").RedHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=function(){this.HighlightRules=s,this.foldingRules=new o,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(f,i),function(){this.lineCommentStart=";",this.blockComment={start:"comment {",end:"}"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\[\(]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/red"}.call(f.prototype),t.Mode=f}); (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/www/js/ace/mode-redshift.js b/www/js/ace/mode-redshift.js new file mode 100644 index 000000000..824eb18e4 --- /dev/null +++ b/www/js/ace/mode-redshift.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",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:"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",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),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(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=e("./json_highlight_rules").JsonHighlightRules,a=function(){var e="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",t="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",n=this.createKeywordMapper({"support.function":t,keyword:e},"identifier",!0),r=[{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"variable.language",regex:'".*?"'},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:n,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.$rules={start:[{token:"comment",regex:"--.*$"},s.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"keyword.statementBegin",regex:"^[a-zA-Z]+",next:"statement"},{token:"support.buildin",regex:"^\\\\[\\S]+.*$"}],statement:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentStatement"},{token:"statementEnd",regex:";",next:"start"},{token:"string",regex:"\\$json\\$",next:"json-start"},{token:"string",regex:"\\$[\\w_0-9]*\\$$",next:"dollarSql"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarStatementString"}].concat(r),dollarSql:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentDollarSql"},{token:"string",regex:"^\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarSqlString"}].concat(r),comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],commentStatement:[{token:"comment",regex:".*?\\*\\/",next:"statement"},{token:"comment",regex:".+"}],commentDollarSql:[{token:"comment",regex:".*?\\*\\/",next:"dollarSql"},{token:"comment",regex:".+"}],dollarStatementString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:".+"}],dollarSqlString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"dollarSql"},{token:"string",regex:".+"}]},this.embedRules(s,"doc-",[s.getEndRule("start")]),this.embedRules(u,"json-",[{token:"string",regex:"\\$json\\$",next:"statement"}])};r.inherits(a,o),t.RedshiftHighlightRules=a}),define("ace/mode/redshift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/redshift_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../mode/text").Mode,s=e("./redshift_highlight_rules").RedshiftHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){return e=="start"||e=="keyword.statementEnd"?"":this.$getIndent(t)},this.$id="ace/mode/redshift"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-rhtml.js b/www/js/ace/mode-rhtml.js new file mode 100644 index 000000000..bbb3eb8b2 --- /dev/null +++ b/www/js/ace/mode-rhtml.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",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",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",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",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."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),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(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./tex_highlight_rules").TexHighlightRules,u=function(){var e=i.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("|")),t=i.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",regex:'["]',next:"qqstring"},{token:"string",regex:"[']",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+[Li]?\\b"},{token:"constant.numeric",regex:"\\d+L\\b"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.numeric",regex:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.language.boolean",regex:"(?:TRUE|FALSE|T|F)\\b"},{token:"identifier",regex:"`.*?`"},{onMatch:function(n){return e[n]?"keyword":t[n]?"constant.language":n=="..."||n.match(/^\.\.\d+$/)?"variable.language":"identifier"},regex:"[a-zA-Z.][a-zA-Z0-9._]*\\b"},{token:"keyword.operator",regex:"%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"},{token:"keyword.operator",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 n=(new o("comment")).getRules();for(var r=0;r",next:"start"}],["start"]),this.normalizeRules()};r.inherits(u,o),t.RHtmlHighlightRules=u}),define("ace/mode/rhtml",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/rhtml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./rhtml_highlight_rules").RHtmlHighlightRules,o=function(e,t){i.call(this),this.$session=t,this.HighlightRules=s};r.inherits(o,i),function(){this.insertChunkInfo={value:"\n",position:{row:0,column:15}},this.getLanguageMode=function(e){return this.$session.getState(e.row).match(/^r-/)?"R":"HTML"},this.$id="ace/mode/rhtml"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-robot.js b/www/js/ace/mode-robot.js new file mode 100644 index 000000000..a5cc4dc41 --- /dev/null +++ b/www/js/ace/mode-robot.js @@ -0,0 +1,8 @@ +define("ace/mode/robot_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=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:!0,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:!0,push:[{token:"comment",regex:/^(?!\s*\.\.\.)/,next:"pop"},{defaultToken:"comment"}]},{token:"storage.type.method.robot",regex:/\[(?:Arguments|Setup|Teardown|Precondition|Postcondition|Template|Return|Timeout)\]/,caseInsensitive:!0,comment:"testcase settings"},{token:"storage.type.method.robot",regex:/\[Tags\]/,caseInsensitive:!0,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:e,caseInsensitive:!0},{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:!0},{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()};s.metadata={fileTypes:["robot"],name:"Robot",scopeName:"source.robot"},r.inherits(s,i),t.RobotHighlightRules=s}),define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)}),define("ace/mode/robot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/robot_highlight_rules","ace/mode/folding/pythonic"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./robot_highlight_rules").RobotHighlightRules,o=e("./folding/pythonic").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/robot",this.snippetFileId="ace/snippets/robot"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-rst.js b/www/js/ace/mode-rst.js new file mode 100644 index 000000000..ef2c774fe --- /dev/null +++ b/www/js/ace/mode-rst.js @@ -0,0 +1,8 @@ +define("ace/mode/rst_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e={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"},t="(^|\\s|[\"'(<\\[{\\-/:])",n="(?:$|(?=\\s|[\\\\.,;!?\\-/:\"')>\\]}]))";this.$rules={start:[{token:e.title,regex:"(^)([\\=\\-`:\\.'\"~\\^_\\*\\+#])(\\2{2,}\\s*$)"},{token:["text",e.directive,e.literal],regex:"(^\\s*\\.\\. )([^: ]+::)(.*$)",next:"codeblock"},{token:e.directive,regex:"::$",next:"codeblock"},{token:[e.entity,e.link],regex:"(^\\.\\. _[^:]+:)(.*$)"},{token:[e.entity,e.link],regex:"(^__ )(https?://.*$)"},{token:e.entity,regex:"^\\.\\. \\[[^\\]]+\\] "},{token:e.comment,regex:"^\\.\\. .*$",next:"comment"},{token:e.list,regex:"^\\s*[\\*\\+-] "},{token:e.list,regex:"^\\s*(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\. "},{token:e.list,regex:"^\\s*\\(?(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\) "},{token:e.table,regex:"^={2,}(?: +={2,})+$"},{token:e.table,regex:"^\\+-{2,}(?:\\+-{2,})+\\+$"},{token:e.table,regex:"^\\+={2,}(?:\\+={2,})+\\+$"},{token:["text",e.literal],regex:t+"(``)(?=\\S)",next:"code"},{token:["text",e.bold],regex:t+"(\\*\\*)(?=\\S)",next:"bold"},{token:["text",e.italic],regex:t+"(\\*)(?=\\S)",next:"italic"},{token:e.entity,regex:"\\|[\\w\\-]+?\\|"},{token:e.entity,regex:":[\\w-:]+:`\\S",next:"entity"},{token:["text",e.entity],regex:t+"(_`)(?=\\S)",next:"entity"},{token:e.entity,regex:"_[A-Za-z0-9\\-]+?"},{token:["text",e.link],regex:t+"(`)(?=\\S)",next:"link"},{token:e.link,regex:"[A-Za-z0-9\\-]+?__?"},{token:e.link,regex:"\\[[^\\]]+?\\]_"},{token:e.link,regex:"https?://\\S+"},{token:e.table,regex:"\\|"}],codeblock:[{token:e.literal,regex:"^ +.+$",next:"codeblock"},{token:e.literal,regex:"^$",next:"codeblock"},{token:"empty",regex:"",next:"start"}],code:[{token:e.literal,regex:"\\S``"+n,next:"start"},{defaultToken:e.literal}],bold:[{token:e.bold,regex:"\\S\\*\\*"+n,next:"start"},{defaultToken:e.bold}],italic:[{token:e.italic,regex:"\\S\\*"+n,next:"start"},{defaultToken:e.italic}],entity:[{token:e.entity,regex:"\\S`"+n,next:"start"},{defaultToken:e.entity}],link:[{token:e.link,regex:"\\S`__?"+n,next:"start"},{defaultToken:e.link}],comment:[{token:e.comment,regex:"^ +.+$",next:"comment"},{token:e.comment,regex:"^$",next:"comment"},{token:"empty",regex:"",next:"start"}]}};r.inherits(o,s),t.RSTHighlightRules=o}),define("ace/mode/rst",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rst_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./rst_highlight_rules").RSTHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.type="text",this.$id="ace/mode/rst",this.snippetFileId="ace/snippets/rst"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-ruby.js b/www/js/ace/mode-ruby.js new file mode 100644 index 000000000..6c220ebcf --- /dev/null +++ b/www/js/ace/mode-ruby.js @@ -0,0 +1,8 @@ +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="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",t="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",n="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",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?: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})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",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:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{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",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",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\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","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()};r.inherits(d,i),t.RubyHighlightRules=d}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),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(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]){if(o[1]=="if"||o[1]=="else"||o[1]=="while"||o[1]=="until"||o[1]=="unless"){if(o[1]=="else"&&/^\s*else\s*$/.test(r)===!1)return;if(/^\s*(?:if|else|while|until|unless)\s*/.test(r)===!1)return}if(o[1]=="when"&&/\sthen\s/.test(r)===!0)return;if(e.getTokenAt(n,o.index+2).type==="keyword")return"start"}else{if(!o[3])return"start";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[3]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(!o[1])return"end";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]||i[3]?this.rubyBlock(e,n,i.index+2):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[3]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.rubyBlock(e,n,i.index+1):i[1]==="=end"&&e.getTokenAt(n,i.index+1).type==="comment.multiline"?this.rubyBlock(e,n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.rubyBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword"&&u.type!="comment.multiline")return;var a=u.value,f=e.getLine(t);switch(u.value){case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);if(!l.test(f))return;var c=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var c=1;break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f))return;var c=1;break;default:var c=this.indentKeywords[a]}var h=[a];if(!c)return;var p=c===-1?e.getLine(t-1).length:e.getLine(t).length,d=t,v=[];v.push(i.getCurrentTokenRange()),i.step=c===-1?i.stepBackward:i.stepForward;if(u.type=="comment.multiline")while(u=i.step()){if(u.type!=="comment.multiline")continue;if(c==1){p=6;if(u.value=="=end")break}else if(u.value=="=begin")break}else while(u=i.step()){var m=!1;if(u.type!=="keyword")continue;var g=c*this.indentKeywords[u.value];f=e.getLine(i.getCurrentTokenRow());switch(u.value){case"do":for(var y=i.$tokenIndex-1;y>=0;y--){var b=i.$rowTokens[y];if(b&&(b.value=="while"||b.value=="until"||b.value=="for")){g=0;break}}break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f)||a=="case")g=0,m=!0;break;case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);l.test(f)||(g=0,m=!0);break;case"when":if(/\sthen\s/.test(f)||a=="case")g=0,m=!0}if(g>0)h.unshift(u.value);else if(g<=0&&m===!1){h.shift();if(!h.length){if((a=="while"||a=="until"||a=="for")&&u.value!="do")break;if(u.value=="do"&&c==-1&&g!=0)break;if(u.value!="do")break}g===0&&h.unshift(u.value)}}if(!u)return null;if(r)return v.push(i.getCurrentTokenRange()),v;var t=i.getCurrentTokenRow();if(c===-1){if(u.type==="comment.multiline")var w=6;else var w=e.getLine(t).length;return new s(t,w,d-1,p)}return new s(d,p,t-1,e.getLine(t-1).length)}}.call(u.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("./folding/ruby").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/),u=t.match(/^\s*(class|def|module)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),f=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);if(o||u||a||f)r+=n}return r},this.checkOutdent=function(e,t,n){return/^\s+(end|else|rescue|ensure)$/.test(t+n)||this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){var r=t.getLine(n);if(/}/.test(r))return this.$outdent.autoOutdent(t,n);var i=this.$getIndent(r),s=t.getLine(n-1),o=this.$getIndent(s),a=t.getTabString();o.length<=i.length&&i.slice(-a.length)==a&&t.remove(new u(n,i.length-a.length,n,i.length))},this.getMatching=function(e,t,n){if(t==undefined){var r=e.selection.lead;n=r.column,t=r.row}var i=e.getTokenAt(t,n);if(i&&i.value in this.indentKeywords)return this.foldingRules.rubyBlock(e,t,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}.call(f.prototype),t.Mode=f}); (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/www/js/ace/mode-rust.js b/www/js/ace/mode-rust.js new file mode 100644 index 000000000..8ab5475bc --- /dev/null +++ b/www/js/ace/mode-rust.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/rust_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=/\\(?:[nrt0'"\\]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source,u=/[a-zA-Z_\xa1-\uffff][a-zA-Z0-9_\xa1-\uffff]*/.source,a=function(){var e=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",regex:"'"+u+"(?![\\'])"},{token:"string.quoted.single.source.rust",regex:"'(?:[^'\\\\]|"+o+")'"},{token:"identifier",regex:"r#"+u+"\\b"},{stateName:"bracketedComment",onMatch:function(e,t,n){var r=e.replace(/^\w+/,"");return n.unshift(this.next,r.length,t),"string.quoted.raw.source.rust"},regex:/(b|c)?r#*"/,next:[{onMatch:function(e,t,n){var r="string.quoted.raw.source.rust";return e.length>=n[1]?(e.length>n[1]&&(r="invalid"),n.shift(),n.shift(),this.next=n.shift()):this.next="",r},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:o},{defaultToken:"string.quoted.double.source.rust"}]},{token:["keyword.source.rust","text","entity.name.function.source.rust","punctuation"],regex:"\\b(fn)(\\s+)((?:r#)?"+u+")(<)(?!<)",push:"generics"},{token:["keyword.source.rust","text","entity.name.function.source.rust"],regex:"\\b(fn)(\\s+)((?:r#)?"+u+")"},{token:["support.constant","punctuation"],regex:"("+u+"::)(<)(?!<)",push:"generics"},{token:"support.constant",regex:u+"::"},{token:"variable.language.source.rust",regex:"\\bself\\b"},s.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)|("+u+"))(<)(?!<)",stateName:"generics",push:[{token:"keyword.operator",regex:/<<|=/},{token:"punctuaction",regex:"<(?!<)",push:"generics"},{token:"variable.other.source.rust",regex:"'"+u+"(?![\\'])"},{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"+u+"\\b"}]},{token:e,regex:u},{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",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(s,"doc-",[s.getEndRule("start")]),this.normalizeRules()};a.metaData={fileTypes:["rs","rc"],foldingStartMarker:"^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$",foldingStopMarker:"^\\s*\\}",name:"Rust",scopeName:"source.rust"},r.inherits(a,i),t.RustHighlightRules=a}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/rust",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rust_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./rust_highlight_rules").RustHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/",nestable:!0},this.$quotes={'"':'"'},this.$id="ace/mode/rust"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-sac.js b/www/js/ace/mode-sac.js new file mode 100644 index 000000000..55ba7abf4 --- /dev/null +++ b/www/js/ace/mode-sac.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/sac_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="break|continue|do|else|for|if|return|with|while|use|class|all|void",t="bool|char|complex|double|float|byte|int|short|long|longlong|ubyte|uint|ushort|ulong|ulonglong|struct|typedef",n="inline|external|specialize",r="step|width",s="true|false",o=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"constant.language":s},"identifier"),u="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b",a=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,f="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+a+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:a},{token:"constant.language.escape",regex:f},{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",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:"support.function",regex:"fold|foldfix|genarray|modarray|propagate"},{token:o,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",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",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(o,s),t.sacHighlightRules=o}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/sac",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sac_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sac_highlight_rules").sacHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sac"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-sass.js b/www/js/ace/mode-sass.js new file mode 100644 index 000000000..21c1732a6 --- /dev/null +++ b/www/js/ace/mode-sass.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.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("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.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("|")),u=i.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("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?: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:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"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:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./scss_highlight_rules").ScssHighlightRules,o=function(){s.call(this);var e=this.$rules.start;e[1].token=="comment"&&(e.splice(1,1,{onMatch:function(e,t,n){return n.unshift(this.next,-1,e.length-2,t),"comment"},regex:/^\s*\/\*/,next:"comment"},{token:"error.invalid",regex:"/\\*|[{;}]"},{token:"support.type",regex:/^\s*:[\w\-]+\s/}),this.$rules.comment=[{regex:/^\s*/,onMatch:function(e,t,n){return n[1]===-1&&(n[1]=Math.max(n[2],e.length-1)),e.length<=n[1]?(n.shift(),n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}])};r.inherits(o,s),t.SassHighlightRules=o}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u"},{token:"keyword",regex:"(?:use|include)"},{token:e,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",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(s,"doc-",[s.getEndRule("start")])};r.inherits(u,o),t.scadHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scad_highlight_rules").scadHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/scad"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-scala.js b/www/js/ace/mode-scala.js new file mode 100644 index 000000000..e73bcad02 --- /dev/null +++ b/www/js/ace/mode-scala.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="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|readChar|readInt|readLong|readFloat|readDouble",t="true|false",n="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",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"support.function":n,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'"""',next:"tstring"},{token:"string",regex:'"(?=.)',next:"string"},{token:"symbol.constant",regex:"'[\\w\\d_]+"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,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",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(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.ScalaHighlightRules=o}),define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./scala_highlight_rules").ScalaHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/scala"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-scheme.js b/www/js/ace/mode-scheme.js new file mode 100644 index 000000000..69fae7314 --- /dev/null +++ b/www/js/ace/mode-scheme.js @@ -0,0 +1,8 @@ +define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="case|do|let|loop|if|else|when",t="eq?|eqv?|equal?|and|or|not|null?",n="#t|#f",r="cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);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",regex:"#[xXoObB][0-9a-fA-F]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?"},{token:i,regex:"[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.scheme",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}]}};r.inherits(s,i),t.SchemeHighlightRules=s}),define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\)/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\))/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingParensOutdent=i}),define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules","ace/mode/matching_parens_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scheme_highlight_rules").SchemeHighlightRules,o=e("./matching_parens_outdent").MatchingParensOutdent,u=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=";",this.minorIndentFunctions=["define","lambda","define-macro","define-syntax","syntax-rules","define-record-type","define-structure"],this.$toIndent=function(e){return e.split("").map(function(e){return/\s/.exec(e)?e:" "}).join("")},this.$calculateIndent=function(e,t){var n=this.$getIndent(e),r=0,i,s;for(var o=e.length-1;o>=0;o--){s=e[o],s==="("?(r--,i=!0):s==="("||s==="["||s==="{"?(r--,i=!1):(s===")"||s==="]"||s==="}")&&r++;if(r<0)break}if(!(r<0&&i))return r<0&&!i?this.$toIndent(e.substring(0,o+1)):r>0?(n=n.substring(0,n.length-t.length),n):n;o+=1;var u=o,a="";for(;;){s=e[o];if(s===" "||s===" ")return this.minorIndentFunctions.indexOf(a)!==-1?this.$toIndent(e.substring(0,u-1)+t):this.$toIndent(e.substring(0,o+1));if(s===undefined)return this.$toIndent(e.substring(0,u-1)+t);a+=e[o],o++}},this.getNextLineIndent=function(e,t,n){return this.$calculateIndent(t,n)},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/scheme"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-scrypt.js b/www/js/ace/mode-scrypt.js new file mode 100644 index 000000000..d88ae871e --- /dev/null +++ b/www/js/ace/mode-scrypt.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/scrypt_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="contract|library|loop|new|private|public|if|else|struct|type|require|static|const|import|exit|return|asm",t="true|false",n="function|auto|constructor|bytes|int|bool|SigHashPreimage|PrivKey|PubKey|Sig|Ripemd160|Sha1|Sha256|SigHashType|SigHashPreimage|OpCodeType",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",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:r,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",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(o,s),t.scryptHighlightRules=o}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/scrypt",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scrypt_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scrypt_highlight_rules").scryptHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'"},this.createWorker=function(e){return null},this.$id="ace/mode/scrypt"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-scss.js b/www/js/ace/mode-scss.js new file mode 100644 index 000000000..e2d165b26 --- /dev/null +++ b/www/js/ace/mode-scss.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.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("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.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("|")),u=i.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("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?: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:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"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:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scss_highlight_rules").ScssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./folding/cstyle").FoldMode,f=e("./css_completions").CssCompletions,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.$completer=new f,this.foldingRules=new a};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/scss"}.call(l.prototype),t.Mode=l}); (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/www/js/ace/mode-sh.js b/www/js/ace/mode-sh.js new file mode 100644 index 000000000..7c700ddcd --- /dev/null +++ b/www/js/ace/mode-sh.js @@ -0,0 +1,8 @@ +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.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",o=t.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",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\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:/`/},{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(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{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:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,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()};r.inherits(u,i),t.ShHighlightRules=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sh_highlight_rules").ShHighlightRules,o=e("../range").Range,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new o(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-sjs.js b/www/js/ace/mode-sjs.js new file mode 100644 index 000000000..5a15f6257 --- /dev/null +++ b/www/js/ace/mode-sjs.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=new i({noES6:!0}),t="\\\\(?: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]?|.)",n=function(e){return e.isContextAware=!0,e},r=function(e){return{token:e.token,regex:e.regex,next:n(function(t,n){return n.length===0&&n.unshift(t),n.unshift(e.next),e.next})}},s=function(e){return{token:e.token,regex:e.regex,next:n(function(e,t){return t.shift(),t[0]||"start"})}};this.$rules=e.$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"},r({token:"string",regex:"`",next:"bstring"}),r({token:"string",regex:'"',next:"qqstring"}),r({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:t},{token:"string",regex:"\\\\$",next:"bstring"},r({token:"paren.lparen",regex:"\\$\\{",next:"string_interp"}),r({token:"paren.lparen",regex:"\\$",next:"bstring_interp_single"}),s({token:"string",regex:"`"}),{defaultToken:"string"}],this.$rules.qqstring=[{token:"constant.language.escape",regex:t},{token:"string",regex:"\\\\$",next:"qqstring"},r({token:"paren.lparen",regex:"#\\{",next:"string_interp"}),s({token:"string",regex:'"'}),{defaultToken:"string"}];var o=[];for(var u=0;u=e.length?(n.splice(0,3),this.next=n.shift(),this.token):(this.next="",[{type:"text",value:i}])},next:""},{token:"string",regex:/.+/,onMatch:function(e,t,n,i){var s=n[2][0],o=n[2][1],u=n[1];if(r[o]){var a=r[o].getTokenizer().getLineTokens(i.slice(s.length),u.slice(0));return n[1]=a.state,a.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(e,t,n,r){var i=/^\s*/.exec(r)[0];return n.length<1?n.push(this.next):n[0]="mlString",n.length<2?n.push(i.length):n[1]=i.length,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(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",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()};i.inherits(o,s),t.SlimHighlightRules=o}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),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(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.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(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{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:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{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:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="`"?e.bgTokenizer.getState(n)=="start"?"end":"start":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type.lastIndexOf(c,0)===0}function h(){var e=f.value[0];return e=="="?6:e=="-"?5:7-f.value.search(/[^#]|$/)}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;if(r[0]=="`"){if(e.bgTokenizer.getState(n)!=="start"){while(++n0){r=e.getLine(n);if(r[0]=="`"&r.substring(0,3)=="```")break}return new s(n,r.length,u,0)}var f,c="markup.heading";if(l(n)){var p=h();while(++n=p)break}a=n-(!f||["=","-"].indexOf(f.value[0])==-1?1:2);if(a>u)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var v=e.getLine(a).length;return new s(u,i,a,v)}}}}.call(o.prototype)}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.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",o=t.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",u=function(){var e=this.createKeywordMapper({keyword:s,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",u="(?:(?:"+i+"|"+r+")"+")",a="(?:"+u+"|"+i+")",f="(?:&"+r+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",p="(?:"+l+"\\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:/`/},{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(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{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:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:p},{token:"support.function",regex:f},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:a},{token:"constant.numeric",regex:t+"\\b"},{token:e,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()};r.inherits(u,i),t.ShHighlightRules=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sh_highlight_rules").ShHighlightRules,o=e("../range").Range,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new o(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(a.prototype),t.Mode=a}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./xml_highlight_rules").XmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,f=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=o,this.$behaviour=new u,this.foldingRules=new a};r.inherits(l,s),function(){this.voidElements=i.arrayToMap([]),this.blockComment={start:""},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(l.prototype),t.Mode=l}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./behaviour/cstyle").CstyleBehaviour,s=e("./text").Mode,o=e("./markdown_highlight_rules").MarkdownHighlightRules,u=e("./folding/markdown").FoldMode,a=function(){this.HighlightRules=o,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new u,this.$behaviour=new i({braces:!0})};r.inherits(a,s),function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(e,t,n){if(e=="listblock"){var r=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);if(!r)return"";var i=r[2];return i||(i=parseInt(r[3],10)+1+"."),r[1]+i+r[4]}return this.$getIndent(t)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}.call(a.prototype),t.Mode=a}),define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="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",n="true|false|null|undefined|NaN|Infinity",r="case|const|function|var|void|with|enum|implements|interface|let|package|private|protected|public|static",i="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",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?: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:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{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:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.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*)("+r+")"},{token:"punctuation.operator",regex:"\\.{1,3}"},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{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()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|\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(t,n,r){var i=this.$getIndent(n),s=this.getTokenizer().getLineTokens(n,t).tokens;return(!s.length||s[s.length-1].type!=="comment")&&t==="start"&&e.test(n)&&(i+=r),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/coffee",this.snippetFileId="ace/snippets/coffee"}.call(l.prototype),t.Mode=l}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.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("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.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("|")),u=i.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("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?: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:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"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:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./scss_highlight_rules").ScssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./folding/cstyle").FoldMode,f=e("./css_completions").CssCompletions,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.$completer=new f,this.foldingRules=new a};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/scss"}.call(l.prototype),t.Mode=l}),define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./scss_highlight_rules").ScssHighlightRules,o=function(){s.call(this);var e=this.$rules.start;e[1].token=="comment"&&(e.splice(1,1,{onMatch:function(e,t,n){return n.unshift(this.next,-1,e.length-2,t),"comment"},regex:/^\s*\/\*/,next:"comment"},{token:"error.invalid",regex:"/\\*|[{;}]"},{token:"support.type",regex:/^\s*:[\w\-]+\s/}),this.$rules.comment=[{regex:/^\s*/,onMatch:function(e,t,n){return n[1]===-1&&(n[1]=Math.max(n[2],e.length-1)),e.length<=n[1]?(n.shift(),n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}])};r.inherits(o,s),t.SassHighlightRules=o}),define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sass_highlight_rules").SassHighlightRules,o=e("./folding/coffee").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/sass"}.call(u.prototype),t.Mode=u}),define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e="@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|or|and|when|not",t=e.split("|"),n=s.supportType.split("|"),r=this.createKeywordMapper({"support.constant":s.supportConstant,keyword:e,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"identifier",!0),i="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+i+")(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",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:i},{token:["support.function","paren.lparen","string","paren.rparen"],regex:"(url)(\\()(.*)(\\))"},{token:["support.function","paren.lparen"],regex:"(:extend|[a-z0-9_\\-]+)(\\()"},{token:function(e){return t.indexOf(e.toLowerCase())>-1?"keyword":"variable"},regex:"[@\\$][a-z0-9_\\-@\\$]*\\b"},{token:"variable",regex:"[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"},{token:function(e,t){return n.indexOf(e.toLowerCase())>-1?["support.type.property","text"]:["support.type.unknownProperty","text"]},regex:"([a-z0-9-_]+)(\\s*:)"},{token:"keyword",regex:"&"},{token:r,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:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(o,i),t.LessHighlightRules=o}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./less_highlight_rules").LessHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/css").CssBehaviour,a=e("./css_completions").CssCompletions,f=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new u,this.$completer=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions("ruleset",t,n,r)},this.$id="ace/mode/less"}.call(l.prototype),t.Mode=l}),define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var o=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},u=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},a=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},f=t.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},l=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},h=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=function(){var e="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",t="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",n="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",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),d="\\\\(?: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})*})",v={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",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:d},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{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",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var r=e[e.length-1];return n.unshift(r,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",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\\?(?:"+d+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},l,c,s,o,h,u,a,f,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"||e[2]=="~"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="",e=="}"&&n.length>1&&n[1]!="start"&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:d},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===v[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","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()};r.inherits(d,i),t.RubyHighlightRules=d}),define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),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(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]){if(o[1]=="if"||o[1]=="else"||o[1]=="while"||o[1]=="until"||o[1]=="unless"){if(o[1]=="else"&&/^\s*else\s*$/.test(r)===!1)return;if(/^\s*(?:if|else|while|until|unless)\s*/.test(r)===!1)return}if(o[1]=="when"&&/\sthen\s/.test(r)===!0)return;if(e.getTokenAt(n,o.index+2).type==="keyword")return"start"}else{if(!o[3])return"start";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[3]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(!o[1])return"end";if(e.getTokenAt(n,o.index+1).type==="comment.multiline")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]||i[3]?this.rubyBlock(e,n,i.index+2):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[3]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.rubyBlock(e,n,i.index+1):i[1]==="=end"&&e.getTokenAt(n,i.index+1).type==="comment.multiline"?this.rubyBlock(e,n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.rubyBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword"&&u.type!="comment.multiline")return;var a=u.value,f=e.getLine(t);switch(u.value){case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);if(!l.test(f))return;var c=this.indentKeywords[a];break;case"when":if(/\sthen\s/.test(f))return;case"elsif":case"rescue":case"ensure":var c=1;break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f))return;var c=1;break;default:var c=this.indentKeywords[a]}var h=[a];if(!c)return;var p=c===-1?e.getLine(t-1).length:e.getLine(t).length,d=t,v=[];v.push(i.getCurrentTokenRange()),i.step=c===-1?i.stepBackward:i.stepForward;if(u.type=="comment.multiline")while(u=i.step()){if(u.type!=="comment.multiline")continue;if(c==1){p=6;if(u.value=="=end")break}else if(u.value=="=begin")break}else while(u=i.step()){var m=!1;if(u.type!=="keyword")continue;var g=c*this.indentKeywords[u.value];f=e.getLine(i.getCurrentTokenRow());switch(u.value){case"do":for(var y=i.$tokenIndex-1;y>=0;y--){var b=i.$rowTokens[y];if(b&&(b.value=="while"||b.value=="until"||b.value=="for")){g=0;break}}break;case"else":var l=new RegExp("^\\s*"+u.value+"\\s*$");if(!l.test(f)||a=="case")g=0,m=!0;break;case"if":case"unless":case"while":case"until":var l=new RegExp("^\\s*"+u.value);l.test(f)||(g=0,m=!0);break;case"when":if(/\sthen\s/.test(f)||a=="case")g=0,m=!0}if(g>0)h.unshift(u.value);else if(g<=0&&m===!1){h.shift();if(!h.length){if((a=="while"||a=="until"||a=="for")&&u.value!="do")break;if(u.value=="do"&&c==-1&&g!=0)break;if(u.value!="do")break}g===0&&h.unshift(u.value)}}if(!u)return null;if(r)return v.push(i.getCurrentTokenRange()),v;var t=i.getCurrentTokenRow();if(c===-1){if(u.type==="comment.multiline")var w=6;else var w=e.getLine(t).length;return new s(t,w,d-1,p)}return new s(d,p,t-1,e.getLine(t-1).length)}}.call(u.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("./folding/ruby").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/),u=t.match(/^\s*(class|def|module)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),f=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);if(o||u||a||f)r+=n}return r},this.checkOutdent=function(e,t,n){return/^\s+(end|else|rescue|ensure)$/.test(t+n)||this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){var r=t.getLine(n);if(/}/.test(r))return this.$outdent.autoOutdent(t,n);var i=this.$getIndent(r),s=t.getLine(n-1),o=this.$getIndent(s),a=t.getTabString();o.length<=i.length&&i.slice(-a.length)==a&&t.remove(new u(n,i.length-a.length,n,i.length))},this.getMatching=function(e,t,n){if(t==undefined){var r=e.selection.lead;n=r.column,t=r.row}var i=e.getTokenAt(t,n);if(i&&i.value in this.indentKeywords)return this.foldingRules.rubyBlock(e,t,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}.call(f.prototype),t.Mode=f}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./slim_highlight_rules").SlimHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.createModeDelegates({javascript:e("./javascript").Mode,markdown:e("./markdown").Mode,coffee:e("./coffee").Mode,scss:e("./scss").Mode,sass:e("./sass").Mode,less:e("./less").Mode,ruby:e("./ruby").Mode,css:e("./css").Mode})};r.inherits(o,i),function(){this.$id="ace/mode/slim"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-smarty.js b/www/js/ace/mode-smarty.js new file mode 100644 index 000000000..532b9b942 --- /dev/null +++ b/www/js/ace/mode-smarty.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/smarty_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=function(){i.call(this);var e={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_]*)(\\()(.*?)(\\))"}]},t=e.start;for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],t);Object.keys(e).forEach(function(t){this.$rules[t]||(this.$rules[t]=e[t])},this),this.normalizeRules()};s.metaData={fileTypes:["tpl"],foldingStartMarker:"\\{%?",foldingStopMarker:"%?\\}",name:"Smarty",scopeName:"text.html.smarty"},r.inherits(s,i),t.SmartyHighlightRules=s}),define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./smarty_highlight_rules").SmartyHighlightRules,o=function(){i.call(this),this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/smarty"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-smithy.js b/www/js/ace/mode-smithy.js new file mode 100644 index 000000000..acb0f8470 --- /dev/null +++ b/www/js/ace/mode-smithy.js @@ -0,0 +1,8 @@ +define("ace/mode/smithy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={name:"Smithy",fileTypes:["smithy"],scopeName:"source.smithy",foldingStartMarker:"(\\{|\\[)\\s*",foldingStopMarker:"\\s*(\\}|\\])"},r.inherits(s,i),t.SmithyHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./smithy_highlight_rules").SmithyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};r.inherits(a,i),function(){this.lineCommentStart="//",this.$quotes={'"':'"'},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/smithy"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-snippets.js b/www/js/ace/mode-snippets.js new file mode 100644 index 000000000..5582fe14d --- /dev/null +++ b/www/js/ace/mode-snippets.js @@ -0,0 +1,8 @@ +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/soy_template_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,s=function(){i.call(this);var e={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 t in e)this.$rules[t]?this.$rules[t].unshift.apply(this.$rules[t],e[t]):this.$rules[t]=e[t];this.normalizeRules()};s.metaData={comment:"SoyTemplate",fileTypes:["soy"],firstLineMatch:"\\{\\s*namespace\\b",foldingStartMarker:"\\{\\s*template\\s+[^\\}]*\\}",foldingStopMarker:"\\{\\s*/\\s*template\\s*\\}",name:"SoyTemplate",scopeName:"source.soy"},r.inherits(s,i),t.SoyTemplateHighlightRules=s}),define("ace/mode/soy_template",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/soy_template_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./soy_template_highlight_rules").SoyTemplateHighlightRules,o=function(){i.call(this),this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/soy_template"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-space.js b/www/js/ace/mode-space.js new file mode 100644 index 000000000..5b01cc57a --- /dev/null +++ b/www/js/ace/mode-space.js @@ -0,0 +1,8 @@ +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|<=|>=|(?:^|!?\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()};s.metaData={fileTypes:["rq","sparql"],name:"SPARQL",scopeName:"source.sparql"},r.inherits(s,i),t.SPARQLHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/sparql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sparql_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sparql_highlight_rules").SPARQLHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/sparql"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-sql.js b/www/js/ace/mode-sql.js new file mode 100644 index 000000000..83943db93 --- /dev/null +++ b/www/js/ace/mode-sql.js @@ -0,0 +1,8 @@ +define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="true|false",n="avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",r="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer|string",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,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()};r.inherits(s,i),t.SqlHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./cstyle").FoldMode,s=t.FoldMode=function(){};r.inherits(s,i),function(){}.call(s.prototype)}),define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/mode/folding/sql"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sql_highlight_rules").SqlHighlightRules,o=e("./folding/sql").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sql",this.snippetFileId="ace/snippets/sql"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-sqlserver.js b/www/js/ace/mode-sqlserver.js new file mode 100644 index 000000000..708982aae --- /dev/null +++ b/www/js/ace/mode-sqlserver.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/sqlserver_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|SOME";e+="|NULL|IS|APPLY|INNER|OUTER|LEFT|RIGHT|JOIN|CROSS";var t="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",n="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",r="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",s="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";s+="|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",s+="|LOOP|HASH|MERGE|REMOTE",s+="|TRY|CATCH|THROW",s+="|TYPE",s=s.split("|"),s=s.filter(function(r,i,s){return e.split("|").indexOf(r)===-1&&t.split("|").indexOf(r)===-1&&n.split("|").indexOf(r)===-1}),s=s.sort().join("|");var o=this.createKeywordMapper({"constant.language":e,"storage.type":n,"support.function":t,"support.storedprocedure":r,keyword:s},"identifier",!0),u="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("|"),a="READ UNCOMMITTED|READ COMMITTED|REPEATABLE READ|SNAPSHOP|SERIALIZABLE".split("|");for(var f=0;f|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=|\\*"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"punctuation",regex:",|;"},{token:"text",regex:"\\s+"}],comment:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]};for(var f=0;ff)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/sqlserver",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./cstyle").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/(\bCASE\b|\bBEGIN\b)|^\s*(\/\*)/i,this.startRegionRe=/^\s*(\/\*|--)#?region\b/,this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.getBeginEndBlock(e,n,o,s[1]);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;return},this.getBeginEndBlock=function(e,t,n,r){var s={row:t,column:n+r.length},o=e.getLength(),u,a=1,f=/(\bCASE\b|\bBEGIN\b)|(\bEND\b)/i;while(++ts.row)return new i(s.row,s.column,c,u.length)}}.call(o.prototype)}),define("ace/mode/sqlserver",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sqlserver_highlight_rules","ace/mode/folding/sqlserver"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sqlserver_highlight_rules").SqlHighlightRules,o=e("./folding/sqlserver").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.getCompletions=function(e,t,n,r){return t.$mode.$highlightRules.completions},this.$id="ace/mode/sqlserver",this.snippetFileId="ace/snippets/sqlserver"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-stylus.js b/www/js/ace/mode-stylus.js new file mode 100644 index 000000000..4fb0b7b60 --- /dev/null +++ b/www/js/ace/mode-stylus.js @@ -0,0 +1,8 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e=this.createKeywordMapper({"support.type":s.supportType,"support.function":s.supportFunction,"support.constant":s.supportConstant,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"text",!0);this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"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:s.pseudoElements},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s.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",regex:"#[a-fA-F0-9]{6}"},{token:"constant.numeric",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:s.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:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"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"}]}};r.inherits(o,i),t.StylusHighlightRules=o}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u",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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value==="-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o"},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(l.prototype),t.Mode=l}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../token_iterator").TokenIterator,s=e("../behaviour/cstyle").CstyleBehaviour,o=e("../behaviour/xml").XmlBehaviour,u=function(){var e=(new o({closeCurlyBraces:!0})).getBehaviours();this.addBehaviours(e),this.inherit(s),this.add("autoclosing-fragment","insertion",function(e,t,n,r,s){if(s==">"){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,o=function(){s.call(this),this.embedTagRules(i,"js-","script"),this.normalizeRules()};r.inherits(o,s),t.SvgHighlightRules=o}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./xml").Mode,s=e("./javascript").Mode,o=e("./svg_highlight_rules").SvgHighlightRules,u=e("./folding/mixed").FoldMode,a=e("./folding/xml").FoldMode,f=e("./folding/cstyle").FoldMode,l=function(){i.call(this),this.HighlightRules=o,this.createModeDelegates({"js-":s}),this.foldingRules=new u(new a,{"js-":new f})};r.inherits(l,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.$id="ace/mode/svg"}.call(l.prototype),t.Mode=l}); (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/www/js/ace/mode-swift.js b/www/js/ace/mode-swift.js new file mode 100644 index 000000000..ea645a7da --- /dev/null +++ b/www/js/ace/mode-swift.js @@ -0,0 +1,8 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=function(){function t(e,t){var n=t.nestable||t.interpolation,r=t.interpolation&&t.interpolation.nextState||"start",s={regex:e+(t.multiline?"":"(?=.)"),token:"string.start"},o=[t.escape&&{regex:t.escape,token:"character.escape"},t.interpolation&&{token:"paren.quasi.start",regex:i.escapeRegExp(t.interpolation.lead+t.interpolation.open),push:r},t.error&&{regex:t.error,token:"error.invalid"},{regex:e+(t.multiline?"":"|$"),token:"string.end",next:n?"pop":"start"},{defaultToken:"string"}].filter(Boolean);n?s.push=o:s.next=o;if(!t.interpolation)return s;var u=t.interpolation.open,a=t.interpolation.close,f={regex:"["+i.escapeRegExp(u+a)+"]",onMatch:function(e,t,n){this.next=e==u?this.nextState:"";if(e==u&&n.length)return n.unshift("start",t),"paren";if(e==a&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1)return"paren.quasi.end"}return e==u?"paren.lparen":"paren.rparen"},nextState:r};return[f,s]}function n(){return[{token:"comment",regex:/\/\//,next:[s.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}]},s.getStartRule("doc-start"),{token:"comment.start",regex:/\/\*/,stateName:"nested_comment",push:[s.getTagRule(),{token:"comment.start",regex:/\/\*/,push:"nested_comment"},{token:"comment.end",regex:"\\*\\/",next:"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var e=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");this.$rules={start:[t('"""',{escape:/\\(?:[0\\tnr"']|u{[a-fA-F1-9]{0,8}})/,interpolation:{lead:"\\",open:"(",close:")"},error:/\\./,multiline:!0}),t('"',{escape:/\\(?:[0\\tnr"']|u{[a-fA-F1-9]{0,8}})/,interpolation:{lead:"\\",open:"(",close:")"},error:/\\./,multiline:!1}),n(),{regex:/@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:"variable.parameter"},{regex:/[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,token:e},{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(s,"doc-",[s.getEndRule("start")]),this.normalizeRules()};r.inherits(u,o),t.HighlightRules=u,t.SwiftHighlightRules=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/swift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/swift_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./swift_highlight_rules").HighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/",nestable:!0},this.$id="ace/mode/swift"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-tcl.js b/www/js/ace/mode-tcl.js new file mode 100644 index 000000000..11dbb0658 --- /dev/null +++ b/www/js/ace/mode-tcl.js @@ -0,0 +1,8 @@ +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/tcl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"#.*\\\\$",next:"commentfollow"},{token:"comment",regex:"#.*$"},{token:"support.function",regex:"[\\\\]$",next:"splitlineStart"},{token:"text",regex:/\\(?:["{}\[\]$\\])/},{token:"text",regex:"^|[^{][;][^}]|[/\r/]",next:"commandItem"},{token:"string",regex:'[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",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",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",regex:"[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?",next:"start"},{token:"variable.instance",regex:"{?[a-zA-Z_\\d]+}?",next:"start"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?["]',next:"start"},{token:"string",regex:".+"}]}};r.inherits(s,i),t.TclHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./folding/cstyle").FoldMode,o=e("./tcl_highlight_rules").TclHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=function(){this.HighlightRules=o,this.$outdent=new u,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/tcl",this.snippetFileId="ace/snippets/tcl"}.call(f.prototype),t.Mode=f}); (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/www/js/ace/mode-terraform.js b/www/js/ace/mode-terraform.js new file mode 100644 index 000000000..c87979c0b --- /dev/null +++ b/www/js/ace/mode-terraform.js @@ -0,0 +1,8 @@ +define("ace/mode/terraform_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};r.inherits(s,i),t.TerraformHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./terraform_highlight_rules").TerraformHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){i.call(this),this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.lineCommentStart=["#","//"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/terraform"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-tex.js b/www/js/ace/mode-tex.js new file mode 100644 index 000000000..5253e46af --- /dev/null +++ b/www/js/ace/mode-tex.js @@ -0,0 +1,8 @@ +define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",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",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",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",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."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./tex_highlight_rules").TexHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(e){e?this.HighlightRules=s:this.HighlightRules=o,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour};r.inherits(a,i),function(){this.lineCommentStart="%",this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.allowAutoInsert=function(){return!1},this.$id="ace/mode/tex",this.snippetFileId="ace/snippets/tex"}.call(a.prototype),t.Mode=a}); (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/src/ace/mode-text.js b/www/js/ace/mode-text.js similarity index 99% rename from src/ace/mode-text.js rename to www/js/ace/mode-text.js index 13aa31f23..fa24e3be6 100644 --- a/src/ace/mode-text.js +++ b/www/js/ace/mode-text.js @@ -1,4 +1,3 @@ - ; (function() { window.require(["ace/mode/text"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { diff --git a/www/js/ace/mode-textile.js b/www/js/ace/mode-textile.js new file mode 100644 index 000000000..04db82aab --- /dev/null +++ b/www/js/ace/mode-textile.js @@ -0,0 +1,8 @@ +define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:function(e){return e.charAt(0)=="h"?"markup.heading."+e.charAt(1):"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:"#"}]}};r.inherits(s,i),t.TextileHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./textile_highlight_rules").TextileHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return e=="intag"?n:""},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/textile",this.snippetFileId="ace/snippets/textile"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-toml.js b/www/js/ace/mode-toml.js new file mode 100644 index 000000000..2123bfc8b --- /dev/null +++ b/www/js/ace/mode-toml.js @@ -0,0 +1,8 @@ +define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"constant.language.boolean":"true|false"},"identifier"),t="[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:e,regex:t},{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"}]}};r.inherits(s,i),t.TomlHighlightRules=s}),define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++nl){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./toml_highlight_rules").TomlHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/toml"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-tsv.js b/www/js/ace/mode-tsv.js new file mode 100644 index 000000000..16e82660d --- /dev/null +++ b/www/js/ace/mode-tsv.js @@ -0,0 +1,8 @@ +define("ace/mode/csv_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){i.call(this)};r.inherits(s,i),t.CsvHighlightRules=s}),define("ace/mode/csv",["require","exports","module","ace/lib/oop","ace/mode/text","ace/lib/lang","ace/mode/csv_highlight_rules"],function(e,t,n){"use strict";function f(e,t,n){var r=[],i=e.split(n.separatorRegex),s=n.spliter,o=n.quote||'"',u=(t||"start").split("-"),f=parseInt(u[1])||0,l=u[0]=="string",c=!l;for(var h=0;h-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=function(e){var t=[{token:["storage.type","text","entity.name.function.ts"],regex:"(function)(\\s+)([a-zA-Z0-9$_\u00a1-\uffff][a-zA-Z0-9d$_\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))"}],n=(new i({jsx:(e&&e.jsx)==1})).getRules();n.no_regex=t.concat(n.no_regex),this.$rules=n};r.inherits(s,i),t.TypeScriptHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./typescript_highlight_rules").TypeScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/typescript"}.call(a.prototype),t.Mode=a}),define("ace/mode/tsx",["require","exports","module","ace/lib/oop","ace/mode/behaviour/javascript","ace/mode/folding/javascript","ace/mode/typescript"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./behaviour/javascript").JavaScriptBehaviour,s=e("./folding/javascript").FoldMode,o=e("./typescript").Mode,u=function(){o.call(this),this.$highlightRuleConfig={jsx:!0},this.foldingRules=new s,this.$behaviour=new i};r.inherits(u,o),function(){this.$id="ace/mode/tsx"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-turtle.js b/www/js/ace/mode-turtle.js new file mode 100644 index 000000000..64b89cd5c --- /dev/null +++ b/www/js/ace/mode-turtle.js @@ -0,0 +1,8 @@ +define("ace/mode/turtle_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["ttl","nt"],name:"Turtle",scopeName:"source.turtle"},r.inherits(s,i),t.TurtleHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/turtle",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/turtle_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./turtle_highlight_rules").TurtleHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/turtle"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-twig.js b/www/js/ace/mode-twig.js new file mode 100644 index 000000000..225b361d0 --- /dev/null +++ b/www/js/ace/mode-twig.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./html_highlight_rules").HtmlHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,u=function(){s.call(this);var e="autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim";e=e+"|end"+e.replace(/\|/g,"|end");var t="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",n="attribute|constant|cycle|date|dump|parent|random|range|template_from_string",r="constant|divisibleby|sameas|defined|empty|even|iterable|odd",i="null|none|true|false",o="b-and|b-xor|b-or|in|is|and|or|not",u=this.createKeywordMapper({"keyword.control.twig":e,"support.function.twig":[t,n,r].join("|"),"keyword.operator.twig":o,"constant.language.twig":i},"identifier");for(var a in this.$rules)this.$rules[a].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",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:u,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()};r.inherits(u,o),t.TwigHighlightRules=u}),define("ace/mode/twig",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/twig_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./html").Mode,s=e("./twig_highlight_rules").TwigHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(){i.call(this),this.HighlightRules=s,this.$outdent=new o};r.inherits(u,i),function(){this.blockComment={start:"{#",end:"#}"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var u=t.match(/^.*[\{\(\[]\s*$/);u&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/twig"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-typescript.js b/www/js/ace/mode-typescript.js new file mode 100644 index 000000000..525bf705f --- /dev/null +++ b/www/js/ace/mode-typescript.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=function(e){var t=[{token:["storage.type","text","entity.name.function.ts"],regex:"(function)(\\s+)([a-zA-Z0-9$_\u00a1-\uffff][a-zA-Z0-9d$_\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))"}],n=(new i({jsx:(e&&e.jsx)==1})).getRules();n.no_regex=t.concat(n.no_regex),this.$rules=n};r.inherits(s,i),t.TypeScriptHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./typescript_highlight_rules").TypeScriptHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/typescript"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-vala.js b/www/js/ace/mode-vala.js new file mode 100644 index 000000000..cd659a82e --- /dev/null +++ b/www/js/ace/mode-vala.js @@ -0,0 +1,8 @@ +define("ace/mode/vala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.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"},r.inherits(s,i),t.ValaHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vala_highlight_rules").ValaHighlightRules,o=e("./folding/cstyle").FoldMode,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(){this.HighlightRules=s,this.$outdent=new u,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o};r.inherits(a,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/vala",this.snippetFileId="ace/snippets/vala"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-vbscript.js b/www/js/ace/mode-vbscript.js new file mode 100644 index 000000000..4f75d8fba --- /dev/null +++ b/www/js/ace/mode-vbscript.js @@ -0,0 +1,8 @@ +define("ace/mode/vbscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=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",!0);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:!0},{token:"storage.type.asp",regex:"On\\s+Error\\s+(?:Resume\\s+Next|GoTo)\\b",caseInsensitive:!0},{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:e},{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"}]}};r.inherits(s,i),t.VBScriptHighlightRules=s}),define("ace/mode/folding/vbscript",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),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(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i||s){var o=s?this.foldingStopMarker.exec(r):this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a==="keyword.control.asp"||a==="storage.type.function.asp")return this.vbsBlock(e,n,o.index+2)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword.control.asp"||a=="storage.type.function.asp")return u=="if"&&!/then\s*('|$)/i.test(r)?"":"start"}}return""},this.vbsBlock=function(e,t,n,r){var i=new o(e,t,n),u={"class":1,"function":1,sub:1,"if":1,select:1,"with":1,property:1,"else":1,elseif:1},a=i.getCurrentToken();if(!a||a.type!="keyword.control.asp"&&a.type!="storage.type.function.asp")return;var f=a.value.toLowerCase(),l=a.value.toLowerCase(),c=[l],h=this.indentKeywords[l];if(!h)return;var p=i.getCurrentTokenRange();switch(l){case"property":case"sub":case"function":case"if":case"select":case"do":case"for":case"class":case"while":case"with":var d=e.getLine(t),v=/^\s*If\s+.*\s+Then(?!')\s+(?!')\S/i.test(d);if(v)return;var m=new RegExp("(?:^|\\s)"+l,"i"),g=/^\s*End\s(If|Sub|Select|Function|Class|With|Property)\s*/i.test(d);if(!m.test(d)&&!g)return;if(g){var r=i.getCurrentTokenRange();i.step=i.stepBackward,i.step(),i.step(),a=i.getCurrentToken(),a&&(l=a.value.toLowerCase(),l=="end"&&(p=i.getCurrentTokenRange(),p=new s(p.start.row,p.start.column,r.start.row,r.end.column))),h=-1}break;case"end":var y=i.getCurrentTokenPosition();p=i.getCurrentTokenRange(),i.step=i.stepForward,i.step(),i.step(),a=i.getCurrentToken();if(a){l=a.value.toLowerCase();if(l in u){f=l;var b=i.getCurrentTokenPosition(),w=b.column+l.length;p=new s(y.row,y.column,b.row,w)}}i.step=i.stepBackward,i.step(),i.step()}var E=h===-1?e.getLine(t-1).length:e.getLine(t).length,S=t,x=[];x.push(p),i.step=h===-1?i.stepBackward:i.stepForward;while(a=i.step()){var T=null,N=!1;if(a.type!="keyword.control.asp"&&a.type!="storage.type.function.asp")continue;l=a.value.toLowerCase();var C=h*this.indentKeywords[l];switch(l){case"property":case"sub":case"function":case"if":case"select":case"do":case"for":case"class":case"while":case"with":var d=e.getLine(i.getCurrentTokenRow()),v=/^\s*If\s+.*\s+Then(?!')\s+(?!')\S/i.test(d);v&&(C=0,N=!0);var m=new RegExp("^\\s* end\\s+"+l,"i");m.test(d)&&(C=0,N=!0);break;case"elseif":case"else":C=0,f!="elseif"&&(N=!0)}if(C>0)c.unshift(l);else if(C<=0&&N===!1){c.shift();if(!c.length){switch(l){case"end":var y=i.getCurrentTokenPosition();T=i.getCurrentTokenRange(),i.step(),i.step(),a=i.getCurrentToken();if(a){l=a.value.toLowerCase();if(l in u){f=="else"||f=="elseif"?l!=="if"&&x.shift():l!=f&&x.shift();var b=i.getCurrentTokenPosition(),w=b.column+l.length;T=new s(y.row,y.column,b.row,w)}else x.shift()}else x.shift();i.step=i.stepBackward,i.step(),i.step(),a=i.getCurrentToken(),l=a.value.toLowerCase();break;case"select":case"sub":case"if":case"function":case"class":case"with":case"property":l!=f&&x.shift();break;case"do":f!="loop"&&x.shift();break;case"loop":f!="do"&&x.shift();break;case"for":f!="next"&&x.shift();break;case"next":f!="for"&&x.shift();break;case"while":f!="wend"&&x.shift();break;case"wend":f!="while"&&x.shift()}break}C===0&&c.unshift(l)}}if(!a)return null;if(r)return T?x.push(T):x.push(i.getCurrentTokenRange()),x;var t=i.getCurrentTokenRow();if(h===-1){var w=e.getLine(t).length;return new s(t,w,S-1,E)}return new s(S,E,t-1,e.getLine(t-1).length)}}.call(u.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vbscript_highlight_rules").VBScriptHighlightRules,o=e("./folding/vbscript").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(a,i),function(){function t(e,t,n){var r=0;for(var i=0;i0?1:0}this.lineCommentStart=["'","REM"];var e=["else","elseif","end","loop","next","wend"];this.getNextLineIndent=function(e,n,r){var i=this.$getIndent(n),s=0,o=this.getTokenizer().getLineTokens(n,e),u=o.tokens;return e=="start"&&(s=t(u,n,this.indentKeywords)),s>0?i+r:s<0&&i.substr(i.length-r.length)==r&&!this.checkOutdent(e,n,"\n")?i.substr(0,i.length-r.length):i},this.checkOutdent=function(t,n,r){if(r!="\n"&&r!="\r"&&r!="\r\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i||!i.length)return!1;var s=i[0].value.toLowerCase();return(i[0].type=="keyword.control.asp"||i[0].type=="storage.type.function.asp")&&e.indexOf(s)!=-1},this.getMatching=function(e,t,n,r){if(t==undefined){var i=e.selection.lead;n=i.column,t=i.row}r==undefined&&(r=!0);var s=e.getTokenAt(t,n);if(s){var o=s.value.toLowerCase();if(o in this.indentKeywords)return this.foldingRules.vbsBlock(e,t,n,r)}},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^\s*/)[0].length;if(!i||!n)return;var s=this.getMatching(t,n,i+1,!1);if(!s||s.start.row==n)return;var o=this.$getIndent(t.getLine(s.start.row));o.length!=i&&(t.replace(new u(n,0,n,i),o),t.outdentRows(new u(n+1,0,n+1,0)))},this.$id="ace/mode/vbscript"}.call(a.prototype),t.Mode=a}); (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/www/js/ace/mode-velocity.js b/www/js/ace/mode-velocity.js new file mode 100644 index 000000000..36a20503e --- /dev/null +++ b/www/js/ace/mode-velocity.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./html_highlight_rules").HtmlHighlightRules,u=function(){o.call(this);var e=i.arrayToMap("true|false|null".split("|")),t=i.arrayToMap("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool".split("|")),n=i.arrayToMap("$contentRoot|$foreach".split("|")),r=i.arrayToMap("#set|#macro|#include|#parse|#if|#elseif|#else|#foreach|#break|#end|#stop".split("|"));this.$rules.start.push({token:"comment",regex:"##.*$"},{token:"comment.block",regex:"#\\*",next:"vm_comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{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:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(i){return r.hasOwnProperty(i)?"keyword":e.hasOwnProperty(i)?"constant.language":n.hasOwnProperty(i)?"variable.language":t.hasOwnProperty(i)||t.hasOwnProperty(i.substring(1))?"support.function":i=="debugger"?"invalid.deprecated":i.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/)?"variable":"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",regex:"\\*#|-->",next:"start"},{defaultToken:"comment"}],this.$rules.vm_start=[{token:"variable",regex:"}",next:"pop"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{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:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(i){return r.hasOwnProperty(i)?"keyword":e.hasOwnProperty(i)?"constant.language":n.hasOwnProperty(i)?"variable.language":t.hasOwnProperty(i)||t.hasOwnProperty(i.substring(1))?"support.function":i=="debugger"?"invalid.deprecated":i.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/)?"variable":"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 s in this.$rules)this.$rules[s].unshift({token:"variable",regex:"\\${",push:"vm_start"});this.normalizeRules()};r.inherits(u,s),t.VelocityHighlightRules=u}),define("ace/mode/folding/velocity",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="##")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++nl){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.VerilogHighlightRules=s}),define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./verilog_highlight_rules").VerilogHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"'},this.$id="ace/mode/verilog"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-vhdl.js b/www/js/ace/mode-vhdl.js new file mode 100644 index 000000000..4b7c6385c --- /dev/null +++ b/www/js/ace/mode-vhdl.js @@ -0,0 +1,8 @@ +define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="bit|bit_vector|boolean|character|integer|line|natural|positive|real|register|signed|std_logic|std_logic_vector|string||text|time|unsigned",n="array|constant",r="abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|srasrl|xnor|xor",i="true|false|null",s=this.createKeywordMapper({"keyword.operator":r,keyword:e,"constant.language":i,"storage.modifier":n,"storage.type":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword",regex:"\\s*(?:library|package|use)\\b"},{token:s,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+"}]}};r.inherits(s,i),t.VHDLHighlightRules=s}),define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vhdl_highlight_rules").VHDLHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/vhdl"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-visualforce.js b/www/js/ace/mode-visualforce.js new file mode 100644 index 000000000..74aaac02f --- /dev/null +++ b/www/js/ace/mode-visualforce.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function f(e,t){return e.type.lastIndexOf(t+".xml")>-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/visualforce_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";function s(e){return{token:e.token+".start",regex:e.start,push:[{token:"constant.language.escape",regex:e.escape},{token:e.token+".end",regex:e.start,next:"pop"},{defaultToken:e.token}]}}var r=e("../lib/oop"),i=e("../mode/html_highlight_rules").HtmlHighlightRules,o=function(){var e=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");i.call(this);var t={token:"keyword.start",regex:"{!",push:"Visualforce"};for(var n in this.$rules)this.$rules[n].unshift(t);this.$rules.Visualforce=[s({start:'"',escape:/\\[btnfr"'\\]/,token:"string",multiline:!0}),s({start:"'",escape:/\\[btnfr"'\\]/,token:"string",multiline:!0}),{token:"comment.start",regex:"\\/\\*",push:[{token:"comment.end",regex:"\\*\\/|(?=})",next:"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"keyword.end",regex:"}",next:"pop"},{token:e,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()};r.inherits(o,i),t.VisualforceHighlightRules=o}),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(e,t,n){"use strict";function a(){i.call(this),this.HighlightRules=s,this.foldingRules=new u,this.$behaviour=new o}var r=e("../lib/oop"),i=e("./html").Mode,s=e("./visualforce_highlight_rules").VisualforceHighlightRules,o=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode;r.inherits(a,i),a.prototype.emmetConfig={profile:"xhtml"},t.Mode=a}); (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/www/js/ace/mode-vue.js b/www/js/ace/mode-vue.js new file mode 100644 index 000000000..6d26b4f18 --- /dev/null +++ b/www/js/ace/mode-vue.js @@ -0,0 +1,8 @@ +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(e,t){i.call(this,new s(e,t),{"js-":new o,"css-":new o})};r.inherits(u,i)}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value==="-1}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"tag-name"))i=n.stepBackward();if(i)return i.value}function c(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();while(i&&!f(i,"attribute-name"))i=n.stepBackward();if(i)return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["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"],o=i.concat(s),u={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:{}},a=Object.keys(u),h=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);if(!i)return[];if(f(i,"tag-name")||f(i,"tag-open")||f(i,"end-tag-open"))return this.getTagCompletions(e,t,n,r);if(f(i,"tag-whitespace")||f(i,"attribute-name"))return this.getAttributeCompletions(e,t,n,r);if(f(i,"attribute-value"))return this.getAttributeValueCompletions(e,t,n,r);var s=t.getLine(n.row).substr(0,n.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,n,r):[]},this.getTagCompletions=function(e,t,n,r){return a.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(Object.keys(u[i]))),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n,r){var i=l(t,n),s=c(t,n);if(!i)return[];var o=[];return i in u&&s in u[i]&&typeof u[i][s]=="object"&&(o=Object.keys(u[i][s])),o.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(e,t,n,r){var i=["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 i.map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../token_iterator").TokenIterator,s=e("../behaviour/cstyle").CstyleBehaviour,o=e("../behaviour/xml").XmlBehaviour,u=function(){var e=(new o({closeCurlyBraces:!0})).getBehaviours();this.addBehaviours(e),this.inherit(s),this.add("autoclosing-fragment","insertion",function(e,t,n,r,s){if(s==">"){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.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",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.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",f=t.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",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.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",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);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:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],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",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:"("+c+")(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:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],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:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),define("ace/mode/css_completions",["require","exports","module"],function(e,t,n){"use strict";var r={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}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e){if(typeof e[t]!="string")continue;var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});r.hasOwnProperty(n)||(r[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,r){this.completionsDefined||this.defineCompletions();if(e==="ruleset"||t.$mode.$id=="ace/mode/scss"){var i=t.getLine(n.row).substr(0,n.column),s=/\([^)]*$/.test(i);return s&&(i=i.substr(i.lastIndexOf("(")+1)),/:[^;]+$/.test(i)?(/([\w\-]+):[^:]*$/.test(i),this.getPropertyValueCompletions(e,t,n,r)):this.getPropertyCompletions(e,t,n,r,s)}return[]},this.getPropertyCompletions=function(e,t,n,i,s){s=s||!1;var o=Object.keys(r);return o.map(function(e){return{caption:e,snippet:e+": $0"+(s?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n,i){var s=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(s)||{})[1];if(!o)return[];var u=[];return o in r&&typeof r[o]=="object"&&(u=Object.keys(r[o])),u.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"&&n.selection.isEmpty()){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,r,i){if(i==="!"&&n.selection.isEmpty()){var s=n.getCursorPosition(),o=r.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(o.substring(s.column)))return{text:"!important",selection:[10,10]}}})};r.inherits(u,s),t.CssBehaviour=u}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.$completer=new a,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.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"}),f=function(){u.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(e,t){var n=a[t];return["meta.tag.punctuation."+(e=="<"?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules((new o({jsx:!1})).getRules(),"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text").Mode,o=e("./javascript").Mode,u=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":o,"css-":u}),this.foldingRules=new l(this.voidElements,i.arrayToMap(d))};r.inherits(v,s),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(p),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor!=v)return;var t=new h(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),t.Mode=v}),define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=function(e){var t=[{token:["storage.type","text","entity.name.function.ts"],regex:"(function)(\\s+)([a-zA-Z0-9$_\u00a1-\uffff][a-zA-Z0-9d$_\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))"}],n=(new i({jsx:(e&&e.jsx)==1})).getRules();n.no_regex=t.concat(n.no_regex),this.$rules=n};r.inherits(s,i),t.TypeScriptHighlightRules=s}),define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="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",n="true|false|null|undefined|NaN|Infinity",r="case|const|function|var|void|with|enum|implements|interface|let|package|private|protected|public|static",i="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",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?: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:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{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:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.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*)("+r+")"},{token:"punctuation.operator",regex:"\\.{1,3}"},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{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()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e=this.createKeywordMapper({"support.type":s.supportType,"support.function":s.supportFunction,"support.constant":s.supportConstant,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"text",!0);this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"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:s.pseudoElements},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s.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",regex:"#[a-fA-F0-9]{6}"},{token:"constant.numeric",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:s.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:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"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"}]}};r.inherits(o,i),t.StylusHighlightRules=o}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./css_highlight_rules"),u=function(){var e=i.arrayToMap(o.supportType.split("|")),t=i.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("|")),n=i.arrayToMap(o.supportConstant.split("|")),r=i.arrayToMap(o.supportConstantColor.split("|")),s=i.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("|")),u=i.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("|")),a="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:a+"(?: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:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:a},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:function(i){return e.hasOwnProperty(i.toLowerCase())?"support.type":s.hasOwnProperty(i)?"keyword":n.hasOwnProperty(i)?"constant.language":t.hasOwnProperty(i)?"support.function":r.hasOwnProperty(i.toLowerCase())?"support.constant.color":u.hasOwnProperty(i.toLowerCase())?"variable.language":"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:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};r.inherits(u,s),t.ScssHighlightRules=u}),define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./scss_highlight_rules").ScssHighlightRules,o=function(){s.call(this);var e=this.$rules.start;e[1].token=="comment"&&(e.splice(1,1,{onMatch:function(e,t,n){return n.unshift(this.next,-1,e.length-2,t),"comment"},regex:/^\s*\/\*/,next:"comment"},{token:"error.invalid",regex:"/\\*|[{;}]"},{token:"support.type",regex:/^\s*:[\w\-]+\s/}),this.$rules.comment=[{regex:/^\s*/,onMatch:function(e,t,n){return n[1]===-1&&(n[1]=Math.max(n[2],e.length-1)),e.length<=n[1]?(n.shift(),n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}])};r.inherits(o,s),t.SassHighlightRules=o}),define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./css_highlight_rules"),o=function(){var e="@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|or|and|when|not",t=e.split("|"),n=s.supportType.split("|"),r=this.createKeywordMapper({"support.constant":s.supportConstant,keyword:e,"support.constant.color":s.supportConstantColor,"support.constant.fonts":s.supportConstantFonts},"identifier",!0),i="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+i+")(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",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:"constant.numeric",regex:i},{token:["support.function","paren.lparen","string","paren.rparen"],regex:"(url)(\\()(.*)(\\))"},{token:["support.function","paren.lparen"],regex:"(:extend|[a-z0-9_\\-]+)(\\()"},{token:function(e){return t.indexOf(e.toLowerCase())>-1?"keyword":"variable"},regex:"[@\\$][a-z0-9_\\-@\\$]*\\b"},{token:"variable",regex:"[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"},{token:function(e,t){return n.indexOf(e.toLowerCase())>-1?["support.type.property","text"]:["support.type.unknownProperty","text"]},regex:"([a-z0-9-_]+)(\\s*:)"},{token:"keyword",regex:"&"},{token:r,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:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(o,i),t.LessHighlightRules=o}),define("ace/mode/slim_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"keyword",regex:/^(\s*)(\w+):\s*/,onMatch:function(e,t,n,r){var i=/^\s*/.exec(r)[0],s=e.match(/^(\s*)(\w+):/),o=s[2];return/^(javascript|ruby|coffee|markdown|css|scss|sass|less)$/.test(o)||(o=""),n.unshift("language-embed",[],[i,o],t),this.token},stateName:"language-embed",next:[{token:"string",regex:/^(\s*)/,onMatch:function(e,t,n,r){var i=n[2][0];return i.length>=e.length?(n.splice(0,3),this.next=n.shift(),this.token):(this.next="",[{type:"text",value:i}])},next:""},{token:"string",regex:/.+/,onMatch:function(e,t,n,i){var s=n[2][0],o=n[2][1],u=n[1];if(r[o]){var a=r[o].getTokenizer().getLineTokens(i.slice(s.length),u.slice(0));return n[1]=a.state,a.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(e,t,n,r){var i=/^\s*/.exec(r)[0];return n.length<1?n.push(this.next):n[0]="mlString",n.length<2?n.push(i.length):n[1]=i.length,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(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",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()};i.inherits(o,s),t.SlimHighlightRules=o}),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(e,t,n){"use strict";var r=e("../config").$modes,i=e("../lib/oop"),s=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+s.escapeRegExp(e)+"\\\\]|\\\\.)*"},f=function(){u.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n,i){var s=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(s[3])[0];return r[o]||(o=""),n.unshift("githubblock",[],[s[1],s[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n,i){var s=n[1],o=n[2][0],u=n[2][1],a=n[2][2],f=/^(\s*)(`+|~+)\s*$/.exec(e);if(f&&f[1].length=u.length&&f[2][0]==u[0])return n.splice(0,3),this.next=n.shift(),this.token;this.next="";if(a&&r[a]){var l=r[a].getTokenizer().getLineTokens(e,s.slice(0));return n[1]=l.state,l.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(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{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:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+a('"')+'"\\s*)?'+"(\\))"},{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:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(f,o),t.MarkdownHighlightRules=f}),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(e,t,n){"use strict";function l(e,t){return{token:"entity.name.function.jade",regex:"^\\s*\\:"+e,next:t+"start"}}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./markdown_highlight_rules").MarkdownHighlightRules,o=e("./scss_highlight_rules").ScssHighlightRules,u=e("./less_highlight_rules").LessHighlightRules,a=e("./coffee_highlight_rules").CoffeeHighlightRules,f=e("./javascript_highlight_rules").JavaScriptHighlightRules,c=function(){var e="\\\\(?: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:"keyword.control.import.include.jade",regex:"\\s*\\binclude\\b"},{token:"keyword.other.doctype.jade",regex:"^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},{onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/^\s*\/\//,next:"comment_block"},l("markdown","markdown-"),l("sass","sass-"),l("less","less-"),l("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(e,t,n){return e.length<=n[1]?e.slice(-1)=="/"?(n[1]=e.length-2,this.next="","comment"):(n.shift(),n.shift(),this.next=n.shift(),"text"):(this.next="","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:e},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"tag_attributes"}],qstring:[{token:"constant.language.escape",regex:e},{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"tag_attributes"}]},this.embedRules(f,"js-",[{token:"text",regex:".$",next:"start"}])};r.inherits(c,i),t.JadeHighlightRules=c}),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(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{while((t===void 0||t-->0)&&!(i=r.next()).done)s.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(o)throw o.error}}return s},i=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r]*"+r+"\\s*=\\s*['\"]"+n+"['\"]))":"(?=\\s|>|$))";this.$rules.start.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+t+".tag-name.xml"],regex:"(<)("+t+i,next:[{token:"meta.tag.punctuation.tag-close."+t+".xml",regex:"/?>",next:n+"-start"},{include:"attributes"}]}),this.$rules[t+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,n+"-",[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+t+".tag-name.xml"],regex:"(|$))",next:t+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])};var t=[{include:"vue-interpolations"}],n=(new f).getRules();n.start=t.concat(n.start),n["vue-interpolations"]=[{token:"punctuation",regex:/\{\{\{?/,next:"js-interpolation-start"}];var s=this;n.tag_stuff.unshift({token:"string",regex:/(?:\b(v-)|(:|@))(\[?[a-zA-Z\-.]+\]?)(?:(\:\[?[a-zA-Z\-]+\]?))?((?:\.[a-zA-Z\-]+)*)(\s*)(=)(\s*)(["'])/,onMatch:function(e,t,n){var r=e[e.length-1];n.unshift(r,t);var i=(new RegExp(this.regex)).exec(e);if(!i)return"text";var s=[],o=["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 u=0,a=o.length;u1){n.shift();var l=n.shift(),c=(new v(s.$rules)).getLineTokens(a.slice(1).join(u),l);c.tokens.unshift({type:"string",value:u}),this.next=Array.isArray(c.state)?c.state[c.state.length-1]:c.state}var h=(new y).getTokenizer().getLineTokens(f,"start"),p=h.tokens;return c&&p.push.apply(p,i([],r(c.tokens),!1)),p}}]},{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=n,this.embedRules(l,"js-interpolation-",[{token:"punctuation",regex:/\}\}\}?/,next:"start"}]),this.embedLangRules(o,"style","css"),this.embedLangRules(c,"style","stylus","lang"),this.embedLangRules(h,"style","sass","lang"),this.embedLangRules(p,"style","scss","lang"),this.embedLangRules(d,"style","less","lang"),this.embedLangRules(u,"script","ts","lang"),this.embedLangRules(a,"script","coffee","lang"),this.embedLangRules(m,"template","slm","lang"),this.embedLangRules(g,"template","jade","lang"),this.embedLangRules(c,"template","stylus","lang"),this.normalizeRules()};s.inherits(b,f),t.VueHighlightRules=b}),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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./folding/html").FoldMode,s=e("../lib/lang"),o=e("./behaviour/xml").XmlBehaviour,u=e("./html_completions").HtmlCompletions,a=e("./html").Mode,f=e("./vue_highlight_rules").VueHighlightRules,l=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],c=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(){this.HighlightRules=f,this.foldingRules=new i(this.voidElements,s.arrayToMap(c)),this.$behaviour=new o,this.$completer=new u};r.inherits(h,a),function(){this.blockComment={start:""},this.voidElements=s.arrayToMap(l),this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.$id="ace/mode/vue"}.call(h.prototype),t.Mode=h}); (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/www/js/ace/mode-wollok.js b/www/js/ace/mode-wollok.js new file mode 100644 index 000000000..5e13e128b --- /dev/null +++ b/www/js/ace/mode-wollok.js @@ -0,0 +1,8 @@ +define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.JsDocCommentHighlightRules=s}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function a(){var e=o.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var r=e.charAt(1)=="/"?2:1;if(r==1)t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++;else if(r==2&&t==this.nextState){n[1]--;if(!n[1]||n[1]<0)n.shift(),n.shift()}return[{type:"meta.tag.punctuation."+(r==1?"":"end-")+"tag-open.xml",value:e.slice(0,r)},{type:"meta.tag.tag-name.xml",value:e.substr(r)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(t);var n={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[n,t,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(e,t,n){return t==n[0]&&n.shift(),e.length==2&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{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"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(e){return[{token:"comment",regex:/\/\*/,next:[i.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[i.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var r=e("../lib/oop"),i=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*",u=function(e){var t={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",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"},n=this.createKeywordMapper(t,"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",u="(function)(\\s*)(\\*?)",l={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(t).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[i.getStartRule("doc-start"),f("no_regex"),l,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:"("+o+")(\\s*)(=)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+u+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+r+")\\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:n,regex:o},{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:u+"(\\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:o},{regex:"",token:"empty",next:"no_regex"}],start:[i.getStartRule("doc-start"),f("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",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",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:[f("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]};if(!e||!e.noES6)this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){this.next=e=="{"?this.nextState:"";if(e=="{"&&n.length)n.unshift("start",t);else if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1)return"paren.quasi.end"}return e=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\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"}),(!e||e.jsx!=0)&&a.call(this);this.embedRules(i,"doc-",[i.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(u,s),t.JavaScriptHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var o=n.getSelectionRange().start,u=new i(r,o.row,o.column),a=u.getCurrentToken()||u.stepBackward();if(!a)return;if(a.value=="<")return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.JavaScriptBehaviour=u}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";function a(e,t){return e&&e.type&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;of)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end))),this.xmlFoldMode=new i};r.inherits(o,s),function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);return r?r:this.xmlFoldMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n,r){var i=this.getFoldWidgetRangeBase(e,t,n,r);return i?i:this.xmlFoldMode.getFoldWidgetRange(e,t,n)}}.call(o.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(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,f=e("./folding/javascript").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new f};r.inherits(l,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start")if(o=="start"||o=="no_regex")return"";return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/wollok_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="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",t="null|assert|console",n="Object|Pair|String|Boolean|Number|Integer|Double|Collection|Set|List|Exception|Range|StackTraceElement",r=this.createKeywordMapper({"variable.language":"self",keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,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",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(o,s),t.WollokHighlightRules=o}),define("ace/mode/wollok",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/wollok_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./javascript").Mode,s=e("./wollok_highlight_rules").WollokHighlightRules,o=function(){i.call(this),this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.createWorker=function(e){return null},this.$id="ace/mode/wollok",this.snippetFileId="ace/snippets/wollok"}.call(o.prototype),t.Mode=o}); (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/www/js/ace/mode-xml.js b/www/js/ace/mode-xml.js new file mode 100644 index 000000000..81a650345 --- /dev/null +++ b/www/js/ace/mode-xml.js @@ -0,0 +1,8 @@ +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t="[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+t+")",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:!0},{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:"(<\\!)("+t+")",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:t},{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"}]}]},this.constructor===s&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),r.inherits(s,i),t.XmlHighlightRules=s}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value==="-1}var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(o,s);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?t==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/";break}}return r}if(a(s,"tag-close"))return r.selfClosing=s.value=="/>",r;r.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,n,r){var i=e.getTokens(t),s=0;for(var o=0;o"},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(l.prototype),t.Mode=l}); (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/www/js/ace/mode-xquery.js b/www/js/ace/mode-xquery.js new file mode 100644 index 000000000..359bdb02e --- /dev/null +++ b/www/js/ace/mode-xquery.js @@ -0,0 +1,8 @@ +define("ace/mode/xquery/xquery_lexer",["require","exports","module"],function(e,t,n){n.exports=function r(t,n,i){function o(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(s)return s(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[u]={exports:{}};t[u][0].call(c.exports,function(e){var n=t[u][1][e];return o(n?n:e)},c,c.exports,r,t,n,i)}return n[u].exports}var s=typeof e=="function"&&e;for(var u=0;ux?x:w),m=b,g=w,y=0):d(b,w,0,y,e)}function l(){g!=b&&(m=g,g=b,E.whitespace(m,g))}function c(e){var t;for(;;){t=C(e);if(t!=28)break}return t}function h(e){y==0&&(y=c(e),b=T,w=N)}function p(e){y==0&&(y=C(e),b=T,w=N)}function d(e,t,r,i,s){throw new n.ParseException(e,t,r,i,s)}function C(e){var t=!1;T=N;var n=N,r=i.INITIAL[e],s=0;for(var o=r&4095;o!=0;){var u,a=n>4;u=i.MAP1[(a&15)+i.MAP1[(f&31)+i.MAP1[f>>5]]]}else{if(a<56320){var f=n=56320&&f<57344&&(++n,a=((a&1023)<<10)+(f&1023)+65536,t=!0)}var l=0,c=5;for(var h=3;;h=c+l>>1){if(i.MAP2[h]>a)c=h-1;else{if(!(i.MAP2[6+h]c){u=0;break}}}s=o;var p=(u<<12)+o-1;o=i.TRANSITION[(p&15)+i.TRANSITION[p>>4]],o>4095&&(r=o,o&=4095,N=n)}r>>=12;if(r==0){N=n-1;var f=N=56320&&f<57344&&--N,d(T,N,s,-1,-1)}if(t)for(var v=r>>9;v>0;--v){--N;var f=N=56320&&f<57344&&--N}else N-=r>>9;return(r&511)-1}r(e,t);var n=this;this.ParseException=function(e,t,n,r,i){var s=e,o=t,u=n,a=r,f=i;this.getBegin=function(){return s},this.getEnd=function(){return o},this.getState=function(){return u},this.getExpected=function(){return f},this.getOffending=function(){return a},this.getMessage=function(){return a<0?"lexical analysis failed":"syntax error"}},this.getInput=function(){return S},this.getOffendingToken=function(e){var t=e.getOffending();return t>=0?i.TOKEN[t]:null},this.getExpectedTokenSet=function(e){var t;return e.getExpected()<0?t=i.getTokenSet(-e.getState()):t=[i.TOKEN[e.getExpected()]],t},this.getErrorMessage=function(e){var t=this.getExpectedTokenSet(e),n=this.getOffendingToken(e),r=S.substring(0,e.getBegin()),i=r.split("\n"),s=i.length,o=i[s-1].length+1,u=e.getEnd()-e.getBegin();return e.getMessage()+(n==null?"":", found "+n)+"\nwhile expecting "+(t.length==1?t[0]:"["+t.join(", ")+"]")+"\n"+(u==0||n!=null?"":"after successfully scanning "+u+" characters beginning ")+"at line "+s+", column "+o+":\n..."+S.substring(e.getBegin(),Math.min(S.length,e.getBegin()+64))+"..."},this.parse_start=function(){E.startNonterminal("start",g),h(14);switch(y){case 55:f(55);break;case 54:f(54);break;case 56:f(56);break;case 40:f(40);break;case 42:f(42);break;case 41:f(41);break;case 35:f(35);break;case 38:f(38);break;case 274:f(274);break;case 271:f(271);break;case 39:f(39);break;case 43:f(43);break;case 49:f(49);break;case 62:f(62);break;case 63:f(63);break;case 46:f(46);break;case 48:f(48);break;case 53:f(53);break;case 51:f(51);break;case 34:f(34);break;case 273:f(273);break;case 2:f(2);break;case 1:f(1);break;case 3:f(3);break;case 12:f(12);break;case 13:f(13);break;case 15:f(15);break;case 16:f(16);break;case 17:f(17);break;case 5:f(5);break;case 6:f(6);break;case 4:f(4);break;case 33:f(33);break;default:o()}E.endNonterminal("start",g)},this.parse_StartTag=function(){E.startNonterminal("StartTag",g),h(8);switch(y){case 58:f(58);break;case 50:f(50);break;case 27:f(27);break;case 57:f(57);break;case 35:f(35);break;case 38:f(38);break;default:f(33)}E.endNonterminal("StartTag",g)},this.parse_TagContent=function(){E.startNonterminal("TagContent",g),p(11);switch(y){case 23:f(23);break;case 6:f(6);break;case 7:f(7);break;case 55:f(55);break;case 54:f(54);break;case 18:f(18);break;case 29:f(29);break;case 272:f(272);break;case 275:f(275);break;case 271:f(271);break;default:f(33)}E.endNonterminal("TagContent",g)},this.parse_AposAttr=function(){E.startNonterminal("AposAttr",g),p(10);switch(y){case 20:f(20);break;case 25:f(25);break;case 18:f(18);break;case 29:f(29);break;case 272:f(272);break;case 275:f(275);break;case 271:f(271);break;case 38:f(38);break;default:f(33)}E.endNonterminal("AposAttr",g)},this.parse_QuotAttr=function(){E.startNonterminal("QuotAttr",g),p(9);switch(y){case 19:f(19);break;case 24:f(24);break;case 18:f(18);break;case 29:f(29);break;case 272:f(272);break;case 275:f(275);break;case 271:f(271);break;case 35:f(35);break;default:f(33)}E.endNonterminal("QuotAttr",g)},this.parse_CData=function(){E.startNonterminal("CData",g),p(1);switch(y){case 11:f(11);break;case 64:f(64);break;default:f(33)}E.endNonterminal("CData",g)},this.parse_XMLComment=function(){E.startNonterminal("XMLComment",g),p(0);switch(y){case 9:f(9);break;case 47:f(47);break;default:f(33)}E.endNonterminal("XMLComment",g)},this.parse_PI=function(){E.startNonterminal("PI",g),p(3);switch(y){case 10:f(10);break;case 59:f(59);break;case 60:f(60);break;default:f(33)}E.endNonterminal("PI",g)},this.parse_Pragma=function(){E.startNonterminal("Pragma",g),p(2);switch(y){case 8:f(8);break;case 36:f(36);break;case 37:f(37);break;default:f(33)}E.endNonterminal("Pragma",g)},this.parse_Comment=function(){E.startNonterminal("Comment",g),p(4);switch(y){case 52:f(52);break;case 41:f(41);break;case 30:f(30);break;default:f(33)}E.endNonterminal("Comment",g)},this.parse_CommentDoc=function(){E.startNonterminal("CommentDoc",g),p(5);switch(y){case 31:f(31);break;case 32:f(32);break;case 52:f(52);break;case 41:f(41);break;default:f(33)}E.endNonterminal("CommentDoc",g)},this.parse_QuotString=function(){E.startNonterminal("QuotString",g),p(6);switch(y){case 18:f(18);break;case 29:f(29);break;case 19:f(19);break;case 21:f(21);break;case 35:f(35);break;default:f(33)}E.endNonterminal("QuotString",g)},this.parse_AposString=function(){E.startNonterminal("AposString",g),p(7);switch(y){case 18:f(18);break;case 29:f(29);break;case 20:f(20);break;case 22:f(22);break;case 38:f(38);break;default:f(33)}E.endNonterminal("AposString",g)},this.parse_Prefix=function(){E.startNonterminal("Prefix",g),h(13),l(),a(),E.endNonterminal("Prefix",g)},this.parse__EQName=function(){E.startNonterminal("_EQName",g),h(12),l(),o(),E.endNonterminal("_EQName",g)};var v,m,g,y,b,w,E,S,x,T,N};r.getTokenSet=function(e){var t=[],n=e<0?-e:INITIAL[e]&4095;for(var i=0;i<276;i+=32){var s=i,o=(i>>5)*2062+n-1,u=o>>2,a=u>>2,f=r.EXPECTED[(o&3)+r.EXPECTED[(u&3)+r.EXPECTED[(a&3)+r.EXPECTED[a>>2]]]];for(;f!=0;f>>>=1,++s)(f&1)!=0&&t.push(r.TOKEN[s])}return t},r.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],r.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],r.MAP2=[57344,63744,64976,65008,65536,983040,63743,64975,65007,65533,983039,1114111,35,31,35,31,31,35],r.INITIAL=[1,2,36867,45060,5,6,7,8,9,10,11,12,13,14,15],r.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,25e3,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,32e3,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,33e3,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,2e3,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,1e3,45,45,45,45,67,67],r.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,1e3,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,2147483648,539754496,542375936,402653184,554434560,571736064,545521856,268451840,335544320,268693630,512,2048,256,1024,0,1024,0,1073741824,2147483648,0,0,0,8388608,0,0,1073741824,1073741824,0,2147483648,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,2147483648,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,2147483648,12582912,16777216,33554432,268435456,1073741824,2147483648,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,2147483648,0,0,25165824,33554432,134217728,1879048192,2147483648,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,2147483648,0,-1678194207,0,0,0,8,32,2048,524288,8388608,0,0,33062912,436207616,2147483648,0,0,32,64,2432,16384,32768,32768,524288,3145728,4194304,25165824,25165824,167772160,268435456,2147483648,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,2147483648,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],r.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:l,next:function(e){e.pop()}}],CData:[{name:"CDataSectionContents",token:a},{name:p("]]>"),token:a,next:function(e){e.pop()}}],PI:[{name:"DirPIContents",token:c},{name:p("?"),token:c},{name:p("?>"),token:c,next:function(e){e.pop()}}],AposString:[{name:p("''"),token:"string",next:function(e){e.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:p('"'),token:"string",next:function(e){e.pop()}},{name:"PredefinedEntityRef",token:"constant.language.escape"},{name:"CharRef",token:"constant.language.escape"},{name:"EscapeQuot",token:"constant.language.escape"},{name:"QuotChar",token:"string"}]};n.XQueryLexer=function(){return new i(r,d)}},{"./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(e,t,n){"use strict";function o(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,u=function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var u=i,a=r.doc.getTextRange(n.getSelectionRange());if(a!==""&&a!=="'"&&a!='"'&&n.getWrapBehavioursEnabled())return{text:u+a+u,selection:!1};var f=n.getCursorPosition(),l=r.doc.getLine(f.row),c=l.substring(f.column,f.column+1),h=new s(r,f.row,f.column),p=h.getCurrentToken();if(c==u&&(o(p,"attribute-value")||o(p,"string")))return{text:"",selection:[1,1]};p||(p=h.stepBackward());if(!p)return;while(o(p,"tag-whitespace")||o(p,"whitespace"))p=h.stepBackward();var d=!c||c.match(/\s/);if(o(p,"attribute-equals")&&(d||c==">")||o(p,"decl-attribute-equals")&&(d||c=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var u=n.getSelectionRange().start,a=new s(r,u.row,u.column),f=a.getCurrentToken()||a.stepBackward();if(!f||!(o(f,"tag-name")||o(f,"tag-whitespace")||o(f,"attribute-name")||o(f,"attribute-equals")||o(f,"attribute-value")))return;if(o(f,"reference.attribute-value"))return;if(o(f,"attribute-value")){var l=a.getCurrentTokenColumn()+f.value.length;if(u.column/.test(r.getLine(u.row).slice(u.column)))return;while(!o(f,"tag-name")){f=a.stepBackward();if(f.value=="<"){f=a.stepForward();break}}var h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn();if(o(a.stepBackward(),"end-tag-open"))return;var d=f.value;h==u.row&&(d=d.substring(0,u.column-p));if(this.voidElements&&this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var u=n.getCursorPosition(),a=r.getLine(u.row),f=new s(r,u.row,u.column),l=f.getCurrentToken();if(o(l,"")&&l.type.indexOf("tag-close")!==-1){if(l.value=="/>")return;while(l&&l.type.indexOf("tag-name")===-1)l=f.stepBackward();if(!l)return;var c=l.value,h=f.getCurrentTokenRow();l=f.stepBackward();if(!l||l.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]||!this.voidElements){var p=r.getTokenAt(u.row,u.column+1),a=r.getLine(h),d=this.$getIndent(a),v=d+r.getTabString();return p&&p.value===""){var s=n.getCursorPosition(),o=new u(r,s.row,s.column),f=o.getCurrentToken(),l=!1,e=JSON.parse(e).pop();if(f&&f.value===">"||e!=="StartTag")return;if(!f||!a(f,"meta.tag")&&(!a(f,"text")||!f.value.match("/"))){do f=o.stepBackward();while(f&&(a(f,"string")||a(f,"keyword.operator")||a(f,"entity.attribute-name")||a(f,"text")))}else l=!0;var c=o.stepBackward();if(!f||!a(f,"meta.tag")||c!==null&&c.value.match("/"))return;var h=f.value.substring(1);if(l)var h=h.substring(0,s.column-f.start);return{text:">",selection:[1,1]}}})};r.inherits(f,i),t.XQueryBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.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(e,t,n){"use strict";var r=e("../worker/worker_client").WorkerClient,i=e("../lib/oop"),s=e("./text").Mode,o=e("./text_highlight_rules").TextHighlightRules,u=e("./xquery/xquery_lexer").XQueryLexer,a=e("../range").Range,f=e("./behaviour/xquery").XQueryBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../anchor").Anchor,h=function(){this.$tokenizer=new u,this.$behaviour=new f,this.foldingRules=new l,this.$highlightRules=new o};i.inherits(h,s),function(){this.completer={getCompletions:function(e,t,n,r,i){if(!t.$worker)return i();t.$worker.emit("complete",{data:{pos:n,prefix:r}}),t.$worker.on("complete",function(e){i(null,e.data)})}},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=t.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);return i&&(r+=n),r},this.checkOutdent=function(e,t,n){return/^\s+$/.test(t)?/^\s*[\}\)]/.test(n):!1},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=r.match(/^(\s*[\}\)])/);if(!i)return 0;var s=i[1].length,o=t.findMatchingBracket({row:n,column:s});if(!o||o.row==n)return 0;var u=this.$getIndent(t.getLine(o.row));t.replace(new a(n,0,n,s-1),u)},this.toggleCommentLines=function(e,t,n,r){var i,s,o=!0,u=/^\s*\(:(.*):\)/;for(i=n;i<=r;i++)if(!u.test(t.getLine(i))){o=!1;break}var f=new a(0,0,0,0);for(i=n;i<=r;i++)s=t.getLine(i),f.start.row=i,f.end.row=i,f.end.column=s.length,t.replace(f,o?s.match(u)[1]:"(:"+s+":)")},this.createWorker=function(e){var t=new r(["ace"],"ace/mode/xquery_worker","XQueryWorker"),n=this;return t.attachToDocument(e.getDocument()),t.on("ok",function(t){e.clearAnnotations()}),t.on("markers",function(t){e.clearAnnotations(),n.addMarkers(t.data,e)}),t.on("highlight",function(t){n.$tokenizer.tokens=t.data.tokens,n.$tokenizer.lines=e.getDocument().getAllLines();var r=Object.keys(n.$tokenizer.tokens);for(var i=0;i][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(e,t,n,r){r=r.replace(/ #.*/,"");var i=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(r)[0].replace(/\S\s*$/,"").length,s=parseInt(/\d+[\s+-]*$/.exec(r));return s?(i+=s-1,this.next="mlString"):this.next="mlStringPre",n.length?(n[0]=this.next,n[1]=i):(n.push(this.next),n.push(i)),this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:"constant.numeric",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(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.shift(),n.shift()):(n[1]=e.length-1,this.next=n[0]="mlString"),this.token},next:"mlString"},{defaultToken:"string"}],mlString:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(e,t,n){var r=n[1];return r>=e.length?(this.next="start",n.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};r.inherits(s,i),t.YamlHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++ta){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&uc){var m=e.getLine(h).length;return new s(c,f,h,m)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/),f=r[i]==="-";if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u=|>/},{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:/\)/}],"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:"."}],"pattern-state":[{token:"constant.character.escape",regex:/\\./},{token:"string.regexp",regex:"/",next:"start"},{token:"string.regexp",regex:"."}]},this.normalizeRules()};s.metaData={fileTypes:["bro","zeek"],name:"Zeek",scopeName:"source.zeek"},r.inherits(s,i),t.ZeekHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/zeek",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/zeek_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./zeek_highlight_rules").ZeekHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/zeek"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/mode-zig.js b/www/js/ace/mode-zig.js new file mode 100644 index 000000000..7edaeea18 --- /dev/null +++ b/www/js/ace/mode-zig.js @@ -0,0 +1,8 @@ +define("ace/mode/zig_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=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()};s.metaData={fileTypes:["zig"],keyEquivalent:"^~Z",name:"Zig",scopeName:"source.zig"},r.inherits(s,i),t.ZigHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),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(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++tf)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++no)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/zig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/zig_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./zig_highlight_rules").ZigHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="//",this.$id="ace/mode/zig"}.call(u.prototype),t.Mode=u}); (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/www/js/ace/theme-ambiance.js b/www/js/ace/theme-ambiance.js new file mode 100644 index 000000000..dde5bf3cc --- /dev/null +++ b/www/js/ace/theme-ambiance.js @@ -0,0 +1,8 @@ +define("ace/theme/ambiance-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-ambiance",t.cssText=e("./ambiance-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-chaos.js b/www/js/ace/theme-chaos.js new file mode 100644 index 000000000..66500c0c0 --- /dev/null +++ b/www/js/ace/theme-chaos.js @@ -0,0 +1,8 @@ +define("ace/theme/chaos-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-chaos",t.cssText=e("./chaos-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-chrome.js b/www/js/ace/theme-chrome.js new file mode 100644 index 000000000..716c38674 --- /dev/null +++ b/www/js/ace/theme-chrome.js @@ -0,0 +1,8 @@ +define("ace/theme/chrome-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-chrome",t.cssText=e("./chrome-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-cloud9_day.js b/www/js/ace/theme-cloud9_day.js new file mode 100644 index 000000000..303e00bf7 --- /dev/null +++ b/www/js/ace/theme-cloud9_day.js @@ -0,0 +1,8 @@ +define("ace/theme/cloud9_day-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-cloud9-day",t.cssText=e("./cloud9_day-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.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/www/js/ace/theme-cloud9_night.js b/www/js/ace/theme-cloud9_night.js new file mode 100644 index 000000000..2be0c0cf5 --- /dev/null +++ b/www/js/ace/theme-cloud9_night.js @@ -0,0 +1,8 @@ +define("ace/theme/cloud9_night-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-cloud9-night",t.cssText=e("./cloud9_night-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.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/www/js/ace/theme-cloud9_night_low_color.js b/www/js/ace/theme-cloud9_night_low_color.js new file mode 100644 index 000000000..75381a3d0 --- /dev/null +++ b/www/js/ace/theme-cloud9_night_low_color.js @@ -0,0 +1,8 @@ +define("ace/theme/cloud9_night_low_color-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-cloud9-night-low-color",t.cssText=e("./cloud9_night_low_color-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.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/www/js/ace/theme-cloud_editor.js b/www/js/ace/theme-cloud_editor.js new file mode 100644 index 000000000..0aa0b5291 --- /dev/null +++ b/www/js/ace/theme-cloud_editor.js @@ -0,0 +1,8 @@ +define("ace/theme/cloud_editor-css",["require","exports","module"],function(e,t,n){n.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_gutter-active-line::before,\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-active-line::before {\n content: "";\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n z-index: 1;\n pointer-events: none;\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(e,t,n){t.isDark=!1,t.cssClass="ace-cloud_editor",t.cssText=e("./cloud_editor-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-cloud_editor_dark.js b/www/js/ace/theme-cloud_editor_dark.js new file mode 100644 index 000000000..f9164a0ec --- /dev/null +++ b/www/js/ace/theme-cloud_editor_dark.js @@ -0,0 +1,8 @@ +define("ace/theme/cloud_editor_dark-css",["require","exports","module"],function(e,t,n){n.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_gutter-active-line::before,\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-active-line::before {\n content: "";\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n z-index: 1;\n pointer-events: none;\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(e,t,n){t.isDark=!0,t.cssClass="ace-cloud_editor_dark",t.cssText=e("./cloud_editor_dark-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-clouds.js b/www/js/ace/theme-clouds.js new file mode 100644 index 000000000..660232630 --- /dev/null +++ b/www/js/ace/theme-clouds.js @@ -0,0 +1,8 @@ +define("ace/theme/clouds-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-clouds",t.cssText=e("./clouds-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-clouds_midnight.js b/www/js/ace/theme-clouds_midnight.js new file mode 100644 index 000000000..95683c9be --- /dev/null +++ b/www/js/ace/theme-clouds_midnight.js @@ -0,0 +1,8 @@ +define("ace/theme/clouds_midnight-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-clouds-midnight",t.cssText=e("./clouds_midnight-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-cobalt.js b/www/js/ace/theme-cobalt.js new file mode 100644 index 000000000..36c807224 --- /dev/null +++ b/www/js/ace/theme-cobalt.js @@ -0,0 +1,8 @@ +define("ace/theme/cobalt-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-cobalt",t.cssText=e("./cobalt-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-crimson_editor.js b/www/js/ace/theme-crimson_editor.js new file mode 100644 index 000000000..d5d6d5f97 --- /dev/null +++ b/www/js/ace/theme-crimson_editor.js @@ -0,0 +1,8 @@ +define("ace/theme/crimson_editor-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssText=e("./crimson_editor-css"),t.cssClass="ace-crimson-editor";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-dawn.js b/www/js/ace/theme-dawn.js new file mode 100644 index 000000000..ee13e6626 --- /dev/null +++ b/www/js/ace/theme-dawn.js @@ -0,0 +1,8 @@ +define("ace/theme/dawn-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-dawn",t.cssText=e("./dawn-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-dracula.js b/www/js/ace/theme-dracula.js new file mode 100644 index 000000000..12b0992c4 --- /dev/null +++ b/www/js/ace/theme-dracula.js @@ -0,0 +1,8 @@ +define("ace/theme/dracula-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-dracula",t.cssText=e("./dracula-css"),t.$selectionColorConflict=!0;var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-dreamweaver.js b/www/js/ace/theme-dreamweaver.js new file mode 100644 index 000000000..99c0a6f92 --- /dev/null +++ b/www/js/ace/theme-dreamweaver.js @@ -0,0 +1,8 @@ +define("ace/theme/dreamweaver-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-dreamweaver",t.cssText=e("./dreamweaver-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-eclipse.js b/www/js/ace/theme-eclipse.js new file mode 100644 index 000000000..3b692c865 --- /dev/null +++ b/www/js/ace/theme-eclipse.js @@ -0,0 +1,8 @@ +define("ace/theme/eclipse-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){"use strict";t.isDark=!1,t.cssText=e("./eclipse-css"),t.cssClass="ace-eclipse";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-github.js b/www/js/ace/theme-github.js new file mode 100644 index 000000000..10c6ab5f9 --- /dev/null +++ b/www/js/ace/theme-github.js @@ -0,0 +1,8 @@ +define("ace/theme/github-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-github",t.cssText=e("./github-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-github_dark.js b/www/js/ace/theme-github_dark.js new file mode 100644 index 000000000..aa8359aa8 --- /dev/null +++ b/www/js/ace/theme-github_dark.js @@ -0,0 +1,8 @@ +define("ace/theme/github_dark-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-github-dark",t.cssText=e("./github_dark-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-github_light_default.js b/www/js/ace/theme-github_light_default.js new file mode 100644 index 000000000..0f06db04a --- /dev/null +++ b/www/js/ace/theme-github_light_default.js @@ -0,0 +1,8 @@ +define("ace/theme/github_light_default-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-github-light-default",t.cssText=e("./github_light_default-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-gob.js b/www/js/ace/theme-gob.js new file mode 100644 index 000000000..17a077342 --- /dev/null +++ b/www/js/ace/theme-gob.js @@ -0,0 +1,8 @@ +define("ace/theme/gob-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-gob",t.cssText=e("./gob-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-gruvbox.js b/www/js/ace/theme-gruvbox.js new file mode 100644 index 000000000..fa2393e7d --- /dev/null +++ b/www/js/ace/theme-gruvbox.js @@ -0,0 +1,8 @@ +define("ace/theme/gruvbox-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-gruvbox",t.cssText=e("./gruvbox-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-gruvbox_dark_hard.js b/www/js/ace/theme-gruvbox_dark_hard.js new file mode 100644 index 000000000..377beb737 --- /dev/null +++ b/www/js/ace/theme-gruvbox_dark_hard.js @@ -0,0 +1,8 @@ +define("ace/theme/gruvbox_dark_hard-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-gruvbox-dark-hard",t.cssText=e("./gruvbox_dark_hard-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.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/www/js/ace/theme-gruvbox_light_hard.js b/www/js/ace/theme-gruvbox_light_hard.js new file mode 100644 index 000000000..64bdf9e68 --- /dev/null +++ b/www/js/ace/theme-gruvbox_light_hard.js @@ -0,0 +1,8 @@ +define("ace/theme/gruvbox_light_hard-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-gruvbox-light-hard",t.cssText=e("./gruvbox_light_hard-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.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/www/js/ace/theme-idle_fingers.js b/www/js/ace/theme-idle_fingers.js new file mode 100644 index 000000000..449898cbe --- /dev/null +++ b/www/js/ace/theme-idle_fingers.js @@ -0,0 +1,8 @@ +define("ace/theme/idle_fingers-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-idle-fingers",t.cssText=e("./idle_fingers-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-iplastic.js b/www/js/ace/theme-iplastic.js new file mode 100644 index 000000000..d5175d591 --- /dev/null +++ b/www/js/ace/theme-iplastic.js @@ -0,0 +1,8 @@ +define("ace/theme/iplastic-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-iplastic",t.cssText=e("./iplastic-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-katzenmilch.js b/www/js/ace/theme-katzenmilch.js new file mode 100644 index 000000000..c85d633d0 --- /dev/null +++ b/www/js/ace/theme-katzenmilch.js @@ -0,0 +1,8 @@ +define("ace/theme/katzenmilch-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-katzenmilch",t.cssText=e("./katzenmilch-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-kr_theme.js b/www/js/ace/theme-kr_theme.js new file mode 100644 index 000000000..8a233c2e1 --- /dev/null +++ b/www/js/ace/theme-kr_theme.js @@ -0,0 +1,8 @@ +define("ace/theme/kr_theme-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-kr-theme",t.cssText=e("./kr_theme-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-kuroir.js b/www/js/ace/theme-kuroir.js new file mode 100644 index 000000000..c93dc4b8c --- /dev/null +++ b/www/js/ace/theme-kuroir.js @@ -0,0 +1,8 @@ +define("ace/theme/kuroir-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-kuroir",t.cssText=e("./kuroir-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-merbivore.js b/www/js/ace/theme-merbivore.js new file mode 100644 index 000000000..392b8efe7 --- /dev/null +++ b/www/js/ace/theme-merbivore.js @@ -0,0 +1,8 @@ +define("ace/theme/merbivore-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-merbivore",t.cssText=e("./merbivore-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-merbivore_soft.js b/www/js/ace/theme-merbivore_soft.js new file mode 100644 index 000000000..9a3c6baf9 --- /dev/null +++ b/www/js/ace/theme-merbivore_soft.js @@ -0,0 +1,8 @@ +define("ace/theme/merbivore_soft-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-merbivore-soft",t.cssText=e("./merbivore_soft-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-mono_industrial.js b/www/js/ace/theme-mono_industrial.js new file mode 100644 index 000000000..0adb1b391 --- /dev/null +++ b/www/js/ace/theme-mono_industrial.js @@ -0,0 +1,8 @@ +define("ace/theme/mono_industrial-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-mono-industrial",t.cssText=e("./mono_industrial-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-monokai.js b/www/js/ace/theme-monokai.js new file mode 100644 index 000000000..a5f50405b --- /dev/null +++ b/www/js/ace/theme-monokai.js @@ -0,0 +1,8 @@ +define("ace/theme/monokai-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=e("./monokai-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-nord_dark.js b/www/js/ace/theme-nord_dark.js new file mode 100644 index 000000000..4eb6930d7 --- /dev/null +++ b/www/js/ace/theme-nord_dark.js @@ -0,0 +1,8 @@ +define("ace/theme/nord_dark-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-nord-dark",t.cssText=e("./nord_dark-css"),t.$selectionColorConflict=!0;var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-one_dark.js b/www/js/ace/theme-one_dark.js new file mode 100644 index 000000000..9008211b5 --- /dev/null +++ b/www/js/ace/theme-one_dark.js @@ -0,0 +1,8 @@ +define("ace/theme/one_dark-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-one-dark",t.cssText=e("./one_dark-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-pastel_on_dark.js b/www/js/ace/theme-pastel_on_dark.js new file mode 100644 index 000000000..15c2516b0 --- /dev/null +++ b/www/js/ace/theme-pastel_on_dark.js @@ -0,0 +1,8 @@ +define("ace/theme/pastel_on_dark-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-pastel-on-dark",t.cssText=e("./pastel_on_dark-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-solarized_dark.js b/www/js/ace/theme-solarized_dark.js new file mode 100644 index 000000000..bd6d1cc2e --- /dev/null +++ b/www/js/ace/theme-solarized_dark.js @@ -0,0 +1,8 @@ +define("ace/theme/solarized_dark-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-solarized-dark",t.cssText=e("./solarized_dark-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-solarized_light.js b/www/js/ace/theme-solarized_light.js new file mode 100644 index 000000000..b4b124f67 --- /dev/null +++ b/www/js/ace/theme-solarized_light.js @@ -0,0 +1,8 @@ +define("ace/theme/solarized_light-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-solarized-light",t.cssText=e("./solarized_light-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-sqlserver.js b/www/js/ace/theme-sqlserver.js new file mode 100644 index 000000000..b9d11650a --- /dev/null +++ b/www/js/ace/theme-sqlserver.js @@ -0,0 +1,8 @@ +define("ace/theme/sqlserver-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-sqlserver",t.cssText=e("./sqlserver-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-terminal.js b/www/js/ace/theme-terminal.js new file mode 100644 index 000000000..0d2f231f9 --- /dev/null +++ b/www/js/ace/theme-terminal.js @@ -0,0 +1,8 @@ +define("ace/theme/terminal-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-terminal-theme",t.cssText=e("./terminal-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-textmate.js b/www/js/ace/theme-textmate.js new file mode 100644 index 000000000..b5622afdd --- /dev/null +++ b/www/js/ace/theme-textmate.js @@ -0,0 +1,8 @@ +define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-tomorrow.js b/www/js/ace/theme-tomorrow.js new file mode 100644 index 000000000..f17469a06 --- /dev/null +++ b/www/js/ace/theme-tomorrow.js @@ -0,0 +1,8 @@ +define("ace/theme/tomorrow-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-tomorrow",t.cssText=e("./tomorrow-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-tomorrow_night.js b/www/js/ace/theme-tomorrow_night.js new file mode 100644 index 000000000..a86f3260c --- /dev/null +++ b/www/js/ace/theme-tomorrow_night.js @@ -0,0 +1,8 @@ +define("ace/theme/tomorrow_night-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-tomorrow-night",t.cssText=e("./tomorrow_night-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-tomorrow_night_blue.js b/www/js/ace/theme-tomorrow_night_blue.js new file mode 100644 index 000000000..e2e4780c0 --- /dev/null +++ b/www/js/ace/theme-tomorrow_night_blue.js @@ -0,0 +1,8 @@ +define("ace/theme/tomorrow_night_blue-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-tomorrow-night-blue",t.cssText=e("./tomorrow_night_blue-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-tomorrow_night_bright.js b/www/js/ace/theme-tomorrow_night_bright.js new file mode 100644 index 000000000..f5bd17209 --- /dev/null +++ b/www/js/ace/theme-tomorrow_night_bright.js @@ -0,0 +1,8 @@ +define("ace/theme/tomorrow_night_bright-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-tomorrow-night-bright",t.cssText=e("./tomorrow_night_bright-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-tomorrow_night_eighties.js b/www/js/ace/theme-tomorrow_night_eighties.js new file mode 100644 index 000000000..cd6304ba4 --- /dev/null +++ b/www/js/ace/theme-tomorrow_night_eighties.js @@ -0,0 +1,8 @@ +define("ace/theme/tomorrow_night_eighties-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-tomorrow-night-eighties",t.cssText=e("./tomorrow_night_eighties-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-twilight.js b/www/js/ace/theme-twilight.js new file mode 100644 index 000000000..c4803c789 --- /dev/null +++ b/www/js/ace/theme-twilight.js @@ -0,0 +1,8 @@ +define("ace/theme/twilight-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-twilight",t.cssText=e("./twilight-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-vibrant_ink.js b/www/js/ace/theme-vibrant_ink.js new file mode 100644 index 000000000..75a36cd40 --- /dev/null +++ b/www/js/ace/theme-vibrant_ink.js @@ -0,0 +1,8 @@ +define("ace/theme/vibrant_ink-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!0,t.cssClass="ace-vibrant-ink",t.cssText=e("./vibrant_ink-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/ace/theme-xcode.js b/www/js/ace/theme-xcode.js new file mode 100644 index 000000000..bc0ce8c02 --- /dev/null +++ b/www/js/ace/theme-xcode.js @@ -0,0 +1,8 @@ +define("ace/theme/xcode-css",["require","exports","module"],function(e,t,n){n.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(e,t,n){t.isDark=!1,t.cssClass="ace-xcode",t.cssText=e("./xcode-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (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/www/js/createKeyboardEvent.js b/www/js/createKeyboardEvent.js deleted file mode 100644 index 9cdc3142a..000000000 --- a/www/js/createKeyboardEvent.js +++ /dev/null @@ -1,179 +0,0 @@ -//jshint ignore:start - -void - -function () { //closure - - var global = this, - _initKeyboardEvent_type = (function (e) { - try { - e.initKeyboardEvent( - "keyup" // in DOMString typeArg - , false // in boolean canBubbleArg - , false // in boolean cancelableArg - , global // in views::AbstractView viewArg - , "+" // [test]in DOMString keyIdentifierArg | webkit event.keyIdentifier | IE9 event.key - , 3 // [test]in unsigned long keyLocationArg | webkit event.keyIdentifier | IE9 event.location - , true // [test]in boolean ctrlKeyArg | webkit event.shiftKey | old webkit event.ctrlKey | IE9 event.modifiersList - , false // [test]shift | alt - , true // [test]shift | alt - , false // meta - , false // altGraphKey - ); - - - - /* - // Safari and IE9 throw Error here due keyCode, charCode and which is readonly - // Uncomment this code block if you need legacy properties - delete e.keyCode; - _Object_defineProperty(e, {writable: true, configurable: true, value: 9}) - delete e.charCode; - _Object_defineProperty(e, {writable: true, configurable: true, value: 9}) - delete e.which; - _Object_defineProperty(e, {writable: true, configurable: true, value: 9}) - */ - - return ((e["keyIdentifier"] || e["key"]) == "+" && (e["location"]) || e["keyLocation"] == 3) && ( - e.ctrlKey ? - e.altKey ? // webkit - 1 : - 3 : - e.shiftKey ? - 2 // webkit - : - 4 // IE9 - ) || 9 // FireFox|w3c - ; - } catch (__e__) { - _initKeyboardEvent_type = 0 - } - })(document.createEvent("KeyboardEvent")) - - , - _keyboardEvent_properties_dictionary = { - "char": "", - "key": "", - "location": 0, - "ctrlKey": false, - "shiftKey": false, - "altKey": false, - "metaKey": false, - "repeat": false, - "locale": "", - - "detail": 0, - "bubbles": false, - "cancelable": false, - - //legacy properties - "keyCode": 0, - "charCode": 0, - "which": 0 - } - - , - own = Function.prototype.call.bind(Object.prototype.hasOwnProperty) - - , - _Object_defineProperty = Object.defineProperty || function (obj, prop, val) { - if ("value" in val) { - obj[prop] = val["value"]; - } - }; - - function crossBrowser_initKeyboardEvent(type, dict) { - var e; - if (_initKeyboardEvent_type) { - e = document.createEvent("KeyboardEvent"); - } else { - e = document.createEvent("Event"); - } - var _prop_name, localDict = {}; - - for (_prop_name in _keyboardEvent_properties_dictionary) - if (own(_keyboardEvent_properties_dictionary, _prop_name)) { - localDict[_prop_name] = (own(dict, _prop_name) && dict || _keyboardEvent_properties_dictionary)[_prop_name]; - } - - var _ctrlKey = localDict["ctrlKey"], - _shiftKey = localDict["shiftKey"], - _altKey = localDict["altKey"], - _metaKey = localDict["metaKey"], - _altGraphKey = localDict["altGraphKey"] - - , - _modifiersListArg = _initKeyboardEvent_type > 3 ? ( - (_ctrlKey ? "Control" : "") + - (_shiftKey ? " Shift" : "") + - (_altKey ? " Alt" : "") + - (_metaKey ? " Meta" : "") + - (_altGraphKey ? " AltGraph" : "") - ).trim() : null - - , - _key = localDict["key"] + "", - _char = localDict["char"] + "", - _location = localDict["location"], - _keyCode = localDict["keyCode"] || (localDict["keyCode"] = _key && _key.charCodeAt(0) || 0), - _charCode = localDict["charCode"] || (localDict["charCode"] = _char && _char.charCodeAt(0) || 0) - - , - _bubbles = localDict["bubbles"], - _cancelable = localDict["cancelable"] - - , - _repeat = localDict["repeat"], - _locale = localDict["locale"], - _view = global; - - localDict["which"] || (localDict["which"] = localDict["keyCode"]); - - if ("initKeyEvent" in e) { //FF - //https://developer.mozilla.org/en/DOM/event.initKeyEvent - e.initKeyEvent(type, _bubbles, _cancelable, _view, _ctrlKey, _altKey, _shiftKey, _metaKey, _keyCode, _charCode); - } else if (_initKeyboardEvent_type && "initKeyboardEvent" in e) { //https://developer.mozilla.org/en/DOM/KeyboardEvent#initKeyboardEvent() - if (_initKeyboardEvent_type == 1) { // webkit - //http://stackoverflow.com/a/8490774/1437207 - //https://bugs.webkit.org/show_bug.cgi?id=13368 - e.initKeyboardEvent(type, _bubbles, _cancelable, _view, _key, _location, _ctrlKey, _shiftKey, _altKey, _metaKey, _altGraphKey); - } else if (_initKeyboardEvent_type == 2) { // old webkit - //http://code.google.com/p/chromium/issues/detail?id=52408 - e.initKeyboardEvent(type, _bubbles, _cancelable, _view, _ctrlKey, _altKey, _shiftKey, _metaKey, _keyCode, _charCode); - } else if (_initKeyboardEvent_type == 3) { // webkit - e.initKeyboardEvent(type, _bubbles, _cancelable, _view, _key, _location, _ctrlKey, _altKey, _shiftKey, _metaKey, _altGraphKey); - } else if (_initKeyboardEvent_type == 4) { // IE9 - //http://msdn.microsoft.com/en-us/library/ie/ff975297(v=vs.85).aspx - e.initKeyboardEvent(type, _bubbles, _cancelable, _view, _key, _location, _modifiersListArg, _repeat, _locale); - } else { // FireFox|w3c - //http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent-initKeyboardEvent - //https://developer.mozilla.org/en/DOM/KeyboardEvent#initKeyboardEvent() - e.initKeyboardEvent(type, _bubbles, _cancelable, _view, _char, _key, _location, _modifiersListArg, _repeat, _locale); - } - } else { - e.initEvent(type, _bubbles, _cancelable) - } - - for (_prop_name in _keyboardEvent_properties_dictionary) - if (own(_keyboardEvent_properties_dictionary, _prop_name)) { - if (e[_prop_name] != localDict[_prop_name]) { - try { - delete e[_prop_name]; - _Object_defineProperty(e, _prop_name, { - writable: true, - "value": localDict[_prop_name] - }); - } catch (e) { - //Some properties is read-only - } - - } - } - - return e; - } - - //export - global.createKeyboardEvent = crossBrowser_initKeyboardEvent; - -}.call(this); \ No newline at end of file diff --git a/www/js/emmet-core.js b/www/js/emmet-core.js index 4fbd2e8ef..071716ca0 100644 --- a/www/js/emmet-core.js +++ b/www/js/emmet-core.js @@ -37,9 +37,9 @@ ({ "./bundles/snippets.js": [function (require, module, exports) { /** - * Bundler, used in builder script to statically - * include snippets.json into bundle - */ + * Bundler, used in builder script to statically + * include snippets.json into bundle + */ var res = require('../lib/assets/resources'); var snippets = require('../lib/snippets.json'); res.setVocabulary(snippets, 'system'); @@ -336,9 +336,9 @@ }, { "./action/main": "action\\main.js", "./assets/caniuse": "assets\\caniuse.js", "./assets/htmlMatcher": "assets\\htmlMatcher.js", "./assets/logger": "assets\\logger.js", "./assets/preferences": "assets\\preferences.js", "./assets/profile": "assets\\profile.js", "./assets/resources": "assets\\resources.js", "./assets/tabStops": "assets\\tabStops.js", "./parser/abbreviation": "parser\\abbreviation.js", "./plugin/file": "plugin\\file.js", "./utils/action": "utils\\action.js", "./utils/common": "utils\\common.js", "./utils/editor": "utils\\editor.js" }], "action\\balance.js": [function (require, module, exports) { /** - * HTML pair matching (balancing) actions - * @constructor - */ + * HTML pair matching (balancing) actions + * @constructor + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -633,9 +633,9 @@ }); }, { "../assets/htmlMatcher": "assets\\htmlMatcher.js", "../assets/range": "assets\\range.js", "../editTree/css": "editTree\\css.js", "../utils/action": "utils\\action.js", "../utils/common": "utils\\common.js", "../utils/cssSections": "utils\\cssSections.js", "../utils/editor": "utils\\editor.js" }], "action\\base64.js": [function (require, module, exports) { /** - * Encodes/decodes image under cursor to/from base64 - * @param {IEmmetEditor} editor - */ + * Encodes/decodes image under cursor to/from base64 + * @param {IEmmetEditor} editor + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -785,9 +785,9 @@ }, { "../plugin/file": "plugin\\file.js", "../utils/action": "utils\\action.js", "../utils/base64": "utils\\base64.js", "../utils/editor": "utils\\editor.js" }], "action\\editPoints.js": [function (require, module, exports) { /** - * Move between next/prev edit points. 'Edit points' are places between tags - * and quotes of empty attributes in html - */ + * Move between next/prev edit points. 'Edit points' are places between tags + * and quotes of empty attributes in html + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -904,8 +904,8 @@ }); }, {}], "action\\evaluateMath.js": [function (require, module, exports) { /** - * Evaluates simple math expression under caret - */ + * Evaluates simple math expression under caret + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -957,14 +957,14 @@ }, { "../assets/range": "assets\\range.js", "../utils/action": "utils\\action.js", "../utils/common": "utils\\common.js", "../utils/math": "utils\\math.js" }], "action\\expandAbbreviation.js": [function (require, module, exports) { /** - * 'Expand abbreviation' editor action: extracts abbreviation from current caret - * position and replaces it with formatted output. - *

      - * This behavior can be overridden with custom handlers which can perform - * different actions when 'Expand Abbreviation' action is called. - * For example, a CSS gradient handler that produces vendor-prefixed gradient - * definitions registers its own expand abbreviation handler. - */ + * 'Expand abbreviation' editor action: extracts abbreviation from current caret + * position and replaces it with formatted output. + *

      + * This behavior can be overridden with custom handlers which can perform + * different actions when 'Expand Abbreviation' action is called. + * For example, a CSS gradient handler that produces vendor-prefixed gradient + * definitions registers its own expand abbreviation handler. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -1147,8 +1147,8 @@ }); }, { "../assets/handlerList": "assets\\handlerList.js", "../assets/preferences": "assets\\preferences.js", "../assets/range": "assets\\range.js", "../parser/abbreviation": "parser\\abbreviation.js", "../resolver/cssGradient": "resolver\\cssGradient.js", "../utils/action": "utils\\action.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "action\\incrementDecrement.js": [function (require, module, exports) { /** - * Increment/decrement number under cursor - */ + * Increment/decrement number under cursor + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -1255,9 +1255,9 @@ }); }, { "../utils/action": "utils\\action.js", "../utils/common": "utils\\common.js" }], "action\\lineBreaks.js": [function (require, module, exports) { /** - * Actions to insert line breaks. Some simple editors (like browser's - * <textarea>, for example) do not provide such simple things - */ + * Actions to insert line breaks. Some simple editors (like browser's + * <textarea>, for example) do not provide such simple things + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -1383,9 +1383,9 @@ }, { "../assets/htmlMatcher": "assets\\htmlMatcher.js", "../assets/preferences": "assets\\preferences.js", "../assets/resources": "assets\\resources.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "action\\main.js": [function (require, module, exports) { /** - * Module describes and performs Emmet actions. The actions themselves are - * defined in actions folder - */ + * Module describes and performs Emmet actions. The actions themselves are + * defined in actions folder + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -1624,10 +1624,10 @@ }); }, { "../utils/common": "utils\\common.js", "./balance": "action\\balance.js", "./base64": "action\\base64.js", "./editPoints": "action\\editPoints.js", "./evaluateMath": "action\\evaluateMath.js", "./expandAbbreviation": "action\\expandAbbreviation.js", "./incrementDecrement": "action\\incrementDecrement.js", "./lineBreaks": "action\\lineBreaks.js", "./mergeLines": "action\\mergeLines.js", "./reflectCSSValue": "action\\reflectCSSValue.js", "./removeTag": "action\\removeTag.js", "./selectItem": "action\\selectItem.js", "./selectLine": "action\\selectLine.js", "./splitJoinTag": "action\\splitJoinTag.js", "./toggleComment": "action\\toggleComment.js", "./updateImageSize": "action\\updateImageSize.js", "./updateTag": "action\\updateTag.js", "./wrapWithAbbreviation": "action\\wrapWithAbbreviation.js" }], "action\\mergeLines.js": [function (require, module, exports) { /** - * Merges selected lines or lines between XHTML tag pairs - * @param {Function} require - * @param {Underscore} _ - */ + * Merges selected lines or lines between XHTML tag pairs + * @param {Function} require + * @param {Underscore} _ + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -1677,9 +1677,9 @@ }); }, { "../assets/htmlMatcher": "assets\\htmlMatcher.js", "../assets/range": "assets\\range.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "action\\reflectCSSValue.js": [function (require, module, exports) { /** - * Reflect CSS value: takes rule's value under caret and pastes it for the same - * rules with vendor prefixes - */ + * Reflect CSS value: takes rule's value under caret and pastes it for the same + * rules with vendor prefixes + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -1697,7 +1697,7 @@ var cssGradient = require('../resolver/cssGradient'); prefs.define('css.reflect.oldIEOpacity', false, 'Support IE6/7/8 opacity notation, e.g. filter:alpha(opacity=...).\ - Note that CSS3 and SVG also provides filter property so this option is disabled by default.') + Note that CSS3 and SVG also provides filter property so this option is disabled by default.') /** * @type HandlerList List of registered handlers @@ -1879,8 +1879,8 @@ }); }, { "../assets/handlerList": "assets\\handlerList.js", "../assets/preferences": "assets\\preferences.js", "../editTree/css": "editTree\\css.js", "../resolver/css": "resolver\\css.js", "../resolver/cssGradient": "resolver\\cssGradient.js", "../utils/action": "utils\\action.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "action\\removeTag.js": [function (require, module, exports) { /** - * Gracefully removes tag under cursor - */ + * Gracefully removes tag under cursor + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -1925,10 +1925,10 @@ }, { "../assets/htmlMatcher": "assets\\htmlMatcher.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "action\\selectItem.js": [function (require, module, exports) { /** - * Actions that use stream parsers and tokenizers for traversing: - * -- Search for next/previous items in HTML - * -- Search for next/previous items in CSS - */ + * Actions that use stream parsers and tokenizers for traversing: + * -- Search for next/previous items in HTML + * -- Search for next/previous items in CSS + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -2380,8 +2380,8 @@ }); }, { "../assets/range": "assets\\range.js", "../assets/stringStream": "assets\\stringStream.js", "../editTree/css": "editTree\\css.js", "../parser/xml": "parser\\xml.js", "../utils/action": "utils\\action.js", "../utils/common": "utils\\common.js", "../utils/cssSections": "utils\\cssSections.js", "../utils/editor": "utils\\editor.js" }], "action\\selectLine.js": [function (require, module, exports) { /** - * Select current line (for simple editors like browser's <textarea>) - */ + * Select current line (for simple editors like browser's <textarea>) + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -2399,10 +2399,10 @@ }); }, {}], "action\\splitJoinTag.js": [function (require, module, exports) { /** - * Splits or joins tag, e.g. transforms it into a short notation and vice versa:
      - * <div></div> → <div /> : join
      - * <div /> → <div></div> : split - */ + * Splits or joins tag, e.g. transforms it into a short notation and vice versa:
      + * <div></div> → <div /> : join
      + * <div /> → <div></div> : split + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -2473,10 +2473,10 @@ }); }, { "../assets/htmlMatcher": "assets\\htmlMatcher.js", "../assets/profile": "assets\\profile.js", "../assets/resources": "assets\\resources.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "action\\toggleComment.js": [function (require, module, exports) { /** - * Toggles HTML and CSS comments depending on current caret context. Unlike - * the same action in most editors, this action toggles comment on currently - * matched item—HTML tag or CSS selector—when nothing is selected. - */ + * Toggles HTML and CSS comments depending on current caret context. Unlike + * the same action in most editors, this action toggles comment on currently + * matched item—HTML tag or CSS selector—when nothing is selected. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -2694,9 +2694,9 @@ }); }, { "../assets/htmlMatcher": "assets\\htmlMatcher.js", "../assets/preferences": "assets\\preferences.js", "../assets/range": "assets\\range.js", "../editTree/css": "editTree\\css.js", "../utils/action": "utils\\action.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "action\\updateImageSize.js": [function (require, module, exports) { /** - * Automatically updates image size attributes in HTML's <img> element or - * CSS rule - */ + * Automatically updates image size attributes in HTML's <img> element or + * CSS rule + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -2816,9 +2816,9 @@ }); }, { "../editTree/css": "editTree\\css.js", "../editTree/xml": "editTree\\xml.js", "../plugin/file": "plugin\\file.js", "../utils/action": "utils\\action.js", "../utils/base64": "utils\\base64.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "action\\updateTag.js": [function (require, module, exports) { /** - * Update Tag action: allows users to update existing HTML tags and add/remove - * attributes or even tag name - */ + * Update Tag action: allows users to update existing HTML tags and add/remove + * attributes or even tag name + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -2960,9 +2960,9 @@ }); }, { "../editTree/xml": "editTree\\xml.js", "../parser/abbreviation": "parser\\abbreviation.js", "../utils/action": "utils\\action.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "action\\wrapWithAbbreviation.js": [function (require, module, exports) { /** - * Action that wraps content with abbreviation. For convenience, action is - * defined as reusable module - */ + * Action that wraps content with abbreviation. For convenience, action is + * defined as reusable module + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -3026,13 +3026,13 @@ }); }, { "../assets/htmlMatcher": "assets\\htmlMatcher.js", "../assets/range": "assets\\range.js", "../parser/abbreviation": "parser\\abbreviation.js", "../utils/action": "utils\\action.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js" }], "assets\\caniuse.js": [function (require, module, exports) { /** - * Parsed resources (snippets, abbreviations, variables, etc.) for Emmet. - * Contains convenient method to get access for snippets with respect of - * inheritance. Also provides ability to store data in different vocabularies - * ('system' and 'user') for fast and safe resource update - * @author Sergey Chikuyonok (serge.che@gmail.com) - * @link http://chikuyonok.ru - */ + * Parsed resources (snippets, abbreviations, variables, etc.) for Emmet. + * Contains convenient method to get access for snippets with respect of + * inheritance. Also provides ability to store data in different vocabularies + * ('system' and 'user') for fast and safe resource update + * @author Sergey Chikuyonok (serge.che@gmail.com) + * @link http://chikuyonok.ru + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -3044,17 +3044,17 @@ var utils = require('../utils/common'); prefs.define('caniuse.enabled', true, 'Enable support of Can I Use database. When enabled,\ - CSS abbreviation resolver will look at Can I Use database first before detecting\ - CSS properties that should be resolved'); + CSS abbreviation resolver will look at Can I Use database first before detecting\ + CSS properties that should be resolved'); prefs.define('caniuse.vendors', 'all', 'A comma-separated list vendor identifiers\ - (as described in Can I Use database) that should be supported\ - when resolving vendor-prefixed properties. Set value to all\ - to support all available properties'); + (as described in Can I Use database) that should be supported\ + when resolving vendor-prefixed properties. Set value to all\ + to support all available properties'); prefs.define('caniuse.era', 'e-2', 'Browser era, as defined in Can I Use database.\ - Examples: e0 (current version), e1 (near future)\ - e-2 (2 versions back) and so on.'); + Examples: e0 (current version), e1 (near future)\ + e-2 (2 versions back) and so on.'); var cssSections = { 'border-image': ['border-image'], @@ -3277,8 +3277,8 @@ }, { "../utils/common": "utils\\common.js", "./preferences": "assets\\preferences.js" }], "assets\\elements.js": [function (require, module, exports) { /** - * Module that contains factories for element types used by Emmet - */ + * Module that contains factories for element types used by Emmet + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -3407,11 +3407,11 @@ }); }, {}], "assets\\handlerList.js": [function (require, module, exports) { /** - * Utility module that provides ordered storage of function handlers. - * Many Emmet modules' functionality can be extended/overridden by custom - * function. This modules provides unified storage of handler functions, their - * management and execution - */ + * Utility module that provides ordered storage of function handlers. + * Many Emmet modules' functionality can be extended/overridden by custom + * function. This modules provides unified storage of handler functions, their + * management and execution + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -3521,13 +3521,13 @@ }); }, { "../utils/common": "utils\\common.js" }], "assets\\htmlMatcher.js": [function (require, module, exports) { /** - * HTML matcher: takes string and searches for HTML tag pairs for given position - * - * Unlike “classic” matchers, it parses content from the specified - * position, not from the start, so it may work even outside HTML documents - * (for example, inside strings of programming languages like JavaScript, Python - * etc.) - */ + * HTML matcher: takes string and searches for HTML tag pairs for given position + * + * Unlike “classic” matchers, it parses content from the specified + * position, not from the start, so it may work even outside HTML documents + * (for example, inside strings of programming languages like JavaScript, Python + * etc.) + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -3810,8 +3810,8 @@ }); }, { "./range": "assets\\range.js" }], "assets\\logger.js": [function (require, module, exports) { /** - * Simple logger for Emmet - */ + * Simple logger for Emmet + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -3829,13 +3829,13 @@ }) }, {}], "assets\\preferences.js": [function (require, module, exports) { /** - * Common module's preferences storage. This module - * provides general storage for all module preferences, their description and - * default values.

      - * - * This module can also be used to list all available properties to create - * UI for updating properties - */ + * Common module's preferences storage. This module + * provides general storage for all module preferences, their description and + * default values.

      + * + * This module can also be used to list all available properties to create + * UI for updating properties + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -4080,9 +4080,9 @@ }); }, { "../utils/common": "utils\\common.js" }], "assets\\profile.js": [function (require, module, exports) { /** - * Output profile module. - * Profile defines how XHTML output data should look like - */ + * Output profile module. + * Profile defines how XHTML output data should look like + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -4355,8 +4355,8 @@ }, { "../utils/common": "utils\\common.js", "./preferences": "assets\\preferences.js", "./resources": "assets\\resources.js" }], "assets\\range.js": [function (require, module, exports) { /** - * Helper module to work with ranges - */ + * Helper module to work with ranges + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -4617,13 +4617,13 @@ }); }, {}], "assets\\resources.js": [function (require, module, exports) { /** - * Parsed resources (snippets, abbreviations, variables, etc.) for Emmet. - * Contains convenient method to get access for snippets with respect of - * inheritance. Also provides ability to store data in different vocabularies - * ('system' and 'user') for fast and safe resource update - * @author Sergey Chikuyonok (serge.che@gmail.com) - * @link http://chikuyonok.ru - */ + * Parsed resources (snippets, abbreviations, variables, etc.) for Emmet. + * Contains convenient method to get access for snippets with respect of + * inheritance. Also provides ability to store data in different vocabularies + * ('system' and 'user') for fast and safe resource update + * @author Sergey Chikuyonok (serge.che@gmail.com) + * @link http://chikuyonok.ru + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -5030,8 +5030,8 @@ }, { "../assets/logger": "assets\\logger.js", "../resolver/css": "resolver\\css.js", "../utils/common": "utils\\common.js", "../vendor/stringScore": "vendor\\stringScore.js", "./elements": "assets\\elements.js", "./handlerList": "assets\\handlerList.js" }], "assets\\stringStream.js": [function (require, module, exports) { /** - * A trimmed version of CodeMirror's StringStream module for string parsing - */ + * A trimmed version of CodeMirror's StringStream module for string parsing + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -5283,16 +5283,16 @@ }); }, {}], "assets\\tabStops.js": [function (require, module, exports) { /** - * Utility module for handling tabstops tokens generated by Emmet's - * "Expand Abbreviation" action. The main extract method will take - * raw text (for example: ${0} some ${1:text}), find all tabstops - * occurrences, replace them with tokens suitable for your editor of choice and - * return object with processed text and list of found tabstops and their ranges. - * For sake of portability (Objective-C/Java) the tabstops list is a plain - * sorted array with plain objects. - * - * Placeholders with the same are meant to be linked in your editor. - */ + * Utility module for handling tabstops tokens generated by Emmet's + * "Expand Abbreviation" action. The main extract method will take + * raw text (for example: ${0} some ${1:text}), find all tabstops + * occurrences, replace them with tokens suitable for your editor of choice and + * return object with processed text and list of found tabstops and their ranges. + * For sake of portability (Objective-C/Java) the tabstops list is a plain + * sorted array with plain objects. + * + * Placeholders with the same are meant to be linked in your editor. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -5652,8 +5652,8 @@ }); }, { "../utils/common": "utils\\common.js", "./resources": "assets\\resources.js", "./stringStream": "assets\\stringStream.js" }], "assets\\tokenIterator.js": [function (require, module, exports) { /** - * Helper class for convenient token iteration - */ + * Helper class for convenient token iteration + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -5743,31 +5743,31 @@ }); }, {}], "editTree\\base.js": [function (require, module, exports) { /** - * Abstract implementation of edit tree interface. - * Edit tree is a named container of editable “name-value” child elements, - * parsed from source. This container provides convenient methods - * for editing/adding/removing child elements. All these update actions are - * instantly reflected in the source code with respect of formatting. - *

      - * For example, developer can create an edit tree from CSS rule and add or - * remove properties from it–all changes will be immediately reflected in the - * original source. - *

      - * All classes defined in this module should be extended the same way as in - * Backbone framework: using extend method to create new class and - * initialize method to define custom class constructor. - * - * @example - *
      
      -				 * var MyClass = require('editTree/base').EditElement.extend({
      -				 *     initialize: function() {
      -				 *     // constructor code here
      -				 *   }
      -				 * });
      -				 * 
      -				 * var elem = new MyClass(); 
      -				 * 
      - */ + * Abstract implementation of edit tree interface. + * Edit tree is a named container of editable “name-value” child elements, + * parsed from source. This container provides convenient methods + * for editing/adding/removing child elements. All these update actions are + * instantly reflected in the source code with respect of formatting. + *

      + * For example, developer can create an edit tree from CSS rule and add or + * remove properties from it–all changes will be immediately reflected in the + * original source. + *

      + * All classes defined in this module should be extended the same way as in + * Backbone framework: using extend method to create new class and + * initialize method to define custom class constructor. + * + * @example + *
      
      +				* var MyClass = require('editTree/base').EditElement.extend({
      +				*     initialize: function() {
      +				*     // constructor code here
      +				*   }
      +				* });
      +				* 
      +				* var elem = new MyClass(); 
      +				* 
      + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -6219,10 +6219,10 @@ }); }, { "../assets/range": "assets\\range.js", "../utils/common": "utils\\common.js", "../vendor/klass": "vendor\\klass.js" }], "editTree\\css.js": [function (require, module, exports) { /** - * CSS EditTree is a module that can parse a CSS rule into a tree with - * convenient methods for adding, modifying and removing CSS properties. These - * changes can be written back to string with respect of code formatting. - */ + * CSS EditTree is a module that can parse a CSS rule into a tree with + * convenient methods for adding, modifying and removing CSS properties. These + * changes can be written back to string with respect of code formatting. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -6833,10 +6833,10 @@ }); }, { "../assets/range": "assets\\range.js", "../assets/stringStream": "assets\\stringStream.js", "../assets/tokenIterator": "assets\\tokenIterator.js", "../parser/css": "parser\\css.js", "../utils/common": "utils\\common.js", "../utils/cssSections": "utils\\cssSections.js", "./base": "editTree\\base.js" }], "editTree\\xml.js": [function (require, module, exports) { /** - * XML EditTree is a module that can parse an XML/HTML element into a tree with - * convenient methods for adding, modifying and removing attributes. These - * changes can be written back to string with respect of code formatting. - */ + * XML EditTree is a module that can parse an XML/HTML element into a tree with + * convenient methods for adding, modifying and removing attributes. These + * changes can be written back to string with respect of code formatting. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -7123,11 +7123,11 @@ }); }, { "../assets/range": "assets\\range.js", "../parser/xml": "parser\\xml.js", "../utils/common": "utils\\common.js", "./base": "editTree\\base.js" }], "filter\\bem.js": [function (require, module, exports) { /** - * Filter for aiding of writing elements with complex class names as described - * in Yandex's BEM (Block, Element, Modifier) methodology. This filter will - * automatically inherit block and element names from parent elements and insert - * them into child element classes - */ + * Filter for aiding of writing elements with complex class names as described + * in Yandex's BEM (Block, Element, Modifier) methodology. This filter will + * automatically inherit block and element names from parent elements and insert + * them into child element classes + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -7390,8 +7390,8 @@ }, { "../assets/preferences": "assets\\preferences.js", "../utils/abbreviation": "utils\\abbreviation.js", "../utils/common": "utils\\common.js", "./html": "filter\\html.js" }], "filter\\comment.js": [function (require, module, exports) { /** - * Comment important tags (with 'id' and 'class' attributes) - */ + * Comment important tags (with 'id' and 'class' attributes) + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -7500,8 +7500,8 @@ }, { "../assets/preferences": "assets\\preferences.js", "../utils/abbreviation": "utils\\abbreviation.js", "../utils/common": "utils\\common.js", "../utils/template": "utils\\template.js", "./main": "filter\\main.js" }], "filter\\css.js": [function (require, module, exports) { /** - * Filter for outputting CSS and alike - */ + * Filter for outputting CSS and alike + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -7532,8 +7532,8 @@ }); }, {}], "filter\\escape.js": [function (require, module, exports) { /** - * Filter for escaping unsafe XML characters: <, >, & - */ + * Filter for escaping unsafe XML characters: <, >, & + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -7566,12 +7566,12 @@ }); }, {}], "filter\\format.js": [function (require, module, exports) { /** - * Generic formatting filter: creates proper indentation for each tree node, - * placing "%s" placeholder where the actual output should be. You can use - * this filter to preformat tree and then replace %s placeholder to whatever you - * need. This filter should't be called directly from editor as a part - * of abbreviation. - */ + * Generic formatting filter: creates proper indentation for each tree node, + * placing "%s" placeholder where the actual output should be. You can use + * this filter to preformat tree and then replace %s placeholder to whatever you + * need. This filter should't be called directly from editor as a part + * of abbreviation. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -7775,8 +7775,8 @@ }); }, { "../assets/preferences": "assets\\preferences.js", "../assets/resources": "assets\\resources.js", "../utils/abbreviation": "utils\\abbreviation.js", "../utils/common": "utils\\common.js" }], "filter\\haml.js": [function (require, module, exports) { /** - * Filter for producing HAML code from abbreviation. - */ + * Filter for producing HAML code from abbreviation. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -7933,8 +7933,8 @@ }); }, { "../utils/abbreviation": "utils\\abbreviation.js", "../utils/common": "utils\\common.js", "./format": "filter\\format.js" }], "filter\\html.js": [function (require, module, exports) { /** - * Filter that produces HTML tree - */ + * Filter that produces HTML tree + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -8035,8 +8035,8 @@ }); }, { "../assets/tabStops": "assets\\tabStops.js", "../utils/abbreviation": "utils\\abbreviation.js", "../utils/common": "utils\\common.js", "./format": "filter\\format.js" }], "filter\\jade.js": [function (require, module, exports) { /** - * Filter for producing Jade code from abbreviation. - */ + * Filter for producing Jade code from abbreviation. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -8186,10 +8186,10 @@ }); }, { "../assets/profile": "assets\\profile.js", "../assets/tabStops": "assets\\tabStops.js", "../utils/abbreviation": "utils\\abbreviation.js", "../utils/common": "utils\\common.js", "./format": "filter\\format.js" }], "filter\\jsx.js": [function (require, module, exports) { /** - * A filter for React.js (JSX): - * ranames attributes like `class` and `for` - * for proper representation in JSX - */ + * A filter for React.js (JSX): + * ranames attributes like `class` and `for` + * for proper representation in JSX + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -8217,8 +8217,8 @@ }); }, {}], "filter\\main.js": [function (require, module, exports) { /** - * Module for handling filters - */ + * Module for handling filters + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -8342,8 +8342,8 @@ }); }, { "../assets/profile": "assets\\profile.js", "../assets/resources": "assets\\resources.js", "../utils/common": "utils\\common.js", "./bem": "filter\\bem.js", "./comment": "filter\\comment.js", "./css": "filter\\css.js", "./escape": "filter\\escape.js", "./haml": "filter\\haml.js", "./html": "filter\\html.js", "./jade": "filter\\jade.js", "./jsx": "filter\\jsx.js", "./singleLine": "filter\\singleLine.js", "./slim": "filter\\slim.js", "./trim": "filter\\trim.js", "./xsl": "filter\\xsl.js" }], "filter\\singleLine.js": [function (require, module, exports) { /** - * Output abbreviation on a single line (i.e. no line breaks) - */ + * Output abbreviation on a single line (i.e. no line breaks) + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -8377,8 +8377,8 @@ }, { "../utils/abbreviation": "utils\\abbreviation.js" }], "filter\\slim.js": [function (require, module, exports) { /** - * Filter for producing Jade code from abbreviation. - */ + * Filter for producing Jade code from abbreviation. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -8568,11 +8568,11 @@ }); }, { "../assets/preferences": "assets\\preferences.js", "../assets/profile": "assets\\profile.js", "../assets/tabStops": "assets\\tabStops.js", "../utils/abbreviation": "utils\\abbreviation.js", "../utils/common": "utils\\common.js", "./format": "filter\\format.js" }], "filter\\trim.js": [function (require, module, exports) { /** - * Trim filter: removes characters at the beginning of the text - * content that indicates lists: numbers, #, *, -, etc. - * - * Useful for wrapping lists with abbreviation. - */ + * Trim filter: removes characters at the beginning of the text + * content that indicates lists: numbers, #, *, -, etc. + * + * Useful for wrapping lists with abbreviation. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -8608,9 +8608,9 @@ }, { "../assets/preferences": "assets\\preferences.js" }], "filter\\xsl.js": [function (require, module, exports) { /** - * Filter for trimming "select" attributes from some tags that contains - * child elements - */ + * Filter for trimming "select" attributes from some tags that contains + * child elements + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -8647,19 +8647,19 @@ }); }, { "../utils/abbreviation": "utils\\abbreviation.js" }], "generator\\lorem.js": [function (require, module, exports) { /** - * "Lorem ipsum" text generator. Matches lipsum(num)? or - * lorem(num)? abbreviation. - * This code is based on Django's contribution: - * https://code.djangoproject.com/browser/django/trunk/django/contrib/webdesign/lorem_ipsum.py - *

      - * Examples to test:
      - * lipsum – generates 30 words text.
      - * lipsum*6 – generates 6 paragraphs (autowrapped with <p> element) of text.
      - * ol>lipsum10*5 — generates ordered list with 5 list items (autowrapped with <li> tag) - * with text of 10 words on each line.
      - * span*3>lipsum20 – generates 3 paragraphs of 20-words text, each wrapped with <span> element. - * Each paragraph phrase is unique. - */ + * "Lorem ipsum" text generator. Matches lipsum(num)? or + * lorem(num)? abbreviation. + * This code is based on Django's contribution: + * https://code.djangoproject.com/browser/django/trunk/django/contrib/webdesign/lorem_ipsum.py + *

      + * Examples to test:
      + * lipsum – generates 30 words text.
      + * lipsum*6 – generates 6 paragraphs (autowrapped with <p> element) of text.
      + * ol>lipsum10*5 — generates ordered list with 5 list items (autowrapped with <li> tag) + * with text of 10 words on each line.
      + * span*3>lipsum20 – generates 3 paragraphs of 20-words text, each wrapped with <span> element. + * Each paragraph phrase is unique. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -8768,8 +8768,8 @@ prefs.define('lorem.defaultLang', 'en', 'Default language of generated dummy text. Currently, en\ - and ru are supported, but users can add their own syntaxes\ - see docs.'); + and ru are supported, but users can add their own syntaxes\ + see docs.'); prefs.define('lorem.omitCommonPart', false, 'Omit commonly used part (e.g. “Lorem ipsum dolor sit amet“) from generated text.'); @@ -8935,17 +8935,17 @@ }, { "../assets/preferences": "assets\\preferences.js" }], "parser\\abbreviation.js": [function (require, module, exports) { /** - * Emmet abbreviation parser. - * Takes string abbreviation and recursively parses it into a tree. The parsed - * tree can be transformed into a string representation with - * toString() method. Note that string representation is defined - * by custom processors (called filters), not by abbreviation parser - * itself. - * - * This module can be extended with custom pre-/post-processors to shape-up - * final tree or its representation. Actually, many features of abbreviation - * engine are defined in other modules as tree processors - */ + * Emmet abbreviation parser. + * Takes string abbreviation and recursively parses it into a tree. The parsed + * tree can be transformed into a string representation with + * toString() method. Note that string representation is defined + * by custom processors (called filters), not by abbreviation parser + * itself. + * + * This module can be extended with custom pre-/post-processors to shape-up + * final tree or its representation. Actually, many features of abbreviation + * engine are defined in other modules as tree processors + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -10419,11 +10419,11 @@ }); }, {}], "parser\\processor\\attributes.js": [function (require, module, exports) { /** - * Resolves node attribute names: moves `default` attribute value - * from stub to real attribute. - * - * This resolver should be applied *after* resource matcher - */ + * Resolves node attribute names: moves `default` attribute value + * from stub to real attribute. + * + * This resolver should be applied *after* resource matcher + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -10501,10 +10501,10 @@ }); }, { "../../utils/common": "utils\\common.js" }], "parser\\processor\\href.js": [function (require, module, exports) { /** - * A preptocessor for <a> tag: tests wrapped content - * for common URL patterns and, if matched, inserts it as - * `href` attribute - */ + * A preptocessor for <a> tag: tests wrapped content + * for common URL patterns and, if matched, inserts it as + * `href` attribute + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -10518,17 +10518,17 @@ prefs.define('href.autodetect', true, 'Enables or disables automatic URL recognition when wrapping\ - text with <a> tag. With this option enabled,\ - if wrapped text matches URL or e-mail pattern it will be automatically\ - inserted into href attribute.'); + text with <a> tag. With this option enabled,\ + if wrapped text matches URL or e-mail pattern it will be automatically\ + inserted into href attribute.'); prefs.define('href.urlPattern', '^(?:(?:https?|ftp|file)://|www\\.|ftp\\.)(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[A-Z0-9+&@#/%=~_|$])', 'RegExp pattern to match wrapped URLs. Matched content will be inserts\ - as-is into href attribute, only whitespace will be trimmed.'); + as-is into href attribute, only whitespace will be trimmed.'); prefs.define('href.emailPattern', '^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,5}$', 'RegExp pattern to match wrapped e-mails. Unlike href.urlPattern,\ - wrapped content will be prefixed with mailto: in href\ - attribute'); + wrapped content will be prefixed with mailto: in href\ + attribute'); return { /** @@ -10568,10 +10568,10 @@ }); }, { "../../assets/preferences": "assets\\preferences.js", "../../utils/common": "utils\\common.js", "./pastedContent": "parser\\processor\\pastedContent.js" }], "parser\\processor\\pastedContent.js": [function (require, module, exports) { /** - * Pasted content abbreviation processor. A pasted content is a content that - * should be inserted into implicitly repeated abbreviation nodes. - * This processor powers “Wrap With Abbreviation” action - */ + * Pasted content abbreviation processor. A pasted content is a content that + * should be inserted into implicitly repeated abbreviation nodes. + * This processor powers “Wrap With Abbreviation” action + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -10736,9 +10736,9 @@ }); }, { "../../assets/range": "assets\\range.js", "../../assets/stringStream": "assets\\stringStream.js", "../../utils/abbreviation": "utils\\abbreviation.js", "../../utils/common": "utils\\common.js" }], "parser\\processor\\resourceMatcher.js": [function (require, module, exports) { /** - * Processor function that matches parsed AbbreviationNode - * against resources defined in resource module - */ + * Processor function that matches parsed AbbreviationNode + * against resources defined in resource module + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -10840,8 +10840,8 @@ }); }, { "../../assets/elements": "assets\\elements.js", "../../assets/resources": "assets\\resources.js", "../../utils/abbreviation": "utils\\abbreviation.js", "../../utils/common": "utils\\common.js" }], "parser\\processor\\tagName.js": [function (require, module, exports) { /** - * Resolves tag names in abbreviations with implied name - */ + * Resolves tag names in abbreviations with implied name + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -10873,13 +10873,13 @@ }); }, { "../../resolver/tagName": "resolver\\tagName.js" }], "parser\\xml.js": [function (require, module, exports) { /** - * HTML tokenizer by Marijn Haverbeke - * http://codemirror.net/ - * @constructor - * @memberOf __xmlParseDefine - * @param {Function} require - * @param {Underscore} _ - */ + * HTML tokenizer by Marijn Haverbeke + * http://codemirror.net/ + * @constructor + * @memberOf __xmlParseDefine + * @param {Function} require + * @param {Underscore} _ + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -11216,19 +11216,19 @@ }, { "../assets/stringStream": "assets\\stringStream.js" }], "plugin\\file.js": [function (require, module, exports) { /** - * Module for working with file. Shall implement - * IEmmetFile interface. - * - * Since implementation of this module depends - * greatly on current runtime, this module must be - * initialized with actual implementation first - * before use. E.g. - * require('./plugin/file')({ - * read: function() {...} - * }) - * - * By default, this module provides Node.JS implementation - */ + * Module for working with file. Shall implement + * IEmmetFile interface. + * + * Since implementation of this module depends + * greatly on current runtime, this module must be + * initialized with actual implementation first + * before use. E.g. + * require('./plugin/file')({ + * read: function() {...} + * }) + * + * By default, this module provides Node.JS implementation + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { @@ -11439,49 +11439,49 @@ }, { "../utils/common": "utils\\common.js" }], "resolver\\css.js": [function (require, module, exports) { /** - * Resolver for fast CSS typing. Handles abbreviations with the following - * notation:
      - * - * (-vendor prefix)?property(value)*(!)? - * - *

      - * Abbreviation handling
      - * - * By default, Emmet searches for matching snippet definition for provided abbreviation. - * If snippet wasn't found, Emmet automatically generates element with - * abbreviation's name. For example, foo abbreviation will generate - * <foo></foo> output. - *

      - * This module will capture all expanded properties and upgrade them with values, - * vendor prefixes and !important declarations. All unmatched abbreviations will - * be automatically transformed into property-name: ${1} snippets. - * - * Vendor prefixes
      - * - * If CSS-property is preceded with dash, resolver should output property with - * all known vendor prefixes. For example, if brad - * abbreviation generates border-radius: ${value}; snippet, - * the -brad abbreviation should generate: - *
      
      -				 * -webkit-border-radius: ${value};
      -				 * -moz-border-radius: ${value};
      -				 * border-radius: ${value};
      -				 * 
      - * Note that o and ms prefixes are omitted since Opera and IE - * supports unprefixed property.

      - * - * Users can also provide an explicit list of one-character prefixes for any - * CSS property. For example, -wm-float will produce - * - *
      
      -				 * -webkit-float: ${1};
      -				 * -moz-float: ${1};
      -				 * float: ${1};
      -				 * 
      - * - * Although this example looks pointless, users can use this feature to write - * cutting-edge properties implemented by browser vendors recently. - */ + * Resolver for fast CSS typing. Handles abbreviations with the following + * notation:
      + * + * (-vendor prefix)?property(value)*(!)? + * + *

      + * Abbreviation handling
      + * + * By default, Emmet searches for matching snippet definition for provided abbreviation. + * If snippet wasn't found, Emmet automatically generates element with + * abbreviation's name. For example, foo abbreviation will generate + * <foo></foo> output. + *

      + * This module will capture all expanded properties and upgrade them with values, + * vendor prefixes and !important declarations. All unmatched abbreviations will + * be automatically transformed into property-name: ${1} snippets. + * + * Vendor prefixes
      + * + * If CSS-property is preceded with dash, resolver should output property with + * all known vendor prefixes. For example, if brad + * abbreviation generates border-radius: ${value}; snippet, + * the -brad abbreviation should generate: + *
      
      +				* -webkit-border-radius: ${value};
      +				* -moz-border-radius: ${value};
      +				* border-radius: ${value};
      +				* 
      + * Note that o and ms prefixes are omitted since Opera and IE + * supports unprefixed property.

      + * + * Users can also provide an explicit list of one-character prefixes for any + * CSS property. For example, -wm-float will produce + * + *
      
      +				* -webkit-float: ${1};
      +				* -moz-float: ${1};
      +				* float: ${1};
      +				* 
      + * + * Although this example looks pointless, users can use this feature to write + * cutting-edge properties implemented by browser vendors recently. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -12378,9 +12378,9 @@ }); }, { "../assets/caniuse": "assets\\caniuse.js", "../assets/preferences": "assets\\preferences.js", "../assets/resources": "assets\\resources.js", "../assets/stringStream": "assets\\stringStream.js", "../editTree/css": "editTree\\css.js", "../utils/common": "utils\\common.js", "../utils/template": "utils\\template.js" }], "resolver\\cssGradient.js": [function (require, module, exports) { /** - * 'Expand Abbreviation' handler that parses gradient definition from under - * cursor and updates CSS rule with vendor-prefixed values. - */ + * 'Expand Abbreviation' handler that parses gradient definition from under + * cursor and updates CSS rule with vendor-prefixed values. + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -12898,8 +12898,8 @@ }); }, { "../assets/preferences": "assets\\preferences.js", "../assets/range": "assets\\range.js", "../assets/resources": "assets\\resources.js", "../assets/stringStream": "assets\\stringStream.js", "../editTree/css": "editTree\\css.js", "../utils/common": "utils\\common.js", "../utils/editor": "utils\\editor.js", "./css": "resolver\\css.js", "./gradient/linear": "resolver\\gradient\\linear.js" }], "resolver\\gradient\\linear.js": [function (require, module, exports) { /** - * CSS linear gradient definition - */ + * CSS linear gradient definition + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -13233,10 +13233,10 @@ }); }, { "../../assets/stringStream": "assets\\stringStream.js", "../../utils/common": "utils\\common.js" }], "resolver\\tagName.js": [function (require, module, exports) { /** - * Module for resolving tag names: returns best matched tag name for child - * element based on passed parent's tag name. Also provides utility function - * for element type detection (inline, block-level, empty) - */ + * Module for resolving tag names: returns best matched tag name for child + * element based on passed parent's tag name. Also provides utility function + * for element type detection (inline, block-level, empty) + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -14412,10 +14412,10 @@ }, {}], "utils\\abbreviation.js": [function (require, module, exports) { /** - * Utility functions to work with AbbreviationNode as HTML element - * @param {Function} require - * @param {Underscore} _ - */ + * Utility functions to work with AbbreviationNode as HTML element + * @param {Function} require + * @param {Underscore} _ + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -14532,9 +14532,9 @@ }); }, { "../assets/elements": "assets\\elements.js", "../assets/tabStops": "assets\\tabStops.js", "../resolver/tagName": "resolver\\tagName.js", "../utils/common": "utils\\common.js" }], "utils\\action.js": [function (require, module, exports) { /** - * Utility methods for Emmet actions - * @author Sergey Chikuyonok (serge.che@gmail.com) - */ + * Utility methods for Emmet actions + * @author Sergey Chikuyonok (serge.che@gmail.com) + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -14872,9 +14872,9 @@ }); }, { "../assets/htmlMatcher": "assets\\htmlMatcher.js", "../assets/range": "assets\\range.js", "../assets/resources": "assets\\resources.js", "../editTree/xml": "editTree\\xml.js", "../parser/abbreviation": "parser\\abbreviation.js", "./common": "utils\\common.js", "./cssSections": "utils\\cssSections.js" }], "utils\\base64.js": [function (require, module, exports) { /** - * @author Sergey Chikuyonok (serge.che@gmail.com) - * @link http://chikuyonok.ru - */ + * @author Sergey Chikuyonok (serge.che@gmail.com) + * @link http://chikuyonok.ru + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -14967,9 +14967,9 @@ }); }, {}], "utils\\comments.js": [function (require, module, exports) { /** - * Utility module for working with comments in source code - * (mostly stripping it from source) - */ + * Utility module for working with comments in source code + * (mostly stripping it from source) + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -15035,8 +15035,8 @@ }); }, { "../assets/range": "assets\\range.js", "../assets/stringStream": "assets\\stringStream.js", "./common": "utils\\common.js" }], "utils\\common.js": [function (require, module, exports) { /** - * Common utility helper for Emmet - */ + * Common utility helper for Emmet + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -16254,9 +16254,9 @@ }); }, { "../assets/htmlMatcher": "assets\\htmlMatcher.js", "../assets/range": "assets\\range.js", "../assets/stringStream": "assets\\stringStream.js", "../editTree/xml": "editTree\\xml.js", "../parser/css": "parser\\css.js", "./comments": "utils\\comments.js", "./common": "utils\\common.js" }], "utils\\editor.js": [function (require, module, exports) { /** - * Utility module used to prepare text for pasting into back-end editor - * @author Sergey Chikuyonok (serge.che@gmail.com) - */ + * Utility module used to prepare text for pasting into back-end editor + * @author Sergey Chikuyonok (serge.che@gmail.com) + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -16380,12 +16380,12 @@ define(function (require, exports, module) { /* Source: https://github.com/silentmatt/js-expression-eval - + Based on ndef.parser, by Raphael Graf(r@undefined.ch) http://www.undefined.ch/mparser/index.html - + Ported to JavaScript and modified by Matthew Crumley (email@matthewcrumley.com, http://silentmatt.com/) - + You are free to use and modify this code in anyway you find useful. Please leave this comment in the code to acknowledge its original source. If you feel like it, I enjoy hearing about projects that use my code, but don't feel like you have to let me know or ask permission. @@ -17285,10 +17285,10 @@ }); }, {}], "utils\\template.js": [function (require, module, exports) { /** - * A very simple, ERB-style templating. Basically, just as string substitution. - * The reason to not use default Lo-dash’es `_.template()` implementation - * is because it fails to run in CSP-enabled environments (Chrome extension, Atom) - */ + * A very simple, ERB-style templating. Basically, just as string substitution. + * The reason to not use default Lo-dash’es `_.template()` implementation + * is because it fails to run in CSP-enabled environments (Chrome extension, Atom) + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); @@ -17470,23 +17470,23 @@ }); }, { "../utils/common": "utils\\common.js" }], "vendor\\stringScore.js": [function (require, module, exports) { /*! - * string_score.js: String Scoring Algorithm 0.1.10 - * - * http://joshaven.com/string_score - * https://github.com/joshaven/string_score - * - * Copyright (C) 2009-2011 Joshaven Potter - * Special thanks to all of the contributors listed here https://github.com/joshaven/string_score - * MIT license: http://www.opensource.org/licenses/mit-license.php - * - * Date: Tue Mar 1 2011 + * string_score.js: String Scoring Algorithm 0.1.10 + * + * http://joshaven.com/string_score + * https://github.com/joshaven/string_score + * + * Copyright (C) 2009-2011 Joshaven Potter + * Special thanks to all of the contributors listed here https://github.com/joshaven/string_score + * MIT license: http://www.opensource.org/licenses/mit-license.php + * + * Date: Tue Mar 1 2011 */ /** - * Scores a string against another string. - * 'Hello World'.score('he'); //=> 0.5931818181818181 - * 'Hello World'.score('Hello'); //=> 0.7318181818181818 - */ + * Scores a string against another string. + * 'Hello World'.score('he'); //=> 0.5931818181818181 + * 'Hello World'.score('Hello'); //=> 0.7318181818181818 + */ if (typeof module === 'object' && typeof define !== 'function') { var define = function (factory) { module.exports = factory(require, exports, module); diff --git a/www/lang/ar-ye.json b/www/lang/ar-ye.json deleted file mode 100644 index 6faf10801..000000000 --- a/www/lang/ar-ye.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "(by Basel Al_hajeri) العربية", - "about": "حول", - "active files": "الملفات مفتوحة", - "add path": "إضافة مسار", - "alert": "تنبية", - "app theme": "لون التطبيق", - "autocorrect": "تفعيل التصحيح التلقائي؟", - "autosave": "حفظ تلقائي", - "beautify on save": "تجميل الكود عند الحفظ", - "cancel": "إلغاء", - "change language": "تغيير اللغة", - "choose color": "إختر لون", - "clear": "مسح", - "close app": "إغلاق التطبيق؟", - "commit message": "رسالة commit", - "console": "موجه الأوامر", - "conflict error": "خطأ! انتضر رجاءاً قبل القيام بcommit آخر.", - "copy": "نسخ", - "create folder error": "فشلت إنشاء مجلد جديد", - "cut": "قص", - "delete": "حذف", - "delete {name}": "حذف {name}؟", - "dependencies": "متطلبات", - "delay": "الوقت بالمللي ثانية", - "editor settings": "إعدادات المحرر", - "editor theme": "لون المحرر", - "enter file name": "أدخل إسم الملف", - "enter folder name": "أدخل إسم المجلد", - "empty folder message": "مجلد فارغ", - "enter line number": "أدخل رقم السطر", - "error": "خطأ", - "except": "تجاوز", - "failed": "فشل", - "file already exists": "الملف موجود مسبقاً", - "file already exists force": "الملف موجود مسبقاً ، إستبدال؟", - "file changed": "الملف قد تغيّر، هل تريد إعادة التحميل؟", - "file deleted": "تم الحذف", - "file is not supported": "الملف غير مدعوم", - "file not supported": "نوع الملف غير مدعوم", - "file too large": "{size} الملف كبير جداً.أكبر حجم مسموح به هو", - "file renamed": "نجحت التسمية", - "file saved": "تم الحفظ", - "folder added": "تمت إضافة الملف", - "folder already added": "المجلد مضافٌ مسبقاً!", - "font size": "حجم الخط", - "goto": "الذهاب الى السطر", - "icons definition": "تعريف الايقونات", - "info": "تفاصيل", - "invalid value": "قيمة غير صالحة", - "language changed": "تم تغيير اللغة بنجاح", - "linting": "فحص سينتاكس الجمل", - "logout": "تسجيل الخروج", - "loading": "جارِ التحميل", - "my profile": "ملفي الشخصي", - "new file": "ملف جديد", - "new folder": "مجلد جديد", - "no": "لا", - "no editor message": "إفتح أو إنشئ ملف و مجلد من القائمة", - "not set": "غير محدد", - "unsaved files close app": "هناك ملفات لم يتم حفظها.هل أنت متأكد من الخروج؟", - "notice": "ملاحظة", - "open file": "فتح ملف", - "open files and folders": "فتح ملفات و مجلدات", - "open folder": "فتح مجلد", - "open recent": "ملفات فتحت مؤخراً", - "ok": "حسناً", - "overwrite": "استبدال", - "paste": "لصق", - "preview mode": "وضعية المعاينة", - "read only file": "فشل حفظ الملف لإنة قرأة فقط.حاول أن تحفظة بأسم", - "reload": "إعادة تحميل", - "rename": "إعادة تسمية", - "replace": "إستبدال", - "required": "هذا الحقل مطلوب.", - "run your web app": "تشغيل تطبيق التصفح", - "save": "حفظ", - "saving": "جارِ الحفظ", - "save as": "حفظ بأسم", - "save file to run": "يرجى حفظ الملف حتى يمكن تشغيلة بالمتصفح!", - "save here": "حفظ هنا", - "search": "بحث", - "see logs and errors": "شاهد السجلات و الأخطاء", - "select folder": "تحديد مجلد", - "settings": "الإعدادات", - "settings saved": "تم حفظ الإعدادات", - "show line numbers": "عرض ارقام الأسطر", - "show hidden files": "عرض الملفات المخفية", - "show spaces": "عرض المسافات", - "soft tab": "تبويب سلس", - "sort by name": "الترتيب بواسطة الإسم؟", - "success": "نجاح", - "tab size": "حجم تبويبات", - "text wrap": "حصر ضمن الشاشة؟", - "theme": "الألوان", - "unable to delete file": " عذرا، فشل حذف هذا الملف", - "unable to open file": " عذرا، فشل فتح هذا الملف", - "unable to open folder": " عذرا، فشل فتح المجلد", - "unable to save file": " عذرا، فشل حفظ الملف", - "unable to rename": "عذرا، عذرا، فشل إعادة التسمية", - "unsaved file": "هذا الملف لم يحفظ، إغلاق؟", - "warning": "تحذير", - "use emmet": "إستخدم emmet", - "use quick tools": "إستخدم الأدوات السريعة", - "yes": "نعم", - "github": "GitHub", - "encoding": "الترميز", - "syntax highlighting": "تلوينات الsyntax للغة المفتوحة", - "read only": "قرأة فقط", - "select all": "تحديد الكل", - "select branch": "حدد فرع(branch)", - "create new branch": "إنشاء فرع جديد", - "use branch": "إستخدام الفرع", - "new branch": "فرع جديد", - "branch": "فرع", - "key bindings": "الربط الخاص بالمفاتيح", - "edit": "تعديل", - "reset": "اعادة ضبط", - "color": "اللون", - "select word": "حدد كلمة", - "quick tools": "الأدوات السريعة", - "select": "أختر", - "editor font": "نوعية الخط", - "new project": "مشروع جديد", - "format": "صيغة", - "project name": "اسم المشروع", - "unsupported device": "جهازك لا يدعم اللون.", - "vibrate on tap": "الاهتزاز عند الضغط", - "copy command is not supported by ftp.": "الأمر النسخ ليس مدعوماً من طرف FTP.", - "support title": "تبرع لتطبيق Acode", - "exit fullscreen": "الخروج من الشاشة الكاملة", - "fullscreen": "شاشة كاملة", - "animation": "تحركات الشاشة", - "backup": "نسخ إحتياطي", - "restore": "إستعادة", - "backup successful": "تم النسخ الإحتياطي بنجاح", - "invalid backup file": "الملف الإحتياطي غير صالح", - "backup file found": "تم العثور على ملف النسخ الإحتياطي هل تريد الإستعادة؟", - "welcome back": "مرحباً بك من جديد", - "live autocompletion": "إكمال تلقائي مباشر", - "file properties": "تفاصيل الملف", - "path": "مسار", - "type": "النوع", - "word count": "عدد الكلمات", - "line count": "عدد الأسطر", - "last modified": "آخر تعديل", - "size": "الحجم", - "share": "مشاركة", - "sdcard found": "External storage found! Do you want to add it?", - "allow storage": "Give permission to access your external storage?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/be-by.json b/www/lang/be-by.json deleted file mode 100644 index ec5c52091..000000000 --- a/www/lang/be-by.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Беларуская", - "about": "пра праграму", - "active files": "Адкрытыя файлы", - "alert": "папярэджанне", - "app theme": "Тэма праграмы", - "autocorrect": "Уключыць аўтазамену?", - "autosave": "аўтазахаванне", - "beautify on save": "Выкарыстоўваць пашырэнні пры захаванні", - "cancel": "скасаваць", - "change language": "Змяніць мову", - "choose color": "Абраць колер", - "clear": "ачысціць", - "close app": "закрыць праграму?", - "commit message": "унесці паведамленне", - "console": "кансоль", - "conflict error": "Канфлікт! Калі ласка, пачакайце, перш чым зрабіць унёсак.", - "copy": "капіяваць", - "create folder error": "Выбачайце, не атрымалася стварыць новы каталог", - "cut": "выразаць", - "delete": "Выдаліць", - "delete {name}": "Выдаліць \"{name}\"?", - "dependencies": "Залежнасці", - "delay": "Час у мілісекундах", - "editor settings": "Налады рэдактара", - "editor theme": "Тэма рэдактара", - "enter file name": "Увядзіце назву файла", - "enter folder name": "Увядзіце назву каталога", - "empty folder message": "Пусты каталог", - "enter line number": "Увядзіце нумар радка", - "error": "памылка", - "except": "выключэнне", - "failed": "памылка", - "file already exists": "Файл ужо існуе", - "file already exists force": "Файл ужо існуе. Перазапісаць?", - "file changed": " быў зменены, перазагрузіць файл?", - "file deleted": "файл выдалены", - "file is not supported": "файл не падтрымліваецца", - "file not supported": "Файлы гэтага тыпу не падтрымліваюцца.", - "file too large": "Файл занадта вялікі. Максімальны памер {size}", - "file renamed": "назва файла змененая", - "file saved": "файл захаваны", - "folder added": "каталог дададзены", - "folder already added": "каталог ужо дададзены", - "font size": "Памер шрыфту", - "goto": "Перайсці да радка", - "icons definition": "Вызначэнне значкоў", - "info": "інфармацыя", - "invalid value": "Хібнае значэнне", - "language changed": "мова паспяхова змененая", - "linting": "Правяраць сінтаксічныя памылкі", - "logout": "Выйсці", - "loading": "Загрузка", - "my profile": "Мой профіль", - "new file": "Новы файл", - "new folder": "Новы каталог", - "no": "Не", - "no editor message": "Адкрыйце альбо стварыце новы файл", - "not set": "Не вызначана", - "unsaved files close app": "Ёсць незахаваныя файлы. Закрыць праграму?", - "notice": "Папярэджанне", - "open file": "Адкрыць файл", - "open files and folders": "Адкрытыя файлы і каталогі", - "open folder": "Адкрыць каталог", - "open recent": "Адкрыць нядаўнія", - "ok": "добра", - "overwrite": "перазапісаць", - "paste": "уставіць", - "preview mode": "Рэжым папярэдняга прагляду", - "read only file": "Файл адкрыты толькі для чытання", - "reload": "перазагрузіць", - "rename": "змяніць назву", - "replace": "замяніць", - "required": "гэтае поле абавязковае", - "run your web app": "Запусціць сеціўную праграму", - "save": "захаваць", - "saving": "захаванне", - "save as": "Захаваць як", - "save file to run": "Калі ласка, захавайце файл для запуску ў браўзеры", - "save here": "Захаваць тут", - "search": "пошук", - "see logs and errors": "Праглядзець журналы і памылкі", - "select folder": "Абраць каталог", - "settings": "налады", - "settings saved": "Налады захаваныя", - "show line numbers": "Паказваць нумары радкоў", - "show hidden files": "Паказваць схаваныя файлы", - "show spaces": "Паказваць прагалы", - "soft tab": "Мяккая ўкладка", - "sort by name": "Сартаваць па назве", - "success": "паспяхова", - "tab size": "Памер укладкі", - "text wrap": "Перанос тэксту", - "theme": "тэма", - "unable to delete file": "немагчыма выдаліць файл", - "unable to open file": "Выбачайце, файл немагчыма адкрыць", - "unable to open folder": "Выбачайце, каталог немагчыма адкрыць", - "unable to save file": "Выбачайце, файл немагчыма захаваць", - "unable to rename": "Выбачайце, немагчыма змяніць назву", - "unsaved file": "Файл не захаваны, усё адно закрыць?", - "warning": "папярэджанне", - "use emmet": "Выкарыстоўваць emmet", - "use quick tools": "Выкарыстоўваць хуткія інструменты", - "yes": "так", - "github": "GitHub", - "encoding": "Кадаванне", - "syntax highlighting": "Падсвятленне сінтаксісу", - "read only": "Толькі чытанне", - "select all": "абраць усе", - "select branch": "Абраць галіну", - "create new branch": "Стварыць новую галіну", - "use branch": "Выкарыстоўваць галіну", - "new branch": "Новая галіна", - "branch": "галіна", - "key bindings": "Прывязка клавіш", - "edit": "рэдагаваць", - "reset": "скінуць", - "color": "колер", - "select word": "Абраць слова", - "quick tools": "Хуткія інструменты", - "select": "абраць", - "editor font": "Шрыфт рэдактара", - "new project": "Новы праект", - "format": "фармат", - "project name": "Назва праекта", - "unsupported device": "Ваша прылада не падтрымлівае тэмы.", - "vibrate on tap": "Вібрацыя пры націсканні", - "copy command is not supported by ftp.": "Капіяванне не падтрымліваецца для FTP.", - "support title": "Падтрымка Acode", - "exit fullscreen": "Выйсці з поўнаэкраннага рэжыму", - "fullscreen": "поўнаэкранны рэжым", - "animation": "анімацыя", - "backup": "рэзервовае капіяванне", - "restore": "аднаўленне", - "backup successful": "Рэзервовая копія паспяхова створаная", - "invalid backup file": "Не атрымалася стварыць рэзервовую копію", - "backup file found": "Знойдзены файл рэзервовай копіі. Хочаце аднавіць налады, прывязкі клавіш і акаўнты ftp з файла рэзервовай копіі?", - "welcome back": "Вітаем", - "add path": "Дадаць шлях", - "live autocompletion": "Імгненнае аўтазавяршэнне", - "file properties": "Уласцівасці файла", - "path": "Шлях", - "type": "Тып", - "word count": "Колькасць слоў", - "line count": "Колькасць радкоў", - "last modified": "Апошняя змена", - "size": "Памер", - "share": "Падзяліцца", - "sdcard found": "Выяўлена вонкавае сховішча! Хочаце дадаць?", - "allow storage": "Даць дазвол на доступ да вонкавага сховішча?", - "show print margin": "Паказаць поле друку", - "login": "уваход", - "scrollbar size": "Памер паласы пракруткі", - "cursor controller size": "Памер курсора", - "none": "няма", - "small": "маленькі", - "large": "вялікі", - "floating button": "Выплыўная панэль кнопак", - "confirm on exit": "Пацвярджэнне выхаду", - "other settings": "Іншыя налады", - "show console": "Паказваць кансоль", - "image": "Выява", - "insert file": "Уставіць файл", - "insert color": "Уставіць колер", - "powersave mode warning": "Для папярэдняга прагляду ў вонкавым браўзеры адключыце рэжым энергазберажэння.", - "exit": "Выйсці", - "custom": "адвольна", - "reset warning": "Сапраўды хочаце скінуць тэму?", - "theme type": "Тып тэмы", - "light": "светлая", - "dark": "цёмная", - "file browser": "Агляд файлаў", - "operation not permitted": "Аперацыя забароненая", - "no such file or directory": "Такі файл альбо каталог не існуе", - "input/output error": "Памылка ўводу/вываду", - "permission denied": "Доступ забаронены", - "bad address": "Няправільны адрас", - "file exists": "Файл існуе", - "not a directory": "Гэта не каталог", - "is a directory": "Гэта каталог", - "invalid argument": "Хібны аргумент", - "too many open files in system": "Занадта шмат адкрытых файлаў у сістэме", - "too many open files": "Занадта шмат адкрытых файлаў", - "text file busy": "Тэкставы файл заняты", - "no space left on device": "На прыладзе скончылася вольнае месца", - "read-only file system": "Файлавая сістэма даступная толькі для чытання", - "file name too long": "Назва файла занадта доўгая", - "too many users": "Занадта шмат карыстальнікаў", - "connection timed out": "Час чакання злучэння сышоў", - "connection refused": "Злучэнне адкінута", - "owner died": "Уладальнік знік", - "an error occurred": "Адбылася памылка", - "add ftp": "Дадаць FTP", - "add sftp": "Дадаць SFTP", - "save file": "Захаваць файл", - "save file as": "Захаваць файл як", - "files": "Файлы", - "help": "Даведка", - "support me": "Падтрымайце мяне", - "connecting": "Злучэнне", - "file has been deleted": "{file} выдалены!", - "feature not available": "Гэтая функцыя даступная толькі для ў платнай версіі праграмы.", - "deleted file": "Выдалены файл", - "line height": "Вышыня радка", - "preview info": "Калі вы хочаце запусціць актыўны файл, націсніце і ўтрымлівайце значок прайгравання.", - "manage all files": "Дазвольце Acode кіраваць усімі файламі ў наладах, каб праграма мела магчымасць рэдагаваць файлы.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/bn-bd.json b/www/lang/bn-bd.json deleted file mode 100644 index 1b4b5cbac..000000000 --- a/www/lang/bn-bd.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "বাংলা", - "about": "সম্পর্কে", - "active files": "সক্রিয় ফাইল", - "alert": "সতর্কীকরণ", - "app theme": "অ্যাপ থীম", - "autocorrect": " অটো কারেক্ট সক্রীয় করুন?", - "autosave": "অটো সংরক্ষণ", - "beautify on save": "সংরক্ষণে সৌন্দর্য্যবৃদ্ধী", - "cancel": "বাতিল করুন", - "change language": "ভাষা বদলান", - "choose color": "কালার পছন্দ করুন", - "clear": "মুছে ফেলুন", - "close app": "অ্যাপটি বন্ধ করুন?", - "commit message": "Commit message", - "console": "কনসোল", - "conflict error": "Conflict! Please wait before another commit.", - "copy": " কপি", - "create folder error": "দুঃখিত, ফোল্ডার তৈরী করতে অসমর্থ", - "cut": "কাট", - "delete": "ডিলেট", - "delete {name}": "ডিলেট {name}?", - "dependencies": "নির্ভরতা", - "delay": "মিলিসেকেন্ডে সময়", - "editor settings": "সম্পাদক সেটিংস", - "editor theme": "সম্পাদক থীম", - "enter file name": "ফাইল এর নাম লিখুন", - "enter folder name": "ফোল্ডার এর নাম লিখুন", - "empty folder message": "ফাঁকা ফোল্ডার এর বার্তা", - "enter line number": "লাইন নম্বর লিখুন", - "error": "ত্রুটি", - "except": "ব্যতীত", - "failed": "ব্যার্থ", - "file already exists": "ফাইলটি বিদ্যমান", - "file already exists force": "ফাইলটি বিদ্যমান. ওভার রাইট?", - "file changed": "ফাইলটি পরিবর্তিত হয়েছে, আবার লোড করুন?", - "file deleted": "ফাইল ডিলেটেড ", - "file is not supported": "ফাইল অসমর্থিত", - "file not supported": "এই ধরনের ফাইল অসমর্থিত", - "file too large": "ফাইলটি তুলনামূকভাবে বড়। সর্বোচ্চ অনুমোদিত সাইজ হচ্ছে {size}", - "file renamed": "ফাইল এর নাম পরিবর্তিত হয়েছে", - "file saved": "ফাইল সংরক্ষিত", - "folder added": "ফোল্ডার যোগ হয়েছে", - "folder already added": "ফোল্ডারটি আগেই সংযোজিত", - "font size": "ফন্টের আকার", - "goto": "লাইনে যান", - "icons definition": "প্রতীক বিবরন", - "info": "তথ্য", - "invalid value": "অকার্যকর মান", - "language changed": "সফলভাবে ভাষা পরিবর্তন হয়েছে", - "linting": "সিনট্যাক্স চেক করুন", - "logout": "লগ আউট", - "loading": "লোড হচ্ছে", - "my profile": "আমার প্রোফাইল", - "new file": "নতুন ফাইল", - "new folder": "নতুন ফোল্ডার", - "no": "না", - "no editor message": "মেনু থেকে নতুন ফাইল বা ফোল্ডার খুলুন বা তৈরি করুন", - "not set": "নির্দিষ্ট করা নেই", - "unsaved files close app": "অসংরক্ষিত ফাইল বিদ্যমান। অ্যাপ বন্ধ করবেন?", - "notice": "বিজ্ঞপ্তি", - "open file": "ফাইল খুলুন", - "open files and folders": "ফাইল এবং ফোল্ডার খুলুন", - "open folder": "ফোল্ডার খুলুন", - "open recent": "সাম্প্রতিক ফাইল", - "ok": "ঠিক আছে", - "overwrite": "ওভাররাইট", - "paste": "পেস্ট", - "preview mode": "প্রদর্শন মোড", - "read only file": "রিড অনলি ফাইল সংরক্ষণে অসমর্থ। অনুগ্রপূর্বক save as করুন", - "reload": "পুনরায় লোড করুন", - "rename": "পুণ: নামকরন", - "replace": "প্রতিস্থাপন", - "required": "এই ফিল্ডটি প্রয়োজনীয়", - "run your web app": "আপনার ওয়েব অ্যাপ রান করুন", - "save": "সংরক্ষণ করুন", - "saving": "সংরক্ষিত হচ্ছে", - "save as": "সংরক্ষণের ধরন", - "save file to run": "অনুগ্রহ পূর্বক ব্রাউজারে রান করানোর আগে ফাইল টি সংরক্ষণ করুন", - "save here": "এখানে সংরক্ষণ করুন", - "search": "খুঁজুন", - "see logs and errors": "logs এবং ভুল গুলো দেখুন", - "select folder": "ফোল্ডার নির্বাচন করুন", - "settings": "সেটিংস", - "settings saved": "সেটিংস সংরক্ষিত হয়েছে", - "show line numbers": "লাইন নাম্বার দেখান", - "show hidden files": "লুকায়িত ফাইলগুলো দেখুন", - "show spaces": "ফাকাগুলি দেখুন", - "soft tab": "Soft tab", - "sort by name": "নাম অনুসারে সাজান", - "success": "সফল", - "tab size": "ট্যাব আকার", - "text wrap": "টেক্সট মোড়ান /wrap", - "theme": "থীম", - "unable to delete file": "ডিলেট করতে অসমর্থ", - "unable to open file": "দুঃখিত, ফাইলটি খুলতে ব্যার্থ", - "unable to open folder": "দুঃখিত, ফোল্ডার খুলতে ব্যার্থ", - "unable to save file": "দুঃখিত, ফাইলটি সংরক্ষণে ব্যার্থ", - "unable to rename": "দুঃখিত, পুন: নামকরনে ব্যার্থ", - "unsaved file": "ফাইলটি সংরক্ষণ করা হইনি, তাও বন্ধ করবেন?", - "warning": "সতর্ক বাণী", - "use emmet": "emmet ব্যবহার করুন", - "use quick tools": "quick tools ব্যবহার করুন", - "yes": "হ্যা", - "github": "GitHub", - "encoding": "টেক্সট এনকোডিং", - "syntax highlighting": "সিনট্যাক্স হাইলাইট", - "read only": "রিড অনলি", - "select all": "সবটুকু নির্বাচন করুন", - "select branch": "শাখা নির্বাচন করুন", - "create new branch": "নতুন শাখা খুলুন", - "use branch": "শাখা ব্যবহার করুন", - "new branch": "নতুন শাখা", - "branch": "শাখা", - "key bindings": "কী বাইন্ডিংস", - "edit": "সম্পাদন করুন", - "reset": "রিসেট", - "color": "রং", - "select word": "শব্দ নির্বাচন করুন", - "quick tools": "Quick tools", - "select": "নির্বাচন", - "editor font": "সম্পাদক ফন্ট", - "new project": "নতুন প্রজেক্ট", - "format": "সাজান", - "project name": "প্রোজেক্ট এর নাম ", - "unsupported device": "আপনার ডিভাইসটি এই থিম সাপোর্ট করেনা।", - "vibrate on tap": "Vibrate on tap", - "copy command is not supported by ftp.": "Copy command is not supported by FTP.", - "support title": "Acode কে সমর্থন করুন", - "exit fullscreen": "Exit fullscreen", - "fullscreen": "fullscreen", - "animation": "অ্যানিমেশন", - "backup": "ব্যাকআপ", - "restore": "restore", - "backup successful": "ব্যাকআপ সফল", - "invalid backup file": "অবৈধ ব্যাকআপ ফাইল", - "backup file found": "ব্যাকআপ ফাইল পাওয়া গেছে, আপনি কি ব্যাকআপ ফাইল থেকে সেটিংস, কী-বাইন্ডিং এবং এফটিপি-অ্যাকাউন্ট পুনরুদ্ধার করতে চান?", - "welcome back": "Welcome back", - "add path": "পথ যোগ করুন", - "live autocompletion": "Live autocompletion", - "file properties": "ফাইলের বৈশিষ্ট্য", - "path": "পথ", - "type": "Type", - "word count": "শব্দ গণনা", - "line count": "লাইন গণনা", - "last modified": "শেষ সংশোধন", - "size": "Size", - "share": "শেয়ার করুন", - "sdcard found": "External storage পাওয়া গেছে! আপনি কি এটি যোগ করতে চান?", - "allow storage": "Give permission to access your external storage?", - "show print margin": "প্রিন্ট মার্জিন দেখাও", - "login": "login", - "scrollbar size": "স্ক্রলবারের সাইজ", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "ছোট", - "large": "বড়", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "অন্যান্য সেটিংস", - "show console": "Show console", - "image": "ছবি", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "প্রস্থান করুন", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation অনুমোদিত নয়", - "no such file or directory": "এমন কোন ফাইল বা ডিরেক্টরি নেই", - "input/output error": "ইনপুট/আউটপুট-এ ত্রুটি", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "ফাইল বিদ্যমান", - "not a directory": "ডিরেক্টরি নয়", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "সিস্টেমে অনেকগুলো ফাইল খোলা", - "too many open files": "অনেক ফাইল খোলা আছে", - "text file busy": "Text file busy", - "no space left on device": "ডিভাইসে কোন জায়গা অবশিষ্ট নেই", - "read-only file system": "Read-only file system", - "file name too long": "ফাইলের নাম অনেক বড়", - "too many users": "Too many users", - "connection timed out": "সংযোগের সময় শেষ", - "connection refused": "সংযোগ প্রত্যাখ্যান করা হয়েছে", - "owner died": "Owner died", - "an error occurred": "একটি ত্রুটি ঘটেছে", - "add ftp": "FTP সংযোগ করুন", - "add sftp": "SFTP সংযোগ করুন", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "সাহায্য", - "support me": "আমাকে সমর্থন করুন", - "connecting": "সংযোগ করা হচ্ছে", - "file has been deleted": "{file} ডিলিট করা হয়েছে!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "লাইনের উচ্চতা", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "ফাইল বন্ধ করুন", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "ব্রাউজারে খুলুন", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Storage যোগ করুন", - "rate acode": "Rate Acode", - "github login": "Github লগইন", - "support": "সমর্থন", - "donate": "{amount} দান করুন", - "donation message": "এমন কিছু লোক আছে যারা দান করে না কারণ তারা অনুমান করে যে অন্য সবাই আছে এবং এমন কিছু লোক আছে দায়িত্ব নিয়ে আসে । পরবর্তীজন হওয়ায় এবং আপনার সদয় ও হৃদয়গ্রাহী দানের জন্য, আপনাকে ধন্যবাদ।", - "downloading file": "{file} ডাউনলোড হচ্ছে", - "downloading...": "ডাউনলোড হচ্ছে...", - "folder name": "Folder-এর নাম", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/cs-cz.json b/www/lang/cs-cz.json deleted file mode 100644 index 15d982bed..000000000 --- a/www/lang/cs-cz.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Čeština", - "about": "obecně", - "active files": "Otevřené soubory", - "alert": "upozornění", - "app theme": "Téma aplikace", - "autocorrect": "Povolit automatické opravy?", - "autosave": "automatické ukládání", - "beautify on save": "Zkrášlit při ukládání", - "cancel": "zrušit", - "change language": "Změnit jazyk (Change language)", - "choose color": "Vybrat barvu", - "clear": "vyčistit", - "close app": "zavřít aplikaci?", - "commit message": "commit poznámka", - "console": "konzole", - "conflict error": "Konflikt! Počkejte prosím před dalším commit-em.", - "copy": "kopírovat", - "create folder error": "Vytvoření složky selhalo", - "cut": "vyjmout", - "delete": "Smazat", - "delete {name}": "Smazat {name}?", - "dependencies": "Závislosti", - "delay": "Čas v milisekundách", - "editor settings": "Nastavení editoru", - "editor theme": "Téma editoru", - "enter file name": "Zadej jméno souboru", - "enter folder name": "Zadej jméno složky", - "empty folder message": "Prázdná složka", - "enter line number": "Zadej číslo řádku", - "error": "chyba", - "except": "kromě", - "failed": "selhalo", - "file already exists": "Soubor již existuje", - "file already exists force": "Soubor již existuje. Přepsat?", - "file changed": " byl změněn, znovu načíst?", - "file deleted": "soubor smazán", - "file is not supported": "soubor není podporován", - "file not supported": "Tento typ souboru není podporován.", - "file too large": "Soubor je příliš veliký. Maximální povolená velikost je {size}", - "file renamed": "soubor přejmenován", - "file saved": "soubor uložen", - "folder added": "složka přidána", - "folder already added": "složka byla již přidána", - "font size": "Velikost písma", - "goto": "Jdi na řádek", - "icons definition": "Definice ikon", - "info": "informace", - "invalid value": "Neplatná hodnota", - "language changed": "jazyk byl úspěšně změněn", - "linting": "Kontrola syntaktických chyb", - "logout": "Odhlásit", - "loading": "Načítání", - "my profile": "Můj profil", - "new file": "Nový soubor", - "new folder": "Nová složka", - "no": "ne", - "no editor message": "Otevři nový soubor/složku z menu", - "not set": "Nenastaveno", - "unsaved files close app": "Některé soubory nebyly uloženy. Zavřít aplikaci?", - "notice": "Poznámka", - "open file": "Otevřít soubor", - "open files and folders": "Otevřít soubory/složky", - "open folder": "Otevři složku", - "open recent": "Otevři nedávné", - "ok": "ok", - "overwrite": "přepsat", - "paste": "vložit", - "preview mode": "Mód náhledu", - "read only file": "Nelze uložit soubor chráněný proti zápisu. Použijte 'uložit jako...' ", - "reload": "znovu načíst", - "rename": "přejmenovat", - "replace": "nahradit", - "required": "toto pole je vyžadováno", - "run your web app": "Spustit tvou web aplikaci", - "save": "uložit", - "saving": "ukládání", - "save as": "Uložit jako", - "save file to run": "Prosím uložte soubor pro otevření v prohlížeči", - "save here": "Uložit zde", - "search": "hledat", - "see logs and errors": "Zkontroluj logy a chyby", - "select folder": "Vybrat složku", - "settings": "nastavení", - "settings saved": "Nastavení uloženo", - "show line numbers": "Zobrazit čísla řádků", - "show hidden files": "Zobrazit skryté soubory", - "show spaces": "Zobrazit mezery", - "soft tab": "Měkký tabulátor", - "sort by name": "Setřídit podle jména", - "success": "úspěch", - "tab size": "Velikost tabulátoru", - "text wrap": "Zalamování řádků", - "theme": "téma", - "unable to delete file": "smazání souboru selhalo", - "unable to open file": "Otevření souboru selhalo", - "unable to open folder": "Otevření složky selhalo", - "unable to save file": "Uložení souboru selhalo", - "unable to rename": "Přejmenování souboru selhalo", - "unsaved file": "Soubor není uložen, přesto zavřít?", - "warning": "upozornění", - "use emmet": "Používat emmet", - "use quick tools": "Používat 'rychlé nástroje'", - "yes": "ano", - "github": "GitHub", - "encoding": "Kódování textu", - "syntax highlighting": "Zvýraznění syntaxe", - "read only": "Pouze ke čtení", - "select all": "vybrat vše", - "select branch": "Vybrat větev", - "create new branch": "Vytvořit novou větev", - "use branch": "použít větev", - "new branch": "Nová větev", - "branch": "větev", - "key bindings": "Klávesové zkratky", - "edit": "upravit", - "reset": "resetovat", - "color": "barva", - "select word": "Vybrat slovo", - "quick tools": "Rychlé nástroje", - "select": "vybrat", - "editor font": "Písmo editoru", - "new project": "Nový projekt", - "format": "formátovat", - "project name": "Jméno projektu", - "unsupported device": "Vaše zařízení nepodporuje témata.", - "vibrate on tap": "Vibrovat při doteku", - "copy command is not supported by ftp.": "Povel copy není serverem FTP podporován.", - "support title": "Podpora Acode", - "exit fullscreen": "Opustit režim celé obrazovky", - "fullscreen": "režim celé obrazovky", - "animation": "animace", - "backup": "záloha", - "restore": "obnovit", - "backup successful": "Úspěšně zálohováno", - "invalid backup file": "Neplatný soubor zálohy", - "backup file found": "Nalezen soubor zálohy. Přejete si z něj obnovit nastavení, kl.zkratky a ftp účty?", - "welcome back": "Vítejte zpět", - "add path": "Přidat cestu", - "live autocompletion": "Aktivní doplňování kódu", - "file properties": "Vlastnosti souboru", - "path": "Cesta", - "type": "Typ", - "word count": "Počet slov", - "line count": "Počet řádek", - "last modified": "Poslední úprava", - "size": "Velikost", - "share": "Sdílet", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "sdcard found": "External storage found! Do you want to add it?", - "allow storage": "Give permission to access your external storage?", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/de-de.json b/www/lang/de-de.json deleted file mode 100644 index 834228277..000000000 --- a/www/lang/de-de.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Deutsch", - "about": "über", - "active files": "Aktive Dateien", - "alert": "Warnung", - "app theme": "App Thema", - "autocorrect": "Autokorrektur aktivieren?", - "autosave": "Automatisch speichern", - "beautify on save": "Verschönern beim Speichern", - "cancel": "Abbruch", - "change language": "Sprache wechseln", - "choose color": "Farbe wählen", - "clear": "Löschen", - "close app": "Anwendung schließen?", - "commit message": "Meldung bestätigen", - "console": "Konsole", - "conflict error": "Konflikt! Bitte warten Sie vor dem nächsten Commit.", - "copy": "Kopieren", - "create folder error": "Entschuldigung, Ordner kann nicht angelegt werden", - "cut": "Ausschneiden", - "delete": "Löschen", - "delete {name}": "Lösche {name}?", - "dependencies": "Abhängigkeiten", - "delay": "Zeit in Millisekunden", - "editor settings": "Editor Einstellungen", - "editor theme": "Editor Thema", - "enter file name": "Dateinamen eingeben", - "enter folder name": "Ordnernamen eingeben", - "empty folder message": "Leerer Ordner", - "enter line number": "Zeilennummer eingeben", - "error": "Fehler", - "except": "Ausnahme", - "failed": "Fehlgeschlagen", - "file already exists": "Datei existiert bereits", - "file already exists force": "Datei existiert bereits. Überschreiben?", - "file changed": " wurde verändert, Datei neu laden?", - "file deleted": "Datei gelöscht", - "file is not supported": "Datei wird nicht unterstützt", - "file not supported": "Dieser Dateityp wird nicht unterstützt.", - "file too large": "Datei ist zu groß zur Bearbeitung. Maximal erlaubte Größe ist {size}", - "file renamed": "Datei umbenannt", - "file saved": "Datei gespeichert", - "folder added": "Ordner hinzugefügt", - "folder already added": "Ordner bereits hinzugefügt", - "font size": "Fontgröße", - "goto": "Gehe zu Zeile", - "icons definition": "Icon Definitionen", - "info": "Information", - "invalid value": "Ungültiger Wert", - "language changed": "Sprache wurde erfolgreich gewechselt", - "linting": "Syntax Prüfung fehlerhaft", - "logout": "Abmelden", - "loading": "Laden", - "my profile": "Mein Profil", - "new file": "Neue Datei", - "new folder": "Neuer Ordner", - "no": "Nein", - "no editor message": "Öffnen oder erzeugen einer Datei/Ordner über das Menü", - "not set": "Nicht konfiguriert", - "unsaved files close app": "Es sind ungespeicherte Dateien. Anwendung beenden?", - "notice": "Hinweis", - "open file": "Datei öffnen", - "open files and folders": "Dateien und Ordner öffnen", - "open folder": "Ordner öffnen", - "open recent": "Öffnen letzte Dateien", - "ok": "Ok", - "overwrite": "Überschreiben", - "paste": "Einfügen", - "preview mode": "Vorschau-Modus", - "read only file": "Datei kann im Lese-Modus nicht gespeichert werden. Versuchen Sie Speichern unter", - "reload": "Neuladen", - "rename": "Umbenennen", - "replace": "Ersetzen", - "required": "Dieses Feld ist notwendig", - "run your web app": "Starte ihre Web-Applikation", - "save": "Speichern", - "saving": "Speichern", - "save as": "Speichern als", - "save file to run": "Zum Starten im Browser, Datei bitte speichern", - "save here": "Hier speichern", - "search": "Suche", - "see logs and errors": "Log und Fehler ansehen", - "select folder": "Ordner wählen", - "settings": "Einstellungen", - "settings saved": "Einstellungen gespeichert", - "show line numbers": "Zeige Zeilennummern", - "show hidden files": "Versteckte Dateien anzeigen", - "show spaces": "Leerzeichen anzeigen", - "soft tab": "Weiche Tabs", - "sort by name": "Nach Namen sortieren", - "success": "Erfolg", - "tab size": "Tab-Größe", - "text wrap": "Textumbruch", - "theme": "Thema", - "unable to delete file": "Datei kann nicht gelöscht werden", - "unable to open file": "Entschuldigung, Datei kann nicht geöffnet werden", - "unable to open folder": "Entschuldigung, Ordner kann nicht geöffnet werden", - "unable to save file": "Entschuldigung, Datei kann nicht gespeichert werden", - "unable to rename": "Entschuldigung, umbenennen nicht möglich", - "unsaved file": "Datei ist nicht gespeichert, trotzdem schließen?", - "warning": "Warnung", - "use emmet": "Emmet benutzen", - "use quick tools": "Quick-Tools benutzen", - "yes": "Ja", - "github": "GitHub", - "encoding": "Textcodierung", - "syntax highlighting": "Syntax-Hervorhebung", - "read only": "Nur Lesen", - "select all": "Alles auswählen", - "select branch": "Branch wählen", - "create new branch": "Neuen Branch erzeugen", - "use branch": "Benutzer Branch", - "new branch": "Neuer Branch", - "branch": "Branch", - "key bindings": "Tasten-Bindung", - "edit": "Bearbeiten", - "reset": "Zurücksetzen", - "color": "Farbe", - "select word": "Wort auswählen", - "quick tools": "Quick-Tools", - "select": "Auswählen", - "editor font": "Editor-Zeichensatz", - "new project": "Neues Projekt", - "format": "Format", - "project name": "Projecktname", - "unsupported device": "Ihr Gerät unterstütz kein Thema.", - "vibrate on tap": "Vibrieren beim Berühren", - "copy command is not supported by ftp.": "Kopierkommando wird bei FTP nicht unterstützt.", - "support title": "Unterstütze Acode", - "exit fullscreen": "Vollbildmodus verlassen", - "fullscreen": "Vollbildmodus", - "animation": "Startanimation", - "backup": "Sicherung", - "restore": "Wiederherstellung", - "backup successful": "Sicherung erfolgreich", - "invalid backup file": "Ungültige Sicherungsdatei", - "backup file found": "Sichrungsdatei gefunden, wollen Sie Einstellungen, Tasten-Bindungen und FTP-Zugänge aus der Sicherung wieder herstellen?", - "welcome back": "Willkommen zurück", - "add path": "Pfad hinzufügen", - "live autocompletion": "Direkte Autovervollständigung", - "file properties": "Datei-Eigenschaften", - "path": "Pfad", - "type": "Typ", - "word count": "Wortanzahl", - "line count": "Zeilenanzahl", - "last modified": "Zuletzt geändert", - "size": "Größe", - "share": "Freigabe", - "sdcard found": "Externer Speicher gefunden! Wollen Sie ihn hinzufügen?", - "allow storage": "Bestätigen Sie den Zugriff zu ihrem externen Speicher?", - "show print margin": "Druckrand anzeigen", - "login": "Anmelden", - "scrollbar size": "Scrollbar-Größe", - "cursor controller size": "Cursor-Marker-Größe", - "none": "keiner", - "small": "klein", - "large": "groß", - "floating button": "Schwebende Taste", - "confirm on exit": "Bestätigung beim Beenden", - "other settings": "Andere Einstellungen", - "show console": "Konsole anzeigen", - "image": "Bild", - "insert file": "Datei einfügen", - "insert color": "Farbe einfügen", - "powersave mode warning": "Energiesparmodus abschalten, für eine Vorschau im externen Browser.", - "exit": "Verlassen", - "custom": "Benutzerdefiniert", - "reset warning": "Wollen Sie wirklich das Thema zurücksetzen?", - "theme type": "Thema-Typ", - "light": "Hell", - "dark": "Dunkel", - "file browser": "Datei-Browser", - "operation not permitted": "Operation nicht zulässig", - "no such file or directory": "Keine Datei oder kein Verzeichnis", - "input/output error": "Ein-/Ausgabe-Fehler", - "permission denied": "Zugriff verweigert", - "bad address": "Unzulässige Adresse", - "file exists": "Datei existiert bereits", - "not a directory": "Ist kein Verzeichnis", - "is a directory": "Ist ein Verzeichnis", - "invalid argument": "Ungültiges Argument", - "too many open files in system": "Zu viele geöffnete Dateien im System", - "too many open files": "Zu viele geöffnete Dateien", - "text file busy": "Textdatei in Benutzung", - "no space left on device": "Kein Speicherplatz mehr auf diesem Gerät", - "read-only file system": "Dateisystem ist schreibgeschützt", - "file name too long": "Dateiname zu lang", - "too many users": "Zu viele Benutzer", - "connection timed out": "Verbindungszeit ist abgelaufen", - "connection refused": "Verbindung verweigert", - "owner died": "Besitzer existiert nicht", - "an error occurred": "Es ist ein Fehler aufgetreten", - "add ftp": "FTP hinzufügen", - "add sftp": "SFTP hinzufügen", - "save file": "Datei speichern", - "save file as": "Datei speichern als", - "files": "Dateien", - "help": "Hilfe", - "support me": "Unterstütze mich", - "connecting": "Verbindung", - "file has been deleted": "{file} wurde gelöscht!", - "feature not available": "Diese Funktion ist nur in der Bezahl-Version dieser App verfügbar.", - "deleted file": "Gelöschte Datei", - "line height": "Zeilenhöhe", - "preview info": "Wenn Sie eine aktive Datei starten möchten, tippen und halten Sie das Wiedergabe-Symbol.", - "manage all files": "Erlauben Sie Acode eine Verwaltung aller Dateien in den Einstellungen, um Dateien auf Ihrem Gerät einfach zu bearbeiten.", - "close file": "Datei schließen", - "reset connections": "Verbindungen zurücksetzen", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/en-us.json b/www/lang/en-us.json deleted file mode 100644 index 7ff63c0ac..000000000 --- a/www/lang/en-us.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "English", - "about": "about", - "active files": "Active files", - "alert": "alert", - "app theme": "App theme", - "autocorrect": "Enable autocorrect?", - "autosave": "autosave", - "beautify on save": "Beautify on save", - "cancel": "cancel", - "change language": "Change language", - "choose color": "Choose color", - "clear": "clear", - "close app": "close the application?", - "commit message": "commit message", - "console": "console", - "conflict error": "Conflict! Please wait before another commit.", - "copy": "copy", - "create folder error": "Sorry, unable create new folder", - "cut": "cut", - "delete": "Delete", - "delete {name}": "Delete {name}?", - "dependencies": "Dependencies", - "delay": "Time in milliseconds", - "editor settings": "Editor settings", - "editor theme": "Editor theme", - "enter file name": "Enter file name", - "enter folder name": "Enter folder name", - "empty folder message": "Empty Folder", - "enter line number": "Enter line number", - "error": "error", - "except": "except", - "failed": "failed", - "file already exists": "File already exists", - "file already exists force": "File already exists. Overwrite?", - "file changed": " has been changed, reload file?", - "file deleted": "file deleted", - "file is not supported": "file is not supported", - "file not supported": "This file type is not supported.", - "file too large": "File is to large to handle. Max file size allowed is {size}", - "file renamed": "file renamed", - "file saved": "file saved", - "folder added": "folder added", - "folder already added": "folder already added", - "font size": "Font size", - "goto": "Goto line", - "icons definition": "Icons definition", - "info": "info", - "invalid value": "Invalid value", - "language changed": "language has been changed successfully", - "linting": "Check syntax error", - "logout": "Logout", - "loading": "Loading", - "my profile": "My profile", - "new file": "New file", - "new folder": "New Folder", - "no": "No", - "no editor message": "Open or create new file and folder from menu", - "not set": "Not set", - "unsaved files close app": "There are unsaved files. Close application?", - "notice": "Notice", - "open file": "Open file", - "open files and folders": "Open files and folders", - "open folder": "Open folder", - "open recent": "Open recent", - "ok": "ok", - "overwrite": "overwrite", - "paste": "paste", - "preview mode": "Preview mode", - "read only file": "Cannot save read only file. Please try save as", - "reload": "reload", - "rename": "rename", - "replace": "replace", - "required": "this field is required", - "run your web app": "Run your web app", - "save": "save", - "saving": "saving", - "save as": "Save as", - "save file to run": "Please save this file to run in browser", - "save here": "Save here", - "search": "search", - "see logs and errors": "See logs and errors", - "select folder": "Select folder", - "settings": "settings", - "settings saved": "Settings saved", - "show line numbers": "Show line numbers", - "show hidden files": "Show hidden files", - "show spaces": "Show spaces", - "soft tab": "Soft tab", - "sort by name": "Sort by name", - "success": "success", - "tab size": "Tab size", - "text wrap": "Text wrap", - "theme": "theme", - "unable to delete file": "unable to delete file", - "unable to open file": "Sorry, unable to open file", - "unable to open folder": "Sorry, unable to open folder", - "unable to save file": "Sorry, unable to save file", - "unable to rename": "Sorry, unable to rename", - "unsaved file": "This file is not saved, close anyway?", - "warning": "warning", - "use emmet": "Use emmet", - "use quick tools": "Use quick tools", - "yes": "yes", - "github": "GitHub", - "encoding": "Text encoding", - "syntax highlighting": "Syntax highlighting", - "read only": "Read only", - "select all": "select all", - "select branch": "Select branch", - "create new branch": "Create new branch", - "use branch": "Use branch", - "new branch": "New branch", - "branch": "branch", - "key bindings": "Key bindings", - "edit": "edit", - "reset": "reset", - "color": "color", - "select word": "Select word", - "quick tools": "Quick tools", - "select": "select", - "editor font": "Editor font", - "new project": "New project", - "format": "format", - "project name": "Project name", - "unsupported device": "Your device does not support theme.", - "vibrate on tap": "Vibrate on tap", - "copy command is not supported by ftp.": "Copy command is not supported by FTP.", - "support title": "Support Acode", - "exit fullscreen": "Exit fullscreen", - "fullscreen": "fullscreen", - "animation": "animation", - "backup": "backup", - "restore": "restore", - "backup successful": "Backup successful", - "invalid backup file": "Invalid backup file", - "backup file found": "Backup file found, do you want to restore settings, key-bindings and ftp-accounts from backup file?", - "welcome back": "Welcome back", - "add path": "Add path", - "live autocompletion": "Live autocompletion", - "file properties": "File properties", - "path": "Path", - "type": "Type", - "word count": "Word count", - "line count": "Line count", - "last modified": "Last modified", - "size": "Size", - "share": "Share", - "sdcard found": "External storage found! Do you want to add it?", - "allow storage": "Give permission to access your external storage?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/es-sv.json b/www/lang/es-sv.json deleted file mode 100644 index e1fed7e69..000000000 --- a/www/lang/es-sv.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Español (by DouZerr)", - "about": "Información", - "active files": "Archivos Activos", - "alert": "Alerta", - "app theme": "Tema de App", - "autocorrect": "¿Habilitar Autocorrección?", - "autosave": "Guardar Automáticamente", - "beautify on save": "Embellecer al guardar", - "cancel": "Cancelar", - "change language": "Cambiar Idioma", - "choose color": "Elegir color", - "clear": "Limpiar", - "close app": "¿Cerrar la Aplicación?", - "commit message": "Commitear mensaje", - "console": "Consola", - "conflict error": "¡Conflicto! Por favor espera antes de otro commit.", - "copy": "Copiar", - "create folder error": "Lo sentimos, no se puede crear una nueva carpeta", - "cut": "Cortar", - "delete": "Borrar", - "delete {name}": "¿Borrar {name}?", - "dependencies": "Dependencias", - "delay": "Tiempo en milisegundos", - "editor settings": "Ajustes del Editor", - "editor theme": "Tema del Editor", - "enter file name": "Ingrese Nombre del Archivo", - "enter folder name": "Ingrese Nombre de la Carpeta", - "empty folder message": "Carpeta Vacía", - "enter line number": "Ingrese Número de Línea", - "error": "Error", - "except": "Excepto", - "failed": "Ha Fallado", - "file already exists": "El archivo ya existe", - "file already exists force": "El archivo ya existe. ¿Sobrescribir?", - "file changed": " ha sido cambiado, recargar archivo?", - "file deleted": "Archivo Borrado", - "file is not supported": "El archivo no es compatible", - "file not supported": "Este tipo de archivo no es compatible.", - "file too large": "El archivo es demasiado grande para manejarlo. El tamaño máximo de archivo permitido es {size}", - "file renamed": "Archivo renombrado", - "file saved": "Archivo guardado", - "folder added": "Carpeta agregada", - "folder already added": "Carpeta ya agregada", - "font size": "Tamaño de Fuente", - "goto": "Ir a la Línea", - "icons definition": "Definición de iconos", - "info": "info", - "invalid value": "Valor Inválido", - "language changed": "Idioma cambiado exitosamente", - "linting": "Comprobar error de sintaxis", - "logout": "Cerrar Sesión", - "loading": "Cargando", - "my profile": "Mi Perfil", - "new file": "Nuevo Archivo", - "new folder": "Nueva Carpeta", - "no": "No", - "no editor message": "Abrir o crear un nuevo archivo y carpeta desde el menú", - "not set": "No Establecido", - "unsaved files close app": "Existen archivos sin guardar. ¿Cerrar la aplicación?", - "notice": "Aviso", - "open file": "Abrir Archivo", - "open files and folders": "Abrir archivos y carpetas", - "open folder": "Abrir Carpeta", - "open recent": "Abrir Recientes", - "ok": "ok", - "overwrite": "Sobrescribir", - "paste": "Pegar", - "preview mode": "Modo de vista previa", - "read only file": "No se puede guardar un archivo de solo lectura. Por favor intenta guardar como", - "reload": "Recargar", - "rename": "Renombrar", - "replace": "Reemplazar", - "required": "Este campo es requerido", - "run your web app": "Ejecute su aplicación web", - "save": "Guardar", - "saving": "Guardando", - "save as": "Guardar como", - "save file to run": "Guardar archivo para ejecutar en el navegador", - "save here": "Guardar aqui", - "search": "Buscar", - "see logs and errors": "Ver registros y errores", - "select folder": "Seleccionar Carpeta", - "settings": "Ajustes", - "settings saved": "Ajustes guardados", - "show line numbers": "Mostrar números de línea", - "show hidden files": "Mostrar archivos ocultos", - "show spaces": "Mostrar espacios", - "soft tab": "Pestaña suave", - "sort by name": "Ordenar por nombre", - "success": "Éxito", - "tab size": "Tamaño de pestaña", - "text wrap": "Ajuste de línea", - "theme": "Tema", - "unable to delete file": "no se puede eliminar el archivo", - "unable to open file": "Lo sentimos, no se puede abrir el archivo", - "unable to open folder": "Lo sentimos, no se puede abrir la carpeta", - "unable to save file": "Lo sentimos, no se puede guardar el archivo", - "unable to rename": "Lo sentimos, no se puede cambiar el nombre", - "unsaved file": "Este archivo no se guardado, ¿cerrar de todos modos?", - "warning": "Advertencia", - "use emmet": "Usar emmet", - "use quick tools": "Usa herramientas rápidas", - "yes": "Si", - "github": "GitHub", - "encoding": "Codificación de Texto", - "syntax highlighting": "Resaltado de sintaxis", - "read only": "Solo lectura", - "select all": "Seleccionar todo", - "select branch": "Seleccione rama", - "create new branch": "Crear nueva rama", - "use branch": "Usar rama", - "new branch": "Nueva rama", - "branch": "Rama", - "key bindings": "Atajos de teclado", - "edit": "Editar", - "reset": "Reiniciar", - "color": "Color", - "select word": "Seleccionar palabra", - "quick tools": "Herramientas rápidas", - "select": "Seleccionar", - "editor font": "Fuente del editor", - "new project": "Nuevo Proyecto", - "format": "Formato", - "project name": "Nombre del Proyecto", - "unsupported device": "Su dispositivo no es compatible con el tema.", - "vibrate on tap": "Vibrar al tocar", - "copy command is not supported by ftp.": "Comando de copia no es compatible con FTP.", - "support title": "Apoye Acode", - "exit fullscreen": "Salir de pantalla completa", - "fullscreen": "pantalla completa", - "animation": "animación", - "backup": "respaldo", - "restore": "restaurar", - "backup successful": "Respaldo exitoso", - "invalid backup file": "Archivo de respaldo inválido", - "backup file found": "Archivo de respaldo encontrado, ¿quieres restaurar la configuración, atajos de teclado y cuentas-FTP del archivo de respaldo?", - "welcome back": "Bienvenido de vuelta", - "add path": "Añadir dirección", - "live autocompletion": "Autocompletado en vivo", - "file properties": "Propiedades del archivo", - "path": "Dirección", - "type": "Tipo", - "word count": "Conteo de palabras", - "line count": "Conteo de líneas", - "last modified": "Última modificación", - "size": "Tamaño", - "share": "Compartir", - "sdcard found": "¡Almacenamiento externo encontrado! ¿Quieres añadirlo?", - "allow storage": "¿Dar permiso para acceder a tu almacenamiento externo?", - "show print margin": "Mostrar margen de impresión", - "login": "Iniciar Sesión", - "scrollbar size": "Tamaño de barra de scroll", - "cursor controller size": "Tamaño del controlador de cursor", - "none": "ninguno", - "small": "pequeño", - "large": "grande", - "floating button": "Botón flotante", - "confirm on exit": "Confirmar al salir", - "other settings": "Otros ajustes", - "show console": "Mostrar consola", - "image": "Imagen", - "insert file": "Insertar archivo", - "insert color": "Insert color", - "powersave mode warning": "Desactive el modo de ahorro de energía para obtener una vista previa en un navegador externo", - "exit": "Salir", - "custom": "personalizado", - "reset warning": "¿Seguro que quieres restablecer el tema?", - "theme type": "Tipo de tema", - "light": "claro", - "dark": "oscuro", - "file browser": "Explorador de archivos", - "operation not permitted": "Operación no permitida", - "no such file or directory": "El fichero o directorio no existe", - "input/output error": "Error de entrada/salida", - "permission denied": "Permiso denegado", - "bad address": "Dirección incorrecta", - "file exists": "El archivo ya existe", - "not a directory": "No es un directorio", - "is a directory": "Es un directorio", - "invalid argument": "Argumento no válido", - "too many open files in system": "Demasiados archivos abiertos en el sistema", - "too many open files": "Demasiados archivos abiertos", - "text file busy": "Archivo de texto ocupado", - "no space left on device": "No queda espacio en el dispositivo", - "read-only file system": "Sistema de archivos de sólo lectura", - "file name too long": "Nombre de archivo demasiado largo", - "too many users": "Demasiados usuarios", - "connection timed out": "Tiempo de conexión agotado", - "connection refused": "Conexión denegada", - "owner died": "El propietario murio", - "an error occurred": "Ocurrió un error", - "add ftp": "Añadir FTP", - "add sftp": "Añadir SFTP", - "save file": "Guardar el archivo", - "save file as": "Guardar archivo como", - "files": "Archivos", - "help": "Ayuda", - "support me": "Apoyarme", - "connecting": "Conectando", - "file has been deleted": "{file} ha sido eliminado!", - "feature not available": "Esta función solo está disponible en la versión de pago de la aplicación.", - "deleted file": "Archivo eliminado", - "line height": "Altura de la línea", - "preview info": "Si desea ejecutar el archivo activo, toque y mantenga presionado el ícono de reproducción.", - "manage all files": "Permita que Acode editor administre todos los archivos en la configuración para editar archivos en su dispositivo fácilmente.", - "close file": "Cerrar el archivo", - "reset connections": "Restablecer conexiones", - "check file changes": "Comprobar cambios en el archivo", - "open in browser": "Abrir en el navegador", - "desktop mode": "Modo escritorio", - "toggle console": "Abrir/Cerrar la consola", - "new line mode": "Nuevo modo de línea", - "add a storage": "Añadir un almacenamiento", - "rate acode": "Califica Acode", - "github login": "Iniciar sesión en Github", - "support": "Apoyar", - "donate": "Donar {amount}", - "donation message": "Hay personas que no donan porque asumen que todos los demás lo hacen, y hay quienes toman la antorcha y corren con ella. Gracias por ser el último y por su amable y conmovedora donación.", - "downloading file": "Descargando {file}", - "downloading...": "Descargando...", - "folder name": "Nombre de la carpeta", - "keyboard mode": "Modo de teclado", - "code": "No hay sugerencias", - "normal": "Mostrar sugerencias", - "app settings": "Ajustes de aplicacion" -} \ No newline at end of file diff --git a/www/lang/fr-fr.json b/www/lang/fr-fr.json deleted file mode 100644 index f0a75a385..000000000 --- a/www/lang/fr-fr.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Français", - "about": "À propos", - "active files": "Fichiers actifs", - "alert": "Alerte", - "app theme": "Thème de l'application", - "autocorrect": "Activer la correction automatique?", - "autosave": "Sauvegarde automatique", - "beautify on save": "Re-formatter le code à chaque sauvegarde", - "cancel": "Annuler", - "change language": "Changer de langue", - "choose color": "Choisir une couleur ", - "clear": "Effacer", - "close app": "Fermer l'application?", - "commit message": "Message de commit", - "console": "Console", - "conflict error": "Conflit! Veuillez attendre avant de procéder à un autre commit.", - "copy": "Copier", - "create folder error": "Désolé, impossible de créer un nouveau dossier", - "cut": "Couper", - "delete": "Effacer", - "delete {name}": "Effacer {nom}?", - "dependencies": "Dépendences", - "delay": "Temps en millisecondes", - "editor settings": "Paramètres de l'éditeur", - "editor theme": "Thème de l'éditeur", - "enter file name": "Entrer un nom de fichier", - "enter folder name": "Entrer un nom de dossier", - "empty folder message": "Dossier vide", - "enter line number": "Entrer le numéro de ligne", - "error": "Erreur", - "except": "À part", - "failed": "Échoué", - "file already exists": "Le fichier existe déjà", - "file already exists force": "Le fichier existe déjà. L'écraser?", - "file changed": " a été modifié, recharger le fichier?", - "file deleted": "Fichier effacé", - "file is not supported": "Fichier non supporté", - "file not supported": "Type de fichier non supporté.", - "file too large": "Le fichier est trop volumineux. La taille maximale autorisée est {size}", - "file renamed": "Fichier renommé", - "file saved": "Fichier sauvegardé", - "folder added": "Dossier ajouté", - "folder already added": "Dossier déjà ajouté", - "font size": "Taille de la police", - "goto": "Aller à ligne", - "icons definition": "Définition des icones", - "info": "Info", - "invalid value": "Valeur invalide", - "language changed": "La langue a été changée avec succès", - "linting": "Vérifier les erreurs de syntaxe?", - "logout": "Déconnecté", - "loading": "Chargement", - "my profile": "Mon profil", - "new file": "Nouveau fichier", - "new folder": "Nouveau dossier", - "no": "Non", - "no editor message": "Ouvrir ou créer un nouveau fichier ou dossier depuis le menu", - "not set": "Non défini", - "unsaved files close app": "Il existe des fichiers non sauvegardés. Fermer l'application?", - "notice": "Avis", - "open file": "Ouvrir un fichier", - "open files and folders": "Ouvrir les fichiers et dossiers", - "open folder": "Ouvrir un dossier", - "open recent": "Récent", - "ok": "Ok", - "overwrite": "Écraser", - "paste": "Coller", - "preview mode": "Mode de pré-visualisation", - "read only file": "Sauvegarde impossible, fichier en lecture seule. Essayez d'enregistrer sous un autre nom", - "reload": "Recharger", - "rename": "Renommer", - "replace": "Remplacer", - "required": "Champ requis", - "run your web app": "Lancer votre application web", - "save": "Enregistrer", - "saving": "Enregistré", - "save as": "Enregistrer sous", - "save file to run": "Veuillez enregistrez ce fichier pour l'exécuter dans le navigateur", - "save here": "Enregistrer ici", - "search": "Recherche", - "see logs and errors": "Voir les journaux et les erreurs", - "select folder": "Choisir un dossier", - "settings": "Paramètres", - "settings saved": "Paramètres enregistrés", - "show line numbers": "Afficher les numéros de ligne", - "show hidden files": "Afficher les fichiers cachés", - "show spaces": "Afficher les espaces", - "soft tab": "Tabulation légère", - "sort by name": "Trier par nom", - "success": "Succès", - "tab size": "Taille de tabulation", - "text wrap": "Habillage de texte", - "theme": "Thème", - "unable to delete file": "Impossible de supprimer le fichier", - "unable to open file": "Désolé, impossible d'ouvrir le fichier", - "unable to open folder": "Désolé, impossible d'ouvrir le dossier", - "unable to save file": "Désolé, impossible d'enregistrer le fichier", - "unable to rename": "Désolé, impossible de renommer", - "unsaved file": "Ce fichier n'a pas été sauvegardé, le fermer quand même?", - "warning": "Avertissement", - "use emmet": "Utiliser emmet", - "use quick tools": "Utiliser accès rapide", - "yes": "Oui", - "github": "GitHub", - "encoding": "Texte encodé", - "syntax highlighting": "Mise en évidence de la syntaxe", - "read only": "Lecture seule", - "select all": "Tout sélectionner", - "select branch": "Sélectionner une branche", - "create new branch": "Créer une nouvelle branche", - "use branch": "Utiliser une branche", - "new branch": "Nouvelle branche", - "branch": "Branche", - "key bindings": "Raccourcis", - "edit": "Éditer", - "reset": "Restaurer", - "color": "Couleur", - "select word": "Sélectionner un mot", - "quick tools": "Accès rapide", - "select": "Sélectionner", - "editor font": "Éditeur de police", - "new project": "Nouveau projet", - "format": "Format", - "project name": "Nom du projet", - "unsupported device": "Votre appareil ne prend pas en charge ce thème.", - "vibrate on tap": "Vibrations", - "copy command is not supported by ftp.": "La Copie n'est pas supporté en FTP.", - "support title": "Supporter Acode", - "exit fullscreen": "Sortir du plein écran", - "fullscreen": "Plein écran", - "animation": "Animation", - "backup": "Sauvegarder", - "restore": "Restaurer", - "backup successful": "Sauvegarde faite avec succès!", - "invalid backup file": "Fichier de sauvegarde invalide", - "backup file found": "Fichier de sauvegarde trouvé, souhaitez vous restaurer les paramètres, raccourcis clavier et comptes FTP depuis le fichier de sauvegarde?", - "welcome back": "Bienvenue à nouveau!", - "add path": "Ajouter un chemin d'accès", - "live autocompletion": "Correction automatique", - "file properties": "Propriétés du fichier", - "path": "Chemin", - "type": "Type", - "word count": "Nombre de mots", - "line count": "Nombre de lignes", - "last modified": "Modifié pour la dernière fois le", - "size": "Taille", - "share": "Partager", - "sdcard found": "Stockage externe détecté! Désirez vous l'ajouter maintenant?", - "allow storage": "Fournir l'autorisation d'accès au stockage maintenant?", - "show print margin": "Afficher les marges d'impression", - "login": "Login", - "scrollbar size": "Taille de la barre de défilement", - "cursor controller size": "Taille du curseur de contrôle", - "none": "Aucun", - "small": "Petit", - "large": "Grand", - "floating button": "Bouton flottant", - "confirm on exit": "Confirmer à la sortie", - "other settings": "Autres paramètres", - "show console": "Afficher la console", - "image": "Image", - "insert file": "Insérer un fichier", - "insert color": "Insérer une couleur", - "powersave mode warning": "Désactiver le mode d'économie d'énergie pour prévisualiser dans un navigateur externe.", - "exit": "Sortir", - "custom": "personnalisé", - "reset warning": "Voulez-vous vraiment réinitialiser le thème?", - "theme type": "Type de thème", - "light": "Clair", - "dark": "Sombre", - "file browser": "Navigateur de fichiers", - "operation not permitted": "Opération non autorisée", - "no such file or directory": "Aucun fichier ou répertoire ayant ce nom", - "input/output error": "Erreur d'entrée/sortie", - "permission denied": "Autorisation refusée", - "bad address": "Mauvaise adresse", - "file exists": "Le fichier existe", - "not a directory": "N'est pas un répertoire", - "is a directory": "Est un répertoire", - "invalid argument": "Argument invalide", - "too many open files in system": "Trop de fichiers ouverts dans le système", - "too many open files": "Trop de fichiers ouverts", - "text file busy": "Fichier texte occupé", - "no space left on device": "Pas d'espace libre disponible sur le périphérique", - "read-only file system": "Système de fichiers en lecture seule", - "file name too long": "Nom de fichier trop long", - "too many users": "Trop d'utilisateurs", - "connection timed out": "La connexion a expiré", - "connection refused": "Connexion rejetée", - "owner died": "Le propriétaire est mort", - "an error occurred": "Une erreur s'est produite", - "add ftp": "Ajouter FTP", - "add sftp": "Ajouter SFTP", - "save file": "Enregistrer le fichier", - "save file as": "Enregistrer le fichier sous", - "files": "Dossiers", - "help": "Aide", - "support me": "Me soutenir", - "connecting": "Connexion", - "file has been deleted": "{file} a été supprimé!", - "feature not available": "Cette fonctionnalité n'est disponible que dans la version payante de l'application.", - "deleted file": "Fichier supprimé", - "line height": "Hauteur de ligne", - "preview info": "Si vous voulez exécuter le fichier actif, appuyez longuement sur l'icône de lecture.", - "manage all files": "Autorisez l'éditeur Acode à gérer tous les fichiers dans les paramètres pour modifier facilement les fichiers sur votre appareil.", - "close file": "Fermer le fichier", - "reset connections": "Réinitialiser les connexions", - "check file changes": "Vérifier les modifications du fichier", - "open in browser": "Ouvrir dans le navigateur", - "desktop mode": "Mode bureau", - "toggle console": "Activer/désactiver la console", - "new line mode": "Mode nouvelle ligne", - "add a storage": "Ajouter un stockage", - "rate acode": "Evaluer Acode", - "github login": "Connexion à Github", - "support": "Support", - "donate": "Donner {amount}", - "donation message": "Il y a des gens qui ne font pas de don parce qu'ils supposent que tout le mmonde le fait et il y a ceux qui reprennent le flambeau et courent avec. Merci d'être ce genre de personne et pour votre don aimable et réconfortant.", - "downloading file": "Téléchargement de {file}", - "downloading...": "Téléchargement...", - "folder name": "Nom du Dossier", - "keyboard mode": "Mode de Saisie", - "code": "Aucune suggestions", - "normal": "Afficher les suggestions", - "app settings": "Paramètres de l'application" -} diff --git a/www/lang/hi-in.json b/www/lang/hi-in.json deleted file mode 100644 index 508d34faa..000000000 --- a/www/lang/hi-in.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "lang": "हिंदी", - "about": "एप्लीकेशन के बारे में", - "active files": "सक्रिय फ़ाइलें", - "alert": "चेतावनी", - "app theme": "एप्लीकेशन का थीम", - "autocorrect": "स्वत: सुधार सक्षम करें?", - "autosave": "स्वरक्षण", - "beautify on save": "सेव करने से पहले ब्यूटीफाई करे", - "cancel": "रद्द करें", - "change language": "भाषा बदलें", - "choose color": "रंग चुनें", - "create folder error": "क्षमा करें, नया फ़ोल्डर बनाने में असमर्थ", - "clear": "साफ करें", - "close app": "एप्लिकेशन बंद करें?", - "commit message": "Commit message", - "console": "कंसोल", - "conflict error": "Conflict! Please wait before another commit.", - "copy": "कापी", - "cut": "कट", - "delete": "इसे हटाएं", - "delete {name}": "{name} को डिलीट करें?", - "dependencies": "निर्भरता", - "delay": "मिलीसेकंड में समय", - "editor settings": "एडिटर सेटिंग्स", - "editor theme": "एडिटर का थीम", - "enter file name": "फ़ाइल का नाम दर्ज करें", - "enter folder name": "फ़ोल्डर का नाम दर्ज करें", - "empty folder message": "खाली फ़ोल्डर", - "enter line number": "लाइन नंबर दर्ज करें", - "error": "एरर", - "except": "सिवाय", - "failed": "असफल", - "file already exists": "फ़ाइल पहले से ही मौजूद है", - "file already exists force": "फ़ाइल पहले से ही मौजूद है। ओवरराइट करें?", - "file changed": " बदल दी गई है, फ़ाइल पुनः लोड करें?", - "file deleted": "फ़ाइल डिलीट कर दि गई है", - "file is not supported": "फ़ाइल समर्थित नहीं है", - "file too large": "संभाल करने के लिए फ़ाइल बड़ी है। अधिकतम फ़ाइल आकार की अनुमति है {size}", - "file renamed": "फ़ाइल का नाम बदल दिया गया है", - "file saved": "फाइल सेव हो गया", - "folder added": "फ़ोल्डर जोड़ा गया", - "folder already added": "फ़ोल्डर पहले से ही जोड़ा गया", - "goto": "गोटू लाइन", - "icons definition": "आइकन स्पष्टीकरण", - "info": "जानकारी", - "invalid value": "अमान्य मूल्य", - "language changed": "भाषा को सफलतापूर्वक बदल दिया गया है", - "linting": "वाक्यविन्यास त्रुटि की जाँच करें", - "logout": "लॉग आउट", - "loading": "लोड हो रहा है", - "my profile": "मेरी प्रोफाइल", - "new file": "नई फ़ाइल", - "new folder": "नया फोल्डर", - "no editor message": "मेनू से नई फ़ाइल और फ़ोल्डर खोलें या बनाएँ", - "no": "नहीं", - "not set": "सेट नहीं है", - "unsaved files close app": "बिना सेव की गई फ़ाइलें हैं। फिर भी एप्लिकेशन को बंद करें?", - "notice": "नोटिस", - "open file": "फ़ाइल खोलें", - "open files and folders": "फ़ाइल और फ़ोल्डर खोलें", - "open folder": "फ़ोल्डर खोलें", - "open recent": "हाल ही का खोलें", - "ok": "ठीक", - "overwrite": "ओवरराइट करें", - "paste": "पेस्ट", - "preview mode": "पूर्वावलोकन मोड", - "read only file": "यह फाइल सेव नहीं की सकती, किर्प्या इसे 'सेव एज' से सेव करे", - "redo": "रीडू", - "replace": "इससे बदलें", - "reload": "रिलोड", - "rename": "नाम बदलने", - "required": "यह फ़ील्ड आवश्यक है", - "run your web app": "अपना वेब ऐप चलाएं", - "save": "सेव", - "saving": "सेव हो रहा है", - "save as": "सेव ऐज", - "save file to run": "कृपया इस फाइल को ब्राउजर में चलाने के लिए सेव करें", - "save here": "यहां सेव करें", - "search": "खोज", - "see logs and errors": "लॉग और त्रुटियों को दिखाएं", - "select folder": "फोल्डर का चयन करें", - "settings": "सेटिंग्स", - "settings saved": "सेटिंग्स सेव हो गया", - "show line numbers": "लाइन नंबर्स दिखाएं", - "show hidden files": "छिपी फ़ाइलें दिखाएं", - "show spaces": "रिक्त स्थान दिखाएं", - "soft tab": "सॉफ्ट टैब", - "sort by name": "नाम द्वारा क्रमबद्ध करें", - "success": "सफल", - "tab size": "टैब साइज", - "text wrap": "टेक्स्ट व्रैप", - "theme": "थीम", - "unable to delete file": "फाइल डिलीट नहीं हो पा रहा है", - "unable to open file": "क्षमा करें, फ़ाइल खोलने में असमर्थ", - "unable to open folder": "क्षमा करें, फ़ोल्डर खोलने में असमर्थ", - "unable to save file": "क्षमा करें, फ़ाइल सेव करने में असमर्थ", - "unable to rename": "क्षमा करें, नाम बदलने में असमर्थ", - "unsaved file": "यह फ़ाइल सेव नहीं गई है, फिर भी फ़ाइल बंद करें", - "warning": "ध्यान दे", - "use emmet": "इमेट का प्रयोग करें", - "use quick tools": "त्वरित साधनों का उपयोग करें", - "yes": "हाँ", - "github": "GitHub", - "encoding": "टेक्स्ट एन्कोडिंग", - "syntax highlighting": "सिंटेक्स हाइलाइटिंग", - "read only": "केवल पढ़ने के लिए", - "select all": "सेलेक्ट आल", - "select branch": "शाखा का चयन करें", - "create new branch": "नई शाखा बनाएं", - "use branch": "शाखा का उपयोग करें", - "new branch": "नई शाखा", - "branch": "branch", - "key bindings": "की बिंडिंग्स", - "edit": "संपादित करें", - "reset": "रीसेट", - "color": "रंग", - "select word": "शब्द का चयन करें", - "quick tools": "त्वरित उपकरण", - "select": "चयन", - "editor font": "Editor font", - "new project": "नया प्रोजेक्ट", - "format": "फॉर्मेट", - "project name": "प्रोजेक्ट का नाम", - "unsupported device": "आपका डिवाइस थीम का समर्थन नहीं करता है।", - "vibrate on tap": "Vibrate on tap", - "copy command is not supported by ftp.": "Copy command is not supported by FTP.", - "support title": "Support Acode", - "exit fullscreen": "Exit fullscreen", - "fullscreen": "fullscreen", - "animation": "animation", - "backup": "backup", - "restore": "restore", - "backup successful": "Backup successful", - "invalid backup file": "Invalid backup file", - "backup file found": "Backup file found, do you want to restore settings, key-bindings and ftp-accounts from backup file?", - "welcome back": "Welcome back", - "add path": "Add path", - "live autocompletion": "Live autocompletion", - "file properties": "File properties", - "path": "Path", - "type": "Type", - "word count": "Word count", - "line count": "Line count", - "last modified": "Last modified", - "size": "Size", - "share": "Share", - "sdcard found": "External storage found! Do you want to add it?", - "allow storage": "Give permission to access your external storage?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "file not supported": "यह फ़ाइल प्रकार समर्थित नहीं है।", - "font size": "फॉण्ट साइज", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/hu-hu.json b/www/lang/hu-hu.json deleted file mode 100644 index 7b1746bd2..000000000 --- a/www/lang/hu-hu.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Magyar", - "about": "névjegy", - "active files": "Megnyitott fájlok", - "alert": "figyelmeztetés", - "app theme": "Alkalmazástéma", - "autocorrect": "Bekapcsolja az automatikus javítást?", - "autosave": "automatikus mentés", - "beautify on save": "Szépítés mentéskor", - "cancel": "mégse", - "change language": "Nyelv váltása", - "choose color": "Válassz színt", - "clear": "törlés", - "close app": "Bezárja az alkalmazást?", - "commit message": "commit üzenet", - "console": "konzol", - "conflict error": "Konfliktus! Kérjük, várjon egy újabb commit előtt.", - "copy": "másolás", - "create folder error": "Elnézést, nem sikerült új mappát létrehozni.", - "cut": "kivágás", - "delete": "Törlés", - "delete {name}": "Törli a(z) {name} fájlt?", - "dependencies": "Függőségek", - "delay": "Idő ezredmásodpercben", - "editor settings": "Szerkesztő beállításai", - "editor theme": "Szerkesztő témája", - "enter file name": "Írja be a fájlnevet", - "enter folder name": "Írja be a mappanevet", - "empty folder message": "Üres mappa", - "enter line number": "Írja be a sorszámot", - "error": "hiba", - "except": "except", - "failed": "nem sikerült", - "file already exists": "A fájl már létezik", - "file already exists force": "A fájl már létezik. Felülírja?", - "file changed": " megváltozott, újratölti a fájlt?", - "file deleted": "Fájl törölve", - "file is not supported": "a fájl nem támogatott", - "file not supported": "Ez a fájltípus nem támogatott.", - "file too large": "A fájl túl nagy a kezeléshez. A maximum fájlméret {size}", - "file renamed": "fájl átnevezve", - "file saved": "fájl mentve", - "folder added": "mappa hozzáadva", - "folder already added": "a mappa már hozzá van adva", - "font size": "Betűméret", - "goto": "Menj sorhoz", - "icons definition": "Ikonok definíciója", - "info": "infó", - "invalid value": "Érvénytelen érték", - "language changed": "sikeresen megváltoztatta a nyelvet", - "linting": "Szintaxishiba ellenőrzése", - "logout": "Kijelentkezés", - "loading": "Betöltés", - "my profile": "Profilom", - "new file": "Új fájl", - "new folder": "Új mappa", - "no": "Nem", - "no editor message": "Nyisson meg vagy hozzon létre új fájlt vagy mappát a menüből", - "not set": "Nincs beállítva", - "unsaved files close app": "Vannak mentetlen fájlok. Bezárja az alkalmazást?", - "notice": "Közlemény", - "open file": "Fájl megnyitása", - "open files and folders": "Fájlok és mappák megnyitása", - "open folder": "Mappa megnyitása", - "open recent": "Legutóbbiak megnyitása", - "ok": "rendben", - "overwrite": "felülírás", - "paste": "beillesztés", - "preview mode": "Előnézet módja", - "read only file": "Nem menthet csak olvasható fájlt. Próbálja menteni másként", - "reload": "újratöltés", - "rename": "átnevezés", - "replace": "csere", - "required": "ez a mező kötelező", - "run your web app": "Futtassa a webappját", - "save": "mentés", - "saving": "mentés", - "save as": "Mentés másként", - "save file to run": "Mentse a fájlt a böngészőben futtatáshoz", - "save here": "Mentés ide", - "search": "keresés", - "see logs and errors": "Naplók és hibák megjelenítése", - "select folder": "Mappa kiválasztása", - "settings": "beállítások", - "settings saved": "Beállítások elmentve", - "show line numbers": "Sorszámok mutatása", - "show hidden files": "Rejtett fájlok mutatása", - "show spaces": "Szóközök mutatása", - "soft tab": "Soft tab", - "sort by name": "Rendezés név szerint", - "success": "siker", - "tab size": "Tab mérete", - "text wrap": "Text wrap", - "theme": "téma", - "unable to delete file": "nem lehet törölni a fájlt", - "unable to open file": "Elnézést, nem lehet megnyitni a fájlt", - "unable to open folder": "Elnézést, nem lehet megnyitni a mappát", - "unable to save file": "Elnézést, nem lehet elmenteni a fájlt", - "unable to rename": "Elnézést, nem lehet átnevezni", - "unsaved file": "A fájl nincs mentve, bezárja?", - "warning": "figyelmeztetés", - "use emmet": "Emmet használata", - "use quick tools": "Gyors eszközök használata", - "yes": "igen", - "github": "GitHub", - "encoding": "Szövegkódolás", - "syntax highlighting": "Szintaxiskiemelés", - "read only": "Csak olvasható", - "select all": "összes kijelölése", - "select branch": "Ág kiválasztása", - "create new branch": "Új ág létrehozása", - "use branch": "Ág használata", - "new branch": "Új ág", - "branch": "ág", - "key bindings": "Billentyűparancsok", - "edit": "szerkesztés", - "reset": "visszaállítás", - "color": "szín", - "select word": "Szó kiválasztása", - "quick tools": "Gyors eszközök", - "select": "kiválasztás", - "editor font": "Szerkesztő betűtípusa", - "new project": "Új projekt", - "format": "formázás", - "project name": "Projekt neve", - "unsupported device": "Az eszköz nem támogatja a témát.", - "vibrate on tap": "Rezgés érintésre", - "copy command is not supported by ftp.": "Az FTP nem támogatja a másolást.", - "support title": "Támogassa az Acode-ot", - "exit fullscreen": "Kilépés a teljes képernyőből", - "fullscreen": "teljes képernyő", - "animation": "animáció", - "backup": "biztonsági mentés", - "restore": "visszaállítás", - "backup successful": "Biztonsági mentés sikeres", - "invalid backup file": "Érvénytelen mentési fájl", - "backup file found": "Mentési fájlt találtunk, szeretné visszaállítani a beállításokat, billentyűparancsokat és ftp-fiókokat a mentési fájlból?", - "welcome back": "Üdv újra", - "add path": "Útvonal hozzáadása", - "live autocompletion": "Élő kódkiegészítés", - "file properties": "Fájl tulajdonságai", - "path": "Útvonal", - "type": "Típus", - "word count": "Szavak száma", - "line count": "Sorok száma", - "last modified": "Utoljára módosítva", - "size": "Méret", - "share": "Megosztás", - "sdcard found": "Külső tárhelyet találtunk! Szeretné hozzáadni?", - "allow storage": "Engedélyt ad a külső tárhelyhez való hozzáférésre?", - "show print margin": "Nyomtatási margó megjelenítése", - "login": "bejelentkezés", - "scrollbar size": "Görgetősáv mérete", - "cursor controller size": "Kurzorirányító mérete", - "none": "egyik sem", - "small": "kicsi", - "large": "nagy", - "floating button": "Lebegő gomb", - "confirm on exit": "Megerősítés kilépéskor", - "other settings": "Egyéb beállítások", - "show console": "Konzol megjelenítése", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/id-id.json b/www/lang/id-id.json deleted file mode 100644 index e8abf56bf..000000000 --- a/www/lang/id-id.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "lang": "Indonesian", - "about": "tentang", - "active files": "file aktif", - "alert": "waspada", - "app theme": "Tema aplikasi", - "autocorrect": "Aktifkan koreksi otomatis?", - "autosave": "Penyimpanan otomatis", - "beautify on save": "Mempercantik saat menyimpan", - "cancel": "batal", - "change language": "Ganti bahasa", - "choose color": "Pilih warna", - "clear": "kosongkan", - "close app": "Tutup aplikasi?", - "commit message": "Pesan komit", - "console": "konsol", - "conflict error": "Konflik! Harap tunggu sebelum komit lainnya.", - "copy": "salin", - "create folder error": "Maaf, tidak dapat membuat folder baru", - "cut": "potong", - "delete": "hapus", - "delete {name}": "hapus {name}?", - "dependencies": "Ketergantungan", - "delay": "kelambatan", - "editor settings": "Pengaturan editor", - "editor theme": "Tema editor", - "enter file name": "Masukkan nama berkas", - "enter folder name": "Masukkan nama folder", - "empty folder message": "Folder kosong", - "enter line number": "Masukkan nomor baris", - "error": "kesalahan", - "except": "kecuali", - "failed": "gagal", - "file already exists": "Berkas sudah ada", - "file already exists force": "Berkas sudah ada. Timpa?", - "file deleted": "berkas telah dihapus", - "file is not supported": "Berkas tidak didukung", - "file not supported": "Jenis berkas ini tidak didukung.", - "file too large": "Berkas terlalu besar untuk ditangani. Ukuran file maksimal yang diizinkan adalah {size}", - "file renamed": "nama berkas telah diganti", - "file saved": "berkas disimpan", - "folder added": "folder ditambahkan", - "folder already added": "folder sudah ditambahkan", - "font size": "Ukuran huruf", - "goto": "Pergi ke baris", - "icons definition": "Definisi ikon", - "info": "info", - "invalid value": "Nilai tidak valid", - "language changed": "bahasa telah berhasil diubah", - "linting": "Periksa kesalahan sintaksis", - "logout": "Keluar", - "loading": "Memuat", - "my profile": "Profil saya", - "new file": "Berkas baru", - "new folder": "Folder baru", - "no": "Tidak", - "no editor message": "Buka atau buat berkas dan folder baru dari menu", - "not set": "tidak diatur", - "unsaved files close app": "Ada berkas yang belum disimpan. Tutup aplikasi?", - "notice": "Melihat", - "open file": "Buka berkas", - "open files and folders": "Buka berkas dan folder", - "open folder": "Folder terbuka", - "open recent": "Terbuka baru-baru ini", - "ok": "baik", - "overwrite": "timpa", - "paste": "tempel", - "preview mode": "Mode pratinjau", - "read only file": "Tidak dapat menyimpan berkas hanya baca. Silakan coba simpan sebagai", - "redo defination": "mengulangi", - "reload": "memuat ulang", - "rename": "ganti nama", - "replace": "menggantikan", - "required": "Bagian ini diperlukan", - "run your web app": "Jalankan aplikasi web Anda", - "save": "menyimpan", - "saving": "penghematan", - "save as": "Simpan sebagai", - "save file to run": "Harap simpan file ini untuk dijalankan di browser", - "save here": "Simpan di sini", - "search": "pencarian", - "see logs and errors": "Lihat log dan kesalahan", - "select folder": "Pilih folder", - "settings": "pengaturan", - "settings saved": "Pengaturan disimpan", - "show line numbers": "Tampilkan nomor baris", - "show hidden files": "Tampilkan file tersembunyi", - "show spaces": "Tampilkan spasi", - "soft tab": "Tab lunak", - "sort by name": "Diurutkan berdasarkan nama", - "success": "berhasil", - "tab size": "Ukuran tab", - "text wrap": "Bungkus teks", - "theme": "Tema", - "unable to delete file": "tidak dapat menghapus berkas", - "unable to open file": "Maaf, tidak dapat membuka berkas", - "unable to open folder": "Maaf, tidak dapat membuka folder", - "unable to save file": "Maaf, tidak dapat menyimpan berkas", - "unable to rename": "Maaf, tidak dapat mengganti nama", - "unsaved file": "Berkas ini tidak disimpan, tutup?", - "warning": "peringatan", - "use emmet": "Gunakan emmet", - "use quick tools": "Gunakan alat cepat", - "yes": "Ya", - "github": "GitHub", - "encoding": "Pengkodean teks", - "syntax highlighting": "Penyorotan sintaksis", - "read only": "Baca saja", - "select all": "Pilih Semua", - "select branch": "Pilih cabang", - "create new branch": "Buat cabang baru", - "use branch": "Gunakan cabang", - "new branch": "Cabang baru", - "branch": "cabang", - "key bindings": "binding kunci", - "edit": "sunting", - "reset": "ulang", - "color": "warna", - "select word": "Pilih kata", - "quick tools": "Alat cepat", - "select": "Pilih", - "editor font": "Editor font", - "new project": "Projek baru", - "format": "format", - "project name": "Nama Projek", - "unsupported device": "Perangkat Anda tidak mendukung tema.", - "vibrate on tap": "Getar saat di ketuk", - "copy command is not supported by ftp.": "Perintah salin tidak didukung oleh ftp.", - "support title": "Dukung Acode", - "exit fullscreen": "Keluar dari layar penuh", - "fullscreen": "layar penuh", - "animation": "animasi", - "backup": "cadangkan", - "restore": "kembalikan", - "backup successful": "Backup berhasil", - "invalid backup file": "Berkas backup tidak valid", - "backup file found": "Berkas backup ditemukan, apakah Anda ingin mengembalikan pengaturan, key-bindings dan akun ftp dari berkas backup?", - "welcome back": "Selamat datang kembali", - "add path": "Tambahkan path", - "disable floating button": "Nonaktifkan tombol mengambang", - "live autocompletion": "penlengkapan otomatis live", - "file properties": "Properti-properti berkas", - "path": "Path", - "type": "Jenis", - "word count": "Jumlah kata", - "line count": "Jumlah baris", - "last modified": "Terakhir dimodifikasi", - "size": "Ukuran", - "share": "Bagikan", - "sdcard found": "Penyimpanan eksternal ditemukan! Apakah anda mau menambahkan itu?", - "allow storage": "Berikan izin untuk mengakses penyimpanan eksternal?", - "show print margin": "tunjukkan batas cetak", - "login": "masuk", - "scrollbar size": "Ukuran scrollbar", - "cursor controller size": "Ukuran pengontrol kursor", - "none": "tidak ada", - "small": "kecil", - "large": "besar", - "floating button": "Tombol mengambang", - "confirm on exit": "Konfirmasi saat keluar", - "other settings": "Pengaturan lainnya", - "show console": "Tampilkan konsol", - "image": "Gambar", - "insert file": "Masukkan berkas", - "insert color": "Masukkan warna", - "powersave mode warning": "Matikan mode hemat daya untuk mempratinjau di browser.", - "exit": "keluar", - "custom": "custom", - "theme type": "Tipe tema", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "file changed": "telah diubah, muat ulang berkas?", - "reset warning": "Apakah kamu yakin ingin menyetel ulang tema?", - "operation not permitted": "Operasi tidak diizinkan", - "no such file or directory": "tidak ada berkas atau direktori seperti itu", - "input/output error": "Input/output error", - "permission denied": "Izin ditolak", - "bad address": "Bad address", - "file exists": "Berkas telah ada", - "not a directory": "Bukan sebuah direktori", - "is a directory": "Is a directory", - "invalid argument": "Argumen tidak sah", - "too many open files in system": "Terlalu banyak berkas dibuka dalam sistem", - "too many open files": "Terlalu banyak berkas terbuka", - "text file busy": "Berkas text sibuk", - "no space left on device": "Tidak ada ruang tersisa di perangkat", - "read-only file system": "Read-only berkas sistem", - "file name too long": "Nama berkas terlalu panjang", - "too many users": "Terlalu banyak pengguna", - "connection timed out": "Koneksi habis", - "connection refused": "Koneksi ditolak", - "owner died": "Pemilik mati", - "an error occurred": "Terjadi kesalahan", - "add ftp": "Tambah FTP", - "add sftp": "Simpan SFTP", - "save file": "Simpan berkas", - "save file as": "Simpan berkas sebagai", - "files": "Files", - "help": "Help", - "support me": "Dukung saya", - "connecting": "Menghubungkan", - "file has been deleted": "{file} telah dihapus!", - "feature not available": "Fitur tidak tersedia.", - "deleted file": "Berkas yang dihapus", - "line height": "Tinggi garis", - "preview info": "Jika Anda ingin menjalankan berkas aktif, ketuk dan tahan ikon putar.", - "manage all files": "Izinkan editor Acode untuk mengelola semua file dalam pengaturan untuk mengedit berkas di perangkat Anda dengan mudah.", - "close file": "Tutup berkas", - "reset connections": "Setel ulang koneksi", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/ir-fa.json b/www/lang/ir-fa.json deleted file mode 100644 index 4fd2e5fcd..000000000 --- a/www/lang/ir-fa.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "lang": "فارسی - ترجمه صفا صفری", - "about": "درباره ما", - "active files": "فایلهای فعال", - "alert": "هشدار", - "app theme": "تم برنامه", - "autocorrect": "فعالسازی اصلاح خودکار؟", - "autosave": "ذخیره خودکار", - "beautify on save": "کد هنگام ذخیره مرتب سازی (زیباسازی)", - "cancel": "انصراف", - "change language": "انتخاب زبان", - "choose color": "انتخاب رنگ", - "clear": "واضح", - "close app": "خروج از برنامه؟", - "commit message": "تایید پیام", - "console": "خط فرمان", - "conflict error": "Conflict! Please wait before another commit.", - "copy": "کپی", - "create folder error": "متأسفم ، قادر به ایجاد پوشه جدید نیستم", - "cut": "برش", - "delete": "حذف", - "delete {name}": "{name} پاک شود؟", - "dependencies": "Dependencies", - "delay": "زمان در واحد میلی ثانیه", - "editor settings": "تنظیمات ویرایشگر", - "editor theme": "تم ویرایشگر", - "enter file name": "نام فایل را وارد کنید", - "enter folder name": "نام پوشه را وارد کنید", - "empty folder message": "پوشه خالی", - "enter line number": "شماره خط را وارد کنید", - "error": "خطا", - "except": "استثنا", - "failed": "ناموفق", - "file already exists": "فایل در حال حاضر موجود میباشد", - "file already exists force": "فایل در حال حاضر موجود میباشد ، رونویسی کنم؟", - "file changed": " تغییر یافت دوباره بارگزاری کنم؟", - "file deleted": "فایل پاک شده", - "file is not supported": "فایل پشتیبانی نمیشود", - "file not supported": "این نوع فایل پشتیبانی نمیشود.", - "file too large": "{size} فایل برای نمایش خیلی بزرگ است حداکثر اندازه فایل مجاز", - "file renamed": "نام فایل تغییر کرد", - "file saved": "فایل ذخیره شد", - "folder added": "فولدر ایجاد شد", - "folder already added": "پوشه قبلاً اضافه شده است", - "font size": "اندازه متن", - "goto": "برو به خط", - "icons definition": "تعریف آیکن ها", - "info": "اطلاعات", - "invalid value": "مقدار نامعتبر است", - "language changed": "زبان برنامه با موفقیت تغییر یافت", - "linting": "خطای علامتی را بررسی کنم", - "logout": "خروج", - "loading": "بارگذاری", - "my profile": "پروفایل من", - "new file": "فایل جدید", - "new folder": "پوشه جدید", - "no": "خیر", - "no editor message": "فایل را انتخاب کنید و یا فایل و پوشه جدید را در فهرست ایجاد کنید", - "not set": "تنظیم نشده", - "unsaved files close app": "در اینجا فایل ذخیره نشده وجود دارد ، از برنامه خارج میشوید؟", - "notice": "نکته", - "open file": "باز کردن فایل", - "open files and folders": "باز کردن فایل و پوشه", - "open folder": "بازکردن پوشه", - "open recent": "اخیراً را باز کنید", - "ok": "تایید", - "overwrite": "رونویسی", - "paste": "چسباندن", - "preview mode": "حالت پیش نمایش", - "read only file": "نمیتوانم فایل های فقط خواندنی(read only) را ویرایش کنم. گزینه (ذخیره به عنوان) را امتحان کنید.", - "redo defination": "پسرو", - "reload": "بارگذاری مجدد", - "rename": "تغییرنام", - "replace": "جایگذاری", - "required": "این فیلد لازم است", - "run your web app": "اجرای برنامه وب", - "save": "ذخیره", - "saving": "در حال ذخیره", - "save as": "ذخیره به عنوان", - "save file to run": "لطفا این فایل را ذخیره کنید تا در مرورگر اجرا شود", - "save here": "ذخیره در اینجا", - "search": "جست و جو", - "see logs and errors": "دیدن لاگ و خطا ها", - "select folder": "انتخاب پوشه", - "settings": "تنظیمات", - "settings saved": "تنظیمات ذخیره شد", - "show line numbers": "نمایش شماره خطوط", - "show hidden files": "نمایش فایلهای مخفی", - "show spaces": "نمایش فضاها", - "soft tab": "فاصله با دکمه 'tab'", - "sort by name": "مرتب سازی براساس نام", - "success": "موفق", - "tab size": "اندازه فاصله با دکمه tab", - "text wrap": "بسته بندی متن", - "theme": "تم", - "unable to delete file": "نمیتوانم فایل را حذف کنم", - "unable to open file": "متأسفم ، نمیتوانم فایل را باز کنم", - "unable to open folder": "متأسفم ، نمیتوانم پوشه را باز کنم", - "unable to save file": "متأسفم ، نمیتوانم فایل را ذخیره کنم", - "unable to rename": "متأسفم ، نمیتوانم نام فایل را تغیبر بدم", - "unsaved file": "این فایل ذخیره نشده ، خروج حتمی؟", - "warning": "هشدار", - "use emmet": "استفاده از emmet", - "use quick tools": "استفاده از ابزار سریع", - "yes": "بله", - "github": "GitHub", - "encoding": "رمزگذاری متن", - "syntax highlighting": "برجسته نحو", - "read only": "فقط خواندنی", - "select all": "انتخاب همه", - "select branch": "انتخاب شاخه", - "create new branch": "شعبه جدید ایجاد کنید", - "use branch": "از شاخه استفاده کنید", - "new branch": "شعبه جدید", - "branch": "branch", - "key bindings": "اتصالات کلیدی", - "edit": "ویرایش", - "reset": "تنظیم مجدد", - "color": "رنگ", - "select word": "کلمه را انتخاب کنید", - "quick tools": "ابزار سریع", - "select": "سره", - "editor font": "Editor font", - "new project": "پروژه جدید", - "format": "قالب", - "project name": "نام پروژه", - "unsupported device": "دستگاه شما از موضوع پشتیبانی نمی کند.", - "vibrate on tap": "Vibrate on tap", - "copy command is not supported by ftp.": "Copy command is not supported by FTP.", - "support title": "Support Acode", - "exit fullscreen": "Exit fullscreen", - "fullscreen": "fullscreen", - "animation": "animation", - "backup": "backup", - "restore": "restore", - "backup successful": "Backup successful", - "invalid backup file": "Invalid backup file", - "backup file found": "Backup file found, do you want to restore settings, key-bindings and ftp-accounts from backup file?", - "welcome back": "Welcome back", - "add path": "Add path", - "live autocompletion": "Live autocompletion", - "file properties": "File properties", - "path": "Path", - "type": "Type", - "word count": "Word count", - "line count": "Line count", - "last modified": "Last modified", - "size": "Size", - "share": "Share", - "sdcard found": "External storage found! Do you want to add it?", - "allow storage": "Give permission to access your external storage?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/it-it.json b/www/lang/it-it.json deleted file mode 100644 index 708a97bd2..000000000 --- a/www/lang/it-it.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Italiano", - "about": "Chi siamo", - "active files": "File aperti", - "alert": "Avviso", - "app theme": "Tema dell'app", - "autocorrect": "Vuoi attivate l'autocorrezione?", - "autosave": "Autosalvataggio", - "beautify on save": "Abbellisci al salvataggio", - "cancel": "indietro", - "change language": "Cambia la lingua", - "choose color": "Scegli il colore", - "clear": "cancella tutto", - "close app": "Vuoi chiudere l'applicazione?", - "commit message": "Commetti il messaggio", - "console": "Console", - "conflict error": "Errore di conflitto! Per favore aspetta prima di commettere di nuovo.", - "copy": "copia", - "create folder error": "Ci spiace, non è stato possibile creare una nuova cartella", - "cut": "taglia", - "delete": "Elimina", - "delete {name}": "Sei sicuro di voler eliminare {name}?", - "dependencies": "Dipendenze", - "delay": "Tempo in millisecondi", - "editor settings": "Impostazioni dell'editor", - "editor theme": "Tema dell'editor", - "enter file name": "Inserisci il nome del file", - "enter folder name": "Inserisci il nome della cartella", - "empty folder message": "La cartella è vuota", - "enter line number": "Inserisci il numero della linea", - "error": "errore", - "except": "eccetto", - "failed": "fallito", - "file already exists": "Il file esiste già", - "file already exists force": "Il file esiste già. Vuoi sovrascriverlo?", - "file changed": " è stato modificato, vuoi aprirlo?", - "file deleted": "file eliminato", - "file is not supported": "questo file non è supportato", - "file not supported": "Questo tipo di file non è supportato.", - "file too large": "Il file è troppo grande per caricarlo. La grandezza massima è {size}", - "file renamed": "il file è stato rinominato", - "file saved": "il file è stato salvato", - "folder added": "la cartella è stata aggiunta", - "folder already added": "la cartella è già stata aggiunta", - "font size": "Dimensioni dei caratteri", - "goto": "Vai alla linea", - "icons definition": "Definizione delle icone", - "info": "informazioni", - "invalid value": "Valore invalido", - "language changed": "la lingua è stata cambiata con successo", - "linting": "Controlla per degli errore di sintassi", - "logout": "Disconnetti", - "loading": "Caricamento", - "my profile": "Il mio profilp", - "new file": "Nuovo file", - "new folder": "Nuova cartella", - "no": "No", - "no editor message": "Apri o crea un nuovo file dal menu", - "not set": "Non settato", - "unsaved files close app": "Ci sono dei file non salvati. Vuoi chiudere l'applicazione?", - "notice": "Notizia", - "open file": "Apri file", - "open files and folders": "Apri file e cartelle", - "open folder": "Apri la cartella", - "open recent": "Apri file recenti", - "ok": "ok", - "overwrite": "sovrascrovi", - "paste": "incolla", - "preview mode": "modalità anteprima", - "read only file": "Impossibile salvare un file solo lettura. Per favore prova salva come", - "reload": "ricarica", - "rename": "rinomina", - "replace": "rimpiazza", - "required": "questo campo è richiesto", - "run your web app": "Avvia la tua app sul web", - "save": "salva", - "saving": "salvando", - "save as": "Salva come", - "save file to run": "Per favore salva questo file prima di eseguirlo sul web", - "save here": "Salva qui", - "search": "cerca", - "see logs and errors": "Guarda i log e gli errori", - "select folder": "Seleziona la cartella", - "settings": "impostazioni", - "settings saved": "impostazioni salvate", - "show line numbers": "Mostra i numeri delle linee", - "show hidden files": "Mostra i file nascosti", - "show spaces": "Mostra gli spazi", - "soft tab": "Linguetta morbida", - "sort by name": "Ordina per nome", - "success": "successo", - "tab size": "Grandezza della linguetta", - "text wrap": "A capo automatico", - "theme": "tema", - "unable to delete file": "non è stato possibile eliminare il file", - "unable to open file": "Ci spiace. non è stato possibile aprire il file", - "unable to open folder": "Ci spiace. non è stato possibile aprire la cartella", - "unable to save file": "Ci spiace. non è stato possibile salvare il file", - "unable to rename": "Ci spiace. non è stato possibile rinominare il file", - "unsaved file": "Questo file non è salvato. Vuoi chiudere comunque?", - "warning": "avviso", - "use emmet": "Usa emmet", - "use quick tools": "Usa gli attrezzo veloci", - "yes": "si", - "github": "GitHub", - "encoding": "Codifica del testo", - "syntax highlighting": "Evidenziazione della sintassi", - "read only": "Sola lettura", - "select all": "seleziona tutto", - "select branch": "Seleziona ramo", - "create new branch": "Crea un nuovo ramo", - "use branch": "Usa il ramo", - "new branch": "Nuovo ramo", - "branch": "ramo", - "key bindings": "associazione dei tasti", - "edit": "modifica", - "reset": "resetta", - "color": "colore", - "select word": "Seleziona parole", - "quick tools": "Strumenti veloci", - "select": "seleziona", - "editor font": "Font dell'editor", - "new project": "Nuovo progetto", - "format": "formato", - "project name": "Nome del progetto", - "unsupported device": "Il tuo dispositivo non supporta questo tema.", - "vibrate on tap": "Vibra al tocco", - "copy command is not supported by ftp.": "Il comando copia non è supportato da FTP.", - "support title": "Supporta Acode", - "exit fullscreen": "Esci dallo schermo intero", - "fullscreen": "schermo intero", - "animation": "animazioni", - "backup": "backup", - "restore": "ristabilire", - "backup successful": "Backup eseguito con successo", - "invalid backup file": "File di backup invalido", - "backup file found": "File di backup trovato, vuoi ristabilire le impostazioni, l'associazione dei tasti e gli account ftp di questo file di backup?", - "welcome back": "Bentornato", - "add path": "Aggiungi percorso", - "live autocompletion": "Autocompletazione dal vivo", - "file properties": "Proprietà del file", - "path": "Percorso", - "type": "Tipo", - "word count": "Numero delle parole", - "line count": "Numero dele linee", - "last modified": "Modificato l'ultima volta", - "size": "Grandezza", - "share": "Condividi", - "sdcard found": "Trovata una memoria esterna. Vuoi aggiungerla", - "allow storage": "Vuoi dare il permesso a Acode di accedere alla memoria esterna?", - "show print margin": "Mostra margini di stampa", - "login": "Accedi", - "scrollbar size": "Grandezza della barra di scorrimento", - "cursor controller size": "Dimensione del controller del cursore", - "none": "niente", - "small": "piccolo", - "large": "grande", - "floating button": "Bottone fluttuante", - "confirm on exit": "Conferma all'uscita", - "other settings": "Altre impostazioni", - "show console": "Mostra la console", - "image": "Immagine", - "insert file": "Inserisci un file", - "insert color": "Inserisci un colore", - "powersave mode warning": "Disatriva la modalità risparmio energetico per visualizzare l'anteprima in un browser esterno.", - "exit": "Esci", - "custom": "custom", - "reset warning": "Sei sicuro di voler resettare il tema?", - "theme type": "Tipo di tema", - "light": "chiaro", - "dark": "scuro", - "file browser": "Browser dei file", - "operation not permitted": "Azione nnon consentita", - "no such file or directory": "Nessun file o cartella simile trovato", - "input/output error": "Errore di input/output", - "permission denied": "Permesso negato", - "bad address": "Indirizzo invalido", - "file exists": "Il file esiste già", - "not a directory": "Non è una cartella", - "is a directory": "È una cartella", - "invalid argument": "Argomento invalido", - "too many open files in system": "Troppi file aperti nel sistema", - "too many open files": "Troppi file aperti", - "text file busy": "File di testo occupato", - "no space left on device": "La memoria del dispositivo è piena", - "read-only file system": "File di sistema solo lettura", - "file name too long": "Il nome del file è troppo lungo", - "too many users": "Troppi utenti", - "connection timed out": "La connessione è terminata", - "connection refused": "Connessione rifiutata", - "owner died": "Il proprietario è morto", - "an error occurred": "C'è stato un errore", - "add ftp": "Aggiungi FTP", - "add sftp": "Aggiungi SFTP", - "save file": "Salva il file", - "save file as": "Salva il file come", - "files": "Files", - "help": "Aiuto", - "support me": "Supportami", - "connecting": "Connettendo", - "file has been deleted": "{file} è stato eliminato!", - "feature not available": "Questa funzione è disponibile solo nella versione premium dell'app.", - "deleted file": "File eliminato", - "line height": "Altezza delle linee", - "preview info": "Se vuoi eseguire il file corrente clicca e tieni premuto il tasto play.", - "manage all files": "Da il permesso ad Acode di gestire i file nelle impostazioni a Acode editor per modificare facilmente i file sul tuo dispositivo.", - "close file": "Close file", - "reset connections": "Resetta le connessioni", - "check file changes": "Controlla cambiamenti nei file", - "open in browser": "Apri nel browser", - "desktop mode": "Modalità Desktop", - "toggle console": "Apri/chiudi la consolr", - "new line mode": "Modalità nuova linea", - "add a storage": "Aggiungi una memoria", - "rate acode": "Recensisci Acode", - "github login": "Login con GitHub", - "support": "Supporto", - "donate": "Dona {amount}", - "donation message": "Ci sono persone che non donano perché pensano che tutti gli altri lo fanno, e ci sono quelle che prendono la torcia e vanno avanti con quella. Grazie per ussere quest'ultimo, e per la tua gentilezza e la tua carità.", - "downloading file": "Scaricando {file}", - "downloading...": "Scaricando...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/ja-jp.json b/www/lang/ja-jp.json deleted file mode 100644 index 6e38f5e21..000000000 --- a/www/lang/ja-jp.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "日本語 (by wappo56)", - "about": "Acode editor", - "active files": "アクティブファイル", - "alert": "アラート", - "app theme": "アプリテーマ", - "autocorrect": "オートコレクトを有効にする", - "autosave": "オートセーブ", - "beautify on save": "保存時に整形", - "cancel": "キャンセル", - "change language": "言語変更", - "choose color": "カラー選択", - "clear": "クリア", - "close app": "アプリを終了しますか?", - "commit message": "コミットメッセージ", - "console": "コンソール", - "conflict error": "競合しました! 別のコミットまでしばらくお待ちください。", - "copy": "コピー", - "create folder error": "新規フォルダの作成に失敗しました。", - "cut": "切り取り", - "delete": "削除", - "delete {name}": "{name}を削除しますか?", - "dependencies": "依存設定", - "delay": "ミリ秒単位", - "editor settings": "エディタ設定", - "editor theme": "エディタテーマ", - "enter file name": "ファイル名入力", - "enter folder name": "フォルダ名入力", - "empty folder message": "フォルダ名が空です", - "enter line number": "行数の入力", - "error": "エラー", - "except": "除外", - "failed": "失敗", - "file already exists": "ファイルは既に存在します。", - "file already exists force": "ファイルは既に存在します。上書きしますか?", - "file changed": " は変更されました。, ファイルを再読み込みしますか?", - "file deleted": "ファイル削除", - "file is not supported": "未サポートファイル", - "file not supported": "このファイルタイプはサポートされていません。", - "file too large": "ファイルが大き過ぎて処理できません。許可される最大ファイルサイズは {size}", - "file renamed": "ファイル名変更", - "file saved": "ファイル保存", - "folder added": "フォルダ追加", - "folder already added": "フォルダ追加済み", - "font size": "フォントサイズ", - "goto": "行を移動", - "icons definition": "アイコン定義", - "info": "情報", - "invalid value": "無効な値", - "language changed": "言語設定を正常に変更しました", - "linting": "構文エラーのチェック", - "logout": "ログアウト", - "loading": "読み込み中", - "my profile": "マイプロフィール", - "new file": "新規ファイル", - "new folder": "新規フォルダ", - "no": "無効", - "no editor message": "メニューからファイルとフォルダを開くか新規作成してください", - "not set": "設定なし", - "unsaved files close app": "未保存のファイルがあります。アプリケーションを閉じますか?", - "notice": "お知らせ", - "open file": "ファイルを開く", - "open files and folders": "ファイルとフォルダを開く", - "open folder": "フォルダを開く", - "open recent": "最近のファイルを開く", - "ok": "OK", - "overwrite": "上書き", - "paste": "貼り付け", - "preview mode": "プレビューモード", - "read only file": "読み取り専用ファイルは保存できません。名前を付けて保存してください", - "reload": "再読み込み", - "rename": "ファイル名変更", - "replace": "置き換え", - "required": "この項目は必須です", - "run your web app": "ウェブアプリを実行", - "save": "保存", - "saving": "保存中", - "save as": "名前を付けて保存", - "save file to run": "このファイルを保存してブラウザで実行してください", - "save here": "ここに保存", - "search": "検索", - "see logs and errors": "ログとエラーの確認", - "select folder": "フォルダ選択", - "settings": "設定", - "settings saved": "設定を保存しました", - "show line numbers": "行数を表示する", - "show hidden files": "隠しファイルを表示する", - "show spaces": "スペースを表示する", - "soft tab": "ソフトタブ", - "sort by name": "名前順", - "success": "成功", - "tab size": "タブサイズ", - "text wrap": "テキスト折り返し", - "theme": "テーマ", - "unable to delete file": "ファイルを削除できません", - "unable to open file": "ファイルを開けません", - "unable to open folder": "フォルダを開けません", - "unable to save file": "ファイルを保存できません", - "unable to rename": "名前を変更できません", - "unsaved file": "保存されていませんが、閉じますか?", - "warning": "警告", - "use emmet": "Emmet使用", - "use quick tools": "クイックツール使用", - "yes": "有効", - "github": "GitHub", - "encoding": "テキストエンコード", - "syntax highlighting": "構文ハイライト", - "read only": "読み取り専用", - "select all": "すべて選択", - "select branch": "ブランチの選択", - "create new branch": "新規ブランチ作成", - "use branch": "ブランチを使用", - "new branch": "新規ブランチ", - "branch": "ブランチ", - "key bindings": "キーバインド", - "edit": "編集", - "reset": "リセット", - "color": "カラー", - "select word": "単語選択", - "quick tools": "クイックツール", - "select": "選択", - "editor font": "フォント", - "new project": "新規プロジェクト", - "format": "フォーマット", - "project name": "プロジェクト名", - "unsupported device": "お使いのデバイスはテーマをサポートしていません。", - "vibrate on tap": "タップ時に振動させる", - "copy command is not supported by ftp.": "FTPではCopyコマンドはサポートされていません。", - "support title": "Acodeをサポート", - "exit fullscreen": "フルスクリーンを終了", - "fullscreen": "フルスクリーン", - "animation": "アニメーション", - "backup": "バックアップ", - "restore": "復元", - "backup successful": "バックアップ成功", - "invalid backup file": "バックアップファイルが無効です", - "backup file found": "バックアップファイルが見つかりました。バックアップファイルから設定、キーバインド、FTPアカウントを復元しますか?", - "welcome back": "おかえりなさい", - "add path": "パスを追加", - "live autocompletion": "自動補完を実行", - "file properties": "ファイルプロパティ", - "path": "パス", - "type": "タイプ", - "word count": "文字数", - "line count": "行数", - "last modified": "最終更新", - "size": "サイズ", - "share": "共有", - "sdcard found": "外部ストレージが見つかりました!追加しますか?", - "allow storage": "外部ストレージへのアクセスを許可しますか?", - "show print margin": "印刷時の余白を表示", - "login": "ログイン", - "scrollbar size": "スクロールバーサイズ", - "cursor controller size": "カーソルコントローラーのサイズ", - "none": "なし", - "small": "小さい", - "large": "大きい", - "floating button": "フローティングボタン", - "confirm on exit": "アプリケーション終了時に確認", - "other settings": "その他の設定", - "show console": "コンソールを表示", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/kr-ko.json b/www/lang/kr-ko.json deleted file mode 100644 index 2d86f9aa8..000000000 --- a/www/lang/kr-ko.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "한국어", - "about": "정보", - "active files": "활성파일", - "alert": "경고", - "app theme": "앱 테마", - "autocorrect": "자동 완성 활성화", - "autosave": "자동 저장", - "beautify on save": "파일 확장자", - "cancel": "취소", - "change language": "언어 변경", - "choose color": "생상 선택", - "clear": "지우기", - "close app": "앱을 종료 하시겠습니까?", - "commit message": "커밋 메세지", - "console": "콘솔", - "conflict error": "충돌! 다른 커밋을 기다리세요", - "copy": "복사", - "create folder error": "새 폴더를 생성 할 수 없습니다.", - "cut": "잘라내기", - "delete": "삭제", - "delete {name}": "정말로 {name} 삭제 하시겠습니까?", - "dependencies": "Dependencies", - "delay": "밀리 초 시간 단위", - "editor settings": "편집기 설정", - "editor theme": "편집기 테마", - "enter file name": "파일 이름 입력", - "enter folder name": "폴더 이름 입력", - "empty folder message": "빈 폴더", - "enter line number": "라인 번호", - "error": "오류", - "except": "제외", - "failed": "실패", - "file already exists": "파일이 이미 존재 합니다.", - "file already exists force": "파일이 이미 존재 합니다. 덮어쓰시겠습니까?", - "file changed": "파일이 변경되었습니다. 다시 로드하시겠습니까?", - "file deleted": "파일 삭제", - "file is not supported": "지원하지 않는 파일", - "file not supported": "이 파일 유형은 지원하지 않습니다.", - "file too large": "파일이 너무 크고 처리할 수 없습니다. 최대 파일 크기:{size}", - "file renamed": "파일 이름 변경", - "file saved": "파일 저장 완료", - "folder added": "폴더 추가", - "folder already added": "이미 추가된 폴더입니다.", - "font size": "폰트 크기", - "goto": "행 이동", - "icons definition": "아이콘 정의", - "info": "정보", - "invalid value": "Invalid value", - "language changed": "성공적으로 언어가 변경되었습니다.", - "linting": "Check syntax error", - "logout": "로그아웃", - "loading": "Loading", - "my profile": "내 프로필", - "new file": "새로운 파일", - "new folder": "새로운 폴더", - "no": "아니오", - "no editor message": "메뉴에서 파일또는 폴더를 열거나 새로 작성", - "not set": "설정 안함", - "unsaved files close app": "저장안한 파일이 있습니다. 정말로 앱을 종료 하시겠습니까?", - "notice": "공지", - "open file": "파일 욜기", - "open files and folders": "폴더 또는 파일을 선택해 주세요", - "open folder": "폴더를 선택해 주세요", - "open recent": "최근 파일", - "ok": "확인", - "overwrite": "덮어쓰기", - "paste": "붙혀넣기", - "preview mode": "미리보기", - "read only file": "읽기 전용 파일은 보존되지 않습니다. 저장하세요", - "reload": "다시 불러오기", - "rename": "이름 변경", - "replace": "변경", - "required": "필수 항목입니다", - "run your web app": "웹 앱 실행", - "save": "저장", - "saving": "저장중", - "save as": "저장", - "save file to run": "파일을 저장하고 브라우저를 실행하세요", - "save here": "여기에 저장", - "search": "검색", - "see logs and errors": "로그와 오류 확인", - "select folder": "폴더 선택", - "settings": "설정", - "settings saved": "설정이 저장되었습니다", - "show line numbers": "라인 번호 ㅂ기", - "show hidden files": "숨긴 파일 보기", - "show spaces": "띄어쓰기 공간 보기", - "soft tab": "Soft tab", - "sort by name": "이름 정령", - "success": "완료", - "tab size": "Tab 크기", - "text wrap": "텍스트 반환", - "theme": "배경", - "unable to delete file": "파일을 삭제할 수 없습니다", - "unable to open file": "파일을 열수가 없습니다", - "unable to open folder": "폴더를 열수가 없습니다", - "unable to save file": "파일을 저장할 수 없습니다.", - "unable to rename": "파일 이름변경을 할 수 없습니다", - "unsaved file": "이 파일은 저장되있지 않습니다 닫으시겠습니까?", - "warning": "위험", - "use emmet": "Use emmet", - "use quick tools": "퀵 도구툴 사용", - "yes": "예", - "github": "GitHub", - "encoding": "인코딩", - "syntax highlighting": "구문 강조 표시", - "read only": "읽기 전용", - "select all": "모두 선택", - "select branch": "branch 선택", - "create new branch": "branch생성", - "use branch": "branch 사용", - "new branch": "새로운 branch", - "branch": "branch", - "key bindings": "단축키", - "edit": "수정", - "reset": "초기화", - "color": "색", - "select word": "단어 선택", - "quick tools": "퀵툴", - "select": "선택", - "editor font": "폰트", - "new project": "신규 프로젝트", - "format": "포맷", - "project name": "프로젝트 이름", - "unsupported device": "사용자의 디바이스는 지원하지 않습니다", - "vibrate on tap": "tap 할 때 진동", - "copy command is not supported by ftp.": "FTP에서 Copy명령은 지원되지 않습니다", - "support title": "Acode 후원", - "exit fullscreen": "풀스크린 종료", - "fullscreen": "풀 스크린", - "animation": "애니메이션", - "backup": "백업", - "restore": "복원", - "backup successful": "백업 완료", - "invalid backup file": "백업파일이 없습니다", - "backup file found": "백업 파일이 발견되었습니다. 복원하시겠습니까?", - "welcome back": "돌아온걸 환영합니다", - "add path": "경로추가", - "live autocompletion": "자동 완성실행", - "file properties": "파일 속성", - "path": "경로", - "type": "타입", - "word count": "문자수", - "line count": "행 수", - "last modified": "최종 갱신", - "size": "크기", - "share": "공유", - "sdcard found": "외부 저장소가 발견되었습니다. 추가하시겠습니까?", - "allow storage": "외부 저장소 접근을 허용하시겠습니까?", - "show print margin": "여백표시", - "login": "로그인", - "scrollbar size": "스크롤바 크기", - "cursor controller size": "커서 컨트로러 크기", - "none": "없음", - "small": "작은", - "large": "큰", - "floating button": "유동적인 버튼", - "confirm on exit": "엡 종료시 확인", - "other settings": "기타설정", - "show console": "콘솔 보기", - "image": "사진", - "insert file": "파일 삽입", - "insert color": "색 삽입", - "powersave mode warning": "외부 저장소에서 미리 확인하려면 절전모드를 종료해 주십쇼", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "exit": "Exit", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/ml-in.json b/www/lang/ml-in.json deleted file mode 100644 index c307c879a..000000000 --- a/www/lang/ml-in.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "മലയാളം", - "about": "കുറിച്ച്‌", - "active files": "സജീവ ഫയലുകൾ", - "alert": "ജാഗത", - "app theme": "ആപ്പ് പതിപാദം", - "autocorrect": "ഓട്ടോമാറ്റിക് തിരുത്തൽ പ്രവർത്തനക്ഷമമാക്കുക?", - "autosave": "ഓട്ടോമാറ്റിക് സൂക്ഷിക്കൽ", - "beautify on save": "സംരക്ഷിക്കുമ്പോൾ മനോഹരമാക്കുക", - "cancel": "റദ്ദാക്കുക", - "change language": "ഭാഷ മാറ്റുക", - "choose color": "നിറം തിരഞ്ഞെടുക്കുക", - "clear": "വൃത്തിയാക്കുക", - "close app": "ആപ്പിൽ നിന്ന് പുറത്ത് കടക്കണോ?", - "commit message": "സ്ഥിരീകരണ സന്ദേശം", - "console": "കൺസോൾ", - "conflict error": "സംഘർഷം! മറ്റൊരു കമ്മിറ്റിന് മുമ്പായി കാത്തിരിക്കുക.", - "copy": "പകർത്തുക", - "create folder error": "ക്ഷമിക്കണം, പുതിയ ഫോൾഡർ സൃഷ്ടിക്കാൻ കഴിയില്ല", - "cut": "കട്ട്", - "delete": "ഇല്ലാതാക്കുക", - "delete {name}": "{name} ഇല്ലാതാക്കുന്നോ?", - "dependencies": "ആശ്രിതത്വം", - "delay": "സമയം മില്ലിസെക്കൻഡിൽ", - "editor settings": "എഡിറ്റർ ക്രമീകരണങ്ങൾ", - "editor theme": "എഡിറ്റർ തീം", - "enter file name": "ഫയലിന്റെ പേര് നൽകുക", - "enter folder name": "ഫോൾഡറിന്റെ പേര് നൽകുക", - "empty folder message": "ശൂന്യമായ ഫോൾഡർ", - "enter line number": "ലൈൻ നമ്പർ നൽകുക", - "error": "പിശക്", - "except": "ഒഴികെ", - "failed": "പരാജയപ്പെട്ടു", - "file already exists": "ഫയൽ ഇതിനകം നിലവിലുണ്ട്", - "file already exists force": "ഫയൽ ഇതിനകം നിലവിലുണ്ട്. തിരുത്തിയെഴുതണോ?", - "file changed": " മാറ്റി, ഫയൽ വീണ്ടും ലോഡുചെയ്യണോ?", - "file deleted": "ഫയൽ ഇല്ലാതാക്കി", - "file is not supported": "ഫയൽ പിന്തുണയ്‌ക്കുന്നില്ല", - "file not supported": "ഈ ഫയൽ തരം പിന്തുണയ്‌ക്കുന്നില്ല.", - "file too large": "ഫയൽ കൈകാര്യം ചെയ്യാൻ കഴിയാത്തത്ര വലുതാണ്.{size} ആണ് പരമാവധി ഫയൽ വലുപ്പം.", - "file renamed": "ഫയലിന്റെ പേരുമാറ്റി", - "file saved": "ഫയൽ സംരക്ഷിച്ചു", - "folder added": "ഫോൾഡർ ചേർത്തു", - "folder already added": "ഫോൾഡർ മുന്വേതന്നെ ചേർത്തിരുന്നു", - "font size": "അക്ഷര വലിപ്പം", - "goto": "വരിയിലേക്ക് പോകുക", - "icons definition": "ഐക്കണുകളുടെ നിർവചനം", - "info": "വിവരം", - "invalid value": "അസാധുവായ മൂല്യം", - "language changed": "ഭാഷ വിജയകരമായി മാറ്റി", - "linting": "വാക്യഘടന പിശക് പരിശോധിക്കുക", - "logout": "ലോഗൗട്ട്", - "loading": "ലോഡിംഗ്", - "my profile": "എന്റെ പ്രൊഫൈൽ", - "new file": "പുതിയ ഫയൽ", - "new folder": "പുതിയ ഫോൾഡർ", - "no": "ഇല്ല", - "no editor message": "മെനുവിൽ നിന്ന് പുതിയ ഫയലും ഫോൾഡറും തുറക്കുക അല്ലെങ്കിൽ സൃഷ്ടിക്കുക", - "not set": "സജ്ജമാക്കിയിട്ടില്ല", - "unsaved files close app": "സംരക്ഷിക്കാത്ത ഫയലുകളുണ്ട്. അപ്ലിക്കേഷൻ അടയ്‌ക്കണോ?", - "notice": "ശ്രദ്ധിക്കുക", - "open file": "ഫയൽ തുറക്കുക", - "open files and folders": "ഫയലുകളും ഫോൾഡറുകളും തുറക്കുക", - "open folder": "ഫോൾഡർ തുറക്കുക", - "open recent": "അടുത്തിടെ തുറന്ന ഫയൽ തുറക്കുക", - "ok": "ശരി", - "overwrite": "പുനരാലേഖനം ചെയ്യുക", - "paste": "പേസ്റ്റ്", - "preview mode": "പ്രിവ്യൂ മോഡ്", - "read only file": "വായന മാത്രം ഫയൽ സംരക്ഷിക്കാൻ കഴിയില്ല!. ഇതായി സംരക്ഷിക്കുക ഉപയോഗിക്കുക", - "reload": "വീണ്ടും ലോഡുചെയ്യുക", - "rename": "പേരുമാറ്റുക", - "replace": "മാറ്റിസ്ഥാപിക്കുക", - "required": "ഈ ഫീൽഡ് പൂരിപ്പിക്കേണ്ടതുണ്ട്", - "run your web app": "നിങ്ങളുടെ വെബ് അപ്ലിക്കേഷൻ പ്രവർത്തിപ്പിക്കുക", - "save": "സംരക്ഷിക്കുക", - "saving": "സംരക്ഷിക്കുകയാണ്", - "save as": "ഇതായി സംരക്ഷിക്കുക", - "save file to run": "ബ്രൗസറിൽ പ്രവർത്തിക്കാൻ ഈ ഫയൽ സംരക്ഷിക്കുക", - "save here": "ഇവിടെ സംരക്ഷിക്കുക", - "search": "തിരയൽ", - "see logs and errors": "വിവരണപതികയും പിശകുകളും കാണുക", - "select folder": "ഫോൾഡർ തിരഞ്ഞെടുക്കുക", - "settings": "ക്രമീകരണങ്ങൾ", - "settings saved": "ക്രമീകരണങ്ങൾ സംരക്ഷിച്ചു", - "show line numbers": "ലൈൻ നമ്പറുകൾ കാണിക്കുക", - "show hidden files": "മറഞ്ഞിരിക്കുന്ന ഫയലുകൾ കാണിക്കുക", - "show spaces": "ഇടങ്ങൾ കാണിക്കുക", - "soft tab": "സോഫ്റ്റ് ടാബ്", - "sort by name": "പേര് പ്രകാരം ഇനം തിരിക്കുക", - "success": "വിജയം", - "tab size": "ടാബ് വലുപ്പം", - "text wrap": "ടെക്സ്റ്റ് റാപ്", - "theme": "പതിപാദം", - "unable to delete file": "ഫയൽ ഇല്ലാതാക്കാൻ കഴിയില്ല", - "unable to open file": "ക്ഷമിക്കണം, ഫയൽ തുറക്കാൻ കഴിഞ്ഞില്ല", - "unable to open folder": "ക്ഷമിക്കണം, ഫോൾഡർ തുറക്കാൻ കഴിഞ്ഞില്ല", - "unable to save file": "ക്ഷമിക്കണം, ഫയൽ സംരക്ഷിക്കാൻ കഴിഞ്ഞില്ല", - "unable to rename": "ക്ഷമിക്കണം, പേരുമാറ്റാൻ കഴിഞ്ഞില്ല", - "unsaved file": "ഈ ഫയൽ സംരക്ഷിച്ചിട്ടില്ല, എന്തായാലും അടയ്‌ക്കണോ?", - "warning": "മുന്നറിയിപ്പ്", - "use emmet": "എമ്മറ്റ് ഉപയോഗിക്കുക", - "use quick tools": "ദ്രുത ഉപകരണങ്ങൾ ഉപയോഗിക്കുക", - "yes": "അതെ", - "github": "GitHub", - "encoding": "ടെക്സ്റ്റ് എൻ‌കോഡിംഗ്", - "syntax highlighting": "സിന്റാക്സ് ഹൈലൈറ്റിംഗ്", - "read only": "വായിക്കാൻ മാത്രം", - "select all": "എല്ലാം തിരഞ്ഞെടുക്കുക", - "select branch": "ശാഖ തിരഞ്ഞെടുക്കുക", - "create new branch": "പുതിയ ശാഖ സൃഷ്ടിക്കുക", - "use branch": "ശാഖ ഉപയോഗിക്കുക", - "new branch": "പുതിയ ശാഖ", - "branch": "ശാഖ", - "key bindings": "കീ ബൈൻഡിംഗുകൾ", - "edit": "തിരുത്തുക", - "reset": "പുന: സജ്ജമാക്കുക", - "color": "നിറം", - "select word": "പദം തിരഞ്ഞെടുക്കുക", - "quick tools": "ദ്രുത ഉപകരണങ്ങൾ", - "select": "തിരഞ്ഞെടുക്കുക", - "editor font": "എഡിറ്റർ ഫോണ്ട്", - "new project": "പുതിയ പദ്ധതി", - "format": "രൂപകല്പന", - "project name": "പദ്ധതിയുടെ പേര്", - "unsupported device": "നിങ്ങളുടെ ഉപകരണം തീമിനെ പിന്തുണയ്‌ക്കുന്നില്ല.", - "vibrate on tap": "Vibrate on tap", - "copy command is not supported by ftp.": "Copy command is not supported by FTP.", - "support title": "Support Acode", - "exit fullscreen": "Exit fullscreen", - "fullscreen": "fullscreen", - "animation": "animation", - "backup": "backup", - "restore": "restore", - "backup successful": "Backup successful", - "invalid backup file": "Invalid backup file", - "backup file found": "Backup file found, do you want to restore settings, key-bindings and ftp-accounts from backup file?", - "welcome back": "Welcome back", - "add path": "Add path", - "live autocompletion": "Live autocompletion", - "file properties": "File properties", - "path": "Path", - "type": "Type", - "word count": "Word count", - "line count": "Line count", - "last modified": "Last modified", - "size": "Size", - "share": "Share", - "sdcard found": "External storage found! Do you want to add it?", - "allow storage": "Give permission to access your external storage?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/mm-unicode.json b/www/lang/mm-unicode.json deleted file mode 100644 index 3e749e4f4..000000000 --- a/www/lang/mm-unicode.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "ဗမာစာ (Unicode)", - "about": "ကျွန်တော်တို့အကြောင်း", - "active files": "လက်ရှိဖိုင်များ", - "alert": "သတိပေးချက်", - "app theme": "App Theme", - "autocorrect": "အလိုအလျောက်အမှားစစ်မည်လား?", - "autosave": "အလိုအလျောက်သိမ်းဆည်းမည်။", - "beautify on save": "ဖိုင်သိမ်းလျှင်လှအောင်လုပ်မှာလား?", - "cancel": "ပယ်ဖျက်မည်", - "change language": "ဘာသာစကားပြောင်းမည်", - "choose color": "အရောင်ရွေးပါ", - "clear": "ရှင်းလင်းပါ", - "close app": "ယခုဆော့ဝဲကိုပိတ်မှာလား?", - "commit message": "commit message", - "console": "console", - "conflict error": "လွဲနေပါသလာ?နောက် commit ကိုစောင့်ပါ။", - "copy": "ကူမည်", - "create folder error": "စိတ်မကောင်းပါဘူး။Folderတည်ဆောက်လို့မရပါဘူး။", - "cut": "ဖြတ်မည်", - "delete": "ဖျက်မည်", - "delete {name}": "{name} ကိုဖျက်မှာလား?", - "dependencies": "Dependencies", - "delay": "Time in milliseconds", - "editor settings": "Editor settings", - "editor theme": "Editor theme", - "enter file name": "File နာမည်ထည့်ပါ", - "enter folder name": "Folder နာမည်ထည့်ပါ", - "empty folder message": "Folder မရှိပါ", - "enter line number": "လိုင်းနံပါတ်ထည့်ပါ", - "error": "error", - "except": "except", - "failed": "မအောင်မြင်ပါ။ထပ်ကြိုးစားပါ။", - "file already exists": "File ရှိပြီးသားဖြစ်ပါသည်။", - "file already exists force": "File ရှိပြီးသားဖြစ်ပါသည်။File ကိုထပ်ရေးမည်လား။", - "file changed": " ပြောင်းလဲသွားပြီ။ဖိုင်ကိုပြန်ဖတ်ပါ။", - "file deleted": "file ဖျက်ပြီးပါပြီ", - "file is not supported": "file ကိုဖွင့်ဖို့ခွင့်မပြပါ", - "file not supported": "ယခု file ကိုဖွင့်ဖို့ခွင့်မပြုပါ", - "file too large": "File Size ကြီးလွန်းတယ်။အများဆုံး {size} ပဲထောက်ပံ့တယ်", - "file renamed": "file နာမည်ပြောင်းပြီးပါပြီ", - "file saved": "file သိမ်းပြီးပါပြီ။", - "folder added": "folder ကိုထပ်ပေါင်းထည့်ပြီးပါပြီ", - "folder already added": "folder ကထည့်ပြီးသားဖြစ်ပါတယ်", - "font size": "Font အရွယ်အစား", - "goto": "Go to line", - "icons definition": "Icons definition", - "info": "သတင်းအချက်အလက်", - "invalid value": "မမှန်ကန်သော value ဖြစ်သည်", - "language changed": "ဘာသာစကားကိုအောင်မြင်စွာပြောင်းလည်းပြီးပါပြီ။", - "linting": "syntax error စစ်ဆေးမည်", - "logout": "ထွက်မည်", - "loading": "ဖတ်နေတုန်း", - "my profile": "ကျွန်ုပ် Profile ", - "new file": "Fileအသစ်ဆောက်မည်", - "new folder": "Folder အသစ်ဆောက်မည်", - "no": "မဟုတ်ဘူး", - "no editor message": "ရှိပြီးသားဖိုင်ကိုဖွင့်မှာလား?(သို့မဟုတ်) App Menu မှFile (သိုမဟုတ်) Folder အသစ်တည်ဆောက်ပါ", - "not set": "Not set", - "unsaved files close app": "ဖိုင်မသိမ်းရသေးဘူး။ထွက်တော့မှာလား?", - "notice": "အသိပေးစာ", - "open file": "File ဖွင့်ပါ", - "open files and folders": "File နဲ့ Folder များကိုဖွင့်ပါ", - "open folder": "Folder ဖွင့်ပါ", - "open recent": "မကြာသေးခင်ကဖွင့်ထားများ", - "ok": "ok", - "overwrite": "ပြင်ရေးမည်", - "paste": "paste", - "preview mode": "Preview Mode", - "read only file": "ဖတ်ခွင့်ပဲပြုပါတယ်။သိမ်းလို့မရပါ။Save as နဲ့သိမ်းပါ", - "reload": "ပြန်ဖတ်မည်", - "rename": "နာမည်ပြန်ပေးမည်", - "replace": "အစားထိုးမည်", - "required": "လိုအပ်ပါတယ်", - "run your web app": "Web App ကို Run ပါ", - "save": "သိမ်းပါ", - "saving": "သိမ်းနေတုန်း", - "save as": "Save as", - "save file to run": "Browser မှာrun ဖို့ဖိုင်ကိုသိမ်းပါ", - "save here": "ယခုရောက်နေတဲ့နေရာမှာသိမ်းမည်", - "search": "ရှာမည်", - "see logs and errors": "logs errors တွေကိုမြင်လား?", - "select folder": "Folder ရွေးပါ", - "settings": "settings", - "settings saved": "Settings သိမ်းပြီးပါပြီ", - "show line numbers": "Line နံပါတ်များပြပါ", - "show hidden files": "ဝှက်ထားသည့်File များပြပါ", - "show spaces": "Space တွေပြပါ", - "soft tab": "Soft tab", - "sort by name": "နာမည်နဲ့စီပါ", - "success": "အောင်မြင်ပါတယ်။", - "tab size": "Tab အရွယ်အစား", - "text wrap": "Text wrap", - "theme": "theme", - "unable to delete file": "ဖိုင်ဖျက်လို့မရပါ", - "unable to open file": "ဝမ်းနည်းပါတယ်။ဖိုင်ဖွင့်မရပါ။", - "unable to open folder": "ဝမ်းနည်းပါတယ်။Folderဖွင့်မရပါ။", - "unable to save file": "ဝမ်းနည်းပါတယ်။ဖိုင်သိမ်းမရပါ။", - "unable to rename": "နာမည်ပြန်ပြောင်းလို့မရပါ", - "unsaved file": "ဖိုင်မသိမ်းရသေးဘူး။ဘာဖြစ်ဖြစ်ပိတ်မှာလား?", - "warning": "သတိ", - "use emmet": "Use emmet", - "use quick tools": "မြန်ဆန်စေမည့်ကိရိယာများသုံးမည်", - "yes": "ဟုတ်ပြီ", - "github": "GitHub", - "encoding": "Text encoding", - "syntax highlighting": "Syntax အရောင်", - "read only": "ဖတ်လို့ပဲရပါတယ်", - "select all": "အကုန်ရွေးပါ", - "select branch": "Branch ရွေးပါ", - "create new branch": "Branch အသစ်ဖန်တီးပါ", - "use branch": "Branch ကိုသုံးပါ", - "new branch": "Branch အသစ်", - "branch": "branch", - "key bindings": "Key bindings", - "edit": "ပြင်မည်", - "reset": "reset", - "color": "အရောင်", - "select word": "စကားလုံးရွေးမည်", - "quick tools": "Quick tools", - "select": "ရွေးမည်", - "editor font": "Editor font", - "new project": "Project အသစ်", - "format": "format", - "project name": "Project နာမည်", - "unsupported device": "ခင်ဗျား Device မှာ ယခု Theme ကိုမထောက်ပံ့ပါ။", - "vibrate on tap": "ထိထားရင်တုန်ပါ", - "copy command is not supported by ftp.": "FTPမှာကူယူတာကိုမထောက်ပံ့ပါ။", - "support title": "Acode ကိုထောက်ပံ့ပါ ❤️", - "exit fullscreen": "မျက်နှာပြင်အပြည့်မှထွက်မည်", - "fullscreen": "မျက်နှာပြင်အပြည့်", - "animation": "အထူးပြုလုပ်ချက်", - "backup": "အရံသိမ်းမည်", - "restore": "ပြန်လည်သိုလှောင်မည်", - "backup successful": "အရံသိမ်းတာအောင်မြင်ပါတယ်", - "invalid backup file": "အရံသိမ်းသည့် File ကမမှန်ကန်ပါ။", - "backup file found": "အရံ File တွေ့ပါတယ်။ Settingများ၊Key binding နှင့် FTP Account တွေကိုပြန်သိမ်းမှာလား", - "add path": "File ထားတဲ့နေရာထည့်ပါ", - "live autocompletion": "Live autocompletion", - "file properties": "File အချက်အလက်များ", - "path": "လမ်းကြောင်း", - "type": "အမျိုးအစား", - "word count": "စကားလုံးအရေအတွက်စုစုပေါင်း", - "line count": "Line အရေအတွက်စုစုပေါင်း", - "last modified": "နောက်ဆုံးပြင်ဆင်ခဲ့သည့်အချိန်", - "size": "Size", - "share": "မျှဝေမည်", - "sdcard found": "External storage တွေ့ပါတယ်!File လမ်ူကြောင်းအဖြစ်ထည့်မှာလား?", - "allow storage": "External Storage ကိုဖွင့်ခွင့်ပြုမှာလား?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar အရွယ်အစား", - "cursor controller size": "Cursor အရွယ်အစား", - "none": "none", - "small": "သေးမည်", - "large": "ကြီးမည်", - "floating button": "Floating button", - "confirm on exit": "App မှထွက်လျှင် Confirm Button နှိပ်ရမည်", - "other settings": "အခြား settings", - "show console": "console ကိုပြမည်", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "welcome back": "Welcome back", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/mm-zawgyi.json b/www/lang/mm-zawgyi.json deleted file mode 100644 index e751604c1..000000000 --- a/www/lang/mm-zawgyi.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "ဗမာစာ (Zawgyi)", - "about": "ကြၽန္ေတာ္တို႔အေၾကာင္း", - "active files": "လက္ရွိဖိုင္မ်ား", - "alert": "သတိေပးခ်က္", - "app theme": "App Theme", - "autocorrect": "အလိုအေလ်ာက္အမွားစစ္မည္လား?", - "autosave": "အလိုအေလ်ာက္သိမ္းဆည္းမည္။", - "beautify on save": "ဖိုင္သိမ္းလွ်င္လွေအာင္လုပ္မွာလား?", - "cancel": "ပယ္ဖ်က္မည္", - "change language": "ဘာသာစကားေျပာင္းမည္", - "choose color": "အေရာင္ေ႐ြးပါ", - "clear": "ရွင္းလင္းပါ", - "close app": "ယခုေဆာ့ဝဲကိုပိတ္မွာလား?", - "commit message": "commit message", - "console": "console", - "conflict error": "လြဲေနပါသလာ?ေနာက္ commit ကိုေစာင့္ပါ။", - "copy": "ကူမည္", - "create folder error": "စိတ္မေကာင္းပါဘူး။Folderတည္ေဆာက္လို႔မရပါဘူး။", - "cut": "ျဖတ္မည္", - "delete": "ဖ်က္မည္", - "delete {name}": "{name} ကိုဖ်က္မွာလား?", - "dependencies": "Dependencies", - "delay": "Time in milliseconds", - "editor settings": "Editor settings", - "editor theme": "Editor theme", - "enter file name": "File နာမည္ထည့္ပါ", - "enter folder name": "Folder နာမည္ထည့္ပါ", - "empty folder message": "Folder မရွိပါ", - "enter line number": "လိုင္းနံပါတ္ထည့္ပါ", - "error": "error", - "except": "except", - "failed": "မေအာင္ျမင္ပါ။ထပ္ႀကိဳးစားပါ။", - "file already exists": "File ရွိၿပီးသားျဖစ္ပါသည္။", - "file already exists force": "File ရွိၿပီးသားျဖစ္ပါသည္။File ကိုထပ္ေရးမည္လား။", - "file changed": " ေျပာင္းလဲသြားၿပီ။ဖိုင္ကိုျပန္ဖတ္ပါ။", - "file deleted": "file ဖ်က္ၿပီးပါၿပီ", - "file is not supported": "file ကိုဖြင့္ဖို႔ခြင့္မျပပါ", - "file not supported": "ယခု file ကိုဖြင့္ဖို႔ခြင့္မျပဳပါ", - "file too large": "File Size ႀကီးလြန္းတယ္။အမ်ားဆုံး {size} ပဲေထာက္ပံ့တယ္", - "file renamed": "file နာမည္ေျပာင္းၿပီးပါၿပီ", - "file saved": "file သိမ္းၿပီးပါၿပီ။", - "folder added": "folder ကိုထပ္ေပါင္းထည့္ၿပီးပါၿပီ", - "folder already added": "folder ကထည့္ၿပီးသားျဖစ္ပါတယ္", - "font size": "Font အ႐ြယ္အစား", - "goto": "Go to line", - "icons definition": "Icons definition", - "info": "သတင္းအခ်က္အလက္", - "invalid value": "မမွန္ကန္ေသာ value ျဖစ္သည္", - "language changed": "ဘာသာစကားကိုေအာင္ျမင္စြာေျပာင္းလည္းၿပီးပါၿပီ။", - "linting": "syntax error စစ္ေဆးမည္", - "logout": "ထြက္မည္", - "loading": "ဖတ္ေနတုန္း", - "my profile": "ကြၽန္ုပ္ Profile ", - "new file": "Fileအသစ္ေဆာက္မည္", - "new folder": "Folder အသစ္ေဆာက္မည္", - "no": "မဟုတ္ဘူး", - "no editor message": "ရွိၿပီးသားဖိုင္ကိုဖြင့္မွာလား?(သို႔မဟုတ္) App Menu မွFile (သိုမဟုတ္) Folder အသစ္တည္ေဆာက္ပါ", - "not set": "Not set", - "unsaved files close app": "ဖိုင္မသိမ္းရေသးဘူး။ထြက္ေတာ့မွာလား?", - "notice": "အသိေပးစာ", - "open file": "File ဖြင့္ပါ", - "open files and folders": "File နဲ႕ Folder မ်ားကိုဖြင့္ပါ", - "open folder": "Folder ဖြင့္ပါ", - "open recent": "မၾကာေသးခင္ကဖြင့္ထားမ်ား", - "ok": "ok", - "overwrite": "ျပင္ေရးမည္", - "paste": "paste", - "preview mode": "Preview Mode", - "read only file": "ဖတ္ခြင့္ပဲျပဳပါတယ္။သိမ္းလို႔မရပါ။Save as နဲ႕သိမ္းပါ", - "reload": "ျပန္ဖတ္မည္", - "rename": "နာမည္ျပန္ေပးမည္", - "replace": "အစားထိုးမည္", - "required": "လိုအပ္ပါတယ္", - "run your web app": "Web App ကို Run ပါ", - "save": "သိမ္းပါ", - "saving": "သိမ္းေနတုန္း", - "save as": "Save as", - "save file to run": "Browser မွာrun ဖို႔ဖိုင္ကိုသိမ္းပါ", - "save here": "ယခုေရာက္ေနတဲ့ေနရာမွာသိမ္းမည္", - "search": "ရွာမည္", - "see logs and errors": "logs errors ေတြကိုျမင္လား?", - "select folder": "Folder ေ႐ြးပါ", - "settings": "settings", - "settings saved": "Settings သိမ္းၿပီးပါၿပီ", - "show line numbers": "Line နံပါတ္မ်ားျပပါ", - "show hidden files": "ဝွက္ထားသည့္File မ်ားျပပါ", - "show spaces": "Space ေတြျပပါ", - "soft tab": "Soft tab", - "sort by name": "နာမည္နဲ႕စီပါ", - "success": "ေအာင္ျမင္ပါတယ္။", - "tab size": "Tab အ႐ြယ္အစား", - "text wrap": "Text wrap", - "theme": "theme", - "unable to delete file": "ဖိုင္ဖ်က္လို႔မရပါ", - "unable to open file": "ဝမ္းနည္းပါတယ္။ဖိုင္ဖြင့္မရပါ။", - "unable to open folder": "ဝမ္းနည္းပါတယ္။Folderဖြင့္မရပါ။", - "unable to save file": "ဝမ္းနည္းပါတယ္။ဖိုင္သိမ္းမရပါ။", - "unable to rename": "နာမည္ျပန္ေျပာင္းလို႔မရပါ", - "unsaved file": "ဖိုင္မသိမ္းရေသးဘူး။ဘာျဖစ္ျဖစ္ပိတ္မွာလား?", - "warning": "သတိ", - "use emmet": "Use emmet", - "use quick tools": "ျမန္ဆန္ေစမည့္ကိရိယာမ်ားသုံးမည္", - "yes": "ဟုတ္ၿပီ", - "github": "GitHub", - "encoding": "Text encoding", - "syntax highlighting": "Syntax အေရာင္", - "read only": "ဖတ္လို႔ပဲရပါတယ္", - "select all": "အကုန္ေ႐ြးပါ", - "select branch": "Branch ေ႐ြးပါ", - "create new branch": "Branch အသစ္ဖန္တီးပါ", - "use branch": "Branch ကိုသုံးပါ", - "new branch": "Branch အသစ္", - "branch": "branch", - "key bindings": "Key bindings", - "edit": "ျပင္မည္", - "reset": "reset", - "color": "အေရာင္", - "select word": "စကားလုံးေ႐ြးမည္", - "quick tools": "Quick tools", - "select": "ေ႐ြးမည္", - "editor font": "Editor font", - "new project": "Project အသစ္", - "format": "format", - "project name": "Project နာမည္", - "unsupported device": "ခင္ဗ်ား Device မွာ ယခု Theme ကိုမေထာက္ပံ့ပါ။", - "vibrate on tap": "ထိထားရင္တုန္ပါ", - "copy command is not supported by ftp.": "FTPမွာကူယူတာကိုမေထာက္ပံ့ပါ။", - "support title": "Acode ကိုေထာက္ပံ့ပါ ❤️", - "exit fullscreen": "မ်က္ႏွာျပင္အျပည့္မွထြက္မည္", - "fullscreen": "မ်က္ႏွာျပင္အျပည့္", - "animation": "အထူးျပဳလုပ္ခ်က္", - "backup": "အရံသိမ္းမည္", - "restore": "ျပန္လည္သိုေလွာင္မည္", - "backup successful": "အရံသိမ္းတာေအာင္ျမင္ပါတယ္", - "invalid backup file": "အရံသိမ္းသည့္ File ကမမွန္ကန္ပါ။", - "backup file found": "အရံ File ေတြ႕ပါတယ္။ Settingမ်ား၊Key binding ႏွင့္ FTP Account ေတြကိုျပန္သိမ္းမွာလား", - "add path": "File ထားတဲ့ေနရာထည့္ပါ", - "live autocompletion": "Live autocompletion", - "file properties": "File အခ်က္အလက္မ်ား", - "path": "လမ္းေၾကာင္း", - "type": "အမ်ိဳးအစား", - "word count": "စကားလုံးအေရအတြက္စုစုေပါင္း", - "line count": "Line အေရအတြက္စုစုေပါင္း", - "last modified": "ေနာက္ဆုံးျပင္ဆင္ခဲ့သည့္အခ်ိန္", - "size": "Size", - "share": "မွ်ေဝမည္", - "sdcard found": "External storage ေတြ႕ပါတယ္!File လမ္ူေၾကာင္းအျဖစ္ထည့္မွာလား?", - "allow storage": "External Storage ကိုဖြင့္ခြင့္ျပဳမွာလား?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar အ႐ြယ္အစား", - "cursor controller size": "Cursor အ႐ြယ္အစား", - "none": "none", - "small": "ေသးမည္", - "large": "ႀကီးမည္", - "floating button": "Floating button", - "confirm on exit": "App မွထြက္လွ်င္ Confirm Button ႏွိပ္ရမည္", - "other settings": "အျခား settings", - "show console": "console ကိုျပမည္", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "welcome back": "Welcome back", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/pl-pl.json b/www/lang/pl-pl.json deleted file mode 100644 index 17d81962d..000000000 --- a/www/lang/pl-pl.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Polski", - "about": "o aplikacji", - "active files": "Aktywne pliki", - "alert": "alert", - "app theme": "Motyw aplikacji", - "autocorrect": "Aktywować autokorektę?", - "autosave": "autozapis", - "beautify on save": "Upiększ przy zapisie", - "cancel": "anuluj", - "change language": "Zmień język", - "choose color": "Wybierz kolor", - "clear": "wyczyść", - "close app": "zamknąć aplikację?", - "commit message": "wiadomość zatwierdzenia (commita)", - "console": "konsola", - "conflict error": "Konflikt! Proszę poczekać przed następnym zatwierdzeniem (commitem).", - "copy": "kopiuj", - "create folder error": "Nie udało się utworzyć folderu", - "cut": "wytnij", - "delete": "Usuń", - "delete {name}": "Usunąć {name}?", - "dependencies": "Dependencies", - "delay": "Czas w milisekundach", - "editor settings": "Ustawienia edytora", - "editor theme": "Motyw edytora", - "enter file name": "Wprowadź nazwę pliku", - "enter folder name": "Wprowadź nazwę folderu", - "empty folder message": "Pusty folder", - "enter line number": "Wprowadź numer wiersza", - "error": "błąd", - "except": "wyjątek", - "failed": "nieudany", - "file already exists": "Plik już istnieje", - "file already exists force": "Plik istnieje. Nadpisać go?", - "file changed": " został zmodyfikowany, przeładować plik?", - "file deleted": "plik usunięty", - "file is not supported": "plik nie jest wspierany", - "file not supported": "Ten typ pliku nie jest wspierany.", - "file too large": "Plik jest zbyt duży. Maksymalny dozwolony rozmiar pliku to {size}", - "file renamed": "zmieniono nazwę pliku", - "file saved": "zapisano plik", - "folder added": "dodano folder", - "folder already added": "folder został już dodany", - "font size": "Rozmiar fontu", - "goto": "Przejdź do wiersza", - "icons definition": "Definicja ikon", - "info": "informacja", - "invalid value": "Nieprawidłowa wartość", - "language changed": "język został zmieniony pomyślnie", - "linting": "Sprawdź błąd składni", - "logout": "Wyloguj", - "loading": "Ładowanie", - "my profile": "Mój profil", - "new file": "Nowy plik", - "new folder": "Nowy folder", - "no": "Nie", - "no editor message": "Otwórz lub utwórz nowy plik i folder w menu", - "not set": "Nie ustalony", - "unsaved files close app": "Niektóre pliki nie zostały jeszcze zapisane. Zamknąć aplikację?", - "notice": "Komunikat", - "open file": "Otwórz plik", - "open files and folders": "Otwórz pliki i foldery", - "open folder": "Otwórz folder", - "open recent": "Otwórz najnowsze", - "ok": "ok", - "overwrite": "nadpisz", - "paste": "wklej", - "preview mode": "Tryb podglądu", - "read only file": "Nie można zapisać pliku tylko do odczytu. Spróbuj zapisać go opcją Zapisz jako", - "reload": "przeładuj", - "rename": "zmień nazwę", - "replace": "zastąp", - "required": "to pole jest wymagane", - "run your web app": "Uruchom swoją aplikację webową", - "save": "zapisz", - "saving": "zapisywanie", - "save as": "Zapisz jako", - "save file to run": "Proszę zapisać ten plik, aby uruchomić go w przeglądarce", - "save here": "Zapisz tutaj", - "search": "wyszukaj", - "see logs and errors": "Zobacz błędy i logi", - "select folder": "Wybierz folder", - "settings": "ustawienia", - "settings saved": "Ustawienia zapisane", - "show line numbers": "Pokaż numerowanie wierszy", - "show hidden files": "Pokaż ukryte pliki", - "show spaces": "Pokaż spacje", - "soft tab": "Miękka tabulacja", - "sort by name": "Sortuj według nazwy", - "success": "sukces", - "tab size": "Wielkość tabulacji", - "text wrap": "Zawijanie tekstu", - "theme": "motyw", - "unable to delete file": "nie można usunąć pliku", - "unable to open file": "Nie udało się otworzyć pliku", - "unable to open folder": "Nie udało się otworzyć folderu", - "unable to save file": "Nie udało się zapisać pliku", - "unable to rename": "Nie udało się zmienić nazwy", - "unsaved file": "Ten plik nie został zapisany, czy chcesz go zamknąć mimo to?", - "warning": "ostrzeżenie", - "use emmet": "Użyj emmet", - "use quick tools": "Użyj szybkich narzędzi", - "yes": "tak", - "github": "GitHub", - "encoding": "Kodowanie tekstu", - "syntax highlighting": "Podświetlenie składni", - "read only": "Tylko do odczytu", - "select all": "zaznacz wszystko", - "select branch": "Wybierz gałąź", - "create new branch": "Utwórz nową gałąź", - "use branch": "Użyj gałęzi", - "new branch": "Nowa gałąź", - "branch": "gałąź", - "key bindings": "Skróty klawiszowe", - "edit": "edycja", - "reset": "reset", - "color": "kolor", - "select word": "Wybierz słowo", - "quick tools": "Szybkie narzędzia", - "select": "wybierz", - "editor font": "Font edytora", - "new project": "Nowy projekt", - "format": "format", - "project name": "Nazwa projektu", - "unsupported device": "Twoje urządzenie nie wspiera tego motywu.", - "vibrate on tap": "Wibracja przy dotknięciu", - "copy command is not supported by ftp.": "Komenda copy nie jest wspierana przez serwer FTP.", - "support title": "Wesprzyj Acode", - "exit fullscreen": "Opuść pełny ekran", - "fullscreen": "pełny ekran", - "animation": "animacje", - "backup": "kopia zapasowa", - "restore": "przywracanie", - "backup successful": "Kopia zapasowa wykonana pomyślnie", - "invalid backup file": "Nieprawidłowy plik kopii zapasowej", - "backup file found": "Plik kopii zapasowej znaleziony, czy chcesz przywrócić ustawienia, skróty klawiszowe i konta FTP z pliku kopii?", - "welcome back": "Witamy z powrotem", - "add path": "Dodaj ścieżkę", - "live autocompletion": "Autouzupełnianie kodu", - "file properties": "Właściwości pliku", - "path": "Ścieżka", - "type": "Typ", - "word count": "Ilość słów", - "line count": "Ilość wierszy", - "last modified": "Ostatnia modyfikacja", - "size": "Rozmiar", - "share": "Udostępnij", - "sdcard found": "Znaleziono pamięć zewnętrzną! Czy chcesz ją dodać?", - "allow storage": "Zezwolić na dostęp do pamięci zewnętrznej?", - "show print margin": "Pokaż margines druku", - "login": "logowanie", - "scrollbar size": "Rozmiar scrollbaru", - "cursor controller size": "Cursor controller size", - "none": "żaden", - "small": "mały", - "large": "duży", - "floating button": "Pływający przycisk", - "confirm on exit": "Potwierdzenie przy wyjściu", - "other settings": "Inne", - "show console": "Pokaż konsolę", - "image": "Zdjęcie", - "insert file": "Wprowadź plik", - "insert color": "Wprowadź kolor", - "powersave mode warning": "Wyłącz tryb oszczędzania, aby wyświetlić w zewnętrznej przeglądarce.", - "exit": "Wyjście", - "custom": "niestandardowe", - "reset warning": "Czy na pewno chcesz zresetować ten motyw?", - "theme type": "Typ motywu", - "light": "jasny", - "dark": "ciemny", - "file browser": "Przeglądarka plików", - "operation not permitted": "Operacja niedozwolona", - "no such file or directory": "Brak takiego pliku lub katalogu", - "input/output error": "Błąd wejścia/wyjścia", - "permission denied": "Dostęp odmówiony", - "bad address": "Zły adres", - "file exists": "Plik istnieje", - "not a directory": "Nie jest katalogiem", - "is a directory": "Jest katalogiem", - "invalid argument": "Nieprawidłowy argument", - "too many open files in system": "Zbyt dużo otwartych plików w systemie", - "too many open files": "Zbyt dużo otwartych plików", - "text file busy": "Plik tekstowy zajęty", - "no space left on device": "Brak miejsca na urządzeniu", - "read-only file system": "System plików tylko do odczytu", - "file name too long": "Zbyt długa nazwa pliku", - "too many users": "Zbyt dużo użytkowników", - "connection timed out": "Zbyt długi okres oczekiwania na połączenie", - "connection refused": "Połączenie odrzucone", - "owner died": "Owner died", - "an error occurred": "Wystąpił problem", - "add ftp": "Dodaj FTP", - "add sftp": "Dodaj SFTP", - "save file": "Zapisz plik", - "save file as": "Zapisz plik jako", - "files": "Pliki", - "help": "Pomoc", - "support me": "Wesprzyj mnie", - "connecting": "Łączenie", - "file has been deleted": "{file} został usunięty!", - "feature not available": "Ta funkcja jest dostępna jedynie w płatnej wersji aplikacji.", - "deleted file": "Usunięte pliki", - "line height": "Wysokość wiersza", - "preview info": "Jeśli chcesz uruchomić aktualnie wybrany plik, kliknij i przytrzymaj ikonę odtwarzania.", - "manage all files": "Zezwól Acode zarządzać wszystkimi plikami w ustawieniach, aby z łatwością edytować pliki na twoim urządzeniu.", - "close file": "Zamknij plik", - "reset connections": "Zresetuj połączenia", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/pt-br.json b/www/lang/pt-br.json deleted file mode 100644 index b03508a0c..000000000 --- a/www/lang/pt-br.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "lang": "Português (Brasil)", - "about": "Sobre", - "active files": "Arquivos ativos", - "alert": "Alerta", - "app theme": "Tema do aplicativo", - "autocorrect": "Ativar autocorreção?", - "autosave": "Salvamento automático", - "beautify on save": "Embelezar ao salvar", - "cancel": "Cancelar", - "change language": "Alterar idioma", - "choose color": "Escolher cor", - "clear": "Limpar", - "close app": "Fechar a aplicação?", - "commit message": "Mensagem de commit", - "console": "Console", - "conflict error": "Conflito! Aguarde antes de realizar outro commit.", - "copy": "Copiar", - "create folder error": "Desculpe, não foi possível criar uma nova pasta.", - "cut": "Cortar", - "delete": "Excluir", - "delete {name}": "Excluir {name}?", - "dependencies": "Dependências", - "delay": "Intervalo em milissegundos", - "editor settings": "Configurações do editor", - "editor theme": "Tema do editor", - "enter file name": "Digite o nome do arquivo", - "enter folder name": "Digite o nome da pasta", - "empty folder message": "Pasta vazia", - "enter line number": "Digite o número da linha", - "error": "Erro", - "except": "Exceto", - "failed": "Falhou", - "file already exists": "O arquivo já existe", - "file already exists force": "O arquivo já existe. Sobrescrever?", - "file changed": " foi alterado. Recarregar arquivo?", - "file deleted": "Arquivo excluído", - "file is not supported": "não é suportado", - "file not supported": "Este tipo de arquivo não é suportado.", - "file too large": "O arquivo é grande demais para ser manuseado. O tamanho máximo permitido do arquivo é {size}", - "file renamed": "Arquivo renomeado", - "file saved": "Arquivo salvo", - "folder added": "Pasta adicionada", - "folder already added": "Pasta já adicionada", - "font size": "Tamanho da fonte", - "goto": "Ir para linha", - "icons definition": "Definição de ícones", - "info": "Informação", - "invalid value": "Valor inválido", - "language changed": "O idioma foi alterado com sucesso", - "linting": "Verificar erros de sintaxe", - "logout": "Sair", - "loading": "Carregando", - "my profile": "Meu perfil", - "new file": "Novo arquivo", - "new folder": "Nova pasta", - "no": "Não", - "no editor message": "Abra ou crie um novo arquivo e pasta pelo menu", - "not set": "Não configurado", - "unsaved files close app": "Existem arquivos não salvos. Fechar aplicação?", - "notice": "Aviso", - "open file": "Abrir arquivo", - "open files and folders": "Abrir arquivos e pastas", - "open folder": "Abrir pasta", - "open recent": "Abrir recente", - "ok": "Ok", - "overwrite": "sobrescrever", - "paste": "Colar", - "preview mode": "Modo de pré-visualização", - "read only file": "Não é possível salvar arquivos abertos em modo somente-leitura. Tente salvar como", - "redo defination": "Refazer", - "reload": "Recarregar", - "rename": "Renomear", - "replace": "Substituir", - "required": "Este campo é obrigatório", - "run your web app": "Execute seu aplicativo web", - "save": "Salvar", - "saving": "Salvando", - "save as": "Salvar como", - "save file to run": "Salve este arquivo para executar no navegador", - "save here": "Salvar aqui", - "search": "Pesquisar", - "see logs and errors": "Ver logs e erros", - "select folder": "Selecionar pasta", - "settings": "Configurações", - "settings saved": "Configurações salvas", - "show line numbers": "Mostrar números das linhas", - "show hidden files": "Mostrar arquivos ocultos", - "show spaces": "Mostrar espaços", - "soft tab": "Usar espaços em vez de tabs?", - "sort by name": "Classificar por nome", - "success": "Sucesso!", - "tab size": "Tamanho da indentação", - "text wrap": "Quebra de texto", - "theme": "Tema", - "unable to delete file": "Não é possível excluir o arquivo", - "unable to open file": "Desculpe, não foi possível abrir o arquivo", - "unable to open folder": "Desculpe, não foi possível abrir a pasta", - "unable to save file": "Desculpe, não foi possível salvar o arquivo", - "unable to rename": "Desculpe, não foi possível renomear", - "unsaved file": "Este arquivo não está salvo. Fechar mesmo assim?", - "warning": "Atenção", - "use emmet": "Usar emmet", - "use quick tools": "Usar ferramentas rápidas", - "yes": "Sim", - "github": "GitHub", - "encoding": "Codificação de texto", - "syntax highlighting": "Realce de sintaxe", - "read only": "Somente leitura", - "select all": "Selecionar tudo", - "select branch": "Selecionar branch", - "create new branch": "Criar nova branch", - "use branch": "Usar branch", - "new branch": "Nova branch", - "branch": "branch", - "key bindings": "Combinações de teclas", - "edit": "Editar", - "reset": "Redefinir", - "color": "Cor", - "select word": "Selecionar palavra", - "quick tools": "Ferramentas rápidas", - "select": "selecionar", - "editor font": "Fonte do editor", - "new project": "Novo projeto", - "format": "formatar", - "project name": "Nome do projeto", - "unsupported device": "O seu dispositivo não suporta o tema.", - "vibrate on tap": "Vibrar ao tocar", - "copy command is not supported by ftp.": "O comando Copiar não é suportado via FTP.", - "support title": "Apoiar Acode", - "exit fullscreen": "Sair da tela cheia", - "fullscreen": "tela cheia", - "animation": "animação", - "backup": "backup", - "restore": "restaurar", - "backup successful": "Backup feito com sucesso", - "invalid backup file": "Arquivo de backup inválido", - "backup file found": "Arquivo de backup encontrado, você deseja restaurar as configurações, combinações de teclas e contas FTP do arquivo de backup?", - "welcome back": "Bem vindo de volta", - "add path": "Adicionar caminho", - "live autocompletion": "Auto-completar ao vivo", - "file properties": "Propriedades do arquivo", - "path": "Caminho", - "type": "Tipo", - "word count": "Contagem de palavras", - "line count": "Contagem de linhas", - "last modified": "Última modificação", - "size": "Tamanho", - "share": "Compartilhar", - "sdcard found": "Armazenamento externo encontrado! Você quer adicioná-lo?", - "allow storage": "Dar permissão para acessar seu armazenamento externo?", - "show print margin": "Mostrar margem de impressão", - "login": "login", - "scrollbar size": "Tamanho da barra de rolagem", - "cursor controller size": "Tamanho do controlador do cursor", - "none": "nenhum", - "small": "pequeno", - "large": "grande", - "floating button": "Botão flutuante", - "confirm on exit": "Confirmar ao sair", - "other settings": "Outras configurações", - "show console": "Mostrar console", - "image": "Imagem", - "insert file": "Inserir arquivo", - "insert color": "Inserir cor", - "powersave mode warning": "Desligue o modo de economia de energia para pré-visualizar no navegador externo.", - "exit": "sair", - "custom": "personalizado", - "reset warning": "Tem certeza de que deseja redefinir o tema?", - "theme type": "Tipo de tema", - "light": "claro", - "dark": "escuro", - "file browser": "Navegador de Arquivos", - "operation not permitted": "Operação não permitida", - "no such file or directory": "Não existe tal arquivo ou diretório", - "input/output error": "Erro de entrada/saída", - "permission denied": "Permissão negada", - "bad address": "Endereço ruim", - "file exists": "O arquivo existe", - "not a directory": "Não é um diretório", - "is a directory": "É um diretório", - "invalid argument": "Argumento inválido", - "too many open files in system": "Muitos arquivos abertos no sistema", - "too many open files": "Muitos arquivos abertos", - "text file busy": "Arquivo de texto ocupado", - "no space left on device": "Sem espaço disponível no dispositivo", - "read-only file system": "Sistema de arquivos em modo de somente leitura", - "file name too long": "Nome de arquivo muito longo", - "too many users": "Muitos usuários", - "connection timed out": "Tempo limite de conexão esgotado", - "connection refused": "Conexão recusada", - "owner died": "Dono morreu", - "an error occurred": "Um erro ocorreu", - "add ftp": "Adicionar FTP", - "add sftp": "Adicionar SFTP", - "save file": "Salvar arquivo", - "save file as": "Salvar arquivo como", - "files": "Arquivos", - "help": "Ajuda", - "support me": "Me apoie", - "connecting": "Conectando", - "file has been deleted": "{file} foi excluído!", - "feature not available": "Este recurso está disponível apenas na versão paga do aplicativo.", - "deleted file": "Arquivo excluído", - "line height": "Altura da linha", - "preview info": "Se você quiser executar o arquivo ativo, toque e segure o ícone de reprodução.", - "manage all files": "Permita que o editor Acode gerencie todos os arquivos nas configurações para editar arquivos em seu dispositivo facilmente.", - "close file": "Fechar arquivo", - "reset connections": "Reiniciar conexões", - "check file changes": "Verificar as alterações do arquivo", - "open in browser": "Abrir no navegador", - "desktop mode": "Modo área de trabalho", - "toggle console": "Alternar console", - "new line mode": "Novo modo de linha", - "add a storage": "Adicionar um armazenamento", - "rate acode": "Avaliar Acode", - "github login": "Login no Github", - "support": "Suporte", - "donate": "Doar {amount}", - "donation message": "Há pessoas que não doam porque assumem que todo mundo doa, e há aqueles que pegam a tocha e correm com ela. Obrigado por ser o último, e por sua doação gentil e comovente.", - "downloading file": "Baixando {file}", - "downloading...": "Baixando...", - "folder name": "Nome da pasta", - "keyboard mode": "Modo do teclado", - "code": "Nenhuma sugestão", - "normal": "Mostrar sugestões", - "app settings": "Configurações do aplicativo" -} diff --git a/www/lang/pu-in.json b/www/lang/pu-in.json deleted file mode 100644 index d115628ac..000000000 --- a/www/lang/pu-in.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Punjabi (ਪੰਜਾਬੀ) by NiceSapien", - "about": "Acode ਬਾਰੇ", - "active files": "ਸਰਗਰਮ ਫਾਇਲ", - "alert": "ਚੇਤਾਵਨੀ", - "app theme": "ਐਪ ਥੀਮ", - "autocorrect": "ਕੀ ਸਵੈ-ਸੁਧਾਰ ਚਾਲੂ ਕਰਨਾ ਹੈ?", - "autosave": "ਆਟੋ ਸੇਵ", - "beautify on save": "ਸੇਵ 'ਤੇ ਸੁੰਦਰ ਬਣਾਓ", - "cancel": "ਰੱਦ", - "change language": "ਭਾਸ਼ਾ ਬਦਲੋ", - "choose color": "ਰੰਗ ਚੁਣੋ", - "clear": "ਸਾਫ਼", - "close app": "ਐਪਲੀਕੇਸ਼ਨ ਨੂੰ ਬੰਦ ਕਰਨਾ ਹੈ?", - "commit message": "ਸੁਨੇਹਾ ਵਚਨਬੱਧ ਕਰੋ", - "console": "ਕੰਸੋਲ", - "conflict error": "ਟਕਰਾਅ! ਕਿਰਪਾ ਕਰਕੇ ਇੱਕ ਹੋਰ ਵਚਨਬੱਧਤਾ ਤੋਂ ਪਹਿਲਾਂ ਉਡੀਕ ਕਰੋ।", - "copy": "ਕਾਪੀ", - "create folder error": "ਮਾਫ਼ ਕਰਨਾ, ਨਵਾਂ ਫੋਲਡਰ ਬਣਾਉਣ ਵਿੱਚ ਅਸਮਰੱਥ", - "cut": "ਕੱਟੋ", - "delete": "", - "delete {name}": "ਮਿਟਾਓ {name}?", - "dependencies": "ਨਿਰਭਰਤਾਵਾਂ", - "delay": "ਮਿਲੀਸਕਿੰਟ ਵਿੱਚ ਸਮਾਂ", - "editor settings": "ਸੰਪਾਦਕ ਸੈਟਿੰਗਾਂ", - "editor theme": "ਸੰਪਾਦਕ ਥੀਮ", - "enter file name": "ਫਾਈਲ ਦਾ ਨਾਮ ਦਰਜ ਕਰੋ", - "enter folder name": "ਫੋਲਡਰ ਦਾ ਨਾਮ ਦਰਜ ਕਰੋ", - "empty folder message": "ਖਾਲੀ ਫੋਲਡਰ", - "enter line number": "ਲਾਈਨ ਨੰਬਰ ਦਰਜ ਕਰੋ", - "error": "ਗਲਤੀ", - "except": "ਨੂੰ ਛੱਡ ਕੇ", - "failed": "ਅਸਫਲ", - "file already exists": "ਫ਼ਾਈਲ ਪਹਿਲਾਂ ਹੀ ਮੌਜੂਦ ਹੈ", - "file already exists force": "ਫ਼ਾਈਲ ਪਹਿਲਾਂ ਹੀ ਮੌਜੂਦ ਹੈ। ਓਵਰਰਾਈਟ ਕਰਨਾ ਹੈ?", - "file changed": " ਬਦਲਿਆ ਗਿਆ ਹੈ, ਫਾਈਲ ਰੀਲੋਡ ਕਰੋ?", - "file deleted": "ਫਾਇਲ ਨੂੰ ਹਟਾ ਦਿੱਤਾ ਗਿਆ ਹੈ", - "file is not supported": "ਫਾਈਲ ਸਮਰਥਿਤ ਨਹੀਂ ਹੈ", - "file not supported": "ਇਹ ਫਾਈਲ ਕਿਸਮ ਸਮਰਥਿਤ ਨਹੀਂ ਹੈ।", - "file too large": "ਹੈਂਡਲ ਕਰਨ ਲਈ ਫ਼ਾਈਲ ਬਹੁਤ ਵੱਡੀ ਹੈ। ਅਧਿਕਤਮ ਫਾਈਲ ਦਾ ਆਕਾਰ {size} ਹੈ", - "file renamed": "ਫਾਈਲ ਦਾ ਨਾਮ ਬਦਲ ਦਿੱਤਾ ਗਿਆ ਹੈ", - "file saved": "ਫਾਇਲ ਨੂੰ ਸੰਭਾਲਿਆ ਗਿਆ ਹੈ", - "folder added": "ਫੋਲਡਰ ਸ਼ਾਮਲ ਕੀਤਾ ਗਿਆ", - "folder already added": "folder already added", - "font size": "ਫੌਂਟ ਦਾ ਆਕਾਰ", - "goto": "ਲਾਈਨ 'ਤੇ ਜਾਓ", - "icons definition": "ਆਈਕਾਨ ਦੀ ਪਰਿਭਾਸ਼ਾ", - "info": "ਜਾਣਕਾਰੀ", - "invalid value": "ਅਵੈਧ ਮੁੱਲ", - "language changed": "ਭਾਸ਼ਾ ਨੂੰ ਸਫਲਤਾਪੂਰਵਕ ਬਦਲ ਦਿੱਤਾ ਗਿਆ ਹੈ", - "linting": "ਸੰਟੈਕਸ ਗਲਤੀ ਦੀ ਜਾਂਚ ਕਰੋ", - "logout": "ਲਾੱਗ ਆਊਟ", - "loading": "ਲੋਡ ਹੋ ਰਿਹਾ ਹੈ", - "my profile": "ਮੇਰੀ ਪ੍ਰੋਫਾਈਲ", - "new file": "ਨਵੀਂ ਫ਼ਾਈਲ", - "new folder": "ਨਵਾਂ ਫੋਲਡਰ", - "no": "ਨੰ", - "no editor message": "menu ਤੋਂ ਨਵੀਂ ਫਾਈਲ ਅਤੇ ਫੋਲਡਰ ਖੋਲ੍ਹੋ ਜਾਂ ਬਣਾਓ", - "not set": "ਸੈੱਟ ਨਹੀਂ ਹੈ", - "unsaved files close app": "ਅਣ-ਰੱਖਿਅਤ ਫਾਈਲਾਂ ਹਨ। ਐਪਲੀਕੇਸ਼ਨ ਨੂੰ ਬੰਦ ਕਰਨਾ ਹੈ?", - "notice": "ਨੋਟਿਸ", - "open file": "ਫਾਇਲ ਖੋਲੋ", - "open files and folders": "ਫਾਈਲਾਂ ਅਤੇ ਫੋਲਡਰ ਖੋਲ੍ਹੋ", - "open folder": "ਫੋਲਡਰ ਖੋਲ੍ਹੋ", - "open recent": "ਹਾਲੀਆ ਖੋਲ੍ਹੋ", - "ok": "ਠੀਕ ਹੈ", - "overwrite": "ਓਵਰਰਾਈਟ", - "paste": "ਚਿਪਕਾਓ", - "preview mode": "ਪੂਰਵਦਰਸ਼ਨ ਮੋਡ", - "read only file": "ਸਿਰਫ਼ ਪੜ੍ਹਨ ਵਾਲੀ ਫ਼ਾਈਲ ਨੂੰ ਸੁਰੱਖਿਅਤ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ। ਕਿਰਪਾ ਕਰਕੇ ਇਸ ਤੌਰ 'ਤੇ ਸੁਰੱਖਿਅਤ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰੋ", - "reload": "ਦੁਬਾਰਾ ਲੋਡ ਕਰੋ", - "rename": "ਨਾਮ ਬਦਲੋ", - "replace": "ਬਦਲੋ", - "required": "ਇਸ ਫੀਲਡ ਦੀ ਲੋੜ ਹੈ", - "run your web app": "ਆਪਣੀ ਵੈੱਬ ਐਪ ਚਲਾਓ", - "save": "ਸੇਵ", - "saving": "saving", - "save as": "ਬਤੌਰ ਮਹਿਫ਼ੂਜ਼ ਕਰੋ", - "save file to run": "ਕਿਰਪਾ ਕਰਕੇ ਇਸ ਫ਼ਾਈਲ ਨੂੰ ਬ੍ਰਾਊਜ਼ਰ ਵਿੱਚ ਚਲਾਉਣ ਲਈ ਸੇਵ ਕਰੋ", - "save here": "ਇੱਥੇ ਸੰਭਾਲੋ", - "search": "ਖੋਜ", - "see logs and errors": "ਲੌਗ ਅਤੇ ਤਰੁੱਟੀਆਂ ਦੇਖੋ", - "select folder": "ਫੋਲਡਰ ਚੁਣੋ", - "settings": "ਸੈਟਿੰਗਾਂ", - "settings saved": "ਸੈਟਿੰਗਾਂ ਸੁਰੱਖਿਅਤ ਕੀਤੀਆਂ ਗਈਆਂ", - "show line numbers": "ਲਾਈਨ ਨੰਬਰ ਦਿਖਾਓ", - "show hidden files": "ਲੁਕੀਆਂ ਹੋਈਆਂ ਫਾਈਲਾਂ ਦਿਖਾਓ", - "show spaces": "ਸਪੇਸ ਦਿਖਾਓ", - "soft tab": "ਸਾਫਟ ਟੈਬ", - "sort by name": "ਨਾਮ ਦੁਆਰਾ ਛਾਂਟੋ", - "success": "ਸਫਲਤਾ", - "tab size": "ਟੈਬ ਦਾ ਆਕਾਰ", - "text wrap": "ਟੈਕਸਟ ਰੈਪ", - "theme": "ਥੀਮ", - "unable to delete file": "ਫਾਈਲ ਨੂੰ ਮਿਟਾਉਣ ਵਿੱਚ ਅਸਮਰੱਥ", - "unable to open file": "ਮਾਫ਼ ਕਰਨਾ, ਫ਼ਾਈਲ ਖੋਲ੍ਹਣ ਵਿੱਚ ਅਸਮਰੱਥ", - "unable to open folder": "ਮਾਫ਼ ਕਰਨਾ, ਫੋਲਡਰ ਖੋਲ੍ਹਣ ਵਿੱਚ ਅਸਮਰੱਥ", - "unable to save file": "ਮਾਫ਼ ਕਰਨਾ, ਫ਼ਾਈਲ ਨੂੰ ਸੁਰੱਖਿਅਤ ਕਰਨ ਵਿੱਚ ਅਸਮਰੱਥ", - "unable to rename": "ਮਾਫ਼ ਕਰਨਾ, ਨਾਮ ਬਦਲਣ ਵਿੱਚ ਅਸਮਰੱਥ", - "unsaved file": "ਇਹ ਫਾਈਲ ਸੁਰੱਖਿਅਤ ਨਹੀਂ ਹੈ, ਫਿਰ ਵੀ ਬੰਦ ਕਰਨਾ ਹੈ?", - "warning": "ਚੇਤਾਵਨੀ", - "use emmet": "Emmet ਦੀ ਵਰਤੋਂ ਕਰੋ", - "use quick tools": "ਤੇਜ਼ ਸਾਧਨਾਂ ਦੀ ਵਰਤੋਂ ਕਰੋ", - "yes": "ਹਾਂ", - "github": "GitHub", - "encoding": "ਟੈਕਸਟ ਇੰਕੋਡਿੰਗ", - "syntax highlighting": "ਸਿੰਟੈਕਸ ਹਾਈਲਾਈਟਿੰਗ", - "read only": "ਸਿਰਫ ਪੜ੍ਹਨ ਲਈ", - "select all": "ਸਾਰਿਆ ਨੂੰ ਚੁਣੋ", - "select branch": "ਸ਼ਾਖਾ ਚੁਣੋ", - "create new branch": "ਨਵੀਂ ਸ਼ਾਖਾ ਬਣਾਓ", - "use branch": "ਸ਼ਾਖਾ ਦੀ ਵਰਤੋਂ ਕਰੋ", - "new branch": "ਨਵੀਂ ਸ਼ਾਖਾ", - "branch": "branch", - "key bindings": "ਕੁੰਜੀ ਬੰਧਨ", - "edit": "ਸੰਪਾਦਿਤ ਕਰੋ", - "reset": "ਰੀਸੈਟ", - "color": "ਰੰਗ", - "select word": "ਸ਼ਬਦ ਚੁਣੋ", - "quick tools": "ਤੇਜ਼ ਟੂਲ", - "select": "ਚੁਣੋ", - "editor font": "ਸੰਪਾਦਕ ਫੌਂਟ", - "new project": "ਨਵਾਂ ਪ੍ਰੋਜੈਕਟ", - "format": "ਫਾਰਮੈਟ", - "project name": "ਪ੍ਰੋਜੈਕਟ ਦਾ ਨਾਮ", - "unsupported device": "ਤੁਹਾਡੀ ਡਿਵਾਈਸ ਥੀਮ ਦਾ ਸਮਰਥਨ ਨਹੀਂ ਕਰਦੀ ਹੈ।", - "vibrate on tap": "ਟੈਪ 'ਤੇ ਵਾਈਬ੍ਰੇਟ ਕਰੋ", - "copy command is not supported by ftp.": "ਕਾਪੀ ਕਮਾਂਡ FTP ਦੁਆਰਾ ਸਮਰਥਿਤ ਨਹੀਂ ਹੈ।", - "support title": "Acode ਦਾ ਸਮਰਥਨ ਕਰੋ", - "exit fullscreen": "ਪੂਰੀ ਸਕ੍ਰੀਨ ਤੋਂ ਬਾਹਰ ਜਾਓ", - "fullscreen": "ਪੂਰਾ ਸਕਰੀਨ", - "animation": "ਐਨੀਮੇਸ਼ਨ", - "backup": "ਬੈਕਅੱਪ", - "restore": "ਬਹਾਲ", - "backup successful": "ਬੈਕਅੱਪ ਸਫਲ", - "invalid backup file": "ਅਵੈਧ ਬੈਕਅੱਪ ਫ਼ਾਈਲ", - "backup file found": "ਬੈਕਅੱਪ ਫਾਈਲ ਮਿਲੀ, ਕੀ ਤੁਸੀਂ ਬੈਕਅੱਪ ਫਾਈਲ ਤੋਂ ਸੈਟਿੰਗਾਂ, ਕੀ-ਬਾਈਡਿੰਗ ਅਤੇ ftp-ਖਾਤਿਆਂ ਨੂੰ ਰੀਸਟੋਰ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ?", - "welcome back": "ਵਾਪਸ ਸਵਾਗਤ", - "add path": "ਫੋਲਡਰ ਸ਼ਾਮਲ ਕਰੋ", - "live autocompletion": "ਲਾਈਵ ਸਵੈ-ਸੰਪੂਰਨਤਾ", - "file properties": "ਫਾਈਲ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ", - "path": "ਮਾਰਗ", - "type": "ਟਾਈਪ", - "word count": "ਸ਼ਬਦ ਗਿਣਤੀ", - "line count": "ਲਾਈਨਾਂ ਦੀ ਗਿਣਤੀ", - "last modified": "ਪਿਛਲੀ ਵਾਰ ਸੋਧਿਆ ਗਿਆ", - "size": "ਆਕਾਰ", - "share": "ਸ਼ੇਅਰ", - "sdcard found": "ਬਾਹਰੀ ਸਟੋਰੇਜ ਮਿਲੀ! ਕੀ ਤੁਸੀਂ ਇਸਨੂੰ ਜੋੜਨਾ ਚਾਹੁੰਦੇ ਹੋ?", - "allow storage": "ਕੀ ਤੁਹਾਡੀ ਬਾਹਰੀ ਸਟੋਰੇਜ ਤੱਕ ਪਹੁੰਚ ਕਰਨ ਦੀ ਇਜਾਜ਼ਤ ਦੇਣੀ ਹੈ?", - "show print margin": "ਪ੍ਰਿੰਟ ਮਾਰਜਿਨ ਦਿਖਾਓ", - "login": "ਲਾਗਿਨ", - "scrollbar size": "ਸਕ੍ਰੋਲਬਾਰ ਦਾ ਆਕਾਰ", - "cursor controller size": "ਕਰਸਰ ਕੰਟਰੋਲਰ ਦਾ ਆਕਾਰ", - "none": "ਕੋਈ ਨਹੀਂ", - "small": "ਛੋਟਾ", - "large": "ਵੱਡਾ", - "floating button": "ਫਲੋਟਿੰਗ ਬਟਨ", - "confirm on exit": "ਬੰਦ ਹੋਣ ਦੀ ਪੁਸ਼ਟੀ ਕਰੋ", - "other settings": "ਹੋਰ ਸੈਟਿੰਗਾਂ", - "show console": "ਕੰਸੋਲ ਦਿਖਾਓ", - "image": "ਚਿੱਤਰ", - "insert file": "ਫਾਈਲ ਸ਼ਾਮਲ ਕਰੋ", - "insert color": "ਰੰਗ ਪਾਓ", - "powersave mode warning": "ਬਾਹਰੀ ਬ੍ਰਾਊਜ਼ਰ ਵਿੱਚ ਪ੍ਰੀਵਿਊ ਕਰਨ ਲਈ ਪਾਵਰ ਸੇਵਿੰਗ ਮੋਡ ਨੂੰ ਬੰਦ ਕਰੋ।", - "exit": "ਨਿਕਾਸ", - "custom": "ਪ੍ਰਥਾ", - "reset warning": "ਕੀ ਤੁਸੀਂ ਯਕੀਨੀ ਤੌਰ 'ਤੇ ਥੀਮ ਨੂੰ ਰੀਸੈਟ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ?", - "theme type": "ਥੀਮ ਦੀ ਕਿਸਮ", - "light": "ਰੋਸ਼ਨੀ", - "dark": "ਹਨੇਰ", - "file browser": "ਫਾਈਲ ਬ੍ਰਾਊਜ਼ਰ", - "operation not permitted": "ਓਪਰੇਸ਼ਨ ਦੀ ਇਜਾਜ਼ਤ ਨਹੀਂ ਹੈ", - "no such file or directory": "ਅਜਿਹੀ ਕੋਈ ਫਾਇਲ ਜਾਂ ਨਿਰਦੇਸ਼ਿਕਾ ਨਹੀਂ", - "input/output error": "ਇਨਪੁਟ/ਆਊਟਪੁੱਟ ਗਲਤੀ", - "permission denied": "ਆਗਿਆ ਤੋਂ ਇਨਕਾਰ", - "bad address": "ਮਾੜਾ ਪਤਾ", - "file exists": "ਫਾਈਲ ਮੌਜੂਦ ਹੈ", - "not a directory": "ਡਾਇਰੈਕਟਰੀ ਨਹੀਂ", - "is a directory": "ਇੱਕ ਡਾਇਰੈਕਟਰੀ ਹੈ", - "invalid argument": "ਅਵੈਧ ਦਲੀਲ", - "too many open files in system": "ਸਿਸਟਮ ਵਿੱਚ ਬਹੁਤ ਸਾਰੀਆਂ ਖੁੱਲ੍ਹੀਆਂ ਫਾਈਲਾਂ", - "too many open files": "ਬਹੁਤ ਸਾਰੀਆਂ ਖੁੱਲ੍ਹੀਆਂ ਫ਼ਾਈਲਾਂ", - "text file busy": "ਟੈਕਸਟ ਫਾਈਲ ਵਿਅਸਤ ਹੈ", - "no space left on device": "ਡਿਵਾਈਸ 'ਤੇ ਕੋਈ ਥਾਂ ਨਹੀਂ ਬਚੀ ਹੈ", - "read-only file system": "ਸਿਰਫ਼-ਪੜ੍ਹਨ ਲਈ ਫਾਈਲ ਸਿਸਟਮ", - "file name too long": "ਫ਼ਾਈਲ ਦਾ ਨਾਮ ਬਹੁਤ ਲੰਮਾ ਹੈ", - "too many users": "ਬਹੁਤ ਸਾਰੇ ਉਪਭੋਗਤਾ", - "connection timed out": "ਕਨੈਕਸ਼ਨ ਦਾ ਸਮਾਂ ਸਮਾਪਤ ਹੋਇਆ", - "connection refused": "ਸੰਬੰਧ ਠੁਕਰਾਉਣਾ", - "owner died": "ਮਾਲਕ ਦੀ ਮੌਤ ਹੋ ਗਈ", - "an error occurred": "ਇੱਕ ਗਲਤੀ ਆਈ ਹੈ", - "add ftp": "FTP ਸ਼ਾਮਲ ਕਰੋ", - "add sftp": "SFTP ਸ਼ਾਮਲ ਕਰੋ", - "save file": "ਫਾਈਲ ਸੇਵ ਕਰੋ", - "save file as": "ਫਾਈਲ ਨੂੰ ਇਸ ਤਰ੍ਹਾਂ ਸੇਵ ਕਰੋ", - "files": "ਫਾਈਲਾਂ", - "help": "ਮਦਦ", - "support me": "ਮੇਰਾ ਸਮਰਥਨ ਕਰੋ", - "connecting": "ਜੁੜ ਰਿਹਾ ਹੈ", - "file has been deleted": "{file} ਮਿਟਾ ਦਿੱਤਾ ਗਿਆ ਹੈ!", - "feature not available": "ਇਹ ਵਿਸ਼ੇਸ਼ਤਾ ਐਪ ਦੇ ਭੁਗਤਾਨ ਕੀਤੇ ਸੰਸਕਰਣ ਵਿੱਚ ਹੀ ਉਪਲਬਧ ਹੈ।", - "deleted file": "ਮਿਟਾਈ ਗਈ ਫਾਈਲ", - "line height": "ਲਾਈਨ ਦੀ ਉਚਾਈ", - "preview info": "ਜੇਕਰ ਤੁਸੀਂ ਐਕਟਿਵ ਫਾਈਲ ਨੂੰ ਚਲਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ, ਤਾਂ ਪਲੇ ਆਈਕਨ 'ਤੇ ਟੈਪ ਕਰੋ ਅਤੇ ਹੋਲਡ ਕਰੋ।", - "manage all files": "Acode ਸੰਪਾਦਕ ਨੂੰ ਤੁਹਾਡੀ ਡਿਵਾਈਸ 'ਤੇ ਆਸਾਨੀ ਨਾਲ ਫਾਈਲਾਂ ਨੂੰ ਸੰਪਾਦਿਤ ਕਰਨ ਲਈ ਸੈਟਿੰਗਾਂ ਵਿੱਚ ਸਾਰੀਆਂ ਫਾਈਲਾਂ ਦਾ ਪ੍ਰਬੰਧਨ ਕਰਨ ਦਿਓ", - "close file": "ਫਾਈਲ ਬੰਦ ਕਰੋ", - "reset connections": "ਕਨੈਕਸ਼ਨ ਰੀਸੈਟ ਕਰੋ", - "check file changes": "ਫਾਈਲ ਤਬਦੀਲੀਆਂ ਦੀ ਜਾਂਚ ਕਰੋ", - "open in browser": "ਬ੍ਰਾਊਜ਼ਰ ਵਿੱਚ ਖੋਲ੍ਹੋ", - "desktop mode": "ਡੈਸਕਟਾਪ ਮੋਡ", - "toggle console": "ਕੰਸੋਲ ਟੌਗਲ ਕਰੋ", - "new line mode": "ਨਵਾਂ ਲਾਈਨ ਮੋਡ", - "add a storage": "ਸਟੋਰੇਜ ਸ਼ਾਮਲ ਕਰੋ", - "rate acode": "Acode ਨੂੰ ਰੇਟ ਕਰੋ (NiceSapien ਦੁਆਰਾ ਪੰਜਾਬੀ ਅਨੁਵਾਦ)", - "github login": "Github ਲਾਗਇਨ", - "support": "ਸਪੋਰਟ", - "donate": "ਦਾਨ ਕਰੋ {amount}", - "donation message": "ਅਜਿਹੇ ਲੋਕ ਹਨ ਜੋ ਦਾਨ ਨਹੀਂ ਕਰਦੇ ਕਿਉਂਕਿ ਉਹ ਮੰਨਦੇ ਹਨ ਕਿ ਹਰ ਕੋਈ ਹੈ, ਅਤੇ ਅਜਿਹੇ ਲੋਕ ਹਨ ਜੋ ਟਾਰਚ ਨੂੰ ਚੁੱਕਦੇ ਹਨ ਅਤੇ ਇਸ ਨਾਲ ਦੌੜਦੇ ਹਨ। ਤੁਹਾਡੇ ਦਿਆਲੂ ਅਤੇ ਦਿਲਕਸ਼ ਦਾਨ ਲਈ ਤੁਹਾਡਾ ਧੰਨਵਾਦ।", - "downloading file": "ਡਾਊਨਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ {file}", - "downloading...": "ਡਾਊਨਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/ru-ru.json b/www/lang/ru-ru.json deleted file mode 100644 index 4ba839681..000000000 --- a/www/lang/ru-ru.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "lang": "Русский", - "about": "О приложении", - "active files": "Открытые файлы", - "alert": "Оповещение", - "app theme": "Тема приложения", - "autocorrect": "Автозамена", - "autosave": "Автосохранение", - "beautify on save": "Использовать Beautify при сохранении", - "cancel": "Отмена", - "change language": "Изменить язык", - "choose color": "Выберите цвет", - "clear": "Очистить", - "close app": "Закрыть приложение?", - "commit message": "Коммит сообщение", - "console": "Консоль", - "conflict error": "Конфликт! Пожалуйста, подождите, прежде чем сделать коммит", - "copy": "Копировать", - "create folder error": "Не удалось создать новую папку", - "cut": "Вырезать", - "delete": "Удалить", - "delete {name}": "Удалить {name}?", - "dependencies": "Зависимости", - "delay": "Время в миллисекундах", - "editor settings": "Настройки", - "editor theme": "Тема", - "enter file name": "Введите имя файла", - "enter folder name": "Введите имя папки", - "empty folder message": "Пустая папка", - "enter line number": "Введите номер строки", - "error": "Ошибка", - "except": "Кроме", - "failed": "Неудача", - "file already exists": "Файл уже существует", - "file already exists force": "Файл уже существует. Перезаписать?", - "file changed": " был изменен, перезагрузить файл?", - "file deleted": "Файл удален", - "file is not supported": "Файл не поддерживается", - "file not supported": "Тип файла не поддерживается.", - "file too large": "Файл слишком большой. Допустимый размер {size}", - "file renamed": "Файл переименован", - "file saved": "Файл сохранен", - "folder added": "Папка добавлена", - "folder already added": "Папка уже добавлена", - "font size": "Размер шрифта", - "goto": "Перейти к строке", - "icons definition": "Определение значков", - "info": "Информация", - "invalid value": "Неверное значение", - "language changed": "Язык успешно изменен", - "linting": "Проверять синтаксические ошибки", - "logout": "Выйти", - "loading": "Загрузка", - "my profile": "Мой профиль", - "new file": "Новый файл", - "new folder": "Новая папка", - "no": "Нет", - "no editor message": "Открой или создай новый файл", - "not set": "Не задано", - "unsaved files close app": "Имеются несохраненные файлы. Всё равно выходим?", - "notice": "Уведомление", - "open file": "Открыть файл", - "open files and folders": "Открытые файлы и папки", - "open folder": "Открыть папку", - "open recent": "Открыть недавние", - "ok": "Ок", - "overwrite": "Перезаписать", - "paste": "Вставить", - "preview mode": "Режим предварительного просмотра", - "read only file": "Файл открыт только для чтения", - "redo defination": "Вернуть предыдущее изменение", - "reload": "Перезагрузить", - "rename": "Переименовать", - "replace": "Заменить", - "required": "Это поле обязательно к заполнению", - "run your web app": "Запустить Web App", - "save": "Сохранить", - "saving": "Сохранение", - "save as": "Сохранить как", - "save file to run": "Сохрани файл для запуска в браузере", - "save here": "Сохранить тут", - "search": "Поиск", - "see logs and errors": "Показать логи", - "select folder": "Выбрать папку", - "settings": "Настройки", - "settings saved": "Настройки сохранены", - "show line numbers": "Показывать номера строк", - "show hidden files": "Отображение скрытых файлов", - "show spaces": "Показывать отступы", - "soft tab": "Мягкая вкладка", - "sort by name": "Сортировать по имени", - "success": "Успех", - "tab size": "Размер вкладки", - "text wrap": "Перенос строк", - "theme": "Тема", - "unable to delete file": "Невозможно удалить файл", - "unable to open file": "Невозможно открыть файл", - "unable to open folder": "Невозможно открыть папку", - "unable to save file": "Невозможно сохранить файл", - "unable to rename": "Невозможно переименовать", - "unsaved file": "Файл не сохранен, закрыть?", - "warning": "Предупреждение", - "use emmet": "Использовать Emmet", - "use quick tools": "Использовать быстрые инструменты", - "yes": "Да", - "github": "GitHub", - "encoding": "Кодировка", - "syntax highlighting": "Подсветка синтаксиса", - "read only": "Только чтения", - "select all": "Выбрать всё", - "select branch": "Выберите ветвь", - "create new branch": "Создать новую ветвь", - "use branch": "Использовать ветвь", - "new branch": "Новая ветвь", - "branch": "Ветвь", - "key bindings": "Привязка клавиш", - "edit": "Редактировать", - "reset": "Сброс", - "color": "Цвет", - "select word": "Выберите слово", - "quick tools": "Быстрые инструменты", - "select": "Выбрать", - "editor font": "Шрифт", - "new project": "Новый проект", - "format": "Формат", - "project name": "Название проекта", - "unsupported device": "Это устройство не поддерживает тему.", - "vibrate on tap": "Вибрация при нажатии", - "copy command is not supported by ftp.": "Копирование не поддерживается в режиме FTP", - "support title": "Поддержи Acode", - "exit fullscreen": "Выйти из полноэкранного режима", - "fullscreen": "Полноэкранный режим", - "animation": "Анимация", - "backup": "Резервное копирование", - "restore": "Восстановление", - "backup successful": "Бэкап создан", - "invalid backup file": "Не получилось создать бэкап", - "backup file found": "Найден бэкап, восстановить?", - "welcome back": "С возвращением!", - "add path": "Добавить путь", - "live autocompletion": "Мгновенное автозавершение", - "file properties": "Свойства файла", - "path": "Путь", - "type": "Тип", - "word count": "Количество слов", - "line count": "Количество строк", - "last modified": "Последнее изменение", - "size": "Размер", - "share": "Поделиться", - "sdcard found": "Обнаружено внешнее хранилище, хотите добавить?", - "allow storage": "Предоставить доступ к внешнему хранилищу?", - "show print margin": "Показать поле печати", - "login": "логин", - "scrollbar size": "Размер полосы прокрутки", - "cursor controller size": "Размер контроллера курсора", - "none": "никто", - "small": "маленький", - "large": "большой", - "floating button": "Плавающая кнопка", - "confirm on exit": "Подтверждение для выхода", - "other settings": "Прочие настройки", - "show console": "Показать консоль", - "image": "Image", - "insert file": "Вставить файл", - "insert color": "Вставить цвет", - "powersave mode warning": "Отключите режим энергосбережения для предварительного просмотра во внешнем браузере.", - "exit": "Выйти", - "custom": "custom", - "reset warning": "Вы уверены, что хотите сбросить тему?", - "theme type": "Theme type", - "light": "Светлый", - "dark": "Тёмный", - "file browser": "Файловый браузер", - "operation not permitted": "Операция не разрешена", - "no such file or directory": "Данный файл или каталог отсутствует", - "input/output error": "Ошибка ввода-вывода", - "permission denied": "Доступ запрещен", - "bad address": "Неверный адрес", - "file exists": "Файл существует", - "not a directory": "Это не каталог", - "is a directory": "Это каталог", - "invalid argument": "Недопустимый аргумент", - "too many open files in system": "Слишком много открытых файлов в системе", - "too many open files": "Слишком много открытых файлов", - "text file busy": "Текстовый файл занят", - "no space left on device": "На устройстве не осталось места", - "read-only file system": "Файловая система, доступная только для чтения", - "file name too long": "Название файла слишком длинное", - "too many users": "Слишком много пользователей", - "connection timed out": "Время соединения истекло", - "connection refused": "Отказано в соединении", - "owner died": "Владелец умер", - "an error occurred": "Произошла ошибка", - "add ftp": "Добавить FTP", - "add sftp": "Добавить SFTP", - "save file": "Сохранить файл", - "save file as": "Сохранить как", - "files": "Файлы", - "help": "Помощь", - "support me": "Поддержать", - "connecting": "Соединение", - "file has been deleted": "{file} был удалён!", - "feature not available": "Эта функция доступна только в платной версии приложения.", - "deleted file": "Удалить файл", - "line height": "Line height", - "preview info": "Если вы хотите запустить активный файл, нажмите и удерживайте значок воспроизведения.", - "manage all files": "Разрешите редактору Acode управлять всеми файлами в настройках, чтобы легко редактировать файлы на вашем устройстве.", - "close file": "Закрыть файл", - "reset connections": "Сбросить соединения", - "check file changes": "Проверить изменения файла", - "open in browser": "Открыть в браузере", - "desktop mode": "Режим рабочего стола", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Оценить Acode", - "github login": "Github Login", - "support": "Поддержка", - "donate": "Пожертвовать {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Загрузка {file}", - "downloading...": "Загрузка...", - "folder name": "Имя папки", - "keyboard mode": "Keyboard mode", - "code": "Нет предложений", - "normal": "Показать предложения", - "app settings": "Настройки приложения" -} \ No newline at end of file diff --git a/www/lang/tr-tr.json b/www/lang/tr-tr.json deleted file mode 100644 index 364f50a80..000000000 --- a/www/lang/tr-tr.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Türkçe (by ibrahim)", - "about": "Hakkında", - "active files": "Aktif Dosyalar", - "alert": "Uyarı", - "app theme": "Uygulama Teması", - "autocorrect": "Otomatik Düzelt", - "autosave": "Otomatik Kaydet", - "beautify on save": "Kaydettiğinde Güzelleştir", - "cancel": "İptal", - "change language": "Dili Değiştir", - "choose color": "Renk Seç", - "clear": "Temizle", - "close app": "Uygulama kapatılsın mı?", - "commit message": "Commit mesajı", - "console": "Konsol", - "conflict error": "yanlışlık! Lütfen başka bir committen önce bekleyin", - "copy": "Kopyala", - "create folder error": "Yeni klasör oluşturulamıyor", - "cut": "Kes", - "delete": "Sil", - "delete {name}": "{name} silinsin mi?", - "dependencies": "gereklilikler", - "delay": "Milisaniye cinsinden süre", - "editor settings": "Editör Ayarları", - "editor theme": "Editör Teması", - "enter file name": "Dosya Adı", - "enter folder name": "Klasör Adı", - "empty folder message": "Boş Klasör", - "enter line number": "Satır numarasını girin", - "error": "Hata", - "except": "istisna", - "failed": "Başarısız oldu", - "file already exists": "Dosya zaten var", - "file already exists force": "Dosya zaten var. Üzerine yazılsın mı?", - "file changed": " değiştirildi, yeniden yüklensin mi?", - "file deleted": "Dosya silindi", - "file is not supported": "Dosya desteklenmiyor", - "file not supported": "Bu dosya türü desteklenmiyor", - "file too large": "Dosya çok büyük. İzin verilen maksimum dosya boyutu {size}", - "file renamed": "Dosya yeniden adlandırıldı", - "file saved": "Dosya kaydedildi", - "folder added": "Klasör eklendi", - "folder already added": "Klasör zaten ekli", - "font size": "Yazı Boyutu", - "goto": "Satıra git", - "icons definition": "simgeler tanımı", - "info": "Bilgi", - "invalid value": "Geçersiz değer", - "language changed": "Dil başarıyla değiştirildi", - "linting": "Sözdizimi Hatalarını Kontrol Et", - "logout": "Çıkış yap", - "loading": "Yükleniyor", - "my profile": "Profilim", - "new file": "Yeni Dosya", - "new folder": "Yeni Klasör", - "no": "Hayır", - "no editor message": "Menüden yeni dosya ve klasör aç veya oluştur", - "not set": "Ayarlanmadı", - "unsaved files close app": "Kaydedilmemiş dosyalar var. Uygulama kapatılsın mı?", - "notice": "Dikkat", - "open file": "Dosya Aç", - "open files and folders": "Dosya ve Klasör Aç", - "open folder": "Klasör Aç", - "open recent": "Önceklerden Aç", - "ok": "Tamam", - "overwrite": "Üzerine yaz", - "paste": "Yapıştır", - "preview mode": "Ön-izleme Modu", - "read only file": "Salt okunur dosya kaydedilemiyor. Lütfen farklı kaydetmeyi deneyin", - "reload": "Tekrar Yükle", - "rename": "Yeniden Adlandır", - "replace": "Değiştir", - "required": "Bu alan gerekli", - "run your web app": "Web uygulamanızı çalıştırın", - "save": "Kaydet", - "saving": "kaydediliyor", - "save as": "Farklı Kaydet", - "save file to run": "Lütfen bu dosyayı tarayıcıda çalışacak şekilde kaydedin", - "save here": "Buraya Kaydet", - "search": "Ara", - "see logs and errors": "Günlük ve hatalara bak", - "select folder": "Bu Klasörü Seç", - "settings": "Ayarlar", - "settings saved": "Ayarlar Kaydedildi", - "show line numbers": "Satır Numarasını Göster", - "show hidden files": "Gizli Dosyaları Göster", - "show spaces": "Boşlukları Göster", - "soft tab": "sekmeler Karakteri Yerine Boşluk Kullan", - "sort by name": "İsme Göre Sırala", - "success": "Başarılı", - "tab size": "sekmeler Boyutu", - "text wrap": "Sözcük Kaydırma", - "theme": "Tema", - "unable to delete file": "Dosya silinemedi", - "unable to open file": "Dosya açılamadı", - "unable to open folder": "Klasör açılamadı", - "unable to save file": "Dosya kaydedilemedi", - "unable to rename": "Yeniden adlandırılamadı", - "unsaved file": "Bu dosya kaydedilmedi, kapatılsın mı?", - "warning": "Uyarı", - "use emmet": "Emmet kullan", - "use quick tools": "Hızlı Araçlar'ı Kullan", - "yes": "Evet", - "github": "GitHub", - "encoding": "Metin Kodlaması", - "syntax highlighting": "Sözdizimi Vurgulaması", - "read only": "Salt Okunur", - "select all": "Hepsini Seç", - "select branch": "Branch'ı Seç", - "create new branch": "Yeni Branch Oluştur", - "use branch": "Branch'ı Kullan", - "new branch": "Yeni Branch", - "branch": "Branch", - "key bindings": "Klavye Kısayolları", - "edit": "Düzenle", - "reset": "Sıfırla", - "color": "Renk", - "select word": "Kelime Seç", - "quick tools": "Hızlı Araçlar", - "select": "Seç", - "editor font": "Editörün Yazı Tipi", - "new project": "Yeni Proje", - "format": "Biçimlendir", - "project name": "Proje Adı", - "unsupported device": "Cihazınız temayı desteklemiyor", - "vibrate on tap": "Tıklamayla vibratör", - "copy command is not supported by ftp.": "Kopyalama komutu FTP tarafından desteklenmiyor.", - "support title": "Acode'ı destekle", - "exit fullscreen": "Tüm-Ekran modunu kapat", - "fullscreen": "tüm-ekran", - "animation": "animasyon", - "backup": "yedekle", - "restore": "restore", - "backup successful": "Backup successful", - "invalid backup file": "Invalid backup file", - "backup file found": "Yedek dosya bulundu, Ayarları geri yüklemek istiyorumusun, şifre ve ftp-hesaplari?", - "welcome back": "yeniden hoş geldiniz.", - "add path": "Yol ekle", - "live autocompletion": "canlı Otomatik Düzenleme", - "file properties": "dosya bilgileri", - "path": "Yol", - "type": "tip", - "word count": "Kelime sayısı", - "line count": "Satır sayısı", - "last modified": "En Son değiştirilen", - "size": "Boyut", - "share": "paylaş", - "sdcard found": "External storage found! Do you want to add it?", - "allow storage": "Give permission to access your external storage?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/uk-ua.json b/www/lang/uk-ua.json deleted file mode 100644 index 60d477a0c..000000000 --- a/www/lang/uk-ua.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "lang": "Українська - перекладено by uHTpoBepT", - "about": "Про програму", - "active files": "Відкриті файли", - "alert": "Оповіщення", - "app theme": "Тема додатку", - "autocorrect": "Включити автозаміну?", - "autosave": "Автозбереження", - "beautify on save": "Використовувати Beautify при збереженні?", - "cancel": "Скасувати", - "change language": "Змінити мову", - "choose color": "Виберіть колір", - "clear": "Ясно", - "close app": "Закрити додаток?", - "commit message": "Commit message", - "console": "Консоль", - "conflict error": "Conflict! Please wait before another commit.", - "copy": "Копіювати", - "create folder error": "Не вдалося створити нову папку", - "cut": "Вирізати", - "delete": "Видалити", - "delete {name}": "Видалити {name}?", - "dependencies": "Залежності", - "delay": "Час в мілісекундах", - "editor settings": "Налаштування редактора", - "editor theme": "Тема редактора", - "enter file name": "Введіть ім'я файлу", - "enter folder name": "Введіть ім'я папки", - "empty folder message": "Порожня папка", - "enter line number": "Введіть номер рядка", - "error": "Помилка", - "except": "крім", - "failed": "Невдача", - "file already exists": "Файл вже існує", - "file already exists force": "Файл вже існує. Перезаписати?", - "file changed": " був змінений, перезавантажити файл?", - "file deleted": "Файл видалено", - "file is not supported": "Файл не підтримується", - "file not supported": "Цей тип файлу не підтримується.", - "file too large": "Файл занадто великий для обробки. Максимально допустимий розмір файлу {size}", - "file renamed": "Файл перейменовано", - "file saved": "Файл збережено", - "folder added": "Папку додано", - "folder already added": "Папку вже додано", - "font size": "Розмір шрифту", - "goto": "Перейти до рядка", - "icons definition": "Визначення значків", - "info": "Інформація", - "language changed": "Мову успішно змінено", - "linting": "Перевіряти синтаксичні помилки", - "logout": "Вийти", - "loading": "Завантаження", - "my profile": "Мій профіль", - "new file": "Новий файл", - "new folder": "Нова папка", - "no": "Ні", - "no editor message": "Відкрийте або створіть новий файл з меню", - "not set": "не задано", - "unsaved files close app": "Є незбережені файли. Закрити додаток?", - "notice": "Повідомлення", - "open file": "Відкрити файл", - "open files and folders": "Відкриті файли і папки", - "open folder": "Відкрити папку", - "open recent": "відкрити недавні", - "ok": "ок", - "overwrite": "затирать", - "paste": "Вставити", - "preview mode": "Режим попереднього перегляду", - "read only file": "Файл відкритий тільки для читання. Збережіть як", - "redo defination": "Повернути останні зміни", - "reload": "Перезавантажити", - "rename": "Перейменувати", - "replace": "Замінити", - "required": "Це поле є обов'язковим для заповнення", - "run your web app": "Запустити ваш веб-додаток", - "save": "Зберегти", - "saving": "Збереження", - "save as": "Зберегти як", - "save file to run": "Збережіть цей файл для запуску в браузері", - "save here": "Зберегти тут", - "search": "Пошук", - "see logs and errors": "Переглянути логи", - "select folder": "Вибрати папку", - "settings": "Налаштування", - "settings saved": "Налаштування збережено", - "show line numbers": "Показати номери рядків", - "show hidden files": "Показати приховані файли", - "show spaces": "Показати пробіли", - "soft tab": "М'яка вкладка", - "sort by name": "Сортувати за ім'ям", - "success": "Успішно", - "tab size": "Розмір вкладки", - "text wrap": "Перенесення рядків", - "theme": "Тема", - "unable to delete file": "Неможливо видалити файл", - "unable to open file": "Неможливо відкрити файл", - "unable to open folder": "Неможливо відкрити папку", - "unable to save file": "Неможливо зберегти файл", - "unable to rename": "Неможливо перейменувати", - "unsaved file": "Цей файл не збережено, закрити в будь-якому випадку?", - "warning": "Попередження", - "use emmet": "Використовувати Emmet", - "use quick tools": "Використовувати швидкі інструменти", - "yes": "Так", - "github": "GitHub", - "encoding": "Кодування тексту", - "syntax highlighting": "Підсвічування синтаксису", - "read only": "лише читання", - "select all": "виберіть усіх", - "select branch": "Виберіть відділення", - "create new branch": "Створити нову гілку", - "use branch": "Використовуйте відділення", - "new branch": "Нова філія", - "branch": "branch", - "key bindings": "прив'язки клавіш", - "edit": "редагувати", - "reset": "підрегулювати", - "color": "колір", - "select word": "Виберіть слово", - "quick tools": "Швидкі інструменти", - "select": "виберіть", - "editor font": "Editor font", - "new project": "Новий проект", - "format": "формат", - "project name": "Назва проекту", - "unsupported device": "Ваш пристрій не підтримує тему.", - "vibrate on tap": "Vibrate on tap", - "copy command is not supported by ftp.": "Copy command is not supported by FTP.", - "support title": "Support Acode", - "exit fullscreen": "Exit fullscreen", - "fullscreen": "fullscreen", - "animation": "animation", - "backup": "backup", - "restore": "restore", - "backup successful": "Backup successful", - "invalid backup file": "Invalid backup file", - "backup file found": "Backup file found, do you want to restore settings, key-bindings and ftp-accounts from backup file?", - "welcome back": "Welcome back", - "add path": "Add path", - "live autocompletion": "Live autocompletion", - "file properties": "File properties", - "path": "Path", - "type": "Type", - "word count": "Word count", - "line count": "Line count", - "last modified": "Last modified", - "size": "Size", - "share": "Share", - "sdcard found": "External storage found! Do you want to add it?", - "allow storage": "Give permission to access your external storage?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "invalid value": "Недійсне значення", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/uz-uz.json b/www/lang/uz-uz.json deleted file mode 100644 index bff6051e4..000000000 --- a/www/lang/uz-uz.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "O'zbekcha (by TILON)", - "about": "Ilova haqida", - "active files": "Faol fayllar", - "alert": "Ogohlantirish", - "app theme": "Ilova mavzusi", - "autocorrect": "Avtomatik tuzatish yoqilsinmi?", - "autosave": "Avtomatik saqlash", - "beautify on save": "Chiroyli holatda saqlash", - "cancel": "bekor qilish", - "change language": "Tilni o'zgartirish", - "choose color": "Rangni tanlang", - "clear": "Tozalash", - "close app": "Dasturdan chiqmoqchimisiz?", - "commit message": "Xabar berish", - "console": "Konsol oynasi", - "conflict error": "Qarama-qarshilik! Iltimos, boshqa majburiyatlar olishdan oldin kuting", - "copy": "Nusxalash", - "create folder error": "Kechirasiz,yangi papka yaratib bo'lmadi", - "cut": "Qirqish", - "delete": "o'chirish", - "delete {name}": "{name} ni rostdanham o'chirmoqchimisiz?", - "dependencies": "Bog'lanishlar", - "delay": "Vaqt millisekundlarda", - "editor settings": "Tahrirlash sozlamalari", - "editor theme": "Tahrirlash mavzulari", - "enter file name": "fayl nomini kiriting", - "enter folder name": "papka nomini kiriting", - "empty folder message": "Ushbu papkada hech narsa yo'q", - "enter line number": "Qator raqamini kiriting", - "error": "xatolik", - "except": "istisno", - "failed": "bajarilmadi", - "file already exists": "Ushbu fayl oldindan mavjud", - "file already exists force": "Ushbu fayl oldindan mavjud. Baribir yozilsinmi?", - "file changed": "o'zgartirildi, faylni qayta yuklaysizmi?", - "file deleted": "fayl o'chirildi", - "file is not supported": "ushhu fayl qo'llab-quvvatlanmaydi", - "file not supported": "fayl turi qo'llab-quvvatlanmaydi", - "file too large": "Fayl xajmi juda katta. Maksimal hajmdagi fayl ruxsat etilgan: {size}", - "file renamed": "fayl qayta nomlandi", - "file saved": "fayl saqlandi", - "folder added": "papka qo'shildi", - "folder already added": "ushbu papka oldindan qo'shilgan", - "font size": "Matn o'lchovi", - "goto": "Qatorga borish", - "icons definition": "Ikonlarni aniqlash", - "info": "Haqida", - "invalid value": "Kiritishda xatolik", - "language changed": "Til muvoffaqiyatli o'zgartirildi", - "linting": "Sintaktik xatolar tekshirilsinmi", - "logout": "Tark etish", - "loading": "Yuklanmoqda", - "my profile": "Mening profilim", - "new file": "Yangi fayl", - "new folder": "Yangi papka", - "no": "Yo'q", - "no editor message": "Menyudan yangi fayl va papkani oching yoki yarating", - "not set": "O'rnatilmagan", - "unsaved files close app": "Saqlanmagan fayllar mavjud. Ilova yopilsinmi?", - "notice": "Etibor bering", - "open file": "Faylni ochish", - "open files and folders": "Fayllarni va papkalarni ochish", - "open folder": "Papkani ochish", - "open recent": "So'ngi ochilganlar", - "ok": "Yaxshi", - "overwrite": "Baribir yozilsin", - "paste": "Joylash", - "preview mode": "Kod natijasini qayerda ko'moqchisiz?", - "read only file": "Faqat o'qish uchun bo'lgan faylni saqlab bo'lmadi,Iltimos to'g'irlab qayta saqlab ko'ring", - "reload": "qayta yuklash", - "rename": "qayta nomlash", - "replace": "almashtrish", - "required": "Ushbu qator to'ldirilishi shart", - "run your web app": "Web-ilovangizni ishga tushiring", - "save": "Saqlash", - "saving": "Saqlanmoqda", - "save as": "Boshqa joyga saqlash", - "save file to run": "Iltimos, brauzerda ishga tushirish uchun ushbu faylni saqlang", - "save here": "Shu yerga saqlash", - "search": "qidirish", - "see logs and errors": "Loglar va xatoliklarni ko'rish", - "select folder": "Papkani tanlash", - "settings": "Sozlamalar", - "settings saved": "Sozlamalar saqlandi", - "show line numbers": "Qator raqamlari ko'rinsinmi", - "show hidden files": "Yashirin fayllar ko'rinsinmi", - "show spaces": "Bo'sh joylar ko'rinsinmi", - "soft tab": "Qulay yorliq", - "sort by name": "Ism bo'yicha saralash", - "success": "Bajarildi", - "tab size": "Yorliq hajmi", - "text wrap": "Matnni o'rash", - "theme": "Mavzu", - "unable to delete file": "faylni o'chirib bo'lmadi", - "unable to open file": "Kechirasiz,faylni ochib bo'lmadi", - "unable to open folder": "Kechirasiz,papkani ochib bo'lmadi", - "unable to save file": "Kechirasiz,faylni saqlab bo'lmadi", - "unable to rename": "Kechirasiz,faylni qayta nomlab bo'lmadi", - "unsaved file": "Ushbu fayl saqlanmadi, baribir yopilsinmi?", - "warning": "Ogohlantirish", - "use emmet": "Emmetdan foydalanish", - "use quick tools": "Qo'shimcha xususiyatlardan foydalanish", - "yes": "Ha", - "github": "GitHub", - "encoding": "Matnni kodirivkalash", - "syntax highlighting": "Sintaktikani ajiratib ko'rsatish", - "read only": "Faqat o'qish", - "select all": "Barchasini tanlash", - "select branch": "Branchni tanlash", - "create new branch": "Yangi branch yaratish.", - "use branch": "Branchdan foydalanish", - "new branch": "Yangi branch", - "branch": "branch", - "key bindings": "Tezkor kalitlarni o'zgartrish", - "edit": "Tahrirlash", - "reset": "qayta o'rnatish", - "color": "Rang", - "select word": "So'zni tanlash", - "quick tools": "Tezkor xususiyatlar", - "select": "tanlash", - "editor font": "Shrift tahrirlash", - "new project": "Yangi proyekt", - "format": "format", - "project name": "Proyekt nomi", - "unsupported device": "Sizning qurilmangiz ushbu mavzuni qo'llab quvvatlamaydi", - "vibrate on tap": "Vibrate on tap", - "copy command is not supported by ftp.": "Copy command is not supported by FTP.", - "support title": "Support Acode", - "exit fullscreen": "Exit fullscreen", - "fullscreen": "fullscreen", - "animation": "animation", - "backup": "backup", - "restore": "restore", - "backup successful": "Backup successful", - "invalid backup file": "Invalid backup file", - "backup file found": "Backup file found, do you want to restore settings, key-bindings and ftp-accounts from backup file?", - "welcome back": "Welcome back", - "add path": "Add path", - "live autocompletion": "Live autocompletion", - "file properties": "File properties", - "path": "Path", - "type": "Type", - "word count": "Word count", - "line count": "Line count", - "last modified": "Last modified", - "size": "Size", - "share": "Share", - "sdcard found": "External storage found! Do you want to add it?", - "allow storage": "Give permission to access your external storage?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/vi-vn.json b/www/lang/vi-vn.json deleted file mode 100644 index dc8527e25..000000000 --- a/www/lang/vi-vn.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "Vietnamese (by Nguyen Phat)", - "about": "thông tin", - "active files": "Kích Hoạt Tệp", - "alert": "alert", - "app theme": "Giao diện", - "autocorrect": "Bật Tự Động Sửa?", - "autosave": "Tự Động Lưu Tệp", - "beautify on save": "Hiệu Ứng Lưu Tệp", - "cancel": "Hủy", - "change language": "Thay Đổi Ngôn Ngữ", - "choose color": "Chọn Màu", - "clear": "Xóa", - "close app": "Bạn Có Chắc Chắn Đóng Ứng Dụng?", - "commit message": "Cam Kết", - "console": "Bảng Điều Khiển", - "conflict error": "Có Xung Đột Vui Lòng Đợi.", - "copy": "Sao Chép", - "create folder error": "Xin lỗi, không thể tạo thư mục mới", - "cut": "Cắt", - "delete": "Xóa", - "delete {name}": "Xóa {name}?", - "dependencies": "Thuộc", - "delay": "Thời gian tính bằng mili giây", - "editor settings": "Cài đặt chỉnh sửa", - "editor theme": "Chỉnh sửa giao diện", - "enter file name": "Nhập Tên Tệp", - "enter folder name": "Nhập Tên Thư Mục", - "empty folder message": "Thư Mục Trống", - "enter line number": "Nhập Số Dòng", - "error": "Lỗi", - "except": "Ngoại Trừ", - "failed": "Thất Bại", - "file already exists": "Tệp Tin Đã Tồn Tại", - "file already exists force": "Tệp Này Đã Tồn Tại Có Muốn Ghi Đè?", - "file changed": " Tệp đã được thay đổi, tải lại tệp?", - "file deleted": "Xóa Tệp", - "file is not supported": "Tệp này không được hổ trợ", - "file not supported": "Định dạng tệp này không được hổ trợ.", - "file too large": "Tệp này quá lớn, hãy thử tệp dưới {size}", - "file renamed": "Đổi Tên Tệp", - "file saved": "Lưu Tệp", - "folder added": "Đã Thêm Thư Mục", - "folder already added": "Thư Mục Đã Sẵng Sàng", - "font size": "Kích Thước Phông Chữ", - "goto": "Đi đến dòng", - "icons definition": "Định Nghĩa Biểu Tượng", - "info": "Thông Tin", - "invalid value": "Giá trị Không Hợp Lệ", - "language changed": "Thay đổi ngôn ngữ thành công", - "linting": "Kiểm Tra Lỗi Cứu Pháp?", - "logout": "Đăng Xuất", - "loading": "Đang Tải", - "my profile": "Thông Tin Hồ Sơ", - "new file": "Tệp Mới", - "new folder": "Thư Mục Mới", - "no": "Không", - "no editor message": "Mở hoặc tạo tệp và thư mục mới từ menu", - "not set": "Không được thiết lập", - "unsaved files close app": "Có tệp chưa được lưu. Có Chắc Đóng Ứng Dụng?", - "notice": "Thông Báo", - "open file": "Mở Tệp", - "open files and folders": "Mở Nhiều Tệp Và Thư Mục", - "open folder": "Mở Thư Mục", - "open recent": "Mở Tệp Và Thư Mục Gần Đây", - "ok": "Đồng ý", - "overwrite": "Ghi Đè", - "paste": "Dán", - "preview mode": "Xem trước", - "read only file": "Không thể lưu tệp chỉ đọc. Hãy thử lưu dưới dạng khác", - "reload": "Tải Lại", - "rename": "Đổi Tên", - "replace": "Thay thế", - "required": "Chỗ này là bắt buộc", - "run your web app": "Chạy Trên Trình Duyệt Ứng Dụng", - "save": "Lưu", - "saving": "Lưu", - "save as": "Lưu Thành", - "save file to run": "Vui lòng lưu tệp này để chạy trong trình duyệt", - "save here": "Lưu Tại Đây", - "search": "Tìm", - "see logs and errors": "Xem nhật ký và lỗi", - "select folder": "Chọn thư mục", - "settings": "Cài Đặt", - "settings saved": "Lưu Cài Đặt", - "show line numbers": "Hiển thị số dòng?", - "show hidden files": "Hiển thị tệp ẩn?", - "show spaces": "Hiển thị không gian?", - "soft tab": "Soft tab", - "sort by name": "Sắp xếp theo tên", - "success": "Thành Công", - "tab size": "Kích thước tab", - "text wrap": "Đọc Văn Bản", - "theme": "Giao diện", - "unable to delete file": "Không thể xóa tệp", - "unable to open file": "Không thể mở tệp", - "unable to open folder": "Không thể mở thư mục", - "unable to save file": "Không thể lưu tệp", - "unable to rename": "Không thể đổi tên", - "unsaved file": "Hiện tại tệp chưa lưu bạn muốn đóng?", - "warning": "cảnh báo", - "use emmet": "Sử dụng emmet", - "use quick tools": "Sử dụng thanh công cụ nhanh", - "yes": "Có", - "github": "GitHub", - "encoding": "Mã hóa văn bản", - "syntax highlighting": "Đánh dấu cú pháp", - "read only": "Chỉ Đọc", - "select all": "Chọn Tất Cả", - "select branch": "Chọn Nhánh", - "create new branch": "Tạo Nhánh Mới", - "use branch": "Sử dụng nhánh", - "new branch": "Nhánh Mới", - "branch": "Nhánh", - "key bindings": "Tổ Hợp Phím", - "edit": "Sửa", - "reset": "Cài Lại", - "color": "Màu", - "select word": "Chọn Từ", - "quick tools": "Thanh Công Cụ Nhanh", - "select": "Chọn", - "editor font": "Thay đổi phông chữ", - "new project": "Dự Án Mới", - "format": "Định Dạng", - "project name": "Project name", - "unsupported device": "Thiết bị của bạn không hổ trợ giao diện này.", - "vibrate on tap": "Rung khi nhấn", - "copy command is not supported by ftp.": "Lệnh sao chép không được FTP hỗ trợ.", - "support title": "Hổ Trợ Acode", - "exit fullscreen": "Thoát Toàn Màn Hình", - "fullscreen": "Toàn màn hình", - "animation": "Hiệu Ứng", - "backup": "Sao Lưu", - "restore": "Khôi Phục", - "backup successful": "Sao Lưu Thành Công", - "invalid backup file": "Định dạng tệp sao lưu sai", - "backup file found": "Đã tìm thấy tệp sao lưu, bạn có muốn khôi phục cài đặt, liên kết khóa và tài khoản ftp từ tệp sao lưu không?", - "welcome back": "Chào Mừng Trở Lại", - "add path": "Thêm đường dẫn", - "live autocompletion": "Tự động hoàn thành trực tiếp", - "file properties": "Thông Tin Tệp", - "path": "Đường dẫn", - "type": "Định dạng", - "word count": "Số từ", - "line count": "Số dòng", - "last modified": "Sửa đổi lần cuối", - "size": "Kích thước", - "share": "Chia sẽ", - "sdcard found": "Đã tìm thấy bộ nhớ ngoài! Bạn có muốn thêm nó không?", - "allow storage": "Hãy cho phép sử dụng quyền truy cập bộ nhớ?", - "show print margin": "Show print margin", - "login": "login", - "scrollbar size": "Scrollbar size", - "cursor controller size": "Cursor controller size", - "none": "none", - "small": "small", - "large": "large", - "floating button": "Floating button", - "confirm on exit": "Confirm on exit", - "other settings": "Other settings", - "show console": "Show console", - "image": "Image", - "insert file": "Insert file", - "insert color": "Insert color", - "powersave mode warning": "Turn off power saving mode to preview in external browser.", - "exit": "Exit", - "custom": "custom", - "reset warning": "Are you sure you want to reset theme?", - "theme type": "Theme type", - "light": "light", - "dark": "dark", - "file browser": "File Browser", - "operation not permitted": "Operation not permitted", - "no such file or directory": "No such file or directory", - "input/output error": "Input/output error", - "permission denied": "Permission denied", - "bad address": "Bad address", - "file exists": "File exists", - "not a directory": "Not a directory", - "is a directory": "Is a directory", - "invalid argument": "Invalid argument", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "No space left on device", - "read-only file system": "Read-only file system", - "file name too long": "File name too long", - "too many users": "Too many users", - "connection timed out": "Connection timed out", - "connection refused": "Connection refused", - "owner died": "Owner died", - "an error occurred": "An error occurred", - "add ftp": "Add FTP", - "add sftp": "Add SFTP", - "save file": "Save file", - "save file as": "Save file as", - "files": "Files", - "help": "Help", - "support me": "Support me", - "connecting": "Connecting", - "file has been deleted": "{file} has been deleted!", - "feature not available": "This feature is only available in paid version of the app.", - "deleted file": "Deleted file", - "line height": "Line height", - "preview info": "If you want run the active file, tap and hold on play icon.", - "manage all files": "Allow Acode editor to manage all files in settings to edit files on your device easily.", - "close file": "Close file", - "reset connections": "Reset connections", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/lang/zh-cn.json b/www/lang/zh-cn.json deleted file mode 100644 index 743ba0f6b..000000000 --- a/www/lang/zh-cn.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "lang": "中文简体", - "about": "关于", - "active files": "活动文件", - "alert": "提醒", - "app theme": "应用主题", - "autocorrect": "启用自动校正?", - "autosave": "自动保存", - "beautify on save": "保存时格式化代码文本", - "cancel": "取消", - "change language": "更改语言", - "choose color": "选择颜色", - "clear": "清空", - "close app": "关闭应用程序?", - "commit message": "提交说明", - "console": "控制台", - "conflict error": "冲突!请等待另一个 Commit 提交完成.", - "copy": "复制", - "create folder error": "抱歉, 无法创建新文件夹", - "cut": "剪切", - "delete": "删除", - "delete {name}": "删除 {name}?", - "dependencies": "依赖项", - "delay": "时间以毫秒为单位", - "editor settings": "编辑器设置", - "editor theme": "编辑器主题", - "enter file name": "输入文件名", - "enter folder name": "输入文件夹名称", - "empty folder message": "空文件夹", - "enter line number": "输入行号", - "error": "错误", - "except": "这些格式除外", - "failed": "失败", - "file already exists": "文件已存在", - "file already exists force": "文件已存在. 是否覆盖?", - "file changed": " 已更改, 重新加载文件?", - "file deleted": "文件已删除", - "file is not supported": "不支持此文件", - "file not supported": "不支持此文件类型.", - "file too large": "文件太大,无法处理. 最大支持 {size} 的文件", - "file renamed": "文件已重命名", - "file saved": "文件已保存", - "folder added": "添加文件夹", - "folder already added": "文件夹已添加", - "font size": "字体大小", - "goto": "跳转至行...", - "icons definition": "快捷键定义", - "info": "信息", - "invalid value": "无效值", - "language changed": "语言更改成功", - "linting": "检查语法错误", - "logout": "登出", - "loading": "载入中", - "my profile": "我的配置", - "new file": "新文件", - "new folder": "新文件夹", - "no": "否", - "no editor message": "从菜单打开或创建新文件和文件夹", - "not set": "未设置", - "unsaved files close app": "文件未保存,退出应用?", - "notice": "注意", - "open file": "打开文件", - "open files and folders": "打开文件和文件夹", - "open folder": "打开文件夹", - "open recent": "最近打开", - "ok": "确认", - "overwrite": "覆盖", - "paste": "粘贴", - "preview mode": "预览模式", - "read only file": "无法保存只读文件. 请尝试另存为", - "redo defination": "重做", - "reload": "重新加载", - "rename": "重命名", - "replace": "替换", - "required": "此字段为必填字段", - "run your web app": "运行你的 web 应用程序", - "save": "保存", - "saving": "保存中...", - "save as": "另存为", - "save file to run": "请保存此文件以在浏览器中运行", - "save here": "保存到这", - "search": "搜索", - "see logs and errors": "查看日志和错误", - "select folder": "选择文件夹", - "settings": "设置", - "settings saved": "设置已保存", - "show line numbers": "显示行号", - "show hidden files": "显示隐藏文件", - "show spaces": "显示空格部分", - "soft tab": "软键盘 Tab", - "sort by name": "按名称排序", - "success": "成功", - "tab size": "Tab 空格数", - "text wrap": "自动换行", - "theme": "主题", - "unable to delete file": "无法删除文件", - "unable to open file": "无法打开文件", - "unable to open folder": "无法打开文件夹", - "unable to save file": "无法保存文件", - "unable to rename": "无法重命名", - "unsaved file": "此文件未保存, 仍然关闭?", - "warning": "警告", - "use emmet": "使用 Emmet 工具", - "use quick tools": "使用快捷工具", - "yes": "是", - "github": "GitHub", - "encoding": "文字编码转为", - "syntax highlighting": "语法高亮", - "read only": "只读", - "select all": "全选", - "select branch": "选择分支", - "create new branch": "建立新分支", - "use branch": "使用分支", - "new branch": "新分支", - "branch": "分支", - "key bindings": "快捷键", - "edit": "编辑", - "reset": "重设", - "color": "颜色", - "select word": "选择单词", - "quick tools": "快速工具", - "select": "选择", - "editor font": "编辑器字体", - "new project": "新项目", - "format": "格式化", - "project name": "项目名", - "unsupported device": "您的设备不支持应用主题。", - "vibrate on tap": "点按时震动", - "copy command is not supported by ftp.": "FTP 不支持复制操作.", - "support title": "支持 Acode", - "exit fullscreen": "退出全屏", - "fullscreen": "全屏", - "animation": "动画效果", - "backup": "备份", - "restore": "恢复", - "backup successful": "备份成功", - "invalid backup file": "备份文件无效", - "backup file found": "检测到备份文件,是否从备份文件中恢复设置、快捷键和 FTP 账户?", - "welcome back": "欢迎回来", - "add path": "添加路径", - "live autocompletion": "自动补全", - "file properties": "文件属性", - "path": "路径", - "type": "输入", - "word count": "字数统计", - "line count": "行数统计", - "last modified": "最后修改", - "size": "大小", - "share": "分享", - "sdcard found": "检测到外部存储,是否添加?", - "allow storage": "授予访问外部存储的权限?", - "show print margin": "显示打印页边距", - "login": "登入", - "scrollbar size": "滚动条大小", - "cursor controller size": "文本光标控针大小", - "none": "无", - "small": "小", - "large": "大", - "floating button": "悬浮按钮", - "confirm on exit": "退出前确认", - "other settings": "其他设置", - "show console": "显示控制台", - "image": "图像", - "insert file": "插入文件路径", - "insert color": "插入颜色代码", - "powersave mode warning": "关闭省电模式以在外部浏览器预览。", - "exit": "退出", - "custom": "个性化", - "reset warning": "确定要重置主题?", - "theme type": "主题类型", - "light": "亮色", - "dark": "深色", - "file browser": "文件资源浏览器", - "operation not permitted": "操作未被允许", - "no such file or directory": "没有此文件或目录", - "input/output error": "输入/输出错误", - "permission denied": "没有权限", - "bad address": "非法地址", - "file exists": "文件存在", - "not a directory": "非目录文件", - "is a directory": "是目录文件", - "invalid argument": "无效的参数", - "too many open files in system": "系统中打开的文件过多", - "too many open files": "打开的文件过多", - "text file busy": "文件正在被使用", - "no space left on device": "设备空间不足", - "read-only file system": "只读文件系统", - "file name too long": "文件名过长", - "too many users": "用户过多", - "connection timed out": "连接超时", - "connection refused": "连接被拒", - "owner died": "用户失效", - "an error occurred": "发生错误", - "add ftp": "添加 FTP", - "add sftp": "添加 SFTP", - "save file": "保存文件", - "save file as": "文件另存为", - "files": "打开文件", - "help": "帮助", - "support me": "支持我", - "connecting": "连接中", - "file has been deleted": "{file} 已被删除!", - "feature not available": "此功能仅在付费版中可用。", - "deleted file": "删除的文件", - "line height": "行高", - "preview info": "如果想要运行活动文件,按住 play 图标", - "manage all files": "允许 Acode 在设置中管理所有文件以方便编辑此设备上的文件。", - "close file": "关闭文件", - "reset connections": "重置连接", - "check file changes": "核对文件变动", - "open in browser": "在浏览器中打开", - "desktop mode": "桌面模式", - "toggle console": "开关控制台", - "new line mode": "转行模式", - "add a storage": "添加存储位置", - "rate acode": "评价 Acode", - "github login": "Github 登录", - "support": "支持", - "donate": "捐助 {amount}", - "donation message": "因为觉得其他人亦如此所以一些人不选择捐助,同时又有一些人选择拿起火炬去传递它,感谢您选择成为后者,以及您友善而暖心的捐助。", - "downloading file": "正在下载 {file}", - "downloading...": "下载中...", - "folder name": "文件夹名称", - "keyboard mode": "键盘模式", - "code": "不显示建议", - "normal": "显示建议", - "app settings": "应用设置" -} diff --git a/www/lang/zh-hant.json b/www/lang/zh-hant.json deleted file mode 100644 index 89dad66ce..000000000 --- a/www/lang/zh-hant.json +++ /dev/null @@ -1,227 +0,0 @@ -{ - "lang": "繁體中文", - "about": "關於", - "active files": "編輯中的檔案", - "alert": "提醒", - "app theme": "應用程式主題", - "autocorrect": "自動校正", - "autosave": "自動儲存", - "beautify on save": "美化儲存", - "cancel": "取消", - "change language": "選擇語言", - "choose color": "選擇顏色", - "clear": "清除", - "close app": "確定要關閉應用程式?", - "commit message": "Commit訊息", - "console": "控制臺", - "conflict error": "衝突! 請等待另一個Commit提交完成", - "copy": "複製", - "create folder error": "錯誤,無法建立新資料夾", - "cut": "剪下", - "delete": "刪除", - "delete {name}": "刪除 {name} ?", - "dependencies": "依賴項", - "delay": "間隔時間以毫秒為單位", - "editor settings": "編輯器設定", - "editor theme": "編輯器主題", - "enter file name": "輸入檔案名稱", - "enter folder name": "輸入資料夾名稱", - "empty folder message": "空資料夾", - "enter line number": "輸入行號", - "error": "錯誤", - "except": "除外", - "failed": "無效", - "file already exists": "檔案已存在", - "file already exists force": "檔案已存在,確認覆蓋檔案?", - "file changed": "已變更,重新載入檔案?", - "file deleted": "已刪除檔案", - "file is not supported": "檔案不支持", - "file not supported": "不支持此檔案格式", - "file too large": "檔案過大,最大支援 {size} 的檔案", - "file renamed": "已重新命名檔案", - "file saved": "已儲存檔案", - "folder added": "已建立資料夾", - "folder already added": "資料夾已建立", - "font size": "字體大小", - "goto": "移動至第...行", - "icons definition": "快捷鍵定義", - "info": "資訊", - "invalid value": "無效值", - "language changed": "已更改語言", - "linting": "檢查語法錯誤", - "logout": "登出", - "loading": "載入中", - "my profile": "我的個人檔案", - "new file": "建立新檔案", - "new folder": "建立新資料夾", - "no": "否", - "no editor message": "從選單開啟或建立檔案與資料夾", - "not set": "尚未設定", - "unsaved files close app": "有檔案尚未儲存,仍要退出編輯器?", - "notice": "注意", - "open file": "開啟檔案", - "open files and folders": "開啟檔案和資料夾", - "open folder": "開啟資料夾", - "open recent": "開啟歷史紀錄", - "ok": "確認", - "overwrite": "覆蓋", - "paste": "貼上", - "preview mode": "預覽方式", - "read only file": "無法儲存唯讀檔案,請嘗試另存為", - "reload": "重新載入", - "rename": "重新命名", - "replace": "替換為", - "required": "這是必填欄位", - "run your web app": "在瀏覽器運行", - "save": "儲存", - "saving": "儲存中...", - "save as": "儲存至", - "save file to run": "請先儲存檔案再進行預覽", - "save here": "儲存至此資料夾", - "search": "搜尋", - "see logs and errors": "查看日誌及錯誤", - "select folder": "選擇資料夾", - "settings": "設定", - "settings saved": "設定已儲存", - "show line numbers": "顯示行號", - "show hidden files": "顯示隱藏檔案", - "show spaces": "顯示空格", - "soft tab": "使用空格代替Tab", - "sort by name": "按名稱排序", - "success": "成功", - "tab size": "Tab寬度", - "text wrap": "自動換行", - "theme": "主題", - "unable to delete file": "無法刪除檔案", - "unable to open file": "錯誤,無法開啟檔案", - "unable to open folder": "錯誤,無法開啟資料夾", - "unable to save file": "錯誤,無法儲存檔案", - "unable to rename": "錯誤,無法重新命名", - "unsaved file": "此檔案尚未儲存,仍要關閉?", - "warning": "警告", - "use emmet": "啟用Emmet", - "use quick tools": "啟用快捷工具列", - "yes": "是", - "github": "GitHub", - "encoding": "檔案編碼", - "syntax highlighting": "語法高亮", - "read only": "唯讀模式", - "select all": "全選", - "select branch": "選擇分支", - "create new branch": "建立新分支", - "use branch": "來源分支", - "new branch": "建立新分支", - "branch": "分支", - "key bindings": "快捷鍵", - "edit": "編輯", - "reset": "重置", - "color": "顏色", - "select word": "選擇字詞", - "quick tools": "快捷工具列", - "select": "選擇", - "editor font": "編輯器字體", - "new project": "新專案", - "format": "格式化", - "project name": "專案名稱", - "unsupported device": "您的裝置目前尚未支援", - "vibrate on tap": "點擊時震動", - "copy command is not supported by ftp.": "FTP 目前不支援複製指令", - "support title": "支持 Acode", - "exit fullscreen": "離開全螢幕", - "fullscreen": "全螢幕", - "animation": "動畫", - "backup": "備份設定", - "restore": "恢復設定", - "backup successful": "備份成功!", - "invalid backup file": "備份檔案無效!", - "backup file found": "找到備份檔案,是否要使用備份檔案恢復編輯器設定、快捷鍵設定以及 FTP 帳戶?", - "welcome back": "歡迎您再次回到 Acode!", - "add path": "加入路徑", - "live autocompletion": "自動完成", - "file properties": "檔案資訊", - "path": "路徑", - "type": "類型", - "word count": "字數", - "line count": "行數", - "last modified": "最後編輯時間", - "size": "大小", - "share": "分享", - "sdcard found": "偵測到外部儲存,是否新增至檔案瀏覽器?", - "allow storage": "給予Acode外部儲存的存取權?", - "show print margin": "顯示輸出邊界", - "login": "登入", - "scrollbar size": "卷軸寬度", - "cursor controller size": "游標大小", - "none": "無", - "small": "較小", - "large": "較大", - "floating button": "懸浮按鈕", - "confirm on exit": "離開時確認", - "other settings": "其他設定", - "show console": "顯示控制臺", - "image": "圖片", - "insert file": "插入檔案", - "insert color": "插入顏色", - "powersave mode warning": "關閉省電模式以預覽外部瀏覽器", - "exit": "離開", - "custom": "自訂", - "reset warning": "確認重製主題?", - "theme type": "主題類型", - "light": "亮色", - "dark": "暗色", - "file browser": "檔案瀏覽器", - "operation not permitted": "不允許的操作", - "no such file or directory": "無此檔案或目錄", - "input/output error": "輸入/輸出錯誤", - "permission denied": "權限不足", - "bad address": "位址錯誤", - "file exists": "檔案已存在", - "not a directory": "不是目錄", - "is a directory": "是目錄", - "invalid argument": "無效的參數", - "too many open files in system": "Too many open files in system", - "too many open files": "Too many open files", - "text file busy": "Text file busy", - "no space left on device": "裝置空間不足", - "read-only file system": "唯讀文件系統", - "file name too long": "檔案名稱過長", - "too many users": "用戶過多", - "connection timed out": "連線超時", - "connection refused": "拒絕連線", - "owner died": "Owner died", - "an error occurred": "發生了錯誤", - "add ftp": "添加FTP", - "add sftp": "添加SFTP", - "save file": "儲存檔案", - "save file as": "儲存檔案為", - "files": "檔案", - "help": "幫助", - "support me": "支持我", - "connecting": "連線中", - "file has been deleted": "{file} 已刪除!", - "feature not available": "此功能僅適用於付費版本", - "deleted file": "已刪除的檔案", - "line height": "行高", - "preview info": "如果你想執行目前的檔案,請長按執行按鈕", - "manage all files": "允許Acode管理設定中的所有檔案,以便輕鬆編輯裝置上的檔案", - "close file": "關閉檔案", - "reset connections": "重置連線", - "check file changes": "Check file changes", - "open in browser": "Open in browser", - "desktop mode": "Desktop mode", - "toggle console": "Toggle console", - "new line mode": "New line mode", - "add a storage": "Add a storage", - "rate acode": "Rate Acode", - "github login": "Github Login", - "support": "Support", - "donate": "Donate {amount}", - "donation message": "There are people who don’t donate because they assume everyone else is, and there are those who take up the torch and run with it. Thank you for being the latter, and for your kind and heartwarming donation.", - "downloading file": "Downloading {file}", - "downloading...": "Downloading...", - "folder name": "Folder name", - "keyboard mode": "Keyboard mode", - "code": "No suggestions", - "normal": "Show suggestions", - "app settings": "App settings" -} \ No newline at end of file diff --git a/www/res/logo/logo.svg b/www/logo.svg similarity index 100% rename from www/res/logo/logo.svg rename to www/logo.svg diff --git a/www/res/fonts/Roboto/Roboto-Black.ttf b/www/res/fonts/Roboto/Roboto-Black.ttf deleted file mode 100644 index 2d4523836..000000000 Binary files a/www/res/fonts/Roboto/Roboto-Black.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-BlackItalic.ttf b/www/res/fonts/Roboto/Roboto-BlackItalic.ttf deleted file mode 100644 index 29a4359ed..000000000 Binary files a/www/res/fonts/Roboto/Roboto-BlackItalic.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-Bold.ttf b/www/res/fonts/Roboto/Roboto-Bold.ttf deleted file mode 100644 index d998cf5b4..000000000 Binary files a/www/res/fonts/Roboto/Roboto-Bold.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-BoldItalic.ttf b/www/res/fonts/Roboto/Roboto-BoldItalic.ttf deleted file mode 100644 index b4e221039..000000000 Binary files a/www/res/fonts/Roboto/Roboto-BoldItalic.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-Italic.ttf b/www/res/fonts/Roboto/Roboto-Italic.ttf deleted file mode 100644 index 5b390ff95..000000000 Binary files a/www/res/fonts/Roboto/Roboto-Italic.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-Light.ttf b/www/res/fonts/Roboto/Roboto-Light.ttf deleted file mode 100644 index 35267989d..000000000 Binary files a/www/res/fonts/Roboto/Roboto-Light.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-LightItalic.ttf b/www/res/fonts/Roboto/Roboto-LightItalic.ttf deleted file mode 100644 index 46e9bf7c9..000000000 Binary files a/www/res/fonts/Roboto/Roboto-LightItalic.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-Medium.ttf b/www/res/fonts/Roboto/Roboto-Medium.ttf deleted file mode 100644 index f714a514d..000000000 Binary files a/www/res/fonts/Roboto/Roboto-Medium.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-MediumItalic.ttf b/www/res/fonts/Roboto/Roboto-MediumItalic.ttf deleted file mode 100644 index 5dc6a2dc6..000000000 Binary files a/www/res/fonts/Roboto/Roboto-MediumItalic.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-Regular.ttf b/www/res/fonts/Roboto/Roboto-Regular.ttf deleted file mode 100644 index 2b6392ffe..000000000 Binary files a/www/res/fonts/Roboto/Roboto-Regular.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-Thin.ttf b/www/res/fonts/Roboto/Roboto-Thin.ttf deleted file mode 100644 index 4e797cf7e..000000000 Binary files a/www/res/fonts/Roboto/Roboto-Thin.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/Roboto-ThinItalic.ttf b/www/res/fonts/Roboto/Roboto-ThinItalic.ttf deleted file mode 100644 index eea836f4a..000000000 Binary files a/www/res/fonts/Roboto/Roboto-ThinItalic.ttf and /dev/null differ diff --git a/www/res/fonts/Roboto/style.css b/www/res/fonts/Roboto/style.css deleted file mode 100644 index b46171d93..000000000 --- a/www/res/fonts/Roboto/style.css +++ /dev/null @@ -1,65 +0,0 @@ -@font-face { - font-family: "Roboto"; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local("Roboto"), local("Roboto-Regular"), - url("./Roboto-Regular.ttf") format("ttf"); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, - U+FE2E-FE2F; -} - -@font-face { - font-family: "Roboto"; - font-style: normal; - font-weight: 700; - font-display: swap; - src: local("Roboto Bold"), local("Roboto-Bold"), - url("./Roboto-Bold.ttf") format("ttf"); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, - U+FE2E-FE2F; -} - -@font-face { - font-family: "Roboto"; - font-style: normal; - font-weight: 900; - font-display: swap; - src: local("Roboto Black"), local("Roboto-Black"), - url("./Roboto-Black.ttf") format("ttf"); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, - U+FE2E-FE2F; -} - -@font-face { - font-family: "Roboto"; - font-style: normal; - font-weight: 300; - font-display: swap; - src: local("Roboto Light"), local("Roboto-Light"), - url("./Roboto-Light.ttf") format("ttf"); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, - U+FE2E-FE2F; -} - -@font-face { - font-family: "Roboto"; - font-style: normal; - font-weight: 500; - font-display: swap; - src: local("Roboto Medium"), local("Roboto-Medium"), - url("./Roboto-Medium.ttf") format("ttf"); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, - U+FE2E-FE2F; -} - -@font-face { - font-family: "Roboto"; - font-style: normal; - font-weight: 100; - font-display: swap; - src: local("Roboto Thin"), local("Roboto-Thin"), - url("./Roboto-Thin.ttf") format("ttf"); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, - U+FE2E-FE2F; -} \ No newline at end of file diff --git a/www/res/fonts/Roboto_Mono/LICENSE.txt b/www/res/fonts/Roboto_Mono/LICENSE.txt deleted file mode 100644 index 75b52484e..000000000 --- a/www/res/fonts/Roboto_Mono/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/www/res/fonts/Roboto_Mono/style.css b/www/res/fonts/Roboto_Mono/style.css deleted file mode 100644 index 3ac5050f6..000000000 --- a/www/res/fonts/Roboto_Mono/style.css +++ /dev/null @@ -1,10 +0,0 @@ -@font-face { - font-family: "Roboto Mono", monospace; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local("RobotoMono"), local("RobotoMono-Regular"), - url("./RobotoMono-Regular.ttf") format("ttf"); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, - U+FE2E-FE2F; -} \ No newline at end of file diff --git a/www/res/fonts/firacode/FiraCode-Regular.otf b/www/res/fonts/firacode/FiraCode-Regular.otf deleted file mode 100644 index 675e95d86..000000000 Binary files a/www/res/fonts/firacode/FiraCode-Regular.otf and /dev/null differ diff --git a/www/res/fonts/firacode/FiraCode-Regular.ttf b/www/res/fonts/firacode/FiraCode-Regular.ttf deleted file mode 100644 index 97c1159ec..000000000 Binary files a/www/res/fonts/firacode/FiraCode-Regular.ttf and /dev/null differ diff --git a/www/res/fonts/firacode/FiraCode-Regular.woff b/www/res/fonts/firacode/FiraCode-Regular.woff deleted file mode 100644 index d250d4596..000000000 Binary files a/www/res/fonts/firacode/FiraCode-Regular.woff and /dev/null differ diff --git a/www/res/fonts/firacode/FiraCode-Regular.woff2 b/www/res/fonts/firacode/FiraCode-Regular.woff2 deleted file mode 100644 index d58667c57..000000000 Binary files a/www/res/fonts/firacode/FiraCode-Regular.woff2 and /dev/null differ diff --git a/www/res/icon-file/icons/default_file.svg b/www/res/icon-file/icons/default_file.svg deleted file mode 100644 index 629c95b05..000000000 --- a/www/res/icon-file/icons/default_file.svg +++ /dev/null @@ -1 +0,0 @@ -default_file \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_access.svg b/www/res/icon-file/icons/file_type_access.svg deleted file mode 100644 index 768757fd7..000000000 --- a/www/res/icon-file/icons/file_type_access.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_access \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_actionscript.svg b/www/res/icon-file/icons/file_type_actionscript.svg deleted file mode 100644 index da61cdc99..000000000 --- a/www/res/icon-file/icons/file_type_actionscript.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_actionscript \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ada.svg b/www/res/icon-file/icons/file_type_ada.svg deleted file mode 100644 index 55f12ec74..000000000 --- a/www/res/icon-file/icons/file_type_ada.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ada \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ai.svg b/www/res/icon-file/icons/file_type_ai.svg deleted file mode 100644 index 363f34770..000000000 --- a/www/res/icon-file/icons/file_type_ai.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ai \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_al.svg b/www/res/icon-file/icons/file_type_al.svg deleted file mode 100644 index 5750582bc..000000000 --- a/www/res/icon-file/icons/file_type_al.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_al \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_antlr.svg b/www/res/icon-file/icons/file_type_antlr.svg deleted file mode 100644 index 26347b692..000000000 --- a/www/res/icon-file/icons/file_type_antlr.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_antlr \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_anyscript.svg b/www/res/icon-file/icons/file_type_anyscript.svg deleted file mode 100644 index e666193b2..000000000 --- a/www/res/icon-file/icons/file_type_anyscript.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_anyscript \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_apache.svg b/www/res/icon-file/icons/file_type_apache.svg deleted file mode 100644 index 0e55a2d2a..000000000 --- a/www/res/icon-file/icons/file_type_apache.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_apache \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_apex.svg b/www/res/icon-file/icons/file_type_apex.svg deleted file mode 100644 index 2d155147d..000000000 --- a/www/res/icon-file/icons/file_type_apex.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_apex \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_apib.svg b/www/res/icon-file/icons/file_type_apib.svg deleted file mode 100644 index 17a590bc9..000000000 --- a/www/res/icon-file/icons/file_type_apib.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_apib \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_apl.svg b/www/res/icon-file/icons/file_type_apl.svg deleted file mode 100644 index bc7c52a54..000000000 --- a/www/res/icon-file/icons/file_type_apl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_apl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_applescript.svg b/www/res/icon-file/icons/file_type_applescript.svg deleted file mode 100644 index 8a5a09ba8..000000000 --- a/www/res/icon-file/icons/file_type_applescript.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_applescript \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_appveyor.svg b/www/res/icon-file/icons/file_type_appveyor.svg deleted file mode 100644 index df681c013..000000000 --- a/www/res/icon-file/icons/file_type_appveyor.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_appveyor \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_arduino.svg b/www/res/icon-file/icons/file_type_arduino.svg deleted file mode 100644 index 2c895d2d1..000000000 --- a/www/res/icon-file/icons/file_type_arduino.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_arduino \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_asciidoc.svg b/www/res/icon-file/icons/file_type_asciidoc.svg deleted file mode 100644 index 66264de81..000000000 --- a/www/res/icon-file/icons/file_type_asciidoc.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_asciidoc \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_asp.svg b/www/res/icon-file/icons/file_type_asp.svg deleted file mode 100644 index 2466de52d..000000000 --- a/www/res/icon-file/icons/file_type_asp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_asp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_aspx.svg b/www/res/icon-file/icons/file_type_aspx.svg deleted file mode 100644 index 0e07cec80..000000000 --- a/www/res/icon-file/icons/file_type_aspx.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_aspx \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_assembly.svg b/www/res/icon-file/icons/file_type_assembly.svg deleted file mode 100644 index 4c4584b5a..000000000 --- a/www/res/icon-file/icons/file_type_assembly.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_assembly \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ats.svg b/www/res/icon-file/icons/file_type_ats.svg deleted file mode 100644 index d59adadf5..000000000 --- a/www/res/icon-file/icons/file_type_ats.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ats \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_audio.svg b/www/res/icon-file/icons/file_type_audio.svg deleted file mode 100644 index be00934d8..000000000 --- a/www/res/icon-file/icons/file_type_audio.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_audio \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_aurelia.svg b/www/res/icon-file/icons/file_type_aurelia.svg deleted file mode 100644 index ca51e675d..000000000 --- a/www/res/icon-file/icons/file_type_aurelia.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_aurelia \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_autohotkey.svg b/www/res/icon-file/icons/file_type_autohotkey.svg deleted file mode 100644 index b3b27d6f9..000000000 --- a/www/res/icon-file/icons/file_type_autohotkey.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_autohotkey \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_autoit.svg b/www/res/icon-file/icons/file_type_autoit.svg deleted file mode 100644 index 532a13f96..000000000 --- a/www/res/icon-file/icons/file_type_autoit.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_autoit \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_avro.svg b/www/res/icon-file/icons/file_type_avro.svg deleted file mode 100644 index 015b39fe3..000000000 --- a/www/res/icon-file/icons/file_type_avro.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_avro \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_aws.svg b/www/res/icon-file/icons/file_type_aws.svg deleted file mode 100644 index 2d7c51e09..000000000 --- a/www/res/icon-file/icons/file_type_aws.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_aws \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_azure.svg b/www/res/icon-file/icons/file_type_azure.svg deleted file mode 100644 index 09590ab22..000000000 --- a/www/res/icon-file/icons/file_type_azure.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_azure \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_azurepipelines.svg b/www/res/icon-file/icons/file_type_azurepipelines.svg deleted file mode 100644 index f5566c09e..000000000 --- a/www/res/icon-file/icons/file_type_azurepipelines.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_azurepipelines \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_babel.svg b/www/res/icon-file/icons/file_type_babel.svg deleted file mode 100644 index 1eaf1fbd3..000000000 --- a/www/res/icon-file/icons/file_type_babel.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_babel \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ballerina.svg b/www/res/icon-file/icons/file_type_ballerina.svg deleted file mode 100644 index d29281aa7..000000000 --- a/www/res/icon-file/icons/file_type_ballerina.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ballerina \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_bat.svg b/www/res/icon-file/icons/file_type_bat.svg deleted file mode 100644 index 756a6c9f1..000000000 --- a/www/res/icon-file/icons/file_type_bat.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_bat \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_bazaar.svg b/www/res/icon-file/icons/file_type_bazaar.svg deleted file mode 100644 index 7b3edc1ae..000000000 --- a/www/res/icon-file/icons/file_type_bazaar.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_bazaar \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_bazel.svg b/www/res/icon-file/icons/file_type_bazel.svg deleted file mode 100644 index 3fa8161fb..000000000 --- a/www/res/icon-file/icons/file_type_bazel.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_bazel \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_biml.svg b/www/res/icon-file/icons/file_type_biml.svg deleted file mode 100644 index 630ecf615..000000000 --- a/www/res/icon-file/icons/file_type_biml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_biml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_binary.svg b/www/res/icon-file/icons/file_type_binary.svg deleted file mode 100644 index 3f43b0b60..000000000 --- a/www/res/icon-file/icons/file_type_binary.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_binary \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_bitbucketpipeline.svg b/www/res/icon-file/icons/file_type_bitbucketpipeline.svg deleted file mode 100644 index 54eaf17e6..000000000 --- a/www/res/icon-file/icons/file_type_bitbucketpipeline.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_bitbucketpipeline \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_bithound.svg b/www/res/icon-file/icons/file_type_bithound.svg deleted file mode 100644 index 8a4a6737b..000000000 --- a/www/res/icon-file/icons/file_type_bithound.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_bithound \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_blade.svg b/www/res/icon-file/icons/file_type_blade.svg deleted file mode 100644 index 86ff7970f..000000000 --- a/www/res/icon-file/icons/file_type_blade.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_blade \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_bolt.svg b/www/res/icon-file/icons/file_type_bolt.svg deleted file mode 100644 index 195176a48..000000000 --- a/www/res/icon-file/icons/file_type_bolt.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_bolt \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_bower.svg b/www/res/icon-file/icons/file_type_bower.svg deleted file mode 100644 index 7e71b1199..000000000 --- a/www/res/icon-file/icons/file_type_bower.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_bower \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_browserslist.svg b/www/res/icon-file/icons/file_type_browserslist.svg deleted file mode 100644 index 59af85be9..000000000 --- a/www/res/icon-file/icons/file_type_browserslist.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_browserslist \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_buckbuild.svg b/www/res/icon-file/icons/file_type_buckbuild.svg deleted file mode 100644 index d4a6bd842..000000000 --- a/www/res/icon-file/icons/file_type_buckbuild.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_buckbuild \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_bundler.svg b/www/res/icon-file/icons/file_type_bundler.svg deleted file mode 100644 index 5a6a2cdf5..000000000 --- a/www/res/icon-file/icons/file_type_bundler.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_bundler \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_c.svg b/www/res/icon-file/icons/file_type_c.svg deleted file mode 100644 index 5a6001d67..000000000 --- a/www/res/icon-file/icons/file_type_c.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_c \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cabal.svg b/www/res/icon-file/icons/file_type_cabal.svg deleted file mode 100644 index 616735aa9..000000000 --- a/www/res/icon-file/icons/file_type_cabal.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cabal \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_caddy.svg b/www/res/icon-file/icons/file_type_caddy.svg deleted file mode 100644 index 6057c855e..000000000 --- a/www/res/icon-file/icons/file_type_caddy.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/www/res/icon-file/icons/file_type_cake.svg b/www/res/icon-file/icons/file_type_cake.svg deleted file mode 100644 index c6e648d5b..000000000 --- a/www/res/icon-file/icons/file_type_cake.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cake \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cakephp.svg b/www/res/icon-file/icons/file_type_cakephp.svg deleted file mode 100644 index 84283d03d..000000000 --- a/www/res/icon-file/icons/file_type_cakephp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cakephp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_capacitor.svg b/www/res/icon-file/icons/file_type_capacitor.svg deleted file mode 100644 index 9682b235f..000000000 --- a/www/res/icon-file/icons/file_type_capacitor.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_capacitor \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cargo.svg b/www/res/icon-file/icons/file_type_cargo.svg deleted file mode 100644 index e959afbbb..000000000 --- a/www/res/icon-file/icons/file_type_cargo.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cargo \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cert.svg b/www/res/icon-file/icons/file_type_cert.svg deleted file mode 100644 index 1686b239d..000000000 --- a/www/res/icon-file/icons/file_type_cert.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cert \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ceylon.svg b/www/res/icon-file/icons/file_type_ceylon.svg deleted file mode 100644 index 9e6ce98f4..000000000 --- a/www/res/icon-file/icons/file_type_ceylon.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ceylon diff --git a/www/res/icon-file/icons/file_type_cf.svg b/www/res/icon-file/icons/file_type_cf.svg deleted file mode 100644 index 6d5cde8b9..000000000 --- a/www/res/icon-file/icons/file_type_cf.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cf \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cfc.svg b/www/res/icon-file/icons/file_type_cfc.svg deleted file mode 100644 index 460db510b..000000000 --- a/www/res/icon-file/icons/file_type_cfc.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cfc \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cfm.svg b/www/res/icon-file/icons/file_type_cfm.svg deleted file mode 100644 index 7473782d0..000000000 --- a/www/res/icon-file/icons/file_type_cfm.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cfm \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cheader.svg b/www/res/icon-file/icons/file_type_cheader.svg deleted file mode 100644 index c690ecb3e..000000000 --- a/www/res/icon-file/icons/file_type_cheader.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cheader \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_chef.svg b/www/res/icon-file/icons/file_type_chef.svg deleted file mode 100644 index 199c1fc1e..000000000 --- a/www/res/icon-file/icons/file_type_chef.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_chef \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_circleci.svg b/www/res/icon-file/icons/file_type_circleci.svg deleted file mode 100644 index 9b386d7ca..000000000 --- a/www/res/icon-file/icons/file_type_circleci.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_circleci \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_class.svg b/www/res/icon-file/icons/file_type_class.svg deleted file mode 100644 index f1f8bef6e..000000000 --- a/www/res/icon-file/icons/file_type_class.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_class \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_clojure.svg b/www/res/icon-file/icons/file_type_clojure.svg deleted file mode 100644 index e79e353ef..000000000 --- a/www/res/icon-file/icons/file_type_clojure.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_clojure \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_clojurescript.svg b/www/res/icon-file/icons/file_type_clojurescript.svg deleted file mode 100644 index f41152049..000000000 --- a/www/res/icon-file/icons/file_type_clojurescript.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_clojurescript \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cloudfoundry.svg b/www/res/icon-file/icons/file_type_cloudfoundry.svg deleted file mode 100644 index 502e597ee..000000000 --- a/www/res/icon-file/icons/file_type_cloudfoundry.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cloudfoundry \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cmake.svg b/www/res/icon-file/icons/file_type_cmake.svg deleted file mode 100644 index fb3215d1f..000000000 --- a/www/res/icon-file/icons/file_type_cmake.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cmake \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cobol.svg b/www/res/icon-file/icons/file_type_cobol.svg deleted file mode 100644 index 25fb2255c..000000000 --- a/www/res/icon-file/icons/file_type_cobol.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cobol \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_codacy.svg b/www/res/icon-file/icons/file_type_codacy.svg deleted file mode 100644 index db0d0ba9c..000000000 --- a/www/res/icon-file/icons/file_type_codacy.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_codacy \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_codeclimate.svg b/www/res/icon-file/icons/file_type_codeclimate.svg deleted file mode 100644 index 17c503cd6..000000000 --- a/www/res/icon-file/icons/file_type_codeclimate.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_codeclimate \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_codecov.svg b/www/res/icon-file/icons/file_type_codecov.svg deleted file mode 100644 index e1a5a8f8d..000000000 --- a/www/res/icon-file/icons/file_type_codecov.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_codecov \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_codekit.svg b/www/res/icon-file/icons/file_type_codekit.svg deleted file mode 100644 index 576bf4213..000000000 --- a/www/res/icon-file/icons/file_type_codekit.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_codekit \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_coffeelint.svg b/www/res/icon-file/icons/file_type_coffeelint.svg deleted file mode 100644 index 148a088bc..000000000 --- a/www/res/icon-file/icons/file_type_coffeelint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_coffeelint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_coffeescript.svg b/www/res/icon-file/icons/file_type_coffeescript.svg deleted file mode 100644 index 8a41d81bc..000000000 --- a/www/res/icon-file/icons/file_type_coffeescript.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_coffeescript \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_compass.svg b/www/res/icon-file/icons/file_type_compass.svg deleted file mode 100644 index dbf4df4c3..000000000 --- a/www/res/icon-file/icons/file_type_compass.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_compass \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_composer.svg b/www/res/icon-file/icons/file_type_composer.svg deleted file mode 100644 index 677555c53..000000000 --- a/www/res/icon-file/icons/file_type_composer.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_composer \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_conan.svg b/www/res/icon-file/icons/file_type_conan.svg deleted file mode 100644 index 417a5134e..000000000 --- a/www/res/icon-file/icons/file_type_conan.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_conan \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_config.svg b/www/res/icon-file/icons/file_type_config.svg deleted file mode 100644 index 96d30e579..000000000 --- a/www/res/icon-file/icons/file_type_config.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_config \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_confluence.svg b/www/res/icon-file/icons/file_type_confluence.svg deleted file mode 100644 index 61d704f00..000000000 --- a/www/res/icon-file/icons/file_type_confluence.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_confluence \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_coveralls.svg b/www/res/icon-file/icons/file_type_coveralls.svg deleted file mode 100644 index 7a993e6ea..000000000 --- a/www/res/icon-file/icons/file_type_coveralls.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_coveralls \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cpp.svg b/www/res/icon-file/icons/file_type_cpp.svg deleted file mode 100644 index 9563371f7..000000000 --- a/www/res/icon-file/icons/file_type_cpp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cpp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cppheader.svg b/www/res/icon-file/icons/file_type_cppheader.svg deleted file mode 100644 index 5c56beade..000000000 --- a/www/res/icon-file/icons/file_type_cppheader.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cppheader \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_crowdin.svg b/www/res/icon-file/icons/file_type_crowdin.svg deleted file mode 100644 index f0a037e14..000000000 --- a/www/res/icon-file/icons/file_type_crowdin.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_crowdin \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_crystal.svg b/www/res/icon-file/icons/file_type_crystal.svg deleted file mode 100644 index a94336b94..000000000 --- a/www/res/icon-file/icons/file_type_crystal.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_crystal \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_csharp.svg b/www/res/icon-file/icons/file_type_csharp.svg deleted file mode 100644 index f102e1433..000000000 --- a/www/res/icon-file/icons/file_type_csharp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_csharp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_csproj.svg b/www/res/icon-file/icons/file_type_csproj.svg deleted file mode 100644 index 68515d467..000000000 --- a/www/res/icon-file/icons/file_type_csproj.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_csproj \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_css.svg b/www/res/icon-file/icons/file_type_css.svg deleted file mode 100644 index 3d8959a04..000000000 --- a/www/res/icon-file/icons/file_type_css.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_css \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_csscomb.svg b/www/res/icon-file/icons/file_type_csscomb.svg deleted file mode 100644 index ff79c5160..000000000 --- a/www/res/icon-file/icons/file_type_csscomb.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_csscomb \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_csslint.svg b/www/res/icon-file/icons/file_type_csslint.svg deleted file mode 100644 index 74485dd08..000000000 --- a/www/res/icon-file/icons/file_type_csslint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_csslint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cssmap.svg b/www/res/icon-file/icons/file_type_cssmap.svg deleted file mode 100644 index 6a4b2c0b9..000000000 --- a/www/res/icon-file/icons/file_type_cssmap.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cssmap \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cucumber.svg b/www/res/icon-file/icons/file_type_cucumber.svg deleted file mode 100644 index 331821a78..000000000 --- a/www/res/icon-file/icons/file_type_cucumber.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cucumber \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cuda.svg b/www/res/icon-file/icons/file_type_cuda.svg deleted file mode 100644 index 06f1103e1..000000000 --- a/www/res/icon-file/icons/file_type_cuda.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cuda \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cvs.svg b/www/res/icon-file/icons/file_type_cvs.svg deleted file mode 100644 index 5a641e4d8..000000000 --- a/www/res/icon-file/icons/file_type_cvs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cvs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cypress.svg b/www/res/icon-file/icons/file_type_cypress.svg deleted file mode 100644 index 3359851a0..000000000 --- a/www/res/icon-file/icons/file_type_cypress.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cypress \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_cython.svg b/www/res/icon-file/icons/file_type_cython.svg deleted file mode 100644 index 6cc0836c0..000000000 --- a/www/res/icon-file/icons/file_type_cython.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cython \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_dal.svg b/www/res/icon-file/icons/file_type_dal.svg deleted file mode 100644 index 99c188062..000000000 --- a/www/res/icon-file/icons/file_type_dal.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_dal \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_darcs.svg b/www/res/icon-file/icons/file_type_darcs.svg deleted file mode 100644 index 063be171b..000000000 --- a/www/res/icon-file/icons/file_type_darcs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_darcs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_dartlang.svg b/www/res/icon-file/icons/file_type_dartlang.svg deleted file mode 100644 index 0b258097a..000000000 --- a/www/res/icon-file/icons/file_type_dartlang.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_dartlang \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_db.svg b/www/res/icon-file/icons/file_type_db.svg deleted file mode 100644 index e42ec133c..000000000 --- a/www/res/icon-file/icons/file_type_db.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_db \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_delphi.svg b/www/res/icon-file/icons/file_type_delphi.svg deleted file mode 100644 index c52745d28..000000000 --- a/www/res/icon-file/icons/file_type_delphi.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_delphi \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_dependencies.svg b/www/res/icon-file/icons/file_type_dependencies.svg deleted file mode 100644 index 2553e68d5..000000000 --- a/www/res/icon-file/icons/file_type_dependencies.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_dependencies \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_diff.svg b/www/res/icon-file/icons/file_type_diff.svg deleted file mode 100644 index 7e22809e6..000000000 --- a/www/res/icon-file/icons/file_type_diff.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_diff \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_django.svg b/www/res/icon-file/icons/file_type_django.svg deleted file mode 100644 index 45b76b089..000000000 --- a/www/res/icon-file/icons/file_type_django.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_django \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_dlang.svg b/www/res/icon-file/icons/file_type_dlang.svg deleted file mode 100644 index ae67436a5..000000000 --- a/www/res/icon-file/icons/file_type_dlang.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_dlang \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_docker.svg b/www/res/icon-file/icons/file_type_docker.svg deleted file mode 100644 index 15fa40d23..000000000 --- a/www/res/icon-file/icons/file_type_docker.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_docker \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_dockertest.svg b/www/res/icon-file/icons/file_type_dockertest.svg deleted file mode 100644 index f42d26601..000000000 --- a/www/res/icon-file/icons/file_type_dockertest.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_dockertest \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_docpad.svg b/www/res/icon-file/icons/file_type_docpad.svg deleted file mode 100644 index d9b967751..000000000 --- a/www/res/icon-file/icons/file_type_docpad.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_docpad \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_docz.svg b/www/res/icon-file/icons/file_type_docz.svg deleted file mode 100644 index 37c602c5a..000000000 --- a/www/res/icon-file/icons/file_type_docz.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_docz \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_dojo.svg b/www/res/icon-file/icons/file_type_dojo.svg deleted file mode 100644 index eb4ba3aae..000000000 --- a/www/res/icon-file/icons/file_type_dojo.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_dojo diff --git a/www/res/icon-file/icons/file_type_dotjs.svg b/www/res/icon-file/icons/file_type_dotjs.svg deleted file mode 100644 index 554ed0101..000000000 --- a/www/res/icon-file/icons/file_type_dotjs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_dotjs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_doxygen.svg b/www/res/icon-file/icons/file_type_doxygen.svg deleted file mode 100644 index cd9030ccd..000000000 --- a/www/res/icon-file/icons/file_type_doxygen.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_doxygen \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_drone.svg b/www/res/icon-file/icons/file_type_drone.svg deleted file mode 100644 index d9f80b515..000000000 --- a/www/res/icon-file/icons/file_type_drone.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_drone \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_drools.svg b/www/res/icon-file/icons/file_type_drools.svg deleted file mode 100644 index 32c645625..000000000 --- a/www/res/icon-file/icons/file_type_drools.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_drools \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_dustjs.svg b/www/res/icon-file/icons/file_type_dustjs.svg deleted file mode 100644 index c05a2228c..000000000 --- a/www/res/icon-file/icons/file_type_dustjs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_dustjs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_dylan.svg b/www/res/icon-file/icons/file_type_dylan.svg deleted file mode 100644 index aabf5dbd3..000000000 --- a/www/res/icon-file/icons/file_type_dylan.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_dylan \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_edge.svg b/www/res/icon-file/icons/file_type_edge.svg deleted file mode 100644 index 94c9e6634..000000000 --- a/www/res/icon-file/icons/file_type_edge.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_edge \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_editorconfig.svg b/www/res/icon-file/icons/file_type_editorconfig.svg deleted file mode 100644 index 3d5743725..000000000 --- a/www/res/icon-file/icons/file_type_editorconfig.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_editorconfig \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_eex.svg b/www/res/icon-file/icons/file_type_eex.svg deleted file mode 100644 index f524e180f..000000000 --- a/www/res/icon-file/icons/file_type_eex.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_eex \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ejs.svg b/www/res/icon-file/icons/file_type_ejs.svg deleted file mode 100644 index 313b27ff0..000000000 --- a/www/res/icon-file/icons/file_type_ejs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ejs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_elastic.svg b/www/res/icon-file/icons/file_type_elastic.svg deleted file mode 100644 index 5189b6751..000000000 --- a/www/res/icon-file/icons/file_type_elastic.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_elastic \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_elasticbeanstalk.svg b/www/res/icon-file/icons/file_type_elasticbeanstalk.svg deleted file mode 100644 index 81ab6f38a..000000000 --- a/www/res/icon-file/icons/file_type_elasticbeanstalk.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_elasticbeanstalk \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_elixir.svg b/www/res/icon-file/icons/file_type_elixir.svg deleted file mode 100644 index 20e779811..000000000 --- a/www/res/icon-file/icons/file_type_elixir.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_elixir \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_elm.svg b/www/res/icon-file/icons/file_type_elm.svg deleted file mode 100644 index e9aa53269..000000000 --- a/www/res/icon-file/icons/file_type_elm.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_elm \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_emacs.svg b/www/res/icon-file/icons/file_type_emacs.svg deleted file mode 100644 index 432a92378..000000000 --- a/www/res/icon-file/icons/file_type_emacs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_emacs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ember.svg b/www/res/icon-file/icons/file_type_ember.svg deleted file mode 100644 index 95e85985a..000000000 --- a/www/res/icon-file/icons/file_type_ember.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ember \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ensime.svg b/www/res/icon-file/icons/file_type_ensime.svg deleted file mode 100644 index dd856ffe2..000000000 --- a/www/res/icon-file/icons/file_type_ensime.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ensime \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_eps.svg b/www/res/icon-file/icons/file_type_eps.svg deleted file mode 100644 index 5bbe0fd08..000000000 --- a/www/res/icon-file/icons/file_type_eps.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_eps \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_erb.svg b/www/res/icon-file/icons/file_type_erb.svg deleted file mode 100644 index cd568e2a9..000000000 --- a/www/res/icon-file/icons/file_type_erb.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_erb \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_erlang.svg b/www/res/icon-file/icons/file_type_erlang.svg deleted file mode 100644 index 7f7692b12..000000000 --- a/www/res/icon-file/icons/file_type_erlang.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_erlang \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_eslint.svg b/www/res/icon-file/icons/file_type_eslint.svg deleted file mode 100644 index 584de1db4..000000000 --- a/www/res/icon-file/icons/file_type_eslint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_eslint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_excel.svg b/www/res/icon-file/icons/file_type_excel.svg deleted file mode 100644 index 84dba27de..000000000 --- a/www/res/icon-file/icons/file_type_excel.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_excel \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_falcon.svg b/www/res/icon-file/icons/file_type_falcon.svg deleted file mode 100644 index b3a355a4e..000000000 --- a/www/res/icon-file/icons/file_type_falcon.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_falcon diff --git a/www/res/icon-file/icons/file_type_favicon.svg b/www/res/icon-file/icons/file_type_favicon.svg deleted file mode 100644 index cd51cdc50..000000000 --- a/www/res/icon-file/icons/file_type_favicon.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_favicon \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_fbx.svg b/www/res/icon-file/icons/file_type_fbx.svg deleted file mode 100644 index d80409d20..000000000 --- a/www/res/icon-file/icons/file_type_fbx.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_fbx \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_firebase.svg b/www/res/icon-file/icons/file_type_firebase.svg deleted file mode 100644 index 3910437df..000000000 --- a/www/res/icon-file/icons/file_type_firebase.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_firebase \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_firebasehosting.svg b/www/res/icon-file/icons/file_type_firebasehosting.svg deleted file mode 100644 index 49bea8df4..000000000 --- a/www/res/icon-file/icons/file_type_firebasehosting.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_firebasehosting \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_firestore.svg b/www/res/icon-file/icons/file_type_firestore.svg deleted file mode 100644 index 79bf16ec8..000000000 --- a/www/res/icon-file/icons/file_type_firestore.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_firestore \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_fla.svg b/www/res/icon-file/icons/file_type_fla.svg deleted file mode 100644 index 43a736538..000000000 --- a/www/res/icon-file/icons/file_type_fla.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_flash.svg b/www/res/icon-file/icons/file_type_flash.svg deleted file mode 100644 index a26938fe8..000000000 --- a/www/res/icon-file/icons/file_type_flash.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_flash \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_floobits.svg b/www/res/icon-file/icons/file_type_floobits.svg deleted file mode 100644 index 7aef151b2..000000000 --- a/www/res/icon-file/icons/file_type_floobits.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_floobits \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_flow.svg b/www/res/icon-file/icons/file_type_flow.svg deleted file mode 100644 index a3f65646f..000000000 --- a/www/res/icon-file/icons/file_type_flow.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_flow \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_flutter.svg b/www/res/icon-file/icons/file_type_flutter.svg deleted file mode 100644 index 6870514df..000000000 --- a/www/res/icon-file/icons/file_type_flutter.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_flutter \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_font.svg b/www/res/icon-file/icons/file_type_font.svg deleted file mode 100644 index 1edff775a..000000000 --- a/www/res/icon-file/icons/file_type_font.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_font \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_fortran.svg b/www/res/icon-file/icons/file_type_fortran.svg deleted file mode 100644 index 891a79d32..000000000 --- a/www/res/icon-file/icons/file_type_fortran.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_fortran \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_fossa.svg b/www/res/icon-file/icons/file_type_fossa.svg deleted file mode 100644 index 180fb770a..000000000 --- a/www/res/icon-file/icons/file_type_fossa.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_fossa \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_fossil.svg b/www/res/icon-file/icons/file_type_fossil.svg deleted file mode 100644 index a271ee8aa..000000000 --- a/www/res/icon-file/icons/file_type_fossil.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_fossil \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_freemarker.svg b/www/res/icon-file/icons/file_type_freemarker.svg deleted file mode 100644 index b98617725..000000000 --- a/www/res/icon-file/icons/file_type_freemarker.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_freemarker \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_fsharp.svg b/www/res/icon-file/icons/file_type_fsharp.svg deleted file mode 100644 index aec4e6547..000000000 --- a/www/res/icon-file/icons/file_type_fsharp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_fsharp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_fsproj.svg b/www/res/icon-file/icons/file_type_fsproj.svg deleted file mode 100644 index d94aa2d8b..000000000 --- a/www/res/icon-file/icons/file_type_fsproj.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_fsproj \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_fusebox.svg b/www/res/icon-file/icons/file_type_fusebox.svg deleted file mode 100644 index c1e03a8bd..000000000 --- a/www/res/icon-file/icons/file_type_fusebox.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_fusebox \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_galen.svg b/www/res/icon-file/icons/file_type_galen.svg deleted file mode 100644 index db9b87f97..000000000 --- a/www/res/icon-file/icons/file_type_galen.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_galen \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_gamemaker.svg b/www/res/icon-file/icons/file_type_gamemaker.svg deleted file mode 100644 index cc685b189..000000000 --- a/www/res/icon-file/icons/file_type_gamemaker.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_gamemaker \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_gatsby.svg b/www/res/icon-file/icons/file_type_gatsby.svg deleted file mode 100644 index 087b4a406..000000000 --- a/www/res/icon-file/icons/file_type_gatsby.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_gatsby \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_gcode.svg b/www/res/icon-file/icons/file_type_gcode.svg deleted file mode 100644 index d2a3bf588..000000000 --- a/www/res/icon-file/icons/file_type_gcode.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_gcode \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_git.svg b/www/res/icon-file/icons/file_type_git.svg deleted file mode 100644 index c5ea394b1..000000000 --- a/www/res/icon-file/icons/file_type_git.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_git \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_gitlab.svg b/www/res/icon-file/icons/file_type_gitlab.svg deleted file mode 100644 index c47ae9c71..000000000 --- a/www/res/icon-file/icons/file_type_gitlab.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_gitlab \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_glide.svg b/www/res/icon-file/icons/file_type_glide.svg deleted file mode 100644 index 069f54b0b..000000000 --- a/www/res/icon-file/icons/file_type_glide.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_glide \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_glsl.svg b/www/res/icon-file/icons/file_type_glsl.svg deleted file mode 100644 index ec637ce8c..000000000 --- a/www/res/icon-file/icons/file_type_glsl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_glsl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_go.svg b/www/res/icon-file/icons/file_type_go.svg deleted file mode 100644 index 05a1baa1b..000000000 --- a/www/res/icon-file/icons/file_type_go.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_go \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_godot.svg b/www/res/icon-file/icons/file_type_godot.svg deleted file mode 100644 index 5ed7b7ffa..000000000 --- a/www/res/icon-file/icons/file_type_godot.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_godot \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_gradle.svg b/www/res/icon-file/icons/file_type_gradle.svg deleted file mode 100644 index b642c1c71..000000000 --- a/www/res/icon-file/icons/file_type_gradle.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_gradle \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_graphql.svg b/www/res/icon-file/icons/file_type_graphql.svg deleted file mode 100644 index 14f9722ed..000000000 --- a/www/res/icon-file/icons/file_type_graphql.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_graphql \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_graphviz.svg b/www/res/icon-file/icons/file_type_graphviz.svg deleted file mode 100644 index 0de3c8429..000000000 --- a/www/res/icon-file/icons/file_type_graphviz.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_graphviz \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_greenkeeper.svg b/www/res/icon-file/icons/file_type_greenkeeper.svg deleted file mode 100644 index a379dbfc8..000000000 --- a/www/res/icon-file/icons/file_type_greenkeeper.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_greenkeeper \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_gridsome.svg b/www/res/icon-file/icons/file_type_gridsome.svg deleted file mode 100644 index 12a113160..000000000 --- a/www/res/icon-file/icons/file_type_gridsome.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_gridsome \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_groovy.svg b/www/res/icon-file/icons/file_type_groovy.svg deleted file mode 100644 index 6e6f9da84..000000000 --- a/www/res/icon-file/icons/file_type_groovy.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_groovy \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_grunt.svg b/www/res/icon-file/icons/file_type_grunt.svg deleted file mode 100644 index 9c1823229..000000000 --- a/www/res/icon-file/icons/file_type_grunt.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_grunt \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_gulp.svg b/www/res/icon-file/icons/file_type_gulp.svg deleted file mode 100644 index dceddcf32..000000000 --- a/www/res/icon-file/icons/file_type_gulp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_gulp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_haml.svg b/www/res/icon-file/icons/file_type_haml.svg deleted file mode 100644 index f9e53855b..000000000 --- a/www/res/icon-file/icons/file_type_haml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_haml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_handlebars.svg b/www/res/icon-file/icons/file_type_handlebars.svg deleted file mode 100644 index 52e193133..000000000 --- a/www/res/icon-file/icons/file_type_handlebars.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_handlebars \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_harbour.svg b/www/res/icon-file/icons/file_type_harbour.svg deleted file mode 100644 index 624ffaac6..000000000 --- a/www/res/icon-file/icons/file_type_harbour.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_harbour \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_haskell.svg b/www/res/icon-file/icons/file_type_haskell.svg deleted file mode 100644 index f818dac43..000000000 --- a/www/res/icon-file/icons/file_type_haskell.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_haskell \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_haxe.svg b/www/res/icon-file/icons/file_type_haxe.svg deleted file mode 100644 index 15eb9f9e4..000000000 --- a/www/res/icon-file/icons/file_type_haxe.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_haxe \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_haxecheckstyle.svg b/www/res/icon-file/icons/file_type_haxecheckstyle.svg deleted file mode 100644 index 3b43a7c01..000000000 --- a/www/res/icon-file/icons/file_type_haxecheckstyle.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_haxecheckstyle \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_haxedevelop.svg b/www/res/icon-file/icons/file_type_haxedevelop.svg deleted file mode 100644 index 4e061a538..000000000 --- a/www/res/icon-file/icons/file_type_haxedevelop.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_haxedevelop \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_helix.svg b/www/res/icon-file/icons/file_type_helix.svg deleted file mode 100644 index 0bfdac7a8..000000000 --- a/www/res/icon-file/icons/file_type_helix.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_helix \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_helm.svg b/www/res/icon-file/icons/file_type_helm.svg deleted file mode 100644 index bca7441a6..000000000 --- a/www/res/icon-file/icons/file_type_helm.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_helm \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_hjson.svg b/www/res/icon-file/icons/file_type_hjson.svg deleted file mode 100644 index 933f83962..000000000 --- a/www/res/icon-file/icons/file_type_hjson.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_hjson \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_hlsl.svg b/www/res/icon-file/icons/file_type_hlsl.svg deleted file mode 100644 index 048966ca4..000000000 --- a/www/res/icon-file/icons/file_type_hlsl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_hlsl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_homeassistant.svg b/www/res/icon-file/icons/file_type_homeassistant.svg deleted file mode 100644 index a9ef6d54e..000000000 --- a/www/res/icon-file/icons/file_type_homeassistant.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_homeassistant \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_host.svg b/www/res/icon-file/icons/file_type_host.svg deleted file mode 100644 index 2269e2e88..000000000 --- a/www/res/icon-file/icons/file_type_host.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_host \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_html.svg b/www/res/icon-file/icons/file_type_html.svg deleted file mode 100644 index a0152d868..000000000 --- a/www/res/icon-file/icons/file_type_html.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_html \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_htmlhint.svg b/www/res/icon-file/icons/file_type_htmlhint.svg deleted file mode 100644 index 6f512b931..000000000 --- a/www/res/icon-file/icons/file_type_htmlhint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_htmlhint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_http.svg b/www/res/icon-file/icons/file_type_http.svg deleted file mode 100644 index ae69a899e..000000000 --- a/www/res/icon-file/icons/file_type_http.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_http \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_husky.svg b/www/res/icon-file/icons/file_type_husky.svg deleted file mode 100644 index 576c9d890..000000000 --- a/www/res/icon-file/icons/file_type_husky.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_husky \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_icl.svg b/www/res/icon-file/icons/file_type_icl.svg deleted file mode 100644 index 5f18eda55..000000000 --- a/www/res/icon-file/icons/file_type_icl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_icl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_idris.svg b/www/res/icon-file/icons/file_type_idris.svg deleted file mode 100644 index 47a97c172..000000000 --- a/www/res/icon-file/icons/file_type_idris.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_idris \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_idrisbin.svg b/www/res/icon-file/icons/file_type_idrisbin.svg deleted file mode 100644 index 8b82b34e2..000000000 --- a/www/res/icon-file/icons/file_type_idrisbin.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_idrisb \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_idrispkg.svg b/www/res/icon-file/icons/file_type_idrispkg.svg deleted file mode 100644 index 85a0f199b..000000000 --- a/www/res/icon-file/icons/file_type_idrispkg.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ipkg \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_image.svg b/www/res/icon-file/icons/file_type_image.svg deleted file mode 100644 index df924c0e2..000000000 --- a/www/res/icon-file/icons/file_type_image.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_image \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_imba.svg b/www/res/icon-file/icons/file_type_imba.svg deleted file mode 100644 index 28eae045e..000000000 --- a/www/res/icon-file/icons/file_type_imba.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_imba \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_infopath.svg b/www/res/icon-file/icons/file_type_infopath.svg deleted file mode 100644 index c42144e0d..000000000 --- a/www/res/icon-file/icons/file_type_infopath.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_infopath \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_informix.svg b/www/res/icon-file/icons/file_type_informix.svg deleted file mode 100644 index 884d6cf0c..000000000 --- a/www/res/icon-file/icons/file_type_informix.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_informix \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ini.svg b/www/res/icon-file/icons/file_type_ini.svg deleted file mode 100644 index 741d211e7..000000000 --- a/www/res/icon-file/icons/file_type_ini.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ini \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ink.svg b/www/res/icon-file/icons/file_type_ink.svg deleted file mode 100644 index dc76929d5..000000000 --- a/www/res/icon-file/icons/file_type_ink.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ink \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_innosetup.svg b/www/res/icon-file/icons/file_type_innosetup.svg deleted file mode 100644 index b99dcef09..000000000 --- a/www/res/icon-file/icons/file_type_innosetup.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_innosetup \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_io.svg b/www/res/icon-file/icons/file_type_io.svg deleted file mode 100644 index 690a3f194..000000000 --- a/www/res/icon-file/icons/file_type_io.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_io \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_iodine.svg b/www/res/icon-file/icons/file_type_iodine.svg deleted file mode 100644 index 9ef160602..000000000 --- a/www/res/icon-file/icons/file_type_iodine.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_iodine \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ionic.svg b/www/res/icon-file/icons/file_type_ionic.svg deleted file mode 100644 index 272a1d61b..000000000 --- a/www/res/icon-file/icons/file_type_ionic.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ionic \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jake.svg b/www/res/icon-file/icons/file_type_jake.svg deleted file mode 100644 index a16cfc185..000000000 --- a/www/res/icon-file/icons/file_type_jake.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jake \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_janet.svg b/www/res/icon-file/icons/file_type_janet.svg deleted file mode 100644 index dfee8a926..000000000 --- a/www/res/icon-file/icons/file_type_janet.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_janet \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jar.svg b/www/res/icon-file/icons/file_type_jar.svg deleted file mode 100644 index 92d378026..000000000 --- a/www/res/icon-file/icons/file_type_jar.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jar \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_java.svg b/www/res/icon-file/icons/file_type_java.svg deleted file mode 100644 index 14121c58f..000000000 --- a/www/res/icon-file/icons/file_type_java.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_java \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jbuilder.svg b/www/res/icon-file/icons/file_type_jbuilder.svg deleted file mode 100644 index 53b335cec..000000000 --- a/www/res/icon-file/icons/file_type_jbuilder.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jbuilder \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jekyll.svg b/www/res/icon-file/icons/file_type_jekyll.svg deleted file mode 100644 index 906b14d03..000000000 --- a/www/res/icon-file/icons/file_type_jekyll.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jekyll \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jenkins.svg b/www/res/icon-file/icons/file_type_jenkins.svg deleted file mode 100644 index 3a7f02db8..000000000 --- a/www/res/icon-file/icons/file_type_jenkins.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jenkins \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jest.svg b/www/res/icon-file/icons/file_type_jest.svg deleted file mode 100644 index f3a0a0dcc..000000000 --- a/www/res/icon-file/icons/file_type_jest.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jest \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jinja.svg b/www/res/icon-file/icons/file_type_jinja.svg deleted file mode 100644 index 5a5552461..000000000 --- a/www/res/icon-file/icons/file_type_jinja.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jinja \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jpm.svg b/www/res/icon-file/icons/file_type_jpm.svg deleted file mode 100644 index fa839d548..000000000 --- a/www/res/icon-file/icons/file_type_jpm.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jpm \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_js.svg b/www/res/icon-file/icons/file_type_js.svg deleted file mode 100644 index 92a214148..000000000 --- a/www/res/icon-file/icons/file_type_js.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_js \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jsbeautify.svg b/www/res/icon-file/icons/file_type_jsbeautify.svg deleted file mode 100644 index 31b8225dd..000000000 --- a/www/res/icon-file/icons/file_type_jsbeautify.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jsbeautify \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jsconfig.svg b/www/res/icon-file/icons/file_type_jsconfig.svg deleted file mode 100644 index d5380c78d..000000000 --- a/www/res/icon-file/icons/file_type_jsconfig.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jsconfig \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jshint.svg b/www/res/icon-file/icons/file_type_jshint.svg deleted file mode 100644 index a94631570..000000000 --- a/www/res/icon-file/icons/file_type_jshint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jshint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jsmap.svg b/www/res/icon-file/icons/file_type_jsmap.svg deleted file mode 100644 index f8202b007..000000000 --- a/www/res/icon-file/icons/file_type_jsmap.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jsmap \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_json.svg b/www/res/icon-file/icons/file_type_json.svg deleted file mode 100644 index 26c39ba7c..000000000 --- a/www/res/icon-file/icons/file_type_json.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_json \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jsonld.svg b/www/res/icon-file/icons/file_type_jsonld.svg deleted file mode 100644 index 49afdf452..000000000 --- a/www/res/icon-file/icons/file_type_jsonld.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jsonld2 \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jsonnet.svg b/www/res/icon-file/icons/file_type_jsonnet.svg deleted file mode 100644 index 6e8c37a87..000000000 --- a/www/res/icon-file/icons/file_type_jsonnet.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jsonnet \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jsp.svg b/www/res/icon-file/icons/file_type_jsp.svg deleted file mode 100644 index 99113b1f0..000000000 --- a/www/res/icon-file/icons/file_type_jsp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jsp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jss.svg b/www/res/icon-file/icons/file_type_jss.svg deleted file mode 100644 index fb77c5ae2..000000000 --- a/www/res/icon-file/icons/file_type_jss.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jss \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_julia.svg b/www/res/icon-file/icons/file_type_julia.svg deleted file mode 100644 index 49343a27e..000000000 --- a/www/res/icon-file/icons/file_type_julia.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_julia \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_jupyter.svg b/www/res/icon-file/icons/file_type_jupyter.svg deleted file mode 100644 index 974a58a61..000000000 --- a/www/res/icon-file/icons/file_type_jupyter.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_jupyter \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_karma.svg b/www/res/icon-file/icons/file_type_karma.svg deleted file mode 100644 index fd6287f7a..000000000 --- a/www/res/icon-file/icons/file_type_karma.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_karma \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_key.svg b/www/res/icon-file/icons/file_type_key.svg deleted file mode 100644 index f1ea031a7..000000000 --- a/www/res/icon-file/icons/file_type_key.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_key \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_kitchenci.svg b/www/res/icon-file/icons/file_type_kitchenci.svg deleted file mode 100644 index d71b87808..000000000 --- a/www/res/icon-file/icons/file_type_kitchenci.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_kitchenci \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_kite.svg b/www/res/icon-file/icons/file_type_kite.svg deleted file mode 100644 index 937a48141..000000000 --- a/www/res/icon-file/icons/file_type_kite.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_kite \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_kivy.svg b/www/res/icon-file/icons/file_type_kivy.svg deleted file mode 100644 index 864f27a93..000000000 --- a/www/res/icon-file/icons/file_type_kivy.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_kivy \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_kos.svg b/www/res/icon-file/icons/file_type_kos.svg deleted file mode 100644 index af79d932f..000000000 --- a/www/res/icon-file/icons/file_type_kos.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_kos \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_kotlin.svg b/www/res/icon-file/icons/file_type_kotlin.svg deleted file mode 100644 index be9615691..000000000 --- a/www/res/icon-file/icons/file_type_kotlin.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_kotlin \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_layout.svg b/www/res/icon-file/icons/file_type_layout.svg deleted file mode 100644 index 6beda29cd..000000000 --- a/www/res/icon-file/icons/file_type_layout.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_layout \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_lerna.svg b/www/res/icon-file/icons/file_type_lerna.svg deleted file mode 100644 index 6d9e8a3c0..000000000 --- a/www/res/icon-file/icons/file_type_lerna.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_lerna \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_less.svg b/www/res/icon-file/icons/file_type_less.svg deleted file mode 100644 index 0e25f07ce..000000000 --- a/www/res/icon-file/icons/file_type_less.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_less \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_license.svg b/www/res/icon-file/icons/file_type_license.svg deleted file mode 100644 index 6859deae8..000000000 --- a/www/res/icon-file/icons/file_type_license.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_license \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_lime.svg b/www/res/icon-file/icons/file_type_lime.svg deleted file mode 100644 index 64564ee7a..000000000 --- a/www/res/icon-file/icons/file_type_lime.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_lime \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_lintstagedrc.svg b/www/res/icon-file/icons/file_type_lintstagedrc.svg deleted file mode 100644 index ac0838b0b..000000000 --- a/www/res/icon-file/icons/file_type_lintstagedrc.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_lintstagedrc \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_liquid.svg b/www/res/icon-file/icons/file_type_liquid.svg deleted file mode 100644 index 80919942e..000000000 --- a/www/res/icon-file/icons/file_type_liquid.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_liquid \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_lisp.svg b/www/res/icon-file/icons/file_type_lisp.svg deleted file mode 100644 index 8dd946c5e..000000000 --- a/www/res/icon-file/icons/file_type_lisp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_lisp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_livescript.svg b/www/res/icon-file/icons/file_type_livescript.svg deleted file mode 100644 index dda067e5d..000000000 --- a/www/res/icon-file/icons/file_type_livescript.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_livescript \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_locale.svg b/www/res/icon-file/icons/file_type_locale.svg deleted file mode 100644 index 2a113a2b5..000000000 --- a/www/res/icon-file/icons/file_type_locale.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_locale \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_log.svg b/www/res/icon-file/icons/file_type_log.svg deleted file mode 100644 index dc22622fc..000000000 --- a/www/res/icon-file/icons/file_type_log.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_log \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_lolcode.svg b/www/res/icon-file/icons/file_type_lolcode.svg deleted file mode 100644 index 13eb6ae21..000000000 --- a/www/res/icon-file/icons/file_type_lolcode.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_lolcode \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_lsl.svg b/www/res/icon-file/icons/file_type_lsl.svg deleted file mode 100644 index ab07deb57..000000000 --- a/www/res/icon-file/icons/file_type_lsl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_lsl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_lua.svg b/www/res/icon-file/icons/file_type_lua.svg deleted file mode 100644 index 44f3fa086..000000000 --- a/www/res/icon-file/icons/file_type_lua.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_lua \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_lync.svg b/www/res/icon-file/icons/file_type_lync.svg deleted file mode 100644 index 333f08b30..000000000 --- a/www/res/icon-file/icons/file_type_lync.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_lync \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_makefile.svg b/www/res/icon-file/icons/file_type_makefile.svg deleted file mode 100644 index 431714f94..000000000 --- a/www/res/icon-file/icons/file_type_makefile.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_makefile \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_manifest.svg b/www/res/icon-file/icons/file_type_manifest.svg deleted file mode 100644 index a5cd18e0f..000000000 --- a/www/res/icon-file/icons/file_type_manifest.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_manifest \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_map.svg b/www/res/icon-file/icons/file_type_map.svg deleted file mode 100644 index 660b76490..000000000 --- a/www/res/icon-file/icons/file_type_map.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_map \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mariadb.svg b/www/res/icon-file/icons/file_type_mariadb.svg deleted file mode 100644 index 96e2a7aa1..000000000 --- a/www/res/icon-file/icons/file_type_mariadb.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mariadb \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_markdown.svg b/www/res/icon-file/icons/file_type_markdown.svg deleted file mode 100644 index c5b32a6f7..000000000 --- a/www/res/icon-file/icons/file_type_markdown.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_markdown \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_markdownlint.svg b/www/res/icon-file/icons/file_type_markdownlint.svg deleted file mode 100644 index 3aa3b5d26..000000000 --- a/www/res/icon-file/icons/file_type_markdownlint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_markdownlint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_marko.svg b/www/res/icon-file/icons/file_type_marko.svg deleted file mode 100644 index 7d884fddf..000000000 --- a/www/res/icon-file/icons/file_type_marko.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_marko \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_markojs.svg b/www/res/icon-file/icons/file_type_markojs.svg deleted file mode 100644 index 4e1f8fca2..000000000 --- a/www/res/icon-file/icons/file_type_markojs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_markojs diff --git a/www/res/icon-file/icons/file_type_matlab.png b/www/res/icon-file/icons/file_type_matlab.png deleted file mode 100644 index e8665316d..000000000 Binary files a/www/res/icon-file/icons/file_type_matlab.png and /dev/null differ diff --git a/www/res/icon-file/icons/file_type_maven.svg b/www/res/icon-file/icons/file_type_maven.svg deleted file mode 100644 index 0b0e0a15d..000000000 --- a/www/res/icon-file/icons/file_type_maven.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_maven \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_maxscript.svg b/www/res/icon-file/icons/file_type_maxscript.svg deleted file mode 100644 index 088fcd389..000000000 --- a/www/res/icon-file/icons/file_type_maxscript.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_maxscript \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_maya.svg b/www/res/icon-file/icons/file_type_maya.svg deleted file mode 100644 index d054a9530..000000000 --- a/www/res/icon-file/icons/file_type_maya.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_maya \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mdx.svg b/www/res/icon-file/icons/file_type_mdx.svg deleted file mode 100644 index 83b62b791..000000000 --- a/www/res/icon-file/icons/file_type_mdx.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mdx \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mediawiki.svg b/www/res/icon-file/icons/file_type_mediawiki.svg deleted file mode 100644 index 0b138597f..000000000 --- a/www/res/icon-file/icons/file_type_mediawiki.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mediawiki \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mercurial.svg b/www/res/icon-file/icons/file_type_mercurial.svg deleted file mode 100644 index 626541432..000000000 --- a/www/res/icon-file/icons/file_type_mercurial.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mercurial \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_meson.svg b/www/res/icon-file/icons/file_type_meson.svg deleted file mode 100644 index 5bdd6b7c8..000000000 --- a/www/res/icon-file/icons/file_type_meson.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_meson \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_meteor.svg b/www/res/icon-file/icons/file_type_meteor.svg deleted file mode 100644 index 84d96a39a..000000000 --- a/www/res/icon-file/icons/file_type_meteor.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_meteor \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mjml.svg b/www/res/icon-file/icons/file_type_mjml.svg deleted file mode 100644 index 6f2ec0509..000000000 --- a/www/res/icon-file/icons/file_type_mjml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mjml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mlang.svg b/www/res/icon-file/icons/file_type_mlang.svg deleted file mode 100644 index 328545456..000000000 --- a/www/res/icon-file/icons/file_type_mlang.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mlang \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mocha.svg b/www/res/icon-file/icons/file_type_mocha.svg deleted file mode 100644 index e7b804070..000000000 --- a/www/res/icon-file/icons/file_type_mocha.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mocha \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mojolicious.svg b/www/res/icon-file/icons/file_type_mojolicious.svg deleted file mode 100644 index 1369d1729..000000000 --- a/www/res/icon-file/icons/file_type_mojolicious.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mojolicious \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_moleculer.svg b/www/res/icon-file/icons/file_type_moleculer.svg deleted file mode 100644 index d825864f3..000000000 --- a/www/res/icon-file/icons/file_type_moleculer.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_moleculer \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mongo.svg b/www/res/icon-file/icons/file_type_mongo.svg deleted file mode 100644 index 0d1b3ab34..000000000 --- a/www/res/icon-file/icons/file_type_mongo.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mongo \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_monotone.svg b/www/res/icon-file/icons/file_type_monotone.svg deleted file mode 100644 index 39cba4c7e..000000000 --- a/www/res/icon-file/icons/file_type_monotone.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_monotone \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mson.svg b/www/res/icon-file/icons/file_type_mson.svg deleted file mode 100644 index 6ae2668de..000000000 --- a/www/res/icon-file/icons/file_type_mson.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mson \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mustache.svg b/www/res/icon-file/icons/file_type_mustache.svg deleted file mode 100644 index 15828d683..000000000 --- a/www/res/icon-file/icons/file_type_mustache.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mustache \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_mysql.svg b/www/res/icon-file/icons/file_type_mysql.svg deleted file mode 100644 index f457a23aa..000000000 --- a/www/res/icon-file/icons/file_type_mysql.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_mysql \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nearly.svg b/www/res/icon-file/icons/file_type_nearly.svg deleted file mode 100644 index 072d9e6fe..000000000 --- a/www/res/icon-file/icons/file_type_nearly.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nearly \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nestjs.svg b/www/res/icon-file/icons/file_type_nestjs.svg deleted file mode 100644 index 7e47150a1..000000000 --- a/www/res/icon-file/icons/file_type_nestjs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nestjs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_netlify.svg b/www/res/icon-file/icons/file_type_netlify.svg deleted file mode 100644 index 3f8eddd2e..000000000 --- a/www/res/icon-file/icons/file_type_netlify.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_netlify \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nginx.svg b/www/res/icon-file/icons/file_type_nginx.svg deleted file mode 100644 index cff95ef32..000000000 --- a/www/res/icon-file/icons/file_type_nginx.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nginx \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nim.svg b/www/res/icon-file/icons/file_type_nim.svg deleted file mode 100644 index 2aa6eef6a..000000000 --- a/www/res/icon-file/icons/file_type_nim.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nim \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ninja.svg b/www/res/icon-file/icons/file_type_ninja.svg deleted file mode 100644 index 5e7194071..000000000 --- a/www/res/icon-file/icons/file_type_ninja.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ninja \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_node.svg b/www/res/icon-file/icons/file_type_node.svg deleted file mode 100644 index 7c6bde87c..000000000 --- a/www/res/icon-file/icons/file_type_node.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_node \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nodemon.svg b/www/res/icon-file/icons/file_type_nodemon.svg deleted file mode 100644 index dae9738b6..000000000 --- a/www/res/icon-file/icons/file_type_nodemon.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nodemon \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_npm.svg b/www/res/icon-file/icons/file_type_npm.svg deleted file mode 100644 index 02e6209b3..000000000 --- a/www/res/icon-file/icons/file_type_npm.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_npm \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nsi.svg b/www/res/icon-file/icons/file_type_nsi.svg deleted file mode 100644 index 05b99cec8..000000000 --- a/www/res/icon-file/icons/file_type_nsi.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nsi \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nsri-integrity.svg b/www/res/icon-file/icons/file_type_nsri-integrity.svg deleted file mode 100644 index 53e261c8b..000000000 --- a/www/res/icon-file/icons/file_type_nsri-integrity.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nsri-integrity \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nsri.svg b/www/res/icon-file/icons/file_type_nsri.svg deleted file mode 100644 index d83aeca95..000000000 --- a/www/res/icon-file/icons/file_type_nsri.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nsri \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nuget.svg b/www/res/icon-file/icons/file_type_nuget.svg deleted file mode 100644 index 72e5afea2..000000000 --- a/www/res/icon-file/icons/file_type_nuget.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nuget \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nunjucks.svg b/www/res/icon-file/icons/file_type_nunjucks.svg deleted file mode 100644 index dd4cc4e0b..000000000 --- a/www/res/icon-file/icons/file_type_nunjucks.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nunjucks \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nuxt.svg b/www/res/icon-file/icons/file_type_nuxt.svg deleted file mode 100644 index 78fa12d91..000000000 --- a/www/res/icon-file/icons/file_type_nuxt.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nuxt \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_nyc.svg b/www/res/icon-file/icons/file_type_nyc.svg deleted file mode 100644 index e805c32b8..000000000 --- a/www/res/icon-file/icons/file_type_nyc.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_nyc \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_objectivec.svg b/www/res/icon-file/icons/file_type_objectivec.svg deleted file mode 100644 index fe0a61be7..000000000 --- a/www/res/icon-file/icons/file_type_objectivec.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_objectivec \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_objectivecpp.svg b/www/res/icon-file/icons/file_type_objectivecpp.svg deleted file mode 100644 index cdf5be0a6..000000000 --- a/www/res/icon-file/icons/file_type_objectivecpp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_objectivecpp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ocaml.svg b/www/res/icon-file/icons/file_type_ocaml.svg deleted file mode 100644 index 8e5d8e9a1..000000000 --- a/www/res/icon-file/icons/file_type_ocaml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ocaml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_onenote.svg b/www/res/icon-file/icons/file_type_onenote.svg deleted file mode 100644 index 78cfc0f3f..000000000 --- a/www/res/icon-file/icons/file_type_onenote.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_onenote \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_openHAB.svg b/www/res/icon-file/icons/file_type_openHAB.svg deleted file mode 100644 index 6a624e3bf..000000000 --- a/www/res/icon-file/icons/file_type_openHAB.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_openHAB \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_opencl.svg b/www/res/icon-file/icons/file_type_opencl.svg deleted file mode 100644 index 80dbfb85e..000000000 --- a/www/res/icon-file/icons/file_type_opencl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_opencl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_org.svg b/www/res/icon-file/icons/file_type_org.svg deleted file mode 100644 index 6ae09113c..000000000 --- a/www/res/icon-file/icons/file_type_org.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_org \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_outlook.svg b/www/res/icon-file/icons/file_type_outlook.svg deleted file mode 100644 index 65bc5b99f..000000000 --- a/www/res/icon-file/icons/file_type_outlook.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_outlook \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ovpn.svg b/www/res/icon-file/icons/file_type_ovpn.svg deleted file mode 100644 index 1d8df5c73..000000000 --- a/www/res/icon-file/icons/file_type_ovpn.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_package.svg b/www/res/icon-file/icons/file_type_package.svg deleted file mode 100644 index 7fd247836..000000000 --- a/www/res/icon-file/icons/file_type_package.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_package \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_paket.svg b/www/res/icon-file/icons/file_type_paket.svg deleted file mode 100644 index 222491f54..000000000 --- a/www/res/icon-file/icons/file_type_paket.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_paket \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_patch.svg b/www/res/icon-file/icons/file_type_patch.svg deleted file mode 100644 index 4696a2341..000000000 --- a/www/res/icon-file/icons/file_type_patch.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_patch \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_pcl.svg b/www/res/icon-file/icons/file_type_pcl.svg deleted file mode 100644 index 523c9c2b7..000000000 --- a/www/res/icon-file/icons/file_type_pcl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_pcl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_pddl.svg b/www/res/icon-file/icons/file_type_pddl.svg deleted file mode 100644 index 3f1298327..000000000 --- a/www/res/icon-file/icons/file_type_pddl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_pddl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_pdf.svg b/www/res/icon-file/icons/file_type_pdf.svg deleted file mode 100644 index 79087524e..000000000 --- a/www/res/icon-file/icons/file_type_pdf.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_pdf \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_perl.svg b/www/res/icon-file/icons/file_type_perl.svg deleted file mode 100644 index c5c17aa1a..000000000 --- a/www/res/icon-file/icons/file_type_perl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_perl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_pgsql.svg b/www/res/icon-file/icons/file_type_pgsql.svg deleted file mode 100644 index a3a5be18c..000000000 --- a/www/res/icon-file/icons/file_type_pgsql.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_pgsql \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_photoshop.svg b/www/res/icon-file/icons/file_type_photoshop.svg deleted file mode 100644 index 404b664a8..000000000 --- a/www/res/icon-file/icons/file_type_photoshop.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_photoshop \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_php.svg b/www/res/icon-file/icons/file_type_php.svg deleted file mode 100644 index dd6203ae5..000000000 --- a/www/res/icon-file/icons/file_type_php.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_php \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_phpcsfixer.svg b/www/res/icon-file/icons/file_type_phpcsfixer.svg deleted file mode 100644 index 7487f6f5d..000000000 --- a/www/res/icon-file/icons/file_type_phpcsfixer.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_phpcsfixer \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_phpunit.svg b/www/res/icon-file/icons/file_type_phpunit.svg deleted file mode 100644 index 769d7a00f..000000000 --- a/www/res/icon-file/icons/file_type_phpunit.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_phpunit \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_phraseapp.svg b/www/res/icon-file/icons/file_type_phraseapp.svg deleted file mode 100644 index 143e883f1..000000000 --- a/www/res/icon-file/icons/file_type_phraseapp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_phraseapp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_pip.svg b/www/res/icon-file/icons/file_type_pip.svg deleted file mode 100644 index 3d041f4cf..000000000 --- a/www/res/icon-file/icons/file_type_pip.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_pip \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_plantuml.svg b/www/res/icon-file/icons/file_type_plantuml.svg deleted file mode 100644 index 6e93ac87e..000000000 --- a/www/res/icon-file/icons/file_type_plantuml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_plantuml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_platformio.svg b/www/res/icon-file/icons/file_type_platformio.svg deleted file mode 100644 index e42aa9c50..000000000 --- a/www/res/icon-file/icons/file_type_platformio.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_platformio \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_plsql.svg b/www/res/icon-file/icons/file_type_plsql.svg deleted file mode 100644 index c9c9d97ac..000000000 --- a/www/res/icon-file/icons/file_type_plsql.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_plsql \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_poedit.svg b/www/res/icon-file/icons/file_type_poedit.svg deleted file mode 100644 index ed6640e6f..000000000 --- a/www/res/icon-file/icons/file_type_poedit.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_poedit \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_polymer.svg b/www/res/icon-file/icons/file_type_polymer.svg deleted file mode 100644 index b2a9989de..000000000 --- a/www/res/icon-file/icons/file_type_polymer.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_polymer \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_pony.svg b/www/res/icon-file/icons/file_type_pony.svg deleted file mode 100644 index 4153c0366..000000000 --- a/www/res/icon-file/icons/file_type_pony.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_pony \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_postcss.svg b/www/res/icon-file/icons/file_type_postcss.svg deleted file mode 100644 index 083092002..000000000 --- a/www/res/icon-file/icons/file_type_postcss.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_postcss \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_postcssconfig.svg b/www/res/icon-file/icons/file_type_postcssconfig.svg deleted file mode 100644 index b6c95af31..000000000 --- a/www/res/icon-file/icons/file_type_postcssconfig.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_postcssconfig \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_powerpoint.svg b/www/res/icon-file/icons/file_type_powerpoint.svg deleted file mode 100644 index af9d6cd82..000000000 --- a/www/res/icon-file/icons/file_type_powerpoint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_powerpoint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_powershell.svg b/www/res/icon-file/icons/file_type_powershell.svg deleted file mode 100644 index 643d399d7..000000000 --- a/www/res/icon-file/icons/file_type_powershell.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_powershell \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_precommit.svg b/www/res/icon-file/icons/file_type_precommit.svg deleted file mode 100644 index 1403d884f..000000000 --- a/www/res/icon-file/icons/file_type_precommit.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_precommit \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_prettier.svg b/www/res/icon-file/icons/file_type_prettier.svg deleted file mode 100644 index a13bfd1d4..000000000 --- a/www/res/icon-file/icons/file_type_prettier.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_prettier \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_prisma.svg b/www/res/icon-file/icons/file_type_prisma.svg deleted file mode 100644 index 99072da41..000000000 --- a/www/res/icon-file/icons/file_type_prisma.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_prisma \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_processinglang.svg b/www/res/icon-file/icons/file_type_processinglang.svg deleted file mode 100644 index 8bcf5126c..000000000 --- a/www/res/icon-file/icons/file_type_processinglang.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_processinglang \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_procfile.svg b/www/res/icon-file/icons/file_type_procfile.svg deleted file mode 100644 index 0b2b4a464..000000000 --- a/www/res/icon-file/icons/file_type_procfile.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_procfile \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_progress.svg b/www/res/icon-file/icons/file_type_progress.svg deleted file mode 100644 index e1ab286a3..000000000 --- a/www/res/icon-file/icons/file_type_progress.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_progress \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_prolog.svg b/www/res/icon-file/icons/file_type_prolog.svg deleted file mode 100644 index cc07ee7b7..000000000 --- a/www/res/icon-file/icons/file_type_prolog.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_prolog \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_prometheus.svg b/www/res/icon-file/icons/file_type_prometheus.svg deleted file mode 100644 index 72a472909..000000000 --- a/www/res/icon-file/icons/file_type_prometheus.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_prometheus \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_protobuf.svg b/www/res/icon-file/icons/file_type_protobuf.svg deleted file mode 100644 index 3e315d496..000000000 --- a/www/res/icon-file/icons/file_type_protobuf.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_protobuf \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_protractor.svg b/www/res/icon-file/icons/file_type_protractor.svg deleted file mode 100644 index 1e92c2b99..000000000 --- a/www/res/icon-file/icons/file_type_protractor.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_protractor \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_publisher.svg b/www/res/icon-file/icons/file_type_publisher.svg deleted file mode 100644 index 1f6627c9e..000000000 --- a/www/res/icon-file/icons/file_type_publisher.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_publisher \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_pug.svg b/www/res/icon-file/icons/file_type_pug.svg deleted file mode 100644 index c6b0ad9cf..000000000 --- a/www/res/icon-file/icons/file_type_pug.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_pug \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_puppet.svg b/www/res/icon-file/icons/file_type_puppet.svg deleted file mode 100644 index 5259be1db..000000000 --- a/www/res/icon-file/icons/file_type_puppet.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_puppet \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_purescript.svg b/www/res/icon-file/icons/file_type_purescript.svg deleted file mode 100644 index bc9165780..000000000 --- a/www/res/icon-file/icons/file_type_purescript.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_purescript \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_pyret.svg b/www/res/icon-file/icons/file_type_pyret.svg deleted file mode 100644 index 9a0f33eda..000000000 --- a/www/res/icon-file/icons/file_type_pyret.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_pyret \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_python.svg b/www/res/icon-file/icons/file_type_python.svg deleted file mode 100644 index 677f2165f..000000000 --- a/www/res/icon-file/icons/file_type_python.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_python \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_pyup.svg b/www/res/icon-file/icons/file_type_pyup.svg deleted file mode 100644 index 8d805e3ae..000000000 --- a/www/res/icon-file/icons/file_type_pyup.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_pyup \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_q.svg b/www/res/icon-file/icons/file_type_q.svg deleted file mode 100644 index 5296417e4..000000000 --- a/www/res/icon-file/icons/file_type_q.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_q \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_qbs.svg b/www/res/icon-file/icons/file_type_qbs.svg deleted file mode 100644 index f38ceae74..000000000 --- a/www/res/icon-file/icons/file_type_qbs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_qbs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_qlikview.svg b/www/res/icon-file/icons/file_type_qlikview.svg deleted file mode 100644 index f76fec9b2..000000000 --- a/www/res/icon-file/icons/file_type_qlikview.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_qlikview \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_qml.svg b/www/res/icon-file/icons/file_type_qml.svg deleted file mode 100644 index 9f233cfdd..000000000 --- a/www/res/icon-file/icons/file_type_qml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_qml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_qmldir.svg b/www/res/icon-file/icons/file_type_qmldir.svg deleted file mode 100644 index f557e28e8..000000000 --- a/www/res/icon-file/icons/file_type_qmldir.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_qmldir \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_qsharp.svg b/www/res/icon-file/icons/file_type_qsharp.svg deleted file mode 100644 index ce48a4398..000000000 --- a/www/res/icon-file/icons/file_type_qsharp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_qsharp \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_quasar.svg b/www/res/icon-file/icons/file_type_quasar.svg deleted file mode 100644 index 10670f2a2..000000000 --- a/www/res/icon-file/icons/file_type_quasar.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_quasar \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_r.svg b/www/res/icon-file/icons/file_type_r.svg deleted file mode 100644 index 28f49c5eb..000000000 --- a/www/res/icon-file/icons/file_type_r.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_r \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_racket.svg b/www/res/icon-file/icons/file_type_racket.svg deleted file mode 100644 index 6dcfea1a2..000000000 --- a/www/res/icon-file/icons/file_type_racket.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_racket \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_rails.svg b/www/res/icon-file/icons/file_type_rails.svg deleted file mode 100644 index f66d3cadd..000000000 --- a/www/res/icon-file/icons/file_type_rails.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_rails \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_rake.svg b/www/res/icon-file/icons/file_type_rake.svg deleted file mode 100644 index 308ec2bc8..000000000 --- a/www/res/icon-file/icons/file_type_rake.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_rake \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_raml.svg b/www/res/icon-file/icons/file_type_raml.svg deleted file mode 100644 index cd8c8925e..000000000 --- a/www/res/icon-file/icons/file_type_raml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_raml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_razor.svg b/www/res/icon-file/icons/file_type_razor.svg deleted file mode 100644 index 8df057c0f..000000000 --- a/www/res/icon-file/icons/file_type_razor.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_razor \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_reactjs.svg b/www/res/icon-file/icons/file_type_reactjs.svg deleted file mode 100644 index dfb268a43..000000000 --- a/www/res/icon-file/icons/file_type_reactjs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_reactjs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_reacttemplate.svg b/www/res/icon-file/icons/file_type_reacttemplate.svg deleted file mode 100644 index 787bba852..000000000 --- a/www/res/icon-file/icons/file_type_reacttemplate.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_reacttemplate \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_reactts.svg b/www/res/icon-file/icons/file_type_reactts.svg deleted file mode 100644 index 87c3b72ee..000000000 --- a/www/res/icon-file/icons/file_type_reactts.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_reactts \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_reason.svg b/www/res/icon-file/icons/file_type_reason.svg deleted file mode 100644 index 5e17d193b..000000000 --- a/www/res/icon-file/icons/file_type_reason.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_reason \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_red.svg b/www/res/icon-file/icons/file_type_red.svg deleted file mode 100644 index 80bf3c8b0..000000000 --- a/www/res/icon-file/icons/file_type_red.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_red2 diff --git a/www/res/icon-file/icons/file_type_registry.svg b/www/res/icon-file/icons/file_type_registry.svg deleted file mode 100644 index 22c930908..000000000 --- a/www/res/icon-file/icons/file_type_registry.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_registry \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_rehype.svg b/www/res/icon-file/icons/file_type_rehype.svg deleted file mode 100644 index 1f52dbaab..000000000 --- a/www/res/icon-file/icons/file_type_rehype.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_rehype \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_remark.svg b/www/res/icon-file/icons/file_type_remark.svg deleted file mode 100644 index a50ee67aa..000000000 --- a/www/res/icon-file/icons/file_type_remark.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_remark \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_renovate.svg b/www/res/icon-file/icons/file_type_renovate.svg deleted file mode 100644 index b9d96717c..000000000 --- a/www/res/icon-file/icons/file_type_renovate.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_renovate \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_rest.svg b/www/res/icon-file/icons/file_type_rest.svg deleted file mode 100644 index 11cfb88df..000000000 --- a/www/res/icon-file/icons/file_type_rest.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_rest \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_retext.svg b/www/res/icon-file/icons/file_type_retext.svg deleted file mode 100644 index 8b4b75c23..000000000 --- a/www/res/icon-file/icons/file_type_retext.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_retext \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_riot.svg b/www/res/icon-file/icons/file_type_riot.svg deleted file mode 100644 index 9129c8189..000000000 --- a/www/res/icon-file/icons/file_type_riot.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_riot \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_robotframework.svg b/www/res/icon-file/icons/file_type_robotframework.svg deleted file mode 100644 index 791237f6d..000000000 --- a/www/res/icon-file/icons/file_type_robotframework.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_robotframework \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_robots.svg b/www/res/icon-file/icons/file_type_robots.svg deleted file mode 100644 index fa9d462c9..000000000 --- a/www/res/icon-file/icons/file_type_robots.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_robots \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_rollup.svg b/www/res/icon-file/icons/file_type_rollup.svg deleted file mode 100644 index 7a358fb0a..000000000 --- a/www/res/icon-file/icons/file_type_rollup.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_rollup \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_rproj.svg b/www/res/icon-file/icons/file_type_rproj.svg deleted file mode 100644 index 2e4ee6352..000000000 --- a/www/res/icon-file/icons/file_type_rproj.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_rproj \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_rspec.svg b/www/res/icon-file/icons/file_type_rspec.svg deleted file mode 100644 index b387ad5bc..000000000 --- a/www/res/icon-file/icons/file_type_rspec.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_rspec \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_rubocop.svg b/www/res/icon-file/icons/file_type_rubocop.svg deleted file mode 100644 index e33b7fdb6..000000000 --- a/www/res/icon-file/icons/file_type_rubocop.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_rubocop \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ruby.svg b/www/res/icon-file/icons/file_type_ruby.svg deleted file mode 100644 index 9443db1f7..000000000 --- a/www/res/icon-file/icons/file_type_ruby.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ruby \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_rust.svg b/www/res/icon-file/icons/file_type_rust.svg deleted file mode 100644 index fa5960130..000000000 --- a/www/res/icon-file/icons/file_type_rust.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_rust \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_saltstack.svg b/www/res/icon-file/icons/file_type_saltstack.svg deleted file mode 100644 index 12d6eb941..000000000 --- a/www/res/icon-file/icons/file_type_saltstack.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_saltstack \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_san.svg b/www/res/icon-file/icons/file_type_san.svg deleted file mode 100644 index 639b0fa0a..000000000 --- a/www/res/icon-file/icons/file_type_san.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_san \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sass.svg b/www/res/icon-file/icons/file_type_sass.svg deleted file mode 100644 index e17dbb236..000000000 --- a/www/res/icon-file/icons/file_type_sass.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sass \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sbt.svg b/www/res/icon-file/icons/file_type_sbt.svg deleted file mode 100644 index cea75d14b..000000000 --- a/www/res/icon-file/icons/file_type_sbt.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sbt \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_scala.svg b/www/res/icon-file/icons/file_type_scala.svg deleted file mode 100644 index 16a164fa3..000000000 --- a/www/res/icon-file/icons/file_type_scala.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_scala \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_scilab.svg b/www/res/icon-file/icons/file_type_scilab.svg deleted file mode 100644 index 14e6d3244..000000000 --- a/www/res/icon-file/icons/file_type_scilab.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_scilab \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_script.svg b/www/res/icon-file/icons/file_type_script.svg deleted file mode 100644 index 9b7c83345..000000000 --- a/www/res/icon-file/icons/file_type_script.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_script \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_scss.svg b/www/res/icon-file/icons/file_type_scss.svg deleted file mode 100644 index 264d6149c..000000000 --- a/www/res/icon-file/icons/file_type_scss.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_scss \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sdlang.svg b/www/res/icon-file/icons/file_type_sdlang.svg deleted file mode 100644 index d0a4cf8b3..000000000 --- a/www/res/icon-file/icons/file_type_sdlang.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sdlang \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sentry.svg b/www/res/icon-file/icons/file_type_sentry.svg deleted file mode 100644 index 1fadfa15d..000000000 --- a/www/res/icon-file/icons/file_type_sentry.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sentry \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sequelize.svg b/www/res/icon-file/icons/file_type_sequelize.svg deleted file mode 100644 index b235ebf3c..000000000 --- a/www/res/icon-file/icons/file_type_sequelize.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sequelize \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_serverless.svg b/www/res/icon-file/icons/file_type_serverless.svg deleted file mode 100644 index 2e69c7ba9..000000000 --- a/www/res/icon-file/icons/file_type_serverless.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_serverless \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_shaderlab.svg b/www/res/icon-file/icons/file_type_shaderlab.svg deleted file mode 100644 index 97ef6207f..000000000 --- a/www/res/icon-file/icons/file_type_shaderlab.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_shaderlab \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_shell.svg b/www/res/icon-file/icons/file_type_shell.svg deleted file mode 100644 index 17d382130..000000000 --- a/www/res/icon-file/icons/file_type_shell.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_shell \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_silverstripe.svg b/www/res/icon-file/icons/file_type_silverstripe.svg deleted file mode 100644 index 1203c7270..000000000 --- a/www/res/icon-file/icons/file_type_silverstripe.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_silverstripe \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sketch.svg b/www/res/icon-file/icons/file_type_sketch.svg deleted file mode 100644 index b8179f848..000000000 --- a/www/res/icon-file/icons/file_type_sketch.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sketch \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_skipper.svg b/www/res/icon-file/icons/file_type_skipper.svg deleted file mode 100644 index 30c21b7bf..000000000 --- a/www/res/icon-file/icons/file_type_skipper.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_skipper \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_slang.svg b/www/res/icon-file/icons/file_type_slang.svg deleted file mode 100644 index e084bb2cf..000000000 --- a/www/res/icon-file/icons/file_type_slang.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_slang \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_slice.svg b/www/res/icon-file/icons/file_type_slice.svg deleted file mode 100644 index 999908182..000000000 --- a/www/res/icon-file/icons/file_type_slice.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_slice \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_slim.svg b/www/res/icon-file/icons/file_type_slim.svg deleted file mode 100644 index 250d4d0c2..000000000 --- a/www/res/icon-file/icons/file_type_slim.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_slim \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sln.svg b/www/res/icon-file/icons/file_type_sln.svg deleted file mode 100644 index 8bda837dd..000000000 --- a/www/res/icon-file/icons/file_type_sln.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sln \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_smali.svg b/www/res/icon-file/icons/file_type_smali.svg deleted file mode 100644 index bbf1796e7..000000000 --- a/www/res/icon-file/icons/file_type_smali.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - image/svg+xml - - - - - - - .SMALI - diff --git a/www/res/icon-file/icons/file_type_smarty.svg b/www/res/icon-file/icons/file_type_smarty.svg deleted file mode 100644 index 99f7dd3ea..000000000 --- a/www/res/icon-file/icons/file_type_smarty.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_smarty \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_snapcraft.svg b/www/res/icon-file/icons/file_type_snapcraft.svg deleted file mode 100644 index ad2e9f0fa..000000000 --- a/www/res/icon-file/icons/file_type_snapcraft.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_snapcraft \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_snort.svg b/www/res/icon-file/icons/file_type_snort.svg deleted file mode 100644 index 299c6a217..000000000 --- a/www/res/icon-file/icons/file_type_snort.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_snort \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_snyk.svg b/www/res/icon-file/icons/file_type_snyk.svg deleted file mode 100644 index 25cfab56c..000000000 --- a/www/res/icon-file/icons/file_type_snyk.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_snyk \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_solidarity.svg b/www/res/icon-file/icons/file_type_solidarity.svg deleted file mode 100644 index ce72a5310..000000000 --- a/www/res/icon-file/icons/file_type_solidarity.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_solidarity \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_solidity.svg b/www/res/icon-file/icons/file_type_solidity.svg deleted file mode 100644 index 7d58d8414..000000000 --- a/www/res/icon-file/icons/file_type_solidity.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_solidity \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_source.svg b/www/res/icon-file/icons/file_type_source.svg deleted file mode 100644 index e2ce4156c..000000000 --- a/www/res/icon-file/icons/file_type_source.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_source \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sqf.svg b/www/res/icon-file/icons/file_type_sqf.svg deleted file mode 100644 index 20c4ae622..000000000 --- a/www/res/icon-file/icons/file_type_sqf.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sqf \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sql.svg b/www/res/icon-file/icons/file_type_sql.svg deleted file mode 100644 index c1ba68bc2..000000000 --- a/www/res/icon-file/icons/file_type_sql.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sql \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sqlite.svg b/www/res/icon-file/icons/file_type_sqlite.svg deleted file mode 100644 index a5b87f968..000000000 --- a/www/res/icon-file/icons/file_type_sqlite.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sqlite \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_squirrel.svg b/www/res/icon-file/icons/file_type_squirrel.svg deleted file mode 100644 index efdf0fb9e..000000000 --- a/www/res/icon-file/icons/file_type_squirrel.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_squirrel \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_sss.svg b/www/res/icon-file/icons/file_type_sss.svg deleted file mode 100644 index 6a8cb246c..000000000 --- a/www/res/icon-file/icons/file_type_sss.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_sss \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_stata.svg b/www/res/icon-file/icons/file_type_stata.svg deleted file mode 100644 index 36ffd78f5..000000000 --- a/www/res/icon-file/icons/file_type_stata.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_stata \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_stencil.svg b/www/res/icon-file/icons/file_type_stencil.svg deleted file mode 100644 index ba65f0026..000000000 --- a/www/res/icon-file/icons/file_type_stencil.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_stencil \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_storyboard.svg b/www/res/icon-file/icons/file_type_storyboard.svg deleted file mode 100644 index ba1573f4f..000000000 --- a/www/res/icon-file/icons/file_type_storyboard.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_storyboard \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_storybook.svg b/www/res/icon-file/icons/file_type_storybook.svg deleted file mode 100644 index f7ac2b922..000000000 --- a/www/res/icon-file/icons/file_type_storybook.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_storybook diff --git a/www/res/icon-file/icons/file_type_stylable.svg b/www/res/icon-file/icons/file_type_stylable.svg deleted file mode 100644 index 6548b8670..000000000 --- a/www/res/icon-file/icons/file_type_stylable.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_stylable \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_style.svg b/www/res/icon-file/icons/file_type_style.svg deleted file mode 100644 index ae413f1e6..000000000 --- a/www/res/icon-file/icons/file_type_style.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_style \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_stylelint.svg b/www/res/icon-file/icons/file_type_stylelint.svg deleted file mode 100644 index 752d8531b..000000000 --- a/www/res/icon-file/icons/file_type_stylelint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_stylelint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_stylus.svg b/www/res/icon-file/icons/file_type_stylus.svg deleted file mode 100644 index 77c1f0414..000000000 --- a/www/res/icon-file/icons/file_type_stylus.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_stylus \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_subversion.svg b/www/res/icon-file/icons/file_type_subversion.svg deleted file mode 100644 index 9a40c0007..000000000 --- a/www/res/icon-file/icons/file_type_subversion.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_subversion \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_svelte.svg b/www/res/icon-file/icons/file_type_svelte.svg deleted file mode 100644 index 5f98d6dbe..000000000 --- a/www/res/icon-file/icons/file_type_svelte.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_svelte \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_svg.svg b/www/res/icon-file/icons/file_type_svg.svg deleted file mode 100644 index b7a0c02eb..000000000 --- a/www/res/icon-file/icons/file_type_svg.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_svg \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_swagger.svg b/www/res/icon-file/icons/file_type_swagger.svg deleted file mode 100644 index c8321a2b8..000000000 --- a/www/res/icon-file/icons/file_type_swagger.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_swagger \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_swift.svg b/www/res/icon-file/icons/file_type_swift.svg deleted file mode 100644 index c232d1f78..000000000 --- a/www/res/icon-file/icons/file_type_swift.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_swift \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_swig.svg b/www/res/icon-file/icons/file_type_swig.svg deleted file mode 100644 index b98ef1f86..000000000 --- a/www/res/icon-file/icons/file_type_swig.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_swig \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_symfony.svg b/www/res/icon-file/icons/file_type_symfony.svg deleted file mode 100644 index 4851600af..000000000 --- a/www/res/icon-file/icons/file_type_symfony.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_symfony \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_systemverilog.svg b/www/res/icon-file/icons/file_type_systemverilog.svg deleted file mode 100644 index 1ce934e0c..000000000 --- a/www/res/icon-file/icons/file_type_systemverilog.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_systemverilog \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_t4tt.svg b/www/res/icon-file/icons/file_type_t4tt.svg deleted file mode 100644 index 74ea9aea2..000000000 --- a/www/res/icon-file/icons/file_type_t4tt.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_t4tt \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_tailwind.svg b/www/res/icon-file/icons/file_type_tailwind.svg deleted file mode 100644 index f4ac26b01..000000000 --- a/www/res/icon-file/icons/file_type_tailwind.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_tailwind \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_tcl.svg b/www/res/icon-file/icons/file_type_tcl.svg deleted file mode 100644 index 97a9aa63a..000000000 --- a/www/res/icon-file/icons/file_type_tcl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_tcl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_tera.svg b/www/res/icon-file/icons/file_type_tera.svg deleted file mode 100644 index 3b3d24a49..000000000 --- a/www/res/icon-file/icons/file_type_tera.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_tera \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_terraform.svg b/www/res/icon-file/icons/file_type_terraform.svg deleted file mode 100644 index 4f76c260c..000000000 --- a/www/res/icon-file/icons/file_type_terraform.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_terraform \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_test.svg b/www/res/icon-file/icons/file_type_test.svg deleted file mode 100644 index 57479953b..000000000 --- a/www/res/icon-file/icons/file_type_test.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_test \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_testjs.svg b/www/res/icon-file/icons/file_type_testjs.svg deleted file mode 100644 index c82e78fc5..000000000 --- a/www/res/icon-file/icons/file_type_testjs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_testjs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_testts.svg b/www/res/icon-file/icons/file_type_testts.svg deleted file mode 100644 index 294398b5d..000000000 --- a/www/res/icon-file/icons/file_type_testts.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_testts \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_tex.svg b/www/res/icon-file/icons/file_type_tex.svg deleted file mode 100644 index 952a2decc..000000000 --- a/www/res/icon-file/icons/file_type_tex.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_tex \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_text.svg b/www/res/icon-file/icons/file_type_text.svg deleted file mode 100644 index a5562edd6..000000000 --- a/www/res/icon-file/icons/file_type_text.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_text \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_textile.svg b/www/res/icon-file/icons/file_type_textile.svg deleted file mode 100644 index 899c3fe40..000000000 --- a/www/res/icon-file/icons/file_type_textile.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_textile \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_tfs.svg b/www/res/icon-file/icons/file_type_tfs.svg deleted file mode 100644 index fd9178de4..000000000 --- a/www/res/icon-file/icons/file_type_tfs.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_tfs \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_todo.svg b/www/res/icon-file/icons/file_type_todo.svg deleted file mode 100644 index aba040d2c..000000000 --- a/www/res/icon-file/icons/file_type_todo.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_todo \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_toml.svg b/www/res/icon-file/icons/file_type_toml.svg deleted file mode 100644 index a0a589078..000000000 --- a/www/res/icon-file/icons/file_type_toml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_toml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_tox.svg b/www/res/icon-file/icons/file_type_tox.svg deleted file mode 100644 index 1aa0dece8..000000000 --- a/www/res/icon-file/icons/file_type_tox.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_tox diff --git a/www/res/icon-file/icons/file_type_travis.svg b/www/res/icon-file/icons/file_type_travis.svg deleted file mode 100644 index 32020e347..000000000 --- a/www/res/icon-file/icons/file_type_travis.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_travis \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_tsconfig.svg b/www/res/icon-file/icons/file_type_tsconfig.svg deleted file mode 100644 index f59048e86..000000000 --- a/www/res/icon-file/icons/file_type_tsconfig.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_tsconfig \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_tslint.svg b/www/res/icon-file/icons/file_type_tslint.svg deleted file mode 100644 index 3fc0f9c16..000000000 --- a/www/res/icon-file/icons/file_type_tslint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_tslint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_tt.svg b/www/res/icon-file/icons/file_type_tt.svg deleted file mode 100644 index 876e30f64..000000000 --- a/www/res/icon-file/icons/file_type_tt.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_tt \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_ttcn.svg b/www/res/icon-file/icons/file_type_ttcn.svg deleted file mode 100644 index ec776a6b6..000000000 --- a/www/res/icon-file/icons/file_type_ttcn.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_ttcn \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_twig.svg b/www/res/icon-file/icons/file_type_twig.svg deleted file mode 100644 index 0578b20ed..000000000 --- a/www/res/icon-file/icons/file_type_twig.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_twig \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_typescript.svg b/www/res/icon-file/icons/file_type_typescript.svg deleted file mode 100644 index d02aa28fd..000000000 --- a/www/res/icon-file/icons/file_type_typescript.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_typescript \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_typescriptdef.svg b/www/res/icon-file/icons/file_type_typescriptdef.svg deleted file mode 100644 index 2d5956e62..000000000 --- a/www/res/icon-file/icons/file_type_typescriptdef.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_typescriptdef \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_unibeautify.svg b/www/res/icon-file/icons/file_type_unibeautify.svg deleted file mode 100644 index e38a95ece..000000000 --- a/www/res/icon-file/icons/file_type_unibeautify.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_unibeautify \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vagrant.svg b/www/res/icon-file/icons/file_type_vagrant.svg deleted file mode 100644 index 1f0b6d5d3..000000000 --- a/www/res/icon-file/icons/file_type_vagrant.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vagrant \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vala.svg b/www/res/icon-file/icons/file_type_vala.svg deleted file mode 100644 index fea8dd5f1..000000000 --- a/www/res/icon-file/icons/file_type_vala.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vala \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vapi.svg b/www/res/icon-file/icons/file_type_vapi.svg deleted file mode 100644 index 19b97c126..000000000 --- a/www/res/icon-file/icons/file_type_vapi.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vapi \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vash.svg b/www/res/icon-file/icons/file_type_vash.svg deleted file mode 100644 index 0cbc6a443..000000000 --- a/www/res/icon-file/icons/file_type_vash.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vash \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vb.svg b/www/res/icon-file/icons/file_type_vb.svg deleted file mode 100644 index d93e2ee44..000000000 --- a/www/res/icon-file/icons/file_type_vb.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vb \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vba.svg b/www/res/icon-file/icons/file_type_vba.svg deleted file mode 100644 index 23017384d..000000000 --- a/www/res/icon-file/icons/file_type_vba.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vba \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vbhtml.svg b/www/res/icon-file/icons/file_type_vbhtml.svg deleted file mode 100644 index 5e09a92a0..000000000 --- a/www/res/icon-file/icons/file_type_vbhtml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vbhtml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vbproj.svg b/www/res/icon-file/icons/file_type_vbproj.svg deleted file mode 100644 index 0515d32a5..000000000 --- a/www/res/icon-file/icons/file_type_vbproj.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vbproj \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vcxproj.svg b/www/res/icon-file/icons/file_type_vcxproj.svg deleted file mode 100644 index 2dbfaa89b..000000000 --- a/www/res/icon-file/icons/file_type_vcxproj.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vcxproj \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_velocity.svg b/www/res/icon-file/icons/file_type_velocity.svg deleted file mode 100644 index bbdda02dc..000000000 --- a/www/res/icon-file/icons/file_type_velocity.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_velocity \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_verilog.svg b/www/res/icon-file/icons/file_type_verilog.svg deleted file mode 100644 index 8e07024e3..000000000 --- a/www/res/icon-file/icons/file_type_verilog.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_verilog \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vhdl.svg b/www/res/icon-file/icons/file_type_vhdl.svg deleted file mode 100644 index b2fd27e23..000000000 --- a/www/res/icon-file/icons/file_type_vhdl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vhdl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_video.svg b/www/res/icon-file/icons/file_type_video.svg deleted file mode 100644 index affa0d834..000000000 --- a/www/res/icon-file/icons/file_type_video.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_video \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_view.svg b/www/res/icon-file/icons/file_type_view.svg deleted file mode 100644 index 606558e0b..000000000 --- a/www/res/icon-file/icons/file_type_view.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_view \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vim.svg b/www/res/icon-file/icons/file_type_vim.svg deleted file mode 100644 index 4b49cba78..000000000 --- a/www/res/icon-file/icons/file_type_vim.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vim \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_volt.svg b/www/res/icon-file/icons/file_type_volt.svg deleted file mode 100644 index 5fbc79c61..000000000 --- a/www/res/icon-file/icons/file_type_volt.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_volt \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vscode-insiders.svg b/www/res/icon-file/icons/file_type_vscode-insiders.svg deleted file mode 100644 index e9a881194..000000000 --- a/www/res/icon-file/icons/file_type_vscode-insiders.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vscode-insiders \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vscode.svg b/www/res/icon-file/icons/file_type_vscode.svg deleted file mode 100644 index 1eb6cdd50..000000000 --- a/www/res/icon-file/icons/file_type_vscode.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vscode \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vsix.svg b/www/res/icon-file/icons/file_type_vsix.svg deleted file mode 100644 index d5db2a95d..000000000 --- a/www/res/icon-file/icons/file_type_vsix.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vsix \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vsixmanifest.svg b/www/res/icon-file/icons/file_type_vsixmanifest.svg deleted file mode 100644 index 82644830e..000000000 --- a/www/res/icon-file/icons/file_type_vsixmanifest.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vsixmanifest \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_vue.svg b/www/res/icon-file/icons/file_type_vue.svg deleted file mode 100644 index edb41bb92..000000000 --- a/www/res/icon-file/icons/file_type_vue.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_vue \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_wallaby.svg b/www/res/icon-file/icons/file_type_wallaby.svg deleted file mode 100644 index e9d65e32e..000000000 --- a/www/res/icon-file/icons/file_type_wallaby.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_wallaby \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_wasm.svg b/www/res/icon-file/icons/file_type_wasm.svg deleted file mode 100644 index dc8214e19..000000000 --- a/www/res/icon-file/icons/file_type_wasm.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_wasm \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_watchmanconfig.svg b/www/res/icon-file/icons/file_type_watchmanconfig.svg deleted file mode 100644 index 58fdb57d5..000000000 --- a/www/res/icon-file/icons/file_type_watchmanconfig.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_watchmanconfig \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_webp.svg b/www/res/icon-file/icons/file_type_webp.svg deleted file mode 100644 index 859168e1f..000000000 --- a/www/res/icon-file/icons/file_type_webp.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_webp diff --git a/www/res/icon-file/icons/file_type_webpack.svg b/www/res/icon-file/icons/file_type_webpack.svg deleted file mode 100644 index 51f1da424..000000000 --- a/www/res/icon-file/icons/file_type_webpack.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_webpack \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_wercker.svg b/www/res/icon-file/icons/file_type_wercker.svg deleted file mode 100644 index cd2651b98..000000000 --- a/www/res/icon-file/icons/file_type_wercker.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_wercker \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_wolfram.svg b/www/res/icon-file/icons/file_type_wolfram.svg deleted file mode 100644 index 61ab0823b..000000000 --- a/www/res/icon-file/icons/file_type_wolfram.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_wolfram \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_word.svg b/www/res/icon-file/icons/file_type_word.svg deleted file mode 100644 index 739fc54c6..000000000 --- a/www/res/icon-file/icons/file_type_word.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_word \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_wpml.svg b/www/res/icon-file/icons/file_type_wpml.svg deleted file mode 100644 index 620f6214f..000000000 --- a/www/res/icon-file/icons/file_type_wpml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_wpml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_wurst.svg b/www/res/icon-file/icons/file_type_wurst.svg deleted file mode 100644 index 21e58a575..000000000 --- a/www/res/icon-file/icons/file_type_wurst.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_wurst \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_wxml.svg b/www/res/icon-file/icons/file_type_wxml.svg deleted file mode 100644 index 502a110cb..000000000 --- a/www/res/icon-file/icons/file_type_wxml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_wxml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_wxss.svg b/www/res/icon-file/icons/file_type_wxss.svg deleted file mode 100644 index e67c2d660..000000000 --- a/www/res/icon-file/icons/file_type_wxss.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_wxss \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_xcode.svg b/www/res/icon-file/icons/file_type_xcode.svg deleted file mode 100644 index eb4576581..000000000 --- a/www/res/icon-file/icons/file_type_xcode.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_xcode \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_xfl.svg b/www/res/icon-file/icons/file_type_xfl.svg deleted file mode 100644 index 91985109d..000000000 --- a/www/res/icon-file/icons/file_type_xfl.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_xib.svg b/www/res/icon-file/icons/file_type_xib.svg deleted file mode 100644 index 74df571be..000000000 --- a/www/res/icon-file/icons/file_type_xib.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_xib \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_xliff.svg b/www/res/icon-file/icons/file_type_xliff.svg deleted file mode 100644 index 45d9187fb..000000000 --- a/www/res/icon-file/icons/file_type_xliff.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_xliff \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_xml.svg b/www/res/icon-file/icons/file_type_xml.svg deleted file mode 100644 index fed3cafc5..000000000 --- a/www/res/icon-file/icons/file_type_xml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_xml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_xquery.svg b/www/res/icon-file/icons/file_type_xquery.svg deleted file mode 100644 index 9ebcf036c..000000000 --- a/www/res/icon-file/icons/file_type_xquery.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_xquery \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_xsl.svg b/www/res/icon-file/icons/file_type_xsl.svg deleted file mode 100644 index a57751691..000000000 --- a/www/res/icon-file/icons/file_type_xsl.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_xsl \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_yaml.svg b/www/res/icon-file/icons/file_type_yaml.svg deleted file mode 100644 index 601979d57..000000000 --- a/www/res/icon-file/icons/file_type_yaml.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_yaml \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_yamllint.svg b/www/res/icon-file/icons/file_type_yamllint.svg deleted file mode 100644 index 2d3886297..000000000 --- a/www/res/icon-file/icons/file_type_yamllint.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_yamllint \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_yandex.svg b/www/res/icon-file/icons/file_type_yandex.svg deleted file mode 100644 index 6559c4fa3..000000000 --- a/www/res/icon-file/icons/file_type_yandex.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_yandex \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_yang.svg b/www/res/icon-file/icons/file_type_yang.svg deleted file mode 100644 index 02c7acdb0..000000000 --- a/www/res/icon-file/icons/file_type_yang.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_yang \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_yarn.svg b/www/res/icon-file/icons/file_type_yarn.svg deleted file mode 100644 index e98e05e2e..000000000 --- a/www/res/icon-file/icons/file_type_yarn.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_yarn \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_yeoman.svg b/www/res/icon-file/icons/file_type_yeoman.svg deleted file mode 100644 index 909f0a73c..000000000 --- a/www/res/icon-file/icons/file_type_yeoman.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_yeoman \ No newline at end of file diff --git a/www/res/icon-file/icons/file_type_zip.svg b/www/res/icon-file/icons/file_type_zip.svg deleted file mode 100644 index ac10ffdf3..000000000 --- a/www/res/icon-file/icons/file_type_zip.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_zip \ No newline at end of file diff --git a/www/res/icon-file/style.css b/www/res/icon-file/style.css deleted file mode 100644 index 2daab61f9..000000000 --- a/www/res/icon-file/style.css +++ /dev/null @@ -1,1947 +0,0 @@ -.file { - background-image: url('./icons/default_file.svg'); -} - -.file.file_type_access { - background-image: url('./icons/file_type_access.svg'); -} - -.file.file_type_actionscript { - background-image: url('./icons/file_type_actionscript.svg'); -} - -.file.file_type_ada { - background-image: url('./icons/file_type_ada.svg'); -} - -.file.file_type_ai { - background-image: url('./icons/file_type_ai.svg'); -} - -.file.file_type_al { - background-image: url('./icons/file_type_al.svg'); -} - -.file.file_type_anyscript { - background-image: url('./icons/file_type_anyscript.svg'); -} - -.file.file_type_antlr { - background-image: url('./icons/file_type_antlr.svg'); -} - -.file.file_type_apache { - background-image: url('./icons/file_type_apache.svg'); -} - -.file.file_type_apex { - background-image: url('./icons/file_type_apex.svg'); -} - -.file.file_type_apib { - background-image: url('./icons/file_type_apib.svg'); -} - -.file.file_type_apl { - background-image: url('./icons/file_type_apl.svg'); -} - -.file.file_type_applescript { - background-image: url('./icons/file_type_applescript.svg'); -} - -.file.file_type_appveyor { - background-image: url('./icons/file_type_appveyor.svg'); -} - -.file.file_type_arduino { - background-image: url('./icons/file_type_arduino.svg'); -} - -.file.file_type_asciidoc { - background-image: url('./icons/file_type_asciidoc.svg'); -} - -.file.file_type_asp { - background-image: url('./icons/file_type_asp.svg'); -} - -.file.file_type_aspx { - background-image: url('./icons/file_type_aspx.svg'); -} - -.file.file_type_assembly { - background-image: url('./icons/file_type_assembly.svg'); -} - -.file.file_type_ats { - background-image: url('./icons/file_type_ats.svg'); -} - -.file.file_type_audio { - background-image: url('./icons/file_type_audio.svg'); -} - -.file.file_type_aurelia { - background-image: url('./icons/file_type_aurelia.svg'); -} - -.file.file_type_autohotkey { - background-image: url('./icons/file_type_autohotkey.svg'); -} - -.file.file_type_autoit { - background-image: url('./icons/file_type_autoit.svg'); -} - -.file.file_type_avro { - background-image: url('./icons/file_type_avro.svg'); -} - -.file.file_type_aws { - background-image: url('./icons/file_type_aws.svg'); -} - -.file.file_type_azure { - background-image: url('./icons/file_type_azure.svg'); -} - -.file.file_type_azurepipelines { - background-image: url('./icons/file_type_azurepipelines.svg'); -} - -.file.file_type_ballerina { - background-image: url('./icons/file_type_ballerina.svg'); -} - -.file.file_type_babel { - background-image: url('./icons/file_type_babel.svg'); -} - -.file.file_type_bazaar { - background-image: url('./icons/file_type_bazaar.svg'); -} - -.file.file_type_bat { - background-image: url('./icons/file_type_bat.svg'); -} - -.file.file_type_bazel { - background-image: url('./icons/file_type_bazel.svg'); -} - -.file.file_type_biml { - background-image: url('./icons/file_type_biml.svg'); -} - -.file.file_type_binary { - background-image: url('./icons/file_type_binary.svg'); -} - -.file.file_type_bitbucketpipeline { - background-image: url('./icons/file_type_bitbucketpipeline.svg'); -} - -.file.file_type_bithound { - background-image: url('./icons/file_type_bithound.svg'); -} - -.file.file_type_blade { - background-image: url('./icons/file_type_blade.svg'); -} - -.file.file_type_bolt { - background-image: url('./icons/file_type_bolt.svg'); -} - -.file.file_type_bower { - background-image: url('./icons/file_type_bower.svg'); -} - -.file.file_type_browserslist { - background-image: url('./icons/file_type_browserslist.svg'); -} - -.file.file_type_buckbuild { - background-image: url('./icons/file_type_buckbuild.svg'); -} - -.file.file_type_c { - background-image: url('./icons/file_type_c.svg'); -} - -.file.file_type_bundler { - background-image: url('./icons/file_type_bundler.svg'); -} - -.file.file_type_cabal { - background-image: url('./icons/file_type_cabal.svg'); -} - -.file.file_type_caddy { - background-image: url('./icons/file_type_caddy.svg'); -} - -.file.file_type_cake { - background-image: url('./icons/file_type_cake.svg'); -} - -.file.file_type_cakephp { - background-image: url('./icons/file_type_cakephp.svg'); -} - -.file.file_type_capacitor { - background-image: url('./icons/file_type_capacitor.svg'); -} - -.file.file_type_cargo { - background-image: url('./icons/file_type_cargo.svg'); -} - -.file.file_type_cert { - background-image: url('./icons/file_type_cert.svg'); -} - -.file.file_type_ceylon { - background-image: url('./icons/file_type_ceylon.svg'); -} - -.file.file_type_cf { - background-image: url('./icons/file_type_cf.svg'); -} - -.file.file_type_cfc { - background-image: url('./icons/file_type_cfc.svg'); -} - -.file.file_type_cfm { - background-image: url('./icons/file_type_cfm.svg'); -} - -.file.file_type_cheader { - background-image: url('./icons/file_type_cheader.svg'); -} - -.file.file_type_chef { - background-image: url('./icons/file_type_chef.svg'); -} - -.file.file_type_circleci { - background-image: url('./icons/file_type_circleci.svg'); -} - -.file.file_type_class { - background-image: url('./icons/file_type_class.svg'); -} - -.file.file_type_clojure { - background-image: url('./icons/file_type_clojure.svg'); -} - -.file.file_type_clojurescript { - background-image: url('./icons/file_type_clojurescript.svg'); -} - -.file.file_type_cloudfoundry { - background-image: url('./icons/file_type_cloudfoundry.svg'); -} - -.file.file_type_cmake { - background-image: url('./icons/file_type_cmake.svg'); -} - -.file.file_type_cobol { - background-image: url('./icons/file_type_cobol.svg'); -} - -.file.file_type_codacy { - background-image: url('./icons/file_type_codacy.svg'); -} - -.file.file_type_codeclimate { - background-image: url('./icons/file_type_codeclimate.svg'); -} - -.file.file_type_codecov { - background-image: url('./icons/file_type_codecov.svg'); -} - -.file.file_type_codekit { - background-image: url('./icons/file_type_codekit.svg'); -} - -.file.file_type_coffeelint { - background-image: url('./icons/file_type_coffeelint.svg'); -} - -.file.file_type_coffeescript { - background-image: url('./icons/file_type_coffeescript.svg'); -} - -.file.file_type_compass { - background-image: url('./icons/file_type_compass.svg'); -} - -.file.file_type_conan { - background-image: url('./icons/file_type_conan.svg'); -} - -.file.file_type_config { - background-image: url('./icons/file_type_config.svg'); -} - -.file.file_type_confluence { - background-image: url('./icons/file_type_confluence.svg'); -} - -.file.file_type_composer { - background-image: url('./icons/file_type_composer.svg'); -} - -.file.file_type_coveralls { - background-image: url('./icons/file_type_coveralls.svg'); -} - -.file.file_type_cpp { - background-image: url('./icons/file_type_cpp.svg'); -} - -.file.file_type_cppheader { - background-image: url('./icons/file_type_cppheader.svg'); -} - -.file.file_type_crowdin { - background-image: url('./icons/file_type_crowdin.svg'); -} - -.file.file_type_crystal { - background-image: url('./icons/file_type_crystal.svg'); -} - -.file.file_type_csharp { - background-image: url('./icons/file_type_csharp.svg'); -} - -.file.file_type_csproj { - background-image: url('./icons/file_type_csproj.svg'); -} - -.file.file_type_css { - background-image: url('./icons/file_type_css.svg'); -} - -.file.file_type_csscomb { - background-image: url('./icons/file_type_csscomb.svg'); -} - -.file.file_type_csslint { - background-image: url('./icons/file_type_csslint.svg'); -} - -.file.file_type_cssmap { - background-image: url('./icons/file_type_cssmap.svg'); -} - -.file.file_type_cucumber { - background-image: url('./icons/file_type_cucumber.svg'); -} - -.file.file_type_cuda { - background-image: url('./icons/file_type_cuda.svg'); -} - -.file.file_type_cvs { - background-image: url('./icons/file_type_cvs.svg'); -} - -.file.file_type_cypress { - background-image: url('./icons/file_type_cypress.svg'); -} - -.file.file_type_cython { - background-image: url('./icons/file_type_cython.svg'); -} - -.file.file_type_dal { - background-image: url('./icons/file_type_dal.svg'); -} - -.file.file_type_darcs { - background-image: url('./icons/file_type_darcs.svg'); -} - -.file.file_type_dartlang { - background-image: url('./icons/file_type_dartlang.svg'); -} - -.file.file_type_db { - background-image: url('./icons/file_type_db.svg'); -} - -.file.file_type_delphi { - background-image: url('./icons/file_type_delphi.svg'); -} - -.file.file_type_dependencies { - background-image: url('./icons/file_type_dependencies.svg'); -} - -.file.file_type_diff { - background-image: url('./icons/file_type_diff.svg'); -} - -.file.file_type_django { - background-image: url('./icons/file_type_django.svg'); -} - -.file.file_type_dlang { - background-image: url('./icons/file_type_dlang.svg'); -} - -.file.file_type_docker { - background-image: url('./icons/file_type_docker.svg'); -} - -.file.file_type_dockertest { - background-image: url('./icons/file_type_dockertest.svg'); -} - -.file.file_type_docpad { - background-image: url('./icons/file_type_docpad.svg'); -} - -.file.file_type_docz { - background-image: url('./icons/file_type_docz.svg'); -} - -.file.file_type_dojo { - background-image: url('./icons/file_type_dojo.svg'); -} - -.file.file_type_dotjs { - background-image: url('./icons/file_type_dotjs.svg'); -} - -.file.file_type_doxygen { - background-image: url('./icons/file_type_doxygen.svg'); -} - -.file.file_type_drone { - background-image: url('./icons/file_type_drone.svg'); -} - -.file.file_type_drools { - background-image: url('./icons/file_type_drools.svg'); -} - -.file.file_type_dustjs { - background-image: url('./icons/file_type_dustjs.svg'); -} - -.file.file_type_dylan { - background-image: url('./icons/file_type_dylan.svg'); -} - -.file.file_type_edge { - background-image: url('./icons/file_type_edge.svg'); -} - -.file.file_type_editorconfig { - background-image: url('./icons/file_type_editorconfig.svg'); -} - -.file.file_type_eex { - background-image: url('./icons/file_type_eex.svg'); -} - -.file.file_type_ejs { - background-image: url('./icons/file_type_ejs.svg'); -} - -.file.file_type_elastic { - background-image: url('./icons/file_type_elastic.svg'); -} - -.file.file_type_elasticbeanstalk { - background-image: url('./icons/file_type_elasticbeanstalk.svg'); -} - -.file.file_type_elixir { - background-image: url('./icons/file_type_elixir.svg'); -} - -.file.file_type_elm { - background-image: url('./icons/file_type_elm.svg'); -} - -.file.file_type_emacs { - background-image: url('./icons/file_type_emacs.svg'); -} - -.file.file_type_ensime { - background-image: url('./icons/file_type_ensime.svg'); -} - -.file.file_type_ember { - background-image: url('./icons/file_type_ember.svg'); -} - -.file.file_type_eps { - background-image: url('./icons/file_type_eps.svg'); -} - -.file.file_type_erb { - background-image: url('./icons/file_type_erb.svg'); -} - -.file.file_type_erlang { - background-image: url('./icons/file_type_erlang.svg'); -} - -.file.file_type_eslint { - background-image: url('./icons/file_type_eslint.svg'); -} - -.file.file_type_excel { - background-image: url('./icons/file_type_excel.svg'); -} - -.file.file_type_falcon { - background-image: url('./icons/file_type_falcon.svg'); -} - -.file.file_type_favicon { - background-image: url('./icons/file_type_favicon.svg'); -} - -.file.file_type_fbx { - background-image: url('./icons/file_type_fbx.svg'); -} - -.file.file_type_firebase { - background-image: url('./icons/file_type_firebase.svg'); -} - -.file.file_type_firebasehosting { - background-image: url('./icons/file_type_firebasehosting.svg'); -} - -.file.file_type_firestore { - background-image: url('./icons/file_type_firestore.svg'); -} - -.file.file_type_fla { - background-image: url('./icons/file_type_fla.svg'); -} - -.file.file_type_flash { - background-image: url('./icons/file_type_flash.svg'); -} - -.file.file_type_floobits { - background-image: url('./icons/file_type_floobits.svg'); -} - -.file.file_type_flow { - background-image: url('./icons/file_type_flow.svg'); -} - -.file.file_type_flutter { - background-image: url('./icons/file_type_flutter.svg'); -} - -.file.file_type_font { - background-image: url('./icons/file_type_font.svg'); -} - -.file.file_type_fortran { - background-image: url('./icons/file_type_fortran.svg'); -} - -.file.file_type_fossa { - background-image: url('./icons/file_type_fossa.svg'); -} - -.file.file_type_fossil { - background-image: url('./icons/file_type_fossil.svg'); -} - -.file.file_type_freemarker { - background-image: url('./icons/file_type_freemarker.svg'); -} - -.file.file_type_fsharp { - background-image: url('./icons/file_type_fsharp.svg'); -} - -.file.file_type_fsproj { - background-image: url('./icons/file_type_fsproj.svg'); -} - -.file.file_type_fusebox { - background-image: url('./icons/file_type_fusebox.svg'); -} - -.file.file_type_galen { - background-image: url('./icons/file_type_galen.svg'); -} - -.file.file_type_gamemaker { - background-image: url('./icons/file_type_gamemaker.svg'); -} - -.file.file_type_gatsby { - background-image: url('./icons/file_type_gatsby.svg'); -} - -.file.file_type_gcode { - background-image: url('./icons/file_type_gcode.svg'); -} - -.file.file_type_git { - background-image: url('./icons/file_type_git.svg'); -} - -.file.file_type_gitlab { - background-image: url('./icons/file_type_gitlab.svg'); -} - -.file.file_type_glsl { - background-image: url('./icons/file_type_glsl.svg'); -} - -.file.file_type_glide { - background-image: url('./icons/file_type_glide.svg'); -} - -.file.file_type_go { - background-image: url('./icons/file_type_go.svg'); -} - -.file.file_type_godot { - background-image: url('./icons/file_type_godot.svg'); -} - -.file.file_type_gradle { - background-image: url('./icons/file_type_gradle.svg'); -} - -.file.file_type_graphql { - background-image: url('./icons/file_type_graphql.svg'); -} - -.file.file_type_graphviz { - background-image: url('./icons/file_type_graphviz.svg'); -} - -.file.file_type_greenkeeper { - background-image: url('./icons/file_type_greenkeeper.svg'); -} - -.file.file_type_gridsome { - background-image: url('./icons/file_type_gridsome.svg'); -} - -.file.file_type_groovy { - background-image: url('./icons/file_type_groovy.svg'); -} - -.file.file_type_grunt { - background-image: url('./icons/file_type_grunt.svg'); -} - -.file.file_type_gulp { - background-image: url('./icons/file_type_gulp.svg'); -} - -.file.file_type_haml { - background-image: url('./icons/file_type_haml.svg'); -} - -.file.file_type_handlebars { - background-image: url('./icons/file_type_handlebars.svg'); -} - -.file.file_type_harbour { - background-image: url('./icons/file_type_harbour.svg'); -} - -.file.file_type_haskell { - background-image: url('./icons/file_type_haskell.svg'); -} - -.file.file_type_haxe { - background-image: url('./icons/file_type_haxe.svg'); -} - -.file.file_type_haxecheckstyle { - background-image: url('./icons/file_type_haxecheckstyle.svg'); -} - -.file.file_type_helix { - background-image: url('./icons/file_type_helix.svg'); -} - -.file.file_type_helm { - background-image: url('./icons/file_type_helm.svg'); -} - -.file.file_type_haxedevelop { - background-image: url('./icons/file_type_haxedevelop.svg'); -} - -.file.file_type_hjson { - background-image: url('./icons/file_type_hjson.svg'); -} - -.file.file_type_hlsl { - background-image: url('./icons/file_type_hlsl.svg'); -} - -.file.file_type_homeassistant { - background-image: url('./icons/file_type_homeassistant.svg'); -} - -.file.file_type_host { - background-image: url('./icons/file_type_host.svg'); -} - -.file.file_type_html { - background-image: url('./icons/file_type_html.svg'); -} - -.file.file_type_htmlhint { - background-image: url('./icons/file_type_htmlhint.svg'); -} - -.file.file_type_http { - background-image: url('./icons/file_type_http.svg'); -} - -.file.file_type_husky { - background-image: url('./icons/file_type_husky.svg'); -} - -.file.file_type_icl { - background-image: url('./icons/file_type_icl.svg'); -} - -.file.file_type_idris { - background-image: url('./icons/file_type_idris.svg'); -} - -.file.file_type_idrisbin { - background-image: url('./icons/file_type_idrisbin.svg'); -} - -.file.file_type_idrispkg { - background-image: url('./icons/file_type_idrispkg.svg'); -} - -.file.file_type_image { - background-image: url('./icons/file_type_image.svg'); -} - -.file.file_type_imba { - background-image: url('./icons/file_type_imba.svg'); -} - -.file.file_type_infopath { - background-image: url('./icons/file_type_infopath.svg'); -} - -.file.file_type_informix { - background-image: url('./icons/file_type_informix.svg'); -} - -.file.file_type_ini { - background-image: url('./icons/file_type_ini.svg'); -} - -.file.file_type_ink { - background-image: url('./icons/file_type_ink.svg'); -} - -.file.file_type_innosetup { - background-image: url('./icons/file_type_innosetup.svg'); -} - -.file.file_type_io { - background-image: url('./icons/file_type_io.svg'); -} - -.file.file_type_iodine { - background-image: url('./icons/file_type_iodine.svg'); -} - -.file.file_type_ionic { - background-image: url('./icons/file_type_ionic.svg'); -} - -.file.file_type_jake { - background-image: url('./icons/file_type_jake.svg'); -} - -.file.file_type_janet { - background-image: url('./icons/file_type_janet.svg'); -} - -.file.file_type_jar { - background-image: url('./icons/file_type_jar.svg'); -} - -.file.file_type_java { - background-image: url('./icons/file_type_java.svg'); -} - -.file.file_type_jbuilder { - background-image: url('./icons/file_type_jbuilder.svg'); -} - -.file.file_type_jekyll { - background-image: url('./icons/file_type_jekyll.svg'); -} - -.file.file_type_jenkins { - background-image: url('./icons/file_type_jenkins.svg'); -} - -.file.file_type_jest { - background-image: url('./icons/file_type_jest.svg'); -} - -.file.file_type_jinja { - background-image: url('./icons/file_type_jinja.svg'); -} - -.file.file_type_jpm { - background-image: url('./icons/file_type_jpm.svg'); -} - -.file.file_type_javascript { - background-image: url('./icons/file_type_js.svg'); -} - -.file.file_type_jsbeautify { - background-image: url('./icons/file_type_jsbeautify.svg'); -} - -.file.file_type_jsconfig { - background-image: url('./icons/file_type_jsconfig.svg'); -} - -.file.file_type_jshint { - background-image: url('./icons/file_type_jshint.svg'); -} - -.file.file_type_jsmap { - background-image: url('./icons/file_type_jsmap.svg'); -} - -.file.file_type_json { - background-image: url('./icons/file_type_json.svg'); -} - -.file.file_type_jsonld { - background-image: url('./icons/file_type_jsonld.svg'); -} - -.file.file_type_jsonnet { - background-image: url('./icons/file_type_jsonnet.svg'); -} - -.file.file_type_jsp { - background-image: url('./icons/file_type_jsp.svg'); -} - -.file.file_type_jss { - background-image: url('./icons/file_type_jss.svg'); -} - -.file.file_type_julia { - background-image: url('./icons/file_type_julia.svg'); -} - -.file.file_type_jupyter { - background-image: url('./icons/file_type_jupyter.svg'); -} - -.file.file_type_karma { - background-image: url('./icons/file_type_karma.svg'); -} - -.file.file_type_kitchenci { - background-image: url('./icons/file_type_kitchenci.svg'); -} - -.file.file_type_key { - background-image: url('./icons/file_type_key.svg'); -} - -.file.file_type_kite { - background-image: url('./icons/file_type_kite.svg'); -} - -.file.file_type_kivy { - background-image: url('./icons/file_type_kivy.svg'); -} - -.file.file_type_kos { - background-image: url('./icons/file_type_kos.svg'); -} - -.file.file_type_kotlin { - background-image: url('./icons/file_type_kotlin.svg'); -} - -.file.file_type_layout { - background-image: url('./icons/file_type_layout.svg'); -} - -.file.file_type_less { - background-image: url('./icons/file_type_less.svg'); -} - -.file.file_type_license { - background-image: url('./icons/file_type_license.svg'); -} - -.file.file_type_lime { - background-image: url('./icons/file_type_lime.svg'); -} - -.file.file_type_lintstagedrc { - background-image: url('./icons/file_type_lintstagedrc.svg'); -} - -.file.file_type_liquid { - background-image: url('./icons/file_type_liquid.svg'); -} - -.file.file_type_lisp { - background-image: url('./icons/file_type_lisp.svg'); -} - -.file.file_type_lerna { - background-image: url('./icons/file_type_lerna.svg'); -} - -.file.file_type_livescript { - background-image: url('./icons/file_type_livescript.svg'); -} - -.file.file_type_locale { - background-image: url('./icons/file_type_locale.svg'); -} - -.file.file_type_log { - background-image: url('./icons/file_type_log.svg'); -} - -.file.file_type_lolcode { - background-image: url('./icons/file_type_lolcode.svg'); -} - -.file.file_type_lsl { - background-image: url('./icons/file_type_lsl.svg'); -} - -.file.file_type_lua { - background-image: url('./icons/file_type_lua.svg'); -} - -.file.file_type_lync { - background-image: url('./icons/file_type_lync.svg'); -} - -.file.file_type_makefile { - background-image: url('./icons/file_type_makefile.svg'); -} - -.file.file_type_manifest { - background-image: url('./icons/file_type_manifest.svg'); -} - -.file.file_type_map { - background-image: url('./icons/file_type_map.svg'); -} - -.file.file_type_mariadb { - background-image: url('./icons/file_type_mariadb.svg'); -} - -.file.file_type_markdown { - background-image: url('./icons/file_type_markdown.svg'); -} - -.file.file_type_markdownlint { - background-image: url('./icons/file_type_markdownlint.svg'); -} - -.file.file_type_marko { - background-image: url('./icons/file_type_marko.svg'); -} - -.file.file_type_markojs { - background-image: url('./icons/file_type_markojs.svg'); -} - -.file.file_type_matlab { - background-image: url('./icons/file_type_matlab.png'); -} - -.file.file_type_maven { - background-image: url('./icons/file_type_maven.svg'); -} - -.file.file_type_maxscript { - background-image: url('./icons/file_type_maxscript.svg'); -} - -.file.file_type_maya { - background-image: url('./icons/file_type_maya.svg'); -} - -.file.file_type_mdx { - background-image: url('./icons/file_type_mdx.svg'); -} - -.file.file_type_mediawiki { - background-image: url('./icons/file_type_mediawiki.svg'); -} - -.file.file_type_mercurial { - background-image: url('./icons/file_type_mercurial.svg'); -} - -.file.file_type_meson { - background-image: url('./icons/file_type_meson.svg'); -} - -.file.file_type_meteor { - background-image: url('./icons/file_type_meteor.svg'); -} - -.file.file_type_mjml { - background-image: url('./icons/file_type_mjml.svg'); -} - -.file.file_type_mlang { - background-image: url('./icons/file_type_mlang.svg'); -} - -.file.file_type_mocha { - background-image: url('./icons/file_type_mocha.svg'); -} - -.file.file_type_mojolicious { - background-image: url('./icons/file_type_mojolicious.svg'); -} - -.file.file_type_moleculer { - background-image: url('./icons/file_type_moleculer.svg'); -} - -.file.file_type_mongo { - background-image: url('./icons/file_type_mongo.svg'); -} - -.file.file_type_monotone { - background-image: url('./icons/file_type_monotone.svg'); -} - -.file.file_type_mson { - background-image: url('./icons/file_type_mson.svg'); -} - -.file.file_type_mustache { - background-image: url('./icons/file_type_mustache.svg'); -} - -.file.file_type_mysql { - background-image: url('./icons/file_type_mysql.svg'); -} - -.file.file_type_nearly { - background-image: url('./icons/file_type_nearly.svg'); -} - -.file.file_type_nestjs { - background-image: url('./icons/file_type_nestjs.svg'); -} - -.file.file_type_netlify { - background-image: url('./icons/file_type_netlify.svg'); -} - -.file.file_type_nginx { - background-image: url('./icons/file_type_nginx.svg'); -} - -.file.file_type_nim { - background-image: url('./icons/file_type_nim.svg'); -} - -.file.file_type_ninja { - background-image: url('./icons/file_type_ninja.svg'); -} - -.file.file_type_njsproj { - background-image: url('./icons/file_type_njsproj.svg'); -} - -.file.file_type_node { - background-image: url('./icons/file_type_node.svg'); -} - -.file.file_type_nodemon { - background-image: url('./icons/file_type_nodemon.svg'); -} - -.file.file_type_npm { - background-image: url('./icons/file_type_npm.svg'); -} - -.file.file_type_nsi { - background-image: url('./icons/file_type_nsi.svg'); -} - -.file.file_type_nsri-integrity { - background-image: url('./icons/file_type_nsri-integrity.svg'); -} - -.file.file_type_nsri { - background-image: url('./icons/file_type_nsri.svg'); -} - -.file.file_type_nuget { - background-image: url('./icons/file_type_nuget.svg'); -} - -.file.file_type_nunjucks { - background-image: url('./icons/file_type_nunjucks.svg'); -} - -.file.file_type_nuxt { - background-image: url('./icons/file_type_nuxt.svg'); -} - -.file.file_type_nyc { - background-image: url('./icons/file_type_nyc.svg'); -} - -.file.file_type_objectivec { - background-image: url('./icons/file_type_objectivec.svg'); -} - -.file.file_type_objectivecpp { - background-image: url('./icons/file_type_objectivecpp.svg'); -} - -.file.file_type_ocaml { - background-image: url('./icons/file_type_ocaml.svg'); -} - -.file.file_type_onenote { - background-image: url('./icons/file_type_onenote.svg'); -} - -.file.file_type_openHAB { - background-image: url('./icons/file_type_openHAB.svg'); -} - -.file.file_type_opencl { - background-image: url('./icons/file_type_opencl.svg'); -} - -.file.file_type_org { - background-image: url('./icons/file_type_org.svg'); -} - -.file.file_type_outlook { - background-image: url('./icons/file_type_outlook.svg'); -} - -.file.file_type_ovpn { - background-image: url('./icons/file_type_ovpn.svg'); -} - -.file.file_type_package { - background-image: url('./icons/file_type_package.svg'); -} - -.file.file_type_paket { - background-image: url('./icons/file_type_paket.svg'); -} - -.file.file_type_patch { - background-image: url('./icons/file_type_patch.svg'); -} - -.file.file_type_pcl { - background-image: url('./icons/file_type_pcl.svg'); -} - -.file.file_type_pddl { - background-image: url('./icons/file_type_pddl.svg'); -} - -.file.file_type_perl { - background-image: url('./icons/file_type_perl.svg'); -} - -.file.file_type_pdf { - background-image: url('./icons/file_type_pdf.svg'); -} - -.file.file_type_pgsql { - background-image: url('./icons/file_type_pgsql.svg'); -} - -.file.file_type_photoshop { - background-image: url('./icons/file_type_photoshop.svg'); -} - -.file.file_type_php { - background-image: url('./icons/file_type_php.svg'); -} - -.file.file_type_phpcsfixer { - background-image: url('./icons/file_type_phpcsfixer.svg'); -} - -.file.file_type_phpunit { - background-image: url('./icons/file_type_phpunit.svg'); -} - -.file.file_type_phraseapp { - background-image: url('./icons/file_type_phraseapp.svg'); -} - -.file.file_type_pip { - background-image: url('./icons/file_type_pip.svg'); -} - -.file.file_type_plantuml { - background-image: url('./icons/file_type_plantuml.svg'); -} - -.file.file_type_platformio { - background-image: url('./icons/file_type_platformio.svg'); -} - -.file.file_type_plsql { - background-image: url('./icons/file_type_plsql.svg'); -} - -.file.file_type_polymer { - background-image: url('./icons/file_type_polymer.svg'); -} - -.file.file_type_poedit { - background-image: url('./icons/file_type_poedit.svg'); -} - -.file.file_type_pony { - background-image: url('./icons/file_type_pony.svg'); -} - -.file.file_type_postcss { - background-image: url('./icons/file_type_postcss.svg'); -} - -.file.file_type_postcssconfig { - background-image: url('./icons/file_type_postcssconfig.svg'); -} - -.file.file_type_powerpoint { - background-image: url('./icons/file_type_powerpoint.svg'); -} - -.file.file_type_powershell { - background-image: url('./icons/file_type_powershell.svg'); -} - -.file.file_type_precommit { - background-image: url('./icons/file_type_precommit.svg'); -} - -.file.file_type_prisma { - background-image: url('./icons/file_type_prisma.svg'); -} - -.file.file_type_prettier { - background-image: url('./icons/file_type_prettier.svg'); -} - -.file.file_type_processinglang { - background-image: url('./icons/file_type_processinglang.svg'); -} - -.file.file_type_procfile { - background-image: url('./icons/file_type_procfile.svg'); -} - -.file.file_type_progress { - background-image: url('./icons/file_type_progress.svg'); -} - -.file.file_type_prolog { - background-image: url('./icons/file_type_prolog.svg'); -} - -.file.file_type_prometheus { - background-image: url('./icons/file_type_prometheus.svg'); -} - -.file.file_type_protobuf { - background-image: url('./icons/file_type_protobuf.svg'); -} - -.file.file_type_protractor { - background-image: url('./icons/file_type_protractor.svg'); -} - -.file.file_type_publisher { - background-image: url('./icons/file_type_publisher.svg'); -} - -.file.file_type_pug { - background-image: url('./icons/file_type_pug.svg'); -} - -.file.file_type_puppet { - background-image: url('./icons/file_type_puppet.svg'); -} - -.file.file_type_purescript { - background-image: url('./icons/file_type_purescript.svg'); -} - -.file.file_type_pyret { - background-image: url('./icons/file_type_pyret.svg'); -} - -.file.file_type_python { - background-image: url('./icons/file_type_python.svg'); -} - -.file.file_type_pyup { - background-image: url('./icons/file_type_pyup.svg'); -} - -.file.file_type_q { - background-image: url('./icons/file_type_q.svg'); -} - -.file.file_type_qbs { - background-image: url('./icons/file_type_qbs.svg'); -} - -.file.file_type_qlikview { - background-image: url('./icons/file_type_qlikview.svg'); -} - -.file.file_type_qml { - background-image: url('./icons/file_type_qml.svg'); -} - -.file.file_type_qmldir { - background-image: url('./icons/file_type_qmldir.svg'); -} - -.file.file_type_qsharp { - background-image: url('./icons/file_type_qsharp.svg'); -} - -.file.file_type_quasar { - background-image: url('./icons/file_type_quasar.svg'); -} - -.file.file_type_r { - background-image: url('./icons/file_type_r.svg'); -} - -.file.file_type_racket { - background-image: url('./icons/file_type_racket.svg'); -} - -.file.file_type_rails { - background-image: url('./icons/file_type_rails.svg'); -} - -.file.file_type_rake { - background-image: url('./icons/file_type_rake.svg'); -} - -.file.file_type_raml { - background-image: url('./icons/file_type_raml.svg'); -} - -.file.file_type_razor { - background-image: url('./icons/file_type_razor.svg'); -} - -.file.file_type_reactjs { - background-image: url('./icons/file_type_reactjs.svg'); -} - -.file.file_type_reacttemplate { - background-image: url('./icons/file_type_reacttemplate.svg'); -} - -.file.file_type_reactts { - background-image: url('./icons/file_type_reactts.svg'); -} - -.file.file_type_reason { - background-image: url('./icons/file_type_reason.svg'); -} - -.file.file_type_red { - background-image: url('./icons/file_type_red.svg'); -} - -.file.file_type_registry { - background-image: url('./icons/file_type_registry.svg'); -} - -.file.file_type_rehype { - background-image: url('./icons/file_type_rehype.svg'); -} - -.file.file_type_remark { - background-image: url('./icons/file_type_remark.svg'); -} - -.file.file_type_renovate { - background-image: url('./icons/file_type_renovate.svg'); -} - -.file.file_type_rest { - background-image: url('./icons/file_type_rest.svg'); -} - -.file.file_type_retext { - background-image: url('./icons/file_type_retext.svg'); -} - -.file.file_type_riot { - background-image: url('./icons/file_type_riot.svg'); -} - -.file.file_type_robotframework { - background-image: url('./icons/file_type_robotframework.svg'); -} - -.file.file_type_robots { - background-image: url('./icons/file_type_robots.svg'); -} - -.file.file_type_rollup { - background-image: url('./icons/file_type_rollup.svg'); -} - -.file.file_type_rproj { - background-image: url('./icons/file_type_rproj.svg'); -} - -.file.file_type_rspec { - background-image: url('./icons/file_type_rspec.svg'); -} - -.file.file_type_rubocop { - background-image: url('./icons/file_type_rubocop.svg'); -} - -.file.file_type_ruby { - background-image: url('./icons/file_type_ruby.svg'); -} - -.file.file_type_rust { - background-image: url('./icons/file_type_rust.svg'); -} - -.file.file_type_saltstack { - background-image: url('./icons/file_type_saltstack.svg'); -} - -.file.file_type_san { - background-image: url('./icons/file_type_san.svg'); -} - -.file.file_type_sass { - background-image: url('./icons/file_type_sass.svg'); -} - -.file.file_type_sbt { - background-image: url('./icons/file_type_sbt.svg'); -} - -.file.file_type_scala { - background-image: url('./icons/file_type_scala.svg'); -} - -.file.file_type_scilab { - background-image: url('./icons/file_type_scilab.svg'); -} - -.file.file_type_script { - background-image: url('./icons/file_type_script.svg'); -} - -.file.file_type_scss { - background-image: url('./icons/file_type_scss.svg'); -} - -.file.file_type_sdlang { - background-image: url('./icons/file_type_sdlang.svg'); -} - -.file.file_type_sentry { - background-image: url('./icons/file_type_sentry.svg'); -} - -.file.file_type_sequelize { - background-image: url('./icons/file_type_sequelize.svg'); -} - -.file.file_type_serverless { - background-image: url('./icons/file_type_serverless.svg'); -} - -.file.file_type_shaderlab { - background-image: url('./icons/file_type_shaderlab.svg'); -} - -.file.file_type_shell { - background-image: url('./icons/file_type_shell.svg'); -} - -.file.file_type_silverstripe { - background-image: url('./icons/file_type_silverstripe.svg'); -} - -.file.file_type_sketch { - background-image: url('./icons/file_type_sketch.svg'); -} - -.file.file_type_skipper { - background-image: url('./icons/file_type_skipper.svg'); -} - -.file.file_type_slang { - background-image: url('./icons/file_type_slang.svg'); -} - -.file.file_type_slice { - background-image: url('./icons/file_type_slice.svg'); -} - -.file.file_type_sln { - background-image: url('./icons/file_type_sln.svg'); -} - -.file.file_type_smali { - background-image: url('./icons/file_type_smali.svg'); -} - -.file.file_type_smarty { - background-image: url('./icons/file_type_smarty.svg'); -} - -.file.file_type_slim { - background-image: url('./icons/file_type_slim.svg'); -} - -.file.file_type_snapcraft { - background-image: url('./icons/file_type_snapcraft.svg'); -} - -.file.file_type_snort { - background-image: url('./icons/file_type_snort.svg'); -} - -.file.file_type_snyk { - background-image: url('./icons/file_type_snyk.svg'); -} - -.file.file_type_solidarity { - background-image: url('./icons/file_type_solidarity.svg'); -} - -.file.file_type_solidity { - background-image: url('./icons/file_type_solidity.svg'); -} - -.file.file_type_source { - background-image: url('./icons/file_type_source.svg'); -} - -.file.file_type_sqf { - background-image: url('./icons/file_type_sqf.svg'); -} - -.file.file_type_sql { - background-image: url('./icons/file_type_sql.svg'); -} - -.file.file_type_sqlite { - background-image: url('./icons/file_type_sqlite.svg'); -} - -.file.file_type_squirrel { - background-image: url('./icons/file_type_squirrel.svg'); -} - -.file.file_type_stata { - background-image: url('./icons/file_type_stata.svg'); -} - -.file.file_type_stencil { - background-image: url('./icons/file_type_stencil.svg'); -} - -.file.file_type_storyboard { - background-image: url('./icons/file_type_storyboard.svg'); -} - -.file.file_type_sss { - background-image: url('./icons/file_type_sss.svg'); -} - -.file.file_type_storybook { - background-image: url('./icons/file_type_storybook.svg'); -} - -.file.file_type_stylable { - background-image: url('./icons/file_type_stylable.svg'); -} - -.file.file_type_style { - background-image: url('./icons/file_type_style.svg'); -} - -.file.file_type_stylelint { - background-image: url('./icons/file_type_stylelint.svg'); -} - -.file.file_type_stylus { - background-image: url('./icons/file_type_stylus.svg'); -} - -.file.file_type_subversion { - background-image: url('./icons/file_type_subversion.svg'); -} - -.file.file_type_svelte { - background-image: url('./icons/file_type_svelte.svg'); -} - -.file.file_type_svg { - background-image: url('./icons/file_type_svg.svg'); -} - -.file.file_type_swagger { - background-image: url('./icons/file_type_swagger.svg'); -} - -.file.file_type_swift { - background-image: url('./icons/file_type_swift.svg'); -} - -.file.file_type_swig { - background-image: url('./icons/file_type_swig.svg'); -} - -.file.file_type_symfony { - background-image: url('./icons/file_type_symfony.svg'); -} - -.file.file_type_systemverilog { - background-image: url('./icons/file_type_systemverilog.svg'); -} - -.file.file_type_t4tt { - background-image: url('./icons/file_type_t4tt.svg'); -} - -.file.file_type_tailwind { - background-image: url('./icons/file_type_tailwind.svg'); -} - -.file.file_type_tcl { - background-image: url('./icons/file_type_tcl.svg'); -} - -.file.file_type_tera { - background-image: url('./icons/file_type_tera.svg'); -} - -.file.file_type_terraform { - background-image: url('./icons/file_type_terraform.svg'); -} - -.file.file_type_test { - background-image: url('./icons/file_type_test.svg'); -} - -.file.file_type_testjs { - background-image: url('./icons/file_type_testjs.svg'); -} - -.file.file_type_testts { - background-image: url('./icons/file_type_testts.svg'); -} - -.file.file_type_tex { - background-image: url('./icons/file_type_tex.svg'); -} - -.file.file_type_text { - background-image: url('./icons/file_type_text.svg'); -} - -.file.file_type_textile { - background-image: url('./icons/file_type_textile.svg'); -} - -.file.file_type_tfs { - background-image: url('./icons/file_type_tfs.svg'); -} - -.file.file_type_todo { - background-image: url('./icons/file_type_todo.svg'); -} - -.file.file_type_toml { - background-image: url('./icons/file_type_toml.svg'); -} - -.file.file_type_tox { - background-image: url('./icons/file_type_tox.svg'); -} - -.file.file_type_tsconfig { - background-image: url('./icons/file_type_tsconfig.svg'); -} - -.file.file_type_travis { - background-image: url('./icons/file_type_travis.svg'); -} - -.file.file_type_tslint { - background-image: url('./icons/file_type_tslint.svg'); -} - -.file.file_type_tt { - background-image: url('./icons/file_type_tt.svg'); -} - -.file.file_type_ttcn { - background-image: url('./icons/file_type_ttcn.svg'); -} - -.file.file_type_twig { - background-image: url('./icons/file_type_twig.svg'); -} - -.file.file_type_typescript { - background-image: url('./icons/file_type_typescript.svg'); -} - -.file.file_type_typescriptdef { - background-image: url('./icons/file_type_typescriptdef.svg'); -} - -.file.file_type_unibeautify { - background-image: url('./icons/file_type_unibeautify.svg'); -} - -.file.file_type_vagrant { - background-image: url('./icons/file_type_vagrant.svg'); -} - -.file.file_type_vala { - background-image: url('./icons/file_type_vala.svg'); -} - -.file.file_type_vapi { - background-image: url('./icons/file_type_vapi.svg'); -} - -.file.file_type_vash { - background-image: url('./icons/file_type_vash.svg'); -} - -.file.file_type_vb { - background-image: url('./icons/file_type_vb.svg'); -} - -.file.file_type_vba { - background-image: url('./icons/file_type_vba.svg'); -} - -.file.file_type_vbhtml { - background-image: url('./icons/file_type_vbhtml.svg'); -} - -.file.file_type_vbproj { - background-image: url('./icons/file_type_vbproj.svg'); -} - -.file.file_type_vcxproj { - background-image: url('./icons/file_type_vcxproj.svg'); -} - -.file.file_type_velocity { - background-image: url('./icons/file_type_velocity.svg'); -} - -.file.file_type_verilog { - background-image: url('./icons/file_type_verilog.svg'); -} - -.file.file_type_vhdl { - background-image: url('./icons/file_type_vhdl.svg'); -} - -.file.file_type_video { - background-image: url('./icons/file_type_video.svg'); -} - -.file.file_type_view { - background-image: url('./icons/file_type_view.svg'); -} - -.file.file_type_vim { - background-image: url('./icons/file_type_vim.svg'); -} - -.file.file_type_volt { - background-image: url('./icons/file_type_volt.svg'); -} - -.file.file_type_vscode-insiders { - background-image: url('./icons/file_type_vscode-insiders.svg'); -} - -.file.file_type_vscode { - background-image: url('./icons/file_type_vscode.svg'); -} - -.file.file_type_vsix { - background-image: url('./icons/file_type_vsix.svg'); -} - -.file.file_type_vsixmanifest { - background-image: url('./icons/file_type_vsixmanifest.svg'); -} - -.file.file_type_vue { - background-image: url('./icons/file_type_vue.svg'); -} - -.file.file_type_wallaby { - background-image: url('./icons/file_type_wallaby.svg'); -} - -.file.file_type_wasm { - background-image: url('./icons/file_type_wasm.svg'); -} - -.file.file_type_watchmanconfig { - background-image: url('./icons/file_type_watchmanconfig.svg'); -} - -.file.file_type_webp { - background-image: url('./icons/file_type_webp.svg'); -} - -.file.file_type_webpack { - background-image: url('./icons/file_type_webpack.svg'); -} - -.file.file_type_wercker { - background-image: url('./icons/file_type_wercker.svg'); -} - -.file.file_type_wolfram { - background-image: url('./icons/file_type_wolfram.svg'); -} - -.file.file_type_word { - background-image: url('./icons/file_type_word.svg'); -} - -.file.file_type_wpml { - background-image: url('./icons/file_type_wpml.svg'); -} - -.file.file_type_wurst { - background-image: url('./icons/file_type_wurst.svg'); -} - -.file.file_type_wxml { - background-image: url('./icons/file_type_wxml.svg'); -} - -.file.file_type_wxss { - background-image: url('./icons/file_type_wxss.svg'); -} - -.file.file_type_xcode { - background-image: url('./icons/file_type_xcode.svg'); -} - -.file.file_type_xfl { - background-image: url('./icons/file_type_xfl.svg'); -} - -.file.file_type_xib { - background-image: url('./icons/file_type_xib.svg'); -} - -.file.file_type_xliff { - background-image: url('./icons/file_type_xliff.svg'); -} - -.file.file_type_xml { - background-image: url('./icons/file_type_xml.svg'); -} - -.file.file_type_xquery { - background-image: url('./icons/file_type_xquery.svg'); -} - -.file.file_type_xsl { - background-image: url('./icons/file_type_xsl.svg'); -} - -.file.file_type_yaml { - background-image: url('./icons/file_type_yaml.svg'); -} - -.file.file_type_yamllint { - background-image: url('./icons/file_type_yamllint.svg'); -} - -.file.file_type_yandex { - background-image: url('./icons/file_type_yandex.svg'); -} - -.file.file_type_yang { - background-image: url('./icons/file_type_yang.svg'); -} - -.file.file_type_yarn { - background-image: url('./icons/file_type_yarn.svg'); -} - -.file.file_type_yeoman { - background-image: url('./icons/file_type_yeoman.svg'); -} - -.file.file_type_zip { - background-image: url('./icons/file_type_zip.svg'); -} \ No newline at end of file diff --git a/www/res/icons/fonts/code-editor-icon.eot b/www/res/icons/fonts/code-editor-icon.eot deleted file mode 100644 index b07f87b0a..000000000 Binary files a/www/res/icons/fonts/code-editor-icon.eot and /dev/null differ diff --git a/www/res/icons/fonts/code-editor-icon.svg b/www/res/icons/fonts/code-editor-icon.svg deleted file mode 100644 index fd369e323..000000000 --- a/www/res/icons/fonts/code-editor-icon.svg +++ /dev/null @@ -1,290 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/www/res/icons/fonts/code-editor-icon.woff b/www/res/icons/fonts/code-editor-icon.woff deleted file mode 100644 index f67c0a0bf..000000000 Binary files a/www/res/icons/fonts/code-editor-icon.woff and /dev/null differ diff --git a/www/res/icons/style.css b/www/res/icons/style.css deleted file mode 100644 index 2190abb5a..000000000 --- a/www/res/icons/style.css +++ /dev/null @@ -1,1178 +0,0 @@ -@font-face { - font-family: 'code-editor-icon'; - src: url('fonts/code-editor-icon.eot?r1lwvj'); - src: url('fonts/code-editor-icon.eot?r1lwvj#iefix') format('embedded-opentype'), - url('fonts/code-editor-icon.ttf?r1lwvj') format('truetype'), - url('fonts/code-editor-icon.woff?r1lwvj') format('woff'), - url('fonts/code-editor-icon.svg?r1lwvj#code-editor-icon') format('svg'); - font-weight: normal; - font-style: normal; - font-display: block; -} - -.icon { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: 'code-editor-icon' !important; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon.acode:before { - content: "\ea0d"; - color: #3499fe; -} - -.icon.shift:before { - content: "\ea06"; -} - -.icon.replace:before { - content: "\ea07"; -} - -.icon.replace_all:before { - content: "\ea08"; -} - -.icon.moveline-up:before { - content: "\ea09"; -} - -.icon.moveline-down:before { - content: "\ea0a"; -} - -.icon.copyline-up:before { - content: "\ea0b"; -} - -.icon.copyline-down:before { - content: "\ea0c"; -} - -.icon.android:before { - content: "\e92e"; - color: #a4c639; -} - -.icon.angular:before { - content: "\e92f"; - color: #dd0031; -} - -.icon.angularuniversal:before { - content: "\e9ff"; - color: #00acc1; -} - -.icon.css3:before { - content: "\e930"; - color: #1572b6; -} - -.icon.dev-dot-to:before { - content: "\e931"; -} - -.icon.facebook:before { - content: "\e932"; - color: #4172b8; -} - -.icon.git:before { - content: "\e933"; - color: #f05032; -} - -.icon.github:before { - content: "\e934"; -} - -.icon.gmail:before { - content: "\e935"; - color: #d14836; -} - -.icon.googlechrome:before { - content: "\e936"; - color: #4285f4; -} - -.icon.googledrive:before { - content: "\e937"; - color: #4285f4; -} - -.icon.googleplay:before { - content: "\e938"; - color: #607d8b; -} - -.icon.html5:before { - content: "\e939"; - color: #e34f26; -} - -.icon.instagram:before { - content: "\e93a"; - color: #e4405f; -} - -.icon.ionic:before { - content: "\e93b"; - color: #3880ff; -} - -.icon.javascript:before { - content: "\e93c"; - color: #f7df1e; -} - -.icon.jekyll:before { - content: "\e93d"; - color: #c00; -} - -.icon.linkedin:before { - content: "\e93e"; - color: #0077b5; -} - -.icon.markdown:before { - content: "\e93f"; -} - -.icon.npm:before { - content: "\e940"; - color: #cb3837; -} - -.icon.patreon:before { - content: "\ea0f"; - color: #f96854; -} - -.icon.paypal:before { - content: "\ea10"; - color: #00457c; -} - -.icon.python:before { - content: "\e941"; - color: #3776ab; -} - -.icon.react:before { - content: "\e942"; - color: #61dafb; -} - -.icon.ruby:before { - content: "\ea11"; - color: #cc342d; -} - -.icon.stackexchange:before { - content: "\e943"; - color: #1e5397; -} - -.icon.stackoverflow:before { - content: "\e944"; - color: #fe7a16; -} - -.icon.telegram:before { - content: "\e945"; - color: #2ca5e0; -} - -.icon.twitter:before { - content: "\e946"; - color: #1da1f2; -} - -.icon.visualstudiocode:before { - content: "\e947"; - color: #007acc; -} - -.icon.vue:before { - content: "\e9fe"; - color: #4fc08d; -} - -.icon.webpack:before { - content: "\e948"; - color: #8dd6f9; -} - -.icon.yarn:before { - content: "\e949"; - color: #2c8ebb; -} - -.icon.youtube:before { - content: "\e94a"; - color: #f00; -} - -.icon.zip:before { - content: "\e9f8"; -} - -.icon.zip-outline:before { - content: "\e9f9"; -} - -.icon.document-information:before { - content: "\e900"; -} - -.icon.document-information-outline:before { - content: "\e901"; -} - -.icon.document-forbidden:before { - content: "\e902"; -} - -.icon.document-forbidden-outline:before { - content: "\e903"; -} - -.icon.document-remove:before { - content: "\e904"; -} - -.icon.document-remove-outline:before { - content: "\e905"; -} - -.icon.document-checked:before { - content: "\e906"; -} - -.icon.document-checked-outline:before { - content: "\e907"; -} - -.icon.document-cancel:before { - content: "\e908"; -} - -.icon.document-cancel-outline:before { - content: "\e909"; -} - -.icon.document-error:before { - content: "\e90a"; -} - -.icon.document-error-outline:before { - content: "\e90b"; -} - -.icon.document-locked:before { - content: "\e90c"; -} - -.icon.document-locked-outline:before { - content: "\e90d"; -} - -.icon.document-unlocked:before { - content: "\e90e"; -} - -.icon.document-unlocked-outline:before { - content: "\e90f"; -} - -.icon.document-search:before { - content: "\e910"; -} - -.icon.document-search-outline:before { - content: "\e911"; -} - -.icon.document-code:before { - content: "\e912"; -} - -.icon.document-code-outline:before { - content: "\e913"; -} - -.icon.document-text:before { - content: "\e914"; -} - -.icon.document-text-outline:before { - content: "\e915"; -} - -.icon.document-text2:before { - content: "\ea01"; -} - -.icon.document-text2-outline:before { - content: "\ea02"; -} - -.icon.document-text4:before { - content: "\ea03"; -} - -.icon.document-text5:before { - content: "\ea04"; -} - -.icon.document-add:before { - content: "\e91a"; -} - -.icon.document-add-outline:before { - content: "\e91b"; -} - -.icon.documents:before { - content: "\e91c"; -} - -.icon.documents-outline:before { - content: "\e91d"; -} - -.icon.folder-information:before { - content: "\e91e"; -} - -.icon.folder-information-outline:before { - content: "\e91f"; -} - -.icon.folder-remove:before { - content: "\e920"; -} - -.icon.folder-remove-outline:before { - content: "\e921"; -} - -.icon.folder-add:before { - content: "\e922"; -} - -.icon.folder-add-outline:before { - content: "\e923"; -} - -.icon.folder-upload:before { - content: "\e924"; -} - -.icon.folder-upload-outline:before { - content: "\e925"; -} - -.icon.folder-download:before { - content: "\e926"; -} - -.icon.folder-download-outline:before { - content: "\e927"; -} - -.icon.folder-search:before { - content: "\e928"; -} - -.icon.folder-search-outline:before { - content: "\e929"; -} - -.icon.folder:before { - content: "\e92a"; -} - -.icon.folder-outline:before { - content: "\e92b"; -} - -.icon.folder2:before { - content: "\e92c"; -} - -.icon.folder2-outline:before { - content: "\e92d"; -} - -.icon.error:before { - content: "\e94b"; -} - -.icon.error_outline:before { - content: "\e94c"; -} - -.icon.warningreport_problem:before { - content: "\e94d"; -} - -.icon.movie:before { - content: "\e918"; -} - -.icon.library_addqueueadd_to_photos:before { - content: "\e94e"; -} - -.icon.library_music:before { - content: "\e94f"; -} - -.icon.new_releases:before { - content: "\e950"; -} - -.icon.not_interesteddo_not_disturb:before { - content: "\e951"; -} - -.icon.pause:before { - content: "\e952"; -} - -.icon.pause_circle_filled:before { - content: "\e953"; -} - -.icon.pause_circle_outline:before { - content: "\e954"; -} - -.icon.play_arrow:before { - content: "\e955"; -} - -.icon.play_circle_filled:before { - content: "\e956"; -} - -.icon.play_circle_outline:before { - content: "\e957"; -} - -.icon.repeat:before { - content: "\e958"; -} - -.icon.repeat_one:before { - content: "\e959"; -} - -.icon.replay:before { - content: "\e95a"; -} - -.icon.shuffle:before { - content: "\e95b"; -} - -.icon.skip_next:before { - content: "\e95c"; -} - -.icon.skip_previous:before { - content: "\e95d"; -} - -.icon.videocam:before { - content: "\e919"; -} - -.icon.music_video:before { - content: "\e978"; -} - -.icon.emailmailmarkunreadlocal_post_office:before { - content: "\e95e"; -} - -.icon.chat_bubble:before { - content: "\e917"; -} - -.icon.vpn_key:before { - content: "\e95f"; -} - -.icon.add:before { - content: "\e960"; -} - -.icon.add_box:before { - content: "\e961"; -} - -.icon.add_circle:before { - content: "\e962"; -} - -.icon.add_circle_outlinecontrol_point:before { - content: "\e963"; -} - -.icon.block:before { - content: "\e964"; -} - -.icon.clearclose:before { - content: "\e965"; -} - -.icon.copy:before { - content: "\e966"; -} - -.icon.cut:before { - content: "\e967"; -} - -.icon.paste:before { - content: "\e968"; -} - -.icon.edit:before { - content: "\e969"; -} - -.icon.drafts:before { - content: "\e96a"; -} - -.icon.forward:before { - content: "\e96b"; -} - -.icon.linkinsert_link:before { - content: "\ea00"; -} - -.icon.redo:before { - content: "\e9f6"; -} - -.icon.remove:before { - content: "\e96c"; -} - -.icon.remove_circledo_not_disturb_on:before { - content: "\e96d"; -} - -.icon.remove_circle_outline:before { - content: "\e96e"; -} - -.icon.save:before { - content: "\e9f7"; -} - -.icon.send:before { - content: "\e96f"; -} - -.icon.text_format:before { - content: "\e916"; -} - -.icon.undo:before { - content: "\e970"; -} - -.icon.font_download:before { - content: "\ea12"; -} - -.icon.save_alt:before { - content: "\e971"; -} - -.icon.file_copy:before { - content: "\e972"; -} - -.icon.sd_storagesd_card:before { - content: "\e973"; -} - -.icon.attach_file:before { - content: "\e974"; -} - -.icon.attach_money:before { - content: "\e975"; -} - -.icon.format_bold:before { - content: "\e976"; -} - -.icon.format_color_fill:before { - content: "\e977"; -} - -.icon.format_size:before { - content: "\e979"; -} - -.icon.format_underlined:before { - content: "\e97a"; -} - -.icon.insert_chartpollassessment:before { - content: "\e97b"; -} - -.icon.insert_emoticontag_facesmood:before { - content: "\e97c"; -} - -.icon.insert_invitationevent:before { - content: "\e97d"; -} - -.icon.image:before { - content: "\e97e"; -} - -.icon.publish:before { - content: "\e97f"; -} - -.icon.vertical_align_bottom:before { - content: "\e980"; -} - -.icon.vertical_align_top:before { - content: "\e981"; -} - -.icon.monetization_on:before { - content: "\e982"; -} - -.icon.notes:before { - content: "\ea13"; -} - -.icon.cloud:before { - content: "\e983"; -} - -.icon.cloud_done:before { - content: "\e984"; -} - -.icon.cloud_download:before { - content: "\e985"; -} - -.icon.cloud_uploadbackup:before { - content: "\e986"; -} - -.icon.file_downloadget_app:before { - content: "\e987"; -} - -.icon.file_upload:before { - content: "\e988"; -} - -.icon.folder4:before { - content: "\ea05"; -} - -.icon.folder_open:before { - content: "\e9fb"; -} - -.icon.keyboard_arrow_down:before { - content: "\e98d"; -} - -.icon.keyboard_arrow_left:before { - content: "\e98e"; -} - -.icon.keyboard_arrow_right:before { - content: "\e98f"; -} - -.icon.keyboard_arrow_up:before { - content: "\e990"; -} - -.icon.keyboard_backspace:before { - content: "\e991"; -} - -.icon.keyboard_capslock:before { - content: "\e992"; -} - -.icon.keyboard_hide:before { - content: "\e993"; -} - -.icon.keyboard_tab:before { - content: "\e994"; -} - -.icon.keyboard_voice:before { - content: "\e995"; -} - -.icon.laptop_chromebook:before { - content: "\e996"; -} - -.icon.laptop_mac:before { - content: "\e997"; -} - -.icon.laptop_windows:before { - content: "\e998"; -} - -.icon.phone_android:before { - content: "\e999"; -} - -.icon.phone_iphone:before { - content: "\e99a"; -} - -.icon.audiotrack:before { - content: "\e989"; -} - -.icon.color_lenspalette:before { - content: "\e99b"; -} - -.icon.colorize:before { - content: "\e99c"; -} - -.icon.music_note:before { - content: "\e98a"; -} - -.icon.navigate_beforechevron_left:before { - content: "\e99d"; -} - -.icon.navigate_nextchevron_right:before { - content: "\e99e"; -} - -.icon.remove_red_eyevisibility:before { - content: "\e99f"; -} - -.icon.tune:before { - content: "\e9a0"; -} - -.icon.movie_filter:before { - content: "\e98b"; -} - -.icon.add_photo_alternate:before { - content: "\e9a1"; -} - -.icon.image_search:before { - content: "\e9a2"; -} - -.icon.beenhere:before { - content: "\e9a3"; -} - -.icon.local_moviestheaters:before { - content: "\e98c"; -} - -.icon.apps:before { - content: "\e9a4"; -} - -.icon.arrow_back:before { - content: "\e9a5"; -} - -.icon.arrow_drop_down:before { - content: "\e9a6"; -} - -.icon.arrow_drop_down_circle:before { - content: "\e9a7"; -} - -.icon.arrow_drop_up:before { - content: "\e9a8"; -} - -.icon.arrow_forward:before { - content: "\e9a9"; -} - -.icon.cancel:before { - content: "\e9aa"; -} - -.icon.check:before { - content: "\e9ab"; -} - -.icon.expand_less:before { - content: "\e9ac"; -} - -.icon.expand_more:before { - content: "\e9ad"; -} - -.icon.fullscreen:before { - content: "\e9ae"; -} - -.icon.fullscreen_exit:before { - content: "\e9af"; -} - -.icon.menu:before { - content: "\e9b0"; -} - -.icon.keyboard_control:before { - content: "\e9b1"; -} - -.icon.more_vert:before { - content: "\e9b2"; -} - -.icon.refresh:before { - content: "\e9b3"; -} - -.icon.unfold_less:before { - content: "\e9b4"; -} - -.icon.unfold_more:before { - content: "\e9b5"; -} - -.icon.arrow_upward:before { - content: "\e9b6"; -} - -.icon.subdirectory_arrow_left:before { - content: "\e9b7"; -} - -.icon.subdirectory_arrow_right:before { - content: "\e9b8"; -} - -.icon.arrow_downward:before { - content: "\e9b9"; -} - -.icon.first_page:before { - content: "\e9ba"; -} - -.icon.last_page:before { - content: "\e9bb"; -} - -.icon.arrow_left:before { - content: "\e9bc"; -} - -.icon.arrow_right:before { - content: "\e9bd"; -} - -.icon.arrow_back_ios:before { - content: "\e9be"; -} - -.icon.arrow_forward_ios:before { - content: "\e9bf"; -} - -.icon.folder_special:before { - content: "\e9c0"; -} - -.icon.priority_high:before { - content: "\e9c1"; -} - -.icon.notifications:before { - content: "\e9c2"; -} - -.icon.notifications_none:before { - content: "\e9c3"; -} - -.icon.person:before { - content: "\e9c4"; -} - -.icon.public:before { - content: "\e9c5"; -} - -.icon.share:before { - content: "\e9c6"; -} - -.icon.sentiment_dissatisfied:before { - content: "\e9c7"; -} - -.icon.sentiment_neutral:before { - content: "\e9c8"; -} - -.icon.sentiment_satisfied:before { - content: "\e9c9"; -} - -.icon.sentiment_very_dissatisfied:before { - content: "\e9ca"; -} - -.icon.sentiment_very_satisfied:before { - content: "\e9cb"; -} - -.icon.stargrade:before { - content: "\e9cc"; -} - -.icon.star_half:before { - content: "\e9cd"; -} - -.icon.star_outline:before { - content: "\e9ce"; -} - -.icon.account_box:before { - content: "\e9cf"; -} - -.icon.account_circle:before { - content: "\e9d0"; -} - -.icon.android-full:before { - content: "\e9d1"; -} - -.icon.autorenew:before { - content: "\e9d2"; -} - -.icon.cached:before { - content: "\e9d3"; -} - -.icon.check_circle:before { - content: "\e9d4"; -} - -.icon.code:before { - content: "\e9d5"; -} - -.icon.delete:before { - content: "\e9d6"; -} - -.icon.exit_to_app:before { - content: "\e9d7"; -} - -.icon.extension:before { - content: "\e9d8"; -} - -.icon.favorite:before { - content: "\e9d9"; -} - -.icon.favorite_outline:before { - content: "\e9da"; -} - -.icon.help:before { - content: "\e9db"; -} - -.icon.highlight_remove:before { - content: "\e9dc"; -} - -.icon.historyrestore:before { - content: "\e9dd"; -} - -.icon.home:before { - content: "\e9de"; -} - -.icon.httpslock:before { - content: "\e9df"; -} - -.icon.info:before { - content: "\e9e0"; -} - -.icon.info_outline:before { - content: "\e9e1"; -} - -.icon.input:before { - content: "\e9e2"; -} - -.icon.label:before { - content: "\e9e3"; -} - -.icon.label_outline:before { - content: "\e9e4"; -} - -.icon.launchopen_in_new:before { - content: "\e9fc"; -} - -.icon.open_in_browser:before { - content: "\e9fd"; -} - -.icon.perm_media:before { - content: "\e9e5"; -} - -.icon.power_settings_new:before { - content: "\e9e6"; -} - -.icon.search:before { - content: "\e9e7"; -} - -.icon.settings:before { - content: "\e9e8"; -} - -.icon.settings_applications:before { - content: "\e9e9"; -} - -.icon.shop:before { - content: "\e9ea"; -} - -.icon.spellcheck:before { - content: "\e9eb"; -} - -.icon.stars:before { - content: "\e9ec"; -} - -.icon.translate:before { - content: "\e9ed"; -} - -.icon.visibility_off:before { - content: "\e9ee"; -} - -.icon.http:before { - content: "\ea14"; -} - -.icon.compare_arrows:before { - content: "\ea15"; -} - -.icon.update:before { - content: "\e9ef"; -} - -.icon.g_translate:before { - content: "\e9f0"; -} - -.icon.check_circle_outline:before { - content: "\e9f1"; -} - -.icon.delete_outline:before { - content: "\e9f2"; -} - -.icon.drive_folder_upload:before { - content: "\e9f3"; -} - -.icon.home_filled:before { - content: "\ea16"; -} - -.icon.library_add_check:before { - content: "\e9f4"; -} - -.icon.logout:before { - content: "\e9fa"; -} - -.icon.replay_circle_filled:before { - content: "\e9f5"; -} - -.icon.height:before { - content: "\ea17"; -} - -.icon.all_inclusive:before { - content: "\ea18"; -} \ No newline at end of file diff --git a/www/res/imgs/file-icon.png b/www/res/imgs/file-icon.png deleted file mode 100644 index c16c9edd9..000000000 Binary files a/www/res/imgs/file-icon.png and /dev/null differ diff --git a/www/res/logo/favicon.ico b/www/res/logo/favicon.ico deleted file mode 100644 index a33f48eb4..000000000 Binary files a/www/res/logo/favicon.ico and /dev/null differ diff --git a/www/res/logo/github.svg b/www/res/logo/github.svg deleted file mode 100644 index 7870c06dc..000000000 --- a/www/res/logo/github.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/www/res/logo/logo circle-min.png b/www/res/logo/logo circle-min.png deleted file mode 100644 index afab2d3fb..000000000 Binary files a/www/res/logo/logo circle-min.png and /dev/null differ diff --git a/www/res/octicons/fonts/octicons.eot b/www/res/octicons/fonts/octicons.eot deleted file mode 100644 index 2bf20bca0..000000000 Binary files a/www/res/octicons/fonts/octicons.eot and /dev/null differ diff --git a/www/res/octicons/fonts/octicons.svg b/www/res/octicons/fonts/octicons.svg deleted file mode 100644 index d932988bb..000000000 --- a/www/res/octicons/fonts/octicons.svg +++ /dev/null @@ -1,183 +0,0 @@ - - - - -(c) 2012-2015 GitHub - -When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos) - -Font License: SIL OFL 1.1 (http://scripts.sil.org/OFL) -Applies to all font files - -Code License: MIT (http://choosealicense.com/licenses/mit/) -Applies to all other files - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/www/res/octicons/fonts/octicons.ttf b/www/res/octicons/fonts/octicons.ttf deleted file mode 100644 index e7c7efaf3..000000000 Binary files a/www/res/octicons/fonts/octicons.ttf and /dev/null differ diff --git a/www/res/octicons/fonts/octicons.woff b/www/res/octicons/fonts/octicons.woff deleted file mode 100644 index cbf9f62ea..000000000 Binary files a/www/res/octicons/fonts/octicons.woff and /dev/null differ diff --git a/www/res/octicons/style.css b/www/res/octicons/style.css deleted file mode 100644 index 86643cc23..000000000 --- a/www/res/octicons/style.css +++ /dev/null @@ -1,797 +0,0 @@ -@font-face { - font-family: Octicons; - src: url(fonts/octicons.eot?28d967f9610490a8c9b71963a46f68a8); - src: url(fonts/octicons.eot?#iefix) format("embedded-opentype"), url(fonts/octicons.woff?28d967f9610490a8c9b71963a46f68a8) format("woff"), url(octicons.ttf?28d967f9610490a8c9b71963a46f68a8) format("truetype"), url(fonts/octicons.svg?28d967f9610490a8c9b71963a46f68a8#octicons) format("svg"); - font-weight: 400; - font-style: normal -} - -.octicon { - font-family: Octicons; -} - -.octicon-alert:before { - content: "\f02d" -} - -.octicon-archive:before { - content: "\f10d" -} - -.octicon-arrow-both:before { - content: "\f10e" -} - -.octicon-arrow-down:before { - content: "\f03f" -} - -.octicon-arrow-left:before { - content: "\f040" -} - -.octicon-arrow-right:before { - content: "\f03e" -} - -.octicon-arrow-small-down:before { - content: "\f0a0" -} - -.octicon-arrow-small-left:before { - content: "\f0a1" -} - -.octicon-arrow-small-right:before { - content: "\f071" -} - -.octicon-arrow-small-up:before { - content: "\f09f" -} - -.octicon-arrow-up:before { - content: "\f03d" -} - -.octicon-beaker:before { - content: "\f0dd" -} - -.octicon-bell:before { - content: "\f0de" -} - -.octicon-bold:before { - content: "\f0e2" -} - -.octicon-book:before { - content: "\f007" -} - -.octicon-bookmark:before { - content: "\f07b" -} - -.octicon-briefcase:before { - content: "\f0d3" -} - -.octicon-broadcast:before { - content: "\f048" -} - -.octicon-browser:before { - content: "\f0c5" -} - -.octicon-bug:before { - content: "\f091" -} - -.octicon-calendar:before { - content: "\f068" -} - -.octicon-check:before { - content: "\f03a" -} - -.octicon-checklist:before { - content: "\f076" -} - -.octicon-chevron-down:before { - content: "\f0a3" -} - -.octicon-chevron-left:before { - content: "\f0a4" -} - -.octicon-chevron-right:before { - content: "\f078" -} - -.octicon-chevron-up:before { - content: "\f0a2" -} - -.octicon-circle-slash:before { - content: "\f084" -} - -.octicon-circuit-board:before { - content: "\f0d6" -} - -.octicon-clippy:before { - content: "\f035" -} - -.octicon-clock:before { - content: "\f046" -} - -.octicon-cloud-download:before { - content: "\f00b" -} - -.octicon-cloud-upload:before { - content: "\f00c" -} - -.octicon-code:before { - content: "\f05f" -} - -.octicon-comment-discussion:before { - content: "\f04f" -} - -.octicon-comment:before { - content: "\f02b" -} - -.octicon-credit-card:before { - content: "\f045" -} - -.octicon-dash:before { - content: "\f0ca" -} - -.octicon-dashboard:before { - content: "\f07d" -} - -.octicon-database:before { - content: "\f096" -} - -.octicon-dependent:before { - content: "\f113" -} - -.octicon-desktop-download:before { - content: "\f0dc" -} - -.octicon-device-camera-video:before { - content: "\f057" -} - -.octicon-device-camera:before { - content: "\f056" -} - -.octicon-device-desktop:before { - content: "\f27c" -} - -.octicon-device-mobile:before { - content: "\f038" -} - -.octicon-diff-added:before { - content: "\f06b" -} - -.octicon-diff-ignored:before { - content: "\f099" -} - -.octicon-diff-modified:before { - content: "\f06d" -} - -.octicon-diff-removed:before { - content: "\f06c" -} - -.octicon-diff-renamed:before { - content: "\f06e" -} - -.octicon-diff:before { - content: "\f04d" -} - -.octicon-ellipsis:before { - content: "\f09a" -} - -.octicon-eye-closed:before { - content: "\f10f" -} - -.octicon-eye:before { - content: "\f04e" -} - -.octicon-file-binary:before { - content: "\f094" -} - -.octicon-file-code:before { - content: "\f010" -} - -.octicon-file-directory:before { - content: "\f016" -} - -.octicon-file-media:before { - content: "\f012" -} - -.octicon-file-pdf:before { - content: "\f014" -} - -.octicon-file-submodule:before { - content: "\f017" -} - -.octicon-file-symlink-directory:before { - content: "\f0b1" -} - -.octicon-file-symlink-file:before { - content: "\f0b0" -} - -.octicon-file-zip:before { - content: "\f013" -} - -.octicon-file:before { - content: "\f102" -} - -.octicon-flame:before { - content: "\f0d2" -} - -.octicon-fold-down:before { - content: "\f111" -} - -.octicon-fold-up:before { - content: "\f110" -} - -.octicon-fold:before { - content: "\f0cc" -} - -.octicon-gear:before { - content: "\f02f" -} - -.octicon-gift:before { - content: "\f042" -} - -.octicon-gist-secret:before { - content: "\f08c" -} - -.octicon-gist:before { - content: "\f00e" -} - -.octicon-git-branch:before { - content: "\f020" -} - -.octicon-git-commit:before { - content: "\f01f" -} - -.octicon-git-compare:before { - content: "\f0ac" -} - -.octicon-git-merge:before { - content: "\f023" -} - -.octicon-git-pull-request:before { - content: "\f009" -} - -.octicon-github-action:before { - content: "\f118" -} - -.octicon-globe:before { - content: "\f0b6" -} - -.octicon-grabber:before { - content: "\f103" -} - -.octicon-graph:before { - content: "\f043" -} - -.octicon-heart:before { - content: "\2665" -} - -.octicon-history:before { - content: "\f07e" -} - -.octicon-home:before { - content: "\f08d" -} - -.octicon-horizontal-rule:before { - content: "\f070" -} - -.octicon-hubot:before { - content: "\f09d" -} - -.octicon-inbox:before { - content: "\f0cf" -} - -.octicon-info:before { - content: "\f059" -} - -.octicon-issue-closed:before { - content: "\f028" -} - -.octicon-issue-opened:before { - content: "\f026" -} - -.octicon-issue-reopened:before { - content: "\f027" -} - -.octicon-italic:before { - content: "\f0e4" -} - -.octicon-jersey:before { - content: "\f019" -} - -.octicon-kebab-horizontal:before { - content: "\f10a" -} - -.octicon-kebab-vertical:before { - content: "\f10b" -} - -.octicon-key:before { - content: "\f049" -} - -.octicon-keyboard:before { - content: "\f00d" -} - -.octicon-law:before { - content: "\f0d8" -} - -.octicon-light-bulb:before { - content: "\f000" -} - -.octicon-link-external:before { - content: "\f07f" -} - -.octicon-link:before { - content: "\f05c" -} - -.octicon-list-ordered:before { - content: "\f062" -} - -.octicon-list-unordered:before { - content: "\f061" -} - -.octicon-location:before { - content: "\f060" -} - -.octicon-lock:before { - content: "\f06a" -} - -.octicon-logo-gist:before { - content: "\f0ad" -} - -.octicon-logo-github:before { - content: "\f092" -} - -.octicon-mail-read:before { - content: "\f03c" -} - -.octicon-mail:before { - content: "\f03b" -} - -.octicon-mark-github:before { - content: "\f00a" -} - -.octicon-markdown:before { - content: "\f0c9" -} - -.octicon-megaphone:before { - content: "\f077" -} - -.octicon-mention:before { - content: "\f0be" -} - -.octicon-milestone:before { - content: "\f075" -} - -.octicon-mirror:before { - content: "\f024" -} - -.octicon-mortar-board:before { - content: "\f0d7" -} - -.octicon-mute:before { - content: "\f080" -} - -.octicon-no-newline:before { - content: "\f09c" -} - -.octicon-note:before { - content: "\f109" -} - -.octicon-octoface:before { - content: "\f008" -} - -.octicon-organization:before { - content: "\f037" -} - -.octicon-package:before { - content: "\f0c4" -} - -.octicon-paintcan:before { - content: "\f0d1" -} - -.octicon-pencil:before { - content: "\f058" -} - -.octicon-person:before { - content: "\f018" -} - -.octicon-pin:before { - content: "\f041" -} - -.octicon-play:before { - content: "\f117" -} - -.octicon-plug:before { - content: "\f0d4" -} - -.octicon-plus-small:before { - content: "\f104" -} - -.octicon-plus:before { - content: "\f05d" -} - -.octicon-primitive-dot-stroke:before { - content: "\f11e" -} - -.octicon-primitive-dot:before { - content: "\f052" -} - -.octicon-primitive-square:before { - content: "\f053" -} - -.octicon-project:before { - content: "\f106" -} - -.octicon-pulse:before { - content: "\f085" -} - -.octicon-question:before { - content: "\f02c" -} - -.octicon-quote:before { - content: "\f063" -} - -.octicon-radio-tower:before { - content: "\f030" -} - -.octicon-reply:before { - content: "\f105" -} - -.octicon-repo-clone:before { - content: "\f04c" -} - -.octicon-repo-force-push:before { - content: "\f04a" -} - -.octicon-repo-forked:before { - content: "\f002" -} - -.octicon-repo-pull:before { - content: "\f006" -} - -.octicon-repo-push:before { - content: "\f005" -} - -.octicon-repo-template-private:before { - content: "\f115" -} - -.octicon-repo-template:before { - content: "\f114" -} - -.octicon-repo:before { - content: "\f001" -} - -.octicon-report:before { - content: "\f10c" -} - -.octicon-request-changes:before { - content: "\f112" -} - -.octicon-rocket:before { - content: "\f033" -} - -.octicon-rss:before { - content: "\f034" -} - -.octicon-ruby:before { - content: "\f047" -} - -.octicon-saved:before { - content: "\f11c" -} - -.octicon-screen-full:before { - content: "\f107" -} - -.octicon-screen-normal:before { - content: "\f108" -} - -.octicon-search:before { - content: "\f02e" -} - -.octicon-server:before { - content: "\f097" -} - -.octicon-settings:before { - content: "\f07c" -} - -.octicon-shield-check:before { - content: "\f11a" -} - -.octicon-shield-lock:before { - content: "\f0e1" -} - -.octicon-shield-x:before { - content: "\f11b" -} - -.octicon-shield:before { - content: "\f119" -} - -.octicon-sign-in:before { - content: "\f036" -} - -.octicon-sign-out:before { - content: "\f032" -} - -.octicon-skip:before { - content: "\f116" -} - -.octicon-smiley:before { - content: "\f0e7" -} - -.octicon-squirrel:before { - content: "\f0b2" -} - -.octicon-star:before { - content: "\f02a" -} - -.octicon-stop:before { - content: "\f08f" -} - -.octicon-sync:before { - content: "\f087" -} - -.octicon-tag:before { - content: "\f015" -} - -.octicon-tasklist:before { - content: "\f0e5" -} - -.octicon-telescope:before { - content: "\f088" -} - -.octicon-terminal:before { - content: "\f0c8" -} - -.octicon-text-size:before { - content: "\f0e3" -} - -.octicon-three-bars:before { - content: "\f05e" -} - -.octicon-thumbsdown:before { - content: "\f0db" -} - -.octicon-thumbsup:before { - content: "\f0da" -} - -.octicon-tools:before { - content: "\f031" -} - -.octicon-trashcan:before { - content: "\f0d0" -} - -.octicon-triangle-down:before { - content: "\f05b" -} - -.octicon-triangle-left:before { - content: "\f044" -} - -.octicon-triangle-right:before { - content: "\f05a" -} - -.octicon-triangle-up:before { - content: "\f0aa" -} - -.octicon-unfold:before { - content: "\f039" -} - -.octicon-unmute:before { - content: "\f0ba" -} - -.octicon-unsaved:before { - content: "\f11d" -} - -.octicon-unverified:before { - content: "\f0e8" -} - -.octicon-verified:before { - content: "\f0e6" -} - -.octicon-versions:before { - content: "\f064" -} - -.octicon-watch:before { - content: "\f0e0" -} - -.octicon-workflow-all:before { - content: "\f120" -} - -.octicon-workflow:before { - content: "\f11f" -} - -.octicon-x:before { - content: "\f081" -} - -.octicon-zap:before { - content: "\26a1" -} - -/*# sourceMappingURL=octicons.min.css.map */ \ No newline at end of file